1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Red Hat Inc.
3 # This file is distributed under the same license as the libguestfs package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
9 "Project-Id-Version: libguestfs 1.14.3\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2011-11-22 15:04+0000\n"
12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 "Language-Team: LANGUAGE <LL@li.org>\n"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
21 #: ../align/virt-alignment-scan.pod:3 ../cat/virt-cat.pod:3 ../cat/virt-filesystems.pod:3 ../cat/virt-ls.pod:3 ../clone/virt-sysprep.pod:3 ../df/virt-df.pod:3 ../edit/virt-edit.pod:3 ../erlang/examples/guestfs-erlang.pod:3 ../examples/guestfs-examples.pod:3 ../examples/guestfs-recipes.pod:14 ../examples/guestfs-testing.pod:3 ../fish/guestfish.pod:3 ../fish/virt-copy-in.pod:3 ../fish/virt-copy-out.pod:3 ../fish/virt-tar-in.pod:3 ../fish/virt-tar-out.pod:3 ../fuse/guestmount.pod:3 ../inspector/virt-inspector.pod:3 ../java/examples/guestfs-java.pod:3 ../ocaml/examples/guestfs-ocaml.pod:3 ../perl/examples/guestfs-perl.pod:3 ../python/examples/guestfs-python.pod:3 ../rescue/virt-rescue.pod:3 ../resize/virt-resize.pod:3 ../ruby/examples/guestfs-ruby.pod:3 ../sparsify/virt-sparsify.pod:3 ../src/guestfs.pod:3 ../test-tool/libguestfs-test-tool.pod:3 ../tools/virt-list-filesystems.pl:30 ../tools/virt-list-partitions.pl:30 ../tools/virt-make-fs.pl:35 ../tools/virt-tar.pl:31 ../tools/virt-win-reg.pl:35
26 #: ../align/virt-alignment-scan.pod:5
27 msgid "virt-alignment-scan - Check alignment of virtual machine partitions"
31 #: ../align/virt-alignment-scan.pod:7 ../cat/virt-cat.pod:7 ../cat/virt-filesystems.pod:7 ../cat/virt-ls.pod:7 ../clone/virt-sysprep.pod:7 ../df/virt-df.pod:7 ../edit/virt-edit.pod:7 ../erlang/examples/guestfs-erlang.pod:7 ../examples/guestfs-examples.pod:7 ../fish/guestfish.pod:7 ../fish/virt-copy-in.pod:7 ../fish/virt-copy-out.pod:7 ../fish/virt-tar-in.pod:7 ../fish/virt-tar-out.pod:7 ../fuse/guestmount.pod:7 ../inspector/virt-inspector.pod:7 ../java/examples/guestfs-java.pod:7 ../ocaml/examples/guestfs-ocaml.pod:7 ../perl/examples/guestfs-perl.pod:7 ../python/examples/guestfs-python.pod:7 ../rescue/virt-rescue.pod:7 ../resize/virt-resize.pod:7 ../ruby/examples/guestfs-ruby.pod:7 ../sparsify/virt-sparsify.pod:7 ../src/guestfs.pod:7 ../test-tool/libguestfs-test-tool.pod:7 ../tools/virt-list-filesystems.pl:34 ../tools/virt-list-partitions.pl:34 ../tools/virt-make-fs.pl:39 ../tools/virt-tar.pl:35 ../tools/virt-win-reg.pl:39
36 #: ../align/virt-alignment-scan.pod:9
39 " virt-alignment-scan [--options] -d domname\n"
44 #: ../align/virt-alignment-scan.pod:11
47 " virt-alignment-scan [--options] -a disk.img [-a disk.img ...]\n"
52 #: ../align/virt-alignment-scan.pod:13 ../cat/virt-cat.pod:19 ../cat/virt-filesystems.pod:13 ../cat/virt-ls.pod:19 ../clone/virt-sysprep.pod:13 ../df/virt-df.pod:21 ../edit/virt-edit.pod:27 ../erlang/examples/guestfs-erlang.pod:16 ../examples/guestfs-examples.pod:19 ../examples/guestfs-recipes.pod:18 ../examples/guestfs-testing.pod:7 ../fish/guestfish.pod:30 ../fish/virt-copy-in.pod:19 ../fish/virt-copy-out.pod:13 ../fish/virt-tar-in.pod:21 ../fish/virt-tar-out.pod:15 ../fuse/guestmount.pod:20 ../inspector/virt-inspector.pod:19 ../java/examples/guestfs-java.pod:15 ../ocaml/examples/guestfs-ocaml.pod:25 ../perl/examples/guestfs-perl.pod:18 ../python/examples/guestfs-python.pod:14 ../rescue/virt-rescue.pod:29 ../resize/virt-resize.pod:13 ../ruby/examples/guestfs-ruby.pod:15 ../sparsify/virt-sparsify.pod:11 ../src/guestfs.pod:23 ../test-tool/libguestfs-test-tool.pod:11 ../tools/virt-list-filesystems.pl:40 ../tools/virt-list-partitions.pl:40 ../tools/virt-make-fs.pl:47 ../tools/virt-tar.pl:77 ../tools/virt-win-reg.pl:63
57 #: ../align/virt-alignment-scan.pod:15
59 "When older operating systems install themselves, the partitioning tools "
60 "place partitions at a sector misaligned with the underlying storage "
61 "(commonly the first partition starts on sector C<63>). Misaligned "
62 "partitions can result in an operating system issuing more I/O than should be "
67 #: ../align/virt-alignment-scan.pod:21
69 "The virt-alignment-scan tool checks the alignment of partitions in virtual "
70 "machines and disk images and warns you if there are alignment problems."
74 #: ../align/virt-alignment-scan.pod:25
76 "Currently there is no virt tool for fixing alignment problems. You can only "
77 "reinstall the guest operating system. The following NetApp document "
78 "summarises the problem and possible solutions: "
79 "L<http://media.netapp.com/documents/tr-3747.pdf>"
83 #: ../align/virt-alignment-scan.pod:30
88 #: ../align/virt-alignment-scan.pod:32
89 msgid "To run this tool on a disk image directly, use the I<-a> option:"
93 #: ../align/virt-alignment-scan.pod:34
96 " $ virt-alignment-scan -a winxp.img\n"
97 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
102 #: ../align/virt-alignment-scan.pod:37
105 " $ virt-alignment-scan -a fedora16.img\n"
106 " /dev/sda1 1048576 1024K ok\n"
107 " /dev/sda2 2097152 2048K ok\n"
108 " /dev/sda3 526385152 2048K ok\n"
113 #: ../align/virt-alignment-scan.pod:42
115 "To run the tool on a guest known to libvirt, use the I<-d> option and "
116 "possibly the I<-c> option:"
120 #: ../align/virt-alignment-scan.pod:45
123 " # virt-alignment-scan -d RHEL5\n"
124 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
125 " /dev/sda2 106928640 512 bad (alignment < 4K)\n"
130 #: ../align/virt-alignment-scan.pod:49
133 " $ virt-alignment-scan -c qemu:///system -d Win7TwoDisks\n"
134 " /dev/sda1 1048576 1024K ok\n"
135 " /dev/sda2 105906176 1024K ok\n"
136 " /dev/sdb1 65536 64K ok\n"
141 #: ../align/virt-alignment-scan.pod:54
143 "The output consists of 4 or more whitespace-separated columns. Only the "
144 "first 4 columns are signficant if you want to parse this from a program. "
149 #: ../align/virt-alignment-scan.pod:60
154 #: ../align/virt-alignment-scan.pod:62
156 "the device and partition name (eg. C</dev/sda1> meaning the first partition "
157 "on the first block device)"
161 #: ../align/virt-alignment-scan.pod:65
166 #: ../align/virt-alignment-scan.pod:67
167 msgid "the start of the partition in bytes"
171 #: ../align/virt-alignment-scan.pod:69
176 #: ../align/virt-alignment-scan.pod:71
177 msgid "the alignment in bytes or Kbytes (eg. C<512> or C<4K>)"
181 #: ../align/virt-alignment-scan.pod:73
186 #: ../align/virt-alignment-scan.pod:75
188 "C<ok> if the alignment is best for performance, or C<bad> if the alignment "
189 "can cause performance problems"
193 #: ../align/virt-alignment-scan.pod:78
198 #: ../align/virt-alignment-scan.pod:80
199 msgid "optional free-text explanation."
203 #: ../align/virt-alignment-scan.pod:84
205 "The exit code from the program changes depending on whether poorly aligned "
206 "partitions were found. See L</EXIT STATUS> below."
210 #: ../align/virt-alignment-scan.pod:87
211 msgid "If you just want the exit code with no output, use the I<-q> option."
215 #: ../align/virt-alignment-scan.pod:89 ../cat/virt-cat.pod:62 ../cat/virt-filesystems.pod:91 ../cat/virt-ls.pod:261 ../clone/virt-sysprep.pod:42 ../df/virt-df.pod:59 ../edit/virt-edit.pod:62 ../fish/guestfish.pod:148 ../fish/virt-copy-in.pod:45 ../fish/virt-copy-out.pod:34 ../fish/virt-tar-in.pod:42 ../fish/virt-tar-out.pod:36 ../fuse/guestmount.pod:92 ../inspector/virt-inspector.pod:55 ../rescue/virt-rescue.pod:84 ../resize/virt-resize.pod:262 ../sparsify/virt-sparsify.pod:99 ../test-tool/libguestfs-test-tool.pod:36 ../tools/virt-list-filesystems.pl:53 ../tools/virt-list-partitions.pl:54 ../tools/virt-make-fs.pl:153 ../tools/virt-tar.pl:103 ../tools/virt-win-reg.pl:96
220 #: ../align/virt-alignment-scan.pod:93 ../cat/virt-cat.pod:66 ../cat/virt-filesystems.pod:95 ../cat/virt-ls.pod:265 ../clone/virt-sysprep.pod:46 ../df/virt-df.pod:63 ../edit/virt-edit.pod:66 ../fish/guestfish.pod:152 ../fuse/guestmount.pod:160 ../inspector/virt-inspector.pod:59 ../rescue/virt-rescue.pod:88 ../resize/virt-resize.pod:266 ../sparsify/virt-sparsify.pod:103 ../test-tool/libguestfs-test-tool.pod:40 ../tools/virt-list-filesystems.pl:61 ../tools/virt-list-partitions.pl:62 ../tools/virt-make-fs.pl:161 ../tools/virt-tar.pl:111 ../tools/virt-win-reg.pl:104
225 #: ../align/virt-alignment-scan.pod:95 ../cat/virt-cat.pod:68 ../cat/virt-filesystems.pod:97 ../cat/virt-ls.pod:267 ../clone/virt-sysprep.pod:48 ../df/virt-df.pod:65 ../edit/virt-edit.pod:68 ../inspector/virt-inspector.pod:61 ../rescue/virt-rescue.pod:90 ../tools/virt-list-filesystems.pl:63 ../tools/virt-list-partitions.pl:64 ../tools/virt-make-fs.pl:163 ../tools/virt-tar.pl:113 ../tools/virt-win-reg.pl:106
226 msgid "Display brief help."
230 #: ../align/virt-alignment-scan.pod:97 ../cat/virt-cat.pod:70 ../cat/virt-filesystems.pod:99 ../cat/virt-ls.pod:269 ../clone/virt-sysprep.pod:50 ../df/virt-df.pod:67 ../edit/virt-edit.pod:70 ../inspector/virt-inspector.pod:63 ../rescue/virt-rescue.pod:92
235 #: ../align/virt-alignment-scan.pod:99 ../cat/virt-cat.pod:72 ../cat/virt-filesystems.pod:101 ../cat/virt-ls.pod:271 ../clone/virt-sysprep.pod:52 ../df/virt-df.pod:69 ../edit/virt-edit.pod:72 ../inspector/virt-inspector.pod:65 ../rescue/virt-rescue.pod:94
236 msgid "B<--add> file"
240 #: ../align/virt-alignment-scan.pod:101 ../clone/virt-sysprep.pod:54
241 msgid "Add I<file> which should be a disk image from a virtual machine."
245 #: ../align/virt-alignment-scan.pod:103 ../cat/virt-cat.pod:78 ../cat/virt-filesystems.pod:107 ../cat/virt-ls.pod:277 ../clone/virt-sysprep.pod:56 ../df/virt-df.pod:75 ../edit/virt-edit.pod:78 ../fish/guestfish.pod:174 ../fuse/guestmount.pod:102 ../inspector/virt-inspector.pod:71 ../rescue/virt-rescue.pod:100
247 "The format of the disk image is auto-detected. To override this and force a "
248 "particular format use the I<--format=..> option."
252 #: ../align/virt-alignment-scan.pod:106 ../cat/virt-cat.pod:81 ../cat/virt-filesystems.pod:125 ../cat/virt-ls.pod:291 ../clone/virt-sysprep.pod:59 ../df/virt-df.pod:78 ../rescue/virt-rescue.pod:107
257 #: ../align/virt-alignment-scan.pod:108 ../cat/virt-cat.pod:83 ../cat/virt-filesystems.pod:127 ../cat/virt-ls.pod:293 ../clone/virt-sysprep.pod:61 ../df/virt-df.pod:80 ../rescue/virt-rescue.pod:109
258 msgid "B<--connect> URI"
262 #: ../align/virt-alignment-scan.pod:110 ../cat/virt-cat.pod:85 ../cat/virt-filesystems.pod:129 ../cat/virt-ls.pod:295 ../clone/virt-sysprep.pod:63 ../df/virt-df.pod:82 ../edit/virt-edit.pod:99 ../inspector/virt-inspector.pod:78 ../rescue/virt-rescue.pod:111 ../tools/virt-list-filesystems.pl:81 ../tools/virt-list-partitions.pl:82 ../tools/virt-tar.pl:131 ../tools/virt-win-reg.pl:132
264 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
265 "to the default libvirt hypervisor."
269 #: ../align/virt-alignment-scan.pod:113 ../cat/virt-cat.pod:88 ../cat/virt-filesystems.pod:132 ../cat/virt-ls.pod:298 ../clone/virt-sysprep.pod:66 ../df/virt-df.pod:85 ../rescue/virt-rescue.pod:114
271 "If you specify guest block devices directly (I<-a>), then libvirt is not "
276 #: ../align/virt-alignment-scan.pod:116 ../cat/virt-cat.pod:91 ../cat/virt-filesystems.pod:141 ../cat/virt-ls.pod:307 ../clone/virt-sysprep.pod:69 ../df/virt-df.pod:94 ../edit/virt-edit.pod:105 ../inspector/virt-inspector.pod:85 ../rescue/virt-rescue.pod:117
281 #: ../align/virt-alignment-scan.pod:118 ../cat/virt-cat.pod:93 ../cat/virt-filesystems.pod:143 ../cat/virt-ls.pod:309 ../clone/virt-sysprep.pod:71 ../df/virt-df.pod:96 ../edit/virt-edit.pod:107 ../inspector/virt-inspector.pod:87 ../rescue/virt-rescue.pod:119
282 msgid "B<--domain> guest"
286 #: ../align/virt-alignment-scan.pod:120 ../cat/virt-cat.pod:95 ../cat/virt-filesystems.pod:145 ../cat/virt-ls.pod:311 ../clone/virt-sysprep.pod:73 ../df/virt-df.pod:98 ../edit/virt-edit.pod:109 ../inspector/virt-inspector.pod:89 ../rescue/virt-rescue.pod:121
288 "Add all the disks from the named libvirt guest. Domain UUIDs can be used "
293 #: ../align/virt-alignment-scan.pod:123 ../cat/virt-cat.pod:105 ../cat/virt-filesystems.pod:170 ../cat/virt-ls.pod:328 ../clone/virt-sysprep.pod:95 ../df/virt-df.pod:101 ../fish/guestfish.pod:233 ../fuse/guestmount.pod:142 ../inspector/virt-inspector.pod:99 ../rescue/virt-rescue.pod:124
294 msgid "B<--format=raw|qcow2|..>"
298 #: ../align/virt-alignment-scan.pod:125 ../cat/virt-cat.pod:107 ../cat/virt-filesystems.pod:172 ../cat/virt-ls.pod:330 ../clone/virt-sysprep.pod:97 ../df/virt-df.pod:103 ../edit/virt-edit.pod:134 ../fish/guestfish.pod:235 ../fuse/guestmount.pod:144 ../inspector/virt-inspector.pod:101 ../rescue/virt-rescue.pod:126
303 #: ../align/virt-alignment-scan.pod:127 ../cat/virt-cat.pod:109 ../cat/virt-filesystems.pod:174 ../cat/virt-ls.pod:332 ../clone/virt-sysprep.pod:99 ../df/virt-df.pod:105 ../edit/virt-edit.pod:136 ../fish/guestfish.pod:237 ../fuse/guestmount.pod:146 ../rescue/virt-rescue.pod:128
305 "The default for the I<-a> option is to auto-detect the format of the disk "
306 "image. Using this forces the disk format for I<-a> options which follow on "
307 "the command line. Using I<--format> with no argument switches back to "
308 "auto-detection for subsequent I<-a> options."
312 #: ../align/virt-alignment-scan.pod:132 ../cat/virt-cat.pod:114 ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337 ../clone/virt-sysprep.pod:104 ../df/virt-df.pod:110 ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242 ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:351 ../rescue/virt-rescue.pod:133 ../src/guestfs.pod:2877
317 #: ../align/virt-alignment-scan.pod:134
320 " virt-alignment-scan --format=raw -a disk.img\n"
325 #: ../align/virt-alignment-scan.pod:136 ../cat/virt-cat.pod:118 ../cat/virt-filesystems.pod:183 ../cat/virt-ls.pod:341 ../clone/virt-sysprep.pod:108 ../df/virt-df.pod:114 ../edit/virt-edit.pod:145 ../fish/guestfish.pod:246 ../rescue/virt-rescue.pod:137
326 msgid "forces raw format (no auto-detection) for C<disk.img>."
330 #: ../align/virt-alignment-scan.pod:138
333 " virt-alignment-scan --format=raw -a disk.img --format -a another.img\n"
338 #: ../align/virt-alignment-scan.pod:140 ../cat/virt-cat.pod:122 ../cat/virt-filesystems.pod:187 ../cat/virt-ls.pod:345 ../clone/virt-sysprep.pod:112 ../df/virt-df.pod:118 ../edit/virt-edit.pod:149 ../fish/guestfish.pod:250 ../rescue/virt-rescue.pod:141
340 "forces raw format (no auto-detection) for C<disk.img> and reverts to "
341 "auto-detection for C<another.img>."
345 #: ../align/virt-alignment-scan.pod:143 ../cat/virt-cat.pod:125 ../cat/virt-filesystems.pod:190 ../cat/virt-ls.pod:348 ../clone/virt-sysprep.pod:115 ../df/virt-df.pod:121 ../edit/virt-edit.pod:152 ../rescue/virt-rescue.pod:144
347 "If you have untrusted raw-format guest disk images, you should use this "
348 "option to specify the disk format. This avoids a possible security problem "
349 "with malicious guests (CVE-2010-3851)."
353 #: ../align/virt-alignment-scan.pod:147 ../resize/virt-resize.pod:491 ../sparsify/virt-sparsify.pod:152
358 #: ../align/virt-alignment-scan.pod:149 ../resize/virt-resize.pod:493 ../sparsify/virt-sparsify.pod:154
363 #: ../align/virt-alignment-scan.pod:151
365 "Don't produce any output. Just set the exit code (see L</EXIT STATUS> "
370 #: ../align/virt-alignment-scan.pod:154 ../cat/virt-cat.pod:134 ../cat/virt-filesystems.pod:261 ../cat/virt-ls.pod:425 ../clone/virt-sysprep.pod:138 ../df/virt-df.pod:173 ../edit/virt-edit.pod:161 ../fish/guestfish.pod:390 ../fuse/guestmount.pod:266 ../inspector/virt-inspector.pod:119 ../rescue/virt-rescue.pod:182 ../sparsify/virt-sparsify.pod:158
375 #: ../align/virt-alignment-scan.pod:156 ../cat/virt-cat.pod:136 ../cat/virt-filesystems.pod:263 ../cat/virt-ls.pod:427 ../clone/virt-sysprep.pod:140 ../df/virt-df.pod:175 ../edit/virt-edit.pod:163 ../fish/guestfish.pod:392 ../fuse/guestmount.pod:268 ../inspector/virt-inspector.pod:121 ../rescue/virt-rescue.pod:184 ../sparsify/virt-sparsify.pod:160
380 #: ../align/virt-alignment-scan.pod:158 ../cat/virt-cat.pod:138 ../cat/virt-filesystems.pod:265 ../cat/virt-ls.pod:429 ../clone/virt-sysprep.pod:142 ../df/virt-df.pod:177 ../edit/virt-edit.pod:165 ../inspector/virt-inspector.pod:123 ../rescue/virt-rescue.pod:186 ../sparsify/virt-sparsify.pod:162
381 msgid "Enable verbose messages for debugging."
385 #: ../align/virt-alignment-scan.pod:160 ../cat/virt-cat.pod:140 ../cat/virt-filesystems.pod:267 ../cat/virt-ls.pod:431 ../clone/virt-sysprep.pod:144 ../df/virt-df.pod:179 ../edit/virt-edit.pod:167 ../fish/guestfish.pod:397 ../fuse/guestmount.pod:272 ../inspector/virt-inspector.pod:125 ../rescue/virt-rescue.pod:188 ../resize/virt-resize.pod:561 ../sparsify/virt-sparsify.pod:164
390 #: ../align/virt-alignment-scan.pod:162 ../cat/virt-cat.pod:142 ../cat/virt-filesystems.pod:269 ../cat/virt-ls.pod:433 ../clone/virt-sysprep.pod:146 ../df/virt-df.pod:181 ../edit/virt-edit.pod:169 ../fish/guestfish.pod:399 ../fuse/guestmount.pod:274 ../inspector/virt-inspector.pod:127 ../rescue/virt-rescue.pod:190 ../resize/virt-resize.pod:563 ../sparsify/virt-sparsify.pod:166 ../tools/virt-list-filesystems.pl:69 ../tools/virt-list-partitions.pl:70 ../tools/virt-make-fs.pl:169 ../tools/virt-tar.pl:119 ../tools/virt-win-reg.pl:112
395 #: ../align/virt-alignment-scan.pod:164 ../cat/virt-cat.pod:144 ../cat/virt-filesystems.pod:271 ../cat/virt-ls.pod:435 ../clone/virt-sysprep.pod:148 ../df/virt-df.pod:183 ../edit/virt-edit.pod:171 ../inspector/virt-inspector.pod:129 ../rescue/virt-rescue.pod:192 ../resize/virt-resize.pod:565 ../sparsify/virt-sparsify.pod:168 ../tools/virt-list-filesystems.pl:71 ../tools/virt-list-partitions.pl:72 ../tools/virt-make-fs.pl:171 ../tools/virt-tar.pl:121 ../tools/virt-win-reg.pl:114
396 msgid "Display version number and exit."
400 #: ../align/virt-alignment-scan.pod:166 ../cat/virt-cat.pod:146 ../cat/virt-filesystems.pod:281 ../cat/virt-ls.pod:437 ../clone/virt-sysprep.pod:150 ../df/virt-df.pod:185 ../edit/virt-edit.pod:173 ../fish/guestfish.pod:412 ../fuse/guestmount.pod:287 ../inspector/virt-inspector.pod:131 ../rescue/virt-rescue.pod:203 ../sparsify/virt-sparsify.pod:170 ../tools/virt-tar.pl:158
405 #: ../align/virt-alignment-scan.pod:168 ../cat/virt-cat.pod:148 ../cat/virt-filesystems.pod:283 ../cat/virt-ls.pod:439 ../clone/virt-sysprep.pod:152 ../df/virt-df.pod:187 ../edit/virt-edit.pod:175 ../inspector/virt-inspector.pod:133 ../rescue/virt-rescue.pod:205 ../sparsify/virt-sparsify.pod:172
406 msgid "Enable tracing of libguestfs API calls."
410 #: ../align/virt-alignment-scan.pod:172
411 msgid "RECOMMENDED ALIGNMENT"
415 #: ../align/virt-alignment-scan.pod:174
417 "Operating systems older than Windows 2008 and Linux before ca.2010 place the "
418 "first sector of the first partition at sector 63, with a 512 byte sector "
419 "size. This happens because of a historical accident. Drives have to report "
420 "a cylinder / head / sector (CHS) geometry to the BIOS. The geometry is "
421 "completely meaningless on modern drives, but it happens that the geometry "
422 "reported always has 63 sectors per track. The operating system therefore "
423 "places the first partition at the start of the second \"track\", at sector "
428 #: ../align/virt-alignment-scan.pod:183
430 "When the guest OS is virtualized, the host operating system and hypervisor "
431 "may prefer accesses aligned to one of:"
435 #: ../align/virt-alignment-scan.pod:188
440 #: ../align/virt-alignment-scan.pod:190
442 "if the host OS uses local storage directly on hard drive partitions, and the "
443 "hard drive has 512 byte physical sectors."
447 #: ../align/virt-alignment-scan.pod:193
452 #: ../align/virt-alignment-scan.pod:195
454 "for local storage on new hard drives with 4Kbyte physical sectors; for "
455 "file-backed storage on filesystems with 4Kbyte block size; or for some types "
456 "of network-attached storage."
460 #: ../align/virt-alignment-scan.pod:199
465 #: ../align/virt-alignment-scan.pod:201
467 "for high-end network-attached storage. This is the optimal block size for "
468 "some NetApp hardware."
472 #: ../align/virt-alignment-scan.pod:204
477 #: ../align/virt-alignment-scan.pod:206
478 msgid "see L</1 MB PARTITION ALIGNMENT> below."
482 #: ../align/virt-alignment-scan.pod:210
484 "Partitions which are not aligned correctly to the underlying storage cause "
485 "extra I/O. For example:"
489 #: ../align/virt-alignment-scan.pod:213
493 " +--------------------------+------\n"
495 " | filesystem block |\n"
496 " ---+------------------+------+-------------------+-----+---\n"
497 " | host block | host block |\n"
499 " ---+-------------------------+-------------------------+---\n"
504 #: ../align/virt-alignment-scan.pod:222
506 "In this example, each time a 4K guest block is read, two blocks on the host "
507 "must be accessed (so twice as much I/O is done). When a 4K guest block is "
508 "written, two host blocks must first be read, the old and new data combined, "
509 "and the two blocks written back (4x I/O)."
513 #: ../align/virt-alignment-scan.pod:227
514 msgid "LINUX HOST BLOCK AND I/O SIZE"
518 #: ../align/virt-alignment-scan.pod:229
520 "New versions of the Linux kernel expose the physical and logical block size, "
521 "and minimum and recommended I/O size."
525 #: ../align/virt-alignment-scan.pod:232
526 msgid "For a typical consumer hard drive with 512 byte sectors:"
530 #: ../align/virt-alignment-scan.pod:234
533 " $ cat /sys/block/sda/queue/hw_sector_size\n"
535 " $ cat /sys/block/sda/queue/physical_block_size\n"
537 " $ cat /sys/block/sda/queue/logical_block_size\n"
539 " $ cat /sys/block/sda/queue/minimum_io_size\n"
541 " $ cat /sys/block/sda/queue/optimal_io_size\n"
547 #: ../align/virt-alignment-scan.pod:245
548 msgid "For a new consumer hard drive with 4Kbyte sectors:"
552 #: ../align/virt-alignment-scan.pod:247
555 " $ cat /sys/block/sda/queue/hw_sector_size\n"
557 " $ cat /sys/block/sda/queue/physical_block_size\n"
559 " $ cat /sys/block/sda/queue/logical_block_size\n"
561 " $ cat /sys/block/sda/queue/minimum_io_size\n"
563 " $ cat /sys/block/sda/queue/optimal_io_size\n"
569 #: ../align/virt-alignment-scan.pod:258
570 msgid "For a NetApp LUN:"
574 #: ../align/virt-alignment-scan.pod:260
577 " $ cat /sys/block/sdc/queue/logical_block_size\n"
579 " $ cat /sys/block/sdc/queue/physical_block_size\n"
581 " $ cat /sys/block/sdc/queue/minimum_io_size\n"
583 " $ cat /sys/block/sdc/queue/optimal_io_size\n"
589 #: ../align/virt-alignment-scan.pod:269
591 "The NetApp allows 512 byte accesses (but they will be very inefficient), "
592 "prefers a minimum 4K I/O size, but the optimal I/O size is 64K."
596 #: ../align/virt-alignment-scan.pod:273
598 "For detailed information about what these numbers mean, see "
599 "L<http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/newstorage-iolimits.html>"
603 #: ../align/virt-alignment-scan.pod:276
605 "[Thanks to Matt Booth for providing 4K drive data. Thanks to Mike Snitzer "
606 "for providing NetApp data and additional information.]"
610 #: ../align/virt-alignment-scan.pod:279
611 msgid "1 MB PARTITION ALIGNMENT"
615 #: ../align/virt-alignment-scan.pod:281
617 "Microsoft picked 1 MB as the default alignment for all partitions starting "
618 "with Windows 2008 Server, and Linux has followed this."
622 #: ../align/virt-alignment-scan.pod:284
624 "Assuming 512 byte sectors in the guest, you will now see the first partition "
625 "starting at sector 2048, and subsequent partitions (if any) will start at a "
626 "multiple of 2048 sectors."
630 #: ../align/virt-alignment-scan.pod:288
632 "1 MB alignment is compatible with all current alignment requirements (4K, "
633 "64K) and provides room for future growth in physical block sizes."
637 #: ../align/virt-alignment-scan.pod:291
638 msgid "SETTING ALIGNMENT"
642 #: ../align/virt-alignment-scan.pod:293
644 "L<virt-resize(1)> can change the alignment of the partitions of some "
645 "guests. Currently it can fully align all the partitions of all Windows "
646 "guests, and it will fix the bootloader where necessary. For Linux guests, "
647 "it can align the second and subsequent partitions, so the majority of OS "
648 "accesses except at boot will be aligned."
652 #: ../align/virt-alignment-scan.pod:299
654 "Another way to correct partition alignment problems is to reinstall your "
655 "guest operating systems. If you install operating systems from templates, "
656 "ensure these have correct partition alignment too."
660 #: ../align/virt-alignment-scan.pod:303
662 "For older versions of Windows, the following NetApp document contains useful "
663 "information: L<http://media.netapp.com/documents/tr-3747.pdf>"
667 #: ../align/virt-alignment-scan.pod:306
669 "For Red Hat Enterprise Linux E<le> 5, use a Kickstart script that contains "
670 "an explicit C<%pre> section that creates aligned partitions using "
671 "L<parted(8)>. Do not use the Kickstart C<part> command. The NetApp "
672 "document above contains an example."
676 #: ../align/virt-alignment-scan.pod:311 ../cat/virt-cat.pod:231 ../cat/virt-filesystems.pod:373 ../cat/virt-ls.pod:483 ../clone/virt-sysprep.pod:475 ../df/virt-df.pod:241 ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:367 ../rescue/virt-rescue.pod:266 ../resize/virt-resize.pod: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:268 ../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:226 ../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:3062 ../src/guestfs.pod:3067 ../src/guestfs.pod:3071 ../src/guestfs.pod:3075 ../src/guestfs.pod:3079 ../src/guestfs.pod:3093 ../src/guestfs.pod:3098 ../src/guestfs.pod:3330 ../src/guestfs.pod:3334 ../src/guestfs.pod:3338 ../src/guestfs.pod:3342 ../tools/virt-win-reg.pl:197 ../tools/virt-win-reg.pl:202 ../tools/virt-win-reg.pl:208 ../tools/virt-win-reg.pl:721 ../tools/virt-win-reg.pl:727 ../tools/virt-win-reg.pl:733
705 #: ../align/virt-alignment-scan.pod:326
710 #: ../align/virt-alignment-scan.pod:328
711 msgid "successful exit, all partitions are aligned E<ge> 64K for best performance"
715 #: ../align/virt-alignment-scan.pod:332
720 #: ../align/virt-alignment-scan.pod:334
721 msgid "an error scanning the disk image or guest"
725 #: ../align/virt-alignment-scan.pod:338
730 #: ../align/virt-alignment-scan.pod:340
732 "successful exit, some partitions have alignment E<lt> 64K which can result "
733 "in poor performance on high end network storage"
737 #: ../align/virt-alignment-scan.pod:345
742 #: ../align/virt-alignment-scan.pod:347
744 "successful exit, some partitions have alignment E<lt> 4K which can result in "
745 "poor performance on most hypervisors"
749 #: ../align/virt-alignment-scan.pod:352 ../cat/virt-cat.pod:243 ../cat/virt-filesystems.pod:385 ../cat/virt-ls.pod:495 ../clone/virt-sysprep.pod:486 ../df/virt-df.pod:253 ../edit/virt-edit.pod:354 ../erlang/examples/guestfs-erlang.pod:97 ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384 ../examples/guestfs-testing.pod:291 ../fish/guestfish.pod:1268 ../fish/virt-copy-in.pod:50 ../fish/virt-copy-out.pod:39 ../fish/virt-tar-in.pod:47 ../fish/virt-tar-out.pod:41 ../fuse/guestmount.pod:317 ../inspector/virt-inspector.pod:395 ../java/examples/guestfs-java.pod:45 ../ocaml/examples/guestfs-ocaml.pod:78 ../perl/examples/guestfs-perl.pod:39 ../python/examples/guestfs-python.pod:42 ../rescue/virt-rescue.pod:288 ../resize/virt-resize.pod:688 ../ruby/examples/guestfs-ruby.pod:36 ../sparsify/virt-sparsify.pod:250 ../src/guestfs.pod:3270 ../test-tool/libguestfs-test-tool.pod:100 ../tools/virt-list-filesystems.pl:195 ../tools/virt-list-partitions.pl:265 ../tools/virt-make-fs.pl:557 ../tools/virt-tar.pl:296 ../tools/virt-win-reg.pl:757
754 #: ../align/virt-alignment-scan.pod:354
756 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-rescue(1)>, "
757 "L<virt-resize(1)>, L<http://libguestfs.org/>."
761 #: ../align/virt-alignment-scan.pod:361 ../cat/virt-cat.pod:252 ../cat/virt-filesystems.pod:396 ../cat/virt-ls.pod:507 ../clone/virt-sysprep.pod:501 ../df/virt-df.pod:261 ../edit/virt-edit.pod:368 ../rescue/virt-rescue.pod:296 ../resize/virt-resize.pod:711 ../sparsify/virt-sparsify.pod:263 ../tools/virt-list-filesystems.pl:208 ../tools/virt-list-partitions.pl:277 ../tools/virt-make-fs.pl:582 ../tools/virt-tar.pl:311 ../tools/virt-win-reg.pl:783
766 #: ../align/virt-alignment-scan.pod:363 ../cat/virt-cat.pod:254 ../cat/virt-filesystems.pod:398 ../cat/virt-ls.pod:509 ../clone/virt-sysprep.pod:503 ../df/virt-df.pod:263 ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:410 ../rescue/virt-rescue.pod:298 ../resize/virt-resize.pod:713 ../sparsify/virt-sparsify.pod:265 ../tools/virt-list-filesystems.pl:210 ../tools/virt-list-partitions.pl:279 ../tools/virt-make-fs.pl:584 ../tools/virt-tar.pl:313 ../tools/virt-win-reg.pl:785
767 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
771 #: ../align/virt-alignment-scan.pod:365 ../cat/virt-cat.pod:256 ../cat/virt-filesystems.pod:400 ../cat/virt-ls.pod:511 ../clone/virt-sysprep.pod:505 ../df/virt-df.pod:265 ../edit/virt-edit.pod:372 ../erlang/examples/guestfs-erlang.pod:114 ../examples/guestfs-examples.pod:49 ../examples/guestfs-recipes.pod:401 ../examples/guestfs-testing.pod:302 ../fish/guestfish.pod:1300 ../fish/virt-copy-in.pod:64 ../fish/virt-copy-out.pod:53 ../fish/virt-tar-in.pod:62 ../fish/virt-tar-out.pod:55 ../fuse/guestmount.pod:332 ../inspector/virt-inspector.pod:418 ../java/examples/guestfs-java.pod:62 ../ocaml/examples/guestfs-ocaml.pod:95 ../perl/examples/guestfs-perl.pod:56 ../python/examples/guestfs-python.pod:58 ../rescue/virt-rescue.pod:300 ../resize/virt-resize.pod:715 ../ruby/examples/guestfs-ruby.pod:52 ../sparsify/virt-sparsify.pod:267 ../src/guestfs.pod:3353 ../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:269
777 msgid "Copyright (C) 2011 Red Hat Inc."
781 #: ../align/virt-alignment-scan.pod:369 ../cat/virt-cat.pod:260 ../cat/virt-filesystems.pod:404 ../cat/virt-ls.pod:515 ../clone/virt-sysprep.pod:509 ../df/virt-df.pod:269 ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1305 ../fish/virt-copy-in.pod:69 ../fish/virt-copy-out.pod:58 ../fish/virt-tar-in.pod:67 ../fish/virt-tar-out.pod:60 ../fuse/guestmount.pod:337 ../inspector/virt-inspector.pod:422 ../rescue/virt-rescue.pod:304 ../resize/virt-resize.pod:719 ../sparsify/virt-sparsify.pod:271 ../test-tool/libguestfs-test-tool.pod:115 ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:285 ../tools/virt-make-fs.pl:590 ../tools/virt-tar.pl:319 ../tools/virt-win-reg.pl:791
783 "This program is free software; you can redistribute it and/or modify it "
784 "under the terms of the GNU General Public License as published by the Free "
785 "Software Foundation; either version 2 of the License, or (at your option) "
790 #: ../align/virt-alignment-scan.pod:374 ../cat/virt-cat.pod:265 ../cat/virt-filesystems.pod:409 ../cat/virt-ls.pod:520 ../clone/virt-sysprep.pod:514 ../df/virt-df.pod:274 ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1310 ../fish/virt-copy-in.pod:74 ../fish/virt-copy-out.pod:63 ../fish/virt-tar-in.pod:72 ../fish/virt-tar-out.pod:65 ../fuse/guestmount.pod:342 ../inspector/virt-inspector.pod:427 ../rescue/virt-rescue.pod:309 ../resize/virt-resize.pod:724 ../sparsify/virt-sparsify.pod:276 ../test-tool/libguestfs-test-tool.pod:120 ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:290 ../tools/virt-make-fs.pl:595 ../tools/virt-tar.pl:324 ../tools/virt-win-reg.pl:796
792 "This program is distributed in the hope that it will be useful, but WITHOUT "
793 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
794 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
799 #: ../align/virt-alignment-scan.pod:379 ../cat/virt-cat.pod:270 ../cat/virt-filesystems.pod:414 ../cat/virt-ls.pod:525 ../clone/virt-sysprep.pod:519 ../df/virt-df.pod:279 ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1315 ../fish/virt-copy-in.pod:79 ../fish/virt-copy-out.pod:68 ../fish/virt-tar-in.pod:77 ../fish/virt-tar-out.pod:70 ../fuse/guestmount.pod:347 ../inspector/virt-inspector.pod:432 ../rescue/virt-rescue.pod:314 ../resize/virt-resize.pod:729 ../sparsify/virt-sparsify.pod:281 ../test-tool/libguestfs-test-tool.pod:125 ../tools/virt-list-filesystems.pl:226 ../tools/virt-list-partitions.pl:295 ../tools/virt-make-fs.pl:600 ../tools/virt-tar.pl:329 ../tools/virt-win-reg.pl:801
801 "You should have received a copy of the GNU General Public License along with "
802 "this program; if not, write to the Free Software Foundation, Inc., 51 "
803 "Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
807 #: ../cat/virt-cat.pod:5
808 msgid "virt-cat - Display files in a virtual machine"
812 #: ../cat/virt-cat.pod:9
815 " virt-cat [--options] -d domname file [file ...]\n"
820 #: ../cat/virt-cat.pod:11
823 " virt-cat [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
828 #: ../cat/virt-cat.pod:13 ../edit/virt-edit.pod:15 ../inspector/virt-inspector.pod:13
833 #: ../cat/virt-cat.pod:15
836 " virt-cat domname file\n"
841 #: ../cat/virt-cat.pod:17
844 " virt-cat disk.img file\n"
849 #: ../cat/virt-cat.pod:21
851 "C<virt-cat> is a command line tool to display the contents of C<file> where "
852 "C<file> exists in the named virtual machine (or disk image)."
856 #: ../cat/virt-cat.pod:24
858 "Multiple filenames can be given, in which case they are concatenated "
859 "together. Each filename must be a full path, starting at the root directory "
860 "(starting with '/')."
864 #: ../cat/virt-cat.pod:28
866 "C<virt-cat> can be used to quickly view a file. To edit a file, use "
867 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
868 "tool (see L</USING GUESTFISH> below)."
872 #: ../cat/virt-cat.pod:32 ../cat/virt-ls.pod:35 ../df/virt-df.pod:43 ../edit/virt-edit.pod:44 ../fish/guestfish.pod:41 ../fish/guestfish.pod:1051 ../fish/virt-copy-in.pod:29 ../fish/virt-copy-out.pod:21 ../fish/virt-tar-in.pod:30 ../fish/virt-tar-out.pod:24 ../fuse/guestmount.pod:39 ../resize/virt-resize.pod:27 ../sparsify/virt-sparsify.pod:75 ../tools/virt-tar.pl:50
877 #: ../cat/virt-cat.pod:34
878 msgid "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
882 #: ../cat/virt-cat.pod:37
885 " virt-cat -d mydomain /etc/fstab\n"
890 #: ../cat/virt-cat.pod:39
891 msgid "List syslog messages from a VM disk image file:"
895 #: ../cat/virt-cat.pod:41
898 " virt-cat -a disk.img /var/log/messages | tail\n"
903 #: ../cat/virt-cat.pod:43
904 msgid "Find out what DHCP IP address a VM acquired:"
908 #: ../cat/virt-cat.pod:45
911 " virt-cat -d mydomain /var/log/messages | \\\n"
912 " grep 'dhclient: bound to' | tail\n"
917 #: ../cat/virt-cat.pod:48
918 msgid "Find out what packages were recently installed:"
922 #: ../cat/virt-cat.pod:50
925 " virt-cat -d mydomain /var/log/yum.log | tail\n"
930 #: ../cat/virt-cat.pod:52
931 msgid "Find out who is logged on inside a virtual machine:"
935 #: ../cat/virt-cat.pod:54
938 " virt-cat -d mydomain /var/run/utmp > /tmp/utmp\n"
944 #: ../cat/virt-cat.pod:57
945 msgid "or who was logged on:"
949 #: ../cat/virt-cat.pod:59
952 " virt-cat -d mydomain /var/log/wtmp > /tmp/wtmp\n"
953 " last -f /tmp/wtmp\n"
958 #: ../cat/virt-cat.pod:74 ../cat/virt-filesystems.pod:103 ../cat/virt-ls.pod:273 ../df/virt-df.pod:71 ../edit/virt-edit.pod:74 ../inspector/virt-inspector.pod:67 ../rescue/virt-rescue.pod:96
960 "Add I<file> which should be a disk image from a virtual machine. If the "
961 "virtual machine has multiple block devices, you must supply all of them with "
962 "separate I<-a> options."
966 #: ../cat/virt-cat.pod:98 ../cat/virt-filesystems.pod:148 ../cat/virt-ls.pod:314 ../edit/virt-edit.pod:112 ../fish/guestfish.pod:217 ../fuse/guestmount.pod:135 ../inspector/virt-inspector.pod:92
967 msgid "B<--echo-keys>"
971 #: ../cat/virt-cat.pod:100
973 "When prompting for keys and passphrases, virt-cat normally turns echoing off "
974 "so you cannot see what you are typing. If you are not worried about Tempest "
975 "attacks and there is no one else in the room you can specify this flag to "
976 "see what you are typing."
980 #: ../cat/virt-cat.pod:116
983 " virt-cat --format=raw -a disk.img file\n"
988 #: ../cat/virt-cat.pod:120
991 " virt-cat --format=raw -a disk.img --format -a another.img file\n"
996 #: ../cat/virt-cat.pod:129 ../cat/virt-filesystems.pod:200 ../cat/virt-ls.pod:361 ../edit/virt-edit.pod:156 ../fish/guestfish.pod:289 ../fuse/guestmount.pod:172 ../inspector/virt-inspector.pod:114
997 msgid "B<--keys-from-stdin>"
1001 #: ../cat/virt-cat.pod:131 ../cat/virt-filesystems.pod:202 ../cat/virt-ls.pod:363 ../edit/virt-edit.pod:158 ../fish/guestfish.pod:291 ../fuse/guestmount.pod:174 ../inspector/virt-inspector.pod:116
1003 "Read key or passphrase parameters from stdin. The default is to try to read "
1004 "passphrases from the user by opening C</dev/tty>."
1008 #: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179 ../inspector/virt-inspector.pod:144 ../rescue/virt-rescue.pod:209
1009 msgid "OLD-STYLE COMMAND LINE ARGUMENTS"
1013 #: ../cat/virt-cat.pod:154
1014 msgid "Previous versions of virt-cat allowed you to write either:"
1018 #: ../cat/virt-cat.pod:156
1021 " virt-cat disk.img [disk.img ...] file\n"
1026 #: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185 ../inspector/virt-inspector.pod:150 ../rescue/virt-rescue.pod:215
1031 #: ../cat/virt-cat.pod:160
1034 " virt-cat guestname file\n"
1039 #: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189 ../inspector/virt-inspector.pod:154 ../rescue/virt-rescue.pod:219
1041 "whereas in this version you should use I<-a> or I<-d> respectively to avoid "
1042 "the confusing case where a disk image might have the same name as a guest."
1046 #: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193 ../inspector/virt-inspector.pod:158 ../rescue/virt-rescue.pod:223
1047 msgid "For compatibility the old style is still supported."
1051 #: ../cat/virt-cat.pod:168 ../edit/virt-edit.pod:257 ../fish/guestfish.pod:858
1052 msgid "WINDOWS PATHS"
1056 #: ../cat/virt-cat.pod:170
1058 "C<virt-cat> has a limited ability to understand Windows drive letters and "
1059 "paths (eg. C<E:\\foo\\bar.txt>)."
1063 #: ../cat/virt-cat.pod:173 ../edit/virt-edit.pod:262
1064 msgid "If and only if the guest is running Windows then:"
1068 #: ../cat/virt-cat.pod:179 ../edit/virt-edit.pod:268
1070 "Drive letter prefixes like C<C:> are resolved against the Windows Registry "
1071 "to the correct filesystem."
1075 #: ../cat/virt-cat.pod:184 ../edit/virt-edit.pod:273
1077 "Any backslash (C<\\>) characters in the path are replaced with forward "
1078 "slashes so that libguestfs can process it."
1082 #: ../cat/virt-cat.pod:189
1084 "The path is resolved case insensitively to locate the file that should be "
1089 #: ../cat/virt-cat.pod:194 ../edit/virt-edit.pod:283
1090 msgid "There are some known shortcomings:"
1094 #: ../cat/virt-cat.pod:200 ../edit/virt-edit.pod:289
1095 msgid "Some NTFS symbolic links may not be followed correctly."
1099 #: ../cat/virt-cat.pod:204 ../edit/virt-edit.pod:293
1100 msgid "NTFS junction points that cross filesystems are not followed."
1104 #: ../cat/virt-cat.pod:208 ../edit/virt-edit.pod:297
1105 msgid "USING GUESTFISH"
1109 #: ../cat/virt-cat.pod:210
1111 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
1112 "C<virt-cat> doesn't work."
1116 #: ../cat/virt-cat.pod:213
1117 msgid "Using C<virt-cat> is approximately equivalent to doing:"
1121 #: ../cat/virt-cat.pod:215
1124 " guestfish --ro -i -d domname download file -\n"
1129 #: ../cat/virt-cat.pod:217
1131 "where C<domname> is the name of the libvirt guest, and C<file> is the full "
1132 "path to the file. Note the final C<-> (meaning \"output to stdout\")."
1136 #: ../cat/virt-cat.pod:221
1138 "The command above uses libguestfs's guest inspection feature and so does not "
1139 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
1140 "disk images that don't contain guests. To display a file from a disk image "
1145 #: ../cat/virt-cat.pod:226
1148 " guestfish --ro -a disk.img -m /dev/sda1 download file -\n"
1153 #: ../cat/virt-cat.pod:228
1155 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
1156 "the disk image, and C<file> is the full path to the file."
1160 #: ../cat/virt-cat.pod:240 ../cat/virt-filesystems.pod:382 ../cat/virt-ls.pod:492 ../df/virt-df.pod:250 ../edit/virt-edit.pod:351 ../fuse/guestmount.pod:314 ../inspector/virt-inspector.pod:392 ../resize/virt-resize.pod:685 ../sparsify/virt-sparsify.pod:228
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:13
1862 #: ../cat/virt-ls.pod:15
1865 " virt-ls [--options] domname directory\n"
1870 #: ../cat/virt-ls.pod:17
1873 " virt-ls [--options] disk.img [disk.img ...] directory\n"
1878 #: ../cat/virt-ls.pod:21
1880 "C<virt-ls> lists filenames, file sizes, checksums, extended attributes and "
1881 "more from a virtual machine or disk image."
1885 #: ../cat/virt-ls.pod:24
1887 "Multiple directory names can be given, in which case the output from each is "
1892 #: ../cat/virt-ls.pod:27
1894 "To list directories from a libvirt guest use the I<-d> option to specify the "
1895 "name of the guest. For a disk image, use the I<-a> option."
1899 #: ../cat/virt-ls.pod:31
1901 "C<virt-ls> can do many simple file listings. For more complicated cases you "
1902 "may need to use L<guestfish(1)>, or write a program directly to the "
1903 "L<guestfs(3)> API."
1907 #: ../cat/virt-ls.pod:37
1908 msgid "Get a list of all files and directories in a virtual machine:"
1912 #: ../cat/virt-ls.pod:39
1915 " virt-ls -R -d guest /\n"
1920 #: ../cat/virt-ls.pod:41 ../examples/guestfs-testing.pod:182
1921 msgid "List all setuid or setgid programs in a Linux virtual machine:"
1925 #: ../cat/virt-ls.pod:43
1928 " virt-ls -lR -d guest / | grep '^- [42]'\n"
1933 #: ../cat/virt-ls.pod:45 ../examples/guestfs-testing.pod:186
1934 msgid "List all public-writable directories in a Linux virtual machine:"
1938 #: ../cat/virt-ls.pod:47
1941 " virt-ls -lR -d guest / | grep '^d ...7'\n"
1946 #: ../cat/virt-ls.pod:49 ../examples/guestfs-testing.pod:190
1947 msgid "List all Unix domain sockets in a Linux virtual machine:"
1951 #: ../cat/virt-ls.pod:51
1954 " virt-ls -lR -d guest / | grep '^s'\n"
1959 #: ../cat/virt-ls.pod:53 ../examples/guestfs-testing.pod:194
1960 msgid "List all regular files with filenames ending in '.png':"
1964 #: ../cat/virt-ls.pod:55
1967 " virt-ls -lR -d guest / | grep -i '^-.*\\.png$'\n"
1972 #: ../cat/virt-ls.pod:57
1973 msgid "To display files larger than 10MB in home directories:"
1977 #: ../cat/virt-ls.pod:59
1980 " virt-ls -lR -d guest /home | awk '$3 > 10*1024*1024'\n"
1985 #: ../cat/virt-ls.pod:61 ../examples/guestfs-testing.pod:202
1986 msgid "Find everything modified in the last 7 days:"
1990 #: ../cat/virt-ls.pod:63
1993 " virt-ls -lR -d guest --time-days / | awk '$6 <= 7'\n"
1998 #: ../cat/virt-ls.pod:65 ../examples/guestfs-testing.pod:206
1999 msgid "Find regular files modified in the last 24 hours:"
2003 #: ../cat/virt-ls.pod:67
2006 " virt-ls -lR -d guest --time-days / | grep '^-' | awk '$6 < 1'\n"
2011 #: ../cat/virt-ls.pod:69
2012 msgid "DIFFERENCES IN SNAPSHOTS AND BACKING FILES"
2016 #: ../cat/virt-ls.pod:71
2018 "Find the differences between files in a guest and an earlier snapshot of the "
2023 #: ../cat/virt-ls.pod:74
2026 " virt-ls -lR -a snapshot.img / --uids --time-t > old\n"
2027 " virt-ls -lR -a current.img / --uids --time-t > new\n"
2028 " diff -u old new | less\n"
2033 #: ../cat/virt-ls.pod:78
2035 "The commands above won't find files where the content has changed but the "
2036 "metadata (eg. file size and modification date) is the same. To do that, you "
2037 "need to add the I<--checksum> parameter to both C<virt-ls> commands. "
2038 "I<--checksum> can be quite slow since it has to read and compute a checksum "
2039 "of every regular file in the virtual machine."
2043 #: ../cat/virt-ls.pod:84
2044 msgid "OUTPUT MODES"
2048 #: ../cat/virt-ls.pod:86
2050 "C<virt-ls> has four output modes, controlled by different combinations of "
2051 "the I<-l> and I<-R> options."
2055 #: ../cat/virt-ls.pod:89
2056 msgid "SIMPLE LISTING"
2060 #: ../cat/virt-ls.pod:91
2061 msgid "A simple listing is like the ordinary L<ls(1)> command:"
2065 #: ../cat/virt-ls.pod:93
2068 " $ virt-ls -d guest /\n"
2076 #: ../cat/virt-ls.pod:98
2077 msgid "LONG LISTING"
2081 #: ../cat/virt-ls.pod:100
2083 "With the I<-l> (I<--long>) option, the output is like the C<ls -l> command "
2084 "(more specifically, like the C<guestfs_ll> function)."
2088 #: ../cat/virt-ls.pod:103
2091 " $ virt-ls -l -d guest /\n"
2093 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
2094 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
2100 #: ../cat/virt-ls.pod:109
2102 "Note that while this is useful for displaying a directory, do not try "
2103 "parsing this output in another program. Use L</RECURSIVE LONG LISTING> "
2108 #: ../cat/virt-ls.pod:113
2109 msgid "RECURSIVE LISTING"
2113 #: ../cat/virt-ls.pod:115
2115 "With the I<-R> (I<--recursive>) option, C<virt-ls> lists the names of files "
2116 "and directories recursively:"
2120 #: ../cat/virt-ls.pod:118
2123 " $ virt-ls -R -d guest /tmp\n"
2131 #: ../cat/virt-ls.pod:123
2133 "To generate this output, C<virt-ls> runs the C<guestfs_find0> function and "
2134 "converts C<\\0> characters to C<\\n>."
2138 #: ../cat/virt-ls.pod:126
2139 msgid "RECURSIVE LONG LISTING"
2143 #: ../cat/virt-ls.pod:128
2145 "Using I<-lR> options together changes the output to display directories "
2146 "recursively, with file stats, and optionally other features such as "
2147 "checksums and extended attributes."
2151 #: ../cat/virt-ls.pod:132
2153 "Most of the interesting features of C<virt-ls> are only available when using "
2158 #: ../cat/virt-ls.pod:135
2160 "The fields are normally space-separated. Filenames are B<not> quoted, so "
2161 "you cannot use the output in another program (because filenames can contain "
2162 "spaces and other unsafe characters). If the guest was untrusted and someone "
2163 "knew you were using C<virt-ls> to analyze the guest, they could play tricks "
2164 "on you by creating filenames with embedded newline characters. To B<safely> "
2165 "parse the output in another program, use the I<--csv> (Comma-Separated "
2170 #: ../cat/virt-ls.pod:143
2172 "Note that this output format is completely unrelated to the C<ls -lR> "
2177 #: ../cat/virt-ls.pod:146
2180 " $ virt-ls -lR -d guest /bin\n"
2181 " d 0555 4096 /bin\n"
2182 " - 0755 123 /bin/alsaunmute\n"
2183 " - 0755 28328 /bin/arch\n"
2184 " l 0777 4 /bin/awk -> gawk\n"
2185 " - 0755 27216 /bin/basename\n"
2186 " - 0755 943360 /bin/bash\n"
2192 #: ../cat/virt-ls.pod:155
2193 msgid "These basic fields are always shown:"
2197 #: ../cat/virt-ls.pod:159
2202 #: ../cat/virt-ls.pod:161
2204 "The file type, one of: C<-> (regular file), C<d> (directory), C<c> "
2205 "(character device), C<b> (block device), C<p> (named pipe), C<l> (symbolic "
2206 "link), C<s> (socket) or C<u> (unknown)."
2210 #: ../cat/virt-ls.pod:171
2215 #: ../cat/virt-ls.pod:173
2216 msgid "The Unix permissions, displayed as a 4 digit octal number."
2220 #: ../cat/virt-ls.pod:175
2225 #: ../cat/virt-ls.pod:177
2227 "The size of the file. This is shown in bytes unless I<-h> or "
2228 "I<--human-readable> option is given, in which case this is shown as a "
2229 "human-readable number."
2233 #: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:4380
2238 #: ../cat/virt-ls.pod:183
2239 msgid "The full path of the file or directory."
2243 #: ../cat/virt-ls.pod:185
2248 #: ../cat/virt-ls.pod:187
2249 msgid "For symbolic links only, the link target."
2253 #: ../cat/virt-ls.pod:191
2255 "In I<-lR> mode, additional command line options enable the display of more "
2260 #: ../cat/virt-ls.pod:194
2262 "With the I<--uids> flag, these additional fields are displayed before the "
2267 #: ../cat/virt-ls.pod:199
2272 #: ../cat/virt-ls.pod:201
2277 #: ../cat/virt-ls.pod:203
2279 "The UID and GID of the owner of the file (displayed numerically). Note "
2280 "these only make sense in the context of a Unix-like guest."
2284 #: ../cat/virt-ls.pod:208
2285 msgid "With the I<--times> flag, these additional fields are displayed:"
2289 #: ../cat/virt-ls.pod:212
2294 #: ../cat/virt-ls.pod:214
2295 msgid "The time of last access."
2299 #: ../cat/virt-ls.pod:216
2304 #: ../cat/virt-ls.pod:218
2305 msgid "The time of last modification."
2309 #: ../cat/virt-ls.pod:220
2314 #: ../cat/virt-ls.pod:222
2315 msgid "The time of last status change."
2319 #: ../cat/virt-ls.pod:226
2321 "The time fields are displayed as string dates and times, unless one of the "
2322 "I<--time-t>, I<--time-relative> or I<--time-days> flags is given."
2326 #: ../cat/virt-ls.pod:229
2327 msgid "With the I<--extra-stats> flag, these additional fields are displayed:"
2331 #: ../cat/virt-ls.pod:233
2336 #: ../cat/virt-ls.pod:235
2338 "The device containing the file (displayed as major:minor). This may not "
2339 "match devices as known to the guest."
2343 #: ../cat/virt-ls.pod:238
2348 #: ../cat/virt-ls.pod:240
2349 msgid "The inode number."
2353 #: ../cat/virt-ls.pod:242
2358 #: ../cat/virt-ls.pod:244
2359 msgid "The number of hard links."
2363 #: ../cat/virt-ls.pod:246
2368 #: ../cat/virt-ls.pod:248
2369 msgid "For block and char special files, the device (displayed as major:minor)."
2373 #: ../cat/virt-ls.pod:251
2378 #: ../cat/virt-ls.pod:253
2379 msgid "The number of 512 byte blocks allocated to the file."
2383 #: ../cat/virt-ls.pod:257
2385 "With the I<--checksum> flag, the checksum of the file contents is shown "
2386 "(only for regular files). Computing file checksums can take a considerable "
2391 #: ../cat/virt-ls.pod:280
2392 msgid "B<--checksum>"
2396 #: ../cat/virt-ls.pod:282
2397 msgid "B<--checksum=crc|md5|sha1|sha224|sha256|sha384|sha512>"
2401 #: ../cat/virt-ls.pod:284
2403 "Display checksum over file contents for regular files. With no argument, "
2404 "this defaults to using I<md5>. Using an argument, you can select the "
2405 "checksum type to use."
2409 #: ../cat/virt-ls.pod:288 ../cat/virt-ls.pod:325 ../cat/virt-ls.pod:358 ../cat/virt-ls.pod:391 ../cat/virt-ls.pod:401 ../cat/virt-ls.pod:408 ../cat/virt-ls.pod:415 ../cat/virt-ls.pod:422
2411 "This option only has effect in I<-lR> output mode. See L</RECURSIVE LONG "
2416 #: ../cat/virt-ls.pod:316
2418 "When prompting for keys and passphrases, virt-ls normally turns echoing off "
2419 "so you cannot see what you are typing. If you are not worried about Tempest "
2420 "attacks and there is no one else in the room you can specify this flag to "
2421 "see what you are typing."
2425 #: ../cat/virt-ls.pod:321
2426 msgid "B<--extra-stats>"
2430 #: ../cat/virt-ls.pod:323
2431 msgid "Display extra stats."
2435 #: ../cat/virt-ls.pod:339
2438 " virt-ls --format=raw -a disk.img /dir\n"
2443 #: ../cat/virt-ls.pod:343
2446 " virt-ls --format=raw -a disk.img --format -a another.img /dir\n"
2451 #: ../cat/virt-ls.pod:356
2452 msgid "Display file sizes in human-readable format."
2456 #: ../cat/virt-ls.pod:370
2461 #: ../cat/virt-ls.pod:372
2462 msgid "B<--recursive>"
2466 #: ../cat/virt-ls.pod:374
2468 "Select the mode. With neither of these options, C<virt-ls> produces a "
2469 "simple, flat list of the files in the named directory. See L</SIMPLE "
2474 #: ../cat/virt-ls.pod:378
2476 "C<virt-ls -l> produces a \"long listing\", which shows more detail. See "
2481 #: ../cat/virt-ls.pod:381
2483 "C<virt-ls -R> produces a recursive list of files starting at the named "
2484 "directory. See L</RECURSIVE LISTING>."
2488 #: ../cat/virt-ls.pod:384
2490 "C<virt-ls -lR> produces a recursive long listing which can be more easily "
2491 "parsed. See L</RECURSIVE LONG LISTING>."
2495 #: ../cat/virt-ls.pod:387
2500 #: ../cat/virt-ls.pod:389
2501 msgid "Display time fields."
2505 #: ../cat/virt-ls.pod:394
2506 msgid "B<--time-days>"
2510 #: ../cat/virt-ls.pod:396
2511 msgid "Display time fields as days before now (negative if in the future)."
2515 #: ../cat/virt-ls.pod:398
2517 "Note that C<0> in output means \"up to 1 day before now\", or that the age "
2518 "of the file is between 0 and 86399 seconds."
2522 #: ../cat/virt-ls.pod:404
2523 msgid "B<--time-relative>"
2527 #: ../cat/virt-ls.pod:406
2528 msgid "Display time fields as seconds before now (negative if in the future)."
2532 #: ../cat/virt-ls.pod:411
2537 #: ../cat/virt-ls.pod:413
2538 msgid "Display time fields as seconds since the Unix epoch."
2542 #: ../cat/virt-ls.pod:418
2547 #: ../cat/virt-ls.pod:420
2548 msgid "Display UID and GID fields."
2552 #: ../cat/virt-ls.pod:445
2553 msgid "Previous versions of virt-ls allowed you to write either:"
2557 #: ../cat/virt-ls.pod:447
2560 " virt-ls disk.img [disk.img ...] /dir\n"
2565 #: ../cat/virt-ls.pod:451
2568 " virt-ls guestname /dir\n"
2573 #: ../cat/virt-ls.pod:497
2575 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, "
2576 "L<virt-tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
2577 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
2581 #: ../cat/virt-ls.pod:513 ../df/virt-df.pod:267 ../edit/virt-edit.pod:374 ../rescue/virt-rescue.pod:302
2582 msgid "Copyright (C) 2009-2011 Red Hat Inc."
2586 #: ../clone/virt-sysprep.pod:5
2587 msgid "virt-sysprep - Reset or unconfigure a virtual machine so clones can be made"
2591 #: ../clone/virt-sysprep.pod:9
2594 " virt-sysprep [--options] -d domname\n"
2599 #: ../clone/virt-sysprep.pod:11
2602 " virt-sysprep [--options] -a disk.img [-a disk.img ...]\n"
2607 #: ../clone/virt-sysprep.pod:15
2609 "Virt-sysprep \"resets\" or \"unconfigures\" a virtual machine so that clones "
2610 "can be made from it. Steps in this process include removing SSH host keys, "
2611 "removing persistent network MAC configuration, and removing user accounts. "
2612 "Each step can be enabled or disabled as required."
2616 #: ../clone/virt-sysprep.pod:21
2618 "Virt-sysprep is a simple shell script, allowing easy inspection or "
2619 "customization by the system administrator."
2623 #: ../clone/virt-sysprep.pod:24
2625 "Virt-sysprep modifies the guest or disk image I<in place>. The guest must "
2626 "be shut down. If you want to preserve the existing contents of the guest, "
2627 "you I<must copy or clone the disk first>. See L</COPYING AND CLONING> "
2632 #: ../clone/virt-sysprep.pod:29
2634 "You do I<not> need to run virt-sysprep as root. In fact we'd generally "
2635 "recommend that you don't. The time you might want to run it as root is when "
2636 "you need root in order to access the disk image, but even in this case it "
2637 "would be better to change the permissions on the disk image to be writable "
2638 "as the non-root user running virt-sysprep."
2642 #: ../clone/virt-sysprep.pod:35
2644 "\"Sysprep\" stands for \"system preparation\" tool. The name comes from the "
2645 "Microsoft program C<sysprep.exe> which is used to unconfigure Windows "
2646 "machines in preparation for cloning them. Having said that, virt-sysprep "
2647 "does I<not> currently work on Microsoft Windows guests. We plan to support "
2648 "Windows sysprepping in a future version, and we already have code to do it."
2652 #: ../clone/virt-sysprep.pod:76
2653 msgid "B<--enable=...>"
2657 #: ../clone/virt-sysprep.pod:78
2659 "Choose which sysprep operations to perform. Give a comma-separated list of "
2660 "operations, for example:"
2664 #: ../clone/virt-sysprep.pod:81
2667 " --enable=ssh-hostkeys,udev-persistent-net\n"
2672 #: ../clone/virt-sysprep.pod:83
2673 msgid "would enable ONLY C<ssh-hostkeys> and C<udev-persistent-net> operations."
2677 #: ../clone/virt-sysprep.pod:85
2679 "If the I<--enable> option is not given, then we default to trying all "
2680 "possible sysprep operations. But some sysprep operations are skipped for "
2685 #: ../clone/virt-sysprep.pod:89
2687 "Use I<--list-operations> to list operations supported by a particular "
2688 "version of virt-sysprep."
2692 #: ../clone/virt-sysprep.pod:92
2693 msgid "See L</OPERATIONS> below for a list and an explanation of each operation."
2697 #: ../clone/virt-sysprep.pod:106
2700 " virt-sysprep --format=raw -a disk.img\n"
2705 #: ../clone/virt-sysprep.pod:110
2708 " virt-sysprep --format=raw -a disk.img --format -a another.img\n"
2713 #: ../clone/virt-sysprep.pod:119
2714 msgid "B<--hostname> newhostname"
2718 #: ../clone/virt-sysprep.pod:121
2720 "Change the hostname. See the L</hostname> operation below. If not given, "
2721 "defaults to C<localhost.localdomain>."
2725 #: ../clone/virt-sysprep.pod:124
2726 msgid "B<--list-operations>"
2730 #: ../clone/virt-sysprep.pod:126
2731 msgid "List the operations supported by the virt-sysprep program."
2735 #: ../clone/virt-sysprep.pod:128
2736 msgid "B<--selinux-relabel>"
2740 #: ../clone/virt-sysprep.pod:130
2741 msgid "B<--no-selinux-relabel>"
2745 #: ../clone/virt-sysprep.pod:132
2747 "I<--selinux-relabel> forces SELinux relabelling next time the guest boots. "
2748 "I<--no-selinux-relabel> disables relabelling."
2752 #: ../clone/virt-sysprep.pod:135
2754 "The default is to try to detect if SELinux relabelling is required. See "
2755 "L</SELINUX RELABELLING> below for more details."
2759 #: ../clone/virt-sysprep.pod:156
2764 #: ../clone/virt-sysprep.pod:158
2766 "If the I<--enable> option is I<not> given, then I<all sysprep operations are "
2767 "enabled>, although some are skipped depending on the type of guest."
2771 #: ../clone/virt-sysprep.pod:162
2773 "Operations can be individually enabled using the I<--enable> option. Use a "
2774 "comma-separated list, for example:"
2778 #: ../clone/virt-sysprep.pod:165
2781 " virt-sysprep --enable=ssh-hostkeys,udev-persistent-net [etc..]\n"
2786 #: ../clone/virt-sysprep.pod:167
2788 "To list the operations supported by the current version of virt-sysprep, use "
2789 "I<--list-operations>."
2793 #: ../clone/virt-sysprep.pod:170
2795 "Future versions of virt-sysprep may add more operations. If you are using "
2796 "virt-sysprep and want predictable behaviour, specify only the operations "
2797 "that you want to have enabled."
2801 #: ../clone/virt-sysprep.pod:174
2806 #: ../clone/virt-sysprep.pod:176
2807 msgid "Remove user at-jobs and cron-jobs."
2811 #: ../clone/virt-sysprep.pod:178
2812 msgid "dhcp-client-state"
2816 #: ../clone/virt-sysprep.pod:180
2817 msgid "Remove DHCP client leases."
2821 #: ../clone/virt-sysprep.pod:182
2822 msgid "dhcp-server-state"
2826 #: ../clone/virt-sysprep.pod:184
2827 msgid "Remove DHCP server leases."
2831 #: ../clone/virt-sysprep.pod:186
2836 #: ../clone/virt-sysprep.pod:188
2838 "Changes the hostname of the guest to the value given in the I<--hostname> "
2843 #: ../clone/virt-sysprep.pod:191
2845 "If the I<--hostname> parameter is not given, then the hostname is changed to "
2846 "C<localhost.localdomain>."
2850 #: ../clone/virt-sysprep.pod:194
2855 #: ../clone/virt-sysprep.pod:196
2856 msgid "Remove many log files."
2860 #: ../clone/virt-sysprep.pod:198
2865 #: ../clone/virt-sysprep.pod:200
2866 msgid "Remove email from the local mail spool directory."
2870 #: ../clone/virt-sysprep.pod:202
2875 #: ../clone/virt-sysprep.pod:204
2877 "Remove HWADDR (hard-coded MAC address) configuration. For Fedora and Red "
2878 "Hat Enterprise Linux, this is removed from C<ifcfg-*> files."
2882 #: ../clone/virt-sysprep.pod:207
2887 #: ../clone/virt-sysprep.pod:209
2889 "Write some random bytes from the host into the random seed file of the "
2894 #: ../clone/virt-sysprep.pod:212
2895 msgid "See L</RANDOM SEED> below."
2899 #: ../clone/virt-sysprep.pod:214
2900 msgid "rhn-systemid"
2904 #: ../clone/virt-sysprep.pod:216
2905 msgid "Remove the RHN system ID."
2909 #: ../clone/virt-sysprep.pod:218
2914 #: ../clone/virt-sysprep.pod:220
2915 msgid "Remove the Smolt hardware UUID."
2919 #: ../clone/virt-sysprep.pod:222
2920 msgid "ssh-hostkeys"
2924 #: ../clone/virt-sysprep.pod:224
2925 msgid "Remove the SSH host keys in the guest."
2929 #: ../clone/virt-sysprep.pod:226
2931 "The SSH host keys are regenerated (differently) next time the guest is "
2936 #: ../clone/virt-sysprep.pod:229
2938 "If, after cloning, the guest gets the same IP address, ssh will give you a "
2939 "stark warning about the host key changing:"
2943 #: ../clone/virt-sysprep.pod:232
2946 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
2947 " @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\n"
2948 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
2949 " IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\n"
2954 #: ../clone/virt-sysprep.pod:237
2955 msgid "udev-persistent-net"
2959 #: ../clone/virt-sysprep.pod:239
2961 "Remove udev persistent net rules which map the guest's existing MAC address "
2962 "to a fixed ethernet device (eg. eth0)."
2966 #: ../clone/virt-sysprep.pod:242
2968 "After a guest is cloned, the MAC address usually changes. Since the old MAC "
2969 "address occupies the old name (eg. eth0), this means the fresh MAC address "
2970 "is assigned to a new name (eg. eth1) and this is usually undesirable. "
2971 "Erasing the udev persistent net rules avoids this."
2975 #: ../clone/virt-sysprep.pod:247
2980 #: ../clone/virt-sysprep.pod:249
2981 msgid "Remove the utmp file."
2985 #: ../clone/virt-sysprep.pod:251
2987 "This records who is currently logged in on a machine. In modern Linux "
2988 "distros it is stored in a ramdisk and hence not part of the virtual "
2989 "machine's disk, but it was stored on disk in older distros."
2993 #: ../clone/virt-sysprep.pod:255
2998 #: ../clone/virt-sysprep.pod:257
2999 msgid "Remove the yum UUID."
3003 #: ../clone/virt-sysprep.pod:259
3005 "Yum creates a fresh UUID the next time it runs when it notices that the "
3006 "original UUID has been erased."
3010 #: ../clone/virt-sysprep.pod:262
3011 msgid "COPYING AND CLONING"
3015 #: ../clone/virt-sysprep.pod:264
3017 "Virt-sysprep can be used as part of a process of cloning guests, or to "
3018 "prepare a template from which guests can be cloned. There are many "
3019 "different ways to achieve this using the virt tools, and this section is "
3020 "just an introduction."
3024 #: ../clone/virt-sysprep.pod:269
3025 msgid "A virtual machine (when switched off) consists of two parts:"
3029 #: ../clone/virt-sysprep.pod:273
3030 msgid "I<configuration>"
3034 #: ../clone/virt-sysprep.pod:275
3036 "The configuration or description of the guest. eg. The libvirt XML (see "
3037 "C<virsh dumpxml>), the running configuration of the guest, or another "
3038 "external format like OVF."
3042 #: ../clone/virt-sysprep.pod:279
3043 msgid "Some configuration items that might need to be changed:"
3047 #: ../clone/virt-sysprep.pod:285
3052 #: ../clone/virt-sysprep.pod:289 ../clone/virt-sysprep.pod:316
3057 #: ../clone/virt-sysprep.pod:293
3058 msgid "path to block device(s)"
3062 #: ../clone/virt-sysprep.pod:297
3063 msgid "network card MAC address"
3067 #: ../clone/virt-sysprep.pod:301
3068 msgid "I<block device(s)>"
3072 #: ../clone/virt-sysprep.pod:303
3074 "One or more hard disk images, themselves containing files, directories, "
3075 "applications, kernels, configuration, etc."
3079 #: ../clone/virt-sysprep.pod:306
3080 msgid "Some things inside the block devices that might need to be changed:"
3084 #: ../clone/virt-sysprep.pod:312
3085 msgid "hostname and other net configuration"
3089 #: ../clone/virt-sysprep.pod:320
3090 msgid "SSH host keys"
3094 #: ../clone/virt-sysprep.pod:324
3095 msgid "Windows unique security ID (SID)"
3099 #: ../clone/virt-sysprep.pod:328
3100 msgid "Puppet registration"
3104 #: ../clone/virt-sysprep.pod:334
3105 msgid "COPYING THE BLOCK DEVICE"
3109 #: ../clone/virt-sysprep.pod:336
3111 "Starting with an original guest, you probably wish to copy the guest block "
3112 "device and its configuration to make a template. Then once you are happy "
3113 "with the template, you will want to make many clones from it."
3117 #: ../clone/virt-sysprep.pod:341
3123 " original guest --------> template ---------->\n"
3124 " \\------> cloned\n"
3125 " \\-----> guests\n"
3131 #: ../clone/virt-sysprep.pod:349
3133 "You can, of course, just copy the block device on the host using L<cp(1)> or "
3138 #: ../clone/virt-sysprep.pod:352
3142 " original guest --------> template ---------->\n"
3143 " \\------> cloned\n"
3144 " \\-----> guests\n"
3150 #: ../clone/virt-sysprep.pod:358
3151 msgid "There are some smarter (and faster) ways too:"
3155 #: ../clone/virt-sysprep.pod:364
3159 " template ---------->\n"
3160 " \\------> cloned\n"
3161 " \\-----> guests\n"
3167 #: ../clone/virt-sysprep.pod:370
3169 "Use the block device as a backing file and create a snapshot on top for each "
3170 "guest. The advantage is that you don't need to copy the block device (very "
3171 "fast) and only changes are stored (less storage required)."
3175 #: ../clone/virt-sysprep.pod:375
3177 "Note that writing to the backing file once you have created guests on top of "
3178 "it is not possible: you will corrupt the guests."
3182 #: ../clone/virt-sysprep.pod:378
3184 "Tools that can do this include: L<qemu-img(1)> (with the I<create -f qcow2 "
3185 "-o backing_file> option), L<lvcreate(8)> (I<--snapshot> option). Some "
3186 "filesystems (such as btrfs) and most Network Attached Storage devices can "
3187 "also create cheap snapshots from files or LUNs."
3191 #: ../clone/virt-sysprep.pod:386
3192 msgid "Get your NAS to snapshot and/or duplicate the LUN."
3196 #: ../clone/virt-sysprep.pod:390
3197 msgid "Prepare your template using L<virt-sparsify(1)>. See below."
3201 #: ../clone/virt-sysprep.pod:394
3206 #: ../clone/virt-sysprep.pod:396
3208 "A separate tool, L<virt-clone(1)>, can be used to duplicate the block device "
3209 "and/or modify the external libvirt configuration of a guest. It will reset "
3210 "the name, UUID and MAC address of the guest in the libvirt XML."
3214 #: ../clone/virt-sysprep.pod:401
3216 "L<virt-clone(1)> does not use libguestfs and cannot look inside the disk "
3217 "image. This was the original motivation to write virt-sysprep."
3221 #: ../clone/virt-sysprep.pod:404
3226 #: ../clone/virt-sysprep.pod:406
3230 " original guest --------> template\n"
3235 #: ../clone/virt-sysprep.pod:409
3237 "L<virt-sparsify(1)> can be used to make the cloning template smaller, making "
3238 "it easier to compress and/or faster to copy."
3242 #: ../clone/virt-sysprep.pod:412
3244 "Notice that since virt-sparsify also copies the image, you can use it to "
3245 "make the initial copy (instead of C<dd>)."
3249 #: ../clone/virt-sysprep.pod:415
3254 #: ../clone/virt-sysprep.pod:417
3258 " template ---------->\n"
3259 " \\------> cloned\n"
3260 " \\-----> guests\n"
3266 #: ../clone/virt-sysprep.pod:423
3268 "If you want to give people cloned guests, but let them pick the size of the "
3269 "guest themselves (eg. depending on how much they are prepared to pay for "
3270 "disk space), then instead of copying the template, you can run "
3271 "L<virt-resize(1)>. Virt-resize performs a copy and resize, and thus is "
3272 "ideal for cloning guests from a template."
3276 #: ../clone/virt-sysprep.pod:429 ../src/guestfs.pod:1164
3281 #: ../clone/virt-sysprep.pod:431
3283 "Although virt-sysprep removes some sensitive information from the guest, it "
3284 "does not pretend to remove all of it. You should examine the L</OPERATIONS> "
3285 "above, and the implementation of the operations in the shell script. You "
3286 "should also examine the guest afterwards."
3290 #: ../clone/virt-sysprep.pod:436
3292 "Sensitive files are simply removed. The data they contained may still exist "
3293 "on the disk, easily recovered with a hex editor or undelete tool. Use "
3294 "L<virt-sparsify(1)> as one way to remove this content. See also the "
3295 "L<scrub(1)> command to get rid of deleted content in directory entries and "
3300 #: ../clone/virt-sysprep.pod:442
3305 #: ../clone/virt-sysprep.pod:444
3306 msgid "I<(This section applies to Linux guests only)>"
3310 #: ../clone/virt-sysprep.pod:446
3312 "The virt-sysprep C<random-seed> operation writes a few bytes of randomness "
3313 "from the host into the guest's random seed file."
3317 #: ../clone/virt-sysprep.pod:449
3319 "If this is just done once and the guest is cloned from the same template, "
3320 "then each guest will start with the same entropy, and things like SSH host "
3321 "keys and TCP sequence numbers may be predictable."
3325 #: ../clone/virt-sysprep.pod:453
3327 "Therefore you should arrange to add more randomness I<after> cloning from a "
3328 "template too, which can be done by just enabling the C<random-seed> "
3333 #: ../clone/virt-sysprep.pod:457
3336 " cp template.img newguest.img\n"
3337 " virt-sysprep --enable=random-seed -a newguest.img\n"
3342 #: ../clone/virt-sysprep.pod:460
3343 msgid "SELINUX RELABELLING"
3347 #: ../clone/virt-sysprep.pod:462
3348 msgid "I<(This section applies to Linux guests using SELinux only)>"
3352 #: ../clone/virt-sysprep.pod:464
3354 "If any new files are created by virt-sysprep, then virt-sysprep touches "
3355 "C</.autorelabel> so that these will be correctly labelled by SELinux the "
3356 "next time the guest is booted. This process interrupts boot and can take "
3361 #: ../clone/virt-sysprep.pod:469
3363 "You can force relabelling for all guests by supplying the "
3364 "I<--selinux-relabel> option."
3368 #: ../clone/virt-sysprep.pod:472
3370 "You can disable relabelling entirely by supplying the "
3371 "I<--no-selinux-relabel> option."
3375 #: ../clone/virt-sysprep.pod:484
3376 msgid "This program returns 0 on success, or 1 if there was an error."
3380 #: ../clone/virt-sysprep.pod:488
3382 "L<guestfs(3)>, L<guestfish(1)>, L<virt-clone(1)>, L<virt-rescue(1)>, "
3383 "L<virt-resize(1)>, L<virt-sparsify(1)>, L<virsh(1)>, L<lvcreate(8)>, "
3384 "L<qemu-img(1)>, L<scrub(1)>, L<http://libguestfs.org/>, "
3385 "L<http://libvirt.org/>."
3389 #: ../df/virt-df.pod:5
3390 msgid "virt-df - Display free space on virtual filesystems"
3394 #: ../df/virt-df.pod:9
3397 " virt-df [--options]\n"
3402 #: ../df/virt-df.pod:11
3405 " virt-df [--options] -d domname\n"
3410 #: ../df/virt-df.pod:13
3413 " virt-df [--options] -a disk.img [-a disk.img ...]\n"
3418 #: ../df/virt-df.pod:17
3421 " virt-df [--options] domname\n"
3426 #: ../df/virt-df.pod:19
3429 " virt-df [--options] disk.img [disk.img ...]\n"
3434 #: ../df/virt-df.pod:23
3436 "C<virt-df> is a command line tool to display free space on virtual machine "
3437 "filesystems. Unlike other tools, it doesn't just display the size of disk "
3438 "allocated to a virtual machine, but can look inside disk images to see how "
3439 "much space is really being used."
3443 #: ../df/virt-df.pod:28
3445 "If used without any I<-a> or I<-d> arguments, C<virt-df> checks with libvirt "
3446 "to get a list of all active and inactive guests, and performs a C<df>-type "
3447 "operation on each one in turn, printing out the results."
3451 #: ../df/virt-df.pod:32
3453 "If any I<-a> or I<-d> arguments are specified, C<virt-df> performs a "
3454 "C<df>-type operation on either the single named libvirt domain, or on the "
3455 "disk image(s) listed on the command line (which must all belong to a single "
3456 "VM). In this mode (with arguments), C<virt-df> will I<only work for a "
3457 "single guest>. If you want to run on multiple guests, then you have to "
3458 "invoke C<virt-df> multiple times."
3462 #: ../df/virt-df.pod:39
3464 "Use the I<--csv> option to get a format which can be easily parsed by other "
3465 "programs. Other options are similar to the standard L<df(1)> command."
3469 #: ../df/virt-df.pod:45
3471 "Show disk usage for a single libvirt guest called C<F14x64>. Make the "
3472 "output human-readable:"
3476 #: ../df/virt-df.pod:48
3479 " # virt-df -d F14x64 -h\n"
3480 " Filesystem Size Used Available Use%\n"
3481 " F14x64:/dev/sda1 484M 66M 393M 14%\n"
3482 " F14x64:/dev/vg_f13x64/lv_root 7.4G 3.4G 4.0G 46%\n"
3487 #: ../df/virt-df.pod:53
3488 msgid "Show disk usage for a disk image file called C<test.img>:"
3492 #: ../df/virt-df.pod:55
3495 " $ virt-df -a test1.img\n"
3496 " Filesystem 1K-blocks Used Available Use%\n"
3497 " test1.img:/dev/sda1 99099 1551 92432 2%\n"
3502 #: ../df/virt-df.pod:112
3505 " virt-df --format=raw -a disk.img\n"
3510 #: ../df/virt-df.pod:116
3513 " virt-df --format=raw -a disk.img --format -a another.img\n"
3518 #: ../df/virt-df.pod:129
3519 msgid "Print sizes in human-readable format."
3523 #: ../df/virt-df.pod:131
3524 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
3528 #: ../df/virt-df.pod:133 ../fish/guestfish.pod:258 ../fuse/guestmount.pod:164
3533 #: ../df/virt-df.pod:135
3538 #: ../df/virt-df.pod:137
3539 msgid "Print inodes instead of blocks."
3543 #: ../df/virt-df.pod:139
3544 msgid "B<--one-per-guest>"
3548 #: ../df/virt-df.pod:141
3550 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
3551 "disks from several guests to a single libguestfs appliance."
3555 #: ../df/virt-df.pod:144
3556 msgid "You might use this option in the following circumstances:"
3560 #: ../df/virt-df.pod:150
3562 "If you think an untrusted guest might actively try to exploit the libguestfs "
3563 "appliance kernel, then this prevents one guest from interfering with the "
3564 "stats printed for another guest."
3568 #: ../df/virt-df.pod:156
3570 "If the kernel has a bug which stops it from accessing a filesystem in one "
3571 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
3572 "and report stats for further guests."
3576 #: ../df/virt-df.pod:165
3578 "Print UUIDs instead of names. This is useful for following a guest even "
3579 "when the guest is migrated or renamed, or when two guests happen to have the "
3584 #: ../df/virt-df.pod:169
3586 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
3587 "images, we still print the disk image name even when this option is "
3592 #: ../df/virt-df.pod:191
3593 msgid "STATVFS NUMBERS"
3597 #: ../df/virt-df.pod:193
3599 "C<virt-df> (and L<df(1)>) get information by issuing a L<statvfs(3)> system "
3600 "call. You can get the same information directly, either from the host "
3601 "(using libguestfs) or inside the guest:"
3605 #: ../df/virt-df.pod:199
3606 msgid "From the host"
3610 #: ../df/virt-df.pod:201 ../df/virt-df.pod:209
3611 msgid "Run this command:"
3615 #: ../df/virt-df.pod:203
3618 " guestfish --ro -d GuestName -i statvfs /\n"
3623 #: ../df/virt-df.pod:205 ../df/virt-df.pod:213
3624 msgid "(change C</> to see stats for other filesystems)."
3628 #: ../df/virt-df.pod:207
3629 msgid "From inside the guest"
3633 #: ../df/virt-df.pod:211
3636 " python -c 'import os; s = os.statvfs (\"/\"); print s'\n"
3641 #: ../df/virt-df.pod:255
3643 "L<df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
3644 "L<http://libguestfs.org/>."
3648 #: ../edit/virt-edit.pod:5
3649 msgid "virt-edit - Edit a file in a virtual machine"
3653 #: ../edit/virt-edit.pod:9
3656 " virt-edit [--options] -d domname file [file ...]\n"
3661 #: ../edit/virt-edit.pod:11
3664 " virt-edit [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
3669 #: ../edit/virt-edit.pod:13
3672 " virt-edit [-d domname|-a disk.img] file -e 'expr'\n"
3677 #: ../edit/virt-edit.pod:17
3680 " virt-edit domname file\n"
3685 #: ../edit/virt-edit.pod:19 ../edit/virt-edit.pod:183
3688 " virt-edit disk.img [disk.img ...] file\n"
3693 #: ../edit/virt-edit.pod:21 ../fish/guestfish.pod:23 ../fish/virt-copy-in.pod:13 ../fish/virt-tar-in.pod:15 ../fuse/guestmount.pod:15 ../rescue/virt-rescue.pod:19 ../tools/virt-tar.pl:64 ../tools/virt-win-reg.pl:51
3698 #: ../edit/virt-edit.pod:23
3700 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
3701 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
3702 "doing this, but doesn't catch all cases."
3706 #: ../edit/virt-edit.pod:29
3708 "C<virt-edit> is a command line tool to edit C<file> where each C<file> "
3709 "exists in the named virtual machine (or disk image)."
3713 #: ../edit/virt-edit.pod:32
3715 "Multiple filenames can be given, in which case they are each edited in "
3716 "turn. Each filename must be a full path, starting at the root directory "
3717 "(starting with '/')."
3721 #: ../edit/virt-edit.pod:36
3722 msgid "If you want to just view a file, use L<virt-cat(1)>."
3726 #: ../edit/virt-edit.pod:38
3728 "For more complex cases you should look at the L<guestfish(1)> tool (see "
3729 "L</USING GUESTFISH> below)."
3733 #: ../edit/virt-edit.pod:41
3735 "C<virt-edit> cannot be used to create a new file. L<guestfish(1)> can do "
3736 "that and much more."
3740 #: ../edit/virt-edit.pod:46
3741 msgid "Edit the named files interactively:"
3745 #: ../edit/virt-edit.pod:48
3748 " virt-edit -d mydomain /boot/grub/grub.conf\n"
3753 #: ../edit/virt-edit.pod:50
3756 " virt-edit -d mydomain /etc/passwd\n"
3761 #: ../edit/virt-edit.pod:52
3762 msgid "For Windows guests, some Windows paths are understood:"
3766 #: ../edit/virt-edit.pod:54
3769 " virt-edit -d mywindomain 'c:\\autoexec.bat'\n"
3774 #: ../edit/virt-edit.pod:56
3776 "If Perl is installed, you can also edit files non-interactively (see "
3777 "L</NON-INTERACTIVE EDITING> below). To change the init default level to 5:"
3781 #: ../edit/virt-edit.pod:60
3784 " virt-edit -d mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
3789 #: ../edit/virt-edit.pod:81
3790 msgid "B<-b> extension"
3794 #: ../edit/virt-edit.pod:83
3795 msgid "B<--backup> extension"
3799 #: ../edit/virt-edit.pod:85
3801 "Create a backup of the original file I<in the guest disk image>. The backup "
3802 "has the original filename with C<extension> added."
3806 #: ../edit/virt-edit.pod:88
3808 "Usually the first character of C<extension> would be a dot C<.> so you would "
3813 #: ../edit/virt-edit.pod:91
3816 " virt-edit -b .orig [etc]\n"
3821 #: ../edit/virt-edit.pod:93
3822 msgid "By default, no backup file is made."
3826 #: ../edit/virt-edit.pod:95 ../fish/guestfish.pod:181 ../fuse/guestmount.pod:105 ../inspector/virt-inspector.pod:74 ../tools/virt-list-filesystems.pl:77 ../tools/virt-list-partitions.pl:78 ../tools/virt-tar.pl:127 ../tools/virt-win-reg.pl:128
3831 #: ../edit/virt-edit.pod:97 ../fish/guestfish.pod:183 ../fuse/guestmount.pod:107 ../inspector/virt-inspector.pod:76 ../tools/virt-list-filesystems.pl:79 ../tools/virt-list-partitions.pl:80 ../tools/virt-tar.pl:129 ../tools/virt-win-reg.pl:130
3832 msgid "B<--connect URI>"
3836 #: ../edit/virt-edit.pod:102 ../tools/virt-list-filesystems.pl:84 ../tools/virt-list-partitions.pl:85 ../tools/virt-tar.pl:134 ../tools/virt-win-reg.pl:135
3838 "If you specify guest block devices directly, then libvirt is not used at "
3843 #: ../edit/virt-edit.pod:114
3845 "When prompting for keys and passphrases, virt-edit normally turns echoing "
3846 "off so you cannot see what you are typing. If you are not worried about "
3847 "Tempest attacks and there is no one else in the room you can specify this "
3848 "flag to see what you are typing."
3852 #: ../edit/virt-edit.pod:119
3857 #: ../edit/virt-edit.pod:121
3858 msgid "B<--expr> EXPR"
3862 #: ../edit/virt-edit.pod:123
3864 "Instead of launching the external editor, non-interactively apply the Perl "
3865 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
3870 #: ../edit/virt-edit.pod:127
3872 "Be careful to properly quote the expression to prevent it from being altered "
3877 #: ../edit/virt-edit.pod:130
3878 msgid "Note that this option is only available when Perl 5 is installed."
3882 #: ../edit/virt-edit.pod:132
3883 msgid "B<--format> raw|qcow2|..."
3887 #: ../edit/virt-edit.pod:143
3890 " virt-edit --format=raw -a disk.img file\n"
3895 #: ../edit/virt-edit.pod:147
3898 " virt-edit --format=raw -a disk.img --format -a another.img file\n"
3903 #: ../edit/virt-edit.pod:181
3904 msgid "Previous versions of virt-edit allowed you to write either:"
3908 #: ../edit/virt-edit.pod:187
3911 " virt-edit guestname file\n"
3916 #: ../edit/virt-edit.pod:195
3917 msgid "NON-INTERACTIVE EDITING"
3921 #: ../edit/virt-edit.pod:197
3923 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
3924 "administrator can interactively edit the file."
3928 #: ../edit/virt-edit.pod:200
3930 "There are two ways also to use C<virt-edit> from scripts in order to make "
3931 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
3932 "like this, it's less error-prone to write scripts directly using the "
3933 "libguestfs API and Augeas for configuration file editing.)"
3937 #: ../edit/virt-edit.pod:206
3939 "The first method is to temporarily set C<$EDITOR> to any script or program "
3940 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
3941 "update C<tmpfile> in place however it likes."
3945 #: ../edit/virt-edit.pod:210
3947 "The second method is to use the I<-e> parameter of C<virt-edit> to run a "
3948 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
3949 "instances of C<foo> with C<bar> in a file:"
3953 #: ../edit/virt-edit.pod:214
3956 " virt-edit -d domname filename -e 's/foo/bar/'\n"
3961 #: ../edit/virt-edit.pod:216
3963 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
3964 "For example to delete root's password you could do:"
3968 #: ../edit/virt-edit.pod:219
3971 " virt-edit -d domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
3976 #: ../edit/virt-edit.pod:221
3978 "What really happens is that the snippet is evaluated as a Perl expression "
3979 "for each line of the file. The line, including the final C<\\n>, is passed "
3980 "in C<$_> and the expression should update C<$_> or leave it unchanged."
3984 #: ../edit/virt-edit.pod:226
3986 "To delete a line, set C<$_> to the empty string. For example, to delete the "
3987 "C<apache> user account from the password file you can do:"
3991 #: ../edit/virt-edit.pod:229
3994 " virt-edit -d mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
3999 #: ../edit/virt-edit.pod:231
4001 "To insert a line, prepend or append it to C<$_>. However appending lines to "
4002 "the end of the file is rather difficult this way since there is no concept "
4003 "of \"last line of the file\" - your expression just doesn't get called "
4004 "again. You might want to use the first method (setting C<$EDITOR>) if you "
4009 #: ../edit/virt-edit.pod:237
4011 "The variable C<$lineno> contains the current line number. As is "
4012 "traditional, the first line in the file is number C<1>."
4016 #: ../edit/virt-edit.pod:240
4018 "The return value from the expression is ignored, but the expression may call "
4019 "C<die> in order to abort the whole program, leaving the original file "
4024 #: ../edit/virt-edit.pod:244
4026 "Remember when matching the end of a line that C<$_> may contain the final "
4027 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
4028 "newline then neither of these. Thus to match or substitute some text at the "
4029 "end of a line, use this regular expression:"
4033 #: ../edit/virt-edit.pod:249
4036 " /some text(\\r?\\n)?$/\n"
4041 #: ../edit/virt-edit.pod:251
4043 "Alternately, use the perl C<chomp> function, being careful not to chomp "
4044 "C<$_> itself (since that would remove all newlines from the file):"
4048 #: ../edit/virt-edit.pod:255
4051 " my $m = $_; chomp $m; $m =~ /some text$/\n"
4056 #: ../edit/virt-edit.pod:259
4058 "C<virt-edit> has a limited ability to understand Windows drive letters and "
4059 "paths (eg. C<E:\\foo\\bar.txt>)."
4063 #: ../edit/virt-edit.pod:278
4065 "The path is resolved case insensitively to locate the file that should be "
4070 #: ../edit/virt-edit.pod:299
4072 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
4073 "C<virt-edit> doesn't work."
4077 #: ../edit/virt-edit.pod:302
4078 msgid "Using C<virt-edit> is approximately equivalent to doing:"
4082 #: ../edit/virt-edit.pod:304
4085 " guestfish --rw -i -d domname edit /file\n"
4090 #: ../edit/virt-edit.pod:306
4092 "where C<domname> is the name of the libvirt guest, and C</file> is the full "
4097 #: ../edit/virt-edit.pod:309
4099 "The command above uses libguestfs's guest inspection feature and so does not "
4100 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
4101 "disk images that don't contain guests. To edit a file on a disk image "
4106 #: ../edit/virt-edit.pod:314
4109 " guestfish --rw -a disk.img -m /dev/sda1 edit /file\n"
4114 #: ../edit/virt-edit.pod:316
4116 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
4117 "the disk image to edit, and C</file> is the full path to the file."
4121 #: ../edit/virt-edit.pod:320
4123 "C<virt-edit> cannot create new files. Use the guestfish commands C<touch>, "
4124 "C<write> or C<upload> instead:"
4128 #: ../edit/virt-edit.pod:323
4131 " guestfish --rw -i -d domname touch /newfile\n"
4136 #: ../edit/virt-edit.pod:325
4139 " guestfish --rw -i -d domname write /newfile \"new content\"\n"
4144 #: ../edit/virt-edit.pod:327
4147 " guestfish --rw -i -d domname upload localfile /newfile\n"
4152 #: ../edit/virt-edit.pod:329 ../fish/guestfish.pod:1119 ../rescue/virt-rescue.pod:261 ../sparsify/virt-sparsify.pod:231 ../src/guestfs.pod:3209 ../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:3349 ../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:3351 ../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:3358
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:3363
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:3368
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:3083
5602 #: ../examples/guestfs-testing.pod:133
5605 " virt-df --csv > /tmp/report.csv\n"
5610 #: ../examples/guestfs-testing.pod:135
5612 "Now try to load this into your favorite spreadsheet or database. Are the "
5613 "results reproduced faithfully in the spreadsheet/database?"
5617 #: ../examples/guestfs-testing.pod:138
5619 "http://www.postgresql.org/docs/8.1/static/sql-copy.html "
5620 "http://dev.mysql.com/doc/refman/5.1/en/load-data.html"
5624 #: ../examples/guestfs-testing.pod:141
5625 msgid "B<*> Edit a file in a B<shut off> guest."
5629 #: ../examples/guestfs-testing.pod:143
5631 "L<virt-edit(1)> can edit files in guests. Try this command on a RHEL or "
5636 #: ../examples/guestfs-testing.pod:146
5639 " virt-edit LinuxGuest /etc/sysconfig/network\n"
5644 #: ../examples/guestfs-testing.pod:148
5645 msgid "On other Linux guests try editing other files such as:"
5649 #: ../examples/guestfs-testing.pod:150
5652 " virt-edit LinuxGuest /etc/motd\n"
5657 #: ../examples/guestfs-testing.pod:152
5658 msgid "Are the changes seen inside the guest when it is booted?"
5662 #: ../examples/guestfs-testing.pod:154
5663 msgid "Display the filesystems / partitions / LVs in a guest."
5667 #: ../examples/guestfs-testing.pod:156
5669 "L<virt-filesystems(1)> can be used to display filesystems in a guest. Try "
5670 "this command on any disk image or guest:"
5674 #: ../examples/guestfs-testing.pod:159
5677 " virt-filesystems -a /path/to/disk.img --all --long -h\n"
5682 #: ../examples/guestfs-testing.pod:163
5685 " virt-filesystems -d Guest --all --long -h\n"
5690 #: ../examples/guestfs-testing.pod:165
5691 msgid "Do the results match what is seen in the guest?"
5695 #: ../examples/guestfs-testing.pod:167
5696 msgid "Run virt-inspector on all your guests."
5700 #: ../examples/guestfs-testing.pod:169
5702 "Use L<virt-inspector(1)> to get a report on all of your guests or disk "
5707 #: ../examples/guestfs-testing.pod:172
5710 " virt-inspector -a /path/to/disk.img | less\n"
5715 #: ../examples/guestfs-testing.pod:176
5718 " virt-inspector -d Guest | less\n"
5723 #: ../examples/guestfs-testing.pod:178
5724 msgid "Do the results match what is actually in the guest?"
5728 #: ../examples/guestfs-testing.pod:180
5729 msgid "Try the auditing features of virt-ls on all your guests."
5733 #: ../examples/guestfs-testing.pod:184
5736 " virt-ls -lR -d Guest / | grep '^- [42]'\n"
5741 #: ../examples/guestfs-testing.pod:188
5744 " virt-ls -lR -d Guest / | grep '^d ...7'\n"
5749 #: ../examples/guestfs-testing.pod:192
5752 " virt-ls -lR -d Guest / | grep '^s'\n"
5757 #: ../examples/guestfs-testing.pod:196
5760 " virt-ls -lR -d Guest / | grep -i '^-.*\\.png$'\n"
5765 #: ../examples/guestfs-testing.pod:198
5766 msgid "Display files larger than 10MB in home directories:"
5770 #: ../examples/guestfs-testing.pod:200
5773 " virt-ls -lR -d Guest /home | awk '$3 > 10*1024*1024'\n"
5778 #: ../examples/guestfs-testing.pod:204
5781 " virt-ls -lR -d Guest --time-days / | awk '$6 <= 7'\n"
5786 #: ../examples/guestfs-testing.pod:208
5789 " virt-ls -lR -d Guest --time-days / | grep '^-' | awk '$6 < 1'\n"
5794 #: ../examples/guestfs-testing.pod:210
5795 msgid "Do the results match what is in the guest?"
5799 #: ../examples/guestfs-testing.pod:212
5800 msgid "Create a disk image from a tarball."
5804 #: ../examples/guestfs-testing.pod:214
5806 "Use L<virt-make-fs(1)> to create a disk image from any tarball that you "
5811 #: ../examples/guestfs-testing.pod:217
5814 " virt-make-fs --partition=mbr --type=vfat /any/tarball.tar.gz output.img\n"
5819 #: ../examples/guestfs-testing.pod:219
5821 "Add 'output.img' as a raw disk to an existing guest. Check the guest can "
5822 "see the files. This test is particularly useful if you try it with a "
5827 #: ../examples/guestfs-testing.pod:223
5828 msgid "Try other partitioning schemes, eg. I<--partition=gpt>."
5832 #: ../examples/guestfs-testing.pod:225
5833 msgid "Try other filesystem formats, eg. I<--type=ntfs>, I<--type=ext2>."
5837 #: ../examples/guestfs-testing.pod:227
5838 msgid "B<*> Run virt-rescue on a B<shut off> disk image or guest."
5842 #: ../examples/guestfs-testing.pod:229
5844 "Use L<virt-rescue(1)> to examine, rescue or repair a B<shut off> guest or "
5849 #: ../examples/guestfs-testing.pod:232
5852 " virt-rescue -a /path/to/disk.img\n"
5857 #: ../examples/guestfs-testing.pod:236
5860 " virt-rescue -d Guest\n"
5865 #: ../examples/guestfs-testing.pod:238
5866 msgid "Can you use ordinary shell commands to examine the guest?"
5870 #: ../examples/guestfs-testing.pod:240
5871 msgid "B<*> Resize your guests."
5875 #: ../examples/guestfs-testing.pod:242
5877 "Use L<virt-resize(1)> to give a guest some more disk space. For example, if "
5878 "you have a disk image that is smaller than 30G, increase it to 30G by doing:"
5882 #: ../examples/guestfs-testing.pod:246
5885 " truncate -s 30G newdisk.img\n"
5886 " virt-filesystems -a /path/to/olddisk.img --all --long -h\n"
5887 " virt-resize /path/to/olddisk.img newdisk.img --expand /dev/sda1\n"
5888 " qemu-kvm -m 1024 -hda newdisk.img\n"
5893 #: ../examples/guestfs-testing.pod:251
5894 msgid "Does the guest still boot? Try expanding other partitions."
5898 #: ../examples/guestfs-testing.pod:253
5899 msgid "B<*> Sparsify a guest disk."
5903 #: ../examples/guestfs-testing.pod:255
5904 msgid "Using L<virt-sparsify(1)>, make a disk image more sparse:"
5908 #: ../examples/guestfs-testing.pod:257
5911 " virt-sparsify /path/to/olddisk.img newdisk.img\n"
5916 #: ../examples/guestfs-testing.pod:259
5918 "Is C<newdisk.img> still bootable after sparsifying? Is the resulting disk "
5919 "image smaller (use C<du> to check)?"
5923 #: ../examples/guestfs-testing.pod:262
5924 msgid "B<*> \"sysprep\" a B<shut off> Linux guest."
5928 #: ../examples/guestfs-testing.pod:264
5930 "Note that this really will mess up an existing guest, so it's better to "
5931 "clone the guest before trying this."
5935 #: ../examples/guestfs-testing.pod:267
5938 " virt-sysprep --hostname newhost.example.com -a /path/to/disk.img\n"
5943 #: ../examples/guestfs-testing.pod:269
5945 "Was the sysprep successful? After booting, what changes were made and were "
5950 #: ../examples/guestfs-testing.pod:272
5951 msgid "Dump the Windows Registry from your Windows guests."
5955 #: ../examples/guestfs-testing.pod:274
5957 "Use L<virt-win-reg(1)> to dump out the Windows Registry from any Windows "
5958 "guests that you have."
5962 #: ../examples/guestfs-testing.pod:277
5965 " virt-win-reg --unsafe-printable-strings WindowsGuest 'HKLM\\Software' |\n"
5971 #: ../examples/guestfs-testing.pod:280
5974 " virt-win-reg --unsafe-printable-strings WindowsGuest 'HKLM\\System' |\n"
5980 #: ../examples/guestfs-testing.pod:283
5981 msgid "Does the output match running C<regedit> inside the guest?"
5985 #: ../examples/guestfs-testing.pod:285
5987 "A recent feature is the ability to dump user registries, so try this, "
5988 "replacing I<username> with the name of a local user in the guest:"
5992 #: ../examples/guestfs-testing.pod:288
5995 " virt-win-reg --unsafe-printable-strings WindowsGuest 'HKEY_USERS\\username' "
6002 #: ../examples/guestfs-testing.pod:293
6004 "L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>, "
6005 "L<http://libguestfs.org/>."
6009 #: ../fish/guestfish-actions.pod:1
6014 #: ../fish/guestfish-actions.pod:3
6017 " add-cdrom filename\n"
6022 #: ../fish/guestfish-actions.pod:5 ../src/guestfs-actions.pod:14
6023 msgid "This function adds a virtual CD-ROM disk image to the guest."
6027 #: ../fish/guestfish-actions.pod:7 ../src/guestfs-actions.pod:16
6028 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
6032 #: ../fish/guestfish-actions.pod:15
6034 "This call checks for the existence of C<filename>. This stops you from "
6035 "specifying other types of drive which are supported by qemu such as C<nbd:> "
6036 "and C<http:> URLs. To specify those, use the general L</config> call "
6041 #: ../fish/guestfish-actions.pod:22
6043 "If you just want to add an ISO file (often you use this as an efficient way "
6044 "to transfer large files into the guest), then you should probably use "
6045 "L</add-drive-ro> instead."
6049 #: ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:214 ../fish/guestfish-actions.pod:228
6051 "I<This function is deprecated.> In new code, use the L</add_drive_opts> call "
6056 #: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:217 ../fish/guestfish-actions.pod:231 ../fish/guestfish-actions.pod:941 ../fish/guestfish-actions.pod:976 ../fish/guestfish-actions.pod:1149 ../fish/guestfish-actions.pod:1509 ../fish/guestfish-actions.pod:1523 ../fish/guestfish-actions.pod:3284 ../fish/guestfish-actions.pod:3595 ../fish/guestfish-actions.pod:3643 ../fish/guestfish-actions.pod:4561 ../fish/guestfish-actions.pod:4581 ../fish/guestfish-actions.pod:4600 ../fish/guestfish-actions.pod:4638 ../fish/guestfish-actions.pod:5287 ../fish/guestfish-actions.pod:5390 ../src/guestfs-actions.pod:10 ../src/guestfs-actions.pod:305 ../src/guestfs-actions.pod:326 ../src/guestfs-actions.pod:1580 ../src/guestfs-actions.pod:1637 ../src/guestfs-actions.pod:1920 ../src/guestfs-actions.pod:2419 ../src/guestfs-actions.pod:2440 ../src/guestfs-actions.pod:5076 ../src/guestfs-actions.pod:5598 ../src/guestfs-actions.pod:5698 ../src/guestfs-actions.pod:6994 ../src/guestfs-actions.pod:7035 ../src/guestfs-actions.pod:7066 ../src/guestfs-actions.pod:7126 ../src/guestfs-actions.pod:8058 ../src/guestfs-actions.pod:8167 ../src/guestfs-actions.pod:8347
6058 "Deprecated functions will not be removed from the API, but the fact that "
6059 "they are deprecated indicates that there are problems with correct use of "
6064 #: ../fish/guestfish-actions.pod:35
6069 #: ../fish/guestfish-actions.pod:37
6074 #: ../fish/guestfish-actions.pod:39
6077 " add-domain dom [libvirturi:..] [readonly:true|false] [iface:..] "
6078 "[live:true|false] [allowuuid:true|false] [readonlydisk:..]\n"
6083 #: ../fish/guestfish-actions.pod:41
6085 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
6086 "It works by connecting to libvirt, requesting the domain and domain XML from "
6087 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
6091 #: ../fish/guestfish-actions.pod:46 ../src/guestfs-actions.pod:65
6093 "The number of disks added is returned. This operation is atomic: if an "
6094 "error is returned, then no disks are added."
6098 #: ../fish/guestfish-actions.pod:49 ../src/guestfs-actions.pod:68
6100 "This function does some minimal checks to make sure the libvirt domain is "
6101 "not running (unless C<readonly> is true). In a future version we will try "
6102 "to acquire the libvirt lock on each disk."
6106 #: ../fish/guestfish-actions.pod:53 ../src/guestfs-actions.pod:72
6108 "Disks must be accessible locally. This often means that adding disks from a "
6109 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
6110 "unless those disks are accessible via the same device path locally too."
6114 #: ../fish/guestfish-actions.pod:58 ../src/guestfs-actions.pod:77
6116 "The optional C<libvirturi> parameter sets the libvirt URI (see "
6117 "L<http://libvirt.org/uri.html>). If this is not set then we connect to the "
6118 "default libvirt URI (or one set through an environment variable, see the "
6119 "libvirt documentation for full details)."
6123 #: ../fish/guestfish-actions.pod:64 ../src/guestfs-actions.pod:83
6125 "The optional C<live> flag controls whether this call will try to connect to "
6126 "a running virtual machine C<guestfsd> process if it sees a suitable "
6127 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
6128 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
6129 "DAEMONS> for more information."
6133 #: ../fish/guestfish-actions.pod:71 ../src/guestfs-actions.pod:90
6135 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
6136 "passed instead of the domain name. The C<dom> string is treated as a UUID "
6137 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
6142 #: ../fish/guestfish-actions.pod:76 ../src/guestfs-actions.pod:95
6144 "The optional C<readonlydisk> parameter controls what we do for disks which "
6145 "are marked E<lt>readonly/E<gt> in the libvirt XML. Possible values are:"
6149 #: ../fish/guestfish-actions.pod:82 ../src/guestfs-actions.pod:101
6150 msgid "readonlydisk = \"error\""
6154 #: ../fish/guestfish-actions.pod:84 ../fish/guestfish-actions.pod:95 ../fish/guestfish-actions.pod:106 ../src/guestfs-actions.pod:103 ../src/guestfs-actions.pod:114 ../src/guestfs-actions.pod:125
6155 msgid "If C<readonly> is false:"
6159 #: ../fish/guestfish-actions.pod:86 ../src/guestfs-actions.pod:105
6161 "The whole call is aborted with an error if any disk with the "
6162 "E<lt>readonly/E<gt> flag is found."
6166 #: ../fish/guestfish-actions.pod:89 ../fish/guestfish-actions.pod:100 ../fish/guestfish-actions.pod:110 ../src/guestfs-actions.pod:108 ../src/guestfs-actions.pod:119 ../src/guestfs-actions.pod:129
6167 msgid "If C<readonly> is true:"
6171 #: ../fish/guestfish-actions.pod:91 ../fish/guestfish-actions.pod:102 ../fish/guestfish-actions.pod:112 ../src/guestfs-actions.pod:110 ../src/guestfs-actions.pod:121 ../src/guestfs-actions.pod:131
6172 msgid "Disks with the E<lt>readonly/E<gt> flag are added read-only."
6176 #: ../fish/guestfish-actions.pod:93 ../src/guestfs-actions.pod:112
6177 msgid "readonlydisk = \"read\""
6181 #: ../fish/guestfish-actions.pod:97 ../src/guestfs-actions.pod:116
6183 "Disks with the E<lt>readonly/E<gt> flag are added read-only. Other disks "
6184 "are added read/write."
6188 #: ../fish/guestfish-actions.pod:104 ../src/guestfs-actions.pod:123
6189 msgid "readonlydisk = \"write\" (default)"
6193 #: ../fish/guestfish-actions.pod:108 ../src/guestfs-actions.pod:127
6194 msgid "Disks with the E<lt>readonly/E<gt> flag are added read/write."
6198 #: ../fish/guestfish-actions.pod:114 ../src/guestfs-actions.pod:133
6199 msgid "readonlydisk = \"ignore\""
6203 #: ../fish/guestfish-actions.pod:116 ../src/guestfs-actions.pod:135
6204 msgid "If C<readonly> is true or false:"
6208 #: ../fish/guestfish-actions.pod:118 ../src/guestfs-actions.pod:137
6209 msgid "Disks with the E<lt>readonly/E<gt> flag are skipped."
6213 #: ../fish/guestfish-actions.pod:122
6215 "The other optional parameters are passed directly through to "
6216 "L</add-drive-opts>."
6220 #: ../fish/guestfish-actions.pod:125 ../fish/guestfish-actions.pod:194 ../fish/guestfish-actions.pod:624 ../fish/guestfish-actions.pod:835 ../fish/guestfish-actions.pod:856 ../fish/guestfish-actions.pod:894 ../fish/guestfish-actions.pod:903 ../fish/guestfish-actions.pod:912 ../fish/guestfish-actions.pod:926 ../fish/guestfish-actions.pod:2171 ../fish/guestfish-actions.pod:3333 ../fish/guestfish-actions.pod:3496 ../fish/guestfish-actions.pod:3631
6222 "This command has one or more optional arguments. See L</OPTIONAL "
6227 #: ../fish/guestfish-actions.pod:127
6232 #: ../fish/guestfish-actions.pod:129
6235 " add-drive filename\n"
6240 #: ../fish/guestfish-actions.pod:131
6242 "This function is the equivalent of calling L</add-drive-opts> with no "
6243 "optional parameters, so the disk is added writable, with the format being "
6244 "detected automatically."
6248 #: ../fish/guestfish-actions.pod:135
6250 "Automatic detection of the format opens you up to a potential security hole "
6251 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6252 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
6253 "you should think about replacing calls to this function with calls to "
6254 "L</add-drive-opts>, and specifying the format."
6258 #: ../fish/guestfish-actions.pod:142
6259 msgid "add-drive-opts"
6263 #: ../fish/guestfish-actions.pod:144
6268 #: ../fish/guestfish-actions.pod:146
6271 " add-drive-opts filename [readonly:true|false] [format:..] [iface:..] "
6277 #: ../fish/guestfish-actions.pod:148 ../src/guestfs-actions.pod:208
6279 "This function adds a virtual machine disk image C<filename> to libguestfs. "
6280 "The first time you call this function, the disk appears as C</dev/sda>, the "
6281 "second time as C</dev/sdb>, and so on."
6285 #: ../fish/guestfish-actions.pod:153 ../src/guestfs-actions.pod:213
6287 "You don't necessarily need to be root when using libguestfs. However you "
6288 "obviously do need sufficient permissions to access the filename for whatever "
6289 "operations you want to perform (ie. read access if you just want to read the "
6290 "image or write access if you want to modify the image)."
6294 #: ../fish/guestfish-actions.pod:159 ../src/guestfs-actions.pod:219
6295 msgid "This call checks that C<filename> exists."
6299 #: ../fish/guestfish-actions.pod:161 ../fish/guestfish-actions.pod:3295 ../src/guestfs-actions.pod:221 ../src/guestfs-actions.pod:5113
6300 msgid "The optional arguments are:"
6304 #: ../fish/guestfish-actions.pod:165 ../src/guestfs-actions.pod:225
6309 #: ../fish/guestfish-actions.pod:167 ../src/guestfs-actions.pod:227
6311 "If true then the image is treated as read-only. Writes are still allowed, "
6312 "but they are stored in a temporary snapshot overlay which is discarded at "
6313 "the end. The disk that you add is not modified."
6317 #: ../fish/guestfish-actions.pod:171 ../src/guestfs-actions.pod:231
6322 #: ../fish/guestfish-actions.pod:173
6324 "This forces the image format. If you omit this (or use L</add-drive> or "
6325 "L</add-drive-ro>) then the format is automatically detected. Possible "
6326 "formats include C<raw> and C<qcow2>."
6330 #: ../fish/guestfish-actions.pod:177 ../src/guestfs-actions.pod:237
6332 "Automatic detection of the format opens you up to a potential security hole "
6333 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6334 "RHBZ#642934. Specifying the format closes this security hole."
6338 #: ../fish/guestfish-actions.pod:182 ../src/guestfs-actions.pod:242
6343 #: ../fish/guestfish-actions.pod:184
6345 "This rarely-used option lets you emulate the behaviour of the deprecated "
6346 "L</add-drive-with-if> call (q.v.)"
6350 #: ../fish/guestfish-actions.pod:187 ../src/guestfs-actions.pod:247
6355 #: ../fish/guestfish-actions.pod:189 ../src/guestfs-actions.pod:249
6357 "The name the drive had in the original guest, e.g. /dev/sdb. This is used as "
6358 "a hint to the guest inspection process if it is available."
6362 #: ../fish/guestfish-actions.pod:196
6363 msgid "add-drive-ro"
6367 #: ../fish/guestfish-actions.pod:198
6372 #: ../fish/guestfish-actions.pod:200
6375 " add-drive-ro filename\n"
6380 #: ../fish/guestfish-actions.pod:202
6382 "This function is the equivalent of calling L</add-drive-opts> with the "
6383 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
6384 "is added read-only, with the format being detected automatically."
6388 #: ../fish/guestfish-actions.pod:207
6389 msgid "add-drive-ro-with-if"
6393 #: ../fish/guestfish-actions.pod:209
6396 " add-drive-ro-with-if filename iface\n"
6401 #: ../fish/guestfish-actions.pod:211
6403 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
6404 "interface emulation to use at run time."
6408 #: ../fish/guestfish-actions.pod:221
6409 msgid "add-drive-with-if"
6413 #: ../fish/guestfish-actions.pod:223
6416 " add-drive-with-if filename iface\n"
6421 #: ../fish/guestfish-actions.pod:225
6423 "This is the same as L</add-drive> but it allows you to specify the QEMU "
6424 "interface emulation to use at run time."
6428 #: ../fish/guestfish-actions.pod:235
6433 #: ../fish/guestfish-actions.pod:237
6436 " aug-clear augpath\n"
6441 #: ../fish/guestfish-actions.pod:239 ../src/guestfs-actions.pod:343
6443 "Set the value associated with C<path> to C<NULL>. This is the same as the "
6444 "L<augtool(1)> C<clear> command."
6448 #: ../fish/guestfish-actions.pod:242
6453 #: ../fish/guestfish-actions.pod:244
6461 #: ../fish/guestfish-actions.pod:246
6463 "Close the current Augeas handle and free up any resources used by it. After "
6464 "calling this, you have to call L</aug-init> again before you can use any "
6465 "other Augeas functions."
6469 #: ../fish/guestfish-actions.pod:251
6474 #: ../fish/guestfish-actions.pod:253
6477 " aug-defnode name expr val\n"
6482 #: ../fish/guestfish-actions.pod:255 ../src/guestfs-actions.pod:372
6483 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
6487 #: ../fish/guestfish-actions.pod:258
6489 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
6490 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
6491 "containing that single node."
6495 #: ../fish/guestfish-actions.pod:262 ../src/guestfs-actions.pod:379
6497 "On success this returns a pair containing the number of nodes in the "
6498 "nodeset, and a boolean flag if a node was created."
6502 #: ../fish/guestfish-actions.pod:266
6507 #: ../fish/guestfish-actions.pod:268
6510 " aug-defvar name expr\n"
6515 #: ../fish/guestfish-actions.pod:270 ../src/guestfs-actions.pod:396
6517 "Defines an Augeas variable C<name> whose value is the result of evaluating "
6518 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
6522 #: ../fish/guestfish-actions.pod:274 ../src/guestfs-actions.pod:400
6524 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
6525 "evaluates to something which is not a nodeset."
6529 #: ../fish/guestfish-actions.pod:277
6534 #: ../fish/guestfish-actions.pod:279
6537 " aug-get augpath\n"
6542 #: ../fish/guestfish-actions.pod:281 ../src/guestfs-actions.pod:413
6544 "Look up the value associated with C<path>. If C<path> matches exactly one "
6545 "node, the C<value> is returned."
6549 #: ../fish/guestfish-actions.pod:284
6554 #: ../fish/guestfish-actions.pod:286
6557 " aug-init root flags\n"
6562 #: ../fish/guestfish-actions.pod:288 ../src/guestfs-actions.pod:428
6564 "Create a new Augeas handle for editing configuration files. If there was "
6565 "any previous Augeas handle associated with this guestfs session, then it is "
6570 #: ../fish/guestfish-actions.pod:292
6571 msgid "You must call this before using any other L</aug-*> commands."
6575 #: ../fish/guestfish-actions.pod:295 ../src/guestfs-actions.pod:435
6576 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
6580 #: ../fish/guestfish-actions.pod:298 ../src/guestfs-actions.pod:438
6582 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
6583 "logical I<or> of the following integers:"
6587 #: ../fish/guestfish-actions.pod:304 ../src/guestfs-actions.pod:444
6588 msgid "C<AUG_SAVE_BACKUP> = 1"
6592 #: ../fish/guestfish-actions.pod:306 ../src/guestfs-actions.pod:446
6593 msgid "Keep the original file with a C<.augsave> extension."
6597 #: ../fish/guestfish-actions.pod:308 ../src/guestfs-actions.pod:448
6598 msgid "C<AUG_SAVE_NEWFILE> = 2"
6602 #: ../fish/guestfish-actions.pod:310 ../src/guestfs-actions.pod:450
6604 "Save changes into a file with extension C<.augnew>, and do not overwrite "
6605 "original. Overrides C<AUG_SAVE_BACKUP>."
6609 #: ../fish/guestfish-actions.pod:313 ../src/guestfs-actions.pod:453
6610 msgid "C<AUG_TYPE_CHECK> = 4"
6614 #: ../fish/guestfish-actions.pod:315 ../src/guestfs-actions.pod:455
6615 msgid "Typecheck lenses."
6619 #: ../fish/guestfish-actions.pod:317
6621 "This option is only useful when debugging Augeas lenses. Use of this option "
6622 "may require additional memory for the libguestfs appliance. You may need to "
6623 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call L</set-memsize>."
6627 #: ../fish/guestfish-actions.pod:322 ../src/guestfs-actions.pod:462
6628 msgid "C<AUG_NO_STDINC> = 8"
6632 #: ../fish/guestfish-actions.pod:324 ../src/guestfs-actions.pod:464
6633 msgid "Do not use standard load path for modules."
6637 #: ../fish/guestfish-actions.pod:326 ../src/guestfs-actions.pod:466
6638 msgid "C<AUG_SAVE_NOOP> = 16"
6642 #: ../fish/guestfish-actions.pod:328 ../src/guestfs-actions.pod:468
6643 msgid "Make save a no-op, just record what would have been changed."
6647 #: ../fish/guestfish-actions.pod:330 ../src/guestfs-actions.pod:470
6648 msgid "C<AUG_NO_LOAD> = 32"
6652 #: ../fish/guestfish-actions.pod:332
6653 msgid "Do not load the tree in L</aug-init>."
6657 #: ../fish/guestfish-actions.pod:336
6658 msgid "To close the handle, you can call L</aug-close>."
6662 #: ../fish/guestfish-actions.pod:338 ../src/guestfs-actions.pod:478
6663 msgid "To find out more about Augeas, see L<http://augeas.net/>."
6667 #: ../fish/guestfish-actions.pod:340
6672 #: ../fish/guestfish-actions.pod:342
6675 " aug-insert augpath label true|false\n"
6680 #: ../fish/guestfish-actions.pod:344 ../src/guestfs-actions.pod:492
6682 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
6683 "or after C<path> (depending on the boolean flag C<before>)."
6687 #: ../fish/guestfish-actions.pod:348 ../src/guestfs-actions.pod:496
6689 "C<path> must match exactly one existing node in the tree, and C<label> must "
6690 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
6694 #: ../fish/guestfish-actions.pod:352
6699 #: ../fish/guestfish-actions.pod:354
6707 #: ../fish/guestfish-actions.pod:356 ../src/guestfs-actions.pod:509
6708 msgid "Load files into the tree."
6712 #: ../fish/guestfish-actions.pod:358 ../src/guestfs-actions.pod:511
6713 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
6717 #: ../fish/guestfish-actions.pod:361
6722 #: ../fish/guestfish-actions.pod:363
6730 #: ../fish/guestfish-actions.pod:365
6732 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
6733 "resulting nodes into alphabetical order."
6737 #: ../fish/guestfish-actions.pod:368
6742 #: ../fish/guestfish-actions.pod:370
6745 " aug-match augpath\n"
6750 #: ../fish/guestfish-actions.pod:372 ../src/guestfs-actions.pod:539
6752 "Returns a list of paths which match the path expression C<path>. The "
6753 "returned paths are sufficiently qualified so that they match exactly one "
6754 "node in the current tree."
6758 #: ../fish/guestfish-actions.pod:376
6763 #: ../fish/guestfish-actions.pod:378
6766 " aug-mv src dest\n"
6771 #: ../fish/guestfish-actions.pod:380 ../src/guestfs-actions.pod:556
6773 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
6774 "C<dest> is overwritten if it exists."
6778 #: ../fish/guestfish-actions.pod:383
6783 #: ../fish/guestfish-actions.pod:385
6791 #: ../fish/guestfish-actions.pod:387 ../src/guestfs-actions.pod:569
6792 msgid "Remove C<path> and all of its children."
6796 #: ../fish/guestfish-actions.pod:389 ../src/guestfs-actions.pod:571
6797 msgid "On success this returns the number of entries which were removed."
6801 #: ../fish/guestfish-actions.pod:391
6806 #: ../fish/guestfish-actions.pod:393
6814 #: ../fish/guestfish-actions.pod:395 ../src/guestfs-actions.pod:582
6815 msgid "This writes all pending changes to disk."
6819 #: ../fish/guestfish-actions.pod:397
6821 "The flags which were passed to L</aug-init> affect exactly how files are "
6826 #: ../fish/guestfish-actions.pod:400
6831 #: ../fish/guestfish-actions.pod:402
6834 " aug-set augpath val\n"
6839 #: ../fish/guestfish-actions.pod:404 ../src/guestfs-actions.pod:598
6840 msgid "Set the value associated with C<path> to C<val>."
6844 #: ../fish/guestfish-actions.pod:406
6846 "In the Augeas API, it is possible to clear a node by setting the value to "
6847 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
6848 "this call. Instead you must use the L</aug-clear> call."
6852 #: ../fish/guestfish-actions.pod:411
6857 #: ../fish/guestfish-actions.pod:413
6860 " available 'groups ...'\n"
6865 #: ../fish/guestfish-actions.pod:415 ../src/guestfs-actions.pod:615
6867 "This command is used to check the availability of some groups of "
6868 "functionality in the appliance, which not all builds of the libguestfs "
6869 "appliance will be able to provide."
6873 #: ../fish/guestfish-actions.pod:419
6875 "The libguestfs groups, and the functions that those groups correspond to, "
6876 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
6877 "runtime by calling L</available-all-groups>."
6881 #: ../fish/guestfish-actions.pod:424 ../src/guestfs-actions.pod:624
6883 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
6884 "\"augeas\"]> would check for the availability of the Linux inotify functions "
6885 "and Augeas (configuration file editing) functions."
6889 #: ../fish/guestfish-actions.pod:429 ../src/guestfs-actions.pod:629
6890 msgid "The command returns no error if I<all> requested groups are available."
6894 #: ../fish/guestfish-actions.pod:431 ../src/guestfs-actions.pod:631
6896 "It fails with an error if one or more of the requested groups is unavailable "
6901 #: ../fish/guestfish-actions.pod:434 ../src/guestfs-actions.pod:634
6903 "If an unknown group name is included in the list of groups then an error is "
6908 #: ../fish/guestfish-actions.pod:437 ../src/guestfs-actions.pod:637
6913 #: ../fish/guestfish-actions.pod:443
6914 msgid "You must call L</launch> before calling this function."
6918 #: ../fish/guestfish-actions.pod:445 ../src/guestfs-actions.pod:645
6920 "The reason is because we don't know what groups are supported by the "
6921 "appliance/daemon until it is running and can be queried."
6925 #: ../fish/guestfish-actions.pod:451 ../src/guestfs-actions.pod:651
6927 "If a group of functions is available, this does not necessarily mean that "
6928 "they will work. You still have to check for errors when calling individual "
6929 "API functions even if they are available."
6933 #: ../fish/guestfish-actions.pod:458 ../src/guestfs-actions.pod:658
6935 "It is usually the job of distro packagers to build complete functionality "
6936 "into the libguestfs appliance. Upstream libguestfs, if built from source "
6937 "with all requirements satisfied, will support everything."
6941 #: ../fish/guestfish-actions.pod:465
6943 "This call was added in version C<1.0.80>. In previous versions of "
6944 "libguestfs all you could do would be to speculatively execute a command to "
6945 "find out if the daemon implemented it. See also L</version>."
6949 #: ../fish/guestfish-actions.pod:472
6950 msgid "available-all-groups"
6954 #: ../fish/guestfish-actions.pod:474
6957 " available-all-groups\n"
6962 #: ../fish/guestfish-actions.pod:476
6964 "This command returns a list of all optional groups that this daemon knows "
6965 "about. Note this returns both supported and unsupported groups. To find "
6966 "out which ones the daemon can actually support you have to call "
6967 "L</available> on each member of the returned list."
6971 #: ../fish/guestfish-actions.pod:482
6972 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
6976 #: ../fish/guestfish-actions.pod:484
6981 #: ../fish/guestfish-actions.pod:486
6984 " base64-in (base64file|-) filename\n"
6989 #: ../fish/guestfish-actions.pod:488 ../src/guestfs-actions.pod:702
6990 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
6994 #: ../fish/guestfish-actions.pod:491 ../fish/guestfish-actions.pod:500 ../fish/guestfish-actions.pod:749 ../fish/guestfish-actions.pod:833 ../fish/guestfish-actions.pod:854 ../fish/guestfish-actions.pod:1025 ../fish/guestfish-actions.pod:1044 ../fish/guestfish-actions.pod:1418 ../fish/guestfish-actions.pod:4858 ../fish/guestfish-actions.pod:4870 ../fish/guestfish-actions.pod:4881 ../fish/guestfish-actions.pod:4892 ../fish/guestfish-actions.pod:4944 ../fish/guestfish-actions.pod:4953 ../fish/guestfish-actions.pod:5007 ../fish/guestfish-actions.pod:5030
6995 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
6999 #: ../fish/guestfish-actions.pod:493
7004 #: ../fish/guestfish-actions.pod:495
7007 " base64-out filename (base64file|-)\n"
7012 #: ../fish/guestfish-actions.pod:497 ../src/guestfs-actions.pod:716
7014 "This command downloads the contents of C<filename>, writing it out to local "
7015 "file C<base64file> encoded as base64."
7019 #: ../fish/guestfish-actions.pod:502
7020 msgid "blockdev-flushbufs"
7024 #: ../fish/guestfish-actions.pod:504
7027 " blockdev-flushbufs device\n"
7032 #: ../fish/guestfish-actions.pod:506 ../src/guestfs-actions.pod:729
7033 msgid "This tells the kernel to flush internal buffers associated with C<device>."
7037 #: ../fish/guestfish-actions.pod:509 ../fish/guestfish-actions.pod:520 ../fish/guestfish-actions.pod:529 ../fish/guestfish-actions.pod:539 ../fish/guestfish-actions.pod:551 ../fish/guestfish-actions.pod:564 ../fish/guestfish-actions.pod:572 ../fish/guestfish-actions.pod:583 ../fish/guestfish-actions.pod:591 ../fish/guestfish-actions.pod:599 ../src/guestfs-actions.pod:732 ../src/guestfs-actions.pod:749 ../src/guestfs-actions.pod:764 ../src/guestfs-actions.pod:780 ../src/guestfs-actions.pod:798 ../src/guestfs-actions.pod:817 ../src/guestfs-actions.pod:831 ../src/guestfs-actions.pod:849 ../src/guestfs-actions.pod:863 ../src/guestfs-actions.pod:877
7038 msgid "This uses the L<blockdev(8)> command."
7042 #: ../fish/guestfish-actions.pod:511
7043 msgid "blockdev-getbsz"
7047 #: ../fish/guestfish-actions.pod:513
7050 " blockdev-getbsz device\n"
7055 #: ../fish/guestfish-actions.pod:515 ../src/guestfs-actions.pod:744
7056 msgid "This returns the block size of a device."
7060 #: ../fish/guestfish-actions.pod:517 ../fish/guestfish-actions.pod:580 ../src/guestfs-actions.pod:746 ../src/guestfs-actions.pod:846
7062 "(Note this is different from both I<size in blocks> and I<filesystem block "
7067 #: ../fish/guestfish-actions.pod:522
7068 msgid "blockdev-getro"
7072 #: ../fish/guestfish-actions.pod:524
7075 " blockdev-getro device\n"
7080 #: ../fish/guestfish-actions.pod:526 ../src/guestfs-actions.pod:761
7082 "Returns a boolean indicating if the block device is read-only (true if "
7083 "read-only, false if not)."
7087 #: ../fish/guestfish-actions.pod:531
7088 msgid "blockdev-getsize64"
7092 #: ../fish/guestfish-actions.pod:533
7095 " blockdev-getsize64 device\n"
7100 #: ../fish/guestfish-actions.pod:535 ../src/guestfs-actions.pod:776
7101 msgid "This returns the size of the device in bytes."
7105 #: ../fish/guestfish-actions.pod:537
7106 msgid "See also L</blockdev-getsz>."
7110 #: ../fish/guestfish-actions.pod:541
7111 msgid "blockdev-getss"
7115 #: ../fish/guestfish-actions.pod:543
7118 " blockdev-getss device\n"
7123 #: ../fish/guestfish-actions.pod:545 ../src/guestfs-actions.pod:792
7125 "This returns the size of sectors on a block device. Usually 512, but can be "
7126 "larger for modern devices."
7130 #: ../fish/guestfish-actions.pod:548
7131 msgid "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
7135 #: ../fish/guestfish-actions.pod:553
7136 msgid "blockdev-getsz"
7140 #: ../fish/guestfish-actions.pod:555
7143 " blockdev-getsz device\n"
7148 #: ../fish/guestfish-actions.pod:557 ../src/guestfs-actions.pod:810
7150 "This returns the size of the device in units of 512-byte sectors (even if "
7151 "the sectorsize isn't 512 bytes ... weird)."
7155 #: ../fish/guestfish-actions.pod:560
7157 "See also L</blockdev-getss> for the real sector size of the device, and "
7158 "L</blockdev-getsize64> for the more useful I<size in bytes>."
7162 #: ../fish/guestfish-actions.pod:566
7163 msgid "blockdev-rereadpt"
7167 #: ../fish/guestfish-actions.pod:568
7170 " blockdev-rereadpt device\n"
7175 #: ../fish/guestfish-actions.pod:570 ../src/guestfs-actions.pod:829
7176 msgid "Reread the partition table on C<device>."
7180 #: ../fish/guestfish-actions.pod:574
7181 msgid "blockdev-setbsz"
7185 #: ../fish/guestfish-actions.pod:576
7188 " blockdev-setbsz device blocksize\n"
7193 #: ../fish/guestfish-actions.pod:578 ../src/guestfs-actions.pod:844
7194 msgid "This sets the block size of a device."
7198 #: ../fish/guestfish-actions.pod:585
7199 msgid "blockdev-setro"
7203 #: ../fish/guestfish-actions.pod:587
7206 " blockdev-setro device\n"
7211 #: ../fish/guestfish-actions.pod:589 ../src/guestfs-actions.pod:861
7212 msgid "Sets the block device named C<device> to read-only."
7216 #: ../fish/guestfish-actions.pod:593
7217 msgid "blockdev-setrw"
7221 #: ../fish/guestfish-actions.pod:595
7224 " blockdev-setrw device\n"
7229 #: ../fish/guestfish-actions.pod:597 ../src/guestfs-actions.pod:875
7230 msgid "Sets the block device named C<device> to read-write."
7234 #: ../fish/guestfish-actions.pod:601
7235 msgid "btrfs-filesystem-resize"
7239 #: ../fish/guestfish-actions.pod:603
7242 " btrfs-filesystem-resize mountpoint [size:N]\n"
7247 #: ../fish/guestfish-actions.pod:605 ../src/guestfs-actions.pod:897
7248 msgid "This command resizes a btrfs filesystem."
7252 #: ../fish/guestfish-actions.pod:607 ../src/guestfs-actions.pod:899
7254 "Note that unlike other resize calls, the filesystem has to be mounted and "
7255 "the parameter is the mountpoint not the device (this is a requirement of "
7260 #: ../fish/guestfish-actions.pod:611 ../fish/guestfish-actions.pod:3606 ../src/guestfs-actions.pod:903 ../src/guestfs-actions.pod:5637
7261 msgid "The optional parameters are:"
7265 #: ../fish/guestfish-actions.pod:615 ../fish/guestfish-actions.pod:3610 ../src/guestfs-actions.pod:907 ../src/guestfs-actions.pod:5641
7270 #: ../fish/guestfish-actions.pod:617 ../src/guestfs-actions.pod:909
7272 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
7273 "resized to the maximum size."
7277 #: ../fish/guestfish-actions.pod:622 ../src/guestfs-actions.pod:914
7278 msgid "See also L<btrfs(8)>."
7282 #: ../fish/guestfish-actions.pod:626
7283 msgid "case-sensitive-path"
7287 #: ../fish/guestfish-actions.pod:628
7290 " case-sensitive-path path\n"
7295 #: ../fish/guestfish-actions.pod:630 ../src/guestfs-actions.pod:948
7297 "This can be used to resolve case insensitive paths on a filesystem which is "
7298 "case sensitive. The use case is to resolve paths which you have read from "
7299 "Windows configuration files or the Windows Registry, to the true path."
7303 #: ../fish/guestfish-actions.pod:635 ../src/guestfs-actions.pod:953
7305 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
7306 "(and probably others), which is that although the underlying filesystem is "
7307 "case-insensitive, the driver exports the filesystem to Linux as "
7312 #: ../fish/guestfish-actions.pod:640 ../src/guestfs-actions.pod:958
7314 "One consequence of this is that special directories such as C<c:\\windows> "
7315 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
7316 "precise details of how they were created. In Windows itself this would not "
7321 #: ../fish/guestfish-actions.pod:646 ../src/guestfs-actions.pod:964
7323 "Bug or feature? You decide: "
7324 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
7328 #: ../fish/guestfish-actions.pod:649 ../src/guestfs-actions.pod:967
7330 "This function resolves the true case of each element in the path and returns "
7331 "the case-sensitive path."
7335 #: ../fish/guestfish-actions.pod:652
7337 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return "
7338 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
7339 "how the directories were originally created under Windows)."
7343 #: ../fish/guestfish-actions.pod:657 ../src/guestfs-actions.pod:975
7344 msgid "I<Note>: This function does not handle drive names, backslashes etc."
7348 #: ../fish/guestfish-actions.pod:660
7349 msgid "See also L</realpath>."
7353 #: ../fish/guestfish-actions.pod:662
7358 #: ../fish/guestfish-actions.pod:664
7366 #: ../fish/guestfish-actions.pod:666 ../fish/guestfish-actions.pod:4037 ../src/guestfs-actions.pod:991 ../src/guestfs-actions.pod:6297
7367 msgid "Return the contents of the file named C<path>."
7371 #: ../fish/guestfish-actions.pod:668
7373 "Note that this function cannot correctly handle binary files (specifically, "
7374 "files containing C<\\0> character which is treated as end of string). For "
7375 "those you need to use the L</read-file> or L</download> functions which have "
7376 "a more complex interface."
7380 #: ../fish/guestfish-actions.pod:673 ../fish/guestfish-actions.pod:808 ../fish/guestfish-actions.pod:820 ../fish/guestfish-actions.pod:1103 ../fish/guestfish-actions.pod:1113 ../fish/guestfish-actions.pod:1180 ../fish/guestfish-actions.pod:1190 ../fish/guestfish-actions.pod:1382 ../fish/guestfish-actions.pod:1695 ../fish/guestfish-actions.pod:1705 ../fish/guestfish-actions.pod:1755 ../fish/guestfish-actions.pod:1770 ../fish/guestfish-actions.pod:1780 ../fish/guestfish-actions.pod:1799 ../fish/guestfish-actions.pod:3907 ../fish/guestfish-actions.pod:3922 ../fish/guestfish-actions.pod:3998 ../fish/guestfish-actions.pod:4015 ../fish/guestfish-actions.pod:4030 ../fish/guestfish-actions.pod:4699 ../fish/guestfish-actions.pod:4745 ../fish/guestfish-actions.pod:4830 ../fish/guestfish-actions.pod:4845 ../fish/guestfish-actions.pod:5251 ../fish/guestfish-actions.pod:5263 ../fish/guestfish-actions.pod:5281 ../fish/guestfish-actions.pod:5298 ../fish/guestfish-actions.pod:5308 ../fish/guestfish-actions.pod:5362 ../fish/guestfish-actions.pod:5372 ../fish/guestfish-actions.pod:5401 ../fish/guestfish-actions.pod:5411 ../src/guestfs-actions.pod:1001 ../src/guestfs-actions.pod:1180 ../src/guestfs-actions.pod:1200 ../src/guestfs-actions.pod:1855 ../src/guestfs-actions.pod:1874 ../src/guestfs-actions.pod:1977 ../src/guestfs-actions.pod:1996 ../src/guestfs-actions.pod:2242 ../src/guestfs-actions.pod:2724 ../src/guestfs-actions.pod:2743 ../src/guestfs-actions.pod:2808 ../src/guestfs-actions.pod:2832 ../src/guestfs-actions.pod:2849 ../src/guestfs-actions.pod:2878 ../src/guestfs-actions.pod:6079 ../src/guestfs-actions.pod:6105 ../src/guestfs-actions.pod:6236 ../src/guestfs-actions.pod:6262 ../src/guestfs-actions.pod:6286 ../src/guestfs-actions.pod:7241 ../src/guestfs-actions.pod:7296 ../src/guestfs-actions.pod:7442 ../src/guestfs-actions.pod:7466 ../src/guestfs-actions.pod:8131 ../src/guestfs-actions.pod:8151 ../src/guestfs-actions.pod:8184 ../src/guestfs-actions.pod:8203 ../src/guestfs-actions.pod:8222 ../src/guestfs-actions.pod:8313 ../src/guestfs-actions.pod:8332 ../src/guestfs-actions.pod:8378 ../src/guestfs-actions.pod:8397
7382 "Because of the message protocol, there is a transfer limit of somewhere "
7383 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
7387 #: ../fish/guestfish-actions.pod:676
7392 #: ../fish/guestfish-actions.pod:678
7395 " checksum csumtype path\n"
7400 #: ../fish/guestfish-actions.pod:680 ../src/guestfs-actions.pod:1013
7401 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
7405 #: ../fish/guestfish-actions.pod:683 ../src/guestfs-actions.pod:1016
7407 "The type of checksum to compute is given by the C<csumtype> parameter which "
7408 "must have one of the following values:"
7412 #: ../fish/guestfish-actions.pod:688 ../src/guestfs-actions.pod:1021
7417 #: ../fish/guestfish-actions.pod:690 ../src/guestfs-actions.pod:1023
7419 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
7424 #: ../fish/guestfish-actions.pod:693 ../src/guestfs-actions.pod:1026
7429 #: ../fish/guestfish-actions.pod:695 ../src/guestfs-actions.pod:1028
7430 msgid "Compute the MD5 hash (using the C<md5sum> program)."
7434 #: ../fish/guestfish-actions.pod:697 ../src/guestfs-actions.pod:1030
7439 #: ../fish/guestfish-actions.pod:699 ../src/guestfs-actions.pod:1032
7440 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
7444 #: ../fish/guestfish-actions.pod:701 ../src/guestfs-actions.pod:1034
7449 #: ../fish/guestfish-actions.pod:703 ../src/guestfs-actions.pod:1036
7450 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
7454 #: ../fish/guestfish-actions.pod:705 ../src/guestfs-actions.pod:1038
7459 #: ../fish/guestfish-actions.pod:707 ../src/guestfs-actions.pod:1040
7460 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
7464 #: ../fish/guestfish-actions.pod:709 ../src/guestfs-actions.pod:1042
7469 #: ../fish/guestfish-actions.pod:711 ../src/guestfs-actions.pod:1044
7470 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
7474 #: ../fish/guestfish-actions.pod:713 ../src/guestfs-actions.pod:1046
7479 #: ../fish/guestfish-actions.pod:715 ../src/guestfs-actions.pod:1048
7480 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
7484 #: ../fish/guestfish-actions.pod:719 ../src/guestfs-actions.pod:1052
7485 msgid "The checksum is returned as a printable string."
7489 #: ../fish/guestfish-actions.pod:721
7490 msgid "To get the checksum for a device, use L</checksum-device>."
7494 #: ../fish/guestfish-actions.pod:723
7495 msgid "To get the checksums for many files, use L</checksums-out>."
7499 #: ../fish/guestfish-actions.pod:725
7500 msgid "checksum-device"
7504 #: ../fish/guestfish-actions.pod:727
7507 " checksum-device csumtype device\n"
7512 #: ../fish/guestfish-actions.pod:729
7514 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
7515 "device named C<device>. For the types of checksums supported see the "
7516 "L</checksum> command."
7520 #: ../fish/guestfish-actions.pod:733
7521 msgid "checksums-out"
7525 #: ../fish/guestfish-actions.pod:735
7528 " checksums-out csumtype directory (sumsfile|-)\n"
7533 #: ../fish/guestfish-actions.pod:737 ../src/guestfs-actions.pod:1087
7535 "This command computes the checksums of all regular files in C<directory> and "
7536 "then emits a list of those checksums to the local output file C<sumsfile>."
7540 #: ../fish/guestfish-actions.pod:741 ../src/guestfs-actions.pod:1091
7542 "This can be used for verifying the integrity of a virtual machine. However "
7543 "to be properly secure you should pay attention to the output of the checksum "
7544 "command (it uses the ones from GNU coreutils). In particular when the "
7545 "filename is not printable, coreutils uses a special backslash syntax. For "
7546 "more information, see the GNU coreutils info file."
7550 #: ../fish/guestfish-actions.pod:751
7555 #: ../fish/guestfish-actions.pod:753
7558 " chmod mode path\n"
7563 #: ../fish/guestfish-actions.pod:755 ../src/guestfs-actions.pod:1110
7565 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
7570 #: ../fish/guestfish-actions.pod:758 ../src/guestfs-actions.pod:1113
7572 "I<Note>: When using this command from guestfish, C<mode> by default would be "
7573 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
7578 #: ../fish/guestfish-actions.pod:762 ../fish/guestfish-actions.pod:3259 ../fish/guestfish-actions.pod:3398 ../fish/guestfish-actions.pod:3408 ../fish/guestfish-actions.pod:3418 ../src/guestfs-actions.pod:1117 ../src/guestfs-actions.pod:5044 ../src/guestfs-actions.pod:5253 ../src/guestfs-actions.pod:5272 ../src/guestfs-actions.pod:5291
7579 msgid "The mode actually set is affected by the umask."
7583 #: ../fish/guestfish-actions.pod:764
7588 #: ../fish/guestfish-actions.pod:766
7591 " chown owner group path\n"
7596 #: ../fish/guestfish-actions.pod:768 ../src/guestfs-actions.pod:1131
7597 msgid "Change the file owner to C<owner> and group to C<group>."
7601 #: ../fish/guestfish-actions.pod:770 ../fish/guestfish-actions.pod:2703 ../src/guestfs-actions.pod:1133 ../src/guestfs-actions.pod:4124
7603 "Only numeric uid and gid are supported. If you want to use names, you will "
7604 "need to locate and parse the password file yourself (Augeas support makes "
7605 "this relatively easy)."
7609 #: ../fish/guestfish-actions.pod:774
7614 #: ../fish/guestfish-actions.pod:776
7617 " command 'arguments ...'\n"
7622 #: ../fish/guestfish-actions.pod:778 ../src/guestfs-actions.pod:1147
7624 "This call runs a command from the guest filesystem. The filesystem must be "
7625 "mounted, and must contain a compatible operating system (ie. something "
7626 "Linux, with the same or compatible processor architecture)."
7630 #: ../fish/guestfish-actions.pod:783
7632 "The single parameter is an argv-style list of arguments. The first element "
7633 "is the name of the program to run. Subsequent elements are parameters. The "
7634 "list must be non-empty (ie. must contain a program name). Note that the "
7635 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
7639 #: ../fish/guestfish-actions.pod:790 ../src/guestfs-actions.pod:1159
7640 msgid "The return value is anything printed to I<stdout> by the command."
7644 #: ../fish/guestfish-actions.pod:793 ../src/guestfs-actions.pod:1162
7646 "If the command returns a non-zero exit status, then this function returns an "
7647 "error message. The error message string is the content of I<stderr> from "
7652 #: ../fish/guestfish-actions.pod:797 ../src/guestfs-actions.pod:1166
7654 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
7655 "C</bin>. If you require a program from another location, you should provide "
7656 "the full path in the first parameter."
7660 #: ../fish/guestfish-actions.pod:802 ../src/guestfs-actions.pod:1171
7662 "Shared libraries and data files required by the program must be available on "
7663 "filesystems which are mounted in the correct places. It is the caller's "
7664 "responsibility to ensure all filesystems that are needed are mounted at the "
7669 #: ../fish/guestfish-actions.pod:811
7670 msgid "command-lines"
7674 #: ../fish/guestfish-actions.pod:813
7677 " command-lines 'arguments ...'\n"
7682 #: ../fish/guestfish-actions.pod:815
7683 msgid "This is the same as L</command>, but splits the result into a list of lines."
7687 #: ../fish/guestfish-actions.pod:818
7688 msgid "See also: L</sh-lines>"
7692 #: ../fish/guestfish-actions.pod:823
7693 msgid "compress-device-out"
7697 #: ../fish/guestfish-actions.pod:825
7700 " compress-device-out ctype device (zdevice|-) [level:N]\n"
7705 #: ../fish/guestfish-actions.pod:827 ../src/guestfs-actions.pod:1221
7707 "This command compresses C<device> and writes it out to the local file "
7712 #: ../fish/guestfish-actions.pod:830
7714 "The C<ctype> and optional C<level> parameters have the same meaning as in "
7719 #: ../fish/guestfish-actions.pod:837
7720 msgid "compress-out"
7724 #: ../fish/guestfish-actions.pod:839
7727 " compress-out ctype file (zfile|-) [level:N]\n"
7732 #: ../fish/guestfish-actions.pod:841 ../src/guestfs-actions.pod:1273
7734 "This command compresses C<file> and writes it out to the local file "
7739 #: ../fish/guestfish-actions.pod:844 ../src/guestfs-actions.pod:1276
7741 "The compression program used is controlled by the C<ctype> parameter. "
7742 "Currently this includes: C<compress>, C<gzip>, C<bzip2>, C<xz> or C<lzop>. "
7743 "Some compression types may not be supported by particular builds of "
7744 "libguestfs, in which case you will get an error containing the substring "
7745 "\"not supported\"."
7749 #: ../fish/guestfish-actions.pod:850 ../src/guestfs-actions.pod:1282
7751 "The optional C<level> parameter controls compression level. The meaning and "
7752 "default for this parameter depends on the compression program being used."
7756 #: ../fish/guestfish-actions.pod:858
7761 #: ../fish/guestfish-actions.pod:860
7764 " config qemuparam qemuvalue\n"
7769 #: ../fish/guestfish-actions.pod:862 ../src/guestfs-actions.pod:1323
7771 "This can be used to add arbitrary qemu command line parameters of the form "
7772 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
7773 "setting some parameters which would interfere with parameters that we use."
7777 #: ../fish/guestfish-actions.pod:867 ../src/guestfs-actions.pod:1328
7778 msgid "The first character of C<param> string must be a C<-> (dash)."
7782 #: ../fish/guestfish-actions.pod:869 ../src/guestfs-actions.pod:1330
7783 msgid "C<value> can be NULL."
7787 #: ../fish/guestfish-actions.pod:871
7788 msgid "copy-device-to-device"
7792 #: ../fish/guestfish-actions.pod:873
7795 " copy-device-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7800 #: ../fish/guestfish-actions.pod:875
7802 "The four calls L</copy-device-to-device>, L</copy-device-to-file>, "
7803 "L</copy-file-to-device>, and L</copy-file-to-file> let you copy from a "
7804 "source (device|file) to a destination (device|file)."
7808 #: ../fish/guestfish-actions.pod:882 ../src/guestfs-actions.pod:1360
7810 "Partial copies can be made since you can specify optionally the source "
7811 "offset, destination offset and size to copy. These values are all specified "
7812 "in bytes. If not given, the offsets both default to zero, and the size "
7813 "defaults to copying as much as possible until we hit the end of the source."
7817 #: ../fish/guestfish-actions.pod:888 ../src/guestfs-actions.pod:1366
7819 "The source and destination may be the same object. However overlapping "
7820 "regions may not be copied correctly."
7824 #: ../fish/guestfish-actions.pod:891 ../src/guestfs-actions.pod:1369
7826 "If the destination is a file, it is created if required. If the destination "
7827 "file is not large enough, it is extended."
7831 #: ../fish/guestfish-actions.pod:896
7832 msgid "copy-device-to-file"
7836 #: ../fish/guestfish-actions.pod:898
7839 " copy-device-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7844 #: ../fish/guestfish-actions.pod:900 ../fish/guestfish-actions.pod:909 ../fish/guestfish-actions.pod:918
7845 msgid "See L</copy-device-to-device> for a general overview of this call."
7849 #: ../fish/guestfish-actions.pod:905
7850 msgid "copy-file-to-device"
7854 #: ../fish/guestfish-actions.pod:907
7857 " copy-file-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7862 #: ../fish/guestfish-actions.pod:914
7863 msgid "copy-file-to-file"
7867 #: ../fish/guestfish-actions.pod:916
7870 " copy-file-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7875 #: ../fish/guestfish-actions.pod:921
7877 "This is B<not> the function you want for copying files. This is for copying "
7878 "blocks within existing files. See L</cp>, L</cp-a> and L</mv> for general "
7879 "file copying and moving functions."
7883 #: ../fish/guestfish-actions.pod:928
7888 #: ../fish/guestfish-actions.pod:930
7891 " copy-size src dest size\n"
7896 #: ../fish/guestfish-actions.pod:932 ../src/guestfs-actions.pod:1584
7898 "This command copies exactly C<size> bytes from one source device or file "
7899 "C<src> to another destination device or file C<dest>."
7903 #: ../fish/guestfish-actions.pod:935 ../src/guestfs-actions.pod:1587
7905 "Note this will fail if the source is too short or if the destination is not "
7910 #: ../fish/guestfish-actions.pod:938 ../fish/guestfish-actions.pod:973
7912 "I<This function is deprecated.> In new code, use the "
7913 "L</copy_device_to_device> call instead."
7917 #: ../fish/guestfish-actions.pod:945
7922 #: ../fish/guestfish-actions.pod:947
7930 #: ../fish/guestfish-actions.pod:949 ../src/guestfs-actions.pod:1606
7932 "This copies a file from C<src> to C<dest> where C<dest> is either a "
7933 "destination filename or destination directory."
7937 #: ../fish/guestfish-actions.pod:952
7942 #: ../fish/guestfish-actions.pod:954
7950 #: ../fish/guestfish-actions.pod:956 ../src/guestfs-actions.pod:1620
7952 "This copies a file or directory from C<src> to C<dest> recursively using the "
7957 #: ../fish/guestfish-actions.pod:959
7962 #: ../fish/guestfish-actions.pod:961
7970 #: ../fish/guestfish-actions.pod:963 ../src/guestfs-actions.pod:1641
7972 "This command copies from one source device or file C<src> to another "
7973 "destination device or file C<dest>. Normally you would use this to copy to "
7974 "or from a device or partition, for example to duplicate a filesystem."
7978 #: ../fish/guestfish-actions.pod:968
7980 "If the destination is a device, it must be as large or larger than the "
7981 "source file or device, otherwise the copy will fail. This command cannot do "
7982 "partial copies (see L</copy-device-to-device>)."
7986 #: ../fish/guestfish-actions.pod:980
7991 #: ../fish/guestfish-actions.pod:982
7999 #: ../fish/guestfish-actions.pod:984 ../src/guestfs-actions.pod:1660
8000 msgid "This command runs the C<df> command to report disk space used."
8004 #: ../fish/guestfish-actions.pod:986 ../fish/guestfish-actions.pod:997
8006 "This command is mostly useful for interactive sessions. It is I<not> "
8007 "intended that you try to parse the output string. Use L</statvfs> from "
8012 #: ../fish/guestfish-actions.pod:990
8017 #: ../fish/guestfish-actions.pod:992
8025 #: ../fish/guestfish-actions.pod:994 ../src/guestfs-actions.pod:1676
8027 "This command runs the C<df -h> command to report disk space used in "
8028 "human-readable format."
8032 #: ../fish/guestfish-actions.pod:1001
8037 #: ../fish/guestfish-actions.pod:1003
8045 #: ../fish/guestfish-actions.pod:1005 ../src/guestfs-actions.pod:1693
8047 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
8048 "This is sometimes useful for extended debugging of problems."
8052 #: ../fish/guestfish-actions.pod:1009
8054 "Another way to get the same information is to enable verbose messages with "
8055 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
8056 "before running the program."
8060 #: ../fish/guestfish-actions.pod:1014
8065 #: ../fish/guestfish-actions.pod:1016
8068 " download remotefilename (filename|-)\n"
8073 #: ../fish/guestfish-actions.pod:1018 ../fish/guestfish-actions.pod:1031 ../src/guestfs-actions.pod:1714 ../src/guestfs-actions.pod:1739
8075 "Download file C<remotefilename> and save it as C<filename> on the local "
8080 #: ../fish/guestfish-actions.pod:1021 ../fish/guestfish-actions.pod:5003 ../src/guestfs-actions.pod:1717 ../src/guestfs-actions.pod:7701
8081 msgid "C<filename> can also be a named pipe."
8085 #: ../fish/guestfish-actions.pod:1023
8086 msgid "See also L</upload>, L</cat>."
8090 #: ../fish/guestfish-actions.pod:1027
8091 msgid "download-offset"
8095 #: ../fish/guestfish-actions.pod:1029
8098 " download-offset remotefilename (filename|-) offset size\n"
8103 #: ../fish/guestfish-actions.pod:1034 ../src/guestfs-actions.pod:1742
8105 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
8106 "region must be within the file or device)."
8110 #: ../fish/guestfish-actions.pod:1037
8112 "Note that there is no limit on the amount of data that can be downloaded "
8113 "with this call, unlike with L</pread>, and this call always reads the full "
8114 "amount unless an error occurs."
8118 #: ../fish/guestfish-actions.pod:1042
8119 msgid "See also L</download>, L</pread>."
8123 #: ../fish/guestfish-actions.pod:1046
8128 #: ../fish/guestfish-actions.pod:1048
8131 " drop-caches whattodrop\n"
8136 #: ../fish/guestfish-actions.pod:1050 ../src/guestfs-actions.pod:1767
8138 "This instructs the guest kernel to drop its page cache, and/or dentries and "
8139 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
8140 "to drop, see L<http://linux-mm.org/Drop_Caches>"
8144 #: ../fish/guestfish-actions.pod:1055 ../src/guestfs-actions.pod:1772
8145 msgid "Setting C<whattodrop> to 3 should drop everything."
8149 #: ../fish/guestfish-actions.pod:1057 ../src/guestfs-actions.pod:1774
8151 "This automatically calls L<sync(2)> before the operation, so that the "
8152 "maximum guest memory is freed."
8156 #: ../fish/guestfish-actions.pod:1060
8161 #: ../fish/guestfish-actions.pod:1062
8169 #: ../fish/guestfish-actions.pod:1064 ../src/guestfs-actions.pod:1787
8171 "This command runs the C<du -s> command to estimate file space usage for "
8176 #: ../fish/guestfish-actions.pod:1067 ../src/guestfs-actions.pod:1790
8178 "C<path> can be a file or a directory. If C<path> is a directory then the "
8179 "estimate includes the contents of the directory and all subdirectories "
8184 #: ../fish/guestfish-actions.pod:1071 ../src/guestfs-actions.pod:1794
8185 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
8189 #: ../fish/guestfish-actions.pod:1074
8194 #: ../fish/guestfish-actions.pod:1076
8197 " e2fsck-f device\n"
8202 #: ../fish/guestfish-actions.pod:1078 ../src/guestfs-actions.pod:1812
8204 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
8205 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
8210 #: ../fish/guestfish-actions.pod:1082
8212 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
8213 "should use L</fsck>."
8217 #: ../fish/guestfish-actions.pod:1085
8222 #: ../fish/guestfish-actions.pod:1087
8225 " echo-daemon 'words ...'\n"
8230 #: ../fish/guestfish-actions.pod:1089 ../src/guestfs-actions.pod:1829
8232 "This command concatenates the list of C<words> passed with single spaces "
8233 "between them and returns the resulting string."
8237 #: ../fish/guestfish-actions.pod:1092 ../src/guestfs-actions.pod:1832
8238 msgid "You can use this command to test the connection through to the daemon."
8242 #: ../fish/guestfish-actions.pod:1094
8243 msgid "See also L</ping-daemon>."
8247 #: ../fish/guestfish-actions.pod:1096
8252 #: ../fish/guestfish-actions.pod:1098
8255 " egrep regex path\n"
8260 #: ../fish/guestfish-actions.pod:1100 ../src/guestfs-actions.pod:1848
8261 msgid "This calls the external C<egrep> program and returns the matching lines."
8265 #: ../fish/guestfish-actions.pod:1106
8270 #: ../fish/guestfish-actions.pod:1108
8273 " egrepi regex path\n"
8278 #: ../fish/guestfish-actions.pod:1110 ../src/guestfs-actions.pod:1867
8279 msgid "This calls the external C<egrep -i> program and returns the matching lines."
8283 #: ../fish/guestfish-actions.pod:1116
8288 #: ../fish/guestfish-actions.pod:1118
8291 " equal file1 file2\n"
8296 #: ../fish/guestfish-actions.pod:1120 ../src/guestfs-actions.pod:1886
8298 "This compares the two files C<file1> and C<file2> and returns true if their "
8299 "content is exactly equal, or false otherwise."
8303 #: ../fish/guestfish-actions.pod:1123 ../src/guestfs-actions.pod:1889
8304 msgid "The external L<cmp(1)> program is used for the comparison."
8308 #: ../fish/guestfish-actions.pod:1125
8313 #: ../fish/guestfish-actions.pod:1127
8321 #: ../fish/guestfish-actions.pod:1129 ../src/guestfs-actions.pod:1901
8323 "This returns C<true> if and only if there is a file, directory (or anything) "
8324 "with the given C<path> name."
8328 #: ../fish/guestfish-actions.pod:1132
8329 msgid "See also L</is-file>, L</is-dir>, L</stat>."
8333 #: ../fish/guestfish-actions.pod:1134
8338 #: ../fish/guestfish-actions.pod:1136
8341 " fallocate path len\n"
8346 #: ../fish/guestfish-actions.pod:1138 ../fish/guestfish-actions.pod:1157 ../src/guestfs-actions.pod:1924 ../src/guestfs-actions.pod:1943
8348 "This command preallocates a file (containing zero bytes) named C<path> of "
8349 "size C<len> bytes. If the file exists already, it is overwritten."
8353 #: ../fish/guestfish-actions.pod:1142 ../src/guestfs-actions.pod:1928
8355 "Do not confuse this with the guestfish-specific C<alloc> command which "
8356 "allocates a file in the host and attaches it as a device."
8360 #: ../fish/guestfish-actions.pod:1146
8362 "I<This function is deprecated.> In new code, use the L</fallocate64> call "
8367 #: ../fish/guestfish-actions.pod:1153
8372 #: ../fish/guestfish-actions.pod:1155
8375 " fallocate64 path len\n"
8380 #: ../fish/guestfish-actions.pod:1161
8382 "Note that this call allocates disk blocks for the file. To create a sparse "
8383 "file use L</truncate-size> instead."
8387 #: ../fish/guestfish-actions.pod:1164
8389 "The deprecated call L</fallocate> does the same, but owing to an oversight "
8390 "it only allowed 30 bit lengths to be specified, effectively limiting the "
8391 "maximum size of files created through that call to 1GB."
8395 #: ../fish/guestfish-actions.pod:1169 ../src/guestfs-actions.pod:1955
8397 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
8398 "commands which create a file in the host and attach it as a device."
8402 #: ../fish/guestfish-actions.pod:1173
8407 #: ../fish/guestfish-actions.pod:1175
8410 " fgrep pattern path\n"
8415 #: ../fish/guestfish-actions.pod:1177 ../src/guestfs-actions.pod:1970
8416 msgid "This calls the external C<fgrep> program and returns the matching lines."
8420 #: ../fish/guestfish-actions.pod:1183
8425 #: ../fish/guestfish-actions.pod:1185
8428 " fgrepi pattern path\n"
8433 #: ../fish/guestfish-actions.pod:1187 ../src/guestfs-actions.pod:1989
8434 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
8438 #: ../fish/guestfish-actions.pod:1193
8443 #: ../fish/guestfish-actions.pod:1195
8451 #: ../fish/guestfish-actions.pod:1197 ../src/guestfs-actions.pod:2007
8453 "This call uses the standard L<file(1)> command to determine the type or "
8454 "contents of the file."
8458 #: ../fish/guestfish-actions.pod:1200 ../src/guestfs-actions.pod:2010
8460 "This call will also transparently look inside various types of compressed "
8465 #: ../fish/guestfish-actions.pod:1203 ../src/guestfs-actions.pod:2013
8467 "The exact command which runs is C<file -zb path>. Note in particular that "
8468 "the filename is not prepended to the output (the I<-b> option)."
8472 #: ../fish/guestfish-actions.pod:1207 ../src/guestfs-actions.pod:2017
8474 "The output depends on the output of the underlying L<file(1)> command and it "
8475 "can change in future in ways beyond our control. In other words, the output "
8476 "is not guaranteed by the ABI."
8480 #: ../fish/guestfish-actions.pod:1211
8482 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
8483 "(etc), L</is-zero>."
8487 #: ../fish/guestfish-actions.pod:1214
8488 msgid "file-architecture"
8492 #: ../fish/guestfish-actions.pod:1216
8495 " file-architecture filename\n"
8500 #: ../fish/guestfish-actions.pod:1218 ../src/guestfs-actions.pod:2035
8502 "This detects the architecture of the binary C<filename>, and returns it if "
8507 #: ../fish/guestfish-actions.pod:1221 ../src/guestfs-actions.pod:2038
8508 msgid "Currently defined architectures are:"
8512 #: ../fish/guestfish-actions.pod:1225 ../src/guestfs-actions.pod:2042
8517 #: ../fish/guestfish-actions.pod:1227 ../src/guestfs-actions.pod:2044
8519 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
8520 "irrespective of the precise processor requirements of the binary."
8524 #: ../fish/guestfish-actions.pod:1230 ../src/guestfs-actions.pod:2047
8529 #: ../fish/guestfish-actions.pod:1232 ../src/guestfs-actions.pod:2049
8530 msgid "64 bit x86-64."
8534 #: ../fish/guestfish-actions.pod:1234 ../src/guestfs-actions.pod:2051
8539 #: ../fish/guestfish-actions.pod:1236 ../src/guestfs-actions.pod:2053
8540 msgid "32 bit SPARC."
8544 #: ../fish/guestfish-actions.pod:1238 ../src/guestfs-actions.pod:2055
8549 #: ../fish/guestfish-actions.pod:1240 ../src/guestfs-actions.pod:2057
8550 msgid "64 bit SPARC V9 and above."
8554 #: ../fish/guestfish-actions.pod:1242 ../src/guestfs-actions.pod:2059
8559 #: ../fish/guestfish-actions.pod:1244 ../src/guestfs-actions.pod:2061
8560 msgid "Intel Itanium."
8564 #: ../fish/guestfish-actions.pod:1246 ../src/guestfs-actions.pod:2063
8569 #: ../fish/guestfish-actions.pod:1248 ../src/guestfs-actions.pod:2065
8570 msgid "32 bit Power PC."
8574 #: ../fish/guestfish-actions.pod:1250 ../src/guestfs-actions.pod:2067
8579 #: ../fish/guestfish-actions.pod:1252 ../src/guestfs-actions.pod:2069
8580 msgid "64 bit Power PC."
8584 #: ../fish/guestfish-actions.pod:1256 ../src/guestfs-actions.pod:2073
8585 msgid "Libguestfs may return other architecture strings in future."
8589 #: ../fish/guestfish-actions.pod:1258 ../src/guestfs-actions.pod:2075
8590 msgid "The function works on at least the following types of files:"
8594 #: ../fish/guestfish-actions.pod:1264 ../src/guestfs-actions.pod:2081
8595 msgid "many types of Un*x and Linux binary"
8599 #: ../fish/guestfish-actions.pod:1268 ../src/guestfs-actions.pod:2085
8600 msgid "many types of Un*x and Linux shared library"
8604 #: ../fish/guestfish-actions.pod:1272 ../src/guestfs-actions.pod:2089
8605 msgid "Windows Win32 and Win64 binaries"
8609 #: ../fish/guestfish-actions.pod:1276 ../src/guestfs-actions.pod:2093
8610 msgid "Windows Win32 and Win64 DLLs"
8614 #: ../fish/guestfish-actions.pod:1278 ../src/guestfs-actions.pod:2095
8615 msgid "Win32 binaries and DLLs return C<i386>."
8619 #: ../fish/guestfish-actions.pod:1280 ../src/guestfs-actions.pod:2097
8620 msgid "Win64 binaries and DLLs return C<x86_64>."
8624 #: ../fish/guestfish-actions.pod:1284 ../src/guestfs-actions.pod:2101
8625 msgid "Linux kernel modules"
8629 #: ../fish/guestfish-actions.pod:1288 ../src/guestfs-actions.pod:2105
8630 msgid "Linux new-style initrd images"
8634 #: ../fish/guestfish-actions.pod:1292 ../src/guestfs-actions.pod:2109
8635 msgid "some non-x86 Linux vmlinuz kernels"
8639 #: ../fish/guestfish-actions.pod:1296 ../src/guestfs-actions.pod:2113
8640 msgid "What it can't do currently:"
8644 #: ../fish/guestfish-actions.pod:1302 ../src/guestfs-actions.pod:2119
8645 msgid "static libraries (libfoo.a)"
8649 #: ../fish/guestfish-actions.pod:1306 ../src/guestfs-actions.pod:2123
8650 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
8654 #: ../fish/guestfish-actions.pod:1310 ../src/guestfs-actions.pod:2127
8655 msgid "x86 Linux vmlinuz kernels"
8659 #: ../fish/guestfish-actions.pod:1312 ../src/guestfs-actions.pod:2129
8661 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
8662 "compressed code, and are horribly hard to unpack. If you want to find the "
8663 "architecture of a kernel, use the architecture of the associated initrd or "
8664 "kernel module(s) instead."
8668 #: ../fish/guestfish-actions.pod:1319
8673 #: ../fish/guestfish-actions.pod:1321
8681 #: ../fish/guestfish-actions.pod:1323 ../src/guestfs-actions.pod:2147
8682 msgid "This command returns the size of C<file> in bytes."
8686 #: ../fish/guestfish-actions.pod:1325
8688 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, "
8689 "L</is-file> etc. To get the size of block devices, use "
8690 "L</blockdev-getsize64>."
8694 #: ../fish/guestfish-actions.pod:1329
8699 #: ../fish/guestfish-actions.pod:1331
8702 " fill c len path\n"
8707 #: ../fish/guestfish-actions.pod:1333 ../src/guestfs-actions.pod:2165
8709 "This command creates a new file called C<path>. The initial content of the "
8710 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
8715 #: ../fish/guestfish-actions.pod:1337
8717 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
8718 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
8723 #: ../fish/guestfish-actions.pod:1342
8724 msgid "fill-pattern"
8728 #: ../fish/guestfish-actions.pod:1344
8731 " fill-pattern pattern len path\n"
8736 #: ../fish/guestfish-actions.pod:1346
8738 "This function is like L</fill> except that it creates a new file of length "
8739 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
8740 "is truncated if necessary to ensure the length of the file is exactly C<len> "
8745 #: ../fish/guestfish-actions.pod:1351
8750 #: ../fish/guestfish-actions.pod:1353
8758 #: ../fish/guestfish-actions.pod:1355 ../src/guestfs-actions.pod:2211
8760 "This command lists out all files and directories, recursively, starting at "
8761 "C<directory>. It is essentially equivalent to running the shell command "
8762 "C<find directory -print> but some post-processing happens on the output, "
8767 #: ../fish/guestfish-actions.pod:1360 ../src/guestfs-actions.pod:2216
8769 "This returns a list of strings I<without any prefix>. Thus if the directory "
8774 #: ../fish/guestfish-actions.pod:1363 ../src/guestfs-actions.pod:2219
8784 #: ../fish/guestfish-actions.pod:1367
8785 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
8789 #: ../fish/guestfish-actions.pod:1370 ../src/guestfs-actions.pod:2226
8800 #: ../fish/guestfish-actions.pod:1375 ../src/guestfs-actions.pod:2231
8801 msgid "If C<directory> is not a directory, then this command returns an error."
8805 #: ../fish/guestfish-actions.pod:1378 ../src/guestfs-actions.pod:2234
8806 msgid "The returned list is sorted."
8810 #: ../fish/guestfish-actions.pod:1380
8811 msgid "See also L</find0>."
8815 #: ../fish/guestfish-actions.pod:1385
8820 #: ../fish/guestfish-actions.pod:1387
8823 " find0 directory (files|-)\n"
8828 #: ../fish/guestfish-actions.pod:1389 ../src/guestfs-actions.pod:2254
8830 "This command lists out all files and directories, recursively, starting at "
8831 "C<directory>, placing the resulting list in the external file called "
8836 #: ../fish/guestfish-actions.pod:1393
8837 msgid "This command works the same way as L</find> with the following exceptions:"
8841 #: ../fish/guestfish-actions.pod:1400 ../src/guestfs-actions.pod:2265
8842 msgid "The resulting list is written to an external file."
8846 #: ../fish/guestfish-actions.pod:1404 ../src/guestfs-actions.pod:2269
8848 "Items (filenames) in the result are separated by C<\\0> characters. See "
8849 "L<find(1)> option I<-print0>."
8853 #: ../fish/guestfish-actions.pod:1409 ../src/guestfs-actions.pod:2274
8854 msgid "This command is not limited in the number of names that it can return."
8858 #: ../fish/guestfish-actions.pod:1414 ../src/guestfs-actions.pod:2279
8859 msgid "The result list is not sorted."
8863 #: ../fish/guestfish-actions.pod:1420
8864 msgid "findfs-label"
8868 #: ../fish/guestfish-actions.pod:1422
8871 " findfs-label label\n"
8876 #: ../fish/guestfish-actions.pod:1424 ../src/guestfs-actions.pod:2293
8878 "This command searches the filesystems and returns the one which has the "
8879 "given label. An error is returned if no such filesystem can be found."
8883 #: ../fish/guestfish-actions.pod:1428
8884 msgid "To find the label of a filesystem, use L</vfs-label>."
8888 #: ../fish/guestfish-actions.pod:1430
8893 #: ../fish/guestfish-actions.pod:1432
8896 " findfs-uuid uuid\n"
8901 #: ../fish/guestfish-actions.pod:1434 ../src/guestfs-actions.pod:2310
8903 "This command searches the filesystems and returns the one which has the "
8904 "given UUID. An error is returned if no such filesystem can be found."
8908 #: ../fish/guestfish-actions.pod:1438
8909 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
8913 #: ../fish/guestfish-actions.pod:1440
8918 #: ../fish/guestfish-actions.pod:1442
8921 " fsck fstype device\n"
8926 #: ../fish/guestfish-actions.pod:1444 ../src/guestfs-actions.pod:2328
8928 "This runs the filesystem checker (fsck) on C<device> which should have "
8929 "filesystem type C<fstype>."
8933 #: ../fish/guestfish-actions.pod:1447 ../src/guestfs-actions.pod:2331
8935 "The returned integer is the status. See L<fsck(8)> for the list of status "
8936 "codes from C<fsck>."
8940 #: ../fish/guestfish-actions.pod:1456 ../src/guestfs-actions.pod:2340
8941 msgid "Multiple status codes can be summed together."
8945 #: ../fish/guestfish-actions.pod:1460 ../src/guestfs-actions.pod:2344
8947 "A non-zero return code can mean \"success\", for example if errors have been "
8948 "corrected on the filesystem."
8952 #: ../fish/guestfish-actions.pod:1465 ../src/guestfs-actions.pod:2349
8953 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
8957 #: ../fish/guestfish-actions.pod:1470 ../src/guestfs-actions.pod:2354
8958 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
8962 #: ../fish/guestfish-actions.pod:1472
8967 #: ../fish/guestfish-actions.pod:1474
8975 #: ../fish/guestfish-actions.pod:1476 ../src/guestfs-actions.pod:2365
8977 "Return the additional kernel options which are added to the guest kernel "
8982 #: ../fish/guestfish-actions.pod:1479 ../src/guestfs-actions.pod:2368
8983 msgid "If C<NULL> then no options are added."
8987 #: ../fish/guestfish-actions.pod:1481
8988 msgid "get-attach-method"
8992 #: ../fish/guestfish-actions.pod:1483
8995 " get-attach-method\n"
9000 #: ../fish/guestfish-actions.pod:1485
9001 msgid "Return the current attach method. See L</set-attach-method>."
9005 #: ../fish/guestfish-actions.pod:1487
9006 msgid "get-autosync"
9010 #: ../fish/guestfish-actions.pod:1489
9018 #: ../fish/guestfish-actions.pod:1491 ../src/guestfs-actions.pod:2393
9019 msgid "Get the autosync flag."
9023 #: ../fish/guestfish-actions.pod:1493
9028 #: ../fish/guestfish-actions.pod:1495
9036 #: ../fish/guestfish-actions.pod:1497 ../src/guestfs-actions.pod:2404
9037 msgid "Return the direct appliance mode flag."
9041 #: ../fish/guestfish-actions.pod:1499
9046 #: ../fish/guestfish-actions.pod:1501
9049 " get-e2label device\n"
9054 #: ../fish/guestfish-actions.pod:1503 ../src/guestfs-actions.pod:2423
9055 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
9059 #: ../fish/guestfish-actions.pod:1506
9061 "I<This function is deprecated.> In new code, use the L</vfs_label> call "
9066 #: ../fish/guestfish-actions.pod:1513
9071 #: ../fish/guestfish-actions.pod:1515
9074 " get-e2uuid device\n"
9079 #: ../fish/guestfish-actions.pod:1517 ../src/guestfs-actions.pod:2444
9080 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
9084 #: ../fish/guestfish-actions.pod:1520
9086 "I<This function is deprecated.> In new code, use the L</vfs_uuid> call "
9091 #: ../fish/guestfish-actions.pod:1527
9096 #: ../fish/guestfish-actions.pod:1529
9104 #: ../fish/guestfish-actions.pod:1531 ../src/guestfs-actions.pod:2457
9105 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
9109 #: ../fish/guestfish-actions.pod:1534
9111 "If L</set-memsize> was not called on this handle, and if "
9112 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
9113 "value for memsize."
9117 #: ../fish/guestfish-actions.pod:1538 ../fish/guestfish-actions.pod:1595 ../fish/guestfish-actions.pod:4360 ../fish/guestfish-actions.pod:4462 ../src/guestfs-actions.pod:2464 ../src/guestfs-actions.pod:2556 ../src/guestfs-actions.pod:6755 ../src/guestfs-actions.pod:6881
9118 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
9122 #: ../fish/guestfish-actions.pod:1541
9127 #: ../fish/guestfish-actions.pod:1543
9135 #: ../fish/guestfish-actions.pod:1545 ../src/guestfs-actions.pod:2476
9136 msgid "This returns the enable network flag."
9140 #: ../fish/guestfish-actions.pod:1547
9145 #: ../fish/guestfish-actions.pod:1549
9153 #: ../fish/guestfish-actions.pod:1551 ../src/guestfs-actions.pod:2487
9154 msgid "Return the current search path."
9158 #: ../fish/guestfish-actions.pod:1553 ../src/guestfs-actions.pod:2489
9160 "This is always non-NULL. If it wasn't set already, then this will return "
9165 #: ../fish/guestfish-actions.pod:1556
9170 #: ../fish/guestfish-actions.pod:1558
9178 #: ../fish/guestfish-actions.pod:1560 ../src/guestfs-actions.pod:2502
9179 msgid "This returns the process group flag."
9183 #: ../fish/guestfish-actions.pod:1562
9188 #: ../fish/guestfish-actions.pod:1564
9193 #: ../fish/guestfish-actions.pod:1566
9201 #: ../fish/guestfish-actions.pod:1568 ../src/guestfs-actions.pod:2513
9203 "Return the process ID of the qemu subprocess. If there is no qemu "
9204 "subprocess, then this will return an error."
9208 #: ../fish/guestfish-actions.pod:1571 ../src/guestfs-actions.pod:2516
9209 msgid "This is an internal call used for debugging and testing."
9213 #: ../fish/guestfish-actions.pod:1573
9218 #: ../fish/guestfish-actions.pod:1575
9226 #: ../fish/guestfish-actions.pod:1577 ../src/guestfs-actions.pod:2527
9227 msgid "Return the current qemu binary."
9231 #: ../fish/guestfish-actions.pod:1579 ../src/guestfs-actions.pod:2529
9233 "This is always non-NULL. If it wasn't set already, then this will return "
9234 "the default qemu binary name."
9238 #: ../fish/guestfish-actions.pod:1582
9239 msgid "get-recovery-proc"
9243 #: ../fish/guestfish-actions.pod:1584
9246 " get-recovery-proc\n"
9251 #: ../fish/guestfish-actions.pod:1586 ../src/guestfs-actions.pod:2542
9252 msgid "Return the recovery process enabled flag."
9256 #: ../fish/guestfish-actions.pod:1588
9261 #: ../fish/guestfish-actions.pod:1590
9269 #: ../fish/guestfish-actions.pod:1592
9271 "This returns the current setting of the selinux flag which is passed to the "
9272 "appliance at boot time. See L</set-selinux>."
9276 #: ../fish/guestfish-actions.pod:1598
9281 #: ../fish/guestfish-actions.pod:1600
9289 #: ../fish/guestfish-actions.pod:1602 ../src/guestfs-actions.pod:2568
9290 msgid "This returns the number of virtual CPUs assigned to the appliance."
9294 #: ../fish/guestfish-actions.pod:1604
9299 #: ../fish/guestfish-actions.pod:1606
9307 #: ../fish/guestfish-actions.pod:1608 ../src/guestfs-actions.pod:2579
9309 "This returns the current state as an opaque integer. This is only useful "
9310 "for printing debug and internal error messages."
9314 #: ../fish/guestfish-actions.pod:1611 ../fish/guestfish-actions.pod:2570 ../fish/guestfish-actions.pod:2588 ../fish/guestfish-actions.pod:2626 ../fish/guestfish-actions.pod:2642 ../src/guestfs-actions.pod:2582 ../src/guestfs-actions.pod:3901 ../src/guestfs-actions.pod:3930 ../src/guestfs-actions.pod:3991 ../src/guestfs-actions.pod:4018
9315 msgid "For more information on states, see L<guestfs(3)>."
9319 #: ../fish/guestfish-actions.pod:1613
9324 #: ../fish/guestfish-actions.pod:1615
9332 #: ../fish/guestfish-actions.pod:1617 ../src/guestfs-actions.pod:2593
9333 msgid "Return the command trace flag."
9337 #: ../fish/guestfish-actions.pod:1619
9342 #: ../fish/guestfish-actions.pod:1621
9350 #: ../fish/guestfish-actions.pod:1623
9352 "Return the current umask. By default the umask is C<022> unless it has been "
9353 "set by calling L</umask>."
9357 #: ../fish/guestfish-actions.pod:1626
9362 #: ../fish/guestfish-actions.pod:1628
9370 #: ../fish/guestfish-actions.pod:1630 ../src/guestfs-actions.pod:2616
9371 msgid "This returns the verbose messages flag."
9375 #: ../fish/guestfish-actions.pod:1632
9380 #: ../fish/guestfish-actions.pod:1634
9388 #: ../fish/guestfish-actions.pod:1636 ../src/guestfs-actions.pod:2627
9389 msgid "This gets the SELinux security context of the daemon."
9393 #: ../fish/guestfish-actions.pod:1638
9394 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
9398 #: ../fish/guestfish-actions.pod:1641
9403 #: ../fish/guestfish-actions.pod:1643
9406 " getxattr path name\n"
9411 #: ../fish/guestfish-actions.pod:1645
9413 "Get a single extended attribute from file C<path> named C<name>. This call "
9414 "follows symlinks. If you want to lookup an extended attribute for the "
9415 "symlink itself, use L</lgetxattr>."
9419 #: ../fish/guestfish-actions.pod:1649 ../fish/guestfish-actions.pod:2715
9421 "Normally it is better to get all extended attributes from a file in one go "
9422 "by calling L</getxattrs>. However some Linux filesystem implementations are "
9423 "buggy and do not provide a way to list out attributes. For these "
9424 "filesystems (notably ntfs-3g) you have to know the names of the extended "
9425 "attributes you want in advance and call this function."
9429 #: ../fish/guestfish-actions.pod:1656 ../fish/guestfish-actions.pod:2722 ../src/guestfs-actions.pod:2656 ../src/guestfs-actions.pod:4151
9431 "Extended attribute values are blobs of binary data. If there is no extended "
9432 "attribute named C<name>, this returns an error."
9436 #: ../fish/guestfish-actions.pod:1659
9437 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
9441 #: ../fish/guestfish-actions.pod:1661
9446 #: ../fish/guestfish-actions.pod:1663
9454 #: ../fish/guestfish-actions.pod:1665 ../src/guestfs-actions.pod:2673
9455 msgid "This call lists the extended attributes of the file or directory C<path>."
9459 #: ../fish/guestfish-actions.pod:1668 ../src/guestfs-actions.pod:2676
9461 "At the system call level, this is a combination of the L<listxattr(2)> and "
9462 "L<getxattr(2)> calls."
9466 #: ../fish/guestfish-actions.pod:1671
9467 msgid "See also: L</lgetxattrs>, L<attr(5)>."
9471 #: ../fish/guestfish-actions.pod:1673
9476 #: ../fish/guestfish-actions.pod:1675
9479 " glob-expand pattern\n"
9484 #: ../fish/guestfish-actions.pod:1677 ../src/guestfs-actions.pod:2693
9486 "This command searches for all the pathnames matching C<pattern> according to "
9487 "the wildcard expansion rules used by the shell."
9491 #: ../fish/guestfish-actions.pod:1681 ../src/guestfs-actions.pod:2697
9492 msgid "If no paths match, then this returns an empty list (note: not an error)."
9496 #: ../fish/guestfish-actions.pod:1684 ../src/guestfs-actions.pod:2700
9498 "It is just a wrapper around the C L<glob(3)> function with flags "
9499 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
9503 #: ../fish/guestfish-actions.pod:1688
9508 #: ../fish/guestfish-actions.pod:1690
9511 " grep regex path\n"
9516 #: ../fish/guestfish-actions.pod:1692 ../src/guestfs-actions.pod:2717
9517 msgid "This calls the external C<grep> program and returns the matching lines."
9521 #: ../fish/guestfish-actions.pod:1698
9526 #: ../fish/guestfish-actions.pod:1700
9529 " grepi regex path\n"
9534 #: ../fish/guestfish-actions.pod:1702 ../src/guestfs-actions.pod:2736
9535 msgid "This calls the external C<grep -i> program and returns the matching lines."
9539 #: ../fish/guestfish-actions.pod:1708
9540 msgid "grub-install"
9544 #: ../fish/guestfish-actions.pod:1710
9547 " grub-install root device\n"
9552 #: ../fish/guestfish-actions.pod:1712 ../src/guestfs-actions.pod:2755
9554 "This command installs GRUB 1 (the Grand Unified Bootloader) on C<device>, "
9555 "with the root directory being C<root>."
9559 #: ../fish/guestfish-actions.pod:1721 ../src/guestfs-actions.pod:2764
9561 "There is currently no way in the API to install grub2, which is used by most "
9562 "modern Linux guests. It is possible to run the grub2 command from the "
9563 "guest, although see the caveats in L<guestfs(3)/RUNNING COMMANDS>."
9567 #: ../fish/guestfish-actions.pod:1728 ../src/guestfs-actions.pod:2771
9569 "This uses C<grub-install> from the host. Unfortunately grub is not always "
9570 "compatible with itself, so this only works in rather narrow circumstances. "
9571 "Careful testing with each guest version is advisable."
9575 #: ../fish/guestfish-actions.pod:1735 ../src/guestfs-actions.pod:2778
9577 "If grub-install reports the error \"No suitable drive was found in the "
9578 "generated device map.\" it may be that you need to create a "
9579 "C</boot/grub/device.map> file first that contains the mapping between grub "
9580 "device names and Linux device names. It is usually sufficient to create a "
9585 #: ../fish/guestfish-actions.pod:1742 ../src/guestfs-actions.pod:2785
9593 #: ../fish/guestfish-actions.pod:1744 ../src/guestfs-actions.pod:2787
9594 msgid "replacing C</dev/vda> with the name of the installation device."
9598 #: ../fish/guestfish-actions.pod:1748
9603 #: ../fish/guestfish-actions.pod:1750
9611 #: ../fish/guestfish-actions.pod:1752 ../src/guestfs-actions.pod:2801
9613 "This command returns up to the first 10 lines of a file as a list of "
9618 #: ../fish/guestfish-actions.pod:1758
9623 #: ../fish/guestfish-actions.pod:1760
9626 " head-n nrlines path\n"
9631 #: ../fish/guestfish-actions.pod:1762 ../src/guestfs-actions.pod:2820
9633 "If the parameter C<nrlines> is a positive number, this returns the first "
9634 "C<nrlines> lines of the file C<path>."
9638 #: ../fish/guestfish-actions.pod:1765 ../src/guestfs-actions.pod:2823
9640 "If the parameter C<nrlines> is a negative number, this returns lines from "
9641 "the file C<path>, excluding the last C<nrlines> lines."
9645 #: ../fish/guestfish-actions.pod:1768 ../fish/guestfish-actions.pod:4843 ../src/guestfs-actions.pod:2826 ../src/guestfs-actions.pod:7460
9646 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
9650 #: ../fish/guestfish-actions.pod:1773
9655 #: ../fish/guestfish-actions.pod:1775
9663 #: ../fish/guestfish-actions.pod:1777 ../src/guestfs-actions.pod:2843
9665 "This runs C<hexdump -C> on the given C<path>. The result is the "
9666 "human-readable, canonical hex dump of the file."
9670 #: ../fish/guestfish-actions.pod:1783
9675 #: ../fish/guestfish-actions.pod:1785
9678 " initrd-cat initrdpath filename\n"
9683 #: ../fish/guestfish-actions.pod:1787 ../src/guestfs-actions.pod:2862
9685 "This command unpacks the file C<filename> from the initrd file called "
9686 "C<initrdpath>. The filename must be given I<without> the initial C</> "
9691 #: ../fish/guestfish-actions.pod:1791 ../src/guestfs-actions.pod:2866
9693 "For example, in guestfish you could use the following command to examine the "
9694 "boot script (usually called C</init>) contained in a Linux initrd or "
9699 #: ../fish/guestfish-actions.pod:1795 ../src/guestfs-actions.pod:2870
9702 " initrd-cat /boot/initrd-<version>.img init\n"
9707 #: ../fish/guestfish-actions.pod:1797
9708 msgid "See also L</initrd-list>."
9712 #: ../fish/guestfish-actions.pod:1802
9717 #: ../fish/guestfish-actions.pod:1804
9720 " initrd-list path\n"
9725 #: ../fish/guestfish-actions.pod:1806 ../src/guestfs-actions.pod:2889
9726 msgid "This command lists out files contained in an initrd."
9730 #: ../fish/guestfish-actions.pod:1808 ../src/guestfs-actions.pod:2891
9732 "The files are listed without any initial C</> character. The files are "
9733 "listed in the order they appear (not necessarily alphabetical). Directory "
9734 "names are listed as separate items."
9738 #: ../fish/guestfish-actions.pod:1812 ../src/guestfs-actions.pod:2895
9740 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
9741 "initrd. We I<only> support the newer initramfs format (compressed cpio "
9746 #: ../fish/guestfish-actions.pod:1816
9747 msgid "inotify-add-watch"
9751 #: ../fish/guestfish-actions.pod:1818
9754 " inotify-add-watch path mask\n"
9759 #: ../fish/guestfish-actions.pod:1820 ../src/guestfs-actions.pod:2912
9760 msgid "Watch C<path> for the events listed in C<mask>."
9764 #: ../fish/guestfish-actions.pod:1822 ../src/guestfs-actions.pod:2914
9766 "Note that if C<path> is a directory then events within that directory are "
9767 "watched, but this does I<not> happen recursively (in subdirectories)."
9771 #: ../fish/guestfish-actions.pod:1826 ../src/guestfs-actions.pod:2918
9773 "Note for non-C or non-Linux callers: the inotify events are defined by the "
9774 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
9778 #: ../fish/guestfish-actions.pod:1830
9779 msgid "inotify-close"
9783 #: ../fish/guestfish-actions.pod:1832
9791 #: ../fish/guestfish-actions.pod:1834 ../src/guestfs-actions.pod:2931
9793 "This closes the inotify handle which was previously opened by inotify_init. "
9794 "It removes all watches, throws away any pending events, and deallocates all "
9799 #: ../fish/guestfish-actions.pod:1838
9800 msgid "inotify-files"
9804 #: ../fish/guestfish-actions.pod:1840
9812 #: ../fish/guestfish-actions.pod:1842
9814 "This function is a helpful wrapper around L</inotify-read> which just "
9815 "returns a list of pathnames of objects that were touched. The returned "
9816 "pathnames are sorted and deduplicated."
9820 #: ../fish/guestfish-actions.pod:1846
9821 msgid "inotify-init"
9825 #: ../fish/guestfish-actions.pod:1848
9828 " inotify-init maxevents\n"
9833 #: ../fish/guestfish-actions.pod:1850 ../src/guestfs-actions.pod:2960
9835 "This command creates a new inotify handle. The inotify subsystem can be "
9836 "used to notify events which happen to objects in the guest filesystem."
9840 #: ../fish/guestfish-actions.pod:1854
9842 "C<maxevents> is the maximum number of events which will be queued up between "
9843 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
9844 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
9845 "default was 16384 events. Beyond this limit, the kernel throws away events, "
9846 "but records the fact that it threw them away by setting a flag "
9847 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
9851 #: ../fish/guestfish-actions.pod:1864
9853 "Before any events are generated, you have to add some watches to the "
9854 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
9855 "L</inotify-watch-all>."
9859 #: ../fish/guestfish-actions.pod:1870
9861 "Queued up events should be read periodically by calling L</inotify-read> (or "
9862 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
9863 "If you don't read the events out often enough then you risk the internal "
9864 "queue overflowing."
9868 #: ../fish/guestfish-actions.pod:1877
9870 "The handle should be closed after use by calling L</inotify-close>. This "
9871 "also removes any watches automatically."
9875 #: ../fish/guestfish-actions.pod:1881 ../src/guestfs-actions.pod:2991
9877 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
9878 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
9879 "that there is one global inotify handle per libguestfs instance."
9883 #: ../fish/guestfish-actions.pod:1886
9884 msgid "inotify-read"
9888 #: ../fish/guestfish-actions.pod:1888
9896 #: ../fish/guestfish-actions.pod:1890 ../src/guestfs-actions.pod:3005
9898 "Return the complete queue of events that have happened since the previous "
9903 #: ../fish/guestfish-actions.pod:1893 ../src/guestfs-actions.pod:3008
9904 msgid "If no events have happened, this returns an empty list."
9908 #: ../fish/guestfish-actions.pod:1895 ../src/guestfs-actions.pod:3010
9910 "I<Note>: In order to make sure that all events have been read, you must call "
9911 "this function repeatedly until it returns an empty list. The reason is that "
9912 "the call will read events up to the maximum appliance-to-host message size "
9913 "and leave remaining events in the queue."
9917 #: ../fish/guestfish-actions.pod:1901
9918 msgid "inotify-rm-watch"
9922 #: ../fish/guestfish-actions.pod:1903
9925 " inotify-rm-watch wd\n"
9930 #: ../fish/guestfish-actions.pod:1905
9931 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
9935 #: ../fish/guestfish-actions.pod:1908
9936 msgid "inspect-get-arch"
9940 #: ../fish/guestfish-actions.pod:1910
9943 " inspect-get-arch root\n"
9948 #: ../fish/guestfish-actions.pod:1912
9950 "This returns the architecture of the inspected operating system. The "
9951 "possible return values are listed under L</file-architecture>."
9955 #: ../fish/guestfish-actions.pod:1916 ../src/guestfs-actions.pod:3045
9957 "If the architecture could not be determined, then the string C<unknown> is "
9962 #: ../fish/guestfish-actions.pod:1919 ../fish/guestfish-actions.pod:2014 ../fish/guestfish-actions.pod:2093 ../fish/guestfish-actions.pod:2105 ../fish/guestfish-actions.pod:2189 ../fish/guestfish-actions.pod:2251 ../fish/guestfish-actions.pod:2272 ../fish/guestfish-actions.pod:2286 ../fish/guestfish-actions.pod:2326 ../fish/guestfish-actions.pod:2362 ../fish/guestfish-actions.pod:2375 ../fish/guestfish-actions.pod:2388 ../fish/guestfish-actions.pod:2398 ../fish/guestfish-actions.pod:2408 ../fish/guestfish-actions.pod:2420 ../fish/guestfish-actions.pod:2516 ../fish/guestfish-actions.pod:2550 ../src/guestfs-actions.pod:3048 ../src/guestfs-actions.pod:3150 ../src/guestfs-actions.pod:3254 ../src/guestfs-actions.pod:3273 ../src/guestfs-actions.pod:3404 ../src/guestfs-actions.pod:3488 ../src/guestfs-actions.pod:3516 ../src/guestfs-actions.pod:3537 ../src/guestfs-actions.pod:3590 ../src/guestfs-actions.pod:3634 ../src/guestfs-actions.pod:3654 ../src/guestfs-actions.pod:3674 ../src/guestfs-actions.pod:3691 ../src/guestfs-actions.pod:3707 ../src/guestfs-actions.pod:3725 ../src/guestfs-actions.pod:3827 ../src/guestfs-actions.pod:3868
9963 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
9967 #: ../fish/guestfish-actions.pod:1921
9968 msgid "inspect-get-distro"
9972 #: ../fish/guestfish-actions.pod:1923
9975 " inspect-get-distro root\n"
9980 #: ../fish/guestfish-actions.pod:1925 ../src/guestfs-actions.pod:3061
9981 msgid "This returns the distro (distribution) of the inspected operating system."
9985 #: ../fish/guestfish-actions.pod:1928 ../src/guestfs-actions.pod:3064
9986 msgid "Currently defined distros are:"
9990 #: ../fish/guestfish-actions.pod:1932 ../src/guestfs-actions.pod:3068
9991 msgid "\"archlinux\""
9995 #: ../fish/guestfish-actions.pod:1934 ../src/guestfs-actions.pod:3070
10000 #: ../fish/guestfish-actions.pod:1936 ../src/guestfs-actions.pod:3072
10005 #: ../fish/guestfish-actions.pod:1938 ../src/guestfs-actions.pod:3074
10010 #: ../fish/guestfish-actions.pod:1940 ../src/guestfs-actions.pod:3076
10015 #: ../fish/guestfish-actions.pod:1942 ../src/guestfs-actions.pod:3078
10020 #: ../fish/guestfish-actions.pod:1944 ../src/guestfs-actions.pod:3080
10025 #: ../fish/guestfish-actions.pod:1946 ../src/guestfs-actions.pod:3082
10030 #: ../fish/guestfish-actions.pod:1948 ../src/guestfs-actions.pod:3084
10035 #: ../fish/guestfish-actions.pod:1950 ../src/guestfs-actions.pod:3086
10040 #: ../fish/guestfish-actions.pod:1952 ../src/guestfs-actions.pod:3088
10041 msgid "\"linuxmint\""
10045 #: ../fish/guestfish-actions.pod:1954 ../src/guestfs-actions.pod:3090
10046 msgid "Linux Mint."
10050 #: ../fish/guestfish-actions.pod:1956 ../src/guestfs-actions.pod:3092
10055 #: ../fish/guestfish-actions.pod:1958 ../src/guestfs-actions.pod:3094
10060 #: ../fish/guestfish-actions.pod:1960 ../src/guestfs-actions.pod:3096
10061 msgid "\"mandriva\""
10065 #: ../fish/guestfish-actions.pod:1962 ../src/guestfs-actions.pod:3098
10070 #: ../fish/guestfish-actions.pod:1964 ../src/guestfs-actions.pod:3100
10075 #: ../fish/guestfish-actions.pod:1966 ../src/guestfs-actions.pod:3102
10080 #: ../fish/guestfish-actions.pod:1968 ../src/guestfs-actions.pod:3104
10081 msgid "\"opensuse\""
10085 #: ../fish/guestfish-actions.pod:1970 ../src/guestfs-actions.pod:3106
10090 #: ../fish/guestfish-actions.pod:1972 ../src/guestfs-actions.pod:3108
10095 #: ../fish/guestfish-actions.pod:1974 ../src/guestfs-actions.pod:3110
10100 #: ../fish/guestfish-actions.pod:1976 ../src/guestfs-actions.pod:3112
10101 msgid "\"redhat-based\""
10105 #: ../fish/guestfish-actions.pod:1978 ../src/guestfs-actions.pod:3114
10106 msgid "Some Red Hat-derived distro."
10110 #: ../fish/guestfish-actions.pod:1980 ../src/guestfs-actions.pod:3116
10115 #: ../fish/guestfish-actions.pod:1982 ../src/guestfs-actions.pod:3118
10116 msgid "Red Hat Enterprise Linux."
10120 #: ../fish/guestfish-actions.pod:1984 ../src/guestfs-actions.pod:3120
10121 msgid "\"scientificlinux\""
10125 #: ../fish/guestfish-actions.pod:1986 ../src/guestfs-actions.pod:3122
10126 msgid "Scientific Linux."
10130 #: ../fish/guestfish-actions.pod:1988 ../src/guestfs-actions.pod:3124
10131 msgid "\"slackware\""
10135 #: ../fish/guestfish-actions.pod:1990 ../src/guestfs-actions.pod:3126
10140 #: ../fish/guestfish-actions.pod:1992 ../src/guestfs-actions.pod:3128
10141 msgid "\"ttylinux\""
10145 #: ../fish/guestfish-actions.pod:1994 ../src/guestfs-actions.pod:3130
10150 #: ../fish/guestfish-actions.pod:1996 ../src/guestfs-actions.pod:3132
10155 #: ../fish/guestfish-actions.pod:1998 ../src/guestfs-actions.pod:3134
10160 #: ../fish/guestfish-actions.pod:2000 ../fish/guestfish-actions.pod:2084 ../fish/guestfish-actions.pod:2353 ../src/guestfs-actions.pod:3136 ../src/guestfs-actions.pod:3245 ../src/guestfs-actions.pod:3625
10161 msgid "\"unknown\""
10165 #: ../fish/guestfish-actions.pod:2002 ../src/guestfs-actions.pod:3138
10166 msgid "The distro could not be determined."
10170 #: ../fish/guestfish-actions.pod:2004 ../fish/guestfish-actions.pod:2341 ../src/guestfs-actions.pod:3140 ../src/guestfs-actions.pod:3613
10171 msgid "\"windows\""
10175 #: ../fish/guestfish-actions.pod:2006 ../src/guestfs-actions.pod:3142
10177 "Windows does not have distributions. This string is returned if the OS type "
10182 #: ../fish/guestfish-actions.pod:2011 ../fish/guestfish-actions.pod:2090 ../fish/guestfish-actions.pod:2359 ../src/guestfs-actions.pod:3147 ../src/guestfs-actions.pod:3251 ../src/guestfs-actions.pod:3631
10184 "Future versions of libguestfs may return other strings here. The caller "
10185 "should be prepared to handle any string."
10189 #: ../fish/guestfish-actions.pod:2016
10190 msgid "inspect-get-drive-mappings"
10194 #: ../fish/guestfish-actions.pod:2018
10197 " inspect-get-drive-mappings root\n"
10202 #: ../fish/guestfish-actions.pod:2020 ../src/guestfs-actions.pod:3163
10204 "This call is useful for Windows which uses a primitive system of assigning "
10205 "drive letters (like \"C:\") to partitions. This inspection API examines the "
10206 "Windows Registry to find out how disks/partitions are mapped to drive "
10207 "letters, and returns a hash table as in the example below:"
10211 #: ../fish/guestfish-actions.pod:2026 ../src/guestfs-actions.pod:3169
10214 " C => /dev/vda2\n"
10215 " E => /dev/vdb1\n"
10216 " F => /dev/vdc1\n"
10221 #: ../fish/guestfish-actions.pod:2030 ../src/guestfs-actions.pod:3173
10223 "Note that keys are drive letters. For Windows, the key is case insensitive "
10224 "and just contains the drive letter, without the customary colon separator "
10229 #: ../fish/guestfish-actions.pod:2034 ../src/guestfs-actions.pod:3177
10231 "In future we may support other operating systems that also used drive "
10232 "letters, but the keys for those might not be case insensitive and might be "
10233 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
10238 #: ../fish/guestfish-actions.pod:2039 ../src/guestfs-actions.pod:3182
10240 "For Windows guests, currently only hard drive mappings are returned. "
10241 "Removable disks (eg. DVD-ROMs) are ignored."
10245 #: ../fish/guestfish-actions.pod:2042 ../src/guestfs-actions.pod:3185
10247 "For guests that do not use drive mappings, or if the drive mappings could "
10248 "not be determined, this returns an empty hash table."
10252 #: ../fish/guestfish-actions.pod:2045
10254 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10255 "L</inspect-get-mountpoints>, L</inspect-get-filesystems>."
10259 #: ../fish/guestfish-actions.pod:2049
10260 msgid "inspect-get-filesystems"
10264 #: ../fish/guestfish-actions.pod:2051
10267 " inspect-get-filesystems root\n"
10272 #: ../fish/guestfish-actions.pod:2053 ../src/guestfs-actions.pod:3206
10274 "This returns a list of all the filesystems that we think are associated with "
10275 "this operating system. This includes the root filesystem, other ordinary "
10276 "filesystems, and non-mounted devices like swap partitions."
10280 #: ../fish/guestfish-actions.pod:2058 ../src/guestfs-actions.pod:3211
10282 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
10283 "to be shared between operating systems."
10287 #: ../fish/guestfish-actions.pod:2061
10289 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10290 "L</inspect-get-mountpoints>."
10294 #: ../fish/guestfish-actions.pod:2064
10295 msgid "inspect-get-format"
10299 #: ../fish/guestfish-actions.pod:2066
10302 " inspect-get-format root\n"
10307 #: ../fish/guestfish-actions.pod:2068 ../src/guestfs-actions.pod:3229
10309 "This returns the format of the inspected operating system. You can use it "
10310 "to detect install images, live CDs and similar."
10314 #: ../fish/guestfish-actions.pod:2071 ../src/guestfs-actions.pod:3232
10315 msgid "Currently defined formats are:"
10319 #: ../fish/guestfish-actions.pod:2075 ../src/guestfs-actions.pod:3236
10320 msgid "\"installed\""
10324 #: ../fish/guestfish-actions.pod:2077 ../src/guestfs-actions.pod:3238
10325 msgid "This is an installed operating system."
10329 #: ../fish/guestfish-actions.pod:2079 ../src/guestfs-actions.pod:3240
10330 msgid "\"installer\""
10334 #: ../fish/guestfish-actions.pod:2081 ../src/guestfs-actions.pod:3242
10336 "The disk image being inspected is not an installed operating system, but a "
10337 "I<bootable> install disk, live CD, or similar."
10341 #: ../fish/guestfish-actions.pod:2086 ../src/guestfs-actions.pod:3247
10342 msgid "The format of this disk image is not known."
10346 #: ../fish/guestfish-actions.pod:2095
10347 msgid "inspect-get-hostname"
10351 #: ../fish/guestfish-actions.pod:2097
10354 " inspect-get-hostname root\n"
10359 #: ../fish/guestfish-actions.pod:2099 ../src/guestfs-actions.pod:3267
10361 "This function returns the hostname of the operating system as found by "
10362 "inspection of the guest's configuration files."
10366 #: ../fish/guestfish-actions.pod:2102 ../src/guestfs-actions.pod:3270
10368 "If the hostname could not be determined, then the string C<unknown> is "
10373 #: ../fish/guestfish-actions.pod:2107
10374 msgid "inspect-get-icon"
10378 #: ../fish/guestfish-actions.pod:2109
10381 " inspect-get-icon root [favicon:true|false] [highquality:true|false]\n"
10386 #: ../fish/guestfish-actions.pod:2111 ../src/guestfs-actions.pod:3296
10388 "This function returns an icon corresponding to the inspected operating "
10389 "system. The icon is returned as a buffer containing a PNG image (re-encoded "
10390 "to PNG if necessary)."
10394 #: ../fish/guestfish-actions.pod:2115 ../src/guestfs-actions.pod:3300
10396 "If it was not possible to get an icon this function returns a zero-length "
10397 "(non-NULL) buffer. I<Callers must check for this case>."
10401 #: ../fish/guestfish-actions.pod:2118 ../src/guestfs-actions.pod:3303
10403 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
10404 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
10405 "this file will be returned. You can disable favicons by passing the "
10406 "optional C<favicon> boolean as false (default is true)."
10410 #: ../fish/guestfish-actions.pod:2124 ../src/guestfs-actions.pod:3309
10412 "If finding the favicon fails, then we look in other places in the guest for "
10417 #: ../fish/guestfish-actions.pod:2127 ../src/guestfs-actions.pod:3312
10419 "If the optional C<highquality> boolean is true then only high quality icons "
10420 "are returned, which means only icons of high resolution with an alpha "
10421 "channel. The default (false) is to return any icon we can, even if it is of "
10422 "substandard quality."
10426 #: ../fish/guestfish-actions.pod:2138 ../src/guestfs-actions.pod:3323
10428 "Unlike most other inspection API calls, the guest's disks must be mounted up "
10429 "before you call this, since it needs to read information from the guest "
10430 "filesystem during the call."
10434 #: ../fish/guestfish-actions.pod:2144 ../src/guestfs-actions.pod:3329
10436 "B<Security:> The icon data comes from the untrusted guest, and should be "
10437 "treated with caution. PNG files have been known to contain exploits. "
10438 "Ensure that libpng (or other relevant libraries) are fully up to date before "
10439 "trying to process or display the icon."
10443 #: ../fish/guestfish-actions.pod:2152 ../src/guestfs-actions.pod:3337
10445 "The PNG image returned can be any size. It might not be square. Libguestfs "
10446 "tries to return the largest, highest quality icon available. The "
10447 "application must scale the icon to the required size."
10451 #: ../fish/guestfish-actions.pod:2159 ../src/guestfs-actions.pod:3344
10453 "Extracting icons from Windows guests requires the external C<wrestool> "
10454 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
10455 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
10456 "installed separately."
10460 #: ../fish/guestfish-actions.pod:2166 ../src/guestfs-actions.pod:3351
10462 "Operating system icons are usually trademarks. Seek legal advice before "
10463 "using trademarks in applications."
10467 #: ../fish/guestfish-actions.pod:2173
10468 msgid "inspect-get-major-version"
10472 #: ../fish/guestfish-actions.pod:2175
10475 " inspect-get-major-version root\n"
10480 #: ../fish/guestfish-actions.pod:2177 ../src/guestfs-actions.pod:3392
10481 msgid "This returns the major version number of the inspected operating system."
10485 #: ../fish/guestfish-actions.pod:2180 ../src/guestfs-actions.pod:3395
10487 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
10488 "popular public names used by the operating system. Notably the operating "
10489 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
10490 "1). You can find out the real versions corresponding to releases of Windows "
10491 "by consulting Wikipedia or MSDN."
10495 #: ../fish/guestfish-actions.pod:2187 ../fish/guestfish-actions.pod:2198 ../src/guestfs-actions.pod:3402 ../src/guestfs-actions.pod:3419
10496 msgid "If the version could not be determined, then C<0> is returned."
10500 #: ../fish/guestfish-actions.pod:2191
10501 msgid "inspect-get-minor-version"
10505 #: ../fish/guestfish-actions.pod:2193
10508 " inspect-get-minor-version root\n"
10513 #: ../fish/guestfish-actions.pod:2195 ../src/guestfs-actions.pod:3416
10514 msgid "This returns the minor version number of the inspected operating system."
10518 #: ../fish/guestfish-actions.pod:2200
10520 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10521 "L</inspect-get-major-version>."
10525 #: ../fish/guestfish-actions.pod:2203
10526 msgid "inspect-get-mountpoints"
10530 #: ../fish/guestfish-actions.pod:2205
10533 " inspect-get-mountpoints root\n"
10538 #: ../fish/guestfish-actions.pod:2207 ../src/guestfs-actions.pod:3434
10540 "This returns a hash of where we think the filesystems associated with this "
10541 "operating system should be mounted. Callers should note that this is at "
10542 "best an educated guess made by reading configuration files such as "
10543 "C</etc/fstab>. I<In particular note> that this may return filesystems which "
10544 "are non-existent or not mountable and callers should be prepared to handle "
10545 "or ignore failures if they try to mount them."
10549 #: ../fish/guestfish-actions.pod:2216 ../src/guestfs-actions.pod:3443
10551 "Each element in the returned hashtable has a key which is the path of the "
10552 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
10553 "mounted there (eg. C</dev/sda1>)."
10557 #: ../fish/guestfish-actions.pod:2221 ../src/guestfs-actions.pod:3448
10558 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
10562 #: ../fish/guestfish-actions.pod:2224
10564 "For operating systems like Windows which still use drive letters, this call "
10565 "will only return an entry for the first drive \"mounted on\" C</>. For "
10566 "information about the mapping of drive letters to partitions, see "
10567 "L</inspect-get-drive-mappings>."
10571 #: ../fish/guestfish-actions.pod:2230
10573 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10574 "L</inspect-get-filesystems>."
10578 #: ../fish/guestfish-actions.pod:2233
10579 msgid "inspect-get-package-format"
10583 #: ../fish/guestfish-actions.pod:2235
10586 " inspect-get-package-format root\n"
10591 #: ../fish/guestfish-actions.pod:2237
10593 "This function and L</inspect-get-package-management> return the package "
10594 "format and package management tool used by the inspected operating system. "
10595 "For example for Fedora these functions would return C<rpm> (package format) "
10596 "and C<yum> (package management)."
10600 #: ../fish/guestfish-actions.pod:2243 ../src/guestfs-actions.pod:3480
10602 "This returns the string C<unknown> if we could not determine the package "
10603 "format I<or> if the operating system does not have a real packaging system "
10608 #: ../fish/guestfish-actions.pod:2247 ../src/guestfs-actions.pod:3484
10610 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>, "
10611 "C<pkgsrc>. Future versions of libguestfs may return other strings."
10615 #: ../fish/guestfish-actions.pod:2253
10616 msgid "inspect-get-package-management"
10620 #: ../fish/guestfish-actions.pod:2255
10623 " inspect-get-package-management root\n"
10628 #: ../fish/guestfish-actions.pod:2257
10630 "L</inspect-get-package-format> and this function return the package format "
10631 "and package management tool used by the inspected operating system. For "
10632 "example for Fedora these functions would return C<rpm> (package format) and "
10633 "C<yum> (package management)."
10637 #: ../fish/guestfish-actions.pod:2263 ../src/guestfs-actions.pod:3507
10639 "This returns the string C<unknown> if we could not determine the package "
10640 "management tool I<or> if the operating system does not have a real packaging "
10641 "system (eg. Windows)."
10645 #: ../fish/guestfish-actions.pod:2267 ../src/guestfs-actions.pod:3511
10647 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
10648 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>, C<zypper>. Future "
10649 "versions of libguestfs may return other strings."
10653 #: ../fish/guestfish-actions.pod:2274
10654 msgid "inspect-get-product-name"
10658 #: ../fish/guestfish-actions.pod:2276
10661 " inspect-get-product-name root\n"
10666 #: ../fish/guestfish-actions.pod:2278 ../src/guestfs-actions.pod:3529
10668 "This returns the product name of the inspected operating system. The "
10669 "product name is generally some freeform string which can be displayed to the "
10670 "user, but should not be parsed by programs."
10674 #: ../fish/guestfish-actions.pod:2283 ../src/guestfs-actions.pod:3534
10676 "If the product name could not be determined, then the string C<unknown> is "
10681 #: ../fish/guestfish-actions.pod:2288
10682 msgid "inspect-get-product-variant"
10686 #: ../fish/guestfish-actions.pod:2290
10689 " inspect-get-product-variant root\n"
10694 #: ../fish/guestfish-actions.pod:2292 ../src/guestfs-actions.pod:3550
10695 msgid "This returns the product variant of the inspected operating system."
10699 #: ../fish/guestfish-actions.pod:2295 ../src/guestfs-actions.pod:3553
10701 "For Windows guests, this returns the contents of the Registry key "
10702 "C<HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> "
10703 "which is usually a string such as C<Client> or C<Server> (other values are "
10704 "possible). This can be used to distinguish consumer and enterprise versions "
10705 "of Windows that have the same version number (for example, Windows 7 and "
10706 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
10707 "the latter is C<Server>)."
10711 #: ../fish/guestfish-actions.pod:2304 ../src/guestfs-actions.pod:3562
10713 "For enterprise Linux guests, in future we intend this to return the product "
10714 "variant such as C<Desktop>, C<Server> and so on. But this is not "
10715 "implemented at present."
10719 #: ../fish/guestfish-actions.pod:2308 ../src/guestfs-actions.pod:3566
10721 "If the product variant could not be determined, then the string C<unknown> "
10726 #: ../fish/guestfish-actions.pod:2311
10728 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10729 "L</inspect-get-product-name>, L</inspect-get-major-version>."
10733 #: ../fish/guestfish-actions.pod:2315
10734 msgid "inspect-get-roots"
10738 #: ../fish/guestfish-actions.pod:2317
10741 " inspect-get-roots\n"
10746 #: ../fish/guestfish-actions.pod:2319
10748 "This function is a convenient way to get the list of root devices, as "
10749 "returned from a previous call to L</inspect-os>, but without redoing the "
10750 "whole inspection process."
10754 #: ../fish/guestfish-actions.pod:2323
10756 "This returns an empty list if either no root devices were found or the "
10757 "caller has not called L</inspect-os>."
10761 #: ../fish/guestfish-actions.pod:2328
10762 msgid "inspect-get-type"
10766 #: ../fish/guestfish-actions.pod:2330
10769 " inspect-get-type root\n"
10774 #: ../fish/guestfish-actions.pod:2332 ../src/guestfs-actions.pod:3604
10776 "This returns the type of the inspected operating system. Currently defined "
10781 #: ../fish/guestfish-actions.pod:2337 ../src/guestfs-actions.pod:3609
10786 #: ../fish/guestfish-actions.pod:2339 ../src/guestfs-actions.pod:3611
10787 msgid "Any Linux-based operating system."
10791 #: ../fish/guestfish-actions.pod:2343 ../src/guestfs-actions.pod:3615
10792 msgid "Any Microsoft Windows operating system."
10796 #: ../fish/guestfish-actions.pod:2345 ../src/guestfs-actions.pod:3617
10797 msgid "\"freebsd\""
10801 #: ../fish/guestfish-actions.pod:2347 ../src/guestfs-actions.pod:3619
10806 #: ../fish/guestfish-actions.pod:2349 ../src/guestfs-actions.pod:3621
10811 #: ../fish/guestfish-actions.pod:2351 ../src/guestfs-actions.pod:3623
10816 #: ../fish/guestfish-actions.pod:2355 ../src/guestfs-actions.pod:3627
10817 msgid "The operating system type could not be determined."
10821 #: ../fish/guestfish-actions.pod:2364
10822 msgid "inspect-get-windows-current-control-set"
10826 #: ../fish/guestfish-actions.pod:2366
10829 " inspect-get-windows-current-control-set root\n"
10834 #: ../fish/guestfish-actions.pod:2368 ../src/guestfs-actions.pod:3647
10836 "This returns the Windows CurrentControlSet of the inspected guest. The "
10837 "CurrentControlSet is a registry key name such as C<ControlSet001>."
10841 #: ../fish/guestfish-actions.pod:2371 ../src/guestfs-actions.pod:3650
10843 "This call assumes that the guest is Windows and that the Registry could be "
10844 "examined by inspection. If this is not the case then an error is returned."
10848 #: ../fish/guestfish-actions.pod:2377
10849 msgid "inspect-get-windows-systemroot"
10853 #: ../fish/guestfish-actions.pod:2379
10856 " inspect-get-windows-systemroot root\n"
10861 #: ../fish/guestfish-actions.pod:2381 ../src/guestfs-actions.pod:3667
10863 "This returns the Windows systemroot of the inspected guest. The systemroot "
10864 "is a directory path such as C</WINDOWS>."
10868 #: ../fish/guestfish-actions.pod:2384 ../src/guestfs-actions.pod:3670
10870 "This call assumes that the guest is Windows and that the systemroot could be "
10871 "determined by inspection. If this is not the case then an error is "
10876 #: ../fish/guestfish-actions.pod:2390
10877 msgid "inspect-is-live"
10881 #: ../fish/guestfish-actions.pod:2392
10884 " inspect-is-live root\n"
10889 #: ../fish/guestfish-actions.pod:2394
10891 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10892 "then this returns true if a live image was detected on the disk."
10896 #: ../fish/guestfish-actions.pod:2400
10897 msgid "inspect-is-multipart"
10901 #: ../fish/guestfish-actions.pod:2402
10904 " inspect-is-multipart root\n"
10909 #: ../fish/guestfish-actions.pod:2404
10911 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10912 "then this returns true if the disk is part of a set."
10916 #: ../fish/guestfish-actions.pod:2410
10917 msgid "inspect-is-netinst"
10921 #: ../fish/guestfish-actions.pod:2412
10924 " inspect-is-netinst root\n"
10929 #: ../fish/guestfish-actions.pod:2414
10931 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10932 "then this returns true if the disk is a network installer, ie. not a "
10933 "self-contained install CD but one which is likely to require network access "
10934 "to complete the install."
10938 #: ../fish/guestfish-actions.pod:2422
10939 msgid "inspect-list-applications"
10943 #: ../fish/guestfish-actions.pod:2424
10946 " inspect-list-applications root\n"
10951 #: ../fish/guestfish-actions.pod:2426 ../src/guestfs-actions.pod:3737
10952 msgid "Return the list of applications installed in the operating system."
10956 #: ../fish/guestfish-actions.pod:2428
10958 "I<Note:> This call works differently from other parts of the inspection "
10959 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
10960 "then mount up the disks, before calling this. Listing applications is a "
10961 "significantly more difficult operation which requires access to the full "
10962 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
10963 "are just returning data cached in the libguestfs handle, this call actually "
10964 "reads parts of the mounted filesystems during the call."
10968 #: ../fish/guestfish-actions.pod:2438 ../src/guestfs-actions.pod:3749
10970 "This returns an empty list if the inspection code was not able to determine "
10971 "the list of applications."
10975 #: ../fish/guestfish-actions.pod:2441 ../src/guestfs-actions.pod:3752
10976 msgid "The application structure contains the following fields:"
10980 #: ../fish/guestfish-actions.pod:2445 ../src/guestfs-actions.pod:3756
10981 msgid "C<app_name>"
10985 #: ../fish/guestfish-actions.pod:2447 ../src/guestfs-actions.pod:3758
10987 "The name of the application. For Red Hat-derived and Debian-derived Linux "
10988 "guests, this is the package name."
10992 #: ../fish/guestfish-actions.pod:2450 ../src/guestfs-actions.pod:3761
10993 msgid "C<app_display_name>"
10997 #: ../fish/guestfish-actions.pod:2452 ../src/guestfs-actions.pod:3763
10999 "The display name of the application, sometimes localized to the install "
11000 "language of the guest operating system."
11004 #: ../fish/guestfish-actions.pod:2455 ../src/guestfs-actions.pod:3766
11006 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
11007 "to display something can use C<app_name> instead."
11011 #: ../fish/guestfish-actions.pod:2458 ../src/guestfs-actions.pod:3769
11012 msgid "C<app_epoch>"
11016 #: ../fish/guestfish-actions.pod:2460 ../src/guestfs-actions.pod:3771
11018 "For package managers which use epochs, this contains the epoch of the "
11019 "package (an integer). If unavailable, this is returned as C<0>."
11023 #: ../fish/guestfish-actions.pod:2463 ../src/guestfs-actions.pod:3774
11024 msgid "C<app_version>"
11028 #: ../fish/guestfish-actions.pod:2465 ../src/guestfs-actions.pod:3776
11030 "The version string of the application or package. If unavailable this is "
11031 "returned as an empty string C<\"\">."
11035 #: ../fish/guestfish-actions.pod:2468 ../src/guestfs-actions.pod:3779
11036 msgid "C<app_release>"
11040 #: ../fish/guestfish-actions.pod:2470 ../src/guestfs-actions.pod:3781
11042 "The release string of the application or package, for package managers that "
11043 "use this. If unavailable this is returned as an empty string C<\"\">."
11047 #: ../fish/guestfish-actions.pod:2474 ../src/guestfs-actions.pod:3785
11048 msgid "C<app_install_path>"
11052 #: ../fish/guestfish-actions.pod:2476 ../src/guestfs-actions.pod:3787
11054 "The installation path of the application (on operating systems such as "
11055 "Windows which use installation paths). This path is in the format used by "
11056 "the guest operating system, it is not a libguestfs path."
11060 #: ../fish/guestfish-actions.pod:2481 ../src/guestfs-actions.pod:3792
11061 msgid "If unavailable this is returned as an empty string C<\"\">."
11065 #: ../fish/guestfish-actions.pod:2483 ../src/guestfs-actions.pod:3794
11066 msgid "C<app_trans_path>"
11070 #: ../fish/guestfish-actions.pod:2485 ../src/guestfs-actions.pod:3796
11072 "The install path translated into a libguestfs path. If unavailable this is "
11073 "returned as an empty string C<\"\">."
11077 #: ../fish/guestfish-actions.pod:2488 ../src/guestfs-actions.pod:3799
11078 msgid "C<app_publisher>"
11082 #: ../fish/guestfish-actions.pod:2490 ../src/guestfs-actions.pod:3801
11084 "The name of the publisher of the application, for package managers that use "
11085 "this. If unavailable this is returned as an empty string C<\"\">."
11089 #: ../fish/guestfish-actions.pod:2494 ../src/guestfs-actions.pod:3805
11094 #: ../fish/guestfish-actions.pod:2496 ../src/guestfs-actions.pod:3807
11096 "The URL (eg. upstream URL) of the application. If unavailable this is "
11097 "returned as an empty string C<\"\">."
11101 #: ../fish/guestfish-actions.pod:2499 ../src/guestfs-actions.pod:3810
11102 msgid "C<app_source_package>"
11106 #: ../fish/guestfish-actions.pod:2501 ../src/guestfs-actions.pod:3812
11108 "For packaging systems which support this, the name of the source package. "
11109 "If unavailable this is returned as an empty string C<\"\">."
11113 #: ../fish/guestfish-actions.pod:2504 ../src/guestfs-actions.pod:3815
11114 msgid "C<app_summary>"
11118 #: ../fish/guestfish-actions.pod:2506 ../src/guestfs-actions.pod:3817
11120 "A short (usually one line) description of the application or package. If "
11121 "unavailable this is returned as an empty string C<\"\">."
11125 #: ../fish/guestfish-actions.pod:2509 ../src/guestfs-actions.pod:3820
11126 msgid "C<app_description>"
11130 #: ../fish/guestfish-actions.pod:2511 ../src/guestfs-actions.pod:3822
11132 "A longer description of the application or package. If unavailable this is "
11133 "returned as an empty string C<\"\">."
11137 #: ../fish/guestfish-actions.pod:2518
11142 #: ../fish/guestfish-actions.pod:2520
11150 #: ../fish/guestfish-actions.pod:2522 ../src/guestfs-actions.pod:3840
11152 "This function uses other libguestfs functions and certain heuristics to "
11153 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
11154 "for operating systems."
11158 #: ../fish/guestfish-actions.pod:2526 ../src/guestfs-actions.pod:3844
11159 msgid "The list returned is empty if no operating systems were found."
11163 #: ../fish/guestfish-actions.pod:2528 ../src/guestfs-actions.pod:3846
11165 "If one operating system was found, then this returns a list with a single "
11166 "element, which is the name of the root filesystem of this operating system. "
11167 "It is also possible for this function to return a list containing more than "
11168 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
11169 "element being the root filesystem of one of the operating systems."
11173 #: ../fish/guestfish-actions.pod:2535
11175 "You can pass the root string(s) returned to other L</inspect-get-*> "
11176 "functions in order to query further information about each operating system, "
11177 "such as the name and version."
11181 #: ../fish/guestfish-actions.pod:2540
11183 "This function uses other libguestfs features such as L</mount-ro> and "
11184 "L</umount-all> in order to mount and unmount filesystems and look at the "
11185 "contents. This should be called with no disks currently mounted. The "
11186 "function may also use Augeas, so any existing Augeas handle will be closed."
11190 #: ../fish/guestfish-actions.pod:2546 ../src/guestfs-actions.pod:3864
11192 "This function cannot decrypt encrypted disks. The caller must do that first "
11193 "(supplying the necessary keys) if the disk is encrypted."
11197 #: ../fish/guestfish-actions.pod:2552 ../fish/guestfish-actions.pod:2750 ../fish/guestfish-actions.pod:2809
11198 msgid "See also L</list-filesystems>."
11202 #: ../fish/guestfish-actions.pod:2554
11203 msgid "is-blockdev"
11207 #: ../fish/guestfish-actions.pod:2556
11210 " is-blockdev path\n"
11215 #: ../fish/guestfish-actions.pod:2558 ../src/guestfs-actions.pod:3884
11217 "This returns C<true> if and only if there is a block device with the given "
11222 #: ../fish/guestfish-actions.pod:2561 ../fish/guestfish-actions.pod:2579 ../fish/guestfish-actions.pod:2598 ../fish/guestfish-actions.pod:2607 ../fish/guestfish-actions.pod:2617 ../fish/guestfish-actions.pod:2651 ../fish/guestfish-actions.pod:2660
11223 msgid "See also L</stat>."
11227 #: ../fish/guestfish-actions.pod:2563
11232 #: ../fish/guestfish-actions.pod:2565
11240 #: ../fish/guestfish-actions.pod:2567 ../src/guestfs-actions.pod:3898
11242 "This returns true iff this handle is busy processing a command (in the "
11247 #: ../fish/guestfish-actions.pod:2572
11252 #: ../fish/guestfish-actions.pod:2574
11255 " is-chardev path\n"
11260 #: ../fish/guestfish-actions.pod:2576 ../src/guestfs-actions.pod:3913
11262 "This returns C<true> if and only if there is a character device with the "
11263 "given C<path> name."
11267 #: ../fish/guestfish-actions.pod:2581
11272 #: ../fish/guestfish-actions.pod:2583
11280 #: ../fish/guestfish-actions.pod:2585 ../src/guestfs-actions.pod:3927
11282 "This returns true iff this handle is being configured (in the C<CONFIG> "
11287 #: ../fish/guestfish-actions.pod:2590
11292 #: ../fish/guestfish-actions.pod:2592
11300 #: ../fish/guestfish-actions.pod:2594 ../src/guestfs-actions.pod:3942
11302 "This returns C<true> if and only if there is a directory with the given "
11303 "C<path> name. Note that it returns false for other objects like files."
11307 #: ../fish/guestfish-actions.pod:2600
11312 #: ../fish/guestfish-actions.pod:2602
11320 #: ../fish/guestfish-actions.pod:2604 ../src/guestfs-actions.pod:3958
11322 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
11323 "given C<path> name."
11327 #: ../fish/guestfish-actions.pod:2609
11332 #: ../fish/guestfish-actions.pod:2611
11340 #: ../fish/guestfish-actions.pod:2613 ../src/guestfs-actions.pod:3973
11342 "This returns C<true> if and only if there is a regular file with the given "
11343 "C<path> name. Note that it returns false for other objects like "
11348 #: ../fish/guestfish-actions.pod:2619
11349 msgid "is-launching"
11353 #: ../fish/guestfish-actions.pod:2621
11361 #: ../fish/guestfish-actions.pod:2623 ../src/guestfs-actions.pod:3988
11363 "This returns true iff this handle is launching the subprocess (in the "
11364 "C<LAUNCHING> state)."
11368 #: ../fish/guestfish-actions.pod:2628
11373 #: ../fish/guestfish-actions.pod:2630
11381 #: ../fish/guestfish-actions.pod:2632 ../src/guestfs-actions.pod:4003
11383 "This command tests whether C<device> is a logical volume, and returns true "
11384 "iff this is the case."
11388 #: ../fish/guestfish-actions.pod:2635
11393 #: ../fish/guestfish-actions.pod:2637
11401 #: ../fish/guestfish-actions.pod:2639 ../src/guestfs-actions.pod:4015
11403 "This returns true iff this handle is ready to accept commands (in the "
11408 #: ../fish/guestfish-actions.pod:2644
11413 #: ../fish/guestfish-actions.pod:2646
11416 " is-socket path\n"
11421 #: ../fish/guestfish-actions.pod:2648 ../src/guestfs-actions.pod:4030
11423 "This returns C<true> if and only if there is a Unix domain socket with the "
11424 "given C<path> name."
11428 #: ../fish/guestfish-actions.pod:2653
11433 #: ../fish/guestfish-actions.pod:2655
11436 " is-symlink path\n"
11441 #: ../fish/guestfish-actions.pod:2657 ../src/guestfs-actions.pod:4045
11443 "This returns C<true> if and only if there is a symbolic link with the given "
11448 #: ../fish/guestfish-actions.pod:2662
11453 #: ../fish/guestfish-actions.pod:2664
11461 #: ../fish/guestfish-actions.pod:2666 ../src/guestfs-actions.pod:4060
11463 "This returns true iff the file exists and the file is empty or it contains "
11468 #: ../fish/guestfish-actions.pod:2669
11469 msgid "is-zero-device"
11473 #: ../fish/guestfish-actions.pod:2671
11476 " is-zero-device device\n"
11481 #: ../fish/guestfish-actions.pod:2673 ../src/guestfs-actions.pod:4073
11482 msgid "This returns true iff the device exists and contains all zero bytes."
11486 #: ../fish/guestfish-actions.pod:2675 ../src/guestfs-actions.pod:4075
11487 msgid "Note that for large devices this can take a long time to run."
11491 #: ../fish/guestfish-actions.pod:2677
11492 msgid "kill-subprocess"
11496 #: ../fish/guestfish-actions.pod:2679
11499 " kill-subprocess\n"
11504 #: ../fish/guestfish-actions.pod:2681 ../src/guestfs-actions.pod:4086
11505 msgid "This kills the qemu subprocess. You should never need to call this."
11509 #: ../fish/guestfish-actions.pod:2683
11514 #: ../fish/guestfish-actions.pod:2685
11519 #: ../fish/guestfish-actions.pod:2687
11527 #: ../fish/guestfish-actions.pod:2689 ../src/guestfs-actions.pod:4097
11529 "Internally libguestfs is implemented by running a virtual machine using "
11534 #: ../fish/guestfish-actions.pod:2692 ../src/guestfs-actions.pod:4100
11536 "You should call this after configuring the handle (eg. adding drives) but "
11537 "before performing any actions."
11541 #: ../fish/guestfish-actions.pod:2695
11546 #: ../fish/guestfish-actions.pod:2697
11549 " lchown owner group path\n"
11554 #: ../fish/guestfish-actions.pod:2699
11556 "Change the file owner to C<owner> and group to C<group>. This is like "
11557 "L</chown> but if C<path> is a symlink then the link itself is changed, not "
11562 #: ../fish/guestfish-actions.pod:2707
11567 #: ../fish/guestfish-actions.pod:2709
11570 " lgetxattr path name\n"
11575 #: ../fish/guestfish-actions.pod:2711 ../src/guestfs-actions.pod:4140
11577 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
11578 "is a symlink, then this call returns an extended attribute from the symlink."
11582 #: ../fish/guestfish-actions.pod:2725
11583 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
11587 #: ../fish/guestfish-actions.pod:2727
11592 #: ../fish/guestfish-actions.pod:2729
11595 " lgetxattrs path\n"
11600 #: ../fish/guestfish-actions.pod:2731
11602 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
11603 "it returns the extended attributes of the link itself."
11607 #: ../fish/guestfish-actions.pod:2735
11612 #: ../fish/guestfish-actions.pod:2737
11620 #: ../fish/guestfish-actions.pod:2739 ../src/guestfs-actions.pod:4183
11622 "List all 9p filesystems attached to the guest. A list of mount tags is "
11627 #: ../fish/guestfish-actions.pod:2742
11628 msgid "list-devices"
11632 #: ../fish/guestfish-actions.pod:2744
11640 #: ../fish/guestfish-actions.pod:2746 ../src/guestfs-actions.pod:4197
11641 msgid "List all the block devices."
11645 #: ../fish/guestfish-actions.pod:2748 ../src/guestfs-actions.pod:4199
11646 msgid "The full block device names are returned, eg. C</dev/sda>."
11650 #: ../fish/guestfish-actions.pod:2752
11651 msgid "list-dm-devices"
11655 #: ../fish/guestfish-actions.pod:2754
11658 " list-dm-devices\n"
11663 #: ../fish/guestfish-actions.pod:2756 ../src/guestfs-actions.pod:4214
11664 msgid "List all device mapper devices."
11668 #: ../fish/guestfish-actions.pod:2758
11670 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
11671 "previous call to L</luks-open>."
11675 #: ../fish/guestfish-actions.pod:2761
11677 "Device mapper devices which correspond to logical volumes are I<not> "
11678 "returned in this list. Call L</lvs> if you want to list logical volumes."
11682 #: ../fish/guestfish-actions.pod:2765
11683 msgid "list-filesystems"
11687 #: ../fish/guestfish-actions.pod:2767
11690 " list-filesystems\n"
11695 #: ../fish/guestfish-actions.pod:2769 ../src/guestfs-actions.pod:4234
11697 "This inspection command looks for filesystems on partitions, block devices "
11698 "and logical volumes, returning a list of devices containing filesystems and "
11703 #: ../fish/guestfish-actions.pod:2773 ../src/guestfs-actions.pod:4238
11705 "The return value is a hash, where the keys are the devices containing "
11706 "filesystems, and the values are the filesystem types. For example:"
11710 #: ../fish/guestfish-actions.pod:2777 ../src/guestfs-actions.pod:4242
11713 " \"/dev/sda1\" => \"ntfs\"\n"
11714 " \"/dev/sda2\" => \"ext2\"\n"
11715 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
11716 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
11721 #: ../fish/guestfish-actions.pod:2782 ../src/guestfs-actions.pod:4247
11723 "The value can have the special value \"unknown\", meaning the content of the "
11724 "device is undetermined or empty. \"swap\" means a Linux swap partition."
11728 #: ../fish/guestfish-actions.pod:2786
11730 "This command runs other libguestfs commands, which might include L</mount> "
11731 "and L</umount>, and therefore you should use this soon after launch and only "
11732 "when nothing is mounted."
11736 #: ../fish/guestfish-actions.pod:2790
11738 "Not all of the filesystems returned will be mountable. In particular, swap "
11739 "partitions are returned in the list. Also this command does not check that "
11740 "each filesystem found is valid and mountable, and some filesystems might be "
11741 "mountable but require special options. Filesystems may not all belong to a "
11742 "single logical operating system (use L</inspect-os> to look for OSes)."
11746 #: ../fish/guestfish-actions.pod:2798
11747 msgid "list-partitions"
11751 #: ../fish/guestfish-actions.pod:2800
11754 " list-partitions\n"
11759 #: ../fish/guestfish-actions.pod:2802 ../src/guestfs-actions.pod:4276
11760 msgid "List all the partitions detected on all block devices."
11764 #: ../fish/guestfish-actions.pod:2804 ../src/guestfs-actions.pod:4278
11765 msgid "The full partition device names are returned, eg. C</dev/sda1>"
11769 #: ../fish/guestfish-actions.pod:2806
11771 "This does not return logical volumes. For that you will need to call "
11776 #: ../fish/guestfish-actions.pod:2811
11781 #: ../fish/guestfish-actions.pod:2813
11789 #: ../fish/guestfish-actions.pod:2815 ../src/guestfs-actions.pod:4297
11791 "List the files in C<directory> (relative to the root directory, there is no "
11792 "cwd) in the format of 'ls -la'."
11796 #: ../fish/guestfish-actions.pod:2818 ../src/guestfs-actions.pod:4300
11798 "This command is mostly useful for interactive sessions. It is I<not> "
11799 "intended that you try to parse the output string."
11803 #: ../fish/guestfish-actions.pod:2821
11808 #: ../fish/guestfish-actions.pod:2823
11811 " ln target linkname\n"
11816 #: ../fish/guestfish-actions.pod:2825 ../src/guestfs-actions.pod:4315
11817 msgid "This command creates a hard link using the C<ln> command."
11821 #: ../fish/guestfish-actions.pod:2827
11826 #: ../fish/guestfish-actions.pod:2829
11829 " ln-f target linkname\n"
11834 #: ../fish/guestfish-actions.pod:2831 ../src/guestfs-actions.pod:4328
11836 "This command creates a hard link using the C<ln -f> command. The I<-f> "
11837 "option removes the link (C<linkname>) if it exists already."
11841 #: ../fish/guestfish-actions.pod:2834
11846 #: ../fish/guestfish-actions.pod:2836
11849 " ln-s target linkname\n"
11854 #: ../fish/guestfish-actions.pod:2838 ../src/guestfs-actions.pod:4342
11855 msgid "This command creates a symbolic link using the C<ln -s> command."
11859 #: ../fish/guestfish-actions.pod:2840
11864 #: ../fish/guestfish-actions.pod:2842
11867 " ln-sf target linkname\n"
11872 #: ../fish/guestfish-actions.pod:2844 ../src/guestfs-actions.pod:4355
11874 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
11875 "option removes the link (C<linkname>) if it exists already."
11879 #: ../fish/guestfish-actions.pod:2847
11880 msgid "lremovexattr"
11884 #: ../fish/guestfish-actions.pod:2849
11887 " lremovexattr xattr path\n"
11892 #: ../fish/guestfish-actions.pod:2851
11894 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
11895 "it removes an extended attribute of the link itself."
11899 #: ../fish/guestfish-actions.pod:2855
11904 #: ../fish/guestfish-actions.pod:2857
11912 #: ../fish/guestfish-actions.pod:2859 ../src/guestfs-actions.pod:4383
11914 "List the files in C<directory> (relative to the root directory, there is no "
11915 "cwd). The '.' and '..' entries are not returned, but hidden files are "
11920 #: ../fish/guestfish-actions.pod:2863
11922 "This command is mostly useful for interactive sessions. Programs should "
11923 "probably use L</readdir> instead."
11927 #: ../fish/guestfish-actions.pod:2866
11932 #: ../fish/guestfish-actions.pod:2868
11935 " lsetxattr xattr val vallen path\n"
11940 #: ../fish/guestfish-actions.pod:2870
11942 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
11943 "sets an extended attribute of the link itself."
11947 #: ../fish/guestfish-actions.pod:2874
11952 #: ../fish/guestfish-actions.pod:2876
11960 #: ../fish/guestfish-actions.pod:2878 ../fish/guestfish-actions.pod:4678 ../src/guestfs-actions.pod:4419 ../src/guestfs-actions.pod:7200
11961 msgid "Returns file information for the given C<path>."
11965 #: ../fish/guestfish-actions.pod:2880
11967 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
11968 "the link is stat-ed, not the file it refers to."
11972 #: ../fish/guestfish-actions.pod:2884 ../src/guestfs-actions.pod:4425
11973 msgid "This is the same as the C<lstat(2)> system call."
11977 #: ../fish/guestfish-actions.pod:2886
11982 #: ../fish/guestfish-actions.pod:2888
11985 " lstatlist path 'names ...'\n"
11990 #: ../fish/guestfish-actions.pod:2890
11992 "This call allows you to perform the L</lstat> operation on multiple files, "
11993 "where all files are in the directory C<path>. C<names> is the list of files "
11994 "from this directory."
11998 #: ../fish/guestfish-actions.pod:2894 ../src/guestfs-actions.pod:4444
12000 "On return you get a list of stat structs, with a one-to-one correspondence "
12001 "to the C<names> list. If any name did not exist or could not be lstat'd, "
12002 "then the C<ino> field of that structure is set to C<-1>."
12006 #: ../fish/guestfish-actions.pod:2899
12008 "This call is intended for programs that want to efficiently list a directory "
12009 "contents without making many round-trips. See also L</lxattrlist> for a "
12010 "similarly efficient call for getting extended attributes. Very long "
12011 "directory listings might cause the protocol message size to be exceeded, "
12012 "causing this call to fail. The caller must split up such requests into "
12013 "smaller groups of names."
12017 #: ../fish/guestfish-actions.pod:2907
12018 msgid "luks-add-key"
12022 #: ../fish/guestfish-actions.pod:2909
12025 " luks-add-key device keyslot\n"
12030 #: ../fish/guestfish-actions.pod:2911 ../src/guestfs-actions.pod:4472
12032 "This command adds a new key on LUKS device C<device>. C<key> is any "
12033 "existing key, and is used to access the device. C<newkey> is the new key to "
12034 "add. C<keyslot> is the key slot that will be replaced."
12038 #: ../fish/guestfish-actions.pod:2916
12040 "Note that if C<keyslot> already contains a key, then this command will "
12041 "fail. You have to use L</luks-kill-slot> first to remove that key."
12045 #: ../fish/guestfish-actions.pod:2920 ../fish/guestfish-actions.pod:2942 ../fish/guestfish-actions.pod:2952 ../fish/guestfish-actions.pod:2963 ../fish/guestfish-actions.pod:2989 ../fish/guestfish-actions.pod:2999
12047 "This command has one or more key or passphrase parameters. Guestfish will "
12048 "prompt for these separately."
12052 #: ../fish/guestfish-actions.pod:2923
12057 #: ../fish/guestfish-actions.pod:2925
12060 " luks-close device\n"
12065 #: ../fish/guestfish-actions.pod:2927
12067 "This closes a LUKS device that was created earlier by L</luks-open> or "
12068 "L</luks-open-ro>. The C<device> parameter must be the name of the LUKS "
12069 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
12070 "underlying block device."
12074 #: ../fish/guestfish-actions.pod:2933
12075 msgid "luks-format"
12079 #: ../fish/guestfish-actions.pod:2935
12082 " luks-format device keyslot\n"
12087 #: ../fish/guestfish-actions.pod:2937 ../src/guestfs-actions.pod:4513
12089 "This command erases existing data on C<device> and formats the device as a "
12090 "LUKS encrypted device. C<key> is the initial key, which is added to key "
12091 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
12095 #: ../fish/guestfish-actions.pod:2945
12096 msgid "luks-format-cipher"
12100 #: ../fish/guestfish-actions.pod:2947
12103 " luks-format-cipher device keyslot cipher\n"
12108 #: ../fish/guestfish-actions.pod:2949
12110 "This command is the same as L</luks-format> but it also allows you to set "
12111 "the C<cipher> used."
12115 #: ../fish/guestfish-actions.pod:2955
12116 msgid "luks-kill-slot"
12120 #: ../fish/guestfish-actions.pod:2957
12123 " luks-kill-slot device keyslot\n"
12128 #: ../fish/guestfish-actions.pod:2959 ../src/guestfs-actions.pod:4554
12130 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
12131 "device C<device>. C<key> must be one of the I<other> keys."
12135 #: ../fish/guestfish-actions.pod:2966
12140 #: ../fish/guestfish-actions.pod:2968
12143 " luks-open device mapname\n"
12148 #: ../fish/guestfish-actions.pod:2970 ../src/guestfs-actions.pod:4574
12150 "This command opens a block device which has been encrypted according to the "
12151 "Linux Unified Key Setup (LUKS) standard."
12155 #: ../fish/guestfish-actions.pod:2973 ../src/guestfs-actions.pod:4577
12156 msgid "C<device> is the encrypted block device or partition."
12160 #: ../fish/guestfish-actions.pod:2975 ../src/guestfs-actions.pod:4579
12162 "The caller must supply one of the keys associated with the LUKS block "
12163 "device, in the C<key> parameter."
12167 #: ../fish/guestfish-actions.pod:2978 ../src/guestfs-actions.pod:4582
12169 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
12170 "writes to this block device are decrypted from and encrypted to the "
12171 "underlying C<device> respectively."
12175 #: ../fish/guestfish-actions.pod:2982
12177 "If this block device contains LVM volume groups, then calling L</vgscan> "
12178 "followed by L</vg-activate-all> will make them visible."
12182 #: ../fish/guestfish-actions.pod:2986
12183 msgid "Use L</list-dm-devices> to list all device mapper devices."
12187 #: ../fish/guestfish-actions.pod:2992
12188 msgid "luks-open-ro"
12192 #: ../fish/guestfish-actions.pod:2994
12195 " luks-open-ro device mapname\n"
12200 #: ../fish/guestfish-actions.pod:2996
12202 "This is the same as L</luks-open> except that a read-only mapping is "
12207 #: ../fish/guestfish-actions.pod:3002
12212 #: ../fish/guestfish-actions.pod:3004
12215 " lvcreate logvol volgroup mbytes\n"
12220 #: ../fish/guestfish-actions.pod:3006 ../src/guestfs-actions.pod:4628
12222 "This creates an LVM logical volume called C<logvol> on the volume group "
12223 "C<volgroup>, with C<size> megabytes."
12227 #: ../fish/guestfish-actions.pod:3009
12228 msgid "lvm-canonical-lv-name"
12232 #: ../fish/guestfish-actions.pod:3011
12235 " lvm-canonical-lv-name lvname\n"
12240 #: ../fish/guestfish-actions.pod:3013 ../src/guestfs-actions.pod:4641
12242 "This converts alternative naming schemes for LVs that you might find to the "
12243 "canonical name. For example, C</dev/mapper/VG-LV> is converted to "
12248 #: ../fish/guestfish-actions.pod:3017 ../src/guestfs-actions.pod:4645
12250 "This command returns an error if the C<lvname> parameter does not refer to a "
12255 #: ../fish/guestfish-actions.pod:3020
12256 msgid "See also L</is-lv>."
12260 #: ../fish/guestfish-actions.pod:3022
12261 msgid "lvm-clear-filter"
12265 #: ../fish/guestfish-actions.pod:3024
12268 " lvm-clear-filter\n"
12273 #: ../fish/guestfish-actions.pod:3026
12275 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
12280 #: ../fish/guestfish-actions.pod:3029 ../fish/guestfish-actions.pod:3057 ../src/guestfs-actions.pod:4663 ../src/guestfs-actions.pod:4702
12281 msgid "This command also clears the LVM cache and performs a volume group scan."
12285 #: ../fish/guestfish-actions.pod:3032
12286 msgid "lvm-remove-all"
12290 #: ../fish/guestfish-actions.pod:3034
12293 " lvm-remove-all\n"
12298 #: ../fish/guestfish-actions.pod:3036 ../src/guestfs-actions.pod:4675
12300 "This command removes all LVM logical volumes, volume groups and physical "
12305 #: ../fish/guestfish-actions.pod:3039
12306 msgid "lvm-set-filter"
12310 #: ../fish/guestfish-actions.pod:3041
12313 " lvm-set-filter 'devices ...'\n"
12318 #: ../fish/guestfish-actions.pod:3043 ../src/guestfs-actions.pod:4688
12320 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
12321 "block devices in the list C<devices>, and will ignore all other attached "
12326 #: ../fish/guestfish-actions.pod:3047 ../src/guestfs-actions.pod:4692
12328 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
12329 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
12330 "there are two types of duplication possible: either cloned PVs/VGs which "
12331 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
12332 "same name. In normal operation you cannot create this situation, but you "
12333 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
12334 "inside the LVM metadata."
12338 #: ../fish/guestfish-actions.pod:3060 ../src/guestfs-actions.pod:4705
12339 msgid "You can filter whole block devices or individual partitions."
12343 #: ../fish/guestfish-actions.pod:3062 ../src/guestfs-actions.pod:4707
12345 "You cannot use this if any VG is currently in use (eg. contains a mounted "
12346 "filesystem), even if you are not filtering out that VG."
12350 #: ../fish/guestfish-actions.pod:3066
12355 #: ../fish/guestfish-actions.pod:3068
12358 " lvremove device\n"
12363 #: ../fish/guestfish-actions.pod:3070 ../src/guestfs-actions.pod:4721
12365 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
12366 "LV, such as C</dev/VG/LV>."
12370 #: ../fish/guestfish-actions.pod:3073 ../src/guestfs-actions.pod:4724
12372 "You can also remove all LVs in a volume group by specifying the VG name, "
12377 #: ../fish/guestfish-actions.pod:3076
12382 #: ../fish/guestfish-actions.pod:3078
12385 " lvrename logvol newlogvol\n"
12390 #: ../fish/guestfish-actions.pod:3080 ../src/guestfs-actions.pod:4738
12391 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
12395 #: ../fish/guestfish-actions.pod:3082
12400 #: ../fish/guestfish-actions.pod:3084
12403 " lvresize device mbytes\n"
12408 #: ../fish/guestfish-actions.pod:3086 ../src/guestfs-actions.pod:4751
12410 "This resizes (expands or shrinks) an existing LVM logical volume to "
12411 "C<mbytes>. When reducing, data in the reduced part is lost."
12415 #: ../fish/guestfish-actions.pod:3090
12416 msgid "lvresize-free"
12420 #: ../fish/guestfish-actions.pod:3092
12423 " lvresize-free lv percent\n"
12428 #: ../fish/guestfish-actions.pod:3094 ../src/guestfs-actions.pod:4766
12430 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
12431 "remaining free space in the volume group. Commonly you would call this with "
12432 "pc = 100 which expands the logical volume as much as possible, using all "
12433 "remaining free space in the volume group."
12437 #: ../fish/guestfish-actions.pod:3100
12442 #: ../fish/guestfish-actions.pod:3102
12450 #: ../fish/guestfish-actions.pod:3104 ../src/guestfs-actions.pod:4781
12452 "List all the logical volumes detected. This is the equivalent of the "
12453 "L<lvs(8)> command."
12457 #: ../fish/guestfish-actions.pod:3107 ../src/guestfs-actions.pod:4784
12459 "This returns a list of the logical volume device names "
12460 "(eg. C</dev/VolGroup00/LogVol00>)."
12464 #: ../fish/guestfish-actions.pod:3110
12465 msgid "See also L</lvs-full>, L</list-filesystems>."
12469 #: ../fish/guestfish-actions.pod:3112
12474 #: ../fish/guestfish-actions.pod:3114
12482 #: ../fish/guestfish-actions.pod:3116 ../src/guestfs-actions.pod:4800
12484 "List all the logical volumes detected. This is the equivalent of the "
12485 "L<lvs(8)> command. The \"full\" version includes all fields."
12489 #: ../fish/guestfish-actions.pod:3119
12494 #: ../fish/guestfish-actions.pod:3121
12502 #: ../fish/guestfish-actions.pod:3123 ../src/guestfs-actions.pod:4815
12503 msgid "This command returns the UUID of the LVM LV C<device>."
12507 #: ../fish/guestfish-actions.pod:3125
12512 #: ../fish/guestfish-actions.pod:3127
12515 " lxattrlist path 'names ...'\n"
12520 #: ../fish/guestfish-actions.pod:3129 ../src/guestfs-actions.pod:4829
12522 "This call allows you to get the extended attributes of multiple files, where "
12523 "all files are in the directory C<path>. C<names> is the list of files from "
12528 #: ../fish/guestfish-actions.pod:3133 ../src/guestfs-actions.pod:4833
12530 "On return you get a flat list of xattr structs which must be interpreted "
12531 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
12532 "C<attrval> in this struct is zero-length to indicate there was an error "
12533 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
12534 "number (the number of following attributes for this file, which could be "
12535 "C<\"0\">). Then after the first xattr struct are the zero or more "
12536 "attributes for the first named file. This repeats for the second and "
12537 "subsequent files."
12541 #: ../fish/guestfish-actions.pod:3143
12543 "This call is intended for programs that want to efficiently list a directory "
12544 "contents without making many round-trips. See also L</lstatlist> for a "
12545 "similarly efficient call for getting standard stats. Very long directory "
12546 "listings might cause the protocol message size to be exceeded, causing this "
12547 "call to fail. The caller must split up such requests into smaller groups of "
12552 #: ../fish/guestfish-actions.pod:3151
12557 #: ../fish/guestfish-actions.pod:3153
12565 #: ../fish/guestfish-actions.pod:3155 ../src/guestfs-actions.pod:4863
12566 msgid "Create a directory named C<path>."
12570 #: ../fish/guestfish-actions.pod:3157
12575 #: ../fish/guestfish-actions.pod:3159
12578 " mkdir-mode path mode\n"
12583 #: ../fish/guestfish-actions.pod:3161 ../src/guestfs-actions.pod:4876
12585 "This command creates a directory, setting the initial permissions of the "
12586 "directory to C<mode>."
12590 #: ../fish/guestfish-actions.pod:3164 ../src/guestfs-actions.pod:4879
12592 "For common Linux filesystems, the actual mode which is set will be C<mode & "
12593 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
12598 #: ../fish/guestfish-actions.pod:3168
12599 msgid "See also L</mkdir>, L</umask>"
12603 #: ../fish/guestfish-actions.pod:3170
12608 #: ../fish/guestfish-actions.pod:3172
12616 #: ../fish/guestfish-actions.pod:3174 ../src/guestfs-actions.pod:4895
12618 "Create a directory named C<path>, creating any parent directories as "
12619 "necessary. This is like the C<mkdir -p> shell command."
12623 #: ../fish/guestfish-actions.pod:3177
12628 #: ../fish/guestfish-actions.pod:3179
12631 " mkdtemp template\n"
12636 #: ../fish/guestfish-actions.pod:3181 ../src/guestfs-actions.pod:4908
12638 "This command creates a temporary directory. The C<template> parameter "
12639 "should be a full pathname for the temporary directory name with the final "
12640 "six characters being \"XXXXXX\"."
12644 #: ../fish/guestfish-actions.pod:3186 ../src/guestfs-actions.pod:4913
12646 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
12647 "being suitable for Windows filesystems."
12651 #: ../fish/guestfish-actions.pod:3189 ../src/guestfs-actions.pod:4916
12652 msgid "The name of the temporary directory that was created is returned."
12656 #: ../fish/guestfish-actions.pod:3192 ../src/guestfs-actions.pod:4919
12657 msgid "The temporary directory is created with mode 0700 and is owned by root."
12661 #: ../fish/guestfish-actions.pod:3195 ../src/guestfs-actions.pod:4922
12663 "The caller is responsible for deleting the temporary directory and its "
12664 "contents after use."
12668 #: ../fish/guestfish-actions.pod:3198 ../src/guestfs-actions.pod:4925
12669 msgid "See also: L<mkdtemp(3)>"
12673 #: ../fish/guestfish-actions.pod:3200
12678 #: ../fish/guestfish-actions.pod:3202
12681 " mke2fs-J fstype blocksize device journal\n"
12686 #: ../fish/guestfish-actions.pod:3204 ../src/guestfs-actions.pod:4941
12688 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12689 "C<journal>. It is equivalent to the command:"
12693 #: ../fish/guestfish-actions.pod:3208 ../src/guestfs-actions.pod:4945
12696 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
12701 #: ../fish/guestfish-actions.pod:3210
12702 msgid "See also L</mke2journal>."
12706 #: ../fish/guestfish-actions.pod:3212
12711 #: ../fish/guestfish-actions.pod:3214
12714 " mke2fs-JL fstype blocksize device label\n"
12719 #: ../fish/guestfish-actions.pod:3216 ../src/guestfs-actions.pod:4962
12721 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12722 "the journal labeled C<label>."
12726 #: ../fish/guestfish-actions.pod:3219
12727 msgid "See also L</mke2journal-L>."
12731 #: ../fish/guestfish-actions.pod:3221
12736 #: ../fish/guestfish-actions.pod:3223
12739 " mke2fs-JU fstype blocksize device uuid\n"
12744 #: ../fish/guestfish-actions.pod:3225 ../src/guestfs-actions.pod:4980
12746 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12747 "the journal with UUID C<uuid>."
12751 #: ../fish/guestfish-actions.pod:3228
12752 msgid "See also L</mke2journal-U>."
12756 #: ../fish/guestfish-actions.pod:3230
12757 msgid "mke2journal"
12761 #: ../fish/guestfish-actions.pod:3232
12764 " mke2journal blocksize device\n"
12769 #: ../fish/guestfish-actions.pod:3234 ../src/guestfs-actions.pod:4996
12771 "This creates an ext2 external journal on C<device>. It is equivalent to the "
12776 #: ../fish/guestfish-actions.pod:3237 ../src/guestfs-actions.pod:4999
12779 " mke2fs -O journal_dev -b blocksize device\n"
12784 #: ../fish/guestfish-actions.pod:3239
12785 msgid "mke2journal-L"
12789 #: ../fish/guestfish-actions.pod:3241
12792 " mke2journal-L blocksize label device\n"
12797 #: ../fish/guestfish-actions.pod:3243 ../src/guestfs-actions.pod:5013
12798 msgid "This creates an ext2 external journal on C<device> with label C<label>."
12802 #: ../fish/guestfish-actions.pod:3245
12803 msgid "mke2journal-U"
12807 #: ../fish/guestfish-actions.pod:3247
12810 " mke2journal-U blocksize uuid device\n"
12815 #: ../fish/guestfish-actions.pod:3249 ../src/guestfs-actions.pod:5027
12816 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
12820 #: ../fish/guestfish-actions.pod:3251
12825 #: ../fish/guestfish-actions.pod:3253
12828 " mkfifo mode path\n"
12833 #: ../fish/guestfish-actions.pod:3255
12835 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
12836 "is just a convenient wrapper around L</mknod>."
12840 #: ../fish/guestfish-actions.pod:3261
12845 #: ../fish/guestfish-actions.pod:3263
12848 " mkfs fstype device\n"
12853 #: ../fish/guestfish-actions.pod:3265 ../src/guestfs-actions.pod:5057
12855 "This creates a filesystem on C<device> (usually a partition or LVM logical "
12856 "volume). The filesystem type is C<fstype>, for example C<ext3>."
12860 #: ../fish/guestfish-actions.pod:3269
12865 #: ../fish/guestfish-actions.pod:3271
12868 " mkfs-b fstype blocksize device\n"
12873 #: ../fish/guestfish-actions.pod:3273
12875 "This call is similar to L</mkfs>, but it allows you to control the block "
12876 "size of the resulting filesystem. Supported block sizes depend on the "
12877 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
12881 #: ../fish/guestfish-actions.pod:3278 ../fish/guestfish-actions.pod:3305 ../src/guestfs-actions.pod:5085 ../src/guestfs-actions.pod:5123
12883 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
12888 #: ../fish/guestfish-actions.pod:3281
12890 "I<This function is deprecated.> In new code, use the L</mkfs_opts> call "
12895 #: ../fish/guestfish-actions.pod:3288
12900 #: ../fish/guestfish-actions.pod:3290
12903 " mkfs-opts fstype device [blocksize:N] [features:..] [inode:N] "
12909 #: ../fish/guestfish-actions.pod:3292 ../src/guestfs-actions.pod:5110
12911 "This function creates a filesystem on C<device>. The filesystem type is "
12912 "C<fstype>, for example C<ext3>."
12916 #: ../fish/guestfish-actions.pod:3299 ../src/guestfs-actions.pod:5117
12917 msgid "C<blocksize>"
12921 #: ../fish/guestfish-actions.pod:3301 ../src/guestfs-actions.pod:5119
12923 "The filesystem block size. Supported block sizes depend on the filesystem "
12924 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
12929 #: ../fish/guestfish-actions.pod:3308 ../src/guestfs-actions.pod:5126
12930 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
12934 #: ../fish/guestfish-actions.pod:3310 ../src/guestfs-actions.pod:5128
12935 msgid "C<features>"
12939 #: ../fish/guestfish-actions.pod:3312 ../src/guestfs-actions.pod:5130
12940 msgid "This passes the I<-O> parameter to the external mkfs program."
12944 #: ../fish/guestfish-actions.pod:3314 ../src/guestfs-actions.pod:5132
12946 "For certain filesystem types, this allows extra filesystem features to be "
12947 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
12951 #: ../fish/guestfish-actions.pod:3318 ../src/guestfs-actions.pod:5136
12953 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
12958 #: ../fish/guestfish-actions.pod:3321 ../src/guestfs-actions.pod:5139
12963 #: ../fish/guestfish-actions.pod:3323 ../src/guestfs-actions.pod:5141
12965 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
12966 "sets the inode size (only for ext2/3/4 filesystems at present)."
12970 #: ../fish/guestfish-actions.pod:3326 ../src/guestfs-actions.pod:5144
12971 msgid "C<sectorsize>"
12975 #: ../fish/guestfish-actions.pod:3328 ../src/guestfs-actions.pod:5146
12977 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
12978 "sets sector size for ufs filesystem."
12982 #: ../fish/guestfish-actions.pod:3335
12983 msgid "mkmountpoint"
12987 #: ../fish/guestfish-actions.pod:3337
12990 " mkmountpoint exemptpath\n"
12995 #: ../fish/guestfish-actions.pod:3339
12997 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
12998 "to create extra mountpoints before mounting the first filesystem."
13002 #: ../fish/guestfish-actions.pod:3343 ../src/guestfs-actions.pod:5189
13004 "These calls are I<only> necessary in some very limited circumstances, mainly "
13005 "the case where you want to mount a mix of unrelated and/or read-only "
13006 "filesystems together."
13010 #: ../fish/guestfish-actions.pod:3347 ../src/guestfs-actions.pod:5193
13012 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
13013 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
13014 "inside that. You can unpack this as follows in guestfish:"
13018 #: ../fish/guestfish-actions.pod:3352 ../src/guestfs-actions.pod:5198
13021 " add-ro Fedora-11-i686-Live.iso\n"
13023 " mkmountpoint /cd\n"
13024 " mkmountpoint /sqsh\n"
13025 " mkmountpoint /ext3fs\n"
13026 " mount /dev/sda /cd\n"
13027 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
13028 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
13033 #: ../fish/guestfish-actions.pod:3361 ../src/guestfs-actions.pod:5207
13034 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
13038 #: ../fish/guestfish-actions.pod:3363
13040 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
13041 "unexpected errors if you try to mix these calls. It is safest to manually "
13042 "unmount filesystems and remove mountpoints after use."
13046 #: ../fish/guestfish-actions.pod:3367
13048 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
13049 "for this to work for manual mountpoints, you must ensure that the innermost "
13050 "mountpoints have the longest pathnames, as in the example code above."
13054 #: ../fish/guestfish-actions.pod:3372 ../src/guestfs-actions.pod:5218
13055 msgid "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
13059 #: ../fish/guestfish-actions.pod:3374
13061 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
13062 "L</umount-all> to be called when the handle is closed which can also trigger "
13067 #: ../fish/guestfish-actions.pod:3378
13072 #: ../fish/guestfish-actions.pod:3380
13075 " mknod mode devmajor devminor path\n"
13080 #: ../fish/guestfish-actions.pod:3382 ../src/guestfs-actions.pod:5237
13082 "This call creates block or character special devices, or named pipes "
13087 #: ../fish/guestfish-actions.pod:3385 ../src/guestfs-actions.pod:5240
13089 "The C<mode> parameter should be the mode, using the standard constants. "
13090 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
13091 "used when creating block and character special devices."
13095 #: ../fish/guestfish-actions.pod:3390
13097 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
13098 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
13099 "regular file). These constants are available in the standard Linux header "
13100 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
13101 "wrappers around this command which bitwise OR in the appropriate constant "
13106 #: ../fish/guestfish-actions.pod:3400
13111 #: ../fish/guestfish-actions.pod:3402
13114 " mknod-b mode devmajor devminor path\n"
13119 #: ../fish/guestfish-actions.pod:3404
13121 "This call creates a block device node called C<path> with mode C<mode> and "
13122 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13123 "wrapper around L</mknod>."
13127 #: ../fish/guestfish-actions.pod:3410
13132 #: ../fish/guestfish-actions.pod:3412
13135 " mknod-c mode devmajor devminor path\n"
13140 #: ../fish/guestfish-actions.pod:3414
13142 "This call creates a char device node called C<path> with mode C<mode> and "
13143 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13144 "wrapper around L</mknod>."
13148 #: ../fish/guestfish-actions.pod:3420
13153 #: ../fish/guestfish-actions.pod:3422
13161 #: ../fish/guestfish-actions.pod:3424 ../src/guestfs-actions.pod:5303
13162 msgid "Create a swap partition on C<device>."
13166 #: ../fish/guestfish-actions.pod:3426
13171 #: ../fish/guestfish-actions.pod:3428
13174 " mkswap-L label device\n"
13179 #: ../fish/guestfish-actions.pod:3430 ../src/guestfs-actions.pod:5316
13180 msgid "Create a swap partition on C<device> with label C<label>."
13184 #: ../fish/guestfish-actions.pod:3432 ../src/guestfs-actions.pod:5318
13186 "Note that you cannot attach a swap label to a block device "
13187 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
13188 "the kernel or swap tools."
13192 #: ../fish/guestfish-actions.pod:3436
13197 #: ../fish/guestfish-actions.pod:3438
13200 " mkswap-U uuid device\n"
13205 #: ../fish/guestfish-actions.pod:3440 ../src/guestfs-actions.pod:5333
13206 msgid "Create a swap partition on C<device> with UUID C<uuid>."
13210 #: ../fish/guestfish-actions.pod:3442
13211 msgid "mkswap-file"
13215 #: ../fish/guestfish-actions.pod:3444
13218 " mkswap-file path\n"
13223 #: ../fish/guestfish-actions.pod:3446 ../src/guestfs-actions.pod:5345
13224 msgid "Create a swap file."
13228 #: ../fish/guestfish-actions.pod:3448
13230 "This command just writes a swap file signature to an existing file. To "
13231 "create the file itself, use something like L</fallocate>."
13235 #: ../fish/guestfish-actions.pod:3451
13240 #: ../fish/guestfish-actions.pod:3453
13243 " modprobe modulename\n"
13248 #: ../fish/guestfish-actions.pod:3455 ../src/guestfs-actions.pod:5360
13249 msgid "This loads a kernel module in the appliance."
13253 #: ../fish/guestfish-actions.pod:3457 ../src/guestfs-actions.pod:5362
13255 "The kernel module must have been whitelisted when libguestfs was built (see "
13256 "C<appliance/kmod.whitelist.in> in the source)."
13260 #: ../fish/guestfish-actions.pod:3460
13265 #: ../fish/guestfish-actions.pod:3462
13268 " mount device mountpoint\n"
13273 #: ../fish/guestfish-actions.pod:3464 ../src/guestfs-actions.pod:5376
13275 "Mount a guest disk at a position in the filesystem. Block devices are named "
13276 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
13277 "those block devices contain partitions, they will have the usual names "
13278 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
13282 #: ../fish/guestfish-actions.pod:3470 ../src/guestfs-actions.pod:5382
13284 "The rules are the same as for L<mount(2)>: A filesystem must first be "
13285 "mounted on C</> before others can be mounted. Other filesystems can only be "
13286 "mounted on directories which already exist."
13290 #: ../fish/guestfish-actions.pod:3475 ../src/guestfs-actions.pod:5387
13292 "The mounted filesystem is writable, if we have sufficient permissions on the "
13293 "underlying device."
13297 #: ../fish/guestfish-actions.pod:3478
13299 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
13300 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
13301 "problems for users. If your program might need to work with older versions "
13302 "of libguestfs, use L</mount-options> instead (using an empty string for the "
13303 "first parameter if you don't want any options)."
13307 #: ../fish/guestfish-actions.pod:3485
13312 #: ../fish/guestfish-actions.pod:3487
13315 " mount-9p mounttag mountpoint [options:..]\n"
13320 #: ../fish/guestfish-actions.pod:3489 ../src/guestfs-actions.pod:5416
13322 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
13327 #: ../fish/guestfish-actions.pod:3492 ../src/guestfs-actions.pod:5419
13329 "If required, C<trans=virtio> will be automatically added to the options. "
13330 "Any other options required can be passed in the optional C<options> "
13335 #: ../fish/guestfish-actions.pod:3498
13340 #: ../fish/guestfish-actions.pod:3500
13343 " mount-loop file mountpoint\n"
13348 #: ../fish/guestfish-actions.pod:3502 ../src/guestfs-actions.pod:5458
13350 "This command lets you mount C<file> (a filesystem image in a file) on a "
13351 "mount point. It is entirely equivalent to the command C<mount -o loop file "
13356 #: ../fish/guestfish-actions.pod:3506
13357 msgid "mount-options"
13361 #: ../fish/guestfish-actions.pod:3508
13364 " mount-options options device mountpoint\n"
13369 #: ../fish/guestfish-actions.pod:3510
13371 "This is the same as the L</mount> command, but it allows you to set the "
13372 "mount options as for the L<mount(8)> I<-o> flag."
13376 #: ../fish/guestfish-actions.pod:3514 ../src/guestfs-actions.pod:5478
13378 "If the C<options> parameter is an empty string, then no options are passed "
13379 "(all options default to whatever the filesystem uses)."
13383 #: ../fish/guestfish-actions.pod:3518
13388 #: ../fish/guestfish-actions.pod:3520
13391 " mount-ro device mountpoint\n"
13396 #: ../fish/guestfish-actions.pod:3522
13398 "This is the same as the L</mount> command, but it mounts the filesystem with "
13399 "the read-only (I<-o ro>) flag."
13403 #: ../fish/guestfish-actions.pod:3525
13408 #: ../fish/guestfish-actions.pod:3527
13411 " mount-vfs options vfstype device mountpoint\n"
13416 #: ../fish/guestfish-actions.pod:3529
13418 "This is the same as the L</mount> command, but it allows you to set both the "
13419 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
13423 #: ../fish/guestfish-actions.pod:3533
13424 msgid "mountpoints"
13428 #: ../fish/guestfish-actions.pod:3535
13436 #: ../fish/guestfish-actions.pod:3537
13438 "This call is similar to L</mounts>. That call returns a list of devices. "
13439 "This one returns a hash table (map) of device name to directory where the "
13440 "device is mounted."
13444 #: ../fish/guestfish-actions.pod:3541
13449 #: ../fish/guestfish-actions.pod:3543
13457 #: ../fish/guestfish-actions.pod:3545 ../src/guestfs-actions.pod:5539
13459 "This returns the list of currently mounted filesystems. It returns the list "
13460 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
13464 #: ../fish/guestfish-actions.pod:3548 ../src/guestfs-actions.pod:5542
13465 msgid "Some internal mounts are not shown."
13469 #: ../fish/guestfish-actions.pod:3550
13470 msgid "See also: L</mountpoints>"
13474 #: ../fish/guestfish-actions.pod:3552
13479 #: ../fish/guestfish-actions.pod:3554
13487 #: ../fish/guestfish-actions.pod:3556 ../src/guestfs-actions.pod:5559
13489 "This moves a file from C<src> to C<dest> where C<dest> is either a "
13490 "destination filename or destination directory."
13494 #: ../fish/guestfish-actions.pod:3559
13495 msgid "ntfs-3g-probe"
13499 #: ../fish/guestfish-actions.pod:3561
13502 " ntfs-3g-probe true|false device\n"
13507 #: ../fish/guestfish-actions.pod:3563 ../src/guestfs-actions.pod:5573
13509 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
13510 "C<device> for mountability. (Not all NTFS volumes can be mounted "
13511 "read-write, and some cannot be mounted at all)."
13515 #: ../fish/guestfish-actions.pod:3567 ../src/guestfs-actions.pod:5577
13517 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
13518 "can be mounted read-write. Set it to false if you want to test if the "
13519 "volume can be mounted read-only."
13523 #: ../fish/guestfish-actions.pod:3571 ../src/guestfs-actions.pod:5581
13525 "The return value is an integer which C<0> if the operation would succeed, or "
13526 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
13530 #: ../fish/guestfish-actions.pod:3575
13535 #: ../fish/guestfish-actions.pod:3577
13538 " ntfsresize device\n"
13543 #: ../fish/guestfish-actions.pod:3579 ../fish/guestfish-actions.pod:3603 ../src/guestfs-actions.pod:5602 ../src/guestfs-actions.pod:5634
13545 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
13546 "size of the underlying device."
13550 #: ../fish/guestfish-actions.pod:3582 ../src/guestfs-actions.pod:5605
13552 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
13553 "consistency check (for safety). You have to boot into Windows to perform "
13554 "this check and clear this condition. Furthermore, ntfsresize refuses to "
13555 "resize filesystems which have been marked in this way. So in effect it is "
13556 "not possible to call ntfsresize multiple times on a single filesystem "
13557 "without booting into Windows between each resize."
13561 #: ../fish/guestfish-actions.pod:3590 ../fish/guestfish-actions.pod:3629 ../src/guestfs-actions.pod:5613 ../src/guestfs-actions.pod:5660
13562 msgid "See also L<ntfsresize(8)>."
13566 #: ../fish/guestfish-actions.pod:3592 ../fish/guestfish-actions.pod:3640
13568 "I<This function is deprecated.> In new code, use the L</ntfsresize_opts> "
13573 #: ../fish/guestfish-actions.pod:3599
13574 msgid "ntfsresize-opts"
13578 #: ../fish/guestfish-actions.pod:3601
13581 " ntfsresize-opts device [size:N] [force:true|false]\n"
13586 #: ../fish/guestfish-actions.pod:3612 ../src/guestfs-actions.pod:5643
13588 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
13589 "resized to fit the container (eg. partition)."
13593 #: ../fish/guestfish-actions.pod:3615 ../src/guestfs-actions.pod:5646
13598 #: ../fish/guestfish-actions.pod:3617 ../src/guestfs-actions.pod:5648
13600 "If this option is true, then force the resize of the filesystem even if the "
13601 "filesystem is marked as requiring a consistency check."
13605 #: ../fish/guestfish-actions.pod:3620
13607 "After the resize operation, the filesystem is always marked as requiring a "
13608 "consistency check (for safety). You have to boot into Windows to perform "
13609 "this check and clear this condition. If you I<don't> set the C<force> "
13610 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
13611 "a single filesystem without booting into Windows between each resize."
13615 #: ../fish/guestfish-actions.pod:3633
13616 msgid "ntfsresize-size"
13620 #: ../fish/guestfish-actions.pod:3635
13623 " ntfsresize-size device size\n"
13628 #: ../fish/guestfish-actions.pod:3637
13630 "This command is the same as L</ntfsresize> except that it allows you to "
13631 "specify the new size (in bytes) explicitly."
13635 #: ../fish/guestfish-actions.pod:3647
13640 #: ../fish/guestfish-actions.pod:3649
13643 " part-add device prlogex startsect endsect\n"
13648 #: ../fish/guestfish-actions.pod:3651
13650 "This command adds a partition to C<device>. If there is no partition table "
13651 "on the device, call L</part-init> first."
13655 #: ../fish/guestfish-actions.pod:3654 ../src/guestfs-actions.pod:5721
13657 "The C<prlogex> parameter is the type of partition. Normally you should pass "
13658 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
13659 "C<logical>) and C<e> (or C<extended>) partition types."
13663 #: ../fish/guestfish-actions.pod:3659 ../src/guestfs-actions.pod:5726
13665 "C<startsect> and C<endsect> are the start and end of the partition in "
13666 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
13667 "from the end of the disk (C<-1> is the last sector)."
13671 #: ../fish/guestfish-actions.pod:3663
13673 "Creating a partition which covers the whole disk is not so easy. Use "
13674 "L</part-disk> to do that."
13678 #: ../fish/guestfish-actions.pod:3666
13683 #: ../fish/guestfish-actions.pod:3668
13686 " part-del device partnum\n"
13691 #: ../fish/guestfish-actions.pod:3670 ../src/guestfs-actions.pod:5744
13692 msgid "This command deletes the partition numbered C<partnum> on C<device>."
13696 #: ../fish/guestfish-actions.pod:3672 ../src/guestfs-actions.pod:5746
13698 "Note that in the case of MBR partitioning, deleting an extended partition "
13699 "also deletes any logical partitions it contains."
13703 #: ../fish/guestfish-actions.pod:3676
13708 #: ../fish/guestfish-actions.pod:3678
13711 " part-disk device parttype\n"
13716 #: ../fish/guestfish-actions.pod:3680
13718 "This command is simply a combination of L</part-init> followed by "
13719 "L</part-add> to create a single primary partition covering the whole disk."
13723 #: ../fish/guestfish-actions.pod:3684
13725 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
13726 "possible values are described in L</part-init>."
13730 #: ../fish/guestfish-actions.pod:3687
13731 msgid "part-get-bootable"
13735 #: ../fish/guestfish-actions.pod:3689
13738 " part-get-bootable device partnum\n"
13743 #: ../fish/guestfish-actions.pod:3691 ../src/guestfs-actions.pod:5779
13745 "This command returns true if the partition C<partnum> on C<device> has the "
13746 "bootable flag set."
13750 #: ../fish/guestfish-actions.pod:3694
13751 msgid "See also L</part-set-bootable>."
13755 #: ../fish/guestfish-actions.pod:3696
13756 msgid "part-get-mbr-id"
13760 #: ../fish/guestfish-actions.pod:3698
13763 " part-get-mbr-id device partnum\n"
13768 #: ../fish/guestfish-actions.pod:3700 ../src/guestfs-actions.pod:5795
13770 "Returns the MBR type byte (also known as the ID byte) from the numbered "
13771 "partition C<partnum>."
13775 #: ../fish/guestfish-actions.pod:3703 ../fish/guestfish-actions.pod:3847
13777 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
13778 "undefined results for other partition table types (see "
13779 "L</part-get-parttype>)."
13783 #: ../fish/guestfish-actions.pod:3707
13784 msgid "part-get-parttype"
13788 #: ../fish/guestfish-actions.pod:3709
13791 " part-get-parttype device\n"
13796 #: ../fish/guestfish-actions.pod:3711 ../src/guestfs-actions.pod:5812
13798 "This command examines the partition table on C<device> and returns the "
13799 "partition table type (format) being used."
13803 #: ../fish/guestfish-actions.pod:3714
13805 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
13806 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
13807 "possible, although unusual. See L</part-init> for a full list."
13811 #: ../fish/guestfish-actions.pod:3719
13816 #: ../fish/guestfish-actions.pod:3721
13819 " part-init device parttype\n"
13824 #: ../fish/guestfish-actions.pod:3723 ../src/guestfs-actions.pod:5832
13826 "This creates an empty partition table on C<device> of one of the partition "
13827 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
13828 "(for large disks)."
13832 #: ../fish/guestfish-actions.pod:3727
13834 "Initially there are no partitions. Following this, you should call "
13835 "L</part-add> for each partition required."
13839 #: ../fish/guestfish-actions.pod:3730 ../src/guestfs-actions.pod:5839
13840 msgid "Possible values for C<parttype> are:"
13844 #: ../fish/guestfish-actions.pod:3734 ../src/guestfs-actions.pod:5843
13849 #: ../fish/guestfish-actions.pod:3736 ../src/guestfs-actions.pod:5845
13854 #: ../fish/guestfish-actions.pod:3738 ../src/guestfs-actions.pod:5847
13855 msgid "Intel EFI / GPT partition table."
13859 #: ../fish/guestfish-actions.pod:3740 ../src/guestfs-actions.pod:5849
13861 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
13862 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
13863 "the C<mbr> format."
13867 #: ../fish/guestfish-actions.pod:3744 ../src/guestfs-actions.pod:5853
13872 #: ../fish/guestfish-actions.pod:3746 ../src/guestfs-actions.pod:5855
13877 #: ../fish/guestfish-actions.pod:3748 ../src/guestfs-actions.pod:5857
13879 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
13880 "Windows. This partition type will B<only> work for device sizes up to 2 "
13881 "TB. For large disks we recommend using C<gpt>."
13885 #: ../fish/guestfish-actions.pod:3755 ../src/guestfs-actions.pod:5864
13886 msgid "Other partition table types that may work but are not supported include:"
13890 #: ../fish/guestfish-actions.pod:3760 ../src/guestfs-actions.pod:5869
13895 #: ../fish/guestfish-actions.pod:3762 ../src/guestfs-actions.pod:5871
13896 msgid "AIX disk labels."
13900 #: ../fish/guestfish-actions.pod:3764 ../src/guestfs-actions.pod:5873
13905 #: ../fish/guestfish-actions.pod:3766 ../src/guestfs-actions.pod:5875
13910 #: ../fish/guestfish-actions.pod:3768 ../src/guestfs-actions.pod:5877
13911 msgid "Amiga \"Rigid Disk Block\" format."
13915 #: ../fish/guestfish-actions.pod:3770 ../src/guestfs-actions.pod:5879
13920 #: ../fish/guestfish-actions.pod:3772 ../src/guestfs-actions.pod:5881
13921 msgid "BSD disk labels."
13925 #: ../fish/guestfish-actions.pod:3774 ../src/guestfs-actions.pod:5883
13930 #: ../fish/guestfish-actions.pod:3776 ../src/guestfs-actions.pod:5885
13931 msgid "DASD, used on IBM mainframes."
13935 #: ../fish/guestfish-actions.pod:3778 ../src/guestfs-actions.pod:5887
13940 #: ../fish/guestfish-actions.pod:3780 ../src/guestfs-actions.pod:5889
13941 msgid "MIPS/SGI volumes."
13945 #: ../fish/guestfish-actions.pod:3782 ../src/guestfs-actions.pod:5891
13950 #: ../fish/guestfish-actions.pod:3784 ../src/guestfs-actions.pod:5893
13951 msgid "Old Mac partition format. Modern Macs use C<gpt>."
13955 #: ../fish/guestfish-actions.pod:3786 ../src/guestfs-actions.pod:5895
13960 #: ../fish/guestfish-actions.pod:3788 ../src/guestfs-actions.pod:5897
13961 msgid "NEC PC-98 format, common in Japan apparently."
13965 #: ../fish/guestfish-actions.pod:3790 ../src/guestfs-actions.pod:5899
13970 #: ../fish/guestfish-actions.pod:3792 ../src/guestfs-actions.pod:5901
13971 msgid "Sun disk labels."
13975 #: ../fish/guestfish-actions.pod:3796
13980 #: ../fish/guestfish-actions.pod:3798
13983 " part-list device\n"
13988 #: ../fish/guestfish-actions.pod:3800 ../src/guestfs-actions.pod:5915
13990 "This command parses the partition table on C<device> and returns the list of "
13991 "partitions found."
13995 #: ../fish/guestfish-actions.pod:3803 ../src/guestfs-actions.pod:5918
13996 msgid "The fields in the returned structure are:"
14000 #: ../fish/guestfish-actions.pod:3807 ../src/guestfs-actions.pod:5922
14001 msgid "B<part_num>"
14005 #: ../fish/guestfish-actions.pod:3809 ../src/guestfs-actions.pod:5924
14006 msgid "Partition number, counting from 1."
14010 #: ../fish/guestfish-actions.pod:3811 ../src/guestfs-actions.pod:5926
14011 msgid "B<part_start>"
14015 #: ../fish/guestfish-actions.pod:3813
14017 "Start of the partition I<in bytes>. To get sectors you have to divide by "
14018 "the device's sector size, see L</blockdev-getss>."
14022 #: ../fish/guestfish-actions.pod:3816 ../src/guestfs-actions.pod:5931
14023 msgid "B<part_end>"
14027 #: ../fish/guestfish-actions.pod:3818 ../src/guestfs-actions.pod:5933
14028 msgid "End of the partition in bytes."
14032 #: ../fish/guestfish-actions.pod:3820 ../src/guestfs-actions.pod:5935
14033 msgid "B<part_size>"
14037 #: ../fish/guestfish-actions.pod:3822 ../src/guestfs-actions.pod:5937
14038 msgid "Size of the partition in bytes."
14042 #: ../fish/guestfish-actions.pod:3826
14043 msgid "part-set-bootable"
14047 #: ../fish/guestfish-actions.pod:3828
14050 " part-set-bootable device partnum true|false\n"
14055 #: ../fish/guestfish-actions.pod:3830 ../src/guestfs-actions.pod:5955
14057 "This sets the bootable flag on partition numbered C<partnum> on device "
14058 "C<device>. Note that partitions are numbered from 1."
14062 #: ../fish/guestfish-actions.pod:3833 ../src/guestfs-actions.pod:5958
14064 "The bootable flag is used by some operating systems (notably Windows) to "
14065 "determine which partition to boot from. It is by no means universally "
14070 #: ../fish/guestfish-actions.pod:3837
14071 msgid "part-set-mbr-id"
14075 #: ../fish/guestfish-actions.pod:3839
14078 " part-set-mbr-id device partnum idbyte\n"
14083 #: ../fish/guestfish-actions.pod:3841 ../src/guestfs-actions.pod:5974
14085 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
14086 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
14087 "documentation are in fact hexadecimal numbers, but usually documented "
14088 "without any leading \"0x\" which might be confusing."
14092 #: ../fish/guestfish-actions.pod:3851
14093 msgid "part-set-name"
14097 #: ../fish/guestfish-actions.pod:3853
14100 " part-set-name device partnum name\n"
14105 #: ../fish/guestfish-actions.pod:3855 ../src/guestfs-actions.pod:5996
14107 "This sets the partition name on partition numbered C<partnum> on device "
14108 "C<device>. Note that partitions are numbered from 1."
14112 #: ../fish/guestfish-actions.pod:3858 ../src/guestfs-actions.pod:5999
14114 "The partition name can only be set on certain types of partition table. "
14115 "This works on C<gpt> but not on C<mbr> partitions."
14119 #: ../fish/guestfish-actions.pod:3861
14120 msgid "part-to-dev"
14124 #: ../fish/guestfish-actions.pod:3863
14127 " part-to-dev partition\n"
14132 #: ../fish/guestfish-actions.pod:3865 ../src/guestfs-actions.pod:6012
14134 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
14135 "partition number, returning the device name (eg. \"/dev/sdb\")."
14139 #: ../fish/guestfish-actions.pod:3869 ../fish/guestfish-actions.pod:3881
14141 "The named partition must exist, for example as a string returned from "
14142 "L</list-partitions>."
14146 #: ../fish/guestfish-actions.pod:3872
14147 msgid "See also L</part-to-partnum>."
14151 #: ../fish/guestfish-actions.pod:3874
14152 msgid "part-to-partnum"
14156 #: ../fish/guestfish-actions.pod:3876
14159 " part-to-partnum partition\n"
14164 #: ../fish/guestfish-actions.pod:3878 ../src/guestfs-actions.pod:6032
14166 "This function takes a partition name (eg. \"/dev/sdb1\") and returns the "
14167 "partition number (eg. C<1>)."
14171 #: ../fish/guestfish-actions.pod:3884
14172 msgid "See also L</part-to-dev>."
14176 #: ../fish/guestfish-actions.pod:3886
14177 msgid "ping-daemon"
14181 #: ../fish/guestfish-actions.pod:3888
14189 #: ../fish/guestfish-actions.pod:3890 ../src/guestfs-actions.pod:6049
14191 "This is a test probe into the guestfs daemon running inside the qemu "
14192 "subprocess. Calling this function checks that the daemon responds to the "
14193 "ping message, without affecting the daemon or attached block device(s) in "
14198 #: ../fish/guestfish-actions.pod:3895
14203 #: ../fish/guestfish-actions.pod:3897
14206 " pread path count offset\n"
14211 #: ../fish/guestfish-actions.pod:3899 ../src/guestfs-actions.pod:6067
14213 "This command lets you read part of a file. It reads C<count> bytes of the "
14214 "file, starting at C<offset>, from file C<path>."
14218 #: ../fish/guestfish-actions.pod:3902 ../fish/guestfish-actions.pod:3917 ../src/guestfs-actions.pod:6070 ../src/guestfs-actions.pod:6096
14220 "This may read fewer bytes than requested. For further details see the "
14221 "L<pread(2)> system call."
14225 #: ../fish/guestfish-actions.pod:3905
14226 msgid "See also L</pwrite>, L</pread-device>."
14230 #: ../fish/guestfish-actions.pod:3910
14231 msgid "pread-device"
14235 #: ../fish/guestfish-actions.pod:3912
14238 " pread-device device count offset\n"
14243 #: ../fish/guestfish-actions.pod:3914 ../src/guestfs-actions.pod:6093
14245 "This command lets you read part of a file. It reads C<count> bytes of "
14246 "C<device>, starting at C<offset>."
14250 #: ../fish/guestfish-actions.pod:3920
14251 msgid "See also L</pread>."
14255 #: ../fish/guestfish-actions.pod:3925
14260 #: ../fish/guestfish-actions.pod:3927
14263 " pvcreate device\n"
14268 #: ../fish/guestfish-actions.pod:3929 ../src/guestfs-actions.pod:6116
14270 "This creates an LVM physical volume on the named C<device>, where C<device> "
14271 "should usually be a partition name such as C</dev/sda1>."
14275 #: ../fish/guestfish-actions.pod:3933
14280 #: ../fish/guestfish-actions.pod:3935
14283 " pvremove device\n"
14288 #: ../fish/guestfish-actions.pod:3937 ../src/guestfs-actions.pod:6130
14290 "This wipes a physical volume C<device> so that LVM will no longer recognise "
14295 #: ../fish/guestfish-actions.pod:3940 ../src/guestfs-actions.pod:6133
14297 "The implementation uses the C<pvremove> command which refuses to wipe "
14298 "physical volumes that contain any volume groups, so you have to remove those "
14303 #: ../fish/guestfish-actions.pod:3944
14308 #: ../fish/guestfish-actions.pod:3946
14311 " pvresize device\n"
14316 #: ../fish/guestfish-actions.pod:3948 ../src/guestfs-actions.pod:6147
14318 "This resizes (expands or shrinks) an existing LVM physical volume to match "
14319 "the new size of the underlying device."
14323 #: ../fish/guestfish-actions.pod:3951
14324 msgid "pvresize-size"
14328 #: ../fish/guestfish-actions.pod:3953
14331 " pvresize-size device size\n"
14336 #: ../fish/guestfish-actions.pod:3955
14338 "This command is the same as L</pvresize> except that it allows you to "
14339 "specify the new size (in bytes) explicitly."
14343 #: ../fish/guestfish-actions.pod:3958
14348 #: ../fish/guestfish-actions.pod:3960
14356 #: ../fish/guestfish-actions.pod:3962 ../src/guestfs-actions.pod:6173
14358 "List all the physical volumes detected. This is the equivalent of the "
14359 "L<pvs(8)> command."
14363 #: ../fish/guestfish-actions.pod:3965 ../src/guestfs-actions.pod:6176
14365 "This returns a list of just the device names that contain PVs "
14366 "(eg. C</dev/sda2>)."
14370 #: ../fish/guestfish-actions.pod:3968
14371 msgid "See also L</pvs-full>."
14375 #: ../fish/guestfish-actions.pod:3970
14380 #: ../fish/guestfish-actions.pod:3972
14388 #: ../fish/guestfish-actions.pod:3974 ../src/guestfs-actions.pod:6192
14390 "List all the physical volumes detected. This is the equivalent of the "
14391 "L<pvs(8)> command. The \"full\" version includes all fields."
14395 #: ../fish/guestfish-actions.pod:3977
14400 #: ../fish/guestfish-actions.pod:3979
14408 #: ../fish/guestfish-actions.pod:3981 ../src/guestfs-actions.pod:6207
14409 msgid "This command returns the UUID of the LVM PV C<device>."
14413 #: ../fish/guestfish-actions.pod:3983
14418 #: ../fish/guestfish-actions.pod:3985
14421 " pwrite path content offset\n"
14426 #: ../fish/guestfish-actions.pod:3987 ../src/guestfs-actions.pod:6223
14428 "This command writes to part of a file. It writes the data buffer C<content> "
14429 "to the file C<path> starting at offset C<offset>."
14433 #: ../fish/guestfish-actions.pod:3990 ../src/guestfs-actions.pod:6226
14435 "This command implements the L<pwrite(2)> system call, and like that system "
14436 "call it may not write the full data requested. The return value is the "
14437 "number of bytes that were actually written to the file. This could even be "
14438 "0, although short writes are unlikely for regular files in ordinary "
14443 #: ../fish/guestfish-actions.pod:3996
14444 msgid "See also L</pread>, L</pwrite-device>."
14448 #: ../fish/guestfish-actions.pod:4001
14449 msgid "pwrite-device"
14453 #: ../fish/guestfish-actions.pod:4003
14456 " pwrite-device device content offset\n"
14461 #: ../fish/guestfish-actions.pod:4005 ../src/guestfs-actions.pod:6250
14463 "This command writes to part of a device. It writes the data buffer "
14464 "C<content> to C<device> starting at offset C<offset>."
14468 #: ../fish/guestfish-actions.pod:4008 ../src/guestfs-actions.pod:6253
14470 "This command implements the L<pwrite(2)> system call, and like that system "
14471 "call it may not write the full data requested (although short writes to disk "
14472 "devices and partitions are probably impossible with standard Linux kernels)."
14476 #: ../fish/guestfish-actions.pod:4013
14477 msgid "See also L</pwrite>."
14481 #: ../fish/guestfish-actions.pod:4018
14486 #: ../fish/guestfish-actions.pod:4020
14489 " read-file path\n"
14494 #: ../fish/guestfish-actions.pod:4022 ../src/guestfs-actions.pod:6274
14495 msgid "This calls returns the contents of the file C<path> as a buffer."
14499 #: ../fish/guestfish-actions.pod:4025
14501 "Unlike L</cat>, this function can correctly handle files that contain "
14502 "embedded ASCII NUL characters. However unlike L</download>, this function "
14503 "is limited in the total size of file that can be handled."
14507 #: ../fish/guestfish-actions.pod:4033
14512 #: ../fish/guestfish-actions.pod:4035
14515 " read-lines path\n"
14520 #: ../fish/guestfish-actions.pod:4039 ../src/guestfs-actions.pod:6299
14522 "The file contents are returned as a list of lines. Trailing C<LF> and "
14523 "C<CRLF> character sequences are I<not> returned."
14527 #: ../fish/guestfish-actions.pod:4042
14529 "Note that this function cannot correctly handle binary files (specifically, "
14530 "files containing C<\\0> character which is treated as end of line). For "
14531 "those you need to use the L</read-file> function which has a more complex "
14536 #: ../fish/guestfish-actions.pod:4047
14541 #: ../fish/guestfish-actions.pod:4049
14549 #: ../fish/guestfish-actions.pod:4051 ../src/guestfs-actions.pod:6319
14550 msgid "This returns the list of directory entries in directory C<dir>."
14554 #: ../fish/guestfish-actions.pod:4053 ../src/guestfs-actions.pod:6321
14556 "All entries in the directory are returned, including C<.> and C<..>. The "
14557 "entries are I<not> sorted, but returned in the same order as the underlying "
14562 #: ../fish/guestfish-actions.pod:4057 ../src/guestfs-actions.pod:6325
14564 "Also this call returns basic file type information about each file. The "
14565 "C<ftyp> field will contain one of the following characters:"
14569 #: ../fish/guestfish-actions.pod:4062 ../src/guestfs-actions.pod:6330
14574 #: ../fish/guestfish-actions.pod:4064 ../src/guestfs-actions.pod:6332
14575 msgid "Block special"
14579 #: ../fish/guestfish-actions.pod:4066 ../src/guestfs-actions.pod:6334
14584 #: ../fish/guestfish-actions.pod:4068 ../src/guestfs-actions.pod:6336
14585 msgid "Char special"
14589 #: ../fish/guestfish-actions.pod:4070 ../src/guestfs-actions.pod:6338
14594 #: ../fish/guestfish-actions.pod:4072 ../src/guestfs-actions.pod:6340
14599 #: ../fish/guestfish-actions.pod:4074 ../src/guestfs-actions.pod:6342
14604 #: ../fish/guestfish-actions.pod:4076 ../src/guestfs-actions.pod:6344
14605 msgid "FIFO (named pipe)"
14609 #: ../fish/guestfish-actions.pod:4078 ../src/guestfs-actions.pod:6346
14614 #: ../fish/guestfish-actions.pod:4080 ../src/guestfs-actions.pod:6348
14615 msgid "Symbolic link"
14619 #: ../fish/guestfish-actions.pod:4082 ../src/guestfs-actions.pod:6350
14624 #: ../fish/guestfish-actions.pod:4084 ../src/guestfs-actions.pod:6352
14625 msgid "Regular file"
14629 #: ../fish/guestfish-actions.pod:4086 ../src/guestfs-actions.pod:6354
14634 #: ../fish/guestfish-actions.pod:4088 ../src/guestfs-actions.pod:6356
14639 #: ../fish/guestfish-actions.pod:4090 ../src/guestfs-actions.pod:6358
14644 #: ../fish/guestfish-actions.pod:4092 ../src/guestfs-actions.pod:6360
14645 msgid "Unknown file type"
14649 #: ../fish/guestfish-actions.pod:4094 ../src/guestfs-actions.pod:6362
14654 #: ../fish/guestfish-actions.pod:4096 ../src/guestfs-actions.pod:6364
14655 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
14659 #: ../fish/guestfish-actions.pod:4101
14661 "This function is primarily intended for use by programs. To get a simple "
14662 "list of names, use L</ls>. To get a printable directory for human "
14663 "consumption, use L</ll>."
14667 #: ../fish/guestfish-actions.pod:4105
14672 #: ../fish/guestfish-actions.pod:4107
14680 #: ../fish/guestfish-actions.pod:4109 ../src/guestfs-actions.pod:6385
14681 msgid "This command reads the target of a symbolic link."
14685 #: ../fish/guestfish-actions.pod:4111
14686 msgid "readlinklist"
14690 #: ../fish/guestfish-actions.pod:4113
14693 " readlinklist path 'names ...'\n"
14698 #: ../fish/guestfish-actions.pod:4115 ../src/guestfs-actions.pod:6399
14700 "This call allows you to do a C<readlink> operation on multiple files, where "
14701 "all files are in the directory C<path>. C<names> is the list of files from "
14706 #: ../fish/guestfish-actions.pod:4119 ../src/guestfs-actions.pod:6403
14708 "On return you get a list of strings, with a one-to-one correspondence to the "
14709 "C<names> list. Each string is the value of the symbolic link."
14713 #: ../fish/guestfish-actions.pod:4123 ../src/guestfs-actions.pod:6407
14715 "If the C<readlink(2)> operation fails on any name, then the corresponding "
14716 "result string is the empty string C<\"\">. However the whole operation is "
14717 "completed even if there were C<readlink(2)> errors, and so you can call this "
14718 "function with names where you don't know if they are symbolic links already "
14719 "(albeit slightly less efficient)."
14723 #: ../fish/guestfish-actions.pod:4130 ../src/guestfs-actions.pod:6414
14725 "This call is intended for programs that want to efficiently list a directory "
14726 "contents without making many round-trips. Very long directory listings "
14727 "might cause the protocol message size to be exceeded, causing this call to "
14728 "fail. The caller must split up such requests into smaller groups of names."
14732 #: ../fish/guestfish-actions.pod:4137
14737 #: ../fish/guestfish-actions.pod:4139
14745 #: ../fish/guestfish-actions.pod:4141 ../src/guestfs-actions.pod:6433
14747 "Return the canonicalized absolute pathname of C<path>. The returned path "
14748 "has no C<.>, C<..> or symbolic link path elements."
14752 #: ../fish/guestfish-actions.pod:4144
14753 msgid "removexattr"
14757 #: ../fish/guestfish-actions.pod:4146
14760 " removexattr xattr path\n"
14765 #: ../fish/guestfish-actions.pod:4148 ../src/guestfs-actions.pod:6448
14766 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
14770 #: ../fish/guestfish-actions.pod:4151
14771 msgid "See also: L</lremovexattr>, L<attr(5)>."
14775 #: ../fish/guestfish-actions.pod:4153
14780 #: ../fish/guestfish-actions.pod:4155
14783 " resize2fs device\n"
14788 #: ../fish/guestfish-actions.pod:4157 ../src/guestfs-actions.pod:6463
14790 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
14791 "underlying device."
14795 #: ../fish/guestfish-actions.pod:4160
14797 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
14798 "before calling this command. For unknown reasons C<resize2fs> sometimes "
14799 "gives an error about this and sometimes not. In any case, it is always safe "
14800 "to call L</e2fsck-f> before calling this function."
14804 #: ../fish/guestfish-actions.pod:4166
14805 msgid "resize2fs-M"
14809 #: ../fish/guestfish-actions.pod:4168
14812 " resize2fs-M device\n"
14817 #: ../fish/guestfish-actions.pod:4170
14819 "This command is the same as L</resize2fs>, but the filesystem is resized to "
14820 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
14825 #: ../fish/guestfish-actions.pod:4174
14827 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
14828 "and read the C<Block size> and C<Block count> values. These two numbers, "
14829 "multiplied together, give the resulting size of the minimal filesystem in "
14834 #: ../fish/guestfish-actions.pod:4179
14835 msgid "resize2fs-size"
14839 #: ../fish/guestfish-actions.pod:4181
14842 " resize2fs-size device size\n"
14847 #: ../fish/guestfish-actions.pod:4183
14849 "This command is the same as L</resize2fs> except that it allows you to "
14850 "specify the new size (in bytes) explicitly."
14854 #: ../fish/guestfish-actions.pod:4186
14859 #: ../fish/guestfish-actions.pod:4188
14867 #: ../fish/guestfish-actions.pod:4190 ../src/guestfs-actions.pod:6515
14868 msgid "Remove the single file C<path>."
14872 #: ../fish/guestfish-actions.pod:4192
14877 #: ../fish/guestfish-actions.pod:4194
14885 #: ../fish/guestfish-actions.pod:4196 ../src/guestfs-actions.pod:6527
14887 "Remove the file or directory C<path>, recursively removing the contents if "
14888 "its a directory. This is like the C<rm -rf> shell command."
14892 #: ../fish/guestfish-actions.pod:4200
14897 #: ../fish/guestfish-actions.pod:4202
14905 #: ../fish/guestfish-actions.pod:4204 ../src/guestfs-actions.pod:6541
14906 msgid "Remove the single directory C<path>."
14910 #: ../fish/guestfish-actions.pod:4206
14911 msgid "rmmountpoint"
14915 #: ../fish/guestfish-actions.pod:4208
14918 " rmmountpoint exemptpath\n"
14923 #: ../fish/guestfish-actions.pod:4210
14925 "This calls removes a mountpoint that was previously created with "
14926 "L</mkmountpoint>. See L</mkmountpoint> for full details."
14930 #: ../fish/guestfish-actions.pod:4214
14931 msgid "scrub-device"
14935 #: ../fish/guestfish-actions.pod:4216
14938 " scrub-device device\n"
14943 #: ../fish/guestfish-actions.pod:4218 ../src/guestfs-actions.pod:6567
14945 "This command writes patterns over C<device> to make data retrieval more "
14950 #: ../fish/guestfish-actions.pod:4221 ../fish/guestfish-actions.pod:4233 ../fish/guestfish-actions.pod:4246 ../src/guestfs-actions.pod:6570 ../src/guestfs-actions.pod:6588 ../src/guestfs-actions.pod:6607
14952 "It is an interface to the L<scrub(1)> program. See that manual page for "
14957 #: ../fish/guestfish-actions.pod:4224
14962 #: ../fish/guestfish-actions.pod:4226
14965 " scrub-file file\n"
14970 #: ../fish/guestfish-actions.pod:4228 ../src/guestfs-actions.pod:6583
14972 "This command writes patterns over a file to make data retrieval more "
14977 #: ../fish/guestfish-actions.pod:4231 ../src/guestfs-actions.pod:6586
14978 msgid "The file is I<removed> after scrubbing."
14982 #: ../fish/guestfish-actions.pod:4236
14983 msgid "scrub-freespace"
14987 #: ../fish/guestfish-actions.pod:4238
14990 " scrub-freespace dir\n"
14995 #: ../fish/guestfish-actions.pod:4240
14997 "This command creates the directory C<dir> and then fills it with files until "
14998 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
14999 "deletes them. The intention is to scrub any free space on the partition "
15000 "containing C<dir>."
15004 #: ../fish/guestfish-actions.pod:4249
15009 #: ../fish/guestfish-actions.pod:4251
15014 #: ../fish/guestfish-actions.pod:4253
15017 " set-append append\n"
15022 #: ../fish/guestfish-actions.pod:4255 ../src/guestfs-actions.pod:6620
15024 "This function is used to add additional options to the guest kernel command "
15029 #: ../fish/guestfish-actions.pod:4258 ../src/guestfs-actions.pod:6623
15031 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
15032 "environment variable."
15036 #: ../fish/guestfish-actions.pod:4261 ../src/guestfs-actions.pod:6626
15038 "Setting C<append> to C<NULL> means I<no> additional options are passed "
15039 "(libguestfs always adds a few of its own)."
15043 #: ../fish/guestfish-actions.pod:4264
15044 msgid "set-attach-method"
15048 #: ../fish/guestfish-actions.pod:4266
15049 msgid "attach-method"
15053 #: ../fish/guestfish-actions.pod:4268
15056 " set-attach-method attachmethod\n"
15061 #: ../fish/guestfish-actions.pod:4270 ../src/guestfs-actions.pod:6639
15063 "Set the method that libguestfs uses to connect to the back end guestfsd "
15064 "daemon. Possible methods are:"
15068 #: ../fish/guestfish-actions.pod:4275 ../src/guestfs-actions.pod:6644 ../src/guestfs.pod:2916
15069 msgid "C<appliance>"
15073 #: ../fish/guestfish-actions.pod:4277 ../src/guestfs-actions.pod:6646
15075 "Launch an appliance and connect to it. This is the ordinary method and the "
15080 #: ../fish/guestfish-actions.pod:4280 ../src/guestfs-actions.pod:6649
15081 msgid "C<unix:I<path>>"
15085 #: ../fish/guestfish-actions.pod:4282 ../src/guestfs-actions.pod:6651
15086 msgid "Connect to the Unix domain socket I<path>."
15090 #: ../fish/guestfish-actions.pod:4284 ../src/guestfs-actions.pod:6653
15092 "This method lets you connect to an existing daemon or (using virtio-serial) "
15093 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
15094 "RUNNING DAEMONS>."
15098 #: ../fish/guestfish-actions.pod:4290
15099 msgid "set-autosync"
15103 #: ../fish/guestfish-actions.pod:4292
15108 #: ../fish/guestfish-actions.pod:4294
15111 " set-autosync true|false\n"
15116 #: ../fish/guestfish-actions.pod:4296 ../src/guestfs-actions.pod:6669
15118 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
15119 "effort attempt to make filesystems consistent and synchronized when the "
15120 "handle is closed (also if the program exits without closing handles)."
15124 #: ../fish/guestfish-actions.pod:4301 ../src/guestfs-actions.pod:6674
15126 "This is enabled by default (since libguestfs 1.5.24, previously it was "
15127 "disabled by default)."
15131 #: ../fish/guestfish-actions.pod:4304
15136 #: ../fish/guestfish-actions.pod:4306
15141 #: ../fish/guestfish-actions.pod:4308
15144 " set-direct true|false\n"
15149 #: ../fish/guestfish-actions.pod:4310 ../src/guestfs-actions.pod:6687
15151 "If the direct appliance mode flag is enabled, then stdin and stdout are "
15152 "passed directly through to the appliance once it is launched."
15156 #: ../fish/guestfish-actions.pod:4314
15158 "One consequence of this is that log messages aren't caught by the library "
15159 "and handled by L</set-log-message-callback>, but go straight to stdout."
15163 #: ../fish/guestfish-actions.pod:4318 ../src/guestfs-actions.pod:6695
15164 msgid "You probably don't want to use this unless you know what you are doing."
15168 #: ../fish/guestfish-actions.pod:4321 ../src/guestfs-actions.pod:6698
15169 msgid "The default is disabled."
15173 #: ../fish/guestfish-actions.pod:4323
15174 msgid "set-e2label"
15178 #: ../fish/guestfish-actions.pod:4325
15181 " set-e2label device label\n"
15186 #: ../fish/guestfish-actions.pod:4327 ../src/guestfs-actions.pod:6711
15188 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
15189 "C<label>. Filesystem labels are limited to 16 characters."
15193 #: ../fish/guestfish-actions.pod:4331
15195 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
15196 "label on a filesystem."
15200 #: ../fish/guestfish-actions.pod:4334
15205 #: ../fish/guestfish-actions.pod:4336
15208 " set-e2uuid device uuid\n"
15213 #: ../fish/guestfish-actions.pod:4338 ../src/guestfs-actions.pod:6729
15215 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
15216 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
15217 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
15221 #: ../fish/guestfish-actions.pod:4343
15223 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
15224 "UUID of a filesystem."
15228 #: ../fish/guestfish-actions.pod:4346
15229 msgid "set-memsize"
15233 #: ../fish/guestfish-actions.pod:4348
15238 #: ../fish/guestfish-actions.pod:4350
15241 " set-memsize memsize\n"
15246 #: ../fish/guestfish-actions.pod:4352
15248 "This sets the memory size in megabytes allocated to the qemu subprocess. "
15249 "This only has any effect if called before L</launch>."
15253 #: ../fish/guestfish-actions.pod:4356 ../src/guestfs-actions.pod:6751
15255 "You can also change this by setting the environment variable "
15256 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
15260 #: ../fish/guestfish-actions.pod:4363
15261 msgid "set-network"
15265 #: ../fish/guestfish-actions.pod:4365
15270 #: ../fish/guestfish-actions.pod:4367
15273 " set-network true|false\n"
15278 #: ../fish/guestfish-actions.pod:4369 ../src/guestfs-actions.pod:6768
15280 "If C<network> is true, then the network is enabled in the libguestfs "
15281 "appliance. The default is false."
15285 #: ../fish/guestfish-actions.pod:4372 ../src/guestfs-actions.pod:6771
15287 "This affects whether commands are able to access the network (see "
15288 "L<guestfs(3)/RUNNING COMMANDS>)."
15292 #: ../fish/guestfish-actions.pod:4375
15293 msgid "You must call this before calling L</launch>, otherwise it has no effect."
15297 #: ../fish/guestfish-actions.pod:4378
15302 #: ../fish/guestfish-actions.pod:4382
15305 " set-path searchpath\n"
15310 #: ../fish/guestfish-actions.pod:4384 ../src/guestfs-actions.pod:6787
15311 msgid "Set the path that libguestfs searches for kernel and initrd.img."
15315 #: ../fish/guestfish-actions.pod:4386 ../src/guestfs-actions.pod:6789
15317 "The default is C<$libdir/guestfs> unless overridden by setting "
15318 "C<LIBGUESTFS_PATH> environment variable."
15322 #: ../fish/guestfish-actions.pod:4389 ../src/guestfs-actions.pod:6792
15323 msgid "Setting C<path> to C<NULL> restores the default path."
15327 #: ../fish/guestfish-actions.pod:4391
15332 #: ../fish/guestfish-actions.pod:4393
15337 #: ../fish/guestfish-actions.pod:4395
15340 " set-pgroup true|false\n"
15345 #: ../fish/guestfish-actions.pod:4397 ../src/guestfs-actions.pod:6804
15347 "If C<pgroup> is true, child processes are placed into their own process "
15352 #: ../fish/guestfish-actions.pod:4400 ../src/guestfs-actions.pod:6807
15354 "The practical upshot of this is that signals like C<SIGINT> (from users "
15355 "pressing C<^C>) won't be received by the child process."
15359 #: ../fish/guestfish-actions.pod:4403 ../src/guestfs-actions.pod:6810
15361 "The default for this flag is false, because usually you want C<^C> to kill "
15366 #: ../fish/guestfish-actions.pod:4406
15371 #: ../fish/guestfish-actions.pod:4408
15376 #: ../fish/guestfish-actions.pod:4410
15384 #: ../fish/guestfish-actions.pod:4412 ../src/guestfs-actions.pod:6823
15385 msgid "Set the qemu binary that we will use."
15389 #: ../fish/guestfish-actions.pod:4414 ../src/guestfs-actions.pod:6825
15390 msgid "The default is chosen when the library was compiled by the configure script."
15394 #: ../fish/guestfish-actions.pod:4417 ../src/guestfs-actions.pod:6828
15396 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
15401 #: ../fish/guestfish-actions.pod:4420 ../src/guestfs-actions.pod:6831
15402 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
15406 #: ../fish/guestfish-actions.pod:4422 ../src/guestfs-actions.pod:6833
15408 "Note that you should call this function as early as possible after creating "
15409 "the handle. This is because some pre-launch operations depend on testing "
15410 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
15411 "don't retest features, and so you might see inconsistent results. Using the "
15412 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
15413 "the qemu binary at the same time as the handle is created."
15417 #: ../fish/guestfish-actions.pod:4430
15418 msgid "set-recovery-proc"
15422 #: ../fish/guestfish-actions.pod:4432
15423 msgid "recovery-proc"
15427 #: ../fish/guestfish-actions.pod:4434
15430 " set-recovery-proc true|false\n"
15435 #: ../fish/guestfish-actions.pod:4436
15437 "If this is called with the parameter C<false> then L</launch> does not "
15438 "create a recovery process. The purpose of the recovery process is to stop "
15439 "runaway qemu processes in the case where the main program aborts abruptly."
15443 #: ../fish/guestfish-actions.pod:4441
15445 "This only has any effect if called before L</launch>, and the default is "
15450 #: ../fish/guestfish-actions.pod:4444 ../src/guestfs-actions.pod:6859
15452 "About the only time when you would want to disable this is if the main "
15453 "process will fork itself into the background (\"daemonize\" itself). In "
15454 "this case the recovery process thinks that the main program has disappeared "
15455 "and so kills qemu, which is not very helpful."
15459 #: ../fish/guestfish-actions.pod:4450
15460 msgid "set-selinux"
15464 #: ../fish/guestfish-actions.pod:4452
15469 #: ../fish/guestfish-actions.pod:4454
15472 " set-selinux true|false\n"
15477 #: ../fish/guestfish-actions.pod:4456 ../src/guestfs-actions.pod:6875
15479 "This sets the selinux flag that is passed to the appliance at boot time. "
15480 "The default is C<selinux=0> (disabled)."
15484 #: ../fish/guestfish-actions.pod:4459 ../src/guestfs-actions.pod:6878
15486 "Note that if SELinux is enabled, it is always in Permissive mode "
15487 "(C<enforcing=0>)."
15491 #: ../fish/guestfish-actions.pod:4465
15496 #: ../fish/guestfish-actions.pod:4467
15501 #: ../fish/guestfish-actions.pod:4469
15509 #: ../fish/guestfish-actions.pod:4471 ../src/guestfs-actions.pod:6894
15511 "Change the number of virtual CPUs assigned to the appliance. The default is "
15512 "C<1>. Increasing this may improve performance, though often it has no "
15517 #: ../fish/guestfish-actions.pod:4475
15518 msgid "This function must be called before L</launch>."
15522 #: ../fish/guestfish-actions.pod:4477
15527 #: ../fish/guestfish-actions.pod:4479
15532 #: ../fish/guestfish-actions.pod:4481
15535 " set-trace true|false\n"
15540 #: ../fish/guestfish-actions.pod:4483 ../src/guestfs-actions.pod:6910
15542 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
15543 "return values are traced."
15547 #: ../fish/guestfish-actions.pod:4486 ../src/guestfs-actions.pod:6913
15549 "If you want to trace C API calls into libguestfs (and other libraries) then "
15550 "possibly a better way is to use the external ltrace(1) command."
15554 #: ../fish/guestfish-actions.pod:4490 ../src/guestfs-actions.pod:6917
15556 "Command traces are disabled unless the environment variable "
15557 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
15561 #: ../fish/guestfish-actions.pod:4493
15563 "Trace messages are normally sent to C<stderr>, unless you register a "
15564 "callback to send them somewhere else (see L</set-event-callback>)."
15568 #: ../fish/guestfish-actions.pod:4497
15569 msgid "set-verbose"
15573 #: ../fish/guestfish-actions.pod:4499
15578 #: ../fish/guestfish-actions.pod:4501
15581 " set-verbose true|false\n"
15586 #: ../fish/guestfish-actions.pod:4503 ../src/guestfs-actions.pod:6934
15587 msgid "If C<verbose> is true, this turns on verbose messages."
15591 #: ../fish/guestfish-actions.pod:4505 ../src/guestfs-actions.pod:6936
15593 "Verbose messages are disabled unless the environment variable "
15594 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
15598 #: ../fish/guestfish-actions.pod:4508
15600 "Verbose messages are normally sent to C<stderr>, unless you register a "
15601 "callback to send them somewhere else (see L</set-event-callback>)."
15605 #: ../fish/guestfish-actions.pod:4512
15610 #: ../fish/guestfish-actions.pod:4514
15613 " setcon context\n"
15618 #: ../fish/guestfish-actions.pod:4516 ../src/guestfs-actions.pod:6953
15620 "This sets the SELinux security context of the daemon to the string "
15625 #: ../fish/guestfish-actions.pod:4519 ../src/guestfs-actions.pod:6956
15626 msgid "See the documentation about SELINUX in L<guestfs(3)>."
15630 #: ../fish/guestfish-actions.pod:4521
15635 #: ../fish/guestfish-actions.pod:4523
15638 " setxattr xattr val vallen path\n"
15643 #: ../fish/guestfish-actions.pod:4525 ../src/guestfs-actions.pod:6971
15645 "This call sets the extended attribute named C<xattr> of the file C<path> to "
15646 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
15650 #: ../fish/guestfish-actions.pod:4529
15651 msgid "See also: L</lsetxattr>, L<attr(5)>."
15655 #: ../fish/guestfish-actions.pod:4531
15660 #: ../fish/guestfish-actions.pod:4533
15663 " sfdisk device cyls heads sectors 'lines ...'\n"
15668 #: ../fish/guestfish-actions.pod:4535 ../src/guestfs-actions.pod:6998
15670 "This is a direct interface to the L<sfdisk(8)> program for creating "
15671 "partitions on block devices."
15675 #: ../fish/guestfish-actions.pod:4538 ../src/guestfs-actions.pod:7001
15676 msgid "C<device> should be a block device, for example C</dev/sda>."
15680 #: ../fish/guestfish-actions.pod:4540 ../src/guestfs-actions.pod:7003
15682 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
15683 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
15684 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
15685 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
15686 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
15687 "the kernel) cannot work out the right geometry and you will need to tell it."
15691 #: ../fish/guestfish-actions.pod:4548 ../src/guestfs-actions.pod:7011
15693 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
15694 "refer to the L<sfdisk(8)> manpage."
15698 #: ../fish/guestfish-actions.pod:4551 ../src/guestfs-actions.pod:7014
15700 "To create a single partition occupying the whole disk, you would pass "
15701 "C<lines> as a single element list, when the single element being the string "
15706 #: ../fish/guestfish-actions.pod:4555
15707 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
15711 #: ../fish/guestfish-actions.pod:4558 ../fish/guestfish-actions.pod:4578 ../fish/guestfish-actions.pod:4597
15713 "I<This function is deprecated.> In new code, use the L</part_add> call "
15718 #: ../fish/guestfish-actions.pod:4565
15723 #: ../fish/guestfish-actions.pod:4567
15726 " sfdiskM device 'lines ...'\n"
15731 #: ../fish/guestfish-actions.pod:4569
15733 "This is a simplified interface to the L</sfdisk> command, where partition "
15734 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
15735 "you don't need to specify the cyls, heads and sectors parameters which were "
15736 "rarely if ever used anyway."
15740 #: ../fish/guestfish-actions.pod:4575
15741 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
15745 #: ../fish/guestfish-actions.pod:4585
15750 #: ../fish/guestfish-actions.pod:4587
15753 " sfdisk-N device partnum cyls heads sectors line\n"
15758 #: ../fish/guestfish-actions.pod:4589 ../src/guestfs-actions.pod:7070
15760 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
15761 "(note: C<n> counts from 1)."
15765 #: ../fish/guestfish-actions.pod:4592
15767 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
15768 "cyls/heads/sectors parameters."
15772 #: ../fish/guestfish-actions.pod:4595
15773 msgid "See also: L</part-add>"
15777 #: ../fish/guestfish-actions.pod:4604
15778 msgid "sfdisk-disk-geometry"
15782 #: ../fish/guestfish-actions.pod:4606
15785 " sfdisk-disk-geometry device\n"
15790 #: ../fish/guestfish-actions.pod:4608
15792 "This displays the disk geometry of C<device> read from the partition table. "
15793 "Especially in the case where the underlying block device has been resized, "
15794 "this can be different from the kernel's idea of the geometry (see "
15795 "L</sfdisk-kernel-geometry>)."
15799 #: ../fish/guestfish-actions.pod:4613 ../fish/guestfish-actions.pod:4622 ../src/guestfs-actions.pod:7093 ../src/guestfs-actions.pod:7109
15800 msgid "The result is in human-readable format, and not designed to be parsed."
15804 #: ../fish/guestfish-actions.pod:4616
15805 msgid "sfdisk-kernel-geometry"
15809 #: ../fish/guestfish-actions.pod:4618
15812 " sfdisk-kernel-geometry device\n"
15817 #: ../fish/guestfish-actions.pod:4620 ../src/guestfs-actions.pod:7107
15818 msgid "This displays the kernel's idea of the geometry of C<device>."
15822 #: ../fish/guestfish-actions.pod:4625
15827 #: ../fish/guestfish-actions.pod:4627
15830 " sfdisk-l device\n"
15835 #: ../fish/guestfish-actions.pod:4629 ../src/guestfs-actions.pod:7130
15837 "This displays the partition table on C<device>, in the human-readable output "
15838 "of the L<sfdisk(8)> command. It is not intended to be parsed."
15842 #: ../fish/guestfish-actions.pod:4633
15843 msgid "See also: L</part-list>"
15847 #: ../fish/guestfish-actions.pod:4635
15849 "I<This function is deprecated.> In new code, use the L</part_list> call "
15854 #: ../fish/guestfish-actions.pod:4642
15859 #: ../fish/guestfish-actions.pod:4644
15867 #: ../fish/guestfish-actions.pod:4646 ../src/guestfs-actions.pod:7147
15869 "This call runs a command from the guest filesystem via the guest's "
15874 #: ../fish/guestfish-actions.pod:4649
15875 msgid "This is like L</command>, but passes the command to:"
15879 #: ../fish/guestfish-actions.pod:4651 ../src/guestfs-actions.pod:7152
15882 " /bin/sh -c \"command\"\n"
15887 #: ../fish/guestfish-actions.pod:4653 ../src/guestfs-actions.pod:7154
15889 "Depending on the guest's shell, this usually results in wildcards being "
15890 "expanded, shell expressions being interpolated and so on."
15894 #: ../fish/guestfish-actions.pod:4657
15895 msgid "All the provisos about L</command> apply to this call."
15899 #: ../fish/guestfish-actions.pod:4659
15904 #: ../fish/guestfish-actions.pod:4661
15907 " sh-lines command\n"
15912 #: ../fish/guestfish-actions.pod:4663
15913 msgid "This is the same as L</sh>, but splits the result into a list of lines."
15917 #: ../fish/guestfish-actions.pod:4666
15918 msgid "See also: L</command-lines>"
15922 #: ../fish/guestfish-actions.pod:4668
15927 #: ../fish/guestfish-actions.pod:4670
15935 #: ../fish/guestfish-actions.pod:4672 ../src/guestfs-actions.pod:7188
15936 msgid "Sleep for C<secs> seconds."
15940 #: ../fish/guestfish-actions.pod:4674
15945 #: ../fish/guestfish-actions.pod:4676
15953 #: ../fish/guestfish-actions.pod:4680 ../src/guestfs-actions.pod:7202
15954 msgid "This is the same as the C<stat(2)> system call."
15958 #: ../fish/guestfish-actions.pod:4682
15963 #: ../fish/guestfish-actions.pod:4684
15971 #: ../fish/guestfish-actions.pod:4686 ../src/guestfs-actions.pod:7216
15973 "Returns file system statistics for any mounted file system. C<path> should "
15974 "be a file or directory in the mounted file system (typically it is the mount "
15975 "point itself, but it doesn't need to be)."
15979 #: ../fish/guestfish-actions.pod:4690 ../src/guestfs-actions.pod:7220
15980 msgid "This is the same as the C<statvfs(2)> system call."
15984 #: ../fish/guestfish-actions.pod:4692
15989 #: ../fish/guestfish-actions.pod:4694
15997 #: ../fish/guestfish-actions.pod:4696 ../src/guestfs-actions.pod:7234
15999 "This runs the L<strings(1)> command on a file and returns the list of "
16000 "printable strings found."
16004 #: ../fish/guestfish-actions.pod:4702
16009 #: ../fish/guestfish-actions.pod:4704
16012 " strings-e encoding path\n"
16017 #: ../fish/guestfish-actions.pod:4706
16019 "This is like the L</strings> command, but allows you to specify the encoding "
16020 "of strings that are looked for in the source file C<path>."
16024 #: ../fish/guestfish-actions.pod:4710 ../src/guestfs-actions.pod:7257
16025 msgid "Allowed encodings are:"
16029 #: ../fish/guestfish-actions.pod:4714 ../src/guestfs-actions.pod:7261
16034 #: ../fish/guestfish-actions.pod:4716
16036 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
16037 "ISO-8859-X (this is what L</strings> uses)."
16041 #: ../fish/guestfish-actions.pod:4719 ../src/guestfs-actions.pod:7266
16046 #: ../fish/guestfish-actions.pod:4721 ../src/guestfs-actions.pod:7268
16047 msgid "Single 8-bit-byte characters."
16051 #: ../fish/guestfish-actions.pod:4723 ../src/guestfs-actions.pod:7270
16056 #: ../fish/guestfish-actions.pod:4725 ../src/guestfs-actions.pod:7272
16057 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
16061 #: ../fish/guestfish-actions.pod:4728 ../src/guestfs-actions.pod:7275
16062 msgid "l (lower case letter L)"
16066 #: ../fish/guestfish-actions.pod:4730 ../src/guestfs-actions.pod:7277
16068 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
16069 "examining binaries in Windows guests."
16073 #: ../fish/guestfish-actions.pod:4733 ../src/guestfs-actions.pod:7280
16078 #: ../fish/guestfish-actions.pod:4735 ../src/guestfs-actions.pod:7282
16079 msgid "32-bit big endian such as UCS-4BE."
16083 #: ../fish/guestfish-actions.pod:4737 ../src/guestfs-actions.pod:7284
16088 #: ../fish/guestfish-actions.pod:4739 ../src/guestfs-actions.pod:7286
16089 msgid "32-bit little endian such as UCS-4LE."
16093 #: ../fish/guestfish-actions.pod:4743 ../src/guestfs-actions.pod:7290
16094 msgid "The returned strings are transcoded to UTF-8."
16098 #: ../fish/guestfish-actions.pod:4748
16099 msgid "swapoff-device"
16103 #: ../fish/guestfish-actions.pod:4750
16106 " swapoff-device device\n"
16111 #: ../fish/guestfish-actions.pod:4752
16113 "This command disables the libguestfs appliance swap device or partition "
16114 "named C<device>. See L</swapon-device>."
16118 #: ../fish/guestfish-actions.pod:4756
16119 msgid "swapoff-file"
16123 #: ../fish/guestfish-actions.pod:4758
16126 " swapoff-file file\n"
16131 #: ../fish/guestfish-actions.pod:4760 ../src/guestfs-actions.pod:7321
16132 msgid "This command disables the libguestfs appliance swap on file."
16136 #: ../fish/guestfish-actions.pod:4762
16137 msgid "swapoff-label"
16141 #: ../fish/guestfish-actions.pod:4764
16144 " swapoff-label label\n"
16149 #: ../fish/guestfish-actions.pod:4766 ../src/guestfs-actions.pod:7333
16151 "This command disables the libguestfs appliance swap on labeled swap "
16156 #: ../fish/guestfish-actions.pod:4769
16157 msgid "swapoff-uuid"
16161 #: ../fish/guestfish-actions.pod:4771
16164 " swapoff-uuid uuid\n"
16169 #: ../fish/guestfish-actions.pod:4773 ../src/guestfs-actions.pod:7346
16171 "This command disables the libguestfs appliance swap partition with the given "
16176 #: ../fish/guestfish-actions.pod:4776
16177 msgid "swapon-device"
16181 #: ../fish/guestfish-actions.pod:4778
16184 " swapon-device device\n"
16189 #: ../fish/guestfish-actions.pod:4780
16191 "This command enables the libguestfs appliance to use the swap device or "
16192 "partition named C<device>. The increased memory is made available for all "
16193 "commands, for example those run using L</command> or L</sh>."
16197 #: ../fish/guestfish-actions.pod:4785 ../src/guestfs-actions.pod:7364
16199 "Note that you should not swap to existing guest swap partitions unless you "
16200 "know what you are doing. They may contain hibernation information, or other "
16201 "information that the guest doesn't want you to trash. You also risk leaking "
16202 "information about the host to the guest this way. Instead, attach a new "
16203 "host device to the guest and swap on that."
16207 #: ../fish/guestfish-actions.pod:4792
16208 msgid "swapon-file"
16212 #: ../fish/guestfish-actions.pod:4794
16215 " swapon-file file\n"
16220 #: ../fish/guestfish-actions.pod:4796
16221 msgid "This command enables swap to a file. See L</swapon-device> for other notes."
16225 #: ../fish/guestfish-actions.pod:4799
16226 msgid "swapon-label"
16230 #: ../fish/guestfish-actions.pod:4801
16233 " swapon-label label\n"
16238 #: ../fish/guestfish-actions.pod:4803
16240 "This command enables swap to a labeled swap partition. See "
16241 "L</swapon-device> for other notes."
16245 #: ../fish/guestfish-actions.pod:4806
16246 msgid "swapon-uuid"
16250 #: ../fish/guestfish-actions.pod:4808
16253 " swapon-uuid uuid\n"
16258 #: ../fish/guestfish-actions.pod:4810
16260 "This command enables swap to a swap partition with the given UUID. See "
16261 "L</swapon-device> for other notes."
16265 #: ../fish/guestfish-actions.pod:4813
16270 #: ../fish/guestfish-actions.pod:4815
16278 #: ../fish/guestfish-actions.pod:4817 ../src/guestfs-actions.pod:7419
16280 "This syncs the disk, so that any writes are flushed through to the "
16281 "underlying disk image."
16285 #: ../fish/guestfish-actions.pod:4820 ../src/guestfs-actions.pod:7422
16287 "You should always call this if you have modified a disk image, before "
16288 "closing the handle."
16292 #: ../fish/guestfish-actions.pod:4823
16297 #: ../fish/guestfish-actions.pod:4825
16305 #: ../fish/guestfish-actions.pod:4827 ../src/guestfs-actions.pod:7435
16306 msgid "This command returns up to the last 10 lines of a file as a list of strings."
16310 #: ../fish/guestfish-actions.pod:4833
16315 #: ../fish/guestfish-actions.pod:4835
16318 " tail-n nrlines path\n"
16323 #: ../fish/guestfish-actions.pod:4837 ../src/guestfs-actions.pod:7454
16325 "If the parameter C<nrlines> is a positive number, this returns the last "
16326 "C<nrlines> lines of the file C<path>."
16330 #: ../fish/guestfish-actions.pod:4840 ../src/guestfs-actions.pod:7457
16332 "If the parameter C<nrlines> is a negative number, this returns lines from "
16333 "the file C<path>, starting with the C<-nrlines>th line."
16337 #: ../fish/guestfish-actions.pod:4848
16342 #: ../fish/guestfish-actions.pod:4850
16345 " tar-in (tarfile|-) directory\n"
16350 #: ../fish/guestfish-actions.pod:4852 ../src/guestfs-actions.pod:7478
16352 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
16353 "tar file) into C<directory>."
16357 #: ../fish/guestfish-actions.pod:4855
16358 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
16362 #: ../fish/guestfish-actions.pod:4860
16367 #: ../fish/guestfish-actions.pod:4862
16370 " tar-out directory (tarfile|-)\n"
16375 #: ../fish/guestfish-actions.pod:4864 ../src/guestfs-actions.pod:7495
16377 "This command packs the contents of C<directory> and downloads it to local "
16382 #: ../fish/guestfish-actions.pod:4867
16383 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
16387 #: ../fish/guestfish-actions.pod:4872
16392 #: ../fish/guestfish-actions.pod:4874
16395 " tgz-in (tarball|-) directory\n"
16400 #: ../fish/guestfish-actions.pod:4876 ../src/guestfs-actions.pod:7512
16402 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
16403 "tar file) into C<directory>."
16407 #: ../fish/guestfish-actions.pod:4879
16408 msgid "To upload an uncompressed tarball, use L</tar-in>."
16412 #: ../fish/guestfish-actions.pod:4883
16417 #: ../fish/guestfish-actions.pod:4885
16420 " tgz-out directory (tarball|-)\n"
16425 #: ../fish/guestfish-actions.pod:4887 ../src/guestfs-actions.pod:7528
16427 "This command packs the contents of C<directory> and downloads it to local "
16432 #: ../fish/guestfish-actions.pod:4890
16433 msgid "To download an uncompressed tarball, use L</tar-out>."
16437 #: ../fish/guestfish-actions.pod:4894
16442 #: ../fish/guestfish-actions.pod:4896
16450 #: ../fish/guestfish-actions.pod:4898 ../src/guestfs-actions.pod:7543
16452 "Touch acts like the L<touch(1)> command. It can be used to update the "
16453 "timestamps on a file, or, if the file does not exist, to create a new "
16454 "zero-length file."
16458 #: ../fish/guestfish-actions.pod:4902 ../src/guestfs-actions.pod:7547
16460 "This command only works on regular files, and will fail on other file types "
16461 "such as directories, symbolic links, block special etc."
16465 #: ../fish/guestfish-actions.pod:4905
16470 #: ../fish/guestfish-actions.pod:4907
16478 #: ../fish/guestfish-actions.pod:4909 ../src/guestfs-actions.pod:7560
16480 "This command truncates C<path> to a zero-length file. The file must exist "
16485 #: ../fish/guestfish-actions.pod:4912
16486 msgid "truncate-size"
16490 #: ../fish/guestfish-actions.pod:4914
16493 " truncate-size path size\n"
16498 #: ../fish/guestfish-actions.pod:4916 ../src/guestfs-actions.pod:7574
16500 "This command truncates C<path> to size C<size> bytes. The file must exist "
16505 #: ../fish/guestfish-actions.pod:4919
16507 "If the current file size is less than C<size> then the file is extended to "
16508 "the required size with zero bytes. This creates a sparse file (ie. disk "
16509 "blocks are not allocated for the file until you write to it). To create a "
16510 "non-sparse file of zeroes, use L</fallocate64> instead."
16514 #: ../fish/guestfish-actions.pod:4925
16519 #: ../fish/guestfish-actions.pod:4927
16522 " tune2fs-l device\n"
16527 #: ../fish/guestfish-actions.pod:4929 ../src/guestfs-actions.pod:7593
16529 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
16534 #: ../fish/guestfish-actions.pod:4932 ../src/guestfs-actions.pod:7596
16536 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
16537 "for more details. The list of fields returned isn't clearly defined, and "
16538 "depends on both the version of C<tune2fs> that libguestfs was built against, "
16539 "and the filesystem itself."
16543 #: ../fish/guestfish-actions.pod:4937
16548 #: ../fish/guestfish-actions.pod:4939
16551 " txz-in (tarball|-) directory\n"
16556 #: ../fish/guestfish-actions.pod:4941 ../src/guestfs-actions.pod:7616
16558 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
16559 "tar file) into C<directory>."
16563 #: ../fish/guestfish-actions.pod:4946
16568 #: ../fish/guestfish-actions.pod:4948
16571 " txz-out directory (tarball|-)\n"
16576 #: ../fish/guestfish-actions.pod:4950 ../src/guestfs-actions.pod:7630
16578 "This command packs the contents of C<directory> and downloads it to local "
16579 "file C<tarball> (as an xz compressed tar archive)."
16583 #: ../fish/guestfish-actions.pod:4955
16588 #: ../fish/guestfish-actions.pod:4957
16596 #: ../fish/guestfish-actions.pod:4959 ../src/guestfs-actions.pod:7643
16598 "This function sets the mask used for creating new files and device nodes to "
16603 #: ../fish/guestfish-actions.pod:4962 ../src/guestfs-actions.pod:7646
16605 "Typical umask values would be C<022> which creates new files with "
16606 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
16607 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
16611 #: ../fish/guestfish-actions.pod:4967 ../src/guestfs-actions.pod:7651
16613 "The default umask is C<022>. This is important because it means that "
16614 "directories and device nodes will be created with C<0644> or C<0755> mode "
16615 "even if you specify C<0777>."
16619 #: ../fish/guestfish-actions.pod:4971
16620 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
16624 #: ../fish/guestfish-actions.pod:4974 ../src/guestfs-actions.pod:7658
16625 msgid "This call returns the previous umask."
16629 #: ../fish/guestfish-actions.pod:4976
16634 #: ../fish/guestfish-actions.pod:4978
16639 #: ../fish/guestfish-actions.pod:4980
16642 " umount pathordevice\n"
16647 #: ../fish/guestfish-actions.pod:4982 ../src/guestfs-actions.pod:7670
16649 "This unmounts the given filesystem. The filesystem may be specified either "
16650 "by its mountpoint (path) or the device which contains the filesystem."
16654 #: ../fish/guestfish-actions.pod:4986
16659 #: ../fish/guestfish-actions.pod:4988
16660 msgid "unmount-all"
16664 #: ../fish/guestfish-actions.pod:4990
16672 #: ../fish/guestfish-actions.pod:4992 ../src/guestfs-actions.pod:7683
16673 msgid "This unmounts all mounted filesystems."
16677 #: ../fish/guestfish-actions.pod:4994 ../src/guestfs-actions.pod:7685
16678 msgid "Some internal mounts are not unmounted by this call."
16682 #: ../fish/guestfish-actions.pod:4996
16687 #: ../fish/guestfish-actions.pod:4998
16690 " upload (filename|-) remotefilename\n"
16695 #: ../fish/guestfish-actions.pod:5000 ../fish/guestfish-actions.pod:5013 ../src/guestfs-actions.pod:7698 ../src/guestfs-actions.pod:7722
16696 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
16700 #: ../fish/guestfish-actions.pod:5005
16701 msgid "See also L</download>."
16705 #: ../fish/guestfish-actions.pod:5009
16706 msgid "upload-offset"
16710 #: ../fish/guestfish-actions.pod:5011
16713 " upload-offset (filename|-) remotefilename offset\n"
16718 #: ../fish/guestfish-actions.pod:5016 ../src/guestfs-actions.pod:7725
16720 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
16721 "The intention is to overwrite parts of existing files or devices, although "
16722 "if a non-existant file is specified then it is created with a \"hole\" "
16723 "before C<offset>. The size of the data written is implicit in the size of "
16724 "the source C<filename>."
16728 #: ../fish/guestfish-actions.pod:5023
16730 "Note that there is no limit on the amount of data that can be uploaded with "
16731 "this call, unlike with L</pwrite>, and this call always writes the full "
16732 "amount unless an error occurs."
16736 #: ../fish/guestfish-actions.pod:5028
16737 msgid "See also L</upload>, L</pwrite>."
16741 #: ../fish/guestfish-actions.pod:5032
16746 #: ../fish/guestfish-actions.pod:5034
16749 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
16754 #: ../fish/guestfish-actions.pod:5036 ../src/guestfs-actions.pod:7758
16755 msgid "This command sets the timestamps of a file with nanosecond precision."
16759 #: ../fish/guestfish-actions.pod:5039 ../src/guestfs-actions.pod:7761
16761 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
16766 #: ../fish/guestfish-actions.pod:5042 ../src/guestfs-actions.pod:7764
16768 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
16769 "nanoseconds from the epoch."
16773 #: ../fish/guestfish-actions.pod:5045 ../src/guestfs-actions.pod:7767
16775 "If the C<*nsecs> field contains the special value C<-1> then the "
16776 "corresponding timestamp is set to the current time. (The C<*secs> field is "
16777 "ignored in this case)."
16781 #: ../fish/guestfish-actions.pod:5049 ../src/guestfs-actions.pod:7771
16783 "If the C<*nsecs> field contains the special value C<-2> then the "
16784 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
16789 #: ../fish/guestfish-actions.pod:5053
16794 #: ../fish/guestfish-actions.pod:5055
16802 #: ../fish/guestfish-actions.pod:5057 ../src/guestfs-actions.pod:7784
16803 msgid "Return the libguestfs version number that the program is linked against."
16807 #: ../fish/guestfish-actions.pod:5060 ../src/guestfs-actions.pod:7787
16809 "Note that because of dynamic linking this is not necessarily the version of "
16810 "libguestfs that you compiled against. You can compile the program, and then "
16811 "at runtime dynamically link against a completely different C<libguestfs.so> "
16816 #: ../fish/guestfish-actions.pod:5065 ../src/guestfs-actions.pod:7792
16818 "This call was added in version C<1.0.58>. In previous versions of "
16819 "libguestfs there was no way to get the version number. From C code you can "
16820 "use dynamic linker functions to find out if this symbol exists (if it "
16821 "doesn't, then it's an earlier version)."
16825 #: ../fish/guestfish-actions.pod:5071 ../src/guestfs-actions.pod:7798
16827 "The call returns a structure with four elements. The first three (C<major>, "
16828 "C<minor> and C<release>) are numbers and correspond to the usual version "
16829 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
16830 "but may be used for distro-specific information."
16834 #: ../fish/guestfish-actions.pod:5077 ../src/guestfs-actions.pod:7804
16835 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
16839 #: ../fish/guestfish-actions.pod:5080 ../src/guestfs-actions.pod:7807
16840 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
16844 #: ../fish/guestfish-actions.pod:5082
16846 "I<Note:> Don't use this call to test for availability of features. In "
16847 "enterprise distributions we backport features from later versions into "
16848 "earlier versions, making this an unreliable way to test for features. Use "
16849 "L</available> instead."
16853 #: ../fish/guestfish-actions.pod:5088
16858 #: ../fish/guestfish-actions.pod:5090
16861 " vfs-label device\n"
16866 #: ../fish/guestfish-actions.pod:5092 ../src/guestfs-actions.pod:7827
16867 msgid "This returns the filesystem label of the filesystem on C<device>."
16871 #: ../fish/guestfish-actions.pod:5095 ../src/guestfs-actions.pod:7830
16872 msgid "If the filesystem is unlabeled, this returns the empty string."
16876 #: ../fish/guestfish-actions.pod:5097
16877 msgid "To find a filesystem from the label, use L</findfs-label>."
16881 #: ../fish/guestfish-actions.pod:5099
16886 #: ../fish/guestfish-actions.pod:5101
16889 " vfs-type device\n"
16894 #: ../fish/guestfish-actions.pod:5103 ../src/guestfs-actions.pod:7845
16896 "This command gets the filesystem type corresponding to the filesystem on "
16901 #: ../fish/guestfish-actions.pod:5106 ../src/guestfs-actions.pod:7848
16903 "For most filesystems, the result is the name of the Linux VFS module which "
16904 "would be used to mount this filesystem if you mounted it without specifying "
16905 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
16909 #: ../fish/guestfish-actions.pod:5111
16914 #: ../fish/guestfish-actions.pod:5113
16917 " vfs-uuid device\n"
16922 #: ../fish/guestfish-actions.pod:5115 ../src/guestfs-actions.pod:7864
16923 msgid "This returns the filesystem UUID of the filesystem on C<device>."
16927 #: ../fish/guestfish-actions.pod:5118 ../src/guestfs-actions.pod:7867
16928 msgid "If the filesystem does not have a UUID, this returns the empty string."
16932 #: ../fish/guestfish-actions.pod:5120
16933 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
16937 #: ../fish/guestfish-actions.pod:5122
16938 msgid "vg-activate"
16942 #: ../fish/guestfish-actions.pod:5124
16945 " vg-activate true|false 'volgroups ...'\n"
16950 #: ../fish/guestfish-actions.pod:5126 ../src/guestfs-actions.pod:7883
16952 "This command activates or (if C<activate> is false) deactivates all logical "
16953 "volumes in the listed volume groups C<volgroups>."
16957 #: ../fish/guestfish-actions.pod:5129 ../src/guestfs-actions.pod:7886
16958 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
16962 #: ../fish/guestfish-actions.pod:5131 ../src/guestfs-actions.pod:7888
16964 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
16965 "activated or deactivated."
16969 #: ../fish/guestfish-actions.pod:5134
16970 msgid "vg-activate-all"
16974 #: ../fish/guestfish-actions.pod:5136
16977 " vg-activate-all true|false\n"
16982 #: ../fish/guestfish-actions.pod:5138 ../src/guestfs-actions.pod:7901
16984 "This command activates or (if C<activate> is false) deactivates all logical "
16985 "volumes in all volume groups."
16989 #: ../fish/guestfish-actions.pod:5141 ../src/guestfs-actions.pod:7904
16990 msgid "This command is the same as running C<vgchange -a y|n>"
16994 #: ../fish/guestfish-actions.pod:5143
16999 #: ../fish/guestfish-actions.pod:5145
17002 " vgcreate volgroup 'physvols ...'\n"
17007 #: ../fish/guestfish-actions.pod:5147 ../src/guestfs-actions.pod:7917
17009 "This creates an LVM volume group called C<volgroup> from the non-empty list "
17010 "of physical volumes C<physvols>."
17014 #: ../fish/guestfish-actions.pod:5150
17019 #: ../fish/guestfish-actions.pod:5152
17022 " vglvuuids vgname\n"
17027 #: ../fish/guestfish-actions.pod:5154 ../src/guestfs-actions.pod:7930
17029 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
17030 "volumes created in this volume group."
17034 #: ../fish/guestfish-actions.pod:5157
17036 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
17037 "logical volumes and volume groups."
17041 #: ../fish/guestfish-actions.pod:5160
17042 msgid "See also L</vgpvuuids>."
17046 #: ../fish/guestfish-actions.pod:5162
17051 #: ../fish/guestfish-actions.pod:5164
17054 " vgpvuuids vgname\n"
17059 #: ../fish/guestfish-actions.pod:5166 ../src/guestfs-actions.pod:7950
17061 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
17062 "volumes that this volume group resides on."
17066 #: ../fish/guestfish-actions.pod:5169
17068 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
17069 "physical volumes and volume groups."
17073 #: ../fish/guestfish-actions.pod:5172
17074 msgid "See also L</vglvuuids>."
17078 #: ../fish/guestfish-actions.pod:5174
17083 #: ../fish/guestfish-actions.pod:5176
17086 " vgremove vgname\n"
17091 #: ../fish/guestfish-actions.pod:5178 ../src/guestfs-actions.pod:7970
17092 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
17096 #: ../fish/guestfish-actions.pod:5180 ../src/guestfs-actions.pod:7972
17097 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
17101 #: ../fish/guestfish-actions.pod:5183
17106 #: ../fish/guestfish-actions.pod:5185
17109 " vgrename volgroup newvolgroup\n"
17114 #: ../fish/guestfish-actions.pod:5187 ../src/guestfs-actions.pod:7986
17115 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
17119 #: ../fish/guestfish-actions.pod:5189
17124 #: ../fish/guestfish-actions.pod:5191
17132 #: ../fish/guestfish-actions.pod:5193 ../src/guestfs-actions.pod:7997
17134 "List all the volumes groups detected. This is the equivalent of the "
17135 "L<vgs(8)> command."
17139 #: ../fish/guestfish-actions.pod:5196 ../src/guestfs-actions.pod:8000
17141 "This returns a list of just the volume group names that were detected "
17142 "(eg. C<VolGroup00>)."
17146 #: ../fish/guestfish-actions.pod:5199
17147 msgid "See also L</vgs-full>."
17151 #: ../fish/guestfish-actions.pod:5201
17156 #: ../fish/guestfish-actions.pod:5203
17164 #: ../fish/guestfish-actions.pod:5205 ../src/guestfs-actions.pod:8016
17166 "List all the volumes groups detected. This is the equivalent of the "
17167 "L<vgs(8)> command. The \"full\" version includes all fields."
17171 #: ../fish/guestfish-actions.pod:5208
17176 #: ../fish/guestfish-actions.pod:5210
17184 #: ../fish/guestfish-actions.pod:5212 ../src/guestfs-actions.pod:8030
17186 "This rescans all block devices and rebuilds the list of LVM physical "
17187 "volumes, volume groups and logical volumes."
17191 #: ../fish/guestfish-actions.pod:5215
17196 #: ../fish/guestfish-actions.pod:5217
17204 #: ../fish/guestfish-actions.pod:5219 ../src/guestfs-actions.pod:8043
17205 msgid "This command returns the UUID of the LVM VG named C<vgname>."
17209 #: ../fish/guestfish-actions.pod:5221
17214 #: ../fish/guestfish-actions.pod:5223
17222 #: ../fish/guestfish-actions.pod:5225 ../src/guestfs-actions.pod:8083
17224 "This command counts the characters in a file, using the C<wc -c> external "
17229 #: ../fish/guestfish-actions.pod:5228
17234 #: ../fish/guestfish-actions.pod:5230
17242 #: ../fish/guestfish-actions.pod:5232 ../src/guestfs-actions.pod:8096
17244 "This command counts the lines in a file, using the C<wc -l> external "
17249 #: ../fish/guestfish-actions.pod:5235
17254 #: ../fish/guestfish-actions.pod:5237
17262 #: ../fish/guestfish-actions.pod:5239 ../src/guestfs-actions.pod:8109
17264 "This command counts the words in a file, using the C<wc -w> external "
17269 #: ../fish/guestfish-actions.pod:5242
17274 #: ../fish/guestfish-actions.pod:5244
17277 " write path content\n"
17282 #: ../fish/guestfish-actions.pod:5246 ../src/guestfs-actions.pod:8124
17284 "This call creates a file called C<path>. The content of the file is the "
17285 "string C<content> (which can contain any 8 bit data)."
17289 #: ../fish/guestfish-actions.pod:5249
17290 msgid "See also L</write-append>."
17294 #: ../fish/guestfish-actions.pod:5254
17295 msgid "write-append"
17299 #: ../fish/guestfish-actions.pod:5256
17302 " write-append path content\n"
17307 #: ../fish/guestfish-actions.pod:5258 ../src/guestfs-actions.pod:8144
17309 "This call appends C<content> to the end of file C<path>. If C<path> does "
17310 "not exist, then a new file is created."
17314 #: ../fish/guestfish-actions.pod:5261
17315 msgid "See also L</write>."
17319 #: ../fish/guestfish-actions.pod:5266
17324 #: ../fish/guestfish-actions.pod:5268
17327 " write-file path content size\n"
17332 #: ../fish/guestfish-actions.pod:5270 ../src/guestfs-actions.pod:8171
17334 "This call creates a file called C<path>. The contents of the file is the "
17335 "string C<content> (which can contain any 8 bit data), with length C<size>."
17339 #: ../fish/guestfish-actions.pod:5274 ../src/guestfs-actions.pod:8175
17341 "As a special case, if C<size> is C<0> then the length is calculated using "
17342 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
17346 #: ../fish/guestfish-actions.pod:5278 ../src/guestfs-actions.pod:8179
17348 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
17349 "I<not> work, even if the length is specified."
17353 #: ../fish/guestfish-actions.pod:5284
17354 msgid "I<This function is deprecated.> In new code, use the L</write> call instead."
17358 #: ../fish/guestfish-actions.pod:5291
17363 #: ../fish/guestfish-actions.pod:5293
17366 " zegrep regex path\n"
17371 #: ../fish/guestfish-actions.pod:5295 ../src/guestfs-actions.pod:8196
17372 msgid "This calls the external C<zegrep> program and returns the matching lines."
17376 #: ../fish/guestfish-actions.pod:5301
17381 #: ../fish/guestfish-actions.pod:5303
17384 " zegrepi regex path\n"
17389 #: ../fish/guestfish-actions.pod:5305 ../src/guestfs-actions.pod:8215
17390 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
17394 #: ../fish/guestfish-actions.pod:5311
17399 #: ../fish/guestfish-actions.pod:5313
17407 #: ../fish/guestfish-actions.pod:5315 ../src/guestfs-actions.pod:8233
17408 msgid "This command writes zeroes over the first few blocks of C<device>."
17412 #: ../fish/guestfish-actions.pod:5317 ../src/guestfs-actions.pod:8235
17414 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
17415 "securely wipe the device). It should be sufficient to remove any partition "
17416 "tables, filesystem superblocks and so on."
17420 #: ../fish/guestfish-actions.pod:5321 ../fish/guestfish-actions.pod:5336 ../src/guestfs-actions.pod:8239 ../src/guestfs-actions.pod:8265
17422 "If blocks are already zero, then this command avoids writing zeroes. This "
17423 "prevents the underlying device from becoming non-sparse or growing "
17428 #: ../fish/guestfish-actions.pod:5325
17429 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
17433 #: ../fish/guestfish-actions.pod:5328
17434 msgid "zero-device"
17438 #: ../fish/guestfish-actions.pod:5330
17441 " zero-device device\n"
17446 #: ../fish/guestfish-actions.pod:5332
17448 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
17449 "which just zeroes the first few blocks of a device."
17453 #: ../fish/guestfish-actions.pod:5340
17458 #: ../fish/guestfish-actions.pod:5342
17461 " zerofree device\n"
17466 #: ../fish/guestfish-actions.pod:5344 ../src/guestfs-actions.pod:8284
17468 "This runs the I<zerofree> program on C<device>. This program claims to zero "
17469 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
17470 "possible to compress the filesystem more effectively."
17474 #: ../fish/guestfish-actions.pod:5349 ../src/guestfs-actions.pod:8289
17475 msgid "You should B<not> run this program if the filesystem is mounted."
17479 #: ../fish/guestfish-actions.pod:5352 ../src/guestfs-actions.pod:8292
17481 "It is possible that using this program can damage the filesystem or data on "
17486 #: ../fish/guestfish-actions.pod:5355
17491 #: ../fish/guestfish-actions.pod:5357
17494 " zfgrep pattern path\n"
17499 #: ../fish/guestfish-actions.pod:5359 ../src/guestfs-actions.pod:8306
17500 msgid "This calls the external C<zfgrep> program and returns the matching lines."
17504 #: ../fish/guestfish-actions.pod:5365
17509 #: ../fish/guestfish-actions.pod:5367
17512 " zfgrepi pattern path\n"
17517 #: ../fish/guestfish-actions.pod:5369 ../src/guestfs-actions.pod:8325
17518 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
17522 #: ../fish/guestfish-actions.pod:5375
17527 #: ../fish/guestfish-actions.pod:5377
17530 " zfile meth path\n"
17535 #: ../fish/guestfish-actions.pod:5379 ../src/guestfs-actions.pod:8351
17536 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
17540 #: ../fish/guestfish-actions.pod:5382 ../src/guestfs-actions.pod:8354
17541 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
17545 #: ../fish/guestfish-actions.pod:5384
17546 msgid "Since 1.0.63, use L</file> instead which can now process compressed files."
17550 #: ../fish/guestfish-actions.pod:5387
17551 msgid "I<This function is deprecated.> In new code, use the L</file> call instead."
17555 #: ../fish/guestfish-actions.pod:5394
17560 #: ../fish/guestfish-actions.pod:5396
17563 " zgrep regex path\n"
17568 #: ../fish/guestfish-actions.pod:5398 ../src/guestfs-actions.pod:8371
17569 msgid "This calls the external C<zgrep> program and returns the matching lines."
17573 #: ../fish/guestfish-actions.pod:5404
17578 #: ../fish/guestfish-actions.pod:5406
17581 " zgrepi regex path\n"
17586 #: ../fish/guestfish-actions.pod:5408 ../src/guestfs-actions.pod:8390
17587 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
17591 #: ../fish/guestfish-commands.pod:1
17596 #: ../fish/guestfish-commands.pod:3
17601 #: ../fish/guestfish-commands.pod:5
17604 " alloc filename size\n"
17609 #: ../fish/guestfish-commands.pod:7
17611 "This creates an empty (zeroed) file of the given size, and then adds so it "
17612 "can be further examined."
17616 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:193
17617 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
17621 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:195
17622 msgid "Size can be specified using standard suffixes, eg. C<1M>."
17626 #: ../fish/guestfish-commands.pod:14
17628 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
17629 "image, see L</PREPARED DISK IMAGES>."
17633 #: ../fish/guestfish-commands.pod:17
17638 #: ../fish/guestfish-commands.pod:19
17641 " copy-in local [local ...] /remotedir\n"
17646 #: ../fish/guestfish-commands.pod:21
17648 "C<copy-in> copies local files or directories recursively into the disk "
17649 "image, placing them in the directory called C</remotedir> (which must "
17650 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
17651 "other commands as necessary."
17655 #: ../fish/guestfish-commands.pod:26
17657 "Multiple local files and directories can be specified, but the last "
17658 "parameter must always be a remote directory. Wildcards cannot be used."
17662 #: ../fish/guestfish-commands.pod:30
17667 #: ../fish/guestfish-commands.pod:32
17670 " copy-out remote [remote ...] localdir\n"
17675 #: ../fish/guestfish-commands.pod:34
17677 "C<copy-out> copies remote files or directories recursively out of the disk "
17678 "image, placing them on the host disk in a local directory called C<localdir> "
17679 "(which must exist). This guestfish meta-command turns into a sequence of "
17680 "L</download>, L</tar-out> and other commands as necessary."
17684 #: ../fish/guestfish-commands.pod:40
17686 "Multiple remote files and directories can be specified, but the last "
17687 "parameter must always be a local directory. To download to the current "
17688 "directory, use C<.> as in:"
17692 #: ../fish/guestfish-commands.pod:44
17695 " copy-out /home .\n"
17700 #: ../fish/guestfish-commands.pod:46
17702 "Wildcards cannot be used in the ordinary command, but you can use them with "
17703 "the help of L</glob> like this:"
17707 #: ../fish/guestfish-commands.pod:49
17710 " glob copy-out /home/* .\n"
17715 #: ../fish/guestfish-commands.pod:51
17720 #: ../fish/guestfish-commands.pod:53
17723 " display filename\n"
17728 #: ../fish/guestfish-commands.pod:55
17730 "Use C<display> (a graphical display program) to display an image file. It "
17731 "downloads the file, and runs C<display> on it."
17735 #: ../fish/guestfish-commands.pod:58
17737 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
17738 "environment variable. For example to use the GNOME display program:"
17742 #: ../fish/guestfish-commands.pod:61
17745 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
17750 #: ../fish/guestfish-commands.pod:63
17751 msgid "See also L<display(1)>."
17755 #: ../fish/guestfish-commands.pod:65
17760 #: ../fish/guestfish-commands.pod:67
17763 " echo [params ...]\n"
17768 #: ../fish/guestfish-commands.pod:69
17769 msgid "This echos the parameters to the terminal."
17773 #: ../fish/guestfish-commands.pod:71
17778 #: ../fish/guestfish-commands.pod:73
17783 #: ../fish/guestfish-commands.pod:75
17788 #: ../fish/guestfish-commands.pod:77
17796 #: ../fish/guestfish-commands.pod:79
17798 "This is used to edit a file. It downloads the file, edits it locally using "
17799 "your editor, then uploads the result."
17803 #: ../fish/guestfish-commands.pod:82
17805 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
17806 "or C<emacs> you will get those corresponding editors."
17810 #: ../fish/guestfish-commands.pod:86
17815 #: ../fish/guestfish-commands.pod:88
17818 " glob command args...\n"
17823 #: ../fish/guestfish-commands.pod:90
17825 "Expand wildcards in any paths in the args list, and run C<command> "
17826 "repeatedly on each matching path."
17830 #: ../fish/guestfish-commands.pod:93
17831 msgid "See L</WILDCARDS AND GLOBBING>."
17835 #: ../fish/guestfish-commands.pod:95
17840 #: ../fish/guestfish-commands.pod:97
17843 " hexedit <filename|device>\n"
17844 " hexedit <filename|device> <max>\n"
17845 " hexedit <filename|device> <start> <max>\n"
17850 #: ../fish/guestfish-commands.pod:101
17852 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
17857 #: ../fish/guestfish-commands.pod:104
17859 "This command works by downloading potentially the whole file or device, "
17860 "editing it locally, then uploading it. If the file or device is large, you "
17861 "have to specify which part you wish to edit by using C<max> and/or C<start> "
17862 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
17863 "usual modifiers allowed such as C<1M> (1 megabyte)."
17867 #: ../fish/guestfish-commands.pod:111
17868 msgid "For example to edit the first few sectors of a disk you might do:"
17872 #: ../fish/guestfish-commands.pod:114
17875 " hexedit /dev/sda 1M\n"
17880 #: ../fish/guestfish-commands.pod:116
17882 "which would allow you to edit anywhere within the first megabyte of the "
17887 #: ../fish/guestfish-commands.pod:119
17888 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
17892 #: ../fish/guestfish-commands.pod:121
17895 " hexedit /dev/sda1 0x400 0x400\n"
17900 #: ../fish/guestfish-commands.pod:123
17901 msgid "(assuming the superblock is in the standard location)."
17905 #: ../fish/guestfish-commands.pod:125
17907 "This command requires the external L<hexedit(1)> program. You can specify "
17908 "another program to use by setting the C<HEXEDITOR> environment variable."
17912 #: ../fish/guestfish-commands.pod:129
17913 msgid "See also L</hexdump>."
17917 #: ../fish/guestfish-commands.pod:131
17922 #: ../fish/guestfish-commands.pod:133
17930 #: ../fish/guestfish-commands.pod:135
17931 msgid "Change the local directory, ie. the current directory of guestfish itself."
17935 #: ../fish/guestfish-commands.pod:138
17936 msgid "Note that C<!cd> won't do what you might expect."
17940 #: ../fish/guestfish-commands.pod:140
17945 #: ../fish/guestfish-commands.pod:142
17950 #: ../fish/guestfish-commands.pod:144
17958 #: ../fish/guestfish-commands.pod:146
17959 msgid "Opens the manual page for guestfish."
17963 #: ../fish/guestfish-commands.pod:148
17968 #: ../fish/guestfish-commands.pod:150
17973 #: ../fish/guestfish-commands.pod:152
17981 #: ../fish/guestfish-commands.pod:154
17989 #: ../fish/guestfish-commands.pod:156
17990 msgid "This is used to view a file."
17994 #: ../fish/guestfish-commands.pod:158
17996 "The default viewer is C<$PAGER>. However if you use the alternate command "
17997 "C<less> you will get the C<less> command specifically."
18001 #: ../fish/guestfish-commands.pod:161
18006 #: ../fish/guestfish-commands.pod:163
18014 #: ../fish/guestfish-commands.pod:165
18016 "Close and reopen the libguestfs handle. It is not necessary to use this "
18017 "normally, because the handle is closed properly when guestfish exits. "
18018 "However this is occasionally useful for testing."
18022 #: ../fish/guestfish-commands.pod:169
18027 #: ../fish/guestfish-commands.pod:171
18030 " setenv VAR value\n"
18035 #: ../fish/guestfish-commands.pod:173
18036 msgid "Set the environment variable C<VAR> to the string C<value>."
18040 #: ../fish/guestfish-commands.pod:175
18041 msgid "To print the value of an environment variable use a shell command such as:"
18045 #: ../fish/guestfish-commands.pod:178
18053 #: ../fish/guestfish-commands.pod:180
18058 #: ../fish/guestfish-commands.pod:182
18061 " sparse filename size\n"
18066 #: ../fish/guestfish-commands.pod:184
18068 "This creates an empty sparse file of the given size, and then adds so it can "
18069 "be further examined."
18073 #: ../fish/guestfish-commands.pod:187
18075 "In all respects it works the same as the L</alloc> command, except that the "
18076 "image file is allocated sparsely, which means that disk blocks are not "
18077 "assigned to the file until they are needed. Sparse disk files only use "
18078 "space when written to, but they are slower and there is a danger you could "
18079 "run out of real disk space during a write operation."
18083 #: ../fish/guestfish-commands.pod:197
18088 #: ../fish/guestfish-commands.pod:199
18096 #: ../fish/guestfish-commands.pod:201
18098 "This command returns a list of the optional groups known to the daemon, and "
18099 "indicates which ones are supported by this build of the libguestfs "
18104 #: ../fish/guestfish-commands.pod:205
18105 msgid "See also L<guestfs(3)/AVAILABILITY>."
18109 #: ../fish/guestfish-commands.pod:207
18114 #: ../fish/guestfish-commands.pod:209
18117 " time command args...\n"
18122 #: ../fish/guestfish-commands.pod:211
18124 "Run the command as usual, but print the elapsed time afterwards. This can "
18125 "be useful for benchmarking operations."
18129 #: ../fish/guestfish-commands.pod:214
18134 #: ../fish/guestfish-commands.pod:216
18142 #: ../fish/guestfish-commands.pod:218
18143 msgid "Remove C<VAR> from the environment."
18147 #: ../fish/guestfish.pod:5
18148 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
18152 #: ../fish/guestfish.pod:9
18155 " guestfish [--options] [commands]\n"
18160 #: ../fish/guestfish.pod:11
18168 #: ../fish/guestfish.pod:13
18171 " guestfish [--ro|--rw] -a disk.img\n"
18176 #: ../fish/guestfish.pod:15
18179 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
18184 #: ../fish/guestfish.pod:17
18187 " guestfish -d libvirt-domain\n"
18192 #: ../fish/guestfish.pod:19
18195 " guestfish [--ro|--rw] -a disk.img -i\n"
18200 #: ../fish/guestfish.pod:21
18203 " guestfish -d libvirt-domain -i\n"
18208 #: ../fish/guestfish.pod:25
18210 "Using guestfish in read/write mode on live virtual machines can be "
18211 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
18212 "option to use guestfish safely if the disk image or virtual machine might be "
18217 #: ../fish/guestfish.pod:32
18219 "Guestfish is a shell and command-line tool for examining and modifying "
18220 "virtual machine filesystems. It uses libguestfs and exposes all of the "
18221 "functionality of the guestfs API, see L<guestfs(3)>."
18225 #: ../fish/guestfish.pod:36
18227 "Guestfish gives you structured access to the libguestfs API, from shell "
18228 "scripts or the command line or interactively. If you want to rescue a "
18229 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
18234 #: ../fish/guestfish.pod:43
18235 msgid "As an interactive shell"
18239 #: ../fish/guestfish.pod:45
18247 #: ../fish/guestfish.pod:47
18250 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
18251 " editing virtual machine filesystems.\n"
18256 #: ../fish/guestfish.pod:50
18259 " Type: 'help' for a list of commands\n"
18260 " 'man' to read the manual\n"
18261 " 'quit' to quit the shell\n"
18266 #: ../fish/guestfish.pod:54
18269 " ><fs> add-ro disk.img\n"
18271 " ><fs> list-filesystems\n"
18272 " /dev/sda1: ext4\n"
18273 " /dev/vg_guest/lv_root: ext4\n"
18274 " /dev/vg_guest/lv_swap: swap\n"
18275 " ><fs> mount /dev/vg_guest/lv_root /\n"
18276 " ><fs> cat /etc/fstab\n"
18278 " # Created by anaconda\n"
18285 #: ../fish/guestfish.pod:67
18286 msgid "From shell scripts"
18290 #: ../fish/guestfish.pod:69
18291 msgid "Create a new C</etc/motd> file in a guest or disk image:"
18295 #: ../fish/guestfish.pod:71
18298 " guestfish <<_EOF_\n"
18301 " mount /dev/vg_guest/lv_root /\n"
18302 " write /etc/motd \"Welcome, new users\"\n"
18308 #: ../fish/guestfish.pod:78
18309 msgid "List the LVM logical volumes in a disk image:"
18313 #: ../fish/guestfish.pod:80
18316 " guestfish -a disk.img --ro <<_EOF_\n"
18324 #: ../fish/guestfish.pod:85
18325 msgid "List all the filesystems in a disk image:"
18329 #: ../fish/guestfish.pod:87
18332 " guestfish -a disk.img --ro <<_EOF_\n"
18334 " list-filesystems\n"
18340 #: ../fish/guestfish.pod:92
18341 msgid "On one command line"
18345 #: ../fish/guestfish.pod:94 ../fish/virt-copy-in.pod:31
18346 msgid "Update C</etc/resolv.conf> in a guest:"
18350 #: ../fish/guestfish.pod:96
18354 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
18355 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
18360 #: ../fish/guestfish.pod:100
18361 msgid "Edit C</boot/grub/grub.conf> interactively:"
18365 #: ../fish/guestfish.pod:102
18368 " guestfish --rw --add disk.img \\\n"
18369 " --mount /dev/vg_guest/lv_root \\\n"
18370 " --mount /dev/sda1:/boot \\\n"
18371 " edit /boot/grub/grub.conf\n"
18376 #: ../fish/guestfish.pod:107
18377 msgid "Mount disks automatically"
18381 #: ../fish/guestfish.pod:109
18383 "Use the I<-i> option to automatically mount the disks from a virtual "
18388 #: ../fish/guestfish.pod:112
18391 " guestfish --ro -a disk.img -i cat /etc/group\n"
18396 #: ../fish/guestfish.pod:114
18399 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
18404 #: ../fish/guestfish.pod:116
18405 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
18409 #: ../fish/guestfish.pod:118
18412 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
18417 #: ../fish/guestfish.pod:120
18418 msgid "As a script interpreter"
18422 #: ../fish/guestfish.pod:122
18423 msgid "Create a 100MB disk containing an ext2-formatted partition:"
18427 #: ../fish/guestfish.pod:124
18430 " #!/usr/bin/guestfish -f\n"
18431 " sparse test1.img 100M\n"
18433 " part-disk /dev/sda mbr\n"
18434 " mkfs ext2 /dev/sda1\n"
18439 #: ../fish/guestfish.pod:130
18440 msgid "Start with a prepared disk"
18444 #: ../fish/guestfish.pod:132
18446 "An alternate way to create a 100MB disk called C<test1.img> containing a "
18447 "single ext2-formatted partition:"
18451 #: ../fish/guestfish.pod:135 ../src/guestfs.pod:2243
18454 " guestfish -N fs\n"
18459 #: ../fish/guestfish.pod:137
18460 msgid "To list what is available do:"
18464 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:1042
18467 " guestfish -N help | less\n"
18472 #: ../fish/guestfish.pod:141
18473 msgid "Remote control"
18477 #: ../fish/guestfish.pod:143
18480 " eval \"`guestfish --listen`\"\n"
18481 " guestfish --remote add-ro disk.img\n"
18482 " guestfish --remote run\n"
18483 " guestfish --remote lvs\n"
18488 #: ../fish/guestfish.pod:154
18489 msgid "Displays general help on options."
18493 #: ../fish/guestfish.pod:158
18494 msgid "B<--cmd-help>"
18498 #: ../fish/guestfish.pod:160
18499 msgid "Lists all available guestfish commands."
18503 #: ../fish/guestfish.pod:162
18508 #: ../fish/guestfish.pod:164
18509 msgid "B<--cmd-help cmd>"
18513 #: ../fish/guestfish.pod:166
18514 msgid "Displays detailed help on a single command C<cmd>."
18518 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:96
18519 msgid "B<-a image>"
18523 #: ../fish/guestfish.pod:170 ../fuse/guestmount.pod:98
18524 msgid "B<--add image>"
18528 #: ../fish/guestfish.pod:172
18529 msgid "Add a block device or virtual machine image to the shell."
18533 #: ../fish/guestfish.pod:177
18535 "Using this flag is mostly equivalent to using the C<add> command, with "
18536 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
18537 "the I<--format=...> flag was given."
18541 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:109
18543 "When used in conjunction with the I<-d> option, this specifies the libvirt "
18544 "URI to use. The default is to use the default libvirt connection."
18548 #: ../fish/guestfish.pod:189
18553 #: ../fish/guestfish.pod:191
18555 "If using the I<--listen> option and a csh-like shell, use this option. See "
18556 "section L</REMOTE CONTROL AND CSH> below."
18560 #: ../fish/guestfish.pod:194 ../fuse/guestmount.pod:113
18561 msgid "B<-d libvirt-domain>"
18565 #: ../fish/guestfish.pod:196 ../fuse/guestmount.pod:115
18566 msgid "B<--domain libvirt-domain>"
18570 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:117
18572 "Add disks from the named libvirt domain. If the I<--ro> option is also "
18573 "used, then any libvirt domain can be used. However in write mode, only "
18574 "libvirt domains which are shut down can be named here."
18578 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:121
18579 msgid "Domain UUIDs can be used instead of names."
18583 #: ../fish/guestfish.pod:204
18585 "Using this flag is mostly equivalent to using the C<add-domain> command, "
18586 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
18587 "if the I<--format:...> flag was given."
18591 #: ../fish/guestfish.pod:208
18596 #: ../fish/guestfish.pod:210
18597 msgid "B<--no-dest-paths>"
18601 #: ../fish/guestfish.pod:212
18603 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
18604 "to hit the tab key to complete paths on the guest filesystem, but this "
18605 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
18606 "allow this feature to be disabled."
18610 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:137
18612 "When prompting for keys and passphrases, guestfish normally turns echoing "
18613 "off so you cannot see what you are typing. If you are not worried about "
18614 "Tempest attacks and there is no one else in the room you can specify this "
18615 "flag to see what you are typing."
18619 #: ../fish/guestfish.pod:224
18624 #: ../fish/guestfish.pod:226
18625 msgid "B<--file file>"
18629 #: ../fish/guestfish.pod:228
18630 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
18634 #: ../fish/guestfish.pod:231
18637 " #!/usr/bin/guestfish -f\n"
18642 #: ../fish/guestfish.pod:244
18645 " guestfish --format=raw -a disk.img\n"
18650 #: ../fish/guestfish.pod:248
18653 " guestfish --format=raw -a disk.img --format -a another.img\n"
18658 #: ../fish/guestfish.pod:253
18660 "If you have untrusted raw-format guest disk images, you should use this "
18661 "option to specify the disk format. This avoids a possible security problem "
18662 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
18666 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:166
18667 msgid "B<--inspector>"
18671 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:168
18673 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
18674 "system and mount filesystems as they would be mounted on the real virtual "
18679 #: ../fish/guestfish.pod:266
18680 msgid "Typical usage is either:"
18684 #: ../fish/guestfish.pod:268
18687 " guestfish -d myguest -i\n"
18692 #: ../fish/guestfish.pod:270
18693 msgid "(for an inactive libvirt domain called I<myguest>), or:"
18697 #: ../fish/guestfish.pod:272
18700 " guestfish --ro -d myguest -i\n"
18705 #: ../fish/guestfish.pod:274
18706 msgid "(for active domains, readonly), or specify the block device directly:"
18710 #: ../fish/guestfish.pod:276
18713 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
18718 #: ../fish/guestfish.pod:278
18720 "Note that the command line syntax changed slightly over older versions of "
18721 "guestfish. You can still use the old syntax:"
18725 #: ../fish/guestfish.pod:281
18728 " guestfish [--ro] -i disk.img\n"
18733 #: ../fish/guestfish.pod:283
18736 " guestfish [--ro] -i libvirt-domain\n"
18741 #: ../fish/guestfish.pod:285
18743 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
18744 "then using other commands to mount the filesystems that were found."
18748 #: ../fish/guestfish.pod:294
18749 msgid "B<--listen>"
18753 #: ../fish/guestfish.pod:296
18755 "Fork into the background and listen for remote commands. See section "
18756 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
18760 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:177
18765 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:179
18767 "Connect to a live virtual machine. (Experimental, see "
18768 "L<guestfs(3)/ATTACHING TO RUNNING DAEMONS>)."
18772 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:182
18773 msgid "B<-m dev[:mountpoint[:options]]>"
18777 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:184
18778 msgid "B<--mount dev[:mountpoint[:options]]>"
18782 #: ../fish/guestfish.pod:308
18783 msgid "Mount the named partition or logical volume on the given mountpoint."
18787 #: ../fish/guestfish.pod:310
18788 msgid "If the mountpoint is omitted, it defaults to C</>."
18792 #: ../fish/guestfish.pod:312
18793 msgid "You have to mount something on C</> before most commands will work."
18797 #: ../fish/guestfish.pod:314
18799 "If any I<-m> or I<--mount> options are given, the guest is automatically "
18804 #: ../fish/guestfish.pod:317
18806 "If you don't know what filesystems a disk image contains, you can either run "
18807 "guestfish without this option, then list the partitions, filesystems and LVs "
18808 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
18809 "commands), or you can use the L<virt-filesystems(1)> program."
18813 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:192
18815 "The third (and rarely used) part of the mount parameter is the list of mount "
18816 "options used to mount the underlying filesystem. If this is not given, then "
18817 "the mount options are either the empty string or C<ro> (the latter if the "
18818 "I<--ro> flag is used). By specifying the mount options, you override this "
18819 "default choice. Probably the only time you would use this is to enable ACLs "
18820 "and/or extended attributes if the filesystem can support them:"
18824 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:200
18827 " -m /dev/sda1:/:acl,user_xattr\n"
18832 #: ../fish/guestfish.pod:333
18833 msgid "Using this flag is equivalent to using the C<mount-options> command."
18837 #: ../fish/guestfish.pod:335 ../fuse/guestmount.pod:202 ../resize/virt-resize.pod:435
18842 #: ../fish/guestfish.pod:337 ../fuse/guestmount.pod:204
18843 msgid "B<--no-sync>"
18847 #: ../fish/guestfish.pod:339
18849 "Disable autosync. This is enabled by default. See the discussion of "
18850 "autosync in the L<guestfs(3)> manpage."
18854 #: ../fish/guestfish.pod:342
18859 #: ../fish/guestfish.pod:344
18860 msgid "B<--new type>"
18864 #: ../fish/guestfish.pod:346
18869 #: ../fish/guestfish.pod:348
18871 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
18872 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
18873 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
18878 #: ../fish/guestfish.pod:353
18879 msgid "B<--progress-bars>"
18883 #: ../fish/guestfish.pod:355
18884 msgid "Enable progress bars, even when guestfish is used non-interactively."
18888 #: ../fish/guestfish.pod:357
18890 "Progress bars are enabled by default when guestfish is used as an "
18891 "interactive shell."
18895 #: ../fish/guestfish.pod:360
18896 msgid "B<--no-progress-bars>"
18900 #: ../fish/guestfish.pod:362
18901 msgid "Disable progress bars."
18905 #: ../fish/guestfish.pod:364
18906 msgid "B<--remote[=pid]>"
18910 #: ../fish/guestfish.pod:366
18912 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
18913 "CONTROL GUESTFISH OVER A SOCKET> below."
18917 #: ../fish/guestfish.pod:369 ../fuse/guestmount.pod:248 ../rescue/virt-rescue.pod:161
18922 #: ../fish/guestfish.pod:371 ../fuse/guestmount.pod:250 ../rescue/virt-rescue.pod:163
18927 #: ../fish/guestfish.pod:373
18929 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18930 "mounts are done read-only."
18934 #: ../fish/guestfish.pod:376 ../rescue/virt-rescue.pod:167
18936 "The option must always be used if the disk image or virtual machine might be "
18937 "running, and is generally recommended in cases where you don't need write "
18938 "access to the disk."
18942 #: ../fish/guestfish.pod:380
18944 "Note that prepared disk images created with I<-N> are not affected by this "
18945 "option. Also commands like C<add> are not affected - you have to specify "
18946 "the C<readonly:true> option explicitly if you need it."
18950 #: ../fish/guestfish.pod:384
18951 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
18955 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:262 ../rescue/virt-rescue.pod:173
18956 msgid "B<--selinux>"
18960 #: ../fish/guestfish.pod:388
18961 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
18965 #: ../fish/guestfish.pod:394
18967 "Enable very verbose messages. This is particularly useful if you find a "
18972 #: ../fish/guestfish.pod:401
18973 msgid "Display the guestfish / libguestfs version number and exit."
18977 #: ../fish/guestfish.pod:403 ../fuse/guestmount.pod:278 ../rescue/virt-rescue.pod:194
18982 #: ../fish/guestfish.pod:405 ../fuse/guestmount.pod:280 ../rescue/virt-rescue.pod:196
18987 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:282
18989 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18990 "mounts are done read-write."
18994 #: ../fish/guestfish.pod:410
18995 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
18999 #: ../fish/guestfish.pod:414
19000 msgid "Echo each command before executing it."
19004 #: ../fish/guestfish.pod:418
19005 msgid "COMMANDS ON COMMAND LINE"
19009 #: ../fish/guestfish.pod:420
19010 msgid "Any additional (non-option) arguments are treated as commands to execute."
19014 #: ../fish/guestfish.pod:423
19016 "Commands to execute should be separated by a colon (C<:>), where the colon "
19017 "is a separate parameter. Thus:"
19021 #: ../fish/guestfish.pod:426
19024 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
19029 #: ../fish/guestfish.pod:428
19031 "If there are no additional arguments, then we enter a shell, either an "
19032 "interactive shell with a prompt (if the input is a terminal) or a "
19033 "non-interactive shell."
19037 #: ../fish/guestfish.pod:432
19039 "In either command line mode or non-interactive shell, the first command that "
19040 "gives an error causes the whole shell to exit. In interactive mode (with a "
19041 "prompt) if a command fails, you can continue to enter commands."
19045 #: ../fish/guestfish.pod:437
19046 msgid "USING launch (OR run)"
19050 #: ../fish/guestfish.pod:439
19052 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
19053 "then launch it, then mount any disks you need, and finally issue "
19054 "actions/commands. So the general order of the day is:"
19058 #: ../fish/guestfish.pod:447
19059 msgid "add or -a/--add"
19063 #: ../fish/guestfish.pod:451
19064 msgid "launch (aka run)"
19068 #: ../fish/guestfish.pod:455
19069 msgid "mount or -m/--mount"
19073 #: ../fish/guestfish.pod:459
19074 msgid "any other commands"
19078 #: ../fish/guestfish.pod:463
19080 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
19081 "guest before mounting or performing any other commands."
19085 #: ../fish/guestfish.pod:466
19087 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
19088 "I<--new> options were given then C<run> is done automatically, simply "
19089 "because guestfish can't perform the action you asked for without doing this."
19093 #: ../fish/guestfish.pod:471
19094 msgid "OPENING DISKS FOR READ AND WRITE"
19098 #: ../fish/guestfish.pod:473
19100 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
19101 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
19102 "I<-i> and I<-m> open disk images read-only or for writing."
19106 #: ../fish/guestfish.pod:478
19108 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
19109 "opening disk images supplied on the command line for write. To open a disk "
19110 "image read-only you have to do I<-a image --ro>."
19114 #: ../fish/guestfish.pod:482
19116 "This matters: If you accidentally open a live VM disk image writable then "
19117 "you will cause irreversible disk corruption."
19121 #: ../fish/guestfish.pod:485
19123 "In a future libguestfs we intend to change the default the other way. Disk "
19124 "images will be opened read-only. You will have to either specify "
19125 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
19126 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
19127 "access for disk images specified by those other command line options."
19131 #: ../fish/guestfish.pod:492
19133 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
19134 "which does nothing (it is already the default). However it is highly "
19135 "recommended that you use this option to indicate that you need write access, "
19136 "and prepare your scripts for the day when this option will be required for "
19141 #: ../fish/guestfish.pod:498
19143 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
19144 "other libguestfs program apart from guestfish and guestmount."
19148 #: ../fish/guestfish.pod:501
19153 #: ../fish/guestfish.pod:503
19155 "You can quote ordinary parameters using either single or double quotes. For "
19160 #: ../fish/guestfish.pod:506
19163 " add \"file with a space.img\"\n"
19168 #: ../fish/guestfish.pod:508
19171 " rm '/file name'\n"
19176 #: ../fish/guestfish.pod:510
19184 #: ../fish/guestfish.pod:512
19186 "A few commands require a list of strings to be passed. For these, use a "
19187 "whitespace-separated list, enclosed in quotes. Strings containing "
19188 "whitespace to be passed through must be enclosed in single quotes. A "
19189 "literal single quote must be escaped with a backslash."
19193 #: ../fish/guestfish.pod:517
19196 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
19197 " command \"/bin/echo 'foo bar'\"\n"
19198 " command \"/bin/echo \\'foo\\'\"\n"
19203 #: ../fish/guestfish.pod:521
19204 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
19208 #: ../fish/guestfish.pod:523
19210 "In double-quoted arguments (only) use backslash to insert special "
19215 #: ../fish/guestfish.pod:528
19220 #: ../fish/guestfish.pod:530
19221 msgid "Alert (bell) character."
19225 #: ../fish/guestfish.pod:532
19230 #: ../fish/guestfish.pod:534
19231 msgid "Backspace character."
19235 #: ../fish/guestfish.pod:536
19240 #: ../fish/guestfish.pod:538
19241 msgid "Form feed character."
19245 #: ../fish/guestfish.pod:540
19250 #: ../fish/guestfish.pod:542
19251 msgid "Newline character."
19255 #: ../fish/guestfish.pod:544
19260 #: ../fish/guestfish.pod:546
19261 msgid "Carriage return character."
19265 #: ../fish/guestfish.pod:548
19270 #: ../fish/guestfish.pod:550
19271 msgid "Horizontal tab character."
19275 #: ../fish/guestfish.pod:552
19280 #: ../fish/guestfish.pod:554
19281 msgid "Vertical tab character."
19285 #: ../fish/guestfish.pod:556
19290 #: ../fish/guestfish.pod:558
19291 msgid "A literal double quote character."
19295 #: ../fish/guestfish.pod:560
19300 #: ../fish/guestfish.pod:562
19302 "A character with octal value I<ooo>. There must be precisely 3 octal digits "
19307 #: ../fish/guestfish.pod:565
19312 #: ../fish/guestfish.pod:567
19313 msgid "A character with hex value I<hh>. There must be precisely 2 hex digits."
19317 #: ../fish/guestfish.pod:570
19319 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
19324 #: ../fish/guestfish.pod:573
19329 #: ../fish/guestfish.pod:575
19330 msgid "A literal backslash character."
19334 #: ../fish/guestfish.pod:579
19335 msgid "OPTIONAL ARGUMENTS"
19339 #: ../fish/guestfish.pod:581
19341 "Some commands take optional arguments. These arguments appear in this "
19342 "documentation as C<[argname:..]>. You can use them as in these examples:"
19346 #: ../fish/guestfish.pod:585
19349 " add-drive-opts filename\n"
19354 #: ../fish/guestfish.pod:587
19357 " add-drive-opts filename readonly:true\n"
19362 #: ../fish/guestfish.pod:589
19365 " add-drive-opts filename format:qcow2 readonly:false\n"
19370 #: ../fish/guestfish.pod:591
19372 "Each optional argument can appear at most once. All optional arguments must "
19373 "appear after the required ones."
19377 #: ../fish/guestfish.pod:594
19382 #: ../fish/guestfish.pod:596
19383 msgid "This section applies to all commands which can take integers as parameters."
19387 #: ../fish/guestfish.pod:599
19388 msgid "SIZE SUFFIX"
19392 #: ../fish/guestfish.pod:601
19394 "When the command takes a parameter measured in bytes, you can use one of the "
19395 "following suffixes to specify kilobytes, megabytes and larger sizes:"
19399 #: ../fish/guestfish.pod:607
19400 msgid "B<k> or B<K> or B<KiB>"
19404 #: ../fish/guestfish.pod:609
19405 msgid "The size in kilobytes (multiplied by 1024)."
19409 #: ../fish/guestfish.pod:611
19414 #: ../fish/guestfish.pod:613
19415 msgid "The size in SI 1000 byte units."
19419 #: ../fish/guestfish.pod:615
19420 msgid "B<M> or B<MiB>"
19424 #: ../fish/guestfish.pod:617
19425 msgid "The size in megabytes (multiplied by 1048576)."
19429 #: ../fish/guestfish.pod:619
19434 #: ../fish/guestfish.pod:621
19435 msgid "The size in SI 1000000 byte units."
19439 #: ../fish/guestfish.pod:623
19440 msgid "B<G> or B<GiB>"
19444 #: ../fish/guestfish.pod:625
19445 msgid "The size in gigabytes (multiplied by 2**30)."
19449 #: ../fish/guestfish.pod:627
19454 #: ../fish/guestfish.pod:629
19455 msgid "The size in SI 10**9 byte units."
19459 #: ../fish/guestfish.pod:631
19460 msgid "B<T> or B<TiB>"
19464 #: ../fish/guestfish.pod:633
19465 msgid "The size in terabytes (multiplied by 2**40)."
19469 #: ../fish/guestfish.pod:635
19474 #: ../fish/guestfish.pod:637
19475 msgid "The size in SI 10**12 byte units."
19479 #: ../fish/guestfish.pod:639
19480 msgid "B<P> or B<PiB>"
19484 #: ../fish/guestfish.pod:641
19485 msgid "The size in petabytes (multiplied by 2**50)."
19489 #: ../fish/guestfish.pod:643
19494 #: ../fish/guestfish.pod:645
19495 msgid "The size in SI 10**15 byte units."
19499 #: ../fish/guestfish.pod:647
19500 msgid "B<E> or B<EiB>"
19504 #: ../fish/guestfish.pod:649
19505 msgid "The size in exabytes (multiplied by 2**60)."
19509 #: ../fish/guestfish.pod:651
19514 #: ../fish/guestfish.pod:653
19515 msgid "The size in SI 10**18 byte units."
19519 #: ../fish/guestfish.pod:655
19520 msgid "B<Z> or B<ZiB>"
19524 #: ../fish/guestfish.pod:657
19525 msgid "The size in zettabytes (multiplied by 2**70)."
19529 #: ../fish/guestfish.pod:659
19534 #: ../fish/guestfish.pod:661
19535 msgid "The size in SI 10**21 byte units."
19539 #: ../fish/guestfish.pod:663
19540 msgid "B<Y> or B<YiB>"
19544 #: ../fish/guestfish.pod:665
19545 msgid "The size in yottabytes (multiplied by 2**80)."
19549 #: ../fish/guestfish.pod:667
19554 #: ../fish/guestfish.pod:669
19555 msgid "The size in SI 10**24 byte units."
19559 #: ../fish/guestfish.pod:675
19562 " truncate-size /file 1G\n"
19567 #: ../fish/guestfish.pod:677
19568 msgid "would truncate the file to 1 gigabyte."
19572 #: ../fish/guestfish.pod:679
19574 "Be careful because a few commands take sizes in kilobytes or megabytes "
19575 "(eg. the parameter to L</memsize> is specified in megabytes already). "
19576 "Adding a suffix will probably not do what you expect."
19580 #: ../fish/guestfish.pod:683
19581 msgid "OCTAL AND HEXADECIMAL NUMBERS"
19585 #: ../fish/guestfish.pod:685
19587 "For specifying the radix (base) use the C convention: C<0> to prefix an "
19588 "octal number or C<0x> to prefix a hexadecimal number. For example:"
19592 #: ../fish/guestfish.pod:688
19595 " 1234 decimal number 1234\n"
19596 " 02322 octal number, equivalent to decimal 1234\n"
19597 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
19602 #: ../fish/guestfish.pod:692
19604 "When using the C<chmod> command, you almost always want to specify an octal "
19605 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
19606 "L<chmod(1)> program):"
19610 #: ../fish/guestfish.pod:696
19613 " chmod 0777 /public # OK\n"
19614 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
19619 #: ../fish/guestfish.pod:699
19621 "Commands that return numbers usually print them in decimal, but some "
19622 "commands print numbers in other radices (eg. C<umask> prints the mode in "
19623 "octal, preceeded by C<0>)."
19627 #: ../fish/guestfish.pod:703
19628 msgid "WILDCARDS AND GLOBBING"
19632 #: ../fish/guestfish.pod:705
19634 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
19635 "(globbing) by default. So for example the following will not do what you "
19640 #: ../fish/guestfish.pod:709
19648 #: ../fish/guestfish.pod:711
19650 "Assuming you don't have a directory called literally C</home/*> then the "
19651 "above command will return an error."
19655 #: ../fish/guestfish.pod:714
19656 msgid "To perform wildcard expansion, use the C<glob> command."
19660 #: ../fish/guestfish.pod:716
19663 " glob rm-rf /home/*\n"
19668 #: ../fish/guestfish.pod:718
19670 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
19671 "many times), equivalent to:"
19675 #: ../fish/guestfish.pod:721
19678 " rm-rf /home/jim\n"
19679 " rm-rf /home/joe\n"
19680 " rm-rf /home/mary\n"
19685 #: ../fish/guestfish.pod:725
19686 msgid "C<glob> only works on simple guest paths and not on device names."
19690 #: ../fish/guestfish.pod:727
19692 "If you have several parameters, each containing a wildcard, then glob will "
19693 "perform a Cartesian product."
19697 #: ../fish/guestfish.pod:730
19702 #: ../fish/guestfish.pod:732
19704 "Any line which starts with a I<#> character is treated as a comment and "
19705 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
19706 "a command. For example:"
19710 #: ../fish/guestfish.pod:736
19713 " # this is a comment\n"
19714 " # this is a comment\n"
19715 " foo # NOT a comment\n"
19720 #: ../fish/guestfish.pod:740
19721 msgid "Blank lines are also ignored."
19725 #: ../fish/guestfish.pod:742
19726 msgid "RUNNING COMMANDS LOCALLY"
19730 #: ../fish/guestfish.pod:744
19732 "Any line which starts with a I<!> character is treated as a command sent to "
19733 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
19737 #: ../fish/guestfish.pod:748
19741 " tgz-out /remote local/remote-data.tar.gz\n"
19746 #: ../fish/guestfish.pod:751
19748 "will create a directory C<local> on the host, and then export the contents "
19749 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
19750 "(See C<tgz-out>)."
19754 #: ../fish/guestfish.pod:755
19756 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
19757 "effect, due to the way that subprocesses work in Unix."
19761 #: ../fish/guestfish.pod:758
19762 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
19766 #: ../fish/guestfish.pod:760
19768 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
19769 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
19770 "and executed as guestfish commands."
19774 #: ../fish/guestfish.pod:764
19776 "Thus you can use shell script to construct arbitrary guestfish commands "
19777 "which are then parsed by guestfish."
19781 #: ../fish/guestfish.pod:767
19783 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
19784 "through C</foo.100>) using guestfish commands alone. However this is simple "
19785 "if we use a shell script to create the guestfish commands for us:"
19789 #: ../fish/guestfish.pod:772
19792 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
19797 #: ../fish/guestfish.pod:774
19798 msgid "or with names like C</foo.001>:"
19802 #: ../fish/guestfish.pod:776
19805 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
19810 #: ../fish/guestfish.pod:778
19812 "When using guestfish interactively it can be helpful to just run the shell "
19813 "script first (ie. remove the initial C<E<lt>> character so it is just an "
19814 "ordinary I<!> local command), see what guestfish commands it would run, and "
19815 "when you are happy with those prepend the C<E<lt>> character to run the "
19816 "guestfish commands for real."
19820 #: ../fish/guestfish.pod:784
19825 #: ../fish/guestfish.pod:786
19827 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
19828 "command (a guestfish command) to the second command (any host command). For "
19833 #: ../fish/guestfish.pod:790
19836 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
19841 #: ../fish/guestfish.pod:792
19843 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
19844 "program). The above command would list all accounts in the guest filesystem "
19845 "which have UID 0, ie. root accounts including backdoors. Other examples:"
19849 #: ../fish/guestfish.pod:797
19852 " hexdump /bin/ls | head\n"
19853 " list-devices | tail -1\n"
19854 " tgz-out / - | tar ztf -\n"
19859 #: ../fish/guestfish.pod:801
19861 "The space before the pipe symbol is required, any space after the pipe "
19862 "symbol is optional. Everything after the pipe symbol is just passed "
19863 "straight to the host shell, so it can contain redirections, globs and "
19864 "anything else that makes sense on the host side."
19868 #: ../fish/guestfish.pod:806
19870 "To use a literal argument which begins with a pipe symbol, you have to quote "
19875 #: ../fish/guestfish.pod:809
19883 #: ../fish/guestfish.pod:811
19884 msgid "HOME DIRECTORIES"
19888 #: ../fish/guestfish.pod:813
19890 "If a parameter starts with the character C<~> then the tilde may be expanded "
19891 "as a home directory path (either C<~> for the current user's home directory, "
19892 "or C<~user> for another user)."
19896 #: ../fish/guestfish.pod:817
19898 "Note that home directory expansion happens for users known I<on the host>, "
19899 "not in the guest filesystem."
19903 #: ../fish/guestfish.pod:820
19905 "To use a literal argument which begins with a tilde, you have to quote it, "
19910 #: ../fish/guestfish.pod:823
19918 #: ../fish/guestfish.pod:825 ../src/guestfs.pod:534
19919 msgid "ENCRYPTED DISKS"
19923 #: ../fish/guestfish.pod:827
19925 "Libguestfs has some support for Linux guests encrypted according to the "
19926 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
19927 "disk encryption systems used by modern Linux guests. Currently only "
19928 "LVM-on-LUKS is supported."
19932 #: ../fish/guestfish.pod:832
19933 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
19937 #: ../fish/guestfish.pod:834
19940 " ><fs> vfs-type /dev/sda2\n"
19946 #: ../fish/guestfish.pod:837
19948 "Then open those devices using L</luks-open>. This creates a device-mapper "
19949 "device called C</dev/mapper/luksdev>."
19953 #: ../fish/guestfish.pod:840
19956 " ><fs> luks-open /dev/sda2 luksdev\n"
19957 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
19962 #: ../fish/guestfish.pod:843
19964 "Finally you have to tell LVM to scan for volume groups on the newly created "
19969 #: ../fish/guestfish.pod:846
19973 " vg-activate-all true\n"
19978 #: ../fish/guestfish.pod:849
19979 msgid "The logical volume(s) can now be mounted in the usual way."
19983 #: ../fish/guestfish.pod:851
19985 "Before closing a LUKS device you must unmount any logical volumes on it and "
19986 "deactivate the volume groups by calling C<vg-activate false VG> on each "
19987 "one. Then you can close the mapper device:"
19991 #: ../fish/guestfish.pod:855
19994 " vg-activate false /dev/VG\n"
19995 " luks-close /dev/mapper/luksdev\n"
20000 #: ../fish/guestfish.pod:860
20002 "If a path is prefixed with C<win:> then you can use Windows-style drive "
20003 "letters and paths (with some limitations). The following commands are "
20008 #: ../fish/guestfish.pod:864
20011 " file /WINDOWS/system32/config/system.LOG\n"
20016 #: ../fish/guestfish.pod:866
20019 " file win:\\windows\\system32\\config\\system.log\n"
20024 #: ../fish/guestfish.pod:868
20027 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
20032 #: ../fish/guestfish.pod:870
20034 "The parameter is rewritten \"behind the scenes\" by looking up the position "
20035 "where the drive is mounted, prepending that to the path, changing all "
20036 "backslash characters to forward slash, then resolving the result using "
20037 "L</case-sensitive-path>. For example if the E: drive was mounted on C</e> "
20038 "then the parameter might be rewritten like this:"
20042 #: ../fish/guestfish.pod:876
20045 " win:e:\\foo\\bar => /e/FOO/bar\n"
20050 #: ../fish/guestfish.pod:878
20051 msgid "This only works in argument positions that expect a path."
20055 #: ../fish/guestfish.pod:880
20056 msgid "UPLOADING AND DOWNLOADING FILES"
20060 #: ../fish/guestfish.pod:882
20062 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
20063 "others which upload from or download to a local file, you can use the "
20064 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
20068 #: ../fish/guestfish.pod:886
20076 #: ../fish/guestfish.pod:888
20077 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
20081 #: ../fish/guestfish.pod:891
20084 " tar-out /etc - | tar tf -\n"
20089 #: ../fish/guestfish.pod:893
20091 "writes the tarball to stdout and then pipes that into the external \"tar\" "
20092 "command (see L</PIPES>)."
20096 #: ../fish/guestfish.pod:896
20098 "When using C<-> to read from stdin, the input is read up to the end of "
20099 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
20100 "some arbitrary end marker:"
20104 #: ../fish/guestfish.pod:900
20107 " upload -<<END /foo\n"
20116 #: ../fish/guestfish.pod:906
20118 "Any string of characters can be used instead of C<END>. The end marker must "
20119 "appear on a line of its own, without any preceeding or following characters "
20120 "(not even spaces)."
20124 #: ../fish/guestfish.pod:910
20126 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
20127 "upload local files (so-called \"FileIn\" parameters in the generator)."
20131 #: ../fish/guestfish.pod:913
20132 msgid "EXIT ON ERROR BEHAVIOUR"
20136 #: ../fish/guestfish.pod:915
20138 "By default, guestfish will ignore any errors when in interactive mode "
20139 "(ie. taking commands from a human over a tty), and will exit on the first "
20140 "error in non-interactive mode (scripts, commands given on the command line)."
20144 #: ../fish/guestfish.pod:920
20146 "If you prefix a command with a I<-> character, then that command will not "
20147 "cause guestfish to exit, even if that (one) command returns an error."
20151 #: ../fish/guestfish.pod:924
20152 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
20156 #: ../fish/guestfish.pod:926
20158 "Guestfish can be remote-controlled over a socket. This is useful "
20159 "particularly in shell scripts where you want to make several different "
20160 "changes to a filesystem, but you don't want the overhead of starting up a "
20161 "guestfish process each time."
20165 #: ../fish/guestfish.pod:931
20166 msgid "Start a guestfish server process using:"
20170 #: ../fish/guestfish.pod:933
20173 " eval \"`guestfish --listen`\"\n"
20178 #: ../fish/guestfish.pod:935
20179 msgid "and then send it commands by doing:"
20183 #: ../fish/guestfish.pod:937
20186 " guestfish --remote cmd [...]\n"
20191 #: ../fish/guestfish.pod:939
20192 msgid "To cause the server to exit, send it the exit command:"
20196 #: ../fish/guestfish.pod:943
20198 "Note that the server will normally exit if there is an error in a command. "
20199 "You can change this in the usual way. See section L</EXIT ON ERROR "
20204 #: ../fish/guestfish.pod:947
20205 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
20209 #: ../fish/guestfish.pod:949
20211 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
20212 "is how the I<--remote> option knows where to send the commands. You can "
20213 "have several guestfish listener processes running using:"
20217 #: ../fish/guestfish.pod:953
20220 " eval \"`guestfish --listen`\"\n"
20221 " pid1=$GUESTFISH_PID\n"
20222 " eval \"`guestfish --listen`\"\n"
20223 " pid2=$GUESTFISH_PID\n"
20225 " guestfish --remote=$pid1 cmd\n"
20226 " guestfish --remote=$pid2 cmd\n"
20231 #: ../fish/guestfish.pod:961
20232 msgid "REMOTE CONTROL AND CSH"
20236 #: ../fish/guestfish.pod:963
20238 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
20243 #: ../fish/guestfish.pod:966
20246 " eval \"`guestfish --listen --csh`\"\n"
20251 #: ../fish/guestfish.pod:968
20252 msgid "REMOTE CONTROL DETAILS"
20256 #: ../fish/guestfish.pod:970
20258 "Remote control happens over a Unix domain socket called "
20259 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
20260 "of the process, and C<$PID> is the process ID of the server."
20264 #: ../fish/guestfish.pod:974
20265 msgid "Guestfish client and server versions must match exactly."
20269 #: ../fish/guestfish.pod:976
20270 msgid "USING REMOTE CONTROL ROBUSTLY FROM SHELL SCRIPTS"
20274 #: ../fish/guestfish.pod:978
20276 "From Bash, you can use the following code which creates a guestfish "
20277 "instance, correctly quotes the command line, handles failure to start, and "
20278 "cleans up guestfish when the script exits:"
20282 #: ../fish/guestfish.pod:982 ../src/guestfs.pod:980
20290 #: ../fish/guestfish.pod:986
20293 " guestfish[0]=\"guestfish\"\n"
20294 " guestfish[1]=\"--listen\"\n"
20295 " guestfish[2]=\"--ro\"\n"
20296 " guestfish[3]=\"-a\"\n"
20297 " guestfish[4]=\"disk.img\"\n"
20302 #: ../fish/guestfish.pod:992
20305 " GUESTFISH_PID=\n"
20306 " eval $(\"${guestfish[@]}\")\n"
20307 " if [ -z \"$GUESTFISH_PID\" ]; then\n"
20308 " echo \"error: guestfish didn't start up, see error messages above\"\n"
20315 #: ../fish/guestfish.pod:999
20318 " cleanup_guestfish ()\n"
20320 " guestfish --remote -- exit >/dev/null 2>&1 ||:\n"
20322 " trap cleanup_guestfish EXIT ERR\n"
20327 #: ../fish/guestfish.pod:1005
20330 " guestfish --remote -- run\n"
20335 #: ../fish/guestfish.pod:1007
20343 #: ../fish/guestfish.pod:1009
20344 msgid "REMOTE CONTROL RUN COMMAND HANGING"
20348 #: ../fish/guestfish.pod:1011
20350 "Using the C<run> (or C<launch>) command remotely in a command substitution "
20351 "context hangs, ie. don't do (note the backquotes):"
20355 #: ../fish/guestfish.pod:1014
20358 " a=`guestfish --remote run`\n"
20363 #: ../fish/guestfish.pod:1016
20365 "Since the C<run> command produces no output on stdout, this is not useful "
20366 "anyway. For further information see "
20367 "L<https://bugzilla.redhat.com/show_bug.cgi?id=592910>."
20371 #: ../fish/guestfish.pod:1020
20372 msgid "PREPARED DISK IMAGES"
20376 #: ../fish/guestfish.pod:1022
20378 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
20379 "preformatted disk images that guestfish can make for you to save typing. "
20380 "This is particularly useful for testing purposes. This option is used "
20381 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
20382 "can be mixed with I<-a>)."
20386 #: ../fish/guestfish.pod:1028
20388 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
20389 "the second and so on. Existing files in the current directory are "
20394 #: ../fish/guestfish.pod:1032
20396 "The type briefly describes how the disk should be sized, partitioned, how "
20397 "filesystem(s) should be created, and how content should be added. "
20398 "Optionally the type can be followed by extra parameters, separated by C<:> "
20399 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
20400 "sparsely-allocated disk, containing a single partition, with the partition "
20401 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
20402 "on a 1GB disk instead."
20406 #: ../fish/guestfish.pod:1040
20407 msgid "To list the available types and any extra parameters they take, run:"
20411 #: ../fish/guestfish.pod:1044
20413 "Note that the prepared filesystem is not mounted. You would usually have to "
20414 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
20418 #: ../fish/guestfish.pod:1048
20420 "If any I<-N> or I<--new> options are given, the guest is automatically "
20425 #: ../fish/guestfish.pod:1053
20426 msgid "Create a 100MB disk with an ext4-formatted partition:"
20430 #: ../fish/guestfish.pod:1055
20433 " guestfish -N fs:ext4\n"
20438 #: ../fish/guestfish.pod:1057
20439 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
20443 #: ../fish/guestfish.pod:1059
20446 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
20451 #: ../fish/guestfish.pod:1061
20452 msgid "Create a blank 200MB disk:"
20456 #: ../fish/guestfish.pod:1063
20459 " guestfish -N disk:200M\n"
20464 #: ../fish/guestfish.pod:1065
20465 msgid "PROGRESS BARS"
20469 #: ../fish/guestfish.pod:1067
20471 "Some (not all) long-running commands send progress notification messages as "
20472 "they are running. Guestfish turns these messages into progress bars."
20476 #: ../fish/guestfish.pod:1071
20478 "When a command that supports progress bars takes longer than two seconds to "
20479 "run, and if progress bars are enabled, then you will see one appearing below "
20484 #: ../fish/guestfish.pod:1075
20487 " ><fs> copy-size /large-file /another-file 2048M\n"
20488 " / 10% [#####-----------------------------------------] 00:30\n"
20493 #: ../fish/guestfish.pod:1078
20495 "The spinner on the left hand side moves round once for every progress "
20496 "notification received from the backend. This is a (reasonably) golden "
20497 "assurance that the command is \"doing something\" even if the progress bar "
20498 "is not moving, because the command is able to send the progress "
20499 "notifications. When the bar reaches 100% and the command finishes, the "
20500 "spinner disappears."
20504 #: ../fish/guestfish.pod:1085
20506 "Progress bars are enabled by default when guestfish is used interactively. "
20507 "You can enable them even for non-interactive modes using I<--progress-bars>, "
20508 "and you can disable them completely using I<--no-progress-bars>."
20512 #: ../fish/guestfish.pod:1090
20513 msgid "GUESTFISH COMMANDS"
20517 #: ../fish/guestfish.pod:1092
20519 "The commands in this section are guestfish convenience commands, in other "
20520 "words, they are not part of the L<guestfs(3)> API."
20524 #: ../fish/guestfish.pod:1095
20529 #: ../fish/guestfish.pod:1097
20538 #: ../fish/guestfish.pod:1100
20539 msgid "Without any parameter, this provides general help."
20543 #: ../fish/guestfish.pod:1102
20544 msgid "With a C<cmd> parameter, this displays detailed help for that command."
20548 #: ../fish/guestfish.pod:1104
20549 msgid "quit | exit"
20553 #: ../fish/guestfish.pod:1106
20554 msgid "This exits guestfish. You can also use C<^D> key."
20558 #: ../fish/guestfish.pod:1108
20559 msgid "@FISH_COMMANDS@"
20563 #: ../fish/guestfish.pod:1110
20568 #: ../fish/guestfish.pod:1112 ../src/guestfs.pod:1520
20573 #: ../fish/guestfish.pod:1116
20575 "guestfish returns 0 if the commands completed without error, or 1 if there "
20580 #: ../fish/guestfish.pod:1123
20585 #: ../fish/guestfish.pod:1125
20587 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
20592 #: ../fish/guestfish.pod:1128 ../src/guestfs.pod:3213
20593 msgid "FEBOOTSTRAP_KERNEL"
20597 #: ../fish/guestfish.pod:1130 ../src/guestfs.pod:3215
20598 msgid "FEBOOTSTRAP_MODULES"
20602 #: ../fish/guestfish.pod:1132 ../src/guestfs.pod:3217
20604 "These two environment variables allow the kernel that libguestfs uses in the "
20605 "appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not set, then the "
20606 "most recent host kernel is chosen. For more information about kernel "
20607 "selection, see L<febootstrap-supermin-helper(8)>. This feature is only "
20608 "available in febootstrap E<ge> 3.8."
20612 #: ../fish/guestfish.pod:1138
20613 msgid "GUESTFISH_DISPLAY_IMAGE"
20617 #: ../fish/guestfish.pod:1140
20619 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
20620 "If not set, it uses L<display(1)>."
20624 #: ../fish/guestfish.pod:1143
20625 msgid "GUESTFISH_PID"
20629 #: ../fish/guestfish.pod:1145
20631 "Used with the I<--remote> option to specify the remote guestfish process to "
20632 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
20636 #: ../fish/guestfish.pod:1149
20641 #: ../fish/guestfish.pod:1151
20643 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
20644 "not specified, the external L<hexedit(1)> program is used."
20648 #: ../fish/guestfish.pod:1155
20653 #: ../fish/guestfish.pod:1157
20655 "If compiled with GNU readline support, various files in the home directory "
20656 "can be used. See L</FILES>."
20660 #: ../fish/guestfish.pod:1160 ../src/guestfs.pod:3223
20661 msgid "LIBGUESTFS_APPEND"
20665 #: ../fish/guestfish.pod:1162 ../src/guestfs.pod:3225
20666 msgid "Pass additional options to the guest kernel."
20670 #: ../fish/guestfish.pod:1164 ../src/guestfs.pod:3227
20671 msgid "LIBGUESTFS_DEBUG"
20675 #: ../fish/guestfish.pod:1166
20677 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
20678 "effect as using the B<-v> option."
20682 #: ../fish/guestfish.pod:1169 ../src/guestfs.pod:3232
20683 msgid "LIBGUESTFS_MEMSIZE"
20687 #: ../fish/guestfish.pod:1171 ../src/guestfs.pod:3234
20688 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
20692 #: ../fish/guestfish.pod:1174 ../src/guestfs.pod:3237
20695 " LIBGUESTFS_MEMSIZE=700\n"
20700 #: ../fish/guestfish.pod:1176 ../src/guestfs.pod:3239
20701 msgid "LIBGUESTFS_PATH"
20705 #: ../fish/guestfish.pod:1178
20707 "Set the path that guestfish uses to search for kernel and initrd.img. See "
20708 "the discussion of paths in L<guestfs(3)>."
20712 #: ../fish/guestfish.pod:1181 ../src/guestfs.pod:3244
20713 msgid "LIBGUESTFS_QEMU"
20717 #: ../fish/guestfish.pod:1183 ../src/guestfs.pod:3246
20719 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
20720 "which was found at compile time by the configure script is used."
20724 #: ../fish/guestfish.pod:1187 ../src/guestfs.pod:3252
20725 msgid "LIBGUESTFS_TRACE"
20729 #: ../fish/guestfish.pod:1189
20730 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
20734 #: ../fish/guestfish.pod:1191
20739 #: ../fish/guestfish.pod:1193
20741 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
20746 #: ../fish/guestfish.pod:1196 ../sparsify/virt-sparsify.pod:235 ../src/guestfs.pod:3257
20751 #: ../fish/guestfish.pod:1198 ../src/guestfs.pod:3259
20753 "Location of temporary directory, defaults to C</tmp> except for the cached "
20754 "supermin appliance which defaults to C</var/tmp>."
20758 #: ../fish/guestfish.pod:1201 ../src/guestfs.pod:3262
20760 "If libguestfs was compiled to use the supermin appliance then the real "
20761 "appliance is cached in this directory, shared between all handles belonging "
20762 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
20763 "use in case C</var/tmp> is not large enough."
20767 #: ../fish/guestfish.pod:1209 ../fuse/guestmount.pod:297 ../rescue/virt-rescue.pod:273
20772 #: ../fish/guestfish.pod:1213 ../fuse/guestmount.pod:301 ../rescue/virt-rescue.pod:277
20773 msgid "$HOME/.libguestfs-tools.rc"
20777 #: ../fish/guestfish.pod:1215 ../fuse/guestmount.pod:303 ../rescue/virt-rescue.pod:279
20778 msgid "/etc/libguestfs-tools.conf"
20782 #: ../fish/guestfish.pod:1217 ../fuse/guestmount.pod:305 ../rescue/virt-rescue.pod:281
20784 "This configuration file controls the default read-only or read-write mode "
20785 "(I<--ro> or I<--rw>)."
20789 #: ../fish/guestfish.pod:1220
20790 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
20794 #: ../fish/guestfish.pod:1222
20795 msgid "$HOME/.guestfish"
20799 #: ../fish/guestfish.pod:1224
20801 "If compiled with GNU readline support, then the command history is saved in "
20806 #: ../fish/guestfish.pod:1227
20807 msgid "$HOME/.inputrc"
20811 #: ../fish/guestfish.pod:1229
20812 msgid "/etc/inputrc"
20816 #: ../fish/guestfish.pod:1231
20818 "If compiled with GNU readline support, then these files can be used to "
20819 "configure readline. For further information, please see "
20820 "L<readline(3)/INITIALIZATION FILE>."
20824 #: ../fish/guestfish.pod:1235
20825 msgid "To write rules which only apply to guestfish, use:"
20829 #: ../fish/guestfish.pod:1237
20839 #: ../fish/guestfish.pod:1241
20841 "Variables that you can set in inputrc that change the behaviour of guestfish "
20842 "in useful ways include:"
20846 #: ../fish/guestfish.pod:1246
20847 msgid "completion-ignore-case (default: on)"
20851 #: ../fish/guestfish.pod:1248
20853 "By default, guestfish will ignore case when tab-completing paths on the "
20858 #: ../fish/guestfish.pod:1251
20861 " set completion-ignore-case off\n"
20866 #: ../fish/guestfish.pod:1253
20867 msgid "to make guestfish case sensitive."
20871 #: ../fish/guestfish.pod:1257
20876 #: ../fish/guestfish.pod:1259
20877 msgid "test2.img (etc)"
20881 #: ../fish/guestfish.pod:1261
20883 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
20884 "will be created in the file C<test1.img> in the current directory. The "
20885 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
20886 "the same name will be overwritten."
20890 #: ../fish/guestfish.pod:1270
20892 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-alignment-scan(1)>, "
20893 "L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, "
20894 "L<virt-edit(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, "
20895 "L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, "
20896 "L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
20897 "L<virt-sparsify(1)>, L<virt-sysprep(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, "
20898 "L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<display(1)>, L<hexedit(1)>, "
20899 "L<febootstrap-supermin-helper(8)>."
20903 #: ../fish/guestfish.pod:1302 ../src/guestfs.pod:3355 ../test-tool/libguestfs-test-tool.pod:112
20904 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
20908 #: ../fish/virt-copy-in.pod:5
20909 msgid "virt-copy-in - Copy files and directories into a virtual machine disk image."
20913 #: ../fish/virt-copy-in.pod:9
20916 " virt-copy-in -a disk.img file|dir [file|dir ...] /destination\n"
20921 #: ../fish/virt-copy-in.pod:11
20924 " virt-copy-in -d domain file|dir [file|dir ...] /destination\n"
20929 #: ../fish/virt-copy-in.pod:15
20931 "Using C<virt-copy-in> on live virtual machines can be dangerous, potentially "
20932 "causing disk corruption. The virtual machine must be shut down before you "
20933 "use this command."
20937 #: ../fish/virt-copy-in.pod:21
20939 "C<virt-copy-in> copies files and directories from the local disk into a "
20940 "virtual machine disk image or named libvirt domain."
20944 #: ../fish/virt-copy-in.pod:24
20946 "You can give one of more filenames and directories on the command line. "
20947 "Directories are copied in recursively. The final parameter must be the "
20948 "destination directory in the disk image which must be an absolute path "
20949 "starting with a C</> character."
20953 #: ../fish/virt-copy-in.pod:33
20956 " virt-copy-in -d MyGuest resolv.conf /etc\n"
20961 #: ../fish/virt-copy-in.pod:35 ../fish/virt-tar-in.pod:32
20962 msgid "Upload a home directory to a guest:"
20966 #: ../fish/virt-copy-in.pod:37
20969 " virt-copy-in -d MyGuest skel /home\n"
20974 #: ../fish/virt-copy-in.pod:39 ../fish/virt-copy-out.pod:28 ../fish/virt-tar-in.pod:36 ../fish/virt-tar-out.pod:30
20975 msgid "JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH"
20979 #: ../fish/virt-copy-in.pod:41
20981 "This command is just a simple shell script wrapper around the "
20982 "L<guestfish(1)> C<copy-in> command. For anything more complex than a "
20983 "trivial copy, you are probably better off using guestfish directly."
20987 #: ../fish/virt-copy-in.pod:47 ../fish/virt-copy-out.pod:36 ../fish/virt-tar-in.pod:44 ../fish/virt-tar-out.pod:38
20989 "Since the shell script just passes options straight to guestfish, read "
20990 "L<guestfish(1)> to see the full list of options."
20994 #: ../fish/virt-copy-in.pod:52
20996 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
20997 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
21001 #: ../fish/virt-copy-in.pod:66 ../fish/virt-copy-out.pod:55 ../fish/virt-tar-in.pod:64 ../fish/virt-tar-out.pod:57
21002 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
21006 #: ../fish/virt-copy-out.pod:5
21008 "virt-copy-out - Copy files and directories out of a virtual machine disk "
21013 #: ../fish/virt-copy-out.pod:9
21016 " virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir\n"
21021 #: ../fish/virt-copy-out.pod:11
21024 " virt-copy-out -d domain /file|dir [/file|dir ...] localdir\n"
21029 #: ../fish/virt-copy-out.pod:15
21031 "C<virt-copy-out> copies files and directories out of a virtual machine disk "
21032 "image or named libvirt domain."
21036 #: ../fish/virt-copy-out.pod:18
21038 "You can give one of more filenames and directories on the command line. "
21039 "Directories are copied out recursively."
21043 #: ../fish/virt-copy-out.pod:23
21044 msgid "Download the home directories from a virtual machine:"
21048 #: ../fish/virt-copy-out.pod:25
21052 " virt-copy-out -d MyGuest /home homes\n"
21057 #: ../fish/virt-copy-out.pod:30
21059 "This command is just a simple shell script wrapper around the "
21060 "L<guestfish(1)> C<copy-out> command. For anything more complex than a "
21061 "trivial copy, you are probably better off using guestfish directly."
21065 #: ../fish/virt-copy-out.pod:41
21067 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-edit(1)>, "
21068 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
21072 #: ../fish/virt-tar-in.pod:5
21073 msgid "virt-tar-in - Unpack a tarball into a virtual machine disk image."
21077 #: ../fish/virt-tar-in.pod:9
21080 " virt-tar-in -a disk.img data.tar /destination\n"
21085 #: ../fish/virt-tar-in.pod:11
21088 " virt-tar-in -d domain data.tar /destination\n"
21093 #: ../fish/virt-tar-in.pod:13
21096 " zcat data.tar.gz | virt-tar-in -d domain - /destination\n"
21101 #: ../fish/virt-tar-in.pod:17
21103 "Using C<virt-tar-in> on live virtual machines can be dangerous, potentially "
21104 "causing disk corruption. The virtual machine must be shut down before you "
21105 "use this command."
21109 #: ../fish/virt-tar-in.pod:23
21111 "C<virt-tar-in> unpacks an uncompressed tarball into a virtual machine disk "
21112 "image or named libvirt domain."
21116 #: ../fish/virt-tar-in.pod:26
21118 "The first parameter is the tar file. Use C<-> to read the tar file from "
21119 "standard input. The second parameter is the absolute target directory to "
21124 #: ../fish/virt-tar-in.pod:34
21127 " virt-tar-in -d MyGuest homes.tar /home\n"
21132 #: ../fish/virt-tar-in.pod:38
21134 "This command is just a simple shell script wrapper around the "
21135 "L<guestfish(1)> C<tar-in> command. For anything more complex than a trivial "
21136 "copy, you are probably better off using guestfish directly."
21140 #: ../fish/virt-tar-in.pod:49
21142 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
21143 "L<virt-edit(1)>, L<virt-make-fs(1)>, L<virt-tar-out(1)>, "
21144 "L<http://libguestfs.org/>."
21148 #: ../fish/virt-tar-out.pod:5
21149 msgid "virt-tar-out - Pack a virtual machine disk image directory into a tarball."
21153 #: ../fish/virt-tar-out.pod:9
21156 " virt-tar-out -a disk.img /dir files.tar\n"
21161 #: ../fish/virt-tar-out.pod:11
21164 " virt-tar-out -d domain /dir files.tar\n"
21169 #: ../fish/virt-tar-out.pod:13
21172 " virt-tar-out -d domain /dir - | gzip --best > files.tar.gz\n"
21177 #: ../fish/virt-tar-out.pod:17
21178 msgid "C<virt-tar-out> packs a virtual machine disk image directory into a tarball."
21182 #: ../fish/virt-tar-out.pod:20
21184 "The first parameter is the absolute path of the virtual machine directory. "
21185 "The second parameter is the tar file to write. Use C<-> to write to "
21190 #: ../fish/virt-tar-out.pod:26
21191 msgid "Download the home directories from a guest:"
21195 #: ../fish/virt-tar-out.pod:28
21198 " virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz\n"
21203 #: ../fish/virt-tar-out.pod:32
21205 "This command is just a simple shell script wrapper around the "
21206 "L<guestfish(1)> C<tar-out> command. For anything more complex than a "
21207 "trivial copy, you are probably better off using guestfish directly."
21211 #: ../fish/virt-tar-out.pod:43
21213 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
21214 "L<virt-edit(1)>, L<virt-tar-in(1)>, L<http://libguestfs.org/>."
21218 #: ../fuse/guestmount.pod:5
21219 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
21223 #: ../fuse/guestmount.pod:9
21226 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
21231 #: ../fuse/guestmount.pod:11
21234 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
21239 #: ../fuse/guestmount.pod:13
21242 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
21247 #: ../fuse/guestmount.pod:17
21249 "You must I<not> use C<guestmount> in read-write mode on live virtual "
21250 "machines. If you do this, you risk disk corruption in the VM."
21254 #: ../fuse/guestmount.pod:22
21256 "The guestmount program can be used to mount virtual machine filesystems and "
21257 "other disk images on the host. It uses libguestfs for access to the guest "
21258 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
21259 "a mountable device."
21263 #: ../fuse/guestmount.pod:27
21265 "Along with other options, you have to give at least one device (I<-a> "
21266 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
21267 "option) or use the I<-i> inspection option or the I<--live> option. How "
21268 "this works is better explained in the L<guestfish(1)> manual page, or by "
21269 "looking at the examples below."
21273 #: ../fuse/guestmount.pod:33
21275 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
21276 "by you, and the filesystem will not be visible to any other users unless you "
21277 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
21278 "the filesystem, use the C<fusermount -u> command."
21282 #: ../fuse/guestmount.pod:41
21284 "For a typical Windows guest which has its main filesystem on the first "
21289 #: ../fuse/guestmount.pod:44
21292 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
21297 #: ../fuse/guestmount.pod:46
21299 "For a typical Linux guest which has a /boot filesystem on the first "
21300 "partition, and the root filesystem on a logical volume:"
21304 #: ../fuse/guestmount.pod:49
21307 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
21312 #: ../fuse/guestmount.pod:51
21313 msgid "To get libguestfs to detect guest mountpoints for you:"
21317 #: ../fuse/guestmount.pod:53
21320 " guestmount -a guest.img -i --ro /mnt\n"
21325 #: ../fuse/guestmount.pod:55
21326 msgid "For a libvirt guest called \"Guest\" you could do:"
21330 #: ../fuse/guestmount.pod:57
21333 " guestmount -d Guest -i --ro /mnt\n"
21338 #: ../fuse/guestmount.pod:59
21340 "If you don't know what filesystems are contained in a guest or disk image, "
21341 "use L<virt-filesystems(1)> first:"
21345 #: ../fuse/guestmount.pod:62
21348 " virt-filesystems MyGuest\n"
21353 #: ../fuse/guestmount.pod:64
21355 "If you want to trace the libguestfs calls but without excessive debugging "
21356 "information, we recommend:"
21360 #: ../fuse/guestmount.pod:67
21363 " guestmount [...] --trace /mnt\n"
21368 #: ../fuse/guestmount.pod:69
21369 msgid "If you want to debug the program, we recommend:"
21373 #: ../fuse/guestmount.pod:71
21376 " guestmount [...] --trace --verbose /mnt\n"
21381 #: ../fuse/guestmount.pod:73 ../rescue/virt-rescue.pod:68 ../resize/virt-resize.pod:621
21386 #: ../fuse/guestmount.pod:75
21387 msgid "Other users cannot see the filesystem by default"
21391 #: ../fuse/guestmount.pod:77
21393 "If you mount a filesystem as one user (eg. root), then other users will not "
21394 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
21395 "option when mounting:"
21399 #: ../fuse/guestmount.pod:81
21402 " sudo guestmount [...] -o allow_other /mnt\n"
21407 #: ../fuse/guestmount.pod:83
21408 msgid "Enabling FUSE"
21412 #: ../fuse/guestmount.pod:85
21414 "On some distros, you may need to add yourself to a special group "
21415 "(eg. C<fuse>) before you can use any FUSE filesystem. This is necessary on "
21416 "Debian and derivatives."
21420 #: ../fuse/guestmount.pod:89
21422 "On other distros, no special group is required. It is not necessary on "
21423 "Fedora or Red Hat Enterprise Linux."
21427 #: ../fuse/guestmount.pod:100
21428 msgid "Add a block device or virtual machine image."
21432 #: ../fuse/guestmount.pod:123
21433 msgid "B<--dir-cache-timeout N>"
21437 #: ../fuse/guestmount.pod:125
21439 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
21440 "seconds. The readdir cache [actually, there are several semi-independent "
21441 "caches] is populated after a readdir(2) call with the stat and extended "
21442 "attributes of the files in the directory, in anticipation that they will be "
21443 "requested soon after."
21447 #: ../fuse/guestmount.pod:131
21449 "There is also a different attribute cache implemented by FUSE (see the FUSE "
21450 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
21451 "requests, only cache existing ones."
21455 #: ../fuse/guestmount.pod:151
21457 "If you have untrusted raw-format guest disk images, you should use this "
21458 "option to specify the disk format. This avoids a possible security problem "
21459 "with malicious guests (CVE-2010-3851). See also "
21460 "L<guestfs(3)/guestfs_add_drive_opts>."
21464 #: ../fuse/guestmount.pod:156
21465 msgid "B<--fuse-help>"
21469 #: ../fuse/guestmount.pod:158
21470 msgid "Display help on special FUSE options (see I<-o> below)."
21474 #: ../fuse/guestmount.pod:162
21475 msgid "Display brief help and exit."
21479 #: ../fuse/guestmount.pod:186
21481 "Mount the named partition or logical volume on the given mountpoint B<in the "
21482 "guest> (this has nothing to do with mountpoints in the host)."
21486 #: ../fuse/guestmount.pod:189
21488 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
21489 "something on C</>."
21493 #: ../fuse/guestmount.pod:206
21495 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
21496 "unmounted. If you specify this option, then we don't attempt to sync the "
21497 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
21501 #: ../fuse/guestmount.pod:211
21502 msgid "B<-o option>"
21506 #: ../fuse/guestmount.pod:213
21507 msgid "B<--option option>"
21511 #: ../fuse/guestmount.pod:215
21512 msgid "Pass extra options to FUSE."
21516 #: ../fuse/guestmount.pod:217
21518 "To get a list of all the extra options supported by FUSE, use the command "
21519 "below. Note that only the FUSE I<-o> options can be passed, and only some "
21520 "of them are a good idea."
21524 #: ../fuse/guestmount.pod:221
21527 " guestmount --fuse-help\n"
21532 #: ../fuse/guestmount.pod:223
21533 msgid "Some potentially useful FUSE options:"
21537 #: ../fuse/guestmount.pod:227
21538 msgid "B<-o allow_other>"
21542 #: ../fuse/guestmount.pod:229
21543 msgid "Allow other users to see the filesystem."
21547 #: ../fuse/guestmount.pod:231
21548 msgid "B<-o attr_timeout=N>"
21552 #: ../fuse/guestmount.pod:233
21553 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
21557 #: ../fuse/guestmount.pod:235
21558 msgid "B<-o kernel_cache>"
21562 #: ../fuse/guestmount.pod:237
21564 "Allow the kernel to cache files (reduces the number of reads that have to go "
21565 "through the L<guestfs(3)> API). This is generally a good idea if you can "
21566 "afford the extra memory usage."
21570 #: ../fuse/guestmount.pod:241
21571 msgid "B<-o uid=N> B<-o gid=N>"
21575 #: ../fuse/guestmount.pod:243
21577 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
21578 "the chosen values."
21582 #: ../fuse/guestmount.pod:252
21584 "Add devices and mount everything read-only. Also disallow writes and make "
21585 "the disk appear read-only to FUSE."
21589 #: ../fuse/guestmount.pod:255
21591 "This is highly recommended if you are not going to edit the guest disk. If "
21592 "the guest is running and this option is I<not> supplied, then there is a "
21593 "strong risk of disk corruption in the guest. We try to prevent this from "
21594 "happening, but it is not always possible."
21598 #: ../fuse/guestmount.pod:260 ../rescue/virt-rescue.pod:171
21599 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21603 #: ../fuse/guestmount.pod:264
21604 msgid "Enable SELinux support for the guest."
21608 #: ../fuse/guestmount.pod:270
21609 msgid "Enable verbose messages from underlying libguestfs."
21613 #: ../fuse/guestmount.pod:276
21614 msgid "Display the program version and exit."
21618 #: ../fuse/guestmount.pod:285 ../fuse/guestmount.pod:308 ../rescue/virt-rescue.pod:201 ../rescue/virt-rescue.pod:284
21619 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21623 #: ../fuse/guestmount.pod:289
21628 #: ../fuse/guestmount.pod:291
21629 msgid "Trace libguestfs calls and entry into each FUSE function."
21633 #: ../fuse/guestmount.pod:293
21634 msgid "This also stops the daemon from forking into the background."
21638 #: ../fuse/guestmount.pod:319
21640 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
21641 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
21642 "L<http://fuse.sf.net/>."
21646 #: ../fuse/guestmount.pod:334
21647 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
21651 #: ../inspector/virt-inspector.pod:5
21653 "virt-inspector - Display operating system version and other information "
21654 "about a virtual machine"
21658 #: ../inspector/virt-inspector.pod:9
21661 " virt-inspector [--options] -d domname\n"
21666 #: ../inspector/virt-inspector.pod:11
21669 " virt-inspector [--options] -a disk.img [-a disk.img ...]\n"
21674 #: ../inspector/virt-inspector.pod:15
21677 " virt-inspector domname\n"
21682 #: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:148
21685 " virt-inspector disk.img [disk.img ...]\n"
21690 #: ../inspector/virt-inspector.pod:21
21692 "B<virt-inspector> examines a virtual machine or disk image and tries to "
21693 "determine the version of the operating system and other information about "
21694 "the virtual machine."
21698 #: ../inspector/virt-inspector.pod:25
21699 msgid "Virt-inspector produces XML output for feeding into other programs."
21703 #: ../inspector/virt-inspector.pod:27
21705 "In the normal usage, use C<virt-inspector -d domname> where C<domname> is "
21706 "the libvirt domain (see: C<virsh list --all>)."
21710 #: ../inspector/virt-inspector.pod:30
21712 "You can also run virt-inspector directly on disk images from a single "
21713 "virtual machine. Use C<virt-inspector -a disk.img>. In rare cases a domain "
21714 "has several block devices, in which case you should list several I<-a> "
21715 "options one after another, with the first corresponding to the guest's "
21716 "C</dev/sda>, the second to the guest's C</dev/sdb> and so on."
21720 #: ../inspector/virt-inspector.pod:37
21722 "You can also run virt-inspector on install disks, live CDs, bootable USB "
21723 "keys and similar."
21727 #: ../inspector/virt-inspector.pod:40
21729 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
21730 "inspect several virtual machines, you have to run virt-inspector several "
21731 "times (for example, from a shell script for-loop)."
21735 #: ../inspector/virt-inspector.pod:45
21737 "Because virt-inspector needs direct access to guest images, it won't "
21738 "normally work over remote libvirt connections."
21742 #: ../inspector/virt-inspector.pod:48
21744 "All of the information available from virt-inspector is also available "
21745 "through the core libguestfs inspection API (see L<guestfs(3)/INSPECTION>). "
21746 "The same information can also be fetched using guestfish or via libguestfs "
21747 "bindings in many programming languages (see L<guestfs(3)/USING LIBGUESTFS "
21748 "WITH OTHER PROGRAMMING LANGUAGES>)."
21752 #: ../inspector/virt-inspector.pod:81
21754 "Libvirt is only used if you specify a C<domname> on the command line. If "
21755 "you specify guest block devices directly (I<-a>), then libvirt is not used "
21760 #: ../inspector/virt-inspector.pod:94
21762 "When prompting for keys and passphrases, virt-inspector normally turns "
21763 "echoing off so you cannot see what you are typing. If you are not worried "
21764 "about Tempest attacks and there is no one else in the room you can specify "
21765 "this flag to see what you are typing."
21769 #: ../inspector/virt-inspector.pod:103 ../tools/virt-list-filesystems.pl:93 ../tools/virt-list-partitions.pl:94 ../tools/virt-tar.pl:143 ../tools/virt-win-reg.pl:144
21771 "Specify the format of disk images given on the command line. If this is "
21772 "omitted then the format is autodetected from the content of the disk image."
21776 #: ../inspector/virt-inspector.pod:107 ../tools/virt-list-filesystems.pl:97 ../tools/virt-list-partitions.pl:98 ../tools/virt-tar.pl:147 ../tools/virt-win-reg.pl:148
21778 "If disk images are requested from libvirt, then this program asks libvirt "
21779 "for this information. In this case, the value of the format parameter is "
21784 #: ../inspector/virt-inspector.pod:111 ../resize/virt-resize.pod:391 ../resize/virt-resize.pod:483 ../sparsify/virt-sparsify.pod:131 ../tools/virt-list-filesystems.pl:101 ../tools/virt-list-partitions.pl:102 ../tools/virt-tar.pl:151 ../tools/virt-win-reg.pl:152
21786 "If working with untrusted raw-format guest disk images, you should ensure "
21787 "the format is always specified."
21791 #: ../inspector/virt-inspector.pod:135
21792 msgid "B<--xpath> query"
21796 #: ../inspector/virt-inspector.pod:137
21798 "Perform an XPath query on the XML on stdin, and print the result on stdout. "
21799 "In this mode virt-inspector simply runs an XPath query; all other inspection "
21800 "functions are disabled. See L</XPATH QUERIES> below for some examples."
21804 #: ../inspector/virt-inspector.pod:146
21805 msgid "Previous versions of virt-inspector allowed you to write either:"
21809 #: ../inspector/virt-inspector.pod:152
21812 " virt-inspector guestname\n"
21817 #: ../inspector/virt-inspector.pod:160
21822 #: ../inspector/virt-inspector.pod:162
21824 "The virt-inspector XML is described precisely in a RELAX NG schema file "
21825 "C<virt-inspector.rng> which is supplied with libguestfs. This section is "
21826 "just an overview."
21830 #: ../inspector/virt-inspector.pod:166
21832 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
21833 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
21834 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
21835 "which is vanishingly rare in real world VMs."
21839 #: ../inspector/virt-inspector.pod:171
21840 msgid "E<lt>operatingsystemE<gt>"
21844 #: ../inspector/virt-inspector.pod:173
21846 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
21847 "describe the operating system, its architecture, the descriptive \"product "
21848 "name\" string, the type of OS and so on, as in this example:"
21852 #: ../inspector/virt-inspector.pod:177
21855 " <operatingsystems>\n"
21856 " <operatingsystem>\n"
21857 " <root>/dev/sda2</root>\n"
21858 " <name>windows</name>\n"
21859 " <arch>i386</arch>\n"
21860 " <distro>windows</distro>\n"
21861 " <product_name>Windows 7 Enterprise</product_name>\n"
21862 " <product_variant>Client</product_variant>\n"
21863 " <major_version>6</major_version>\n"
21864 " <minor_version>1</minor_version>\n"
21865 " <windows_systemroot>/Windows</windows_systemroot>\n"
21866 " <format>installed</format>\n"
21871 #: ../inspector/virt-inspector.pod:190
21873 "In brief, E<lt>nameE<gt> is the class of operating system (something like "
21874 "C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
21875 "but many other distros are recognized) and E<lt>archE<gt> is the guest "
21876 "architecture. The other fields are fairly self-explanatory, but because "
21877 "these fields are taken directly from the libguestfs inspection API you can "
21878 "find precise information from L<guestfs(3)/INSPECTION>."
21882 #: ../inspector/virt-inspector.pod:198
21884 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
21885 "of view of libguestfs (block devices may have completely different names "
21886 "inside the VM itself)."
21890 #: ../inspector/virt-inspector.pod:202
21891 msgid "E<lt>mountpointsE<gt>"
21895 #: ../inspector/virt-inspector.pod:204
21897 "Un*x-like guests typically have multiple filesystems which are mounted at "
21898 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
21899 "element which looks like this:"
21903 #: ../inspector/virt-inspector.pod:208
21906 " <operatingsystems>\n"
21907 " <operatingsystem>\n"
21910 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
21911 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
21912 " </mountpoints>\n"
21917 #: ../inspector/virt-inspector.pod:216
21919 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
21920 "and may have completely different names inside the guest. Only mountable "
21921 "filesystems appear in this list, not things like swap devices."
21925 #: ../inspector/virt-inspector.pod:221
21926 msgid "E<lt>filesystemsE<gt>"
21930 #: ../inspector/virt-inspector.pod:223
21932 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
21933 "filesystems belonging to the guest, including swap and empty partitions. "
21934 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
21935 "this OS or shared with this OS and other OSes)."
21939 #: ../inspector/virt-inspector.pod:229
21940 msgid "You might see something like this:"
21944 #: ../inspector/virt-inspector.pod:231
21947 " <operatingsystems>\n"
21948 " <operatingsystem>\n"
21951 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
21952 " <type>ext4</type>\n"
21953 " <label>Fedora-13-x86_64</label>\n"
21954 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
21960 #: ../inspector/virt-inspector.pod:241
21962 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
21963 "the label, and the UUID."
21967 #: ../inspector/virt-inspector.pod:244
21968 msgid "E<lt>applicationsE<gt>"
21972 #: ../inspector/virt-inspector.pod:246
21974 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
21975 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
21980 #: ../inspector/virt-inspector.pod:250
21982 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
21983 "Typical values would be C<rpm> and C<deb>."
21987 #: ../inspector/virt-inspector.pod:253
21989 "E<lt>package_managementE<gt>, if present, describes the package manager. "
21990 "Typical values include C<yum>, C<up2date> and C<apt>"
21994 #: ../inspector/virt-inspector.pod:256
21995 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
21999 #: ../inspector/virt-inspector.pod:259
22002 " <operatingsystems>\n"
22003 " <operatingsystem>\n"
22005 " <applications>\n"
22007 " <name>coreutils</name>\n"
22008 " <version>8.5</version>\n"
22009 " <release>1</release>\n"
22010 " </application>\n"
22015 #: ../inspector/virt-inspector.pod:269
22017 "The version and release fields may not be available for some types guests. "
22018 "Other fields are possible, see "
22019 "L<guestfs(3)/guestfs_inspect_list_applications>."
22023 #: ../inspector/virt-inspector.pod:273
22024 msgid "E<lt>drive_mappingsE<gt>"
22028 #: ../inspector/virt-inspector.pod:275
22030 "For operating systems like Windows which use drive letters, virt-inspector "
22031 "is able to find out how drive letters map to filesystems."
22035 #: ../inspector/virt-inspector.pod:279
22038 " <operatingsystems>\n"
22039 " <operatingsystem>\n"
22041 " <drive_mappings>\n"
22042 " <drive_mapping name=\"C\">/dev/sda2</drive_mapping>\n"
22043 " <drive_mapping name=\"E\">/dev/sdb1</drive_mapping>\n"
22044 " </drive_mappings>\n"
22049 #: ../inspector/virt-inspector.pod:287
22051 "In the example above, drive C maps to the filesystem on the second partition "
22052 "on the first disk, and drive E maps to the filesystem on the first partition "
22053 "on the second disk."
22057 #: ../inspector/virt-inspector.pod:291
22059 "Note that this only covers permanent local filesystem mappings, not things "
22060 "like network shares. Furthermore NTFS volume mount points may not be listed "
22065 #: ../inspector/virt-inspector.pod:295
22066 msgid "E<lt>iconE<gt>"
22070 #: ../inspector/virt-inspector.pod:297
22072 "Virt-inspector is sometimes able to extract an icon or logo for the guest. "
22073 "The icon is returned as base64-encoded PNG data. Note that the icon can be "
22074 "very large and high quality."
22078 #: ../inspector/virt-inspector.pod:301
22081 " <operatingsystems>\n"
22082 " <operatingsystem>\n"
22085 " iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]\n"
22086 " [... many lines of base64 data ...]\n"
22092 #: ../inspector/virt-inspector.pod:309
22094 "To display the icon, you have to extract it and convert the base64 data back "
22095 "to a binary file. Use an XPath query or simply an editor to extract the "
22096 "data, then use the coreutils L<base64(1)> program to do the conversion back "
22101 #: ../inspector/virt-inspector.pod:314
22104 " base64 -i -d < icon.data > icon.png\n"
22109 #: ../inspector/virt-inspector.pod:316
22110 msgid "INSPECTING INSTALL DISKS, LIVE CDs"
22114 #: ../inspector/virt-inspector.pod:318
22116 "Virt-inspector can detect some operating system installers on install disks, "
22117 "live CDs, bootable USB keys and more."
22121 #: ../inspector/virt-inspector.pod:321
22123 "In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
22124 "fields may be present to indicate a live CD, network installer, or one part "
22125 "of a multipart CD. For example:"
22129 #: ../inspector/virt-inspector.pod:325
22132 " <operatingsystems>\n"
22133 " <operatingsystem>\n"
22134 " <root>/dev/sda</root>\n"
22135 " <name>linux</name>\n"
22136 " <arch>i386</arch>\n"
22137 " <distro>ubuntu</distro>\n"
22138 " <product_name>Ubuntu 10.10 "Maverick "
22139 "Meerkat"</product_name>\n"
22140 " <major_version>10</major_version>\n"
22141 " <minor_version>10</minor_version>\n"
22142 " <format>installer</format>\n"
22148 #: ../inspector/virt-inspector.pod:337
22149 msgid "XPATH QUERIES"
22153 #: ../inspector/virt-inspector.pod:339
22155 "Virt-inspector includes built in support for running XPath queries. The "
22156 "reason for including XPath support directly in virt-inspector is simply that "
22157 "there are no good and widely available command line programs that can do "
22158 "XPath queries. The only good one is L<xmlstarlet(1)> and that is not "
22159 "available on Red Hat Enterprise Linux."
22163 #: ../inspector/virt-inspector.pod:346
22165 "To perform an XPath query, use the I<--xpath> option. Note that in this "
22166 "mode, virt-inspector simply reads XML from stdin and outputs the query "
22167 "result on stdout. All other inspection features are disabled in this mode."
22171 #: ../inspector/virt-inspector.pod:353
22174 " $ virt-inspector -d Guest | virt-inspector --xpath '//filesystems'\n"
22176 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
22177 " <type>ext4</type>\n"
22183 #: ../inspector/virt-inspector.pod:359
22186 " $ virt-inspector -d Guest | \\\n"
22187 " virt-inspector --xpath "
22188 "\"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
22194 #: ../inspector/virt-inspector.pod:363
22197 " $ virt-inspector -d Guest | \\\n"
22198 " virt-inspector --xpath 'string(//icon)' | base64 -i -d | display -\n"
22199 " [displays the guest icon, if there is one]\n"
22204 #: ../inspector/virt-inspector.pod:374
22205 msgid "OLD VERSIONS OF VIRT-INSPECTOR"
22209 #: ../inspector/virt-inspector.pod:376
22211 "Early versions of libguestfs shipped with a different virt-inspector program "
22212 "written in Perl (the current version is written in C). The XML output of "
22213 "the Perl virt-inspector was different and it could also output in other "
22214 "formats like text."
22218 #: ../inspector/virt-inspector.pod:381
22219 msgid "The old virt-inspector is no longer supported or shipped with libguestfs."
22223 #: ../inspector/virt-inspector.pod:384
22225 "To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
22226 "versions of virt-inspector with different names:"
22230 #: ../inspector/virt-inspector.pod:387
22233 " virt-inspector Old Perl version.\n"
22234 " virt-inspector2 New C version.\n"
22239 #: ../inspector/virt-inspector.pod:397
22241 "L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, "
22242 "L<base64(1)>, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
22246 #: ../inspector/virt-inspector.pod:414
22247 msgid "Matthew Booth L<mbooth@redhat.com>"
22251 #: ../java/examples/guestfs-java.pod:5
22252 msgid "guestfs-java - How to use libguestfs from Java"
22256 #: ../java/examples/guestfs-java.pod:9
22259 " import com.redhat.et.libguestfs.*;\n"
22264 #: ../java/examples/guestfs-java.pod:11
22267 " GuestFS g = new GuestFS ();\n"
22268 " g.add_drive_opts (\"disk.img\", null);\n"
22274 #: ../java/examples/guestfs-java.pod:17
22276 "This manual page documents how to call libguestfs from the Java programming "
22277 "language. This page just documents the differences from the C API and gives "
22278 "some examples. If you are not familiar with using libguestfs, you also need "
22279 "to read L<guestfs(3)>."
22283 #: ../java/examples/guestfs-java.pod:22 ../ocaml/examples/guestfs-ocaml.pod:53
22284 msgid "CLOSING THE HANDLE"
22288 #: ../java/examples/guestfs-java.pod:24
22290 "The handle is closed when it is reaped by the garbage collector. Because "
22291 "libguestfs handles include a lot of state, it is also possible to close (and "
22292 "hence free) them explicitly by calling the C<close> method."
22296 #: ../java/examples/guestfs-java.pod:29 ../ocaml/examples/guestfs-ocaml.pod:60 ../python/examples/guestfs-python.pod:21 ../ruby/examples/guestfs-ruby.pod:22
22301 #: ../java/examples/guestfs-java.pod:31
22303 "Errors from libguestfs functions are mapped into the C<LibGuestFSException> "
22304 "exception. This has a single parameter which is the error message (a "
22309 #: ../java/examples/guestfs-java.pod:35
22310 msgid "Calling any method on a closed handle raises the same exception."
22314 #: ../java/examples/guestfs-java.pod:47
22316 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22317 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
22318 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>, "
22319 "L<http://caml.inria.fr/>."
22323 #: ../ocaml/examples/guestfs-ocaml.pod:5
22324 msgid "guestfs-ocaml - How to use libguestfs from OCaml"
22328 #: ../ocaml/examples/guestfs-ocaml.pod:9
22329 msgid "Module style:"
22333 #: ../ocaml/examples/guestfs-ocaml.pod:11
22336 " let g = Guestfs.create () in\n"
22337 " Guestfs.add_drive_opts g ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22338 " Guestfs.launch g;\n"
22343 #: ../ocaml/examples/guestfs-ocaml.pod:15
22344 msgid "Object-oriented style:"
22348 #: ../ocaml/examples/guestfs-ocaml.pod:17
22351 " let g = new Guestfs.guestfs () in\n"
22352 " g#add_drive_opts ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22358 #: ../ocaml/examples/guestfs-ocaml.pod:21
22361 " ocamlfind opt prog.ml -package guestfs -linkpkg -o prog\n"
22363 " ocamlopt -I +guestfs mlguestfs.cmxa prog.ml -o prog\n"
22368 #: ../ocaml/examples/guestfs-ocaml.pod:27
22370 "This manual page documents how to call libguestfs from the OCaml programming "
22371 "language. This page just documents the differences from the C API and gives "
22372 "some examples. If you are not familiar with using libguestfs, you also need "
22373 "to read L<guestfs(3)>."
22377 #: ../ocaml/examples/guestfs-ocaml.pod:32
22378 msgid "PROGRAMMING STYLES"
22382 #: ../ocaml/examples/guestfs-ocaml.pod:34
22384 "There are two different programming styles supported by the OCaml bindings. "
22385 "You can use a module style, with each C function mapped to an OCaml "
22390 #: ../ocaml/examples/guestfs-ocaml.pod:38
22393 " int guestfs_set_verbose (guestfs_h *g, int flag);\n"
22398 #: ../ocaml/examples/guestfs-ocaml.pod:40
22403 #: ../ocaml/examples/guestfs-ocaml.pod:42
22406 " val Guestfs.set_verbose : Guestfs.t -> bool -> unit\n"
22411 #: ../ocaml/examples/guestfs-ocaml.pod:44
22413 "Alternately you can use an object-oriented style, calling methods on the "
22414 "class C<Guestfs.guestfs>:"
22418 #: ../ocaml/examples/guestfs-ocaml.pod:47
22421 " method set_verbose : bool -> unit\n"
22426 #: ../ocaml/examples/guestfs-ocaml.pod:49
22428 "The object-oriented style is usually briefer, and the minor performance "
22429 "penalty isn't noticable in the general overhead of performing libguestfs "
22434 #: ../ocaml/examples/guestfs-ocaml.pod:55
22436 "The handle is closed when it is reaped by the garbage collector. Because "
22437 "libguestfs handles include a lot of state, it is also possible to close (and "
22438 "hence free) them explicitly by calling C<Guestfs.close> or the C<#close> "
22443 #: ../ocaml/examples/guestfs-ocaml.pod:62
22445 "Errors from libguestfs functions are mapped into the C<Guestfs.Error> "
22446 "exception. This has a single parameter which is the error message (a "
22451 #: ../ocaml/examples/guestfs-ocaml.pod:66
22453 "Calling any function/method on a closed handle raises "
22454 "C<Guestfs.Handle_closed>. The single parameter is the name of the function "
22459 #: ../ocaml/examples/guestfs-ocaml.pod:80
22461 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22462 "L<guestfs-java(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
22463 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>, "
22464 "L<http://caml.inria.fr/>."
22468 #: ../perl/examples/guestfs-perl.pod:5
22469 msgid "guestfs-perl - How to use libguestfs from Perl"
22473 #: ../perl/examples/guestfs-perl.pod:9
22476 " use Sys::Guestfs;\n"
22481 #: ../perl/examples/guestfs-perl.pod:11
22484 " my $h = Sys::Guestfs->new ();\n"
22485 " $h->add_drive_opts ('guest.img', format => 'raw');\n"
22486 " $h->launch ();\n"
22487 " $h->mount_options ('', '/dev/sda1', '/');\n"
22488 " $h->touch ('/hello');\n"
22494 #: ../perl/examples/guestfs-perl.pod:20
22496 "This manual page documents how to call libguestfs from the Perl programming "
22497 "language. This page just documents the differences from the C API and gives "
22498 "some examples. If you are not familiar with using libguestfs, you also need "
22499 "to read L<guestfs(3)>. To read the full Perl API, see L<Sys::Guestfs(3)>."
22503 #: ../perl/examples/guestfs-perl.pod:26
22508 #: ../perl/examples/guestfs-perl.pod:28
22510 "Errors from libguestfs functions turn into calls to C<croak> (see "
22515 #: ../perl/examples/guestfs-perl.pod:41
22517 "L<Sys::Guestfs(3)>, L<guestfs(3)>, L<guestfs-examples(3)>, "
22518 "L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, "
22519 "L<guestfs-python(3)>, L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, "
22520 "L<http://libguestfs.org/>."
22524 #: ../python/examples/guestfs-python.pod:5
22525 msgid "guestfs-python - How to use libguestfs from Python"
22529 #: ../python/examples/guestfs-python.pod:9
22532 " import guestfs\n"
22533 " g = guestfs.GuestFS ()\n"
22534 " g.add_drive_opts (\"disk.img\", format=\"raw\", readonly=1)\n"
22540 #: ../python/examples/guestfs-python.pod:16
22542 "This manual page documents how to call libguestfs from the Python "
22543 "programming language. This page just documents the differences from the C "
22544 "API and gives some examples. If you are not familiar with using libguestfs, "
22545 "you also need to read L<guestfs(3)>."
22549 #: ../python/examples/guestfs-python.pod:23
22551 "Errors from libguestfs functions are mapped into C<RuntimeException> with a "
22552 "single string argument which is the error message."
22556 #: ../python/examples/guestfs-python.pod:26
22557 msgid "MORE DOCUMENTATION"
22561 #: ../python/examples/guestfs-python.pod:28
22566 #: ../python/examples/guestfs-python.pod:30
22570 " >>> import guestfs\n"
22571 " >>> help (guestfs)\n"
22576 #: ../python/examples/guestfs-python.pod:44
22578 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22579 "L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, "
22580 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
22584 #: ../rescue/virt-rescue.pod:5
22585 msgid "virt-rescue - Run a rescue shell on a virtual machine"
22589 #: ../rescue/virt-rescue.pod:9
22592 " virt-rescue [--options] -d domname\n"
22597 #: ../rescue/virt-rescue.pod:11
22600 " virt-rescue [--options] -a disk.img [-a disk.img ...]\n"
22605 #: ../rescue/virt-rescue.pod:15
22608 " virt-rescue [--options] domname\n"
22613 #: ../rescue/virt-rescue.pod:17
22616 " virt-rescue [--options] disk.img [disk.img ...]\n"
22621 #: ../rescue/virt-rescue.pod:21
22623 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
22624 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
22625 "you from doing this, but doesn't catch all cases."
22629 #: ../rescue/virt-rescue.pod:25
22631 "However if you use the I<--ro> (read only) option, then you can attach a "
22632 "shell to a live virtual machine. The results might be strange or "
22633 "inconsistent at times but you won't get disk corruption."
22637 #: ../rescue/virt-rescue.pod:31
22639 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
22640 "need for a CD. virt-rescue gives you a rescue shell and some simple "
22641 "recovery tools which you can use to examine or rescue a virtual machine or "
22646 #: ../rescue/virt-rescue.pod:36
22648 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
22649 "on disk image(s):"
22653 #: ../rescue/virt-rescue.pod:39
22656 " virt-rescue -d GuestName\n"
22661 #: ../rescue/virt-rescue.pod:41
22664 " virt-rescue --ro -a /path/to/disk.img\n"
22669 #: ../rescue/virt-rescue.pod:43
22672 " virt-rescue -a /dev/sdc\n"
22677 #: ../rescue/virt-rescue.pod:45
22678 msgid "For live VMs you I<must> use the --ro option."
22682 #: ../rescue/virt-rescue.pod:47
22684 "When you run virt-rescue on a virtual machine or disk image, you are placed "
22685 "in an interactive bash shell where you can use many ordinary Linux "
22686 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
22687 "appliance. You must mount the virtual machine's filesystems by hand. There "
22688 "is an empty directory called C</sysroot> where you can mount filesystems."
22692 #: ../rescue/virt-rescue.pod:54
22694 "In the example below, we list logical volumes, then choose one to mount "
22695 "under C</sysroot>:"
22699 #: ../rescue/virt-rescue.pod:57
22703 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
22704 " lv_root vg_f11x64 -wi-a- 8.83G\n"
22705 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
22706 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
22707 " ><rescue> ls /sysroot\n"
22712 #: ../rescue/virt-rescue.pod:64
22714 "If you don't know what filesystems are available on the virtual machine then "
22715 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
22719 #: ../rescue/virt-rescue.pod:70
22721 "Virt-rescue can be used on I<any> disk image file or device, not just a "
22722 "virtual machine. For example you can use it on a blank file if you want to "
22723 "partition that file (although we would recommend using L<guestfish(1)> "
22724 "instead as it is more suitable for this purpose). You can even use "
22725 "virt-rescue on things like SD cards."
22729 #: ../rescue/virt-rescue.pod:76
22731 "Virt-rescue does not require root. You only need to run it as root if you "
22732 "need root to open the disk image."
22736 #: ../rescue/virt-rescue.pod:79
22738 "This tool is just designed for quick interactive hacking on a virtual "
22739 "machine. For more structured access to a virtual machine disk image, you "
22740 "should use L<guestfs(3)>. To get a structured shell that you can use to "
22741 "make scripted changes to guests, use L<guestfish(1)>."
22745 #: ../rescue/virt-rescue.pod:103
22746 msgid "B<--append kernelopts>"
22750 #: ../rescue/virt-rescue.pod:105
22751 msgid "Pass additional options to the rescue kernel."
22755 #: ../rescue/virt-rescue.pod:135
22758 " virt-rescue --format=raw -a disk.img\n"
22763 #: ../rescue/virt-rescue.pod:139
22766 " virt-rescue --format=raw -a disk.img --format -a another.img\n"
22771 #: ../rescue/virt-rescue.pod:148
22776 #: ../rescue/virt-rescue.pod:150
22777 msgid "B<--memsize MB>"
22781 #: ../rescue/virt-rescue.pod:152
22783 "Change the amount of memory allocated to the rescue system. The default is "
22784 "set by libguestfs and is small but adequate for running system tools. The "
22785 "occasional program might need more memory. The parameter is specified in "
22790 #: ../rescue/virt-rescue.pod:157
22791 msgid "B<--network>"
22795 #: ../rescue/virt-rescue.pod:159
22796 msgid "Enable QEMU user networking in the guest. See L</NETWORK>."
22800 #: ../rescue/virt-rescue.pod:165
22801 msgid "Open the image read-only."
22805 #: ../rescue/virt-rescue.pod:175
22807 "Enable SELinux in the rescue appliance. You should read "
22808 "L<guestfs(3)/SELINUX> before using this option."
22812 #: ../rescue/virt-rescue.pod:178
22817 #: ../rescue/virt-rescue.pod:180
22818 msgid "Enable N E<ge> 2 virtual CPUs in the rescue appliance."
22822 #: ../rescue/virt-rescue.pod:198
22824 "This changes the I<-a> and I<-d> options so that disks are added and mounts "
22825 "are done read-write."
22829 #: ../rescue/virt-rescue.pod:211
22830 msgid "Previous versions of virt-rescue allowed you to write either:"
22834 #: ../rescue/virt-rescue.pod:213
22837 " virt-rescue disk.img [disk.img ...]\n"
22842 #: ../rescue/virt-rescue.pod:217
22845 " virt-rescue guestname\n"
22850 #: ../rescue/virt-rescue.pod:225
22855 #: ../rescue/virt-rescue.pod:227
22857 "Adding the I<--network> option enables QEMU user networking in the rescue "
22858 "appliance. There are some differences between user networking and ordinary "
22863 #: ../rescue/virt-rescue.pod:233
22864 msgid "ping does not work"
22868 #: ../rescue/virt-rescue.pod:235
22870 "Because the ICMP ECHO_REQUEST protocol generally requires root in order to "
22871 "send the ping packets, and because virt-rescue must be able to run as "
22872 "non-root, QEMU user networking is not able to emulate the L<ping(8)> "
22873 "command. The ping command will appear to resolve addresses but will not be "
22874 "able to send or receive any packets. This does not mean that the network is "
22879 #: ../rescue/virt-rescue.pod:242
22880 msgid "cannot receive connections"
22884 #: ../rescue/virt-rescue.pod:244
22885 msgid "QEMU user networking cannot receive incoming connections."
22889 #: ../rescue/virt-rescue.pod:246
22890 msgid "making TCP connections"
22894 #: ../rescue/virt-rescue.pod:248
22896 "The virt-rescue appliance needs to be small and so does not include many "
22897 "network tools. In particular there is no L<telnet(1)> command. You can "
22898 "make TCP connections from the shell using the magical "
22899 "C</dev/tcp/E<lt>hostnameE<gt>/E<lt>portE<gt>> syntax:"
22903 #: ../rescue/virt-rescue.pod:253
22906 " exec 3<>/dev/tcp/redhat.com/80\n"
22907 " echo \"GET /\" >&3\n"
22913 #: ../rescue/virt-rescue.pod:257
22914 msgid "See L<bash(1)> for more details."
22918 #: ../rescue/virt-rescue.pod:263
22920 "Several environment variables affect virt-rescue. See "
22921 "L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list."
22925 #: ../rescue/virt-rescue.pod:290
22927 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
22928 "L<http://libguestfs.org/>."
22932 #: ../resize/virt-resize.pod:5
22933 msgid "virt-resize - Resize a virtual machine disk"
22937 #: ../resize/virt-resize.pod:9
22940 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
22941 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
22942 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
22947 #: ../resize/virt-resize.pod:15
22949 "Virt-resize is a tool which can resize a virtual machine disk, making it "
22950 "larger or smaller overall, and resizing or deleting any partitions contained "
22955 #: ../resize/virt-resize.pod:19
22957 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
22958 "not> be used on live virtual machines - for consistent results, shut the "
22959 "virtual machine down before resizing it."
22963 #: ../resize/virt-resize.pod:23
22965 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
22966 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
22970 #: ../resize/virt-resize.pod:31 ../resize/virt-resize.pod:597 ../sparsify/virt-sparsify.pod:202 ../src/guestfs.pod:484 ../src/guestfs.pod:1302 ../src/guestfs.pod:1441 ../src/guestfs.pod:2690
22975 #: ../resize/virt-resize.pod:33
22977 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
22978 "fill the extra 5GB of space."
22982 #: ../resize/virt-resize.pod:36
22985 " virt-filesystems --long -h --all -a olddisk\n"
22990 #: ../resize/virt-resize.pod:38
22993 " truncate -r olddisk newdisk\n"
22994 " truncate -s +5G newdisk\n"
22999 #: ../resize/virt-resize.pod:41
23002 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
23003 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
23008 #: ../resize/virt-resize.pod:44 ../resize/virt-resize.pod:604 ../sparsify/virt-sparsify.pod:209 ../src/guestfs.pod:490 ../src/guestfs.pod:1306 ../src/guestfs.pod:1445 ../src/guestfs.pod:2715
23013 #: ../resize/virt-resize.pod:46
23015 "As above, but make the /boot partition 200MB bigger, while giving the "
23016 "remaining space to /dev/sda2:"
23020 #: ../resize/virt-resize.pod:49
23023 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
23024 " olddisk newdisk\n"
23029 #: ../resize/virt-resize.pod:52 ../resize/virt-resize.pod:610 ../sparsify/virt-sparsify.pod:215 ../src/guestfs.pod:501 ../src/guestfs.pod:1451
23034 #: ../resize/virt-resize.pod:54
23036 "As in the first example, but expand a logical volume as the final step. "
23037 "This is what you would typically use for Linux guests that use LVM:"
23041 #: ../resize/virt-resize.pod:58
23044 " virt-resize --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root \\\n"
23045 " olddisk newdisk\n"
23050 #: ../resize/virt-resize.pod:61
23055 #: ../resize/virt-resize.pod:63
23057 "As in the first example, but the output format will be qcow2 instead of a "
23062 #: ../resize/virt-resize.pod:66
23065 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
23066 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
23071 #: ../resize/virt-resize.pod:71
23072 msgid "DETAILED USAGE"
23076 #: ../resize/virt-resize.pod:73
23077 msgid "EXPANDING A VIRTUAL MACHINE DISK"
23081 #: ../resize/virt-resize.pod:77
23082 msgid "1. Shut down the virtual machine"
23086 #: ../resize/virt-resize.pod:79
23087 msgid "2. Locate input disk image"
23091 #: ../resize/virt-resize.pod:81
23093 "Locate the input disk image (ie. the file or device on the host containing "
23094 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
23095 "dumpxml> like this to find the disk image name:"
23099 #: ../resize/virt-resize.pod:85
23102 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
23103 " Found 1 nodes:\n"
23105 " <source dev=\"/dev/vg/lv_guest\" />\n"
23110 #: ../resize/virt-resize.pod:90
23111 msgid "3. Look at current sizing"
23115 #: ../resize/virt-resize.pod:92
23116 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
23120 #: ../resize/virt-resize.pod:95
23123 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
23124 " Name Type Size Parent\n"
23125 " /dev/sda1 partition 101M /dev/sda\n"
23126 " /dev/sda2 partition 7.9G /dev/sda\n"
23127 " /dev/sda device 8.0G -\n"
23132 #: ../resize/virt-resize.pod:101
23134 "(This example is a virtual machine with an 8 GB disk which we would like to "
23135 "expand up to 10 GB)."
23139 #: ../resize/virt-resize.pod:104
23140 msgid "4. Create output disk"
23144 #: ../resize/virt-resize.pod:106
23146 "Virt-resize cannot do in-place disk modifications. You have to have space "
23147 "to store the resized output disk."
23151 #: ../resize/virt-resize.pod:109
23152 msgid "To store the resized disk image in a file, create a file of a suitable size:"
23156 #: ../resize/virt-resize.pod:112
23159 " # rm -f outdisk\n"
23160 " # truncate -s 10G outdisk\n"
23165 #: ../resize/virt-resize.pod:115
23166 msgid "Or use L<lvcreate(1)> to create a logical volume:"
23170 #: ../resize/virt-resize.pod:117
23173 " # lvcreate -L 10G -n lv_name vg_name\n"
23178 #: ../resize/virt-resize.pod:119
23179 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
23183 #: ../resize/virt-resize.pod:121
23186 " # virsh pool-list\n"
23187 " # virsh vol-create-as poolname newvol 10G\n"
23192 #: ../resize/virt-resize.pod:124
23197 #: ../resize/virt-resize.pod:126
23199 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
23200 "file) and the output disk. The output disk is the one created in the "
23205 #: ../resize/virt-resize.pod:130
23208 " # virt-resize indisk outdisk\n"
23213 #: ../resize/virt-resize.pod:132
23215 "This command just copies disk image C<indisk> to disk image C<outdisk> "
23216 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
23217 "larger, then an extra, empty partition is created at the end of the disk "
23218 "covering the extra space. If C<outdisk> is smaller, then it will give an "
23223 #: ../resize/virt-resize.pod:138
23225 "More realistically you'd want to expand existing partitions in the disk "
23226 "image by passing extra options (for the full list see the L</OPTIONS> "
23231 #: ../resize/virt-resize.pod:142
23233 "L</--expand> is the most useful option. It expands the named partition "
23234 "within the disk to fill any extra space:"
23238 #: ../resize/virt-resize.pod:145
23241 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
23246 #: ../resize/virt-resize.pod:147
23248 "(In this case, an extra partition is I<not> created at the end of the disk, "
23249 "because there will be no unused space)."
23253 #: ../resize/virt-resize.pod:150
23255 "L</--resize> is the other commonly used option. The following would "
23256 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
23257 "rest of the available space:"
23261 #: ../resize/virt-resize.pod:154
23264 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
23265 " indisk outdisk\n"
23270 #: ../resize/virt-resize.pod:157
23272 "If the expanded partition in the image contains a filesystem or LVM PV, then "
23273 "if virt-resize knows how, it will resize the contents, the equivalent of "
23274 "calling a command such as L<pvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)> "
23275 "or L<btrfs(8)>. However virt-resize does not know how to resize some "
23276 "filesystems, so you would have to online resize them after booting the "
23281 #: ../resize/virt-resize.pod:164
23282 msgid "Other options are covered below."
23286 #: ../resize/virt-resize.pod:166
23291 #: ../resize/virt-resize.pod:168
23292 msgid "Thoroughly test the new disk image I<before> discarding the old one."
23296 #: ../resize/virt-resize.pod:170
23297 msgid "If you are using libvirt, edit the XML to point at the new disk:"
23301 #: ../resize/virt-resize.pod:172
23304 " # virsh edit guestname\n"
23309 #: ../resize/virt-resize.pod:174
23311 "Change E<lt>source ...E<gt>, see "
23312 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
23316 #: ../resize/virt-resize.pod:177
23317 msgid "Then start up the domain with the new, resized disk:"
23321 #: ../resize/virt-resize.pod:179
23324 " # virsh start guestname\n"
23329 #: ../resize/virt-resize.pod:181
23331 "and check that it still works. See also the L</NOTES> section below for "
23332 "additional information."
23336 #: ../resize/virt-resize.pod:184
23337 msgid "7. Resize LVs etc inside the guest"
23341 #: ../resize/virt-resize.pod:186
23342 msgid "(This can also be done offline using L<guestfish(1)>)"
23346 #: ../resize/virt-resize.pod:188
23348 "Once the guest has booted you should see the new space available, at least "
23349 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
23350 "may need to resize LVs inside PVs, and also resize filesystem types that "
23351 "virt-resize does not know how to expand."
23355 #: ../resize/virt-resize.pod:195
23356 msgid "SHRINKING A VIRTUAL MACHINE DISK"
23360 #: ../resize/virt-resize.pod:197
23362 "Shrinking is somewhat more complex than expanding, and only an overview is "
23367 #: ../resize/virt-resize.pod:200
23369 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
23370 "filesystems). The user has to shrink content before passing the disk image "
23371 "to virt-resize, and virt-resize will check that the content has been shrunk "
23376 #: ../resize/virt-resize.pod:205
23377 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
23381 #: ../resize/virt-resize.pod:207
23383 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
23384 "steps 3 and 4 above to allocate a new disk image."
23388 #: ../resize/virt-resize.pod:210
23389 msgid "Then run virt-resize with any of the I<--shrink> and/or I<--resize> options."
23393 #: ../resize/virt-resize.pod:213
23394 msgid "IGNORING OR DELETING PARTITIONS"
23398 #: ../resize/virt-resize.pod:215
23400 "virt-resize also gives a convenient way to ignore or delete partitions when "
23401 "copying from the input disk to the output disk. Ignoring a partition speeds "
23402 "up the copy where you don't care about the existing contents of a "
23403 "partition. Deleting a partition removes it completely, but note that it "
23404 "also renumbers any partitions after the one which is deleted, which can "
23405 "leave some guests unbootable."
23409 #: ../resize/virt-resize.pod:222
23410 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
23414 #: ../resize/virt-resize.pod:224
23416 "If the input disk is in qcow2 format, then you may prefer that the output is "
23417 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
23418 "the fly. The output format is simply determined by the format of the empty "
23419 "output container that you provide. Thus to create qcow2 output, use:"
23423 #: ../resize/virt-resize.pod:230
23426 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
23431 #: ../resize/virt-resize.pod:232
23432 msgid "instead of the truncate command (use I<-c> for a compressed disk)."
23436 #: ../resize/virt-resize.pod:234
23437 msgid "Similarly, to get non-sparse raw output use:"
23441 #: ../resize/virt-resize.pod:236
23444 " fallocate -l size outdisk\n"
23449 #: ../resize/virt-resize.pod:238
23451 "(on older systems that don't have the L<fallocate(1)> command use C<dd "
23452 "if=/dev/zero of=outdisk bs=1M count=..>)"
23456 #: ../resize/virt-resize.pod:241
23457 msgid "LOGICAL PARTITIONS"
23461 #: ../resize/virt-resize.pod:243
23463 "Logical partitions (a.k.a. C</dev/sda5+> on disks using DOS partition "
23464 "tables) cannot be resized."
23468 #: ../resize/virt-resize.pod:246
23470 "To understand what is going on, firstly one of the four partitions "
23471 "C</dev/sda1-4> will have MBR partition type C<05> or C<0f>. This is called "
23472 "the B<extended partition>. Use L<virt-filesystems(1)> to see the MBR "
23477 #: ../resize/virt-resize.pod:251
23478 msgid "Logical partitions live inside the extended partition."
23482 #: ../resize/virt-resize.pod:253
23484 "The extended partition can be expanded, but not shrunk (unless you force it, "
23485 "which is not advisable). When the extended partition is copied across, all "
23486 "the logical partitions contained inside are copied over implicitly. "
23487 "Virt-resize does not look inside the extended partition, so it copies the "
23488 "logical partitions blindly."
23492 #: ../resize/virt-resize.pod:259
23494 "You cannot specify a logical partition (C</dev/sda5+>) at all on the command "
23495 "line. Doing so will give an error."
23499 #: ../resize/virt-resize.pod:268 ../sparsify/virt-sparsify.pod:105
23500 msgid "Display help."
23504 #: ../resize/virt-resize.pod:270
23505 msgid "B<--align-first auto>"
23509 #: ../resize/virt-resize.pod:272
23510 msgid "B<--align-first never>"
23514 #: ../resize/virt-resize.pod:274
23515 msgid "B<--align-first always>"
23519 #: ../resize/virt-resize.pod:276
23521 "Align the first partition for improved performance (see also the "
23522 "I<--alignment> option)."
23526 #: ../resize/virt-resize.pod:279
23528 "The default is I<--align-first auto> which only aligns the first partition "
23529 "if it is safe to do so. That is, only when we know how to fix the "
23530 "bootloader automatically, and at the moment that can only be done for "
23535 #: ../resize/virt-resize.pod:284
23537 "I<--align-first never> means we never move the first partition. This is the "
23538 "safest option. Try this if the guest does not boot after resizing."
23542 #: ../resize/virt-resize.pod:288
23544 "I<--align-first always> means we always align the first partition (if it "
23545 "needs to be aligned). For some guests this will break the bootloader, "
23546 "making the guest unbootable."
23550 #: ../resize/virt-resize.pod:292
23551 msgid "B<--alignment N>"
23555 #: ../resize/virt-resize.pod:294
23557 "Set the alignment of partitions to C<N> sectors. The default in virt-resize "
23558 "E<lt> 1.13.19 was 64 sectors, and after that is 128 sectors."
23562 #: ../resize/virt-resize.pod:298
23564 "Assuming 512 byte sector size inside the guest, here are some suitable "
23569 #: ../resize/virt-resize.pod:303
23570 msgid "I<--alignment 1> (512 bytes)"
23574 #: ../resize/virt-resize.pod:305
23576 "The partitions would be packed together as closely as possible, but would be "
23577 "completely unaligned. In some cases this can cause very poor performance. "
23578 "See L<virt-alignment-scan(1)> for further details."
23582 #: ../resize/virt-resize.pod:309
23583 msgid "I<--alignment 8> (4K)"
23587 #: ../resize/virt-resize.pod:311
23589 "This would be the minimum acceptable alignment for reasonable performance on "
23594 #: ../resize/virt-resize.pod:314
23595 msgid "I<--alignment 128> (64K)"
23599 #: ../resize/virt-resize.pod:316
23601 "This alignment provides good performance when the host is using high end "
23606 #: ../resize/virt-resize.pod:319
23607 msgid "I<--alignment 2048> (1M)"
23611 #: ../resize/virt-resize.pod:321
23613 "This is the standard alignment used by all newly installed guests since "
23618 #: ../resize/virt-resize.pod:326
23623 #: ../resize/virt-resize.pod:328 ../tools/virt-make-fs.pl:177 ../tools/virt-win-reg.pl:120
23628 #: ../resize/virt-resize.pod:330 ../tools/virt-win-reg.pl:122
23629 msgid "Enable debugging messages."
23633 #: ../resize/virt-resize.pod:332
23634 msgid "B<--delete part>"
23638 #: ../resize/virt-resize.pod:334
23640 "Delete the named partition. It would be more accurate to describe this as "
23641 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
23642 "the original disk image is left intact."
23646 #: ../resize/virt-resize.pod:338
23648 "Note that when you delete a partition, then anything contained in the "
23649 "partition is also deleted. Furthermore, this causes any partitions that "
23650 "come after to be I<renumbered>, which can easily make your guest unbootable."
23654 #: ../resize/virt-resize.pod:343 ../resize/virt-resize.pod:404 ../resize/virt-resize.pod:531 ../sparsify/virt-sparsify.pod:144
23655 msgid "You can give this option multiple times."
23659 #: ../resize/virt-resize.pod:345
23660 msgid "B<--expand part>"
23664 #: ../resize/virt-resize.pod:347
23666 "Expand the named partition so it uses up all extra space (space left over "
23667 "after any other resize changes that you request have been done)."
23671 #: ../resize/virt-resize.pod:350
23673 "If virt-resize knows how, it will expand the direct content of the "
23674 "partition. For example, if the partition is an LVM PV, it will expand the "
23675 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
23676 "content it doesn't know about alone."
23680 #: ../resize/virt-resize.pod:355
23681 msgid "Currently virt-resize can resize:"
23685 #: ../resize/virt-resize.pod:361
23686 msgid "ext2, ext3 and ext4 filesystems."
23690 #: ../resize/virt-resize.pod:365
23691 msgid "NTFS filesystems, if libguestfs was compiled with support for NTFS."
23695 #: ../resize/virt-resize.pod:367
23697 "The filesystem must have been shut down consistently last time it was used. "
23698 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
23699 "consistency check, so at the first boot after resizing Windows will check "
23704 #: ../resize/virt-resize.pod:374
23706 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
23707 "inside the PV, but see the I<--LV-expand> option. The user could also "
23708 "resize LVs as desired after boot."
23712 #: ../resize/virt-resize.pod:380
23713 msgid "Btrfs filesystems, if libguestfs was compiled with support for btrfs."
23717 #: ../resize/virt-resize.pod:384 ../resize/virt-resize.pod:559
23718 msgid "Note that you cannot use I<--expand> and I<--shrink> together."
23722 #: ../resize/virt-resize.pod:386 ../sparsify/virt-sparsify.pod:124 ../tools/virt-list-filesystems.pl:91 ../tools/virt-list-partitions.pl:92 ../tools/virt-tar.pl:141 ../tools/virt-win-reg.pl:142
23723 msgid "B<--format> raw"
23727 #: ../resize/virt-resize.pod:388 ../sparsify/virt-sparsify.pod:128
23729 "Specify the format of the input disk image. If this flag is not given then "
23730 "it is auto-detected from the image itself."
23734 #: ../resize/virt-resize.pod:394
23736 "Note that this option I<does not> affect the output format. See L</QCOW2 "
23737 "AND NON-SPARSE RAW FORMATS>."
23741 #: ../resize/virt-resize.pod:397
23742 msgid "B<--ignore part>"
23746 #: ../resize/virt-resize.pod:399
23748 "Ignore the named partition. Effectively this means the partition is "
23749 "allocated on the destination disk, but the content is not copied across from "
23750 "the source disk. The content of the partition will be blank (all zero "
23755 #: ../resize/virt-resize.pod:406
23756 msgid "B<--LV-expand logvol>"
23760 #: ../resize/virt-resize.pod:408
23762 "This takes the logical volume and, as a final step, expands it to fill all "
23763 "the space available in its volume group. A typical usage, assuming a Linux "
23764 "guest with a single PV C</dev/sda2> and a root device called "
23765 "C</dev/vg_guest/lv_root> would be:"
23769 #: ../resize/virt-resize.pod:413
23772 " virt-resize indisk outdisk \\\n"
23773 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
23778 #: ../resize/virt-resize.pod:416
23780 "This would first expand the partition (and PV), and then expand the root "
23781 "device to fill the extra space in the PV."
23785 #: ../resize/virt-resize.pod:419
23787 "The contents of the LV are also resized if virt-resize knows how to do "
23788 "that. You can stop virt-resize from trying to expand the content by using "
23789 "the option I<--no-expand-content>."
23793 #: ../resize/virt-resize.pod:423
23794 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
23798 #: ../resize/virt-resize.pod:425
23800 "You can give this option multiple times, I<but> it doesn't make sense to do "
23801 "this unless the logical volumes you specify are all in different volume "
23806 #: ../resize/virt-resize.pod:429 ../sparsify/virt-sparsify.pod:146
23807 msgid "B<--machine-readable>"
23811 #: ../resize/virt-resize.pod:431 ../sparsify/virt-sparsify.pod:148
23813 "This option is used to make the output more machine friendly when being "
23814 "parsed by other programs. See L</MACHINE READABLE OUTPUT> below."
23818 #: ../resize/virt-resize.pod:437
23819 msgid "B<--dryrun>"
23823 #: ../resize/virt-resize.pod:439
23824 msgid "Print a summary of what would be done, but don't do anything."
23828 #: ../resize/virt-resize.pod:441
23829 msgid "B<--no-copy-boot-loader>"
23833 #: ../resize/virt-resize.pod:443
23835 "By default, virt-resize copies over some sectors at the start of the disk "
23836 "(up to the beginning of the first partition). Commonly these sectors "
23837 "contain the Master Boot Record (MBR) and the boot loader, and are required "
23838 "in order for the guest to boot correctly."
23842 #: ../resize/virt-resize.pod:448
23844 "If you specify this flag, then this initial copy is not done. You may need "
23845 "to reinstall the boot loader in this case."
23849 #: ../resize/virt-resize.pod:451
23850 msgid "B<--no-extra-partition>"
23854 #: ../resize/virt-resize.pod:453
23856 "By default, virt-resize creates an extra partition if there is any extra, "
23857 "unused space after all resizing has happened. Use this option to prevent "
23858 "the extra partition from being created. If you do this then the extra space "
23859 "will be inaccessible until you run fdisk, parted, or some other partitioning "
23860 "tool in the guest."
23864 #: ../resize/virt-resize.pod:459
23866 "Note that if the surplus space is smaller than 10 MB, no extra partition "
23871 #: ../resize/virt-resize.pod:462
23872 msgid "B<--no-expand-content>"
23876 #: ../resize/virt-resize.pod:464
23878 "By default, virt-resize will try to expand the direct contents of "
23879 "partitions, if it knows how (see I<--expand> option above)."
23883 #: ../resize/virt-resize.pod:467
23885 "If you give the I<--no-expand-content> option then virt-resize will not "
23890 #: ../resize/virt-resize.pod:470
23891 msgid "B<--ntfsresize-force>"
23895 #: ../resize/virt-resize.pod:472
23897 "Pass the I<--force> option to L<ntfsresize(8)>, allowing resizing even if "
23898 "the NTFS disk is marked as needing a consistency check. You have to use "
23899 "this option if you want to resize a Windows guest multiple times without "
23900 "booting into Windows between each resize."
23904 #: ../resize/virt-resize.pod:478
23905 msgid "B<--output-format> raw"
23909 #: ../resize/virt-resize.pod:480
23911 "Specify the format of the output disk image. If this flag is not given then "
23912 "it is auto-detected from the image itself."
23916 #: ../resize/virt-resize.pod:486
23918 "Note that this option I<does not create> the output format. This option "
23919 "just tells libguestfs what it is so it doesn't try to guess it. You still "
23920 "need to create the output disk with the right format. See L</QCOW2 AND "
23921 "NON-SPARSE RAW FORMATS>."
23925 #: ../resize/virt-resize.pod:495
23926 msgid "Don't print the summary."
23930 #: ../resize/virt-resize.pod:497
23931 msgid "B<--resize part=size>"
23935 #: ../resize/virt-resize.pod:499
23937 "Resize the named partition (expanding or shrinking it) so that it has the "
23942 #: ../resize/virt-resize.pod:502
23944 "C<size> can be expressed as an absolute number followed by b/K/M/G to mean "
23945 "bytes, Kilobytes, Megabytes, or Gigabytes; or as a percentage of the current "
23946 "size; or as a relative number or percentage. For example:"
23950 #: ../resize/virt-resize.pod:508
23953 " --resize /dev/sda2=10G\n"
23958 #: ../resize/virt-resize.pod:510
23961 " --resize /dev/sda4=90%\n"
23966 #: ../resize/virt-resize.pod:512
23969 " --resize /dev/sda2=+1G\n"
23974 #: ../resize/virt-resize.pod:514
23977 " --resize /dev/sda2=-200M\n"
23982 #: ../resize/virt-resize.pod:516
23985 " --resize /dev/sda1=+128K\n"
23990 #: ../resize/virt-resize.pod:518
23993 " --resize /dev/sda1=+10%\n"
23998 #: ../resize/virt-resize.pod:520
24001 " --resize /dev/sda1=-10%\n"
24006 #: ../resize/virt-resize.pod:522
24008 "You can increase the size of any partition. Virt-resize will expand the "
24009 "direct content of the partition if it knows how (see I<--expand> below)."
24013 #: ../resize/virt-resize.pod:526
24015 "You can only I<decrease> the size of partitions that contain filesystems or "
24016 "PVs which have already been shrunk. Virt-resize will check this has been "
24017 "done before proceeding, or else will print an error (see also "
24018 "I<--resize-force>)."
24022 #: ../resize/virt-resize.pod:533
24023 msgid "B<--resize-force part=size>"
24027 #: ../resize/virt-resize.pod:535
24029 "This is the same as I<--resize> except that it will let you decrease the "
24030 "size of any partition. Generally this means you will lose any data which "
24031 "was at the end of the partition you shrink, but you may not care about that "
24032 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
24033 "as a swap partition)."
24037 #: ../resize/virt-resize.pod:541
24038 msgid "See also the I<--ignore> option."
24042 #: ../resize/virt-resize.pod:543
24043 msgid "B<--shrink part>"
24047 #: ../resize/virt-resize.pod:545
24049 "Shrink the named partition until the overall disk image fits in the "
24050 "destination. The named partition B<must> contain a filesystem or PV which "
24051 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
24052 "online tools). Virt-resize will check this and give an error if it has not "
24057 #: ../resize/virt-resize.pod:551
24059 "The amount by which the overall disk must be shrunk (after carrying out all "
24060 "other operations requested by the user) is called the \"deficit\". For "
24061 "example, a straight copy (assume no other operations) from a 5GB disk image "
24062 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
24063 "would give an error unless the user specified a partition to shrink and that "
24064 "partition had more than a gigabyte of free space."
24068 #: ../resize/virt-resize.pod:569 ../sparsify/virt-sparsify.pod:176
24069 msgid "MACHINE READABLE OUTPUT"
24073 #: ../resize/virt-resize.pod:571
24075 "The I<--machine-readable> option can be used to make the output more machine "
24076 "friendly, which is useful when calling virt-resize from other programs, GUIs "
24081 #: ../resize/virt-resize.pod:575 ../sparsify/virt-sparsify.pod:182
24082 msgid "There are two ways to use this option."
24086 #: ../resize/virt-resize.pod:577
24088 "Firstly use the option on its own to query the capabilities of the "
24089 "virt-resize binary. Typical output looks like this:"
24093 #: ../resize/virt-resize.pod:580
24096 " $ virt-resize --machine-readable\n"
24098 " ntfsresize-force\n"
24106 #: ../resize/virt-resize.pod:587 ../sparsify/virt-sparsify.pod:192
24108 "A list of features is printed, one per line, and the program exits with "
24113 #: ../resize/virt-resize.pod:590 ../sparsify/virt-sparsify.pod:195
24115 "Secondly use the option in conjunction with other options to make the "
24116 "regular program output more machine friendly."
24120 #: ../resize/virt-resize.pod:593 ../sparsify/virt-sparsify.pod:198
24121 msgid "At the moment this means:"
24125 #: ../resize/virt-resize.pod:599 ../sparsify/virt-sparsify.pod:204
24127 "Progress bar messages can be parsed from stdout by looking for this regular "
24132 #: ../resize/virt-resize.pod:602 ../sparsify/virt-sparsify.pod:207
24135 " ^[0-9]+/[0-9]+$\n"
24140 #: ../resize/virt-resize.pod:606 ../sparsify/virt-sparsify.pod:211
24142 "The calling program should treat messages sent to stdout (except for "
24143 "progress bar messages) as status messages. They can be logged and/or "
24144 "displayed to the user."
24148 #: ../resize/virt-resize.pod:612
24150 "The calling program should treat messages sent to stderr as error messages. "
24151 "In addition, virt-resize exits with a non-zero status code if there was a "
24156 #: ../resize/virt-resize.pod:618
24158 "Versions of the program prior to 1.13.9 did not support the "
24159 "I<--machine-readable> option and will return an error."
24163 #: ../resize/virt-resize.pod:623
24164 msgid "\"Partition 1 does not end on cylinder boundary.\""
24168 #: ../resize/virt-resize.pod:625
24170 "Virt-resize aligns partitions to multiples of 128 sectors (see the "
24171 "I<--alignment> parameter). Usually this means the partitions will not be "
24172 "aligned to the ancient CHS geometry. However CHS geometry is meaningless "
24173 "for disks manufactured since the early 1990s, and doubly so for virtual hard "
24174 "drives. Alignment of partitions to cylinders is not required by any modern "
24175 "operating system."
24179 #: ../resize/virt-resize.pod:632
24180 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
24184 #: ../resize/virt-resize.pod:634
24186 "In Windows Vista and later versions, Microsoft switched to using a separate "
24187 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
24188 "and C</dev/sda2> is the main (C:) drive. Resizing the first (boot) "
24189 "partition causes the bootloader to fail with C<0xC0000225> error. Resizing "
24190 "the second partition (ie. C: drive) should work."
24194 #: ../resize/virt-resize.pod:641
24196 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
24197 "NTFS partitions have been expanded. This is just a safety check and (unless "
24198 "it find errors) is nothing to worry about."
24202 #: ../resize/virt-resize.pod:645
24203 msgid "GUEST BOOT STUCK AT \"GRUB\""
24207 #: ../resize/virt-resize.pod:647
24209 "If a Linux guest does not boot after resizing, and the boot is stuck after "
24210 "printing C<GRUB> on the console, try reinstalling grub."
24214 #: ../resize/virt-resize.pod:650
24217 " guestfish -i -a newdisk\n"
24218 " ><fs> cat /boot/grub/device.map\n"
24219 " # check the contents of this file are sensible or\n"
24220 " # edit the file if necessary\n"
24221 " ><fs> grub-install / /dev/vda\n"
24227 #: ../resize/virt-resize.pod:657
24229 "For more flexible guest reconfiguration, including if you need to specify "
24230 "other parameters to grub-install, use L<virt-rescue(1)>."
24234 #: ../resize/virt-resize.pod:660
24235 msgid "ALTERNATIVE TOOLS"
24239 #: ../resize/virt-resize.pod:662
24241 "There are several proprietary tools for resizing partitions. We won't "
24242 "mention any here."
24246 #: ../resize/virt-resize.pod:665
24248 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
24249 "operations on disk images. They can resize and move partitions, but I don't "
24250 "think they can do anything with the contents, and they certainly don't "
24255 #: ../resize/virt-resize.pod:670
24257 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
24258 "but at a much lower level. You will probably end up hand-calculating sector "
24259 "offsets, which is something that virt-resize was designed to avoid. If you "
24260 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
24265 #: ../resize/virt-resize.pod:690
24267 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, "
24268 "L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, "
24269 "L<ntfsresize(8)>, L<btrfs(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, "
24270 "L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, "
24271 "L<virt-sparsify(1)>, L<virt-alignment-scan(1)>, L<http://libguestfs.org/>."
24275 #: ../ruby/examples/guestfs-ruby.pod:5
24276 msgid "guestfs-ruby - How to use libguestfs from Ruby"
24280 #: ../ruby/examples/guestfs-ruby.pod:9
24283 " require 'guestfs'\n"
24284 " g = Guestfs::Guestfs.new()\n"
24285 " g.add_drive_opts(\"disk.img\",\n"
24286 " :readonly => 1, :format => \"raw\")\n"
24292 #: ../ruby/examples/guestfs-ruby.pod:17
24294 "This manual page documents how to call libguestfs from the Ruby programming "
24295 "language. This page just documents the differences from the C API and gives "
24296 "some examples. If you are not familiar with using libguestfs, you also need "
24297 "to read L<guestfs(3)>."
24301 #: ../ruby/examples/guestfs-ruby.pod:24
24303 "Errors from libguestfs functions are mapped into the C<Error> exception. "
24304 "This has a single parameter which is the error message (a string)."
24308 #: ../ruby/examples/guestfs-ruby.pod:38
24310 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
24311 "L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, "
24312 "L<guestfs-python(3)>, L<guestfs-recipes(1)>, L<http://libguestfs.org/>."
24316 #: ../sparsify/virt-sparsify.pod:5
24317 msgid "virt-sparsify - Make a virtual machine disk sparse"
24321 #: ../sparsify/virt-sparsify.pod:9
24324 " virt-sparsify [--options] indisk outdisk\n"
24329 #: ../sparsify/virt-sparsify.pod:13
24331 "Virt-sparsify is a tool which can make a virtual machine disk (or any disk "
24332 "image) sparse a.k.a. thin-provisioned. This means that free space within "
24333 "the disk image can be converted back to free space on the host."
24337 #: ../sparsify/virt-sparsify.pod:18
24339 "Virt-sparsify can locate and sparsify free space in most filesystems "
24340 "(eg. ext2/3/4, btrfs, NTFS, etc.), and also in LVM physical volumes."
24344 #: ../sparsify/virt-sparsify.pod:21
24346 "Virt-sparsify can also convert between some disk formats, for example "
24347 "converting a raw disk image to a thin-provisioned qcow2 image."
24351 #: ../sparsify/virt-sparsify.pod:24
24353 "Virt-sparsify can operate on any disk image, not just ones from virtual "
24354 "machines. If a virtual machine has more than one attached disk, you must "
24355 "sparsify each one separately."
24359 #: ../sparsify/virt-sparsify.pod:28
24360 msgid "IMPORTANT LIMITATIONS"
24364 #: ../sparsify/virt-sparsify.pod:34
24366 "Virt-sparsify does not do in-place modifications. It copies from a source "
24367 "image to a destination image, leaving the source unchanged. I<Check that "
24368 "the sparsification was successful before deleting the source image>."
24372 #: ../sparsify/virt-sparsify.pod:41
24373 msgid "The virtual machine I<must be shut down> before using this tool."
24377 #: ../sparsify/virt-sparsify.pod:45
24379 "Virt-sparsify may require up to 2x the virtual size of the source disk image "
24380 "(1 temporary copy + 1 destination image). This is in the worst case and "
24381 "usually much less space is required."
24385 #: ../sparsify/virt-sparsify.pod:51
24386 msgid "Virt-sparsify cannot resize disk images. To do that, use L<virt-resize(1)>."
24390 #: ../sparsify/virt-sparsify.pod:56
24391 msgid "Virt-sparsify cannot handle encrypted disks."
24395 #: ../sparsify/virt-sparsify.pod:60
24397 "Virt-sparsify cannot yet sparsify the space between partitions. Note that "
24398 "this space is often used for critical items like bootloaders so it's not "
24403 #: ../sparsify/virt-sparsify.pod:66
24405 "Virt-sparsify does not yet know how to sparsify swapspace. It is not safe "
24406 "to do this unless we can be sure there is no hibernation data, so at the "
24407 "moment swap partitions are ignored."
24411 #: ../sparsify/virt-sparsify.pod:72
24413 "You may also want to read the manual pages for the associated tools "
24414 "L<virt-filesystems(1)> and L<virt-df(1)> before starting."
24418 #: ../sparsify/virt-sparsify.pod:77
24419 msgid "Typical usage is:"
24423 #: ../sparsify/virt-sparsify.pod:79
24426 " virt-sparsify indisk outdisk\n"
24431 #: ../sparsify/virt-sparsify.pod:81
24433 "which copies C<indisk> to C<outdisk>, making the output sparse. C<outdisk> "
24434 "is created, or overwritten if it already exists. The format of the input "
24435 "disk is detected (eg. qcow2) and the same format is used for the output "
24440 #: ../sparsify/virt-sparsify.pod:86
24441 msgid "To convert between formats, use the I<--convert> option:"
24445 #: ../sparsify/virt-sparsify.pod:88
24448 " virt-sparsify disk.raw --convert qcow2 disk.qcow2\n"
24453 #: ../sparsify/virt-sparsify.pod:90
24455 "Virt-sparsify tries to zero and sparsify free space on every filesystem it "
24456 "can find within the source disk image. You can get it to ignore (don't zero "
24457 "free space on) certain filesystems by doing:"
24461 #: ../sparsify/virt-sparsify.pod:94
24464 " virt-sparsify --ignore /dev/sda1 indisk outdisk\n"
24469 #: ../sparsify/virt-sparsify.pod:96
24470 msgid "See L<virt-filesystems(1)> to get a list of filesystems within a disk image."
24474 #: ../sparsify/virt-sparsify.pod:107
24475 msgid "B<--convert> raw"
24479 #: ../sparsify/virt-sparsify.pod:109
24480 msgid "B<--convert> qcow2"
24484 #: ../sparsify/virt-sparsify.pod:111
24485 msgid "B<--convert> [other formats]"
24489 #: ../sparsify/virt-sparsify.pod:113
24491 "Use C<output-format> as the format for the destination image. If this is "
24492 "not specified, then the input format is used."
24496 #: ../sparsify/virt-sparsify.pod:116
24497 msgid "Supported and known-working output formats are: C<raw>, C<qcow2>, C<vdi>."
24501 #: ../sparsify/virt-sparsify.pod:118
24503 "You can also use any format supported by the L<qemu-img(1)> program, "
24504 "eg. C<vmdk>, but support for other formats is reliant on qemu."
24508 #: ../sparsify/virt-sparsify.pod:121
24510 "Specifying the I<--convert> option is usually a good idea, because then "
24511 "virt-sparsify doesn't need to try to guess the input format."
24515 #: ../sparsify/virt-sparsify.pod:126
24516 msgid "B<--format> qcow2"
24520 #: ../sparsify/virt-sparsify.pod:134
24521 msgid "B<--ignore> filesystem"
24525 #: ../sparsify/virt-sparsify.pod:136
24526 msgid "B<--ignore> volgroup"
24530 #: ../sparsify/virt-sparsify.pod:138
24532 "Ignore the named filesystem. Free space on the filesystem will not be "
24533 "zeroed, but existing blocks of zeroes will still be sparsified."
24537 #: ../sparsify/virt-sparsify.pod:141
24539 "In the second form, this ignores the named volume group. Use the volume "
24540 "group name without the C</dev/> prefix, eg. I<--ignore vg_foo>"
24544 #: ../sparsify/virt-sparsify.pod:156
24545 msgid "This disables progress bars and other unnecessary output."
24549 #: ../sparsify/virt-sparsify.pod:178
24551 "The I<--machine-readable> option can be used to make the output more machine "
24552 "friendly, which is useful when calling virt-sparsify from other programs, "
24557 #: ../sparsify/virt-sparsify.pod:184
24559 "Firstly use the option on its own to query the capabilities of the "
24560 "virt-sparsify binary. Typical output looks like this:"
24564 #: ../sparsify/virt-sparsify.pod:187
24567 " $ virt-sparsify --machine-readable\n"
24575 #: ../sparsify/virt-sparsify.pod:217
24577 "The calling program should treat messages sent to stderr as error messages. "
24578 "In addition, virt-sparsify exits with a non-zero status code if there was a "
24583 #: ../sparsify/virt-sparsify.pod:223
24585 "All versions of virt-sparsify have supported the I<--machine-readable> "
24590 #: ../sparsify/virt-sparsify.pod:237
24592 "Location of the temporary directory used for the potentially large temporary "
24597 #: ../sparsify/virt-sparsify.pod:240
24599 "You should ensure there is enough free space in the worst case for a full "
24600 "copy of the source disk (I<virtual> size), or else set C<$TMPDIR> to point "
24601 "to another directory that has enough space."
24605 #: ../sparsify/virt-sparsify.pod:244
24606 msgid "This defaults to C</tmp>."
24610 #: ../sparsify/virt-sparsify.pod:248
24611 msgid "For other environment variables, see L<guestfs(3)/ENVIRONMENT VARIABLES>."
24615 #: ../sparsify/virt-sparsify.pod:252
24617 "L<virt-filesystems(1)>, L<virt-df(1)>, L<virt-resize(1)>, L<virt-rescue(1)>, "
24618 "L<guestfs(3)>, L<guestfish(1)>, L<truncate(1)>, L<fallocate(1)>, "
24619 "L<qemu-img(1)>, L<http://libguestfs.org/>."
24623 #: ../src/guestfs-actions.pod:1
24624 msgid "guestfs_add_cdrom"
24628 #: ../src/guestfs-actions.pod:3
24632 " guestfs_add_cdrom (guestfs_h *g,\n"
24633 " const char *filename);\n"
24638 #: ../src/guestfs-actions.pod:7 ../src/guestfs-actions.pod:302 ../src/guestfs-actions.pod:323
24640 "I<This function is deprecated.> In new code, use the "
24641 "L</guestfs_add_drive_opts> call instead."
24645 #: ../src/guestfs-actions.pod:24
24647 "This call checks for the existence of C<filename>. This stops you from "
24648 "specifying other types of drive which are supported by qemu such as C<nbd:> "
24649 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
24654 #: ../src/guestfs-actions.pod:31
24656 "If you just want to add an ISO file (often you use this as an efficient way "
24657 "to transfer large files into the guest), then you should probably use "
24658 "C<guestfs_add_drive_ro> instead."
24662 #: ../src/guestfs-actions.pod:37 ../src/guestfs-actions.pod:187 ../src/guestfs-actions.pod:254 ../src/guestfs-actions.pod:291 ../src/guestfs-actions.pod:312 ../src/guestfs-actions.pod:333 ../src/guestfs-actions.pod:346 ../src/guestfs-actions.pod:360 ../src/guestfs-actions.pod:480 ../src/guestfs-actions.pod:500 ../src/guestfs-actions.pod:514 ../src/guestfs-actions.pod:559 ../src/guestfs-actions.pod:587 ../src/guestfs-actions.pod:605 ../src/guestfs-actions.pod:672 ../src/guestfs-actions.pod:705 ../src/guestfs-actions.pod:719 ../src/guestfs-actions.pod:734 ../src/guestfs-actions.pod:833 ../src/guestfs-actions.pod:851 ../src/guestfs-actions.pod:865 ../src/guestfs-actions.pod:879 ../src/guestfs-actions.pod:916 ../src/guestfs-actions.pod:1099 ../src/guestfs-actions.pod:1119 ../src/guestfs-actions.pod:1137 ../src/guestfs-actions.pod:1227 ../src/guestfs-actions.pod:1286 ../src/guestfs-actions.pod:1332 ../src/guestfs-actions.pod:1372 ../src/guestfs-actions.pod:1425 ../src/guestfs-actions.pod:1478 ../src/guestfs-actions.pod:1536 ../src/guestfs-actions.pod:1590 ../src/guestfs-actions.pod:1609 ../src/guestfs-actions.pod:1623 ../src/guestfs-actions.pod:1651 ../src/guestfs-actions.pod:1721 ../src/guestfs-actions.pod:1752 ../src/guestfs-actions.pod:1777 ../src/guestfs-actions.pod:1819 ../src/guestfs-actions.pod:1932 ../src/guestfs-actions.pod:1959 ../src/guestfs-actions.pod:2174 ../src/guestfs-actions.pod:2196 ../src/guestfs-actions.pod:2283 ../src/guestfs-actions.pod:2791 ../src/guestfs-actions.pod:2935 ../src/guestfs-actions.pod:2996 ../src/guestfs-actions.pod:3031 ../src/guestfs-actions.pod:4088 ../src/guestfs-actions.pod:4103 ../src/guestfs-actions.pod:4128 ../src/guestfs-actions.pod:4317 ../src/guestfs-actions.pod:4331 ../src/guestfs-actions.pod:4344 ../src/guestfs-actions.pod:4358 ../src/guestfs-actions.pod:4373 ../src/guestfs-actions.pod:4409 ../src/guestfs-actions.pod:4481 ../src/guestfs-actions.pod:4501 ../src/guestfs-actions.pod:4518 ../src/guestfs-actions.pod:4538 ../src/guestfs-actions.pod:4558 ../src/guestfs-actions.pod:4593 ../src/guestfs-actions.pod:4612 ../src/guestfs-actions.pod:4631 ../src/guestfs-actions.pod:4666 ../src/guestfs-actions.pod:4678 ../src/guestfs-actions.pod:4711 ../src/guestfs-actions.pod:4727 ../src/guestfs-actions.pod:4740 ../src/guestfs-actions.pod:4755 ../src/guestfs-actions.pod:4772 ../src/guestfs-actions.pod:4865 ../src/guestfs-actions.pod:4885 ../src/guestfs-actions.pod:4898 ../src/guestfs-actions.pod:4949 ../src/guestfs-actions.pod:4967 ../src/guestfs-actions.pod:4985 ../src/guestfs-actions.pod:5001 ../src/guestfs-actions.pod:5015 ../src/guestfs-actions.pod:5029 ../src/guestfs-actions.pod:5046 ../src/guestfs-actions.pod:5061 ../src/guestfs-actions.pod:5088 ../src/guestfs-actions.pod:5151 ../src/guestfs-actions.pod:5224 ../src/guestfs-actions.pod:5255 ../src/guestfs-actions.pod:5274 ../src/guestfs-actions.pod:5293 ../src/guestfs-actions.pod:5305 ../src/guestfs-actions.pod:5322 ../src/guestfs-actions.pod:5335 ../src/guestfs-actions.pod:5350 ../src/guestfs-actions.pod:5365 ../src/guestfs-actions.pod:5397 ../src/guestfs-actions.pod:5423 ../src/guestfs-actions.pod:5462 ../src/guestfs-actions.pod:5482 ../src/guestfs-actions.pod:5496 ../src/guestfs-actions.pod:5513 ../src/guestfs-actions.pod:5562 ../src/guestfs-actions.pod:5615 ../src/guestfs-actions.pod:5662 ../src/guestfs-actions.pod:5705 ../src/guestfs-actions.pod:5733 ../src/guestfs-actions.pod:5750 ../src/guestfs-actions.pod:5768 ../src/guestfs-actions.pod:5905 ../src/guestfs-actions.pod:5962 ../src/guestfs-actions.pod:5984 ../src/guestfs-actions.pod:6002 ../src/guestfs-actions.pod:6054 ../src/guestfs-actions.pod:6120 ../src/guestfs-actions.pod:6137 ../src/guestfs-actions.pod:6150 ../src/guestfs-actions.pod:6164 ../src/guestfs-actions.pod:6453 ../src/guestfs-actions.pod:6472 ../src/guestfs-actions.pod:6491 ../src/guestfs-actions.pod:6505 ../src/guestfs-actions.pod:6517 ../src/guestfs-actions.pod:6531 ../src/guestfs-actions.pod:6543 ../src/guestfs-actions.pod:6557 ../src/guestfs-actions.pod:6573 ../src/guestfs-actions.pod:6591 ../src/guestfs-actions.pod:6610 ../src/guestfs-actions.pod:6629 ../src/guestfs-actions.pod:6659 ../src/guestfs-actions.pod:6677 ../src/guestfs-actions.pod:6700 ../src/guestfs-actions.pod:6718 ../src/guestfs-actions.pod:6737 ../src/guestfs-actions.pod:6758 ../src/guestfs-actions.pod:6777 ../src/guestfs-actions.pod:6794 ../src/guestfs-actions.pod:6813 ../src/guestfs-actions.pod:6841 ../src/guestfs-actions.pod:6865 ../src/guestfs-actions.pod:6884 ../src/guestfs-actions.pod:6900 ../src/guestfs-actions.pod:6924 ../src/guestfs-actions.pod:6943 ../src/guestfs-actions.pod:6958 ../src/guestfs-actions.pod:6977 ../src/guestfs-actions.pod:7021 ../src/guestfs-actions.pod:7048 ../src/guestfs-actions.pod:7078 ../src/guestfs-actions.pod:7190 ../src/guestfs-actions.pod:7311 ../src/guestfs-actions.pod:7323 ../src/guestfs-actions.pod:7336 ../src/guestfs-actions.pod:7349 ../src/guestfs-actions.pod:7371 ../src/guestfs-actions.pod:7384 ../src/guestfs-actions.pod:7397 ../src/guestfs-actions.pod:7410 ../src/guestfs-actions.pod:7425 ../src/guestfs-actions.pod:7484 ../src/guestfs-actions.pod:7501 ../src/guestfs-actions.pod:7517 ../src/guestfs-actions.pod:7533 ../src/guestfs-actions.pod:7550 ../src/guestfs-actions.pod:7563 ../src/guestfs-actions.pod:7583 ../src/guestfs-actions.pod:7619 ../src/guestfs-actions.pod:7633 ../src/guestfs-actions.pod:7674 ../src/guestfs-actions.pod:7687 ../src/guestfs-actions.pod:7705 ../src/guestfs-actions.pod:7739 ../src/guestfs-actions.pod:7775 ../src/guestfs-actions.pod:7891 ../src/guestfs-actions.pod:7906 ../src/guestfs-actions.pod:7920 ../src/guestfs-actions.pod:7975 ../src/guestfs-actions.pod:7988 ../src/guestfs-actions.pod:8033 ../src/guestfs-actions.pod:8073 ../src/guestfs-actions.pod:8129 ../src/guestfs-actions.pod:8149 ../src/guestfs-actions.pod:8182 ../src/guestfs-actions.pod:8246 ../src/guestfs-actions.pod:8269 ../src/guestfs-actions.pod:8295
24663 msgid "This function returns 0 on success or -1 on error."
24667 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:189 ../src/guestfs-actions.pod:1334 ../src/guestfs-actions.pod:2397 ../src/guestfs-actions.pod:2495 ../src/guestfs-actions.pod:2620 ../src/guestfs-actions.pod:4090 ../src/guestfs-actions.pod:4110 ../src/guestfs-actions.pod:5399 ../src/guestfs-actions.pod:6679 ../src/guestfs-actions.pod:6796 ../src/guestfs-actions.pod:6945 ../src/guestfs-actions.pod:7427 ../src/guestfs-actions.pod:7552 ../src/guestfs-actions.pod:8075
24668 msgid "(Added in 0.3)"
24672 #: ../src/guestfs-actions.pod:41
24673 msgid "guestfs_add_domain"
24677 #: ../src/guestfs-actions.pod:43
24681 " guestfs_add_domain (guestfs_h *g,\n"
24682 " const char *dom,\n"
24688 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:198 ../src/guestfs-actions.pod:890 ../src/guestfs-actions.pod:1214 ../src/guestfs-actions.pod:1266 ../src/guestfs-actions.pod:1344 ../src/guestfs-actions.pod:1413 ../src/guestfs-actions.pod:1466 ../src/guestfs-actions.pod:1519 ../src/guestfs-actions.pod:3288 ../src/guestfs-actions.pod:5100 ../src/guestfs-actions.pod:5409 ../src/guestfs-actions.pod:5626
24690 "You may supply a list of optional arguments to this call. Use zero or more "
24691 "of the following pairs of parameters, and terminate the list with C<-1> on "
24692 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
24696 #: ../src/guestfs-actions.pod:53
24699 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
24700 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
24701 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
24702 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
24703 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
24704 " GUESTFS_ADD_DOMAIN_READONLYDISK, const char *readonlydisk,\n"
24709 #: ../src/guestfs-actions.pod:60
24711 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
24712 "It works by connecting to libvirt, requesting the domain and domain XML from "
24713 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
24718 #: ../src/guestfs-actions.pod:141
24720 "The other optional parameters are passed directly through to "
24721 "C<guestfs_add_drive_opts>."
24725 #: ../src/guestfs-actions.pod:144 ../src/guestfs-actions.pod:403 ../src/guestfs-actions.pod:573 ../src/guestfs-actions.pod:751 ../src/guestfs-actions.pod:782 ../src/guestfs-actions.pod:800 ../src/guestfs-actions.pod:819 ../src/guestfs-actions.pod:1797 ../src/guestfs-actions.pod:2153 ../src/guestfs-actions.pod:2356 ../src/guestfs-actions.pod:2467 ../src/guestfs-actions.pod:2518 ../src/guestfs-actions.pod:2570 ../src/guestfs-actions.pod:2584 ../src/guestfs-actions.pod:2607 ../src/guestfs-actions.pod:2922 ../src/guestfs-actions.pod:3406 ../src/guestfs-actions.pod:3424 ../src/guestfs-actions.pod:5585 ../src/guestfs-actions.pod:5802 ../src/guestfs-actions.pod:6040 ../src/guestfs-actions.pod:6234 ../src/guestfs-actions.pod:6260 ../src/guestfs-actions.pod:7660 ../src/guestfs-actions.pod:8086 ../src/guestfs-actions.pod:8099 ../src/guestfs-actions.pod:8112
24726 msgid "On error this function returns -1."
24730 #: ../src/guestfs-actions.pod:146
24731 msgid "(Added in 1.7.4)"
24735 #: ../src/guestfs-actions.pod:148
24736 msgid "guestfs_add_domain_va"
24740 #: ../src/guestfs-actions.pod:150
24744 " guestfs_add_domain_va (guestfs_h *g,\n"
24745 " const char *dom,\n"
24746 " va_list args);\n"
24751 #: ../src/guestfs-actions.pod:155
24752 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
24756 #: ../src/guestfs-actions.pod:157 ../src/guestfs-actions.pod:168 ../src/guestfs-actions.pod:267 ../src/guestfs-actions.pod:278 ../src/guestfs-actions.pod:929 ../src/guestfs-actions.pod:940 ../src/guestfs-actions.pod:1242 ../src/guestfs-actions.pod:1255 ../src/guestfs-actions.pod:1301 ../src/guestfs-actions.pod:1314 ../src/guestfs-actions.pod:1391 ../src/guestfs-actions.pod:1403 ../src/guestfs-actions.pod:1444 ../src/guestfs-actions.pod:1456 ../src/guestfs-actions.pod:1497 ../src/guestfs-actions.pod:1509 ../src/guestfs-actions.pod:1555 ../src/guestfs-actions.pod:1567 ../src/guestfs-actions.pod:3372 ../src/guestfs-actions.pod:3384 ../src/guestfs-actions.pod:5165 ../src/guestfs-actions.pod:5177 ../src/guestfs-actions.pod:5437 ../src/guestfs-actions.pod:5449 ../src/guestfs-actions.pod:5675 ../src/guestfs-actions.pod:5686
24757 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
24761 #: ../src/guestfs-actions.pod:159
24762 msgid "guestfs_add_domain_argv"
24766 #: ../src/guestfs-actions.pod:161
24770 " guestfs_add_domain_argv (guestfs_h *g,\n"
24771 " const char *dom,\n"
24772 " const struct guestfs_add_domain_argv *optargs);\n"
24777 #: ../src/guestfs-actions.pod:166
24778 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
24782 #: ../src/guestfs-actions.pod:170
24783 msgid "guestfs_add_drive"
24787 #: ../src/guestfs-actions.pod:172
24791 " guestfs_add_drive (guestfs_h *g,\n"
24792 " const char *filename);\n"
24797 #: ../src/guestfs-actions.pod:176
24799 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
24800 "optional parameters, so the disk is added writable, with the format being "
24801 "detected automatically."
24805 #: ../src/guestfs-actions.pod:180
24807 "Automatic detection of the format opens you up to a potential security hole "
24808 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
24809 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
24810 "you should think about replacing calls to this function with calls to "
24811 "C<guestfs_add_drive_opts>, and specifying the format."
24815 #: ../src/guestfs-actions.pod:191
24816 msgid "guestfs_add_drive_opts"
24820 #: ../src/guestfs-actions.pod:193
24824 " guestfs_add_drive_opts (guestfs_h *g,\n"
24825 " const char *filename,\n"
24831 #: ../src/guestfs-actions.pod:203
24834 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
24835 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
24836 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
24837 " GUESTFS_ADD_DRIVE_OPTS_NAME, const char *name,\n"
24842 #: ../src/guestfs-actions.pod:233
24844 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
24845 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
24846 "Possible formats include C<raw> and C<qcow2>."
24850 #: ../src/guestfs-actions.pod:244
24852 "This rarely-used option lets you emulate the behaviour of the deprecated "
24853 "C<guestfs_add_drive_with_if> call (q.v.)"
24857 #: ../src/guestfs-actions.pod:256
24858 msgid "(Added in 1.5.23)"
24862 #: ../src/guestfs-actions.pod:258
24863 msgid "guestfs_add_drive_opts_va"
24867 #: ../src/guestfs-actions.pod:260
24871 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
24872 " const char *filename,\n"
24873 " va_list args);\n"
24878 #: ../src/guestfs-actions.pod:265
24879 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
24883 #: ../src/guestfs-actions.pod:269
24884 msgid "guestfs_add_drive_opts_argv"
24888 #: ../src/guestfs-actions.pod:271
24892 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
24893 " const char *filename,\n"
24894 " const struct guestfs_add_drive_opts_argv "
24900 #: ../src/guestfs-actions.pod:276
24901 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
24905 #: ../src/guestfs-actions.pod:280
24906 msgid "guestfs_add_drive_ro"
24910 #: ../src/guestfs-actions.pod:282
24914 " guestfs_add_drive_ro (guestfs_h *g,\n"
24915 " const char *filename);\n"
24920 #: ../src/guestfs-actions.pod:286
24922 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
24923 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
24924 "disk is added read-only, with the format being detected automatically."
24928 #: ../src/guestfs-actions.pod:293
24929 msgid "(Added in 1.0.38)"
24933 #: ../src/guestfs-actions.pod:295
24934 msgid "guestfs_add_drive_ro_with_if"
24938 #: ../src/guestfs-actions.pod:297
24942 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
24943 " const char *filename,\n"
24944 " const char *iface);\n"
24949 #: ../src/guestfs-actions.pod:309
24951 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
24952 "QEMU interface emulation to use at run time."
24956 #: ../src/guestfs-actions.pod:314 ../src/guestfs-actions.pod:335 ../src/guestfs-actions.pod:2881
24957 msgid "(Added in 1.0.84)"
24961 #: ../src/guestfs-actions.pod:316
24962 msgid "guestfs_add_drive_with_if"
24966 #: ../src/guestfs-actions.pod:318
24970 " guestfs_add_drive_with_if (guestfs_h *g,\n"
24971 " const char *filename,\n"
24972 " const char *iface);\n"
24977 #: ../src/guestfs-actions.pod:330
24979 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
24980 "QEMU interface emulation to use at run time."
24984 #: ../src/guestfs-actions.pod:337
24985 msgid "guestfs_aug_clear"
24989 #: ../src/guestfs-actions.pod:339
24993 " guestfs_aug_clear (guestfs_h *g,\n"
24994 " const char *augpath);\n"
24999 #: ../src/guestfs-actions.pod:348 ../src/guestfs-actions.pod:2609
25000 msgid "(Added in 1.3.4)"
25004 #: ../src/guestfs-actions.pod:350
25005 msgid "guestfs_aug_close"
25009 #: ../src/guestfs-actions.pod:352
25013 " guestfs_aug_close (guestfs_h *g);\n"
25018 #: ../src/guestfs-actions.pod:355
25020 "Close the current Augeas handle and free up any resources used by it. After "
25021 "calling this, you have to call C<guestfs_aug_init> again before you can use "
25022 "any other Augeas functions."
25026 #: ../src/guestfs-actions.pod:362 ../src/guestfs-actions.pod:387 ../src/guestfs-actions.pod:405 ../src/guestfs-actions.pod:419 ../src/guestfs-actions.pod:482 ../src/guestfs-actions.pod:502 ../src/guestfs-actions.pod:516 ../src/guestfs-actions.pod:547 ../src/guestfs-actions.pod:561 ../src/guestfs-actions.pod:575 ../src/guestfs-actions.pod:589 ../src/guestfs-actions.pod:607 ../src/guestfs-actions.pod:6311
25027 msgid "(Added in 0.7)"
25031 #: ../src/guestfs-actions.pod:364
25032 msgid "guestfs_aug_defnode"
25036 #: ../src/guestfs-actions.pod:366
25039 " struct guestfs_int_bool *\n"
25040 " guestfs_aug_defnode (guestfs_h *g,\n"
25041 " const char *name,\n"
25042 " const char *expr,\n"
25043 " const char *val);\n"
25048 #: ../src/guestfs-actions.pod:375
25050 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
25051 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
25052 "containing that single node."
25056 #: ../src/guestfs-actions.pod:383
25058 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
25059 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
25063 #: ../src/guestfs-actions.pod:389
25064 msgid "guestfs_aug_defvar"
25068 #: ../src/guestfs-actions.pod:391
25072 " guestfs_aug_defvar (guestfs_h *g,\n"
25073 " const char *name,\n"
25074 " const char *expr);\n"
25079 #: ../src/guestfs-actions.pod:407
25080 msgid "guestfs_aug_get"
25084 #: ../src/guestfs-actions.pod:409
25088 " guestfs_aug_get (guestfs_h *g,\n"
25089 " const char *augpath);\n"
25094 #: ../src/guestfs-actions.pod:416 ../src/guestfs-actions.pod:980 ../src/guestfs-actions.pod:998 ../src/guestfs-actions.pod:1058 ../src/guestfs-actions.pod:1074 ../src/guestfs-actions.pod:1177 ../src/guestfs-actions.pod:1666 ../src/guestfs-actions.pod:1683 ../src/guestfs-actions.pod:1702 ../src/guestfs-actions.pod:1836 ../src/guestfs-actions.pod:2024 ../src/guestfs-actions.pod:2136 ../src/guestfs-actions.pod:2299 ../src/guestfs-actions.pod:2316 ../src/guestfs-actions.pod:2383 ../src/guestfs-actions.pod:2426 ../src/guestfs-actions.pod:2447 ../src/guestfs-actions.pod:2632 ../src/guestfs-actions.pod:2846 ../src/guestfs-actions.pod:3050 ../src/guestfs-actions.pod:3152 ../src/guestfs-actions.pod:3256 ../src/guestfs-actions.pod:3275 ../src/guestfs-actions.pod:3490 ../src/guestfs-actions.pod:3518 ../src/guestfs-actions.pod:3539 ../src/guestfs-actions.pod:3573 ../src/guestfs-actions.pod:3636 ../src/guestfs-actions.pod:3656 ../src/guestfs-actions.pod:3676 ../src/guestfs-actions.pod:4303 ../src/guestfs-actions.pod:4650 ../src/guestfs-actions.pod:4817 ../src/guestfs-actions.pod:4927 ../src/guestfs-actions.pod:5820 ../src/guestfs-actions.pod:6021 ../src/guestfs-actions.pod:6209 ../src/guestfs-actions.pod:6387 ../src/guestfs-actions.pod:6436 ../src/guestfs-actions.pod:7096 ../src/guestfs-actions.pod:7112 ../src/guestfs-actions.pod:7136 ../src/guestfs-actions.pod:7160 ../src/guestfs-actions.pod:7834 ../src/guestfs-actions.pod:7853 ../src/guestfs-actions.pod:7871 ../src/guestfs-actions.pod:8045 ../src/guestfs-actions.pod:8359
25096 "This function returns a string, or NULL on error. I<The caller must free "
25097 "the returned string after use>."
25101 #: ../src/guestfs-actions.pod:421
25102 msgid "guestfs_aug_init"
25106 #: ../src/guestfs-actions.pod:423
25110 " guestfs_aug_init (guestfs_h *g,\n"
25111 " const char *root,\n"
25117 #: ../src/guestfs-actions.pod:432
25118 msgid "You must call this before using any other C<guestfs_aug_*> commands."
25122 #: ../src/guestfs-actions.pod:457
25124 "This option is only useful when debugging Augeas lenses. Use of this option "
25125 "may require additional memory for the libguestfs appliance. You may need to "
25126 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
25127 "C<guestfs_set_memsize>."
25131 #: ../src/guestfs-actions.pod:472
25132 msgid "Do not load the tree in C<guestfs_aug_init>."
25136 #: ../src/guestfs-actions.pod:476
25137 msgid "To close the handle, you can call C<guestfs_aug_close>."
25141 #: ../src/guestfs-actions.pod:484
25142 msgid "guestfs_aug_insert"
25146 #: ../src/guestfs-actions.pod:486
25150 " guestfs_aug_insert (guestfs_h *g,\n"
25151 " const char *augpath,\n"
25152 " const char *label,\n"
25158 #: ../src/guestfs-actions.pod:504
25159 msgid "guestfs_aug_load"
25163 #: ../src/guestfs-actions.pod:506
25167 " guestfs_aug_load (guestfs_h *g);\n"
25172 #: ../src/guestfs-actions.pod:518
25173 msgid "guestfs_aug_ls"
25177 #: ../src/guestfs-actions.pod:520
25181 " guestfs_aug_ls (guestfs_h *g,\n"
25182 " const char *augpath);\n"
25187 #: ../src/guestfs-actions.pod:524
25189 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
25190 "sorting the resulting nodes into alphabetical order."
25194 #: ../src/guestfs-actions.pod:527 ../src/guestfs-actions.pod:543 ../src/guestfs-actions.pod:689 ../src/guestfs-actions.pod:1196 ../src/guestfs-actions.pod:1851 ../src/guestfs-actions.pod:1870 ../src/guestfs-actions.pod:1973 ../src/guestfs-actions.pod:1992 ../src/guestfs-actions.pod:2238 ../src/guestfs-actions.pod:2704 ../src/guestfs-actions.pod:2720 ../src/guestfs-actions.pod:2739 ../src/guestfs-actions.pod:2804 ../src/guestfs-actions.pod:2828 ../src/guestfs-actions.pod:2899 ../src/guestfs-actions.pod:2948 ../src/guestfs-actions.pod:3217 ../src/guestfs-actions.pod:3592 ../src/guestfs-actions.pod:3872 ../src/guestfs-actions.pod:4186 ../src/guestfs-actions.pod:4203 ../src/guestfs-actions.pod:4223 ../src/guestfs-actions.pod:4285 ../src/guestfs-actions.pod:4390 ../src/guestfs-actions.pod:4789 ../src/guestfs-actions.pod:5546 ../src/guestfs-actions.pod:6181 ../src/guestfs-actions.pod:6307 ../src/guestfs-actions.pod:6421 ../src/guestfs-actions.pod:7176 ../src/guestfs-actions.pod:7237 ../src/guestfs-actions.pod:7292 ../src/guestfs-actions.pod:7438 ../src/guestfs-actions.pod:7462 ../src/guestfs-actions.pod:7938 ../src/guestfs-actions.pod:7958 ../src/guestfs-actions.pod:8005 ../src/guestfs-actions.pod:8199 ../src/guestfs-actions.pod:8218 ../src/guestfs-actions.pod:8309 ../src/guestfs-actions.pod:8328 ../src/guestfs-actions.pod:8374 ../src/guestfs-actions.pod:8393
25196 "This function returns a NULL-terminated array of strings (like "
25197 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
25198 "strings and the array after use>."
25202 #: ../src/guestfs-actions.pod:531 ../src/guestfs-actions.pod:1121 ../src/guestfs-actions.pod:1139 ../src/guestfs-actions.pod:1908 ../src/guestfs-actions.pod:3950 ../src/guestfs-actions.pod:3981 ../src/guestfs-actions.pod:4633 ../src/guestfs-actions.pod:4680 ../src/guestfs-actions.pod:4867 ../src/guestfs-actions.pod:4900 ../src/guestfs-actions.pod:5063 ../src/guestfs-actions.pod:5550 ../src/guestfs-actions.pod:6122 ../src/guestfs-actions.pod:6519 ../src/guestfs-actions.pod:6533 ../src/guestfs-actions.pod:6545 ../src/guestfs-actions.pod:7023 ../src/guestfs-actions.pod:7676 ../src/guestfs-actions.pod:7689 ../src/guestfs-actions.pod:7922 ../src/guestfs-actions.pod:8187
25203 msgid "(Added in 0.8)"
25207 #: ../src/guestfs-actions.pod:533
25208 msgid "guestfs_aug_match"
25212 #: ../src/guestfs-actions.pod:535
25216 " guestfs_aug_match (guestfs_h *g,\n"
25217 " const char *augpath);\n"
25222 #: ../src/guestfs-actions.pod:549
25223 msgid "guestfs_aug_mv"
25227 #: ../src/guestfs-actions.pod:551
25231 " guestfs_aug_mv (guestfs_h *g,\n"
25232 " const char *src,\n"
25233 " const char *dest);\n"
25238 #: ../src/guestfs-actions.pod:563
25239 msgid "guestfs_aug_rm"
25243 #: ../src/guestfs-actions.pod:565
25247 " guestfs_aug_rm (guestfs_h *g,\n"
25248 " const char *augpath);\n"
25253 #: ../src/guestfs-actions.pod:577
25254 msgid "guestfs_aug_save"
25258 #: ../src/guestfs-actions.pod:579
25262 " guestfs_aug_save (guestfs_h *g);\n"
25267 #: ../src/guestfs-actions.pod:584
25269 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
25274 #: ../src/guestfs-actions.pod:591
25275 msgid "guestfs_aug_set"
25279 #: ../src/guestfs-actions.pod:593
25283 " guestfs_aug_set (guestfs_h *g,\n"
25284 " const char *augpath,\n"
25285 " const char *val);\n"
25290 #: ../src/guestfs-actions.pod:600
25292 "In the Augeas API, it is possible to clear a node by setting the value to "
25293 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
25294 "this call. Instead you must use the C<guestfs_aug_clear> call."
25298 #: ../src/guestfs-actions.pod:609
25299 msgid "guestfs_available"
25303 #: ../src/guestfs-actions.pod:611
25307 " guestfs_available (guestfs_h *g,\n"
25308 " char *const *groups);\n"
25313 #: ../src/guestfs-actions.pod:619
25315 "The libguestfs groups, and the functions that those groups correspond to, "
25316 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
25317 "runtime by calling C<guestfs_available_all_groups>."
25321 #: ../src/guestfs-actions.pod:643
25322 msgid "You must call C<guestfs_launch> before calling this function."
25326 #: ../src/guestfs-actions.pod:665
25328 "This call was added in version C<1.0.80>. In previous versions of "
25329 "libguestfs all you could do would be to speculatively execute a command to "
25330 "find out if the daemon implemented it. See also C<guestfs_version>."
25334 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:1653
25335 msgid "(Added in 1.0.80)"
25339 #: ../src/guestfs-actions.pod:676
25340 msgid "guestfs_available_all_groups"
25344 #: ../src/guestfs-actions.pod:678
25348 " guestfs_available_all_groups (guestfs_h *g);\n"
25353 #: ../src/guestfs-actions.pod:681
25355 "This command returns a list of all optional groups that this daemon knows "
25356 "about. Note this returns both supported and unsupported groups. To find "
25357 "out which ones the daemon can actually support you have to call "
25358 "C<guestfs_available> on each member of the returned list."
25362 #: ../src/guestfs-actions.pod:687
25363 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
25367 #: ../src/guestfs-actions.pod:693
25368 msgid "(Added in 1.3.15)"
25372 #: ../src/guestfs-actions.pod:695
25373 msgid "guestfs_base64_in"
25377 #: ../src/guestfs-actions.pod:697
25381 " guestfs_base64_in (guestfs_h *g,\n"
25382 " const char *base64file,\n"
25383 " const char *filename);\n"
25388 #: ../src/guestfs-actions.pod:707 ../src/guestfs-actions.pod:721
25389 msgid "(Added in 1.3.5)"
25393 #: ../src/guestfs-actions.pod:709
25394 msgid "guestfs_base64_out"
25398 #: ../src/guestfs-actions.pod:711
25402 " guestfs_base64_out (guestfs_h *g,\n"
25403 " const char *filename,\n"
25404 " const char *base64file);\n"
25409 #: ../src/guestfs-actions.pod:723
25410 msgid "guestfs_blockdev_flushbufs"
25414 #: ../src/guestfs-actions.pod:725
25418 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
25419 " const char *device);\n"
25424 #: ../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
25425 msgid "(Added in 0.9.3)"
25429 #: ../src/guestfs-actions.pod:738
25430 msgid "guestfs_blockdev_getbsz"
25434 #: ../src/guestfs-actions.pod:740
25438 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
25439 " const char *device);\n"
25444 #: ../src/guestfs-actions.pod:755
25445 msgid "guestfs_blockdev_getro"
25449 #: ../src/guestfs-actions.pod:757
25453 " guestfs_blockdev_getro (guestfs_h *g,\n"
25454 " const char *device);\n"
25459 #: ../src/guestfs-actions.pod:766 ../src/guestfs-actions.pod:1891 ../src/guestfs-actions.pod:1906 ../src/guestfs-actions.pod:2395 ../src/guestfs-actions.pod:2406 ../src/guestfs-actions.pod:2478 ../src/guestfs-actions.pod:2504 ../src/guestfs-actions.pod:2544 ../src/guestfs-actions.pod:2559 ../src/guestfs-actions.pod:2595 ../src/guestfs-actions.pod:2618 ../src/guestfs-actions.pod:3693 ../src/guestfs-actions.pod:3709 ../src/guestfs-actions.pod:3727 ../src/guestfs-actions.pod:3889 ../src/guestfs-actions.pod:3903 ../src/guestfs-actions.pod:3918 ../src/guestfs-actions.pod:3932 ../src/guestfs-actions.pod:3948 ../src/guestfs-actions.pod:3963 ../src/guestfs-actions.pod:3979 ../src/guestfs-actions.pod:3993 ../src/guestfs-actions.pod:4006 ../src/guestfs-actions.pod:4020 ../src/guestfs-actions.pod:4035 ../src/guestfs-actions.pod:4050 ../src/guestfs-actions.pod:4063 ../src/guestfs-actions.pod:4077 ../src/guestfs-actions.pod:5784
25460 msgid "This function returns a C truth value on success or -1 on error."
25464 #: ../src/guestfs-actions.pod:770
25465 msgid "guestfs_blockdev_getsize64"
25469 #: ../src/guestfs-actions.pod:772
25473 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
25474 " const char *device);\n"
25479 #: ../src/guestfs-actions.pod:778
25480 msgid "See also C<guestfs_blockdev_getsz>."
25484 #: ../src/guestfs-actions.pod:786
25485 msgid "guestfs_blockdev_getss"
25489 #: ../src/guestfs-actions.pod:788
25493 " guestfs_blockdev_getss (guestfs_h *g,\n"
25494 " const char *device);\n"
25499 #: ../src/guestfs-actions.pod:795
25501 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
25506 #: ../src/guestfs-actions.pod:804
25507 msgid "guestfs_blockdev_getsz"
25511 #: ../src/guestfs-actions.pod:806
25515 " guestfs_blockdev_getsz (guestfs_h *g,\n"
25516 " const char *device);\n"
25521 #: ../src/guestfs-actions.pod:813
25523 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
25524 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
25528 #: ../src/guestfs-actions.pod:823
25529 msgid "guestfs_blockdev_rereadpt"
25533 #: ../src/guestfs-actions.pod:825
25537 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
25538 " const char *device);\n"
25543 #: ../src/guestfs-actions.pod:837
25544 msgid "guestfs_blockdev_setbsz"
25548 #: ../src/guestfs-actions.pod:839
25552 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
25553 " const char *device,\n"
25554 " int blocksize);\n"
25559 #: ../src/guestfs-actions.pod:855
25560 msgid "guestfs_blockdev_setro"
25564 #: ../src/guestfs-actions.pod:857
25568 " guestfs_blockdev_setro (guestfs_h *g,\n"
25569 " const char *device);\n"
25574 #: ../src/guestfs-actions.pod:869
25575 msgid "guestfs_blockdev_setrw"
25579 #: ../src/guestfs-actions.pod:871
25583 " guestfs_blockdev_setrw (guestfs_h *g,\n"
25584 " const char *device);\n"
25589 #: ../src/guestfs-actions.pod:883
25590 msgid "guestfs_btrfs_filesystem_resize"
25594 #: ../src/guestfs-actions.pod:885
25598 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
25599 " const char *mountpoint,\n"
25605 #: ../src/guestfs-actions.pod:895
25608 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
25613 #: ../src/guestfs-actions.pod:918
25614 msgid "(Added in 1.11.17)"
25618 #: ../src/guestfs-actions.pod:920
25619 msgid "guestfs_btrfs_filesystem_resize_va"
25623 #: ../src/guestfs-actions.pod:922
25627 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
25628 " const char *mountpoint,\n"
25629 " va_list args);\n"
25634 #: ../src/guestfs-actions.pod:927
25635 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
25639 #: ../src/guestfs-actions.pod:931
25640 msgid "guestfs_btrfs_filesystem_resize_argv"
25644 #: ../src/guestfs-actions.pod:933
25648 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
25649 " const char *mountpoint,\n"
25651 "guestfs_btrfs_filesystem_resize_argv *optargs);\n"
25656 #: ../src/guestfs-actions.pod:938
25657 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
25661 #: ../src/guestfs-actions.pod:942
25662 msgid "guestfs_case_sensitive_path"
25666 #: ../src/guestfs-actions.pod:944
25670 " guestfs_case_sensitive_path (guestfs_h *g,\n"
25671 " const char *path);\n"
25676 #: ../src/guestfs-actions.pod:970
25678 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
25679 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
25680 "how the directories were originally created under Windows)."
25684 #: ../src/guestfs-actions.pod:978
25685 msgid "See also C<guestfs_realpath>."
25689 #: ../src/guestfs-actions.pod:983 ../src/guestfs-actions.pod:7856
25690 msgid "(Added in 1.0.75)"
25694 #: ../src/guestfs-actions.pod:985
25695 msgid "guestfs_cat"
25699 #: ../src/guestfs-actions.pod:987
25703 " guestfs_cat (guestfs_h *g,\n"
25704 " const char *path);\n"
25709 #: ../src/guestfs-actions.pod:993
25711 "Note that this function cannot correctly handle binary files (specifically, "
25712 "files containing C<\\0> character which is treated as end of string). For "
25713 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
25714 "functions which have a more complex interface."
25718 #: ../src/guestfs-actions.pod:1004 ../src/guestfs-actions.pod:4207 ../src/guestfs-actions.pod:4289 ../src/guestfs-actions.pod:4306 ../src/guestfs-actions.pod:4394 ../src/guestfs-actions.pod:4793 ../src/guestfs-actions.pod:4807 ../src/guestfs-actions.pod:6185 ../src/guestfs-actions.pod:6199 ../src/guestfs-actions.pod:8009 ../src/guestfs-actions.pod:8023
25719 msgid "(Added in 0.4)"
25723 #: ../src/guestfs-actions.pod:1006
25724 msgid "guestfs_checksum"
25728 #: ../src/guestfs-actions.pod:1008
25732 " guestfs_checksum (guestfs_h *g,\n"
25733 " const char *csumtype,\n"
25734 " const char *path);\n"
25739 #: ../src/guestfs-actions.pod:1054
25740 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
25744 #: ../src/guestfs-actions.pod:1056
25745 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
25749 #: ../src/guestfs-actions.pod:1061 ../src/guestfs-actions.pod:1728 ../src/guestfs-actions.pod:2586 ../src/guestfs-actions.pod:3905 ../src/guestfs-actions.pod:3934 ../src/guestfs-actions.pod:3995 ../src/guestfs-actions.pod:4022 ../src/guestfs-actions.pod:7712
25750 msgid "(Added in 1.0.2)"
25754 #: ../src/guestfs-actions.pod:1063
25755 msgid "guestfs_checksum_device"
25759 #: ../src/guestfs-actions.pod:1065
25763 " guestfs_checksum_device (guestfs_h *g,\n"
25764 " const char *csumtype,\n"
25765 " const char *device);\n"
25770 #: ../src/guestfs-actions.pod:1070
25772 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
25773 "device named C<device>. For the types of checksums supported see the "
25774 "C<guestfs_checksum> command."
25778 #: ../src/guestfs-actions.pod:1077 ../src/guestfs-actions.pod:5617 ../src/guestfs-actions.pod:5752 ../src/guestfs-actions.pod:5786 ../src/guestfs-actions.pod:5804 ../src/guestfs-actions.pod:5986 ../src/guestfs-actions.pod:7621 ../src/guestfs-actions.pod:7635 ../src/guestfs-actions.pod:8035
25779 msgid "(Added in 1.3.2)"
25783 #: ../src/guestfs-actions.pod:1079
25784 msgid "guestfs_checksums_out"
25788 #: ../src/guestfs-actions.pod:1081
25792 " guestfs_checksums_out (guestfs_h *g,\n"
25793 " const char *csumtype,\n"
25794 " const char *directory,\n"
25795 " const char *sumsfile);\n"
25800 #: ../src/guestfs-actions.pod:1101
25801 msgid "(Added in 1.3.7)"
25805 #: ../src/guestfs-actions.pod:1103
25806 msgid "guestfs_chmod"
25810 #: ../src/guestfs-actions.pod:1105
25814 " guestfs_chmod (guestfs_h *g,\n"
25816 " const char *path);\n"
25821 #: ../src/guestfs-actions.pod:1123
25822 msgid "guestfs_chown"
25826 #: ../src/guestfs-actions.pod:1125
25830 " guestfs_chown (guestfs_h *g,\n"
25833 " const char *path);\n"
25838 #: ../src/guestfs-actions.pod:1141
25839 msgid "guestfs_command"
25843 #: ../src/guestfs-actions.pod:1143
25847 " guestfs_command (guestfs_h *g,\n"
25848 " char *const *arguments);\n"
25853 #: ../src/guestfs-actions.pod:1152
25855 "The single parameter is an argv-style list of arguments. The first element "
25856 "is the name of the program to run. Subsequent elements are parameters. The "
25857 "list must be non-empty (ie. must contain a program name). Note that the "
25858 "command runs directly, and is I<not> invoked via the shell (see "
25863 #: ../src/guestfs-actions.pod:1183 ../src/guestfs-actions.pod:1203 ../src/guestfs-actions.pod:2027
25864 msgid "(Added in 0.9.1)"
25868 #: ../src/guestfs-actions.pod:1185
25869 msgid "guestfs_command_lines"
25873 #: ../src/guestfs-actions.pod:1187
25877 " guestfs_command_lines (guestfs_h *g,\n"
25878 " char *const *arguments);\n"
25883 #: ../src/guestfs-actions.pod:1191
25885 "This is the same as C<guestfs_command>, but splits the result into a list of "
25890 #: ../src/guestfs-actions.pod:1194
25891 msgid "See also: C<guestfs_sh_lines>"
25895 #: ../src/guestfs-actions.pod:1205
25896 msgid "guestfs_compress_device_out"
25900 #: ../src/guestfs-actions.pod:1207
25904 " guestfs_compress_device_out (guestfs_h *g,\n"
25905 " const char *ctype,\n"
25906 " const char *device,\n"
25907 " const char *zdevice,\n"
25913 #: ../src/guestfs-actions.pod:1219
25916 " GUESTFS_COMPRESS_DEVICE_OUT_LEVEL, int level,\n"
25921 #: ../src/guestfs-actions.pod:1224
25923 "The C<ctype> and optional C<level> parameters have the same meaning as in "
25924 "C<guestfs_compress_out>."
25928 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:1288 ../src/guestfs-actions.pod:2572 ../src/guestfs-actions.pod:6902
25929 msgid "(Added in 1.13.15)"
25933 #: ../src/guestfs-actions.pod:1231
25934 msgid "guestfs_compress_device_out_va"
25938 #: ../src/guestfs-actions.pod:1233
25942 " guestfs_compress_device_out_va (guestfs_h *g,\n"
25943 " const char *ctype,\n"
25944 " const char *device,\n"
25945 " const char *zdevice,\n"
25946 " va_list args);\n"
25951 #: ../src/guestfs-actions.pod:1240
25952 msgid "This is the \"va_list variant\" of L</guestfs_compress_device_out>."
25956 #: ../src/guestfs-actions.pod:1244
25957 msgid "guestfs_compress_device_out_argv"
25961 #: ../src/guestfs-actions.pod:1246
25965 " guestfs_compress_device_out_argv (guestfs_h *g,\n"
25966 " const char *ctype,\n"
25967 " const char *device,\n"
25968 " const char *zdevice,\n"
25970 "guestfs_compress_device_out_argv *optargs);\n"
25975 #: ../src/guestfs-actions.pod:1253
25976 msgid "This is the \"argv variant\" of L</guestfs_compress_device_out>."
25980 #: ../src/guestfs-actions.pod:1257
25981 msgid "guestfs_compress_out"
25985 #: ../src/guestfs-actions.pod:1259
25989 " guestfs_compress_out (guestfs_h *g,\n"
25990 " const char *ctype,\n"
25991 " const char *file,\n"
25992 " const char *zfile,\n"
25998 #: ../src/guestfs-actions.pod:1271
26001 " GUESTFS_COMPRESS_OUT_LEVEL, int level,\n"
26006 #: ../src/guestfs-actions.pod:1290
26007 msgid "guestfs_compress_out_va"
26011 #: ../src/guestfs-actions.pod:1292
26015 " guestfs_compress_out_va (guestfs_h *g,\n"
26016 " const char *ctype,\n"
26017 " const char *file,\n"
26018 " const char *zfile,\n"
26019 " va_list args);\n"
26024 #: ../src/guestfs-actions.pod:1299
26025 msgid "This is the \"va_list variant\" of L</guestfs_compress_out>."
26029 #: ../src/guestfs-actions.pod:1303
26030 msgid "guestfs_compress_out_argv"
26034 #: ../src/guestfs-actions.pod:1305
26038 " guestfs_compress_out_argv (guestfs_h *g,\n"
26039 " const char *ctype,\n"
26040 " const char *file,\n"
26041 " const char *zfile,\n"
26042 " const struct guestfs_compress_out_argv "
26048 #: ../src/guestfs-actions.pod:1312
26049 msgid "This is the \"argv variant\" of L</guestfs_compress_out>."
26053 #: ../src/guestfs-actions.pod:1316
26054 msgid "guestfs_config"
26058 #: ../src/guestfs-actions.pod:1318
26062 " guestfs_config (guestfs_h *g,\n"
26063 " const char *qemuparam,\n"
26064 " const char *qemuvalue);\n"
26069 #: ../src/guestfs-actions.pod:1336
26070 msgid "guestfs_copy_device_to_device"
26074 #: ../src/guestfs-actions.pod:1338
26078 " guestfs_copy_device_to_device (guestfs_h *g,\n"
26079 " const char *src,\n"
26080 " const char *dest,\n"
26086 #: ../src/guestfs-actions.pod:1349
26089 " GUESTFS_COPY_DEVICE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26090 " GUESTFS_COPY_DEVICE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26091 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, int64_t size,\n"
26096 #: ../src/guestfs-actions.pod:1353
26098 "The four calls C<guestfs_copy_device_to_device>, "
26099 "C<guestfs_copy_device_to_file>, C<guestfs_copy_file_to_device>, and "
26100 "C<guestfs_copy_file_to_file> let you copy from a source (device|file) to a "
26101 "destination (device|file)."
26105 #: ../src/guestfs-actions.pod:1374 ../src/guestfs-actions.pod:1427 ../src/guestfs-actions.pod:1480 ../src/guestfs-actions.pod:1538 ../src/guestfs-actions.pod:1592 ../src/guestfs-actions.pod:1723 ../src/guestfs-actions.pod:1754 ../src/guestfs-actions.pod:1799 ../src/guestfs-actions.pod:2176 ../src/guestfs-actions.pod:2198 ../src/guestfs-actions.pod:4105 ../src/guestfs-actions.pod:7707 ../src/guestfs-actions.pod:7741 ../src/guestfs-actions.pod:8248 ../src/guestfs-actions.pod:8271
26107 "This long-running command can generate progress notification messages so "
26108 "that the caller can display a progress bar or indicator. To receive these "
26109 "messages, the caller must register a progress event callback. See "
26110 "L<guestfs(3)/GUESTFS_EVENT_PROGRESS>."
26114 #: ../src/guestfs-actions.pod:1379 ../src/guestfs-actions.pod:1432 ../src/guestfs-actions.pod:1485 ../src/guestfs-actions.pod:1543 ../src/guestfs-actions.pod:6042
26115 msgid "(Added in 1.13.25)"
26119 #: ../src/guestfs-actions.pod:1381
26120 msgid "guestfs_copy_device_to_device_va"
26124 #: ../src/guestfs-actions.pod:1383
26128 " guestfs_copy_device_to_device_va (guestfs_h *g,\n"
26129 " const char *src,\n"
26130 " const char *dest,\n"
26131 " va_list args);\n"
26136 #: ../src/guestfs-actions.pod:1389
26137 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_device>."
26141 #: ../src/guestfs-actions.pod:1393
26142 msgid "guestfs_copy_device_to_device_argv"
26146 #: ../src/guestfs-actions.pod:1395
26150 " guestfs_copy_device_to_device_argv (guestfs_h *g,\n"
26151 " const char *src,\n"
26152 " const char *dest,\n"
26154 "guestfs_copy_device_to_device_argv *optargs);\n"
26159 #: ../src/guestfs-actions.pod:1401
26160 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_device>."
26164 #: ../src/guestfs-actions.pod:1405
26165 msgid "guestfs_copy_device_to_file"
26169 #: ../src/guestfs-actions.pod:1407
26173 " guestfs_copy_device_to_file (guestfs_h *g,\n"
26174 " const char *src,\n"
26175 " const char *dest,\n"
26181 #: ../src/guestfs-actions.pod:1418
26184 " GUESTFS_COPY_DEVICE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26185 " GUESTFS_COPY_DEVICE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26186 " GUESTFS_COPY_DEVICE_TO_FILE_SIZE, int64_t size,\n"
26191 #: ../src/guestfs-actions.pod:1422 ../src/guestfs-actions.pod:1475 ../src/guestfs-actions.pod:1528
26192 msgid "See C<guestfs_copy_device_to_device> for a general overview of this call."
26196 #: ../src/guestfs-actions.pod:1434
26197 msgid "guestfs_copy_device_to_file_va"
26201 #: ../src/guestfs-actions.pod:1436
26205 " guestfs_copy_device_to_file_va (guestfs_h *g,\n"
26206 " const char *src,\n"
26207 " const char *dest,\n"
26208 " va_list args);\n"
26213 #: ../src/guestfs-actions.pod:1442
26214 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_file>."
26218 #: ../src/guestfs-actions.pod:1446
26219 msgid "guestfs_copy_device_to_file_argv"
26223 #: ../src/guestfs-actions.pod:1448
26227 " guestfs_copy_device_to_file_argv (guestfs_h *g,\n"
26228 " const char *src,\n"
26229 " const char *dest,\n"
26231 "guestfs_copy_device_to_file_argv *optargs);\n"
26236 #: ../src/guestfs-actions.pod:1454
26237 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_file>."
26241 #: ../src/guestfs-actions.pod:1458
26242 msgid "guestfs_copy_file_to_device"
26246 #: ../src/guestfs-actions.pod:1460
26250 " guestfs_copy_file_to_device (guestfs_h *g,\n"
26251 " const char *src,\n"
26252 " const char *dest,\n"
26258 #: ../src/guestfs-actions.pod:1471
26261 " GUESTFS_COPY_FILE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26262 " GUESTFS_COPY_FILE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26263 " GUESTFS_COPY_FILE_TO_DEVICE_SIZE, int64_t size,\n"
26268 #: ../src/guestfs-actions.pod:1487
26269 msgid "guestfs_copy_file_to_device_va"
26273 #: ../src/guestfs-actions.pod:1489
26277 " guestfs_copy_file_to_device_va (guestfs_h *g,\n"
26278 " const char *src,\n"
26279 " const char *dest,\n"
26280 " va_list args);\n"
26285 #: ../src/guestfs-actions.pod:1495
26286 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_device>."
26290 #: ../src/guestfs-actions.pod:1499
26291 msgid "guestfs_copy_file_to_device_argv"
26295 #: ../src/guestfs-actions.pod:1501
26299 " guestfs_copy_file_to_device_argv (guestfs_h *g,\n"
26300 " const char *src,\n"
26301 " const char *dest,\n"
26303 "guestfs_copy_file_to_device_argv *optargs);\n"
26308 #: ../src/guestfs-actions.pod:1507
26309 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_device>."
26313 #: ../src/guestfs-actions.pod:1511
26314 msgid "guestfs_copy_file_to_file"
26318 #: ../src/guestfs-actions.pod:1513
26322 " guestfs_copy_file_to_file (guestfs_h *g,\n"
26323 " const char *src,\n"
26324 " const char *dest,\n"
26330 #: ../src/guestfs-actions.pod:1524
26333 " GUESTFS_COPY_FILE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26334 " GUESTFS_COPY_FILE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26335 " GUESTFS_COPY_FILE_TO_FILE_SIZE, int64_t size,\n"
26340 #: ../src/guestfs-actions.pod:1531
26342 "This is B<not> the function you want for copying files. This is for copying "
26343 "blocks within existing files. See C<guestfs_cp>, C<guestfs_cp_a> and "
26344 "C<guestfs_mv> for general file copying and moving functions."
26348 #: ../src/guestfs-actions.pod:1545
26349 msgid "guestfs_copy_file_to_file_va"
26353 #: ../src/guestfs-actions.pod:1547
26357 " guestfs_copy_file_to_file_va (guestfs_h *g,\n"
26358 " const char *src,\n"
26359 " const char *dest,\n"
26360 " va_list args);\n"
26365 #: ../src/guestfs-actions.pod:1553
26366 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_file>."
26370 #: ../src/guestfs-actions.pod:1557
26371 msgid "guestfs_copy_file_to_file_argv"
26375 #: ../src/guestfs-actions.pod:1559
26379 " guestfs_copy_file_to_file_argv (guestfs_h *g,\n"
26380 " const char *src,\n"
26381 " const char *dest,\n"
26382 " const struct guestfs_copy_file_to_file_argv "
26388 #: ../src/guestfs-actions.pod:1565
26389 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_file>."
26393 #: ../src/guestfs-actions.pod:1569
26394 msgid "guestfs_copy_size"
26398 #: ../src/guestfs-actions.pod:1571
26402 " guestfs_copy_size (guestfs_h *g,\n"
26403 " const char *src,\n"
26404 " const char *dest,\n"
26405 " int64_t size);\n"
26410 #: ../src/guestfs-actions.pod:1577 ../src/guestfs-actions.pod:1634
26412 "I<This function is deprecated.> In new code, use the "
26413 "L</guestfs_copy_device_to_device> call instead."
26417 #: ../src/guestfs-actions.pod:1597 ../src/guestfs-actions.pod:4820 ../src/guestfs-actions.pod:6212 ../src/guestfs-actions.pod:7942 ../src/guestfs-actions.pod:7962 ../src/guestfs-actions.pod:8048
26418 msgid "(Added in 1.0.87)"
26422 #: ../src/guestfs-actions.pod:1599
26427 #: ../src/guestfs-actions.pod:1601
26431 " guestfs_cp (guestfs_h *g,\n"
26432 " const char *src,\n"
26433 " const char *dest);\n"
26438 #: ../src/guestfs-actions.pod:1611 ../src/guestfs-actions.pod:1625 ../src/guestfs-actions.pod:1705 ../src/guestfs-actions.pod:1779 ../src/guestfs-actions.pod:1893 ../src/guestfs-actions.pod:5564 ../src/guestfs-actions.pod:6056
26439 msgid "(Added in 1.0.18)"
26443 #: ../src/guestfs-actions.pod:1613
26444 msgid "guestfs_cp_a"
26448 #: ../src/guestfs-actions.pod:1615
26452 " guestfs_cp_a (guestfs_h *g,\n"
26453 " const char *src,\n"
26454 " const char *dest);\n"
26459 #: ../src/guestfs-actions.pod:1627
26464 #: ../src/guestfs-actions.pod:1629
26468 " guestfs_dd (guestfs_h *g,\n"
26469 " const char *src,\n"
26470 " const char *dest);\n"
26475 #: ../src/guestfs-actions.pod:1646
26477 "If the destination is a device, it must be as large or larger than the "
26478 "source file or device, otherwise the copy will fail. This command cannot do "
26479 "partial copies (see C<guestfs_copy_device_to_device>)."
26483 #: ../src/guestfs-actions.pod:1655
26488 #: ../src/guestfs-actions.pod:1657
26492 " guestfs_df (guestfs_h *g);\n"
26497 #: ../src/guestfs-actions.pod:1662 ../src/guestfs-actions.pod:1679
26499 "This command is mostly useful for interactive sessions. It is I<not> "
26500 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
26505 #: ../src/guestfs-actions.pod:1669 ../src/guestfs-actions.pod:1686 ../src/guestfs-actions.pod:1804 ../src/guestfs-actions.pod:2811 ../src/guestfs-actions.pod:2835 ../src/guestfs-actions.pod:2903 ../src/guestfs-actions.pod:4930 ../src/guestfs-actions.pod:5464 ../src/guestfs-actions.pod:7445 ../src/guestfs-actions.pod:7469 ../src/guestfs-actions.pod:8088 ../src/guestfs-actions.pod:8101 ../src/guestfs-actions.pod:8114
26506 msgid "(Added in 1.0.54)"
26510 #: ../src/guestfs-actions.pod:1671
26511 msgid "guestfs_df_h"
26515 #: ../src/guestfs-actions.pod:1673
26519 " guestfs_df_h (guestfs_h *g);\n"
26524 #: ../src/guestfs-actions.pod:1688
26525 msgid "guestfs_dmesg"
26529 #: ../src/guestfs-actions.pod:1690
26533 " guestfs_dmesg (guestfs_h *g);\n"
26538 #: ../src/guestfs-actions.pod:1697
26540 "Another way to get the same information is to enable verbose messages with "
26541 "C<guestfs_set_verbose> or by setting the environment variable "
26542 "C<LIBGUESTFS_DEBUG=1> before running the program."
26546 #: ../src/guestfs-actions.pod:1707
26547 msgid "guestfs_download"
26551 #: ../src/guestfs-actions.pod:1709
26555 " guestfs_download (guestfs_h *g,\n"
26556 " const char *remotefilename,\n"
26557 " const char *filename);\n"
26562 #: ../src/guestfs-actions.pod:1719
26563 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
26567 #: ../src/guestfs-actions.pod:1730
26568 msgid "guestfs_download_offset"
26572 #: ../src/guestfs-actions.pod:1732
26576 " guestfs_download_offset (guestfs_h *g,\n"
26577 " const char *remotefilename,\n"
26578 " const char *filename,\n"
26579 " int64_t offset,\n"
26580 " int64_t size);\n"
26585 #: ../src/guestfs-actions.pod:1745
26587 "Note that there is no limit on the amount of data that can be downloaded "
26588 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
26589 "full amount unless an error occurs."
26593 #: ../src/guestfs-actions.pod:1750
26594 msgid "See also C<guestfs_download>, C<guestfs_pread>."
26598 #: ../src/guestfs-actions.pod:1759 ../src/guestfs-actions.pod:7746
26599 msgid "(Added in 1.5.17)"
26603 #: ../src/guestfs-actions.pod:1761
26604 msgid "guestfs_drop_caches"
26608 #: ../src/guestfs-actions.pod:1763
26612 " guestfs_drop_caches (guestfs_h *g,\n"
26613 " int whattodrop);\n"
26618 #: ../src/guestfs-actions.pod:1781
26623 #: ../src/guestfs-actions.pod:1783
26627 " guestfs_du (guestfs_h *g,\n"
26628 " const char *path);\n"
26633 #: ../src/guestfs-actions.pod:1806
26634 msgid "guestfs_e2fsck_f"
26638 #: ../src/guestfs-actions.pod:1808
26642 " guestfs_e2fsck_f (guestfs_h *g,\n"
26643 " const char *device);\n"
26648 #: ../src/guestfs-actions.pod:1816
26650 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
26651 "Normally you should use C<guestfs_fsck>."
26655 #: ../src/guestfs-actions.pod:1821
26656 msgid "(Added in 1.0.29)"
26660 #: ../src/guestfs-actions.pod:1823
26661 msgid "guestfs_echo_daemon"
26665 #: ../src/guestfs-actions.pod:1825
26669 " guestfs_echo_daemon (guestfs_h *g,\n"
26670 " char *const *words);\n"
26675 #: ../src/guestfs-actions.pod:1834
26676 msgid "See also C<guestfs_ping_daemon>."
26680 #: ../src/guestfs-actions.pod:1839 ../src/guestfs-actions.pod:2597 ../src/guestfs-actions.pod:6926
26681 msgid "(Added in 1.0.69)"
26685 #: ../src/guestfs-actions.pod:1841
26686 msgid "guestfs_egrep"
26690 #: ../src/guestfs-actions.pod:1843
26694 " guestfs_egrep (guestfs_h *g,\n"
26695 " const char *regex,\n"
26696 " const char *path);\n"
26701 #: ../src/guestfs-actions.pod:1858 ../src/guestfs-actions.pod:1877 ../src/guestfs-actions.pod:1934 ../src/guestfs-actions.pod:1980 ../src/guestfs-actions.pod:1999 ../src/guestfs-actions.pod:2727 ../src/guestfs-actions.pod:2746 ../src/guestfs-actions.pod:2924 ../src/guestfs-actions.pod:2937 ../src/guestfs-actions.pod:2952 ../src/guestfs-actions.pod:2998 ../src/guestfs-actions.pod:3020 ../src/guestfs-actions.pod:3033 ../src/guestfs-actions.pod:4319 ../src/guestfs-actions.pod:4333 ../src/guestfs-actions.pod:4346 ../src/guestfs-actions.pod:4360 ../src/guestfs-actions.pod:5352 ../src/guestfs-actions.pod:6390 ../src/guestfs-actions.pod:6439 ../src/guestfs-actions.pod:7313 ../src/guestfs-actions.pod:7325 ../src/guestfs-actions.pod:7338 ../src/guestfs-actions.pod:7351 ../src/guestfs-actions.pod:7373 ../src/guestfs-actions.pod:7386 ../src/guestfs-actions.pod:7399 ../src/guestfs-actions.pod:7412 ../src/guestfs-actions.pod:8206 ../src/guestfs-actions.pod:8225 ../src/guestfs-actions.pod:8316 ../src/guestfs-actions.pod:8335 ../src/guestfs-actions.pod:8381 ../src/guestfs-actions.pod:8400
26702 msgid "(Added in 1.0.66)"
26706 #: ../src/guestfs-actions.pod:1860
26707 msgid "guestfs_egrepi"
26711 #: ../src/guestfs-actions.pod:1862
26715 " guestfs_egrepi (guestfs_h *g,\n"
26716 " const char *regex,\n"
26717 " const char *path);\n"
26722 #: ../src/guestfs-actions.pod:1879
26723 msgid "guestfs_equal"
26727 #: ../src/guestfs-actions.pod:1881
26731 " guestfs_equal (guestfs_h *g,\n"
26732 " const char *file1,\n"
26733 " const char *file2);\n"
26738 #: ../src/guestfs-actions.pod:1895
26739 msgid "guestfs_exists"
26743 #: ../src/guestfs-actions.pod:1897
26747 " guestfs_exists (guestfs_h *g,\n"
26748 " const char *path);\n"
26753 #: ../src/guestfs-actions.pod:1904
26754 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
26758 #: ../src/guestfs-actions.pod:1910
26759 msgid "guestfs_fallocate"
26763 #: ../src/guestfs-actions.pod:1912
26767 " guestfs_fallocate (guestfs_h *g,\n"
26768 " const char *path,\n"
26774 #: ../src/guestfs-actions.pod:1917
26776 "I<This function is deprecated.> In new code, use the L</guestfs_fallocate64> "
26781 #: ../src/guestfs-actions.pod:1936
26782 msgid "guestfs_fallocate64"
26786 #: ../src/guestfs-actions.pod:1938
26790 " guestfs_fallocate64 (guestfs_h *g,\n"
26791 " const char *path,\n"
26797 #: ../src/guestfs-actions.pod:1947
26799 "Note that this call allocates disk blocks for the file. To create a sparse "
26800 "file use C<guestfs_truncate_size> instead."
26804 #: ../src/guestfs-actions.pod:1950
26806 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
26807 "oversight it only allowed 30 bit lengths to be specified, effectively "
26808 "limiting the maximum size of files created through that call to 1GB."
26812 #: ../src/guestfs-actions.pod:1961
26813 msgid "(Added in 1.3.17)"
26817 #: ../src/guestfs-actions.pod:1963
26818 msgid "guestfs_fgrep"
26822 #: ../src/guestfs-actions.pod:1965
26826 " guestfs_fgrep (guestfs_h *g,\n"
26827 " const char *pattern,\n"
26828 " const char *path);\n"
26833 #: ../src/guestfs-actions.pod:1982
26834 msgid "guestfs_fgrepi"
26838 #: ../src/guestfs-actions.pod:1984
26842 " guestfs_fgrepi (guestfs_h *g,\n"
26843 " const char *pattern,\n"
26844 " const char *path);\n"
26849 #: ../src/guestfs-actions.pod:2001
26850 msgid "guestfs_file"
26854 #: ../src/guestfs-actions.pod:2003
26858 " guestfs_file (guestfs_h *g,\n"
26859 " const char *path);\n"
26864 #: ../src/guestfs-actions.pod:2021
26866 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
26867 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
26871 #: ../src/guestfs-actions.pod:2029
26872 msgid "guestfs_file_architecture"
26876 #: ../src/guestfs-actions.pod:2031
26880 " guestfs_file_architecture (guestfs_h *g,\n"
26881 " const char *filename);\n"
26886 #: ../src/guestfs-actions.pod:2139 ../src/guestfs-actions.pod:2302 ../src/guestfs-actions.pod:2319 ../src/guestfs-actions.pod:3053 ../src/guestfs-actions.pod:3155 ../src/guestfs-actions.pod:3221 ../src/guestfs-actions.pod:3408 ../src/guestfs-actions.pod:3426 ../src/guestfs-actions.pod:3466 ../src/guestfs-actions.pod:3542 ../src/guestfs-actions.pod:3639 ../src/guestfs-actions.pod:3876 ../src/guestfs-actions.pod:4008
26887 msgid "(Added in 1.5.3)"
26891 #: ../src/guestfs-actions.pod:2141
26892 msgid "guestfs_filesize"
26896 #: ../src/guestfs-actions.pod:2143
26900 " guestfs_filesize (guestfs_h *g,\n"
26901 " const char *file);\n"
26906 #: ../src/guestfs-actions.pod:2149
26908 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
26909 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
26910 "devices, use C<guestfs_blockdev_getsize64>."
26914 #: ../src/guestfs-actions.pod:2155
26915 msgid "(Added in 1.0.82)"
26919 #: ../src/guestfs-actions.pod:2157
26920 msgid "guestfs_fill"
26924 #: ../src/guestfs-actions.pod:2159
26928 " guestfs_fill (guestfs_h *g,\n"
26931 " const char *path);\n"
26936 #: ../src/guestfs-actions.pod:2169
26938 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
26939 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
26940 "bytes use C<guestfs_fill_pattern>."
26944 #: ../src/guestfs-actions.pod:2181
26945 msgid "(Added in 1.0.79)"
26949 #: ../src/guestfs-actions.pod:2183
26950 msgid "guestfs_fill_pattern"
26954 #: ../src/guestfs-actions.pod:2185
26958 " guestfs_fill_pattern (guestfs_h *g,\n"
26959 " const char *pattern,\n"
26961 " const char *path);\n"
26966 #: ../src/guestfs-actions.pod:2191
26968 "This function is like C<guestfs_fill> except that it creates a new file of "
26969 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
26970 "pattern is truncated if necessary to ensure the length of the file is "
26971 "exactly C<len> bytes."
26975 #: ../src/guestfs-actions.pod:2203
26976 msgid "(Added in 1.3.12)"
26980 #: ../src/guestfs-actions.pod:2205
26981 msgid "guestfs_find"
26985 #: ../src/guestfs-actions.pod:2207
26989 " guestfs_find (guestfs_h *g,\n"
26990 " const char *directory);\n"
26995 #: ../src/guestfs-actions.pod:2223
26996 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
27000 #: ../src/guestfs-actions.pod:2236
27001 msgid "See also C<guestfs_find0>."
27005 #: ../src/guestfs-actions.pod:2245 ../src/guestfs-actions.pod:4757 ../src/guestfs-actions.pod:6474
27006 msgid "(Added in 1.0.27)"
27010 #: ../src/guestfs-actions.pod:2247
27011 msgid "guestfs_find0"
27015 #: ../src/guestfs-actions.pod:2249
27019 " guestfs_find0 (guestfs_h *g,\n"
27020 " const char *directory,\n"
27021 " const char *files);\n"
27026 #: ../src/guestfs-actions.pod:2258
27028 "This command works the same way as C<guestfs_find> with the following "
27033 #: ../src/guestfs-actions.pod:2285
27034 msgid "(Added in 1.0.74)"
27038 #: ../src/guestfs-actions.pod:2287
27039 msgid "guestfs_findfs_label"
27043 #: ../src/guestfs-actions.pod:2289
27047 " guestfs_findfs_label (guestfs_h *g,\n"
27048 " const char *label);\n"
27053 #: ../src/guestfs-actions.pod:2297
27054 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
27058 #: ../src/guestfs-actions.pod:2304
27059 msgid "guestfs_findfs_uuid"
27063 #: ../src/guestfs-actions.pod:2306
27067 " guestfs_findfs_uuid (guestfs_h *g,\n"
27068 " const char *uuid);\n"
27073 #: ../src/guestfs-actions.pod:2314
27074 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
27078 #: ../src/guestfs-actions.pod:2321
27079 msgid "guestfs_fsck"
27083 #: ../src/guestfs-actions.pod:2323
27087 " guestfs_fsck (guestfs_h *g,\n"
27088 " const char *fstype,\n"
27089 " const char *device);\n"
27094 #: ../src/guestfs-actions.pod:2358 ../src/guestfs-actions.pod:8253
27095 msgid "(Added in 1.0.16)"
27099 #: ../src/guestfs-actions.pod:2360
27100 msgid "guestfs_get_append"
27104 #: ../src/guestfs-actions.pod:2362
27108 " guestfs_get_append (guestfs_h *g);\n"
27113 #: ../src/guestfs-actions.pod:2370
27115 "This function returns a string which may be NULL. There is no way to return "
27116 "an error from this function. The string is owned by the guest handle and "
27117 "must I<not> be freed."
27121 #: ../src/guestfs-actions.pod:2374 ../src/guestfs-actions.pod:6152 ../src/guestfs-actions.pod:6631 ../src/guestfs-actions.pod:7080 ../src/guestfs-actions.pod:7099 ../src/guestfs-actions.pod:7115 ../src/guestfs-actions.pod:7139 ../src/guestfs-actions.pod:7893 ../src/guestfs-actions.pod:7908 ../src/guestfs-actions.pod:8297
27122 msgid "(Added in 1.0.26)"
27126 #: ../src/guestfs-actions.pod:2376
27127 msgid "guestfs_get_attach_method"
27131 #: ../src/guestfs-actions.pod:2378
27135 " guestfs_get_attach_method (guestfs_h *g);\n"
27140 #: ../src/guestfs-actions.pod:2381
27141 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
27145 #: ../src/guestfs-actions.pod:2386 ../src/guestfs-actions.pod:6661
27146 msgid "(Added in 1.9.8)"
27150 #: ../src/guestfs-actions.pod:2388
27151 msgid "guestfs_get_autosync"
27155 #: ../src/guestfs-actions.pod:2390
27159 " guestfs_get_autosync (guestfs_h *g);\n"
27164 #: ../src/guestfs-actions.pod:2399
27165 msgid "guestfs_get_direct"
27169 #: ../src/guestfs-actions.pod:2401
27173 " guestfs_get_direct (guestfs_h *g);\n"
27178 #: ../src/guestfs-actions.pod:2408 ../src/guestfs-actions.pod:6702
27179 msgid "(Added in 1.0.72)"
27183 #: ../src/guestfs-actions.pod:2410
27184 msgid "guestfs_get_e2label"
27188 #: ../src/guestfs-actions.pod:2412
27192 " guestfs_get_e2label (guestfs_h *g,\n"
27193 " const char *device);\n"
27198 #: ../src/guestfs-actions.pod:2416
27200 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_label> "
27205 #: ../src/guestfs-actions.pod:2429 ../src/guestfs-actions.pod:2450 ../src/guestfs-actions.pod:6720 ../src/guestfs-actions.pod:6739
27206 msgid "(Added in 1.0.15)"
27210 #: ../src/guestfs-actions.pod:2431
27211 msgid "guestfs_get_e2uuid"
27215 #: ../src/guestfs-actions.pod:2433
27219 " guestfs_get_e2uuid (guestfs_h *g,\n"
27220 " const char *device);\n"
27225 #: ../src/guestfs-actions.pod:2437
27227 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_uuid> "
27232 #: ../src/guestfs-actions.pod:2452
27233 msgid "guestfs_get_memsize"
27237 #: ../src/guestfs-actions.pod:2454
27241 " guestfs_get_memsize (guestfs_h *g);\n"
27246 #: ../src/guestfs-actions.pod:2460
27248 "If C<guestfs_set_memsize> was not called on this handle, and if "
27249 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
27250 "value for memsize."
27254 #: ../src/guestfs-actions.pod:2469 ../src/guestfs-actions.pod:5048 ../src/guestfs-actions.pod:5257 ../src/guestfs-actions.pod:5276 ../src/guestfs-actions.pod:5295 ../src/guestfs-actions.pod:5307 ../src/guestfs-actions.pod:5324 ../src/guestfs-actions.pod:5337 ../src/guestfs-actions.pod:6377 ../src/guestfs-actions.pod:6760 ../src/guestfs-actions.pod:7050 ../src/guestfs-actions.pod:7662
27255 msgid "(Added in 1.0.55)"
27259 #: ../src/guestfs-actions.pod:2471
27260 msgid "guestfs_get_network"
27264 #: ../src/guestfs-actions.pod:2473
27268 " guestfs_get_network (guestfs_h *g);\n"
27273 #: ../src/guestfs-actions.pod:2480 ../src/guestfs-actions.pod:6779
27274 msgid "(Added in 1.5.4)"
27278 #: ../src/guestfs-actions.pod:2482
27279 msgid "guestfs_get_path"
27283 #: ../src/guestfs-actions.pod:2484
27287 " guestfs_get_path (guestfs_h *g);\n"
27292 #: ../src/guestfs-actions.pod:2492 ../src/guestfs-actions.pod:2532
27294 "This function returns a string, or NULL on error. The string is owned by "
27295 "the guest handle and must I<not> be freed."
27299 #: ../src/guestfs-actions.pod:2497
27300 msgid "guestfs_get_pgroup"
27304 #: ../src/guestfs-actions.pod:2499
27308 " guestfs_get_pgroup (guestfs_h *g);\n"
27313 #: ../src/guestfs-actions.pod:2506 ../src/guestfs-actions.pod:6815 ../src/guestfs-actions.pod:8154
27314 msgid "(Added in 1.11.18)"
27318 #: ../src/guestfs-actions.pod:2508
27319 msgid "guestfs_get_pid"
27323 #: ../src/guestfs-actions.pod:2510
27327 " guestfs_get_pid (guestfs_h *g);\n"
27332 #: ../src/guestfs-actions.pod:2520
27333 msgid "(Added in 1.0.56)"
27337 #: ../src/guestfs-actions.pod:2522
27338 msgid "guestfs_get_qemu"
27342 #: ../src/guestfs-actions.pod:2524
27346 " guestfs_get_qemu (guestfs_h *g);\n"
27351 #: ../src/guestfs-actions.pod:2535 ../src/guestfs-actions.pod:6843
27352 msgid "(Added in 1.0.6)"
27356 #: ../src/guestfs-actions.pod:2537
27357 msgid "guestfs_get_recovery_proc"
27361 #: ../src/guestfs-actions.pod:2539
27365 " guestfs_get_recovery_proc (guestfs_h *g);\n"
27370 #: ../src/guestfs-actions.pod:2546 ../src/guestfs-actions.pod:4130 ../src/guestfs-actions.pod:4461 ../src/guestfs-actions.pod:4855 ../src/guestfs-actions.pod:4887 ../src/guestfs-actions.pod:6082 ../src/guestfs-actions.pod:6425 ../src/guestfs-actions.pod:6867 ../src/guestfs-actions.pod:7565 ../src/guestfs-actions.pod:7585 ../src/guestfs-actions.pod:7777
27371 msgid "(Added in 1.0.77)"
27375 #: ../src/guestfs-actions.pod:2548
27376 msgid "guestfs_get_selinux"
27380 #: ../src/guestfs-actions.pod:2550
27384 " guestfs_get_selinux (guestfs_h *g);\n"
27389 #: ../src/guestfs-actions.pod:2553
27391 "This returns the current setting of the selinux flag which is passed to the "
27392 "appliance at boot time. See C<guestfs_set_selinux>."
27396 #: ../src/guestfs-actions.pod:2561 ../src/guestfs-actions.pod:2635 ../src/guestfs-actions.pod:6886 ../src/guestfs-actions.pod:6960
27397 msgid "(Added in 1.0.67)"
27401 #: ../src/guestfs-actions.pod:2563
27402 msgid "guestfs_get_smp"
27406 #: ../src/guestfs-actions.pod:2565
27410 " guestfs_get_smp (guestfs_h *g);\n"
27415 #: ../src/guestfs-actions.pod:2574
27416 msgid "guestfs_get_state"
27420 #: ../src/guestfs-actions.pod:2576
27424 " guestfs_get_state (guestfs_h *g);\n"
27429 #: ../src/guestfs-actions.pod:2588
27430 msgid "guestfs_get_trace"
27434 #: ../src/guestfs-actions.pod:2590
27438 " guestfs_get_trace (guestfs_h *g);\n"
27443 #: ../src/guestfs-actions.pod:2599
27444 msgid "guestfs_get_umask"
27448 #: ../src/guestfs-actions.pod:2601
27452 " guestfs_get_umask (guestfs_h *g);\n"
27457 #: ../src/guestfs-actions.pod:2604
27459 "Return the current umask. By default the umask is C<022> unless it has been "
27460 "set by calling C<guestfs_umask>."
27464 #: ../src/guestfs-actions.pod:2611
27465 msgid "guestfs_get_verbose"
27469 #: ../src/guestfs-actions.pod:2613
27473 " guestfs_get_verbose (guestfs_h *g);\n"
27478 #: ../src/guestfs-actions.pod:2622
27479 msgid "guestfs_getcon"
27483 #: ../src/guestfs-actions.pod:2624
27487 " guestfs_getcon (guestfs_h *g);\n"
27492 #: ../src/guestfs-actions.pod:2629
27493 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
27497 #: ../src/guestfs-actions.pod:2637
27498 msgid "guestfs_getxattr"
27502 #: ../src/guestfs-actions.pod:2639
27506 " guestfs_getxattr (guestfs_h *g,\n"
27507 " const char *path,\n"
27508 " const char *name,\n"
27509 " size_t *size_r);\n"
27514 #: ../src/guestfs-actions.pod:2645
27516 "Get a single extended attribute from file C<path> named C<name>. This call "
27517 "follows symlinks. If you want to lookup an extended attribute for the "
27518 "symlink itself, use C<guestfs_lgetxattr>."
27522 #: ../src/guestfs-actions.pod:2649 ../src/guestfs-actions.pod:4144
27524 "Normally it is better to get all extended attributes from a file in one go "
27525 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
27526 "implementations are buggy and do not provide a way to list out attributes. "
27527 "For these filesystems (notably ntfs-3g) you have to know the names of the "
27528 "extended attributes you want in advance and call this function."
27532 #: ../src/guestfs-actions.pod:2659
27533 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
27537 #: ../src/guestfs-actions.pod:2661 ../src/guestfs-actions.pod:2874 ../src/guestfs-actions.pod:3356 ../src/guestfs-actions.pod:4156 ../src/guestfs-actions.pod:6075 ../src/guestfs-actions.pod:6101 ../src/guestfs-actions.pod:6282
27539 "This function returns a buffer, or NULL on error. The size of the returned "
27540 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
27545 #: ../src/guestfs-actions.pod:2665 ../src/guestfs-actions.pod:4160
27546 msgid "(Added in 1.7.24)"
27550 #: ../src/guestfs-actions.pod:2667
27551 msgid "guestfs_getxattrs"
27555 #: ../src/guestfs-actions.pod:2669
27558 " struct guestfs_xattr_list *\n"
27559 " guestfs_getxattrs (guestfs_h *g,\n"
27560 " const char *path);\n"
27565 #: ../src/guestfs-actions.pod:2679
27566 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
27570 #: ../src/guestfs-actions.pod:2681 ../src/guestfs-actions.pod:4172 ../src/guestfs-actions.pod:4851
27572 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
27573 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
27577 #: ../src/guestfs-actions.pod:2685 ../src/guestfs-actions.pod:4176 ../src/guestfs-actions.pod:4375 ../src/guestfs-actions.pod:4411 ../src/guestfs-actions.pod:6455 ../src/guestfs-actions.pod:6979 ../src/guestfs-actions.pod:8362
27578 msgid "(Added in 1.0.59)"
27582 #: ../src/guestfs-actions.pod:2687
27583 msgid "guestfs_glob_expand"
27587 #: ../src/guestfs-actions.pod:2689
27591 " guestfs_glob_expand (guestfs_h *g,\n"
27592 " const char *pattern);\n"
27597 #: ../src/guestfs-actions.pod:2708 ../src/guestfs-actions.pod:7163 ../src/guestfs-actions.pod:7180
27598 msgid "(Added in 1.0.50)"
27602 #: ../src/guestfs-actions.pod:2710
27603 msgid "guestfs_grep"
27607 #: ../src/guestfs-actions.pod:2712
27611 " guestfs_grep (guestfs_h *g,\n"
27612 " const char *regex,\n"
27613 " const char *path);\n"
27618 #: ../src/guestfs-actions.pod:2729
27619 msgid "guestfs_grepi"
27623 #: ../src/guestfs-actions.pod:2731
27627 " guestfs_grepi (guestfs_h *g,\n"
27628 " const char *regex,\n"
27629 " const char *path);\n"
27634 #: ../src/guestfs-actions.pod:2748
27635 msgid "guestfs_grub_install"
27639 #: ../src/guestfs-actions.pod:2750
27643 " guestfs_grub_install (guestfs_h *g,\n"
27644 " const char *root,\n"
27645 " const char *device);\n"
27650 #: ../src/guestfs-actions.pod:2793
27651 msgid "(Added in 1.0.17)"
27655 #: ../src/guestfs-actions.pod:2795
27656 msgid "guestfs_head"
27660 #: ../src/guestfs-actions.pod:2797
27664 " guestfs_head (guestfs_h *g,\n"
27665 " const char *path);\n"
27670 #: ../src/guestfs-actions.pod:2813
27671 msgid "guestfs_head_n"
27675 #: ../src/guestfs-actions.pod:2815
27679 " guestfs_head_n (guestfs_h *g,\n"
27681 " const char *path);\n"
27686 #: ../src/guestfs-actions.pod:2837
27687 msgid "guestfs_hexdump"
27691 #: ../src/guestfs-actions.pod:2839
27695 " guestfs_hexdump (guestfs_h *g,\n"
27696 " const char *path);\n"
27701 #: ../src/guestfs-actions.pod:2852 ../src/guestfs-actions.pod:7244 ../src/guestfs-actions.pod:7299
27702 msgid "(Added in 1.0.22)"
27706 #: ../src/guestfs-actions.pod:2854
27707 msgid "guestfs_initrd_cat"
27711 #: ../src/guestfs-actions.pod:2856
27715 " guestfs_initrd_cat (guestfs_h *g,\n"
27716 " const char *initrdpath,\n"
27717 " const char *filename,\n"
27718 " size_t *size_r);\n"
27723 #: ../src/guestfs-actions.pod:2872
27724 msgid "See also C<guestfs_initrd_list>."
27728 #: ../src/guestfs-actions.pod:2883
27729 msgid "guestfs_initrd_list"
27733 #: ../src/guestfs-actions.pod:2885
27737 " guestfs_initrd_list (guestfs_h *g,\n"
27738 " const char *path);\n"
27743 #: ../src/guestfs-actions.pod:2905
27744 msgid "guestfs_inotify_add_watch"
27748 #: ../src/guestfs-actions.pod:2907
27752 " guestfs_inotify_add_watch (guestfs_h *g,\n"
27753 " const char *path,\n"
27759 #: ../src/guestfs-actions.pod:2926
27760 msgid "guestfs_inotify_close"
27764 #: ../src/guestfs-actions.pod:2928
27768 " guestfs_inotify_close (guestfs_h *g);\n"
27773 #: ../src/guestfs-actions.pod:2939
27774 msgid "guestfs_inotify_files"
27778 #: ../src/guestfs-actions.pod:2941
27782 " guestfs_inotify_files (guestfs_h *g);\n"
27787 #: ../src/guestfs-actions.pod:2944
27789 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
27790 "returns a list of pathnames of objects that were touched. The returned "
27791 "pathnames are sorted and deduplicated."
27795 #: ../src/guestfs-actions.pod:2954
27796 msgid "guestfs_inotify_init"
27800 #: ../src/guestfs-actions.pod:2956
27804 " guestfs_inotify_init (guestfs_h *g,\n"
27805 " int maxevents);\n"
27810 #: ../src/guestfs-actions.pod:2964
27812 "C<maxevents> is the maximum number of events which will be queued up between "
27813 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
27814 "passed as C<0>, then the kernel (or previously set) default is used. For "
27815 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
27816 "throws away events, but records the fact that it threw them away by setting "
27817 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
27818 "C<guestfs_inotify_read>)."
27822 #: ../src/guestfs-actions.pod:2974
27824 "Before any events are generated, you have to add some watches to the "
27825 "internal watch list. See: C<guestfs_inotify_add_watch>, "
27826 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
27830 #: ../src/guestfs-actions.pod:2980
27832 "Queued up events should be read periodically by calling "
27833 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
27834 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
27835 "often enough then you risk the internal queue overflowing."
27839 #: ../src/guestfs-actions.pod:2987
27841 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
27842 "This also removes any watches automatically."
27846 #: ../src/guestfs-actions.pod:3000
27847 msgid "guestfs_inotify_read"
27851 #: ../src/guestfs-actions.pod:3002
27854 " struct guestfs_inotify_event_list *\n"
27855 " guestfs_inotify_read (guestfs_h *g);\n"
27860 #: ../src/guestfs-actions.pod:3016
27862 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
27863 "there was an error. I<The caller must call "
27864 "C<guestfs_free_inotify_event_list> after use>."
27868 #: ../src/guestfs-actions.pod:3022
27869 msgid "guestfs_inotify_rm_watch"
27873 #: ../src/guestfs-actions.pod:3024
27877 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
27883 #: ../src/guestfs-actions.pod:3028
27885 "Remove a previously defined inotify watch. See "
27886 "C<guestfs_inotify_add_watch>."
27890 #: ../src/guestfs-actions.pod:3035
27891 msgid "guestfs_inspect_get_arch"
27895 #: ../src/guestfs-actions.pod:3037
27899 " guestfs_inspect_get_arch (guestfs_h *g,\n"
27900 " const char *root);\n"
27905 #: ../src/guestfs-actions.pod:3041
27907 "This returns the architecture of the inspected operating system. The "
27908 "possible return values are listed under C<guestfs_file_architecture>."
27912 #: ../src/guestfs-actions.pod:3055
27913 msgid "guestfs_inspect_get_distro"
27917 #: ../src/guestfs-actions.pod:3057
27921 " guestfs_inspect_get_distro (guestfs_h *g,\n"
27922 " const char *root);\n"
27927 #: ../src/guestfs-actions.pod:3157
27928 msgid "guestfs_inspect_get_drive_mappings"
27932 #: ../src/guestfs-actions.pod:3159
27936 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
27937 " const char *root);\n"
27942 #: ../src/guestfs-actions.pod:3188
27944 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27945 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
27949 #: ../src/guestfs-actions.pod:3192 ../src/guestfs-actions.pod:3460 ../src/guestfs-actions.pod:4263 ../src/guestfs-actions.pod:5526 ../src/guestfs-actions.pod:7601
27951 "This function returns a NULL-terminated array of strings, or NULL if there "
27952 "was an error. The array of strings will always have length C<2n+1>, where "
27953 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
27954 "caller must free the strings and the array after use>."
27958 #: ../src/guestfs-actions.pod:3198 ../src/guestfs-actions.pod:3659
27959 msgid "(Added in 1.9.17)"
27963 #: ../src/guestfs-actions.pod:3200
27964 msgid "guestfs_inspect_get_filesystems"
27968 #: ../src/guestfs-actions.pod:3202
27972 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
27973 " const char *root);\n"
27978 #: ../src/guestfs-actions.pod:3214
27980 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27981 "C<guestfs_inspect_get_mountpoints>."
27985 #: ../src/guestfs-actions.pod:3223
27986 msgid "guestfs_inspect_get_format"
27990 #: ../src/guestfs-actions.pod:3225
27994 " guestfs_inspect_get_format (guestfs_h *g,\n"
27995 " const char *root);\n"
28000 #: ../src/guestfs-actions.pod:3259 ../src/guestfs-actions.pod:3695 ../src/guestfs-actions.pod:3711 ../src/guestfs-actions.pod:3729 ../src/guestfs-actions.pod:6493
28001 msgid "(Added in 1.9.4)"
28005 #: ../src/guestfs-actions.pod:3261
28006 msgid "guestfs_inspect_get_hostname"
28010 #: ../src/guestfs-actions.pod:3263
28014 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
28015 " const char *root);\n"
28020 #: ../src/guestfs-actions.pod:3278
28021 msgid "(Added in 1.7.9)"
28025 #: ../src/guestfs-actions.pod:3280
28026 msgid "guestfs_inspect_get_icon"
28030 #: ../src/guestfs-actions.pod:3282
28034 " guestfs_inspect_get_icon (guestfs_h *g,\n"
28035 " const char *root,\n"
28036 " size_t *size_r,\n"
28042 #: ../src/guestfs-actions.pod:3293
28045 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
28046 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
28051 #: ../src/guestfs-actions.pod:3360 ../src/guestfs-actions.pod:4190 ../src/guestfs-actions.pod:5425
28052 msgid "(Added in 1.11.12)"
28056 #: ../src/guestfs-actions.pod:3362
28057 msgid "guestfs_inspect_get_icon_va"
28061 #: ../src/guestfs-actions.pod:3364
28065 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
28066 " const char *root,\n"
28067 " size_t *size_r,\n"
28068 " va_list args);\n"
28073 #: ../src/guestfs-actions.pod:3370
28074 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
28078 #: ../src/guestfs-actions.pod:3374
28079 msgid "guestfs_inspect_get_icon_argv"
28083 #: ../src/guestfs-actions.pod:3376
28087 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
28088 " const char *root,\n"
28089 " size_t *size_r,\n"
28090 " const struct guestfs_inspect_get_icon_argv "
28096 #: ../src/guestfs-actions.pod:3382
28097 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
28101 #: ../src/guestfs-actions.pod:3386
28102 msgid "guestfs_inspect_get_major_version"
28106 #: ../src/guestfs-actions.pod:3388
28110 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
28111 " const char *root);\n"
28116 #: ../src/guestfs-actions.pod:3410
28117 msgid "guestfs_inspect_get_minor_version"
28121 #: ../src/guestfs-actions.pod:3412
28125 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
28126 " const char *root);\n"
28131 #: ../src/guestfs-actions.pod:3421
28133 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28134 "C<guestfs_inspect_get_major_version>."
28138 #: ../src/guestfs-actions.pod:3428
28139 msgid "guestfs_inspect_get_mountpoints"
28143 #: ../src/guestfs-actions.pod:3430
28147 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
28148 " const char *root);\n"
28153 #: ../src/guestfs-actions.pod:3451
28155 "For operating systems like Windows which still use drive letters, this call "
28156 "will only return an entry for the first drive \"mounted on\" C</>. For "
28157 "information about the mapping of drive letters to partitions, see "
28158 "C<guestfs_inspect_get_drive_mappings>."
28162 #: ../src/guestfs-actions.pod:3457
28164 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28165 "C<guestfs_inspect_get_filesystems>."
28169 #: ../src/guestfs-actions.pod:3468
28170 msgid "guestfs_inspect_get_package_format"
28174 #: ../src/guestfs-actions.pod:3470
28178 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
28179 " const char *root);\n"
28184 #: ../src/guestfs-actions.pod:3474
28186 "This function and C<guestfs_inspect_get_package_management> return the "
28187 "package format and package management tool used by the inspected operating "
28188 "system. For example for Fedora these functions would return C<rpm> (package "
28189 "format) and C<yum> (package management)."
28193 #: ../src/guestfs-actions.pod:3493 ../src/guestfs-actions.pod:3521
28194 msgid "(Added in 1.7.5)"
28198 #: ../src/guestfs-actions.pod:3495
28199 msgid "guestfs_inspect_get_package_management"
28203 #: ../src/guestfs-actions.pod:3497
28207 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
28208 " const char *root);\n"
28213 #: ../src/guestfs-actions.pod:3501
28215 "C<guestfs_inspect_get_package_format> and this function return the package "
28216 "format and package management tool used by the inspected operating system. "
28217 "For example for Fedora these functions would return C<rpm> (package format) "
28218 "and C<yum> (package management)."
28222 #: ../src/guestfs-actions.pod:3523
28223 msgid "guestfs_inspect_get_product_name"
28227 #: ../src/guestfs-actions.pod:3525
28231 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
28232 " const char *root);\n"
28237 #: ../src/guestfs-actions.pod:3544
28238 msgid "guestfs_inspect_get_product_variant"
28242 #: ../src/guestfs-actions.pod:3546
28246 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
28247 " const char *root);\n"
28252 #: ../src/guestfs-actions.pod:3569
28254 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28255 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
28259 #: ../src/guestfs-actions.pod:3576
28260 msgid "(Added in 1.9.13)"
28264 #: ../src/guestfs-actions.pod:3578
28265 msgid "guestfs_inspect_get_roots"
28269 #: ../src/guestfs-actions.pod:3580
28273 " guestfs_inspect_get_roots (guestfs_h *g);\n"
28278 #: ../src/guestfs-actions.pod:3583
28280 "This function is a convenient way to get the list of root devices, as "
28281 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
28282 "the whole inspection process."
28286 #: ../src/guestfs-actions.pod:3587
28288 "This returns an empty list if either no root devices were found or the "
28289 "caller has not called C<guestfs_inspect_os>."
28293 #: ../src/guestfs-actions.pod:3596
28294 msgid "(Added in 1.7.3)"
28298 #: ../src/guestfs-actions.pod:3598
28299 msgid "guestfs_inspect_get_type"
28303 #: ../src/guestfs-actions.pod:3600
28307 " guestfs_inspect_get_type (guestfs_h *g,\n"
28308 " const char *root);\n"
28313 #: ../src/guestfs-actions.pod:3641
28314 msgid "guestfs_inspect_get_windows_current_control_set"
28318 #: ../src/guestfs-actions.pod:3643
28322 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
28323 " const char *root);\n"
28328 #: ../src/guestfs-actions.pod:3661
28329 msgid "guestfs_inspect_get_windows_systemroot"
28333 #: ../src/guestfs-actions.pod:3663
28337 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
28338 " const char *root);\n"
28343 #: ../src/guestfs-actions.pod:3679
28344 msgid "(Added in 1.5.25)"
28348 #: ../src/guestfs-actions.pod:3681
28349 msgid "guestfs_inspect_is_live"
28353 #: ../src/guestfs-actions.pod:3683
28357 " guestfs_inspect_is_live (guestfs_h *g,\n"
28358 " const char *root);\n"
28363 #: ../src/guestfs-actions.pod:3687
28365 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28366 "disk), then this returns true if a live image was detected on the disk."
28370 #: ../src/guestfs-actions.pod:3697
28371 msgid "guestfs_inspect_is_multipart"
28375 #: ../src/guestfs-actions.pod:3699
28379 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
28380 " const char *root);\n"
28385 #: ../src/guestfs-actions.pod:3703
28387 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28388 "disk), then this returns true if the disk is part of a set."
28392 #: ../src/guestfs-actions.pod:3713
28393 msgid "guestfs_inspect_is_netinst"
28397 #: ../src/guestfs-actions.pod:3715
28401 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
28402 " const char *root);\n"
28407 #: ../src/guestfs-actions.pod:3719
28409 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28410 "disk), then this returns true if the disk is a network installer, ie. not a "
28411 "self-contained install CD but one which is likely to require network access "
28412 "to complete the install."
28416 #: ../src/guestfs-actions.pod:3731
28417 msgid "guestfs_inspect_list_applications"
28421 #: ../src/guestfs-actions.pod:3733
28424 " struct guestfs_application_list *\n"
28425 " guestfs_inspect_list_applications (guestfs_h *g,\n"
28426 " const char *root);\n"
28431 #: ../src/guestfs-actions.pod:3739
28433 "I<Note:> This call works differently from other parts of the inspection "
28434 "API. You have to call C<guestfs_inspect_os>, then "
28435 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
28436 "this. Listing applications is a significantly more difficult operation "
28437 "which requires access to the full filesystem. Also note that unlike the "
28438 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
28439 "the libguestfs handle, this call actually reads parts of the mounted "
28440 "filesystems during the call."
28444 #: ../src/guestfs-actions.pod:3829
28446 "This function returns a C<struct guestfs_application_list *>, or NULL if "
28447 "there was an error. I<The caller must call C<guestfs_free_application_list> "
28452 #: ../src/guestfs-actions.pod:3833
28453 msgid "(Added in 1.7.8)"
28457 #: ../src/guestfs-actions.pod:3835
28458 msgid "guestfs_inspect_os"
28462 #: ../src/guestfs-actions.pod:3837
28466 " guestfs_inspect_os (guestfs_h *g);\n"
28471 #: ../src/guestfs-actions.pod:3853
28473 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
28474 "functions in order to query further information about each operating system, "
28475 "such as the name and version."
28479 #: ../src/guestfs-actions.pod:3858
28481 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
28482 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
28483 "the contents. This should be called with no disks currently mounted. The "
28484 "function may also use Augeas, so any existing Augeas handle will be closed."
28488 #: ../src/guestfs-actions.pod:3870 ../src/guestfs-actions.pod:4201 ../src/guestfs-actions.pod:4283
28489 msgid "See also C<guestfs_list_filesystems>."
28493 #: ../src/guestfs-actions.pod:3878
28494 msgid "guestfs_is_blockdev"
28498 #: ../src/guestfs-actions.pod:3880
28502 " guestfs_is_blockdev (guestfs_h *g,\n"
28503 " const char *path);\n"
28508 #: ../src/guestfs-actions.pod:3887 ../src/guestfs-actions.pod:3916 ../src/guestfs-actions.pod:3946 ../src/guestfs-actions.pod:3961 ../src/guestfs-actions.pod:3977 ../src/guestfs-actions.pod:4033 ../src/guestfs-actions.pod:4048
28509 msgid "See also C<guestfs_stat>."
28513 #: ../src/guestfs-actions.pod:3891 ../src/guestfs-actions.pod:3920 ../src/guestfs-actions.pod:3965 ../src/guestfs-actions.pod:4037 ../src/guestfs-actions.pod:4052
28514 msgid "(Added in 1.5.10)"
28518 #: ../src/guestfs-actions.pod:3893
28519 msgid "guestfs_is_busy"
28523 #: ../src/guestfs-actions.pod:3895
28527 " guestfs_is_busy (guestfs_h *g);\n"
28532 #: ../src/guestfs-actions.pod:3907
28533 msgid "guestfs_is_chardev"
28537 #: ../src/guestfs-actions.pod:3909
28541 " guestfs_is_chardev (guestfs_h *g,\n"
28542 " const char *path);\n"
28547 #: ../src/guestfs-actions.pod:3922
28548 msgid "guestfs_is_config"
28552 #: ../src/guestfs-actions.pod:3924
28556 " guestfs_is_config (guestfs_h *g);\n"
28561 #: ../src/guestfs-actions.pod:3936
28562 msgid "guestfs_is_dir"
28566 #: ../src/guestfs-actions.pod:3938
28570 " guestfs_is_dir (guestfs_h *g,\n"
28571 " const char *path);\n"
28576 #: ../src/guestfs-actions.pod:3952
28577 msgid "guestfs_is_fifo"
28581 #: ../src/guestfs-actions.pod:3954
28585 " guestfs_is_fifo (guestfs_h *g,\n"
28586 " const char *path);\n"
28591 #: ../src/guestfs-actions.pod:3967
28592 msgid "guestfs_is_file"
28596 #: ../src/guestfs-actions.pod:3969
28600 " guestfs_is_file (guestfs_h *g,\n"
28601 " const char *path);\n"
28606 #: ../src/guestfs-actions.pod:3983
28607 msgid "guestfs_is_launching"
28611 #: ../src/guestfs-actions.pod:3985
28615 " guestfs_is_launching (guestfs_h *g);\n"
28620 #: ../src/guestfs-actions.pod:3997
28621 msgid "guestfs_is_lv"
28625 #: ../src/guestfs-actions.pod:3999
28629 " guestfs_is_lv (guestfs_h *g,\n"
28630 " const char *device);\n"
28635 #: ../src/guestfs-actions.pod:4010
28636 msgid "guestfs_is_ready"
28640 #: ../src/guestfs-actions.pod:4012
28644 " guestfs_is_ready (guestfs_h *g);\n"
28649 #: ../src/guestfs-actions.pod:4024
28650 msgid "guestfs_is_socket"
28654 #: ../src/guestfs-actions.pod:4026
28658 " guestfs_is_socket (guestfs_h *g,\n"
28659 " const char *path);\n"
28664 #: ../src/guestfs-actions.pod:4039
28665 msgid "guestfs_is_symlink"
28669 #: ../src/guestfs-actions.pod:4041
28673 " guestfs_is_symlink (guestfs_h *g,\n"
28674 " const char *path);\n"
28679 #: ../src/guestfs-actions.pod:4054
28680 msgid "guestfs_is_zero"
28684 #: ../src/guestfs-actions.pod:4056
28688 " guestfs_is_zero (guestfs_h *g,\n"
28689 " const char *path);\n"
28694 #: ../src/guestfs-actions.pod:4065 ../src/guestfs-actions.pod:4079
28695 msgid "(Added in 1.11.8)"
28699 #: ../src/guestfs-actions.pod:4067
28700 msgid "guestfs_is_zero_device"
28704 #: ../src/guestfs-actions.pod:4069
28708 " guestfs_is_zero_device (guestfs_h *g,\n"
28709 " const char *device);\n"
28714 #: ../src/guestfs-actions.pod:4081
28715 msgid "guestfs_kill_subprocess"
28719 #: ../src/guestfs-actions.pod:4083
28723 " guestfs_kill_subprocess (guestfs_h *g);\n"
28728 #: ../src/guestfs-actions.pod:4092
28729 msgid "guestfs_launch"
28733 #: ../src/guestfs-actions.pod:4094
28737 " guestfs_launch (guestfs_h *g);\n"
28742 #: ../src/guestfs-actions.pod:4112
28743 msgid "guestfs_lchown"
28747 #: ../src/guestfs-actions.pod:4114
28751 " guestfs_lchown (guestfs_h *g,\n"
28754 " const char *path);\n"
28759 #: ../src/guestfs-actions.pod:4120
28761 "Change the file owner to C<owner> and group to C<group>. This is like "
28762 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
28763 "changed, not the target."
28767 #: ../src/guestfs-actions.pod:4132
28768 msgid "guestfs_lgetxattr"
28772 #: ../src/guestfs-actions.pod:4134
28776 " guestfs_lgetxattr (guestfs_h *g,\n"
28777 " const char *path,\n"
28778 " const char *name,\n"
28779 " size_t *size_r);\n"
28784 #: ../src/guestfs-actions.pod:4154
28785 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
28789 #: ../src/guestfs-actions.pod:4162
28790 msgid "guestfs_lgetxattrs"
28794 #: ../src/guestfs-actions.pod:4164
28797 " struct guestfs_xattr_list *\n"
28798 " guestfs_lgetxattrs (guestfs_h *g,\n"
28799 " const char *path);\n"
28804 #: ../src/guestfs-actions.pod:4168
28806 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
28807 "then it returns the extended attributes of the link itself."
28811 #: ../src/guestfs-actions.pod:4178
28812 msgid "guestfs_list_9p"
28816 #: ../src/guestfs-actions.pod:4180
28820 " guestfs_list_9p (guestfs_h *g);\n"
28825 #: ../src/guestfs-actions.pod:4192
28826 msgid "guestfs_list_devices"
28830 #: ../src/guestfs-actions.pod:4194
28834 " guestfs_list_devices (guestfs_h *g);\n"
28839 #: ../src/guestfs-actions.pod:4209
28840 msgid "guestfs_list_dm_devices"
28844 #: ../src/guestfs-actions.pod:4211
28848 " guestfs_list_dm_devices (guestfs_h *g);\n"
28853 #: ../src/guestfs-actions.pod:4216
28855 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
28856 "previous call to C<guestfs_luks_open>."
28860 #: ../src/guestfs-actions.pod:4219
28862 "Device mapper devices which correspond to logical volumes are I<not> "
28863 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
28868 #: ../src/guestfs-actions.pod:4227 ../src/guestfs-actions.pod:5664
28869 msgid "(Added in 1.11.15)"
28873 #: ../src/guestfs-actions.pod:4229
28874 msgid "guestfs_list_filesystems"
28878 #: ../src/guestfs-actions.pod:4231
28882 " guestfs_list_filesystems (guestfs_h *g);\n"
28887 #: ../src/guestfs-actions.pod:4251
28889 "This command runs other libguestfs commands, which might include "
28890 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
28891 "soon after launch and only when nothing is mounted."
28895 #: ../src/guestfs-actions.pod:4255
28897 "Not all of the filesystems returned will be mountable. In particular, swap "
28898 "partitions are returned in the list. Also this command does not check that "
28899 "each filesystem found is valid and mountable, and some filesystems might be "
28900 "mountable but require special options. Filesystems may not all belong to a "
28901 "single logical operating system (use C<guestfs_inspect_os> to look for "
28906 #: ../src/guestfs-actions.pod:4269 ../src/guestfs-actions.pod:6024
28907 msgid "(Added in 1.5.15)"
28911 #: ../src/guestfs-actions.pod:4271
28912 msgid "guestfs_list_partitions"
28916 #: ../src/guestfs-actions.pod:4273
28920 " guestfs_list_partitions (guestfs_h *g);\n"
28925 #: ../src/guestfs-actions.pod:4280
28927 "This does not return logical volumes. For that you will need to call "
28932 #: ../src/guestfs-actions.pod:4291
28937 #: ../src/guestfs-actions.pod:4293
28941 " guestfs_ll (guestfs_h *g,\n"
28942 " const char *directory);\n"
28947 #: ../src/guestfs-actions.pod:4308
28952 #: ../src/guestfs-actions.pod:4310
28956 " guestfs_ln (guestfs_h *g,\n"
28957 " const char *target,\n"
28958 " const char *linkname);\n"
28963 #: ../src/guestfs-actions.pod:4321
28964 msgid "guestfs_ln_f"
28968 #: ../src/guestfs-actions.pod:4323
28972 " guestfs_ln_f (guestfs_h *g,\n"
28973 " const char *target,\n"
28974 " const char *linkname);\n"
28979 #: ../src/guestfs-actions.pod:4335
28980 msgid "guestfs_ln_s"
28984 #: ../src/guestfs-actions.pod:4337
28988 " guestfs_ln_s (guestfs_h *g,\n"
28989 " const char *target,\n"
28990 " const char *linkname);\n"
28995 #: ../src/guestfs-actions.pod:4348
28996 msgid "guestfs_ln_sf"
29000 #: ../src/guestfs-actions.pod:4350
29004 " guestfs_ln_sf (guestfs_h *g,\n"
29005 " const char *target,\n"
29006 " const char *linkname);\n"
29011 #: ../src/guestfs-actions.pod:4362
29012 msgid "guestfs_lremovexattr"
29016 #: ../src/guestfs-actions.pod:4364
29020 " guestfs_lremovexattr (guestfs_h *g,\n"
29021 " const char *xattr,\n"
29022 " const char *path);\n"
29027 #: ../src/guestfs-actions.pod:4369
29029 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
29030 "link, then it removes an extended attribute of the link itself."
29034 #: ../src/guestfs-actions.pod:4377
29039 #: ../src/guestfs-actions.pod:4379
29043 " guestfs_ls (guestfs_h *g,\n"
29044 " const char *directory);\n"
29049 #: ../src/guestfs-actions.pod:4387
29051 "This command is mostly useful for interactive sessions. Programs should "
29052 "probably use C<guestfs_readdir> instead."
29056 #: ../src/guestfs-actions.pod:4396
29057 msgid "guestfs_lsetxattr"
29061 #: ../src/guestfs-actions.pod:4398
29065 " guestfs_lsetxattr (guestfs_h *g,\n"
29066 " const char *xattr,\n"
29067 " const char *val,\n"
29069 " const char *path);\n"
29074 #: ../src/guestfs-actions.pod:4405
29076 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
29077 "then it sets an extended attribute of the link itself."
29081 #: ../src/guestfs-actions.pod:4413
29082 msgid "guestfs_lstat"
29086 #: ../src/guestfs-actions.pod:4415
29089 " struct guestfs_stat *\n"
29090 " guestfs_lstat (guestfs_h *g,\n"
29091 " const char *path);\n"
29096 #: ../src/guestfs-actions.pod:4421
29098 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
29099 "link, then the link is stat-ed, not the file it refers to."
29103 #: ../src/guestfs-actions.pod:4427 ../src/guestfs-actions.pod:7204
29105 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
29106 "error. I<The caller must call C<guestfs_free_stat> after use>."
29110 #: ../src/guestfs-actions.pod:4431 ../src/guestfs-actions.pod:7208 ../src/guestfs-actions.pod:7226 ../src/guestfs-actions.pod:7607
29111 msgid "(Added in 0.9.2)"
29115 #: ../src/guestfs-actions.pod:4433
29116 msgid "guestfs_lstatlist"
29120 #: ../src/guestfs-actions.pod:4435
29123 " struct guestfs_stat_list *\n"
29124 " guestfs_lstatlist (guestfs_h *g,\n"
29125 " const char *path,\n"
29126 " char *const *names);\n"
29131 #: ../src/guestfs-actions.pod:4440
29133 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
29134 "files, where all files are in the directory C<path>. C<names> is the list "
29135 "of files from this directory."
29139 #: ../src/guestfs-actions.pod:4449
29141 "This call is intended for programs that want to efficiently list a directory "
29142 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
29143 "for a similarly efficient call for getting extended attributes. Very long "
29144 "directory listings might cause the protocol message size to be exceeded, "
29145 "causing this call to fail. The caller must split up such requests into "
29146 "smaller groups of names."
29150 #: ../src/guestfs-actions.pod:4457
29152 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
29153 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
29157 #: ../src/guestfs-actions.pod:4463
29158 msgid "guestfs_luks_add_key"
29162 #: ../src/guestfs-actions.pod:4465
29166 " guestfs_luks_add_key (guestfs_h *g,\n"
29167 " const char *device,\n"
29168 " const char *key,\n"
29169 " const char *newkey,\n"
29175 #: ../src/guestfs-actions.pod:4477
29177 "Note that if C<keyslot> already contains a key, then this command will "
29178 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
29182 #: ../src/guestfs-actions.pod:4483 ../src/guestfs-actions.pod:4520 ../src/guestfs-actions.pod:4540 ../src/guestfs-actions.pod:4560 ../src/guestfs-actions.pod:4595 ../src/guestfs-actions.pod:4614
29184 "This function takes a key or passphrase parameter which could contain "
29185 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
29190 #: ../src/guestfs-actions.pod:4487 ../src/guestfs-actions.pod:4524 ../src/guestfs-actions.pod:4544 ../src/guestfs-actions.pod:4564
29191 msgid "(Added in 1.5.2)"
29195 #: ../src/guestfs-actions.pod:4489
29196 msgid "guestfs_luks_close"
29200 #: ../src/guestfs-actions.pod:4491
29204 " guestfs_luks_close (guestfs_h *g,\n"
29205 " const char *device);\n"
29210 #: ../src/guestfs-actions.pod:4495
29212 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
29213 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
29214 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
29215 "underlying block device."
29219 #: ../src/guestfs-actions.pod:4503 ../src/guestfs-actions.pod:4599 ../src/guestfs-actions.pod:4618 ../src/guestfs-actions.pod:4668 ../src/guestfs-actions.pod:4713
29220 msgid "(Added in 1.5.1)"
29224 #: ../src/guestfs-actions.pod:4505
29225 msgid "guestfs_luks_format"
29229 #: ../src/guestfs-actions.pod:4507
29233 " guestfs_luks_format (guestfs_h *g,\n"
29234 " const char *device,\n"
29235 " const char *key,\n"
29241 #: ../src/guestfs-actions.pod:4526
29242 msgid "guestfs_luks_format_cipher"
29246 #: ../src/guestfs-actions.pod:4528
29250 " guestfs_luks_format_cipher (guestfs_h *g,\n"
29251 " const char *device,\n"
29252 " const char *key,\n"
29254 " const char *cipher);\n"
29259 #: ../src/guestfs-actions.pod:4535
29261 "This command is the same as C<guestfs_luks_format> but it also allows you to "
29262 "set the C<cipher> used."
29266 #: ../src/guestfs-actions.pod:4546
29267 msgid "guestfs_luks_kill_slot"
29271 #: ../src/guestfs-actions.pod:4548
29275 " guestfs_luks_kill_slot (guestfs_h *g,\n"
29276 " const char *device,\n"
29277 " const char *key,\n"
29283 #: ../src/guestfs-actions.pod:4566
29284 msgid "guestfs_luks_open"
29288 #: ../src/guestfs-actions.pod:4568
29292 " guestfs_luks_open (guestfs_h *g,\n"
29293 " const char *device,\n"
29294 " const char *key,\n"
29295 " const char *mapname);\n"
29300 #: ../src/guestfs-actions.pod:4586
29302 "If this block device contains LVM volume groups, then calling "
29303 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
29308 #: ../src/guestfs-actions.pod:4590
29309 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
29313 #: ../src/guestfs-actions.pod:4601
29314 msgid "guestfs_luks_open_ro"
29318 #: ../src/guestfs-actions.pod:4603
29322 " guestfs_luks_open_ro (guestfs_h *g,\n"
29323 " const char *device,\n"
29324 " const char *key,\n"
29325 " const char *mapname);\n"
29330 #: ../src/guestfs-actions.pod:4609
29332 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
29337 #: ../src/guestfs-actions.pod:4620
29338 msgid "guestfs_lvcreate"
29342 #: ../src/guestfs-actions.pod:4622
29346 " guestfs_lvcreate (guestfs_h *g,\n"
29347 " const char *logvol,\n"
29348 " const char *volgroup,\n"
29354 #: ../src/guestfs-actions.pod:4635
29355 msgid "guestfs_lvm_canonical_lv_name"
29359 #: ../src/guestfs-actions.pod:4637
29363 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
29364 " const char *lvname);\n"
29369 #: ../src/guestfs-actions.pod:4648
29370 msgid "See also C<guestfs_is_lv>."
29374 #: ../src/guestfs-actions.pod:4653
29375 msgid "(Added in 1.5.24)"
29379 #: ../src/guestfs-actions.pod:4655
29380 msgid "guestfs_lvm_clear_filter"
29384 #: ../src/guestfs-actions.pod:4657
29388 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
29393 #: ../src/guestfs-actions.pod:4660
29395 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
29396 "see every block device."
29400 #: ../src/guestfs-actions.pod:4670
29401 msgid "guestfs_lvm_remove_all"
29405 #: ../src/guestfs-actions.pod:4672
29409 " guestfs_lvm_remove_all (guestfs_h *g);\n"
29414 #: ../src/guestfs-actions.pod:4682
29415 msgid "guestfs_lvm_set_filter"
29419 #: ../src/guestfs-actions.pod:4684
29423 " guestfs_lvm_set_filter (guestfs_h *g,\n"
29424 " char *const *devices);\n"
29429 #: ../src/guestfs-actions.pod:4715
29430 msgid "guestfs_lvremove"
29434 #: ../src/guestfs-actions.pod:4717
29438 " guestfs_lvremove (guestfs_h *g,\n"
29439 " const char *device);\n"
29444 #: ../src/guestfs-actions.pod:4729 ../src/guestfs-actions.pod:6139 ../src/guestfs-actions.pod:7977
29445 msgid "(Added in 1.0.13)"
29449 #: ../src/guestfs-actions.pod:4731
29450 msgid "guestfs_lvrename"
29454 #: ../src/guestfs-actions.pod:4733
29458 " guestfs_lvrename (guestfs_h *g,\n"
29459 " const char *logvol,\n"
29460 " const char *newlogvol);\n"
29465 #: ../src/guestfs-actions.pod:4742 ../src/guestfs-actions.pod:7990
29466 msgid "(Added in 1.0.83)"
29470 #: ../src/guestfs-actions.pod:4744
29471 msgid "guestfs_lvresize"
29475 #: ../src/guestfs-actions.pod:4746
29479 " guestfs_lvresize (guestfs_h *g,\n"
29480 " const char *device,\n"
29486 #: ../src/guestfs-actions.pod:4759
29487 msgid "guestfs_lvresize_free"
29491 #: ../src/guestfs-actions.pod:4761
29495 " guestfs_lvresize_free (guestfs_h *g,\n"
29496 " const char *lv,\n"
29502 #: ../src/guestfs-actions.pod:4774
29503 msgid "(Added in 1.3.3)"
29507 #: ../src/guestfs-actions.pod:4776
29508 msgid "guestfs_lvs"
29512 #: ../src/guestfs-actions.pod:4778
29516 " guestfs_lvs (guestfs_h *g);\n"
29521 #: ../src/guestfs-actions.pod:4787
29522 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
29526 #: ../src/guestfs-actions.pod:4795
29527 msgid "guestfs_lvs_full"
29531 #: ../src/guestfs-actions.pod:4797
29534 " struct guestfs_lvm_lv_list *\n"
29535 " guestfs_lvs_full (guestfs_h *g);\n"
29540 #: ../src/guestfs-actions.pod:4803
29542 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
29543 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after "
29548 #: ../src/guestfs-actions.pod:4809
29549 msgid "guestfs_lvuuid"
29553 #: ../src/guestfs-actions.pod:4811
29557 " guestfs_lvuuid (guestfs_h *g,\n"
29558 " const char *device);\n"
29563 #: ../src/guestfs-actions.pod:4822
29564 msgid "guestfs_lxattrlist"
29568 #: ../src/guestfs-actions.pod:4824
29571 " struct guestfs_xattr_list *\n"
29572 " guestfs_lxattrlist (guestfs_h *g,\n"
29573 " const char *path,\n"
29574 " char *const *names);\n"
29579 #: ../src/guestfs-actions.pod:4843
29581 "This call is intended for programs that want to efficiently list a directory "
29582 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
29583 "a similarly efficient call for getting standard stats. Very long directory "
29584 "listings might cause the protocol message size to be exceeded, causing this "
29585 "call to fail. The caller must split up such requests into smaller groups of "
29590 #: ../src/guestfs-actions.pod:4857
29591 msgid "guestfs_mkdir"
29595 #: ../src/guestfs-actions.pod:4859
29599 " guestfs_mkdir (guestfs_h *g,\n"
29600 " const char *path);\n"
29605 #: ../src/guestfs-actions.pod:4869
29606 msgid "guestfs_mkdir_mode"
29610 #: ../src/guestfs-actions.pod:4871
29614 " guestfs_mkdir_mode (guestfs_h *g,\n"
29615 " const char *path,\n"
29621 #: ../src/guestfs-actions.pod:4883
29622 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
29626 #: ../src/guestfs-actions.pod:4889
29627 msgid "guestfs_mkdir_p"
29631 #: ../src/guestfs-actions.pod:4891
29635 " guestfs_mkdir_p (guestfs_h *g,\n"
29636 " const char *path);\n"
29641 #: ../src/guestfs-actions.pod:4902
29642 msgid "guestfs_mkdtemp"
29646 #: ../src/guestfs-actions.pod:4904
29650 " guestfs_mkdtemp (guestfs_h *g,\n"
29651 " const char *template);\n"
29656 #: ../src/guestfs-actions.pod:4932
29657 msgid "guestfs_mke2fs_J"
29661 #: ../src/guestfs-actions.pod:4934
29665 " guestfs_mke2fs_J (guestfs_h *g,\n"
29666 " const char *fstype,\n"
29667 " int blocksize,\n"
29668 " const char *device,\n"
29669 " const char *journal);\n"
29674 #: ../src/guestfs-actions.pod:4947
29675 msgid "See also C<guestfs_mke2journal>."
29679 #: ../src/guestfs-actions.pod:4951 ../src/guestfs-actions.pod:4969 ../src/guestfs-actions.pod:4987 ../src/guestfs-actions.pod:5003 ../src/guestfs-actions.pod:5017 ../src/guestfs-actions.pod:5031 ../src/guestfs-actions.pod:5090 ../src/guestfs-actions.pod:5367
29680 msgid "(Added in 1.0.68)"
29684 #: ../src/guestfs-actions.pod:4953
29685 msgid "guestfs_mke2fs_JL"
29689 #: ../src/guestfs-actions.pod:4955
29693 " guestfs_mke2fs_JL (guestfs_h *g,\n"
29694 " const char *fstype,\n"
29695 " int blocksize,\n"
29696 " const char *device,\n"
29697 " const char *label);\n"
29702 #: ../src/guestfs-actions.pod:4965
29703 msgid "See also C<guestfs_mke2journal_L>."
29707 #: ../src/guestfs-actions.pod:4971
29708 msgid "guestfs_mke2fs_JU"
29712 #: ../src/guestfs-actions.pod:4973
29716 " guestfs_mke2fs_JU (guestfs_h *g,\n"
29717 " const char *fstype,\n"
29718 " int blocksize,\n"
29719 " const char *device,\n"
29720 " const char *uuid);\n"
29725 #: ../src/guestfs-actions.pod:4983
29726 msgid "See also C<guestfs_mke2journal_U>."
29730 #: ../src/guestfs-actions.pod:4989
29731 msgid "guestfs_mke2journal"
29735 #: ../src/guestfs-actions.pod:4991
29739 " guestfs_mke2journal (guestfs_h *g,\n"
29740 " int blocksize,\n"
29741 " const char *device);\n"
29746 #: ../src/guestfs-actions.pod:5005
29747 msgid "guestfs_mke2journal_L"
29751 #: ../src/guestfs-actions.pod:5007
29755 " guestfs_mke2journal_L (guestfs_h *g,\n"
29756 " int blocksize,\n"
29757 " const char *label,\n"
29758 " const char *device);\n"
29763 #: ../src/guestfs-actions.pod:5019
29764 msgid "guestfs_mke2journal_U"
29768 #: ../src/guestfs-actions.pod:5021
29772 " guestfs_mke2journal_U (guestfs_h *g,\n"
29773 " int blocksize,\n"
29774 " const char *uuid,\n"
29775 " const char *device);\n"
29780 #: ../src/guestfs-actions.pod:5033
29781 msgid "guestfs_mkfifo"
29785 #: ../src/guestfs-actions.pod:5035
29789 " guestfs_mkfifo (guestfs_h *g,\n"
29791 " const char *path);\n"
29796 #: ../src/guestfs-actions.pod:5040
29798 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
29799 "is just a convenient wrapper around C<guestfs_mknod>."
29803 #: ../src/guestfs-actions.pod:5050
29804 msgid "guestfs_mkfs"
29808 #: ../src/guestfs-actions.pod:5052
29812 " guestfs_mkfs (guestfs_h *g,\n"
29813 " const char *fstype,\n"
29814 " const char *device);\n"
29819 #: ../src/guestfs-actions.pod:5065
29820 msgid "guestfs_mkfs_b"
29824 #: ../src/guestfs-actions.pod:5067
29828 " guestfs_mkfs_b (guestfs_h *g,\n"
29829 " const char *fstype,\n"
29830 " int blocksize,\n"
29831 " const char *device);\n"
29836 #: ../src/guestfs-actions.pod:5073
29838 "I<This function is deprecated.> In new code, use the L</guestfs_mkfs_opts> "
29843 #: ../src/guestfs-actions.pod:5080
29845 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
29846 "block size of the resulting filesystem. Supported block sizes depend on the "
29847 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
29851 #: ../src/guestfs-actions.pod:5092
29852 msgid "guestfs_mkfs_opts"
29856 #: ../src/guestfs-actions.pod:5094
29860 " guestfs_mkfs_opts (guestfs_h *g,\n"
29861 " const char *fstype,\n"
29862 " const char *device,\n"
29868 #: ../src/guestfs-actions.pod:5105
29871 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
29872 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
29873 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
29874 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
29879 #: ../src/guestfs-actions.pod:5153
29880 msgid "(Added in 1.7.19)"
29884 #: ../src/guestfs-actions.pod:5155
29885 msgid "guestfs_mkfs_opts_va"
29889 #: ../src/guestfs-actions.pod:5157
29893 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
29894 " const char *fstype,\n"
29895 " const char *device,\n"
29896 " va_list args);\n"
29901 #: ../src/guestfs-actions.pod:5163
29902 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
29906 #: ../src/guestfs-actions.pod:5167
29907 msgid "guestfs_mkfs_opts_argv"
29911 #: ../src/guestfs-actions.pod:5169
29915 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
29916 " const char *fstype,\n"
29917 " const char *device,\n"
29918 " const struct guestfs_mkfs_opts_argv *optargs);\n"
29923 #: ../src/guestfs-actions.pod:5175
29924 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
29928 #: ../src/guestfs-actions.pod:5179
29929 msgid "guestfs_mkmountpoint"
29933 #: ../src/guestfs-actions.pod:5181
29937 " guestfs_mkmountpoint (guestfs_h *g,\n"
29938 " const char *exemptpath);\n"
29943 #: ../src/guestfs-actions.pod:5185
29945 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
29946 "that can be used to create extra mountpoints before mounting the first "
29951 #: ../src/guestfs-actions.pod:5209
29953 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
29954 "may get unexpected errors if you try to mix these calls. It is safest to "
29955 "manually unmount filesystems and remove mountpoints after use."
29959 #: ../src/guestfs-actions.pod:5213
29961 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
29962 "first, so for this to work for manual mountpoints, you must ensure that the "
29963 "innermost mountpoints have the longest pathnames, as in the example code "
29968 #: ../src/guestfs-actions.pod:5220
29970 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
29971 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
29972 "can also trigger these issues."
29976 #: ../src/guestfs-actions.pod:5226 ../src/guestfs-actions.pod:5532 ../src/guestfs-actions.pod:6559
29977 msgid "(Added in 1.0.62)"
29981 #: ../src/guestfs-actions.pod:5228
29982 msgid "guestfs_mknod"
29986 #: ../src/guestfs-actions.pod:5230
29990 " guestfs_mknod (guestfs_h *g,\n"
29994 " const char *path);\n"
29999 #: ../src/guestfs-actions.pod:5245
30001 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
30002 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
30003 "regular file). These constants are available in the standard Linux header "
30004 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
30005 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
30006 "the appropriate constant for you."
30010 #: ../src/guestfs-actions.pod:5259
30011 msgid "guestfs_mknod_b"
30015 #: ../src/guestfs-actions.pod:5261
30019 " guestfs_mknod_b (guestfs_h *g,\n"
30023 " const char *path);\n"
30028 #: ../src/guestfs-actions.pod:5268
30030 "This call creates a block device node called C<path> with mode C<mode> and "
30031 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30032 "wrapper around C<guestfs_mknod>."
30036 #: ../src/guestfs-actions.pod:5278
30037 msgid "guestfs_mknod_c"
30041 #: ../src/guestfs-actions.pod:5280
30045 " guestfs_mknod_c (guestfs_h *g,\n"
30049 " const char *path);\n"
30054 #: ../src/guestfs-actions.pod:5287
30056 "This call creates a char device node called C<path> with mode C<mode> and "
30057 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30058 "wrapper around C<guestfs_mknod>."
30062 #: ../src/guestfs-actions.pod:5297
30063 msgid "guestfs_mkswap"
30067 #: ../src/guestfs-actions.pod:5299
30071 " guestfs_mkswap (guestfs_h *g,\n"
30072 " const char *device);\n"
30077 #: ../src/guestfs-actions.pod:5309
30078 msgid "guestfs_mkswap_L"
30082 #: ../src/guestfs-actions.pod:5311
30086 " guestfs_mkswap_L (guestfs_h *g,\n"
30087 " const char *label,\n"
30088 " const char *device);\n"
30093 #: ../src/guestfs-actions.pod:5326
30094 msgid "guestfs_mkswap_U"
30098 #: ../src/guestfs-actions.pod:5328
30102 " guestfs_mkswap_U (guestfs_h *g,\n"
30103 " const char *uuid,\n"
30104 " const char *device);\n"
30109 #: ../src/guestfs-actions.pod:5339
30110 msgid "guestfs_mkswap_file"
30114 #: ../src/guestfs-actions.pod:5341
30118 " guestfs_mkswap_file (guestfs_h *g,\n"
30119 " const char *path);\n"
30124 #: ../src/guestfs-actions.pod:5347
30126 "This command just writes a swap file signature to an existing file. To "
30127 "create the file itself, use something like C<guestfs_fallocate>."
30131 #: ../src/guestfs-actions.pod:5354
30132 msgid "guestfs_modprobe"
30136 #: ../src/guestfs-actions.pod:5356
30140 " guestfs_modprobe (guestfs_h *g,\n"
30141 " const char *modulename);\n"
30146 #: ../src/guestfs-actions.pod:5369
30147 msgid "guestfs_mount"
30151 #: ../src/guestfs-actions.pod:5371
30155 " guestfs_mount (guestfs_h *g,\n"
30156 " const char *device,\n"
30157 " const char *mountpoint);\n"
30162 #: ../src/guestfs-actions.pod:5390
30164 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
30165 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
30166 "problems for users. If your program might need to work with older versions "
30167 "of libguestfs, use C<guestfs_mount_options> instead (using an empty string "
30168 "for the first parameter if you don't want any options)."
30172 #: ../src/guestfs-actions.pod:5401
30173 msgid "guestfs_mount_9p"
30177 #: ../src/guestfs-actions.pod:5403
30181 " guestfs_mount_9p (guestfs_h *g,\n"
30182 " const char *mounttag,\n"
30183 " const char *mountpoint,\n"
30189 #: ../src/guestfs-actions.pod:5414
30192 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
30197 #: ../src/guestfs-actions.pod:5427
30198 msgid "guestfs_mount_9p_va"
30202 #: ../src/guestfs-actions.pod:5429
30206 " guestfs_mount_9p_va (guestfs_h *g,\n"
30207 " const char *mounttag,\n"
30208 " const char *mountpoint,\n"
30209 " va_list args);\n"
30214 #: ../src/guestfs-actions.pod:5435
30215 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
30219 #: ../src/guestfs-actions.pod:5439
30220 msgid "guestfs_mount_9p_argv"
30224 #: ../src/guestfs-actions.pod:5441
30228 " guestfs_mount_9p_argv (guestfs_h *g,\n"
30229 " const char *mounttag,\n"
30230 " const char *mountpoint,\n"
30231 " const struct guestfs_mount_9p_argv *optargs);\n"
30236 #: ../src/guestfs-actions.pod:5447
30237 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
30241 #: ../src/guestfs-actions.pod:5451
30242 msgid "guestfs_mount_loop"
30246 #: ../src/guestfs-actions.pod:5453
30250 " guestfs_mount_loop (guestfs_h *g,\n"
30251 " const char *file,\n"
30252 " const char *mountpoint);\n"
30257 #: ../src/guestfs-actions.pod:5466
30258 msgid "guestfs_mount_options"
30262 #: ../src/guestfs-actions.pod:5468
30266 " guestfs_mount_options (guestfs_h *g,\n"
30267 " const char *options,\n"
30268 " const char *device,\n"
30269 " const char *mountpoint);\n"
30274 #: ../src/guestfs-actions.pod:5474
30276 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30277 "the mount options as for the L<mount(8)> I<-o> flag."
30281 #: ../src/guestfs-actions.pod:5484 ../src/guestfs-actions.pod:5498 ../src/guestfs-actions.pod:5515
30282 msgid "(Added in 1.0.10)"
30286 #: ../src/guestfs-actions.pod:5486
30287 msgid "guestfs_mount_ro"
30291 #: ../src/guestfs-actions.pod:5488
30295 " guestfs_mount_ro (guestfs_h *g,\n"
30296 " const char *device,\n"
30297 " const char *mountpoint);\n"
30302 #: ../src/guestfs-actions.pod:5493
30304 "This is the same as the C<guestfs_mount> command, but it mounts the "
30305 "filesystem with the read-only (I<-o ro>) flag."
30309 #: ../src/guestfs-actions.pod:5500
30310 msgid "guestfs_mount_vfs"
30314 #: ../src/guestfs-actions.pod:5502
30318 " guestfs_mount_vfs (guestfs_h *g,\n"
30319 " const char *options,\n"
30320 " const char *vfstype,\n"
30321 " const char *device,\n"
30322 " const char *mountpoint);\n"
30327 #: ../src/guestfs-actions.pod:5509
30329 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30330 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
30335 #: ../src/guestfs-actions.pod:5517
30336 msgid "guestfs_mountpoints"
30340 #: ../src/guestfs-actions.pod:5519
30344 " guestfs_mountpoints (guestfs_h *g);\n"
30349 #: ../src/guestfs-actions.pod:5522
30351 "This call is similar to C<guestfs_mounts>. That call returns a list of "
30352 "devices. This one returns a hash table (map) of device name to directory "
30353 "where the device is mounted."
30357 #: ../src/guestfs-actions.pod:5534
30358 msgid "guestfs_mounts"
30362 #: ../src/guestfs-actions.pod:5536
30366 " guestfs_mounts (guestfs_h *g);\n"
30371 #: ../src/guestfs-actions.pod:5544
30372 msgid "See also: C<guestfs_mountpoints>"
30376 #: ../src/guestfs-actions.pod:5552
30381 #: ../src/guestfs-actions.pod:5554
30385 " guestfs_mv (guestfs_h *g,\n"
30386 " const char *src,\n"
30387 " const char *dest);\n"
30392 #: ../src/guestfs-actions.pod:5566
30393 msgid "guestfs_ntfs_3g_probe"
30397 #: ../src/guestfs-actions.pod:5568
30401 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
30403 " const char *device);\n"
30408 #: ../src/guestfs-actions.pod:5587
30409 msgid "(Added in 1.0.43)"
30413 #: ../src/guestfs-actions.pod:5589
30414 msgid "guestfs_ntfsresize"
30418 #: ../src/guestfs-actions.pod:5591
30422 " guestfs_ntfsresize (guestfs_h *g,\n"
30423 " const char *device);\n"
30428 #: ../src/guestfs-actions.pod:5595 ../src/guestfs-actions.pod:5695
30430 "I<This function is deprecated.> In new code, use the "
30431 "L</guestfs_ntfsresize_opts> call instead."
30435 #: ../src/guestfs-actions.pod:5619
30436 msgid "guestfs_ntfsresize_opts"
30440 #: ../src/guestfs-actions.pod:5621
30444 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
30445 " const char *device,\n"
30451 #: ../src/guestfs-actions.pod:5631
30454 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
30455 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
30460 #: ../src/guestfs-actions.pod:5651
30462 "After the resize operation, the filesystem is always marked as requiring a "
30463 "consistency check (for safety). You have to boot into Windows to perform "
30464 "this check and clear this condition. If you I<don't> set the C<force> "
30465 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
30466 "times on a single filesystem without booting into Windows between each "
30471 #: ../src/guestfs-actions.pod:5666
30472 msgid "guestfs_ntfsresize_opts_va"
30476 #: ../src/guestfs-actions.pod:5668
30480 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
30481 " const char *device,\n"
30482 " va_list args);\n"
30487 #: ../src/guestfs-actions.pod:5673
30488 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
30492 #: ../src/guestfs-actions.pod:5677
30493 msgid "guestfs_ntfsresize_opts_argv"
30497 #: ../src/guestfs-actions.pod:5679
30501 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
30502 " const char *device,\n"
30503 " const struct guestfs_ntfsresize_opts_argv "
30509 #: ../src/guestfs-actions.pod:5684
30510 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
30514 #: ../src/guestfs-actions.pod:5688
30515 msgid "guestfs_ntfsresize_size"
30519 #: ../src/guestfs-actions.pod:5690
30523 " guestfs_ntfsresize_size (guestfs_h *g,\n"
30524 " const char *device,\n"
30525 " int64_t size);\n"
30530 #: ../src/guestfs-actions.pod:5702
30532 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
30533 "to specify the new size (in bytes) explicitly."
30537 #: ../src/guestfs-actions.pod:5707 ../src/guestfs-actions.pod:6166 ../src/guestfs-actions.pod:6239 ../src/guestfs-actions.pod:6507 ../src/guestfs-actions.pod:8134
30538 msgid "(Added in 1.3.14)"
30542 #: ../src/guestfs-actions.pod:5709
30543 msgid "guestfs_part_add"
30547 #: ../src/guestfs-actions.pod:5711
30551 " guestfs_part_add (guestfs_h *g,\n"
30552 " const char *device,\n"
30553 " const char *prlogex,\n"
30554 " int64_t startsect,\n"
30555 " int64_t endsect);\n"
30560 #: ../src/guestfs-actions.pod:5718
30562 "This command adds a partition to C<device>. If there is no partition table "
30563 "on the device, call C<guestfs_part_init> first."
30567 #: ../src/guestfs-actions.pod:5730
30569 "Creating a partition which covers the whole disk is not so easy. Use "
30570 "C<guestfs_part_disk> to do that."
30574 #: ../src/guestfs-actions.pod:5735 ../src/guestfs-actions.pod:5770 ../src/guestfs-actions.pod:5823 ../src/guestfs-actions.pod:5907 ../src/guestfs-actions.pod:5945 ../src/guestfs-actions.pod:5964 ../src/guestfs-actions.pod:6004
30575 msgid "(Added in 1.0.78)"
30579 #: ../src/guestfs-actions.pod:5737
30580 msgid "guestfs_part_del"
30584 #: ../src/guestfs-actions.pod:5739
30588 " guestfs_part_del (guestfs_h *g,\n"
30589 " const char *device,\n"
30595 #: ../src/guestfs-actions.pod:5754
30596 msgid "guestfs_part_disk"
30600 #: ../src/guestfs-actions.pod:5756
30604 " guestfs_part_disk (guestfs_h *g,\n"
30605 " const char *device,\n"
30606 " const char *parttype);\n"
30611 #: ../src/guestfs-actions.pod:5761
30613 "This command is simply a combination of C<guestfs_part_init> followed by "
30614 "C<guestfs_part_add> to create a single primary partition covering the whole "
30619 #: ../src/guestfs-actions.pod:5765
30621 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
30622 "possible values are described in C<guestfs_part_init>."
30626 #: ../src/guestfs-actions.pod:5772
30627 msgid "guestfs_part_get_bootable"
30631 #: ../src/guestfs-actions.pod:5774
30635 " guestfs_part_get_bootable (guestfs_h *g,\n"
30636 " const char *device,\n"
30642 #: ../src/guestfs-actions.pod:5782
30643 msgid "See also C<guestfs_part_set_bootable>."
30647 #: ../src/guestfs-actions.pod:5788
30648 msgid "guestfs_part_get_mbr_id"
30652 #: ../src/guestfs-actions.pod:5790
30656 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
30657 " const char *device,\n"
30663 #: ../src/guestfs-actions.pod:5798 ../src/guestfs-actions.pod:5980
30665 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
30666 "undefined results for other partition table types (see "
30667 "C<guestfs_part_get_parttype>)."
30671 #: ../src/guestfs-actions.pod:5806
30672 msgid "guestfs_part_get_parttype"
30676 #: ../src/guestfs-actions.pod:5808
30680 " guestfs_part_get_parttype (guestfs_h *g,\n"
30681 " const char *device);\n"
30686 #: ../src/guestfs-actions.pod:5815
30688 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
30689 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
30690 "possible, although unusual. See C<guestfs_part_init> for a full list."
30694 #: ../src/guestfs-actions.pod:5825
30695 msgid "guestfs_part_init"
30699 #: ../src/guestfs-actions.pod:5827
30703 " guestfs_part_init (guestfs_h *g,\n"
30704 " const char *device,\n"
30705 " const char *parttype);\n"
30710 #: ../src/guestfs-actions.pod:5836
30712 "Initially there are no partitions. Following this, you should call "
30713 "C<guestfs_part_add> for each partition required."
30717 #: ../src/guestfs-actions.pod:5909
30718 msgid "guestfs_part_list"
30722 #: ../src/guestfs-actions.pod:5911
30725 " struct guestfs_partition_list *\n"
30726 " guestfs_part_list (guestfs_h *g,\n"
30727 " const char *device);\n"
30732 #: ../src/guestfs-actions.pod:5928
30734 "Start of the partition I<in bytes>. To get sectors you have to divide by "
30735 "the device's sector size, see C<guestfs_blockdev_getss>."
30739 #: ../src/guestfs-actions.pod:5941
30741 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
30742 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
30747 #: ../src/guestfs-actions.pod:5947
30748 msgid "guestfs_part_set_bootable"
30752 #: ../src/guestfs-actions.pod:5949
30756 " guestfs_part_set_bootable (guestfs_h *g,\n"
30757 " const char *device,\n"
30759 " int bootable);\n"
30764 #: ../src/guestfs-actions.pod:5966
30765 msgid "guestfs_part_set_mbr_id"
30769 #: ../src/guestfs-actions.pod:5968
30773 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
30774 " const char *device,\n"
30781 #: ../src/guestfs-actions.pod:5988
30782 msgid "guestfs_part_set_name"
30786 #: ../src/guestfs-actions.pod:5990
30790 " guestfs_part_set_name (guestfs_h *g,\n"
30791 " const char *device,\n"
30793 " const char *name);\n"
30798 #: ../src/guestfs-actions.pod:6006
30799 msgid "guestfs_part_to_dev"
30803 #: ../src/guestfs-actions.pod:6008
30807 " guestfs_part_to_dev (guestfs_h *g,\n"
30808 " const char *partition);\n"
30813 #: ../src/guestfs-actions.pod:6016 ../src/guestfs-actions.pod:6035
30815 "The named partition must exist, for example as a string returned from "
30816 "C<guestfs_list_partitions>."
30820 #: ../src/guestfs-actions.pod:6019
30821 msgid "See also C<guestfs_part_to_partnum>."
30825 #: ../src/guestfs-actions.pod:6026
30826 msgid "guestfs_part_to_partnum"
30830 #: ../src/guestfs-actions.pod:6028
30834 " guestfs_part_to_partnum (guestfs_h *g,\n"
30835 " const char *partition);\n"
30840 #: ../src/guestfs-actions.pod:6038
30841 msgid "See also C<guestfs_part_to_dev>."
30845 #: ../src/guestfs-actions.pod:6044
30846 msgid "guestfs_ping_daemon"
30850 #: ../src/guestfs-actions.pod:6046
30854 " guestfs_ping_daemon (guestfs_h *g);\n"
30859 #: ../src/guestfs-actions.pod:6058
30860 msgid "guestfs_pread"
30864 #: ../src/guestfs-actions.pod:6060
30868 " guestfs_pread (guestfs_h *g,\n"
30869 " const char *path,\n"
30871 " int64_t offset,\n"
30872 " size_t *size_r);\n"
30877 #: ../src/guestfs-actions.pod:6073
30878 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
30882 #: ../src/guestfs-actions.pod:6084
30883 msgid "guestfs_pread_device"
30887 #: ../src/guestfs-actions.pod:6086
30891 " guestfs_pread_device (guestfs_h *g,\n"
30892 " const char *device,\n"
30894 " int64_t offset,\n"
30895 " size_t *size_r);\n"
30900 #: ../src/guestfs-actions.pod:6099
30901 msgid "See also C<guestfs_pread>."
30905 #: ../src/guestfs-actions.pod:6108
30906 msgid "(Added in 1.5.21)"
30910 #: ../src/guestfs-actions.pod:6110
30911 msgid "guestfs_pvcreate"
30915 #: ../src/guestfs-actions.pod:6112
30919 " guestfs_pvcreate (guestfs_h *g,\n"
30920 " const char *device);\n"
30925 #: ../src/guestfs-actions.pod:6124
30926 msgid "guestfs_pvremove"
30930 #: ../src/guestfs-actions.pod:6126
30934 " guestfs_pvremove (guestfs_h *g,\n"
30935 " const char *device);\n"
30940 #: ../src/guestfs-actions.pod:6141
30941 msgid "guestfs_pvresize"
30945 #: ../src/guestfs-actions.pod:6143
30949 " guestfs_pvresize (guestfs_h *g,\n"
30950 " const char *device);\n"
30955 #: ../src/guestfs-actions.pod:6154
30956 msgid "guestfs_pvresize_size"
30960 #: ../src/guestfs-actions.pod:6156
30964 " guestfs_pvresize_size (guestfs_h *g,\n"
30965 " const char *device,\n"
30966 " int64_t size);\n"
30971 #: ../src/guestfs-actions.pod:6161
30973 "This command is the same as C<guestfs_pvresize> except that it allows you to "
30974 "specify the new size (in bytes) explicitly."
30978 #: ../src/guestfs-actions.pod:6168
30979 msgid "guestfs_pvs"
30983 #: ../src/guestfs-actions.pod:6170
30987 " guestfs_pvs (guestfs_h *g);\n"
30992 #: ../src/guestfs-actions.pod:6179
30993 msgid "See also C<guestfs_pvs_full>."
30997 #: ../src/guestfs-actions.pod:6187
30998 msgid "guestfs_pvs_full"
31002 #: ../src/guestfs-actions.pod:6189
31005 " struct guestfs_lvm_pv_list *\n"
31006 " guestfs_pvs_full (guestfs_h *g);\n"
31011 #: ../src/guestfs-actions.pod:6195
31013 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
31014 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after "
31019 #: ../src/guestfs-actions.pod:6201
31020 msgid "guestfs_pvuuid"
31024 #: ../src/guestfs-actions.pod:6203
31028 " guestfs_pvuuid (guestfs_h *g,\n"
31029 " const char *device);\n"
31034 #: ../src/guestfs-actions.pod:6214
31035 msgid "guestfs_pwrite"
31039 #: ../src/guestfs-actions.pod:6216
31043 " guestfs_pwrite (guestfs_h *g,\n"
31044 " const char *path,\n"
31045 " const char *content,\n"
31046 " size_t content_size,\n"
31047 " int64_t offset);\n"
31052 #: ../src/guestfs-actions.pod:6232
31053 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
31057 #: ../src/guestfs-actions.pod:6241
31058 msgid "guestfs_pwrite_device"
31062 #: ../src/guestfs-actions.pod:6243
31066 " guestfs_pwrite_device (guestfs_h *g,\n"
31067 " const char *device,\n"
31068 " const char *content,\n"
31069 " size_t content_size,\n"
31070 " int64_t offset);\n"
31075 #: ../src/guestfs-actions.pod:6258
31076 msgid "See also C<guestfs_pwrite>."
31080 #: ../src/guestfs-actions.pod:6265
31081 msgid "(Added in 1.5.20)"
31085 #: ../src/guestfs-actions.pod:6267
31086 msgid "guestfs_read_file"
31090 #: ../src/guestfs-actions.pod:6269
31094 " guestfs_read_file (guestfs_h *g,\n"
31095 " const char *path,\n"
31096 " size_t *size_r);\n"
31101 #: ../src/guestfs-actions.pod:6277
31103 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
31104 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
31105 "function is limited in the total size of file that can be handled."
31109 #: ../src/guestfs-actions.pod:6289
31110 msgid "(Added in 1.0.63)"
31114 #: ../src/guestfs-actions.pod:6291
31115 msgid "guestfs_read_lines"
31119 #: ../src/guestfs-actions.pod:6293
31123 " guestfs_read_lines (guestfs_h *g,\n"
31124 " const char *path);\n"
31129 #: ../src/guestfs-actions.pod:6302
31131 "Note that this function cannot correctly handle binary files (specifically, "
31132 "files containing C<\\0> character which is treated as end of line). For "
31133 "those you need to use the C<guestfs_read_file> function which has a more "
31134 "complex interface."
31138 #: ../src/guestfs-actions.pod:6313
31139 msgid "guestfs_readdir"
31143 #: ../src/guestfs-actions.pod:6315
31146 " struct guestfs_dirent_list *\n"
31147 " guestfs_readdir (guestfs_h *g,\n"
31148 " const char *dir);\n"
31153 #: ../src/guestfs-actions.pod:6369
31155 "This function is primarily intended for use by programs. To get a simple "
31156 "list of names, use C<guestfs_ls>. To get a printable directory for human "
31157 "consumption, use C<guestfs_ll>."
31161 #: ../src/guestfs-actions.pod:6373
31163 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
31164 "was an error. I<The caller must call C<guestfs_free_dirent_list> after "
31169 #: ../src/guestfs-actions.pod:6379
31170 msgid "guestfs_readlink"
31174 #: ../src/guestfs-actions.pod:6381
31178 " guestfs_readlink (guestfs_h *g,\n"
31179 " const char *path);\n"
31184 #: ../src/guestfs-actions.pod:6392
31185 msgid "guestfs_readlinklist"
31189 #: ../src/guestfs-actions.pod:6394
31193 " guestfs_readlinklist (guestfs_h *g,\n"
31194 " const char *path,\n"
31195 " char *const *names);\n"
31200 #: ../src/guestfs-actions.pod:6427
31201 msgid "guestfs_realpath"
31205 #: ../src/guestfs-actions.pod:6429
31209 " guestfs_realpath (guestfs_h *g,\n"
31210 " const char *path);\n"
31215 #: ../src/guestfs-actions.pod:6441
31216 msgid "guestfs_removexattr"
31220 #: ../src/guestfs-actions.pod:6443
31224 " guestfs_removexattr (guestfs_h *g,\n"
31225 " const char *xattr,\n"
31226 " const char *path);\n"
31231 #: ../src/guestfs-actions.pod:6451
31232 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
31236 #: ../src/guestfs-actions.pod:6457
31237 msgid "guestfs_resize2fs"
31241 #: ../src/guestfs-actions.pod:6459
31245 " guestfs_resize2fs (guestfs_h *g,\n"
31246 " const char *device);\n"
31251 #: ../src/guestfs-actions.pod:6466
31253 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
31254 "C<device> before calling this command. For unknown reasons C<resize2fs> "
31255 "sometimes gives an error about this and sometimes not. In any case, it is "
31256 "always safe to call C<guestfs_e2fsck_f> before calling this function."
31260 #: ../src/guestfs-actions.pod:6476
31261 msgid "guestfs_resize2fs_M"
31265 #: ../src/guestfs-actions.pod:6478
31269 " guestfs_resize2fs_M (guestfs_h *g,\n"
31270 " const char *device);\n"
31275 #: ../src/guestfs-actions.pod:6482
31277 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
31278 "resized to its minimum size. This works like the I<-M> option to the "
31279 "C<resize2fs> command."
31283 #: ../src/guestfs-actions.pod:6486
31285 "To get the resulting size of the filesystem you should call "
31286 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
31287 "These two numbers, multiplied together, give the resulting size of the "
31288 "minimal filesystem in bytes."
31292 #: ../src/guestfs-actions.pod:6495
31293 msgid "guestfs_resize2fs_size"
31297 #: ../src/guestfs-actions.pod:6497
31301 " guestfs_resize2fs_size (guestfs_h *g,\n"
31302 " const char *device,\n"
31303 " int64_t size);\n"
31308 #: ../src/guestfs-actions.pod:6502
31310 "This command is the same as C<guestfs_resize2fs> except that it allows you "
31311 "to specify the new size (in bytes) explicitly."
31315 #: ../src/guestfs-actions.pod:6509
31320 #: ../src/guestfs-actions.pod:6511
31324 " guestfs_rm (guestfs_h *g,\n"
31325 " const char *path);\n"
31330 #: ../src/guestfs-actions.pod:6521
31331 msgid "guestfs_rm_rf"
31335 #: ../src/guestfs-actions.pod:6523
31339 " guestfs_rm_rf (guestfs_h *g,\n"
31340 " const char *path);\n"
31345 #: ../src/guestfs-actions.pod:6535
31346 msgid "guestfs_rmdir"
31350 #: ../src/guestfs-actions.pod:6537
31354 " guestfs_rmdir (guestfs_h *g,\n"
31355 " const char *path);\n"
31360 #: ../src/guestfs-actions.pod:6547
31361 msgid "guestfs_rmmountpoint"
31365 #: ../src/guestfs-actions.pod:6549
31369 " guestfs_rmmountpoint (guestfs_h *g,\n"
31370 " const char *exemptpath);\n"
31375 #: ../src/guestfs-actions.pod:6553
31377 "This calls removes a mountpoint that was previously created with "
31378 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
31382 #: ../src/guestfs-actions.pod:6561
31383 msgid "guestfs_scrub_device"
31387 #: ../src/guestfs-actions.pod:6563
31391 " guestfs_scrub_device (guestfs_h *g,\n"
31392 " const char *device);\n"
31397 #: ../src/guestfs-actions.pod:6575 ../src/guestfs-actions.pod:6593 ../src/guestfs-actions.pod:6612
31398 msgid "(Added in 1.0.52)"
31402 #: ../src/guestfs-actions.pod:6577
31403 msgid "guestfs_scrub_file"
31407 #: ../src/guestfs-actions.pod:6579
31411 " guestfs_scrub_file (guestfs_h *g,\n"
31412 " const char *file);\n"
31417 #: ../src/guestfs-actions.pod:6595
31418 msgid "guestfs_scrub_freespace"
31422 #: ../src/guestfs-actions.pod:6597
31426 " guestfs_scrub_freespace (guestfs_h *g,\n"
31427 " const char *dir);\n"
31432 #: ../src/guestfs-actions.pod:6601
31434 "This command creates the directory C<dir> and then fills it with files until "
31435 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
31436 "and deletes them. The intention is to scrub any free space on the partition "
31437 "containing C<dir>."
31441 #: ../src/guestfs-actions.pod:6614
31442 msgid "guestfs_set_append"
31446 #: ../src/guestfs-actions.pod:6616
31450 " guestfs_set_append (guestfs_h *g,\n"
31451 " const char *append);\n"
31456 #: ../src/guestfs-actions.pod:6633
31457 msgid "guestfs_set_attach_method"
31461 #: ../src/guestfs-actions.pod:6635
31465 " guestfs_set_attach_method (guestfs_h *g,\n"
31466 " const char *attachmethod);\n"
31471 #: ../src/guestfs-actions.pod:6663
31472 msgid "guestfs_set_autosync"
31476 #: ../src/guestfs-actions.pod:6665
31480 " guestfs_set_autosync (guestfs_h *g,\n"
31481 " int autosync);\n"
31486 #: ../src/guestfs-actions.pod:6681
31487 msgid "guestfs_set_direct"
31491 #: ../src/guestfs-actions.pod:6683
31495 " guestfs_set_direct (guestfs_h *g,\n"
31501 #: ../src/guestfs-actions.pod:6691
31503 "One consequence of this is that log messages aren't caught by the library "
31504 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
31509 #: ../src/guestfs-actions.pod:6704
31510 msgid "guestfs_set_e2label"
31514 #: ../src/guestfs-actions.pod:6706
31518 " guestfs_set_e2label (guestfs_h *g,\n"
31519 " const char *device,\n"
31520 " const char *label);\n"
31525 #: ../src/guestfs-actions.pod:6715
31527 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
31528 "the existing label on a filesystem."
31532 #: ../src/guestfs-actions.pod:6722
31533 msgid "guestfs_set_e2uuid"
31537 #: ../src/guestfs-actions.pod:6724
31541 " guestfs_set_e2uuid (guestfs_h *g,\n"
31542 " const char *device,\n"
31543 " const char *uuid);\n"
31548 #: ../src/guestfs-actions.pod:6734
31550 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
31551 "the existing UUID of a filesystem."
31555 #: ../src/guestfs-actions.pod:6741
31556 msgid "guestfs_set_memsize"
31560 #: ../src/guestfs-actions.pod:6743
31564 " guestfs_set_memsize (guestfs_h *g,\n"
31570 #: ../src/guestfs-actions.pod:6747
31572 "This sets the memory size in megabytes allocated to the qemu subprocess. "
31573 "This only has any effect if called before C<guestfs_launch>."
31577 #: ../src/guestfs-actions.pod:6762
31578 msgid "guestfs_set_network"
31582 #: ../src/guestfs-actions.pod:6764
31586 " guestfs_set_network (guestfs_h *g,\n"
31592 #: ../src/guestfs-actions.pod:6774
31594 "You must call this before calling C<guestfs_launch>, otherwise it has no "
31599 #: ../src/guestfs-actions.pod:6781
31600 msgid "guestfs_set_path"
31604 #: ../src/guestfs-actions.pod:6783
31608 " guestfs_set_path (guestfs_h *g,\n"
31609 " const char *searchpath);\n"
31614 #: ../src/guestfs-actions.pod:6798
31615 msgid "guestfs_set_pgroup"
31619 #: ../src/guestfs-actions.pod:6800
31623 " guestfs_set_pgroup (guestfs_h *g,\n"
31629 #: ../src/guestfs-actions.pod:6817
31630 msgid "guestfs_set_qemu"
31634 #: ../src/guestfs-actions.pod:6819
31638 " guestfs_set_qemu (guestfs_h *g,\n"
31639 " const char *qemu);\n"
31644 #: ../src/guestfs-actions.pod:6845
31645 msgid "guestfs_set_recovery_proc"
31649 #: ../src/guestfs-actions.pod:6847
31653 " guestfs_set_recovery_proc (guestfs_h *g,\n"
31654 " int recoveryproc);\n"
31659 #: ../src/guestfs-actions.pod:6851
31661 "If this is called with the parameter C<false> then C<guestfs_launch> does "
31662 "not create a recovery process. The purpose of the recovery process is to "
31663 "stop runaway qemu processes in the case where the main program aborts "
31668 #: ../src/guestfs-actions.pod:6856
31670 "This only has any effect if called before C<guestfs_launch>, and the default "
31675 #: ../src/guestfs-actions.pod:6869
31676 msgid "guestfs_set_selinux"
31680 #: ../src/guestfs-actions.pod:6871
31684 " guestfs_set_selinux (guestfs_h *g,\n"
31690 #: ../src/guestfs-actions.pod:6888
31691 msgid "guestfs_set_smp"
31695 #: ../src/guestfs-actions.pod:6890
31699 " guestfs_set_smp (guestfs_h *g,\n"
31705 #: ../src/guestfs-actions.pod:6898
31706 msgid "This function must be called before C<guestfs_launch>."
31710 #: ../src/guestfs-actions.pod:6904
31711 msgid "guestfs_set_trace"
31715 #: ../src/guestfs-actions.pod:6906
31719 " guestfs_set_trace (guestfs_h *g,\n"
31725 #: ../src/guestfs-actions.pod:6920
31727 "Trace messages are normally sent to C<stderr>, unless you register a "
31728 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
31732 #: ../src/guestfs-actions.pod:6928
31733 msgid "guestfs_set_verbose"
31737 #: ../src/guestfs-actions.pod:6930
31741 " guestfs_set_verbose (guestfs_h *g,\n"
31747 #: ../src/guestfs-actions.pod:6939
31749 "Verbose messages are normally sent to C<stderr>, unless you register a "
31750 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
31754 #: ../src/guestfs-actions.pod:6947
31755 msgid "guestfs_setcon"
31759 #: ../src/guestfs-actions.pod:6949
31763 " guestfs_setcon (guestfs_h *g,\n"
31764 " const char *context);\n"
31769 #: ../src/guestfs-actions.pod:6962
31770 msgid "guestfs_setxattr"
31774 #: ../src/guestfs-actions.pod:6964
31778 " guestfs_setxattr (guestfs_h *g,\n"
31779 " const char *xattr,\n"
31780 " const char *val,\n"
31782 " const char *path);\n"
31787 #: ../src/guestfs-actions.pod:6975
31788 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
31792 #: ../src/guestfs-actions.pod:6981
31793 msgid "guestfs_sfdisk"
31797 #: ../src/guestfs-actions.pod:6983
31801 " guestfs_sfdisk (guestfs_h *g,\n"
31802 " const char *device,\n"
31806 " char *const *lines);\n"
31811 #: ../src/guestfs-actions.pod:6991 ../src/guestfs-actions.pod:7032 ../src/guestfs-actions.pod:7063
31813 "I<This function is deprecated.> In new code, use the L</guestfs_part_add> "
31818 #: ../src/guestfs-actions.pod:7018
31819 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
31823 #: ../src/guestfs-actions.pod:7025
31824 msgid "guestfs_sfdiskM"
31828 #: ../src/guestfs-actions.pod:7027
31832 " guestfs_sfdiskM (guestfs_h *g,\n"
31833 " const char *device,\n"
31834 " char *const *lines);\n"
31839 #: ../src/guestfs-actions.pod:7039
31841 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
31842 "partition sizes are specified in megabytes only (rounded to the nearest "
31843 "cylinder) and you don't need to specify the cyls, heads and sectors "
31844 "parameters which were rarely if ever used anyway."
31848 #: ../src/guestfs-actions.pod:7045
31850 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
31851 "C<guestfs_part_disk>"
31855 #: ../src/guestfs-actions.pod:7052
31856 msgid "guestfs_sfdisk_N"
31860 #: ../src/guestfs-actions.pod:7054
31864 " guestfs_sfdisk_N (guestfs_h *g,\n"
31865 " const char *device,\n"
31870 " const char *line);\n"
31875 #: ../src/guestfs-actions.pod:7073
31877 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
31878 "for the cyls/heads/sectors parameters."
31882 #: ../src/guestfs-actions.pod:7076
31883 msgid "See also: C<guestfs_part_add>"
31887 #: ../src/guestfs-actions.pod:7082
31888 msgid "guestfs_sfdisk_disk_geometry"
31892 #: ../src/guestfs-actions.pod:7084
31896 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
31897 " const char *device);\n"
31902 #: ../src/guestfs-actions.pod:7088
31904 "This displays the disk geometry of C<device> read from the partition table. "
31905 "Especially in the case where the underlying block device has been resized, "
31906 "this can be different from the kernel's idea of the geometry (see "
31907 "C<guestfs_sfdisk_kernel_geometry>)."
31911 #: ../src/guestfs-actions.pod:7101
31912 msgid "guestfs_sfdisk_kernel_geometry"
31916 #: ../src/guestfs-actions.pod:7103
31920 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
31921 " const char *device);\n"
31926 #: ../src/guestfs-actions.pod:7117
31927 msgid "guestfs_sfdisk_l"
31931 #: ../src/guestfs-actions.pod:7119
31935 " guestfs_sfdisk_l (guestfs_h *g,\n"
31936 " const char *device);\n"
31941 #: ../src/guestfs-actions.pod:7123
31943 "I<This function is deprecated.> In new code, use the L</guestfs_part_list> "
31948 #: ../src/guestfs-actions.pod:7134
31949 msgid "See also: C<guestfs_part_list>"
31953 #: ../src/guestfs-actions.pod:7141
31958 #: ../src/guestfs-actions.pod:7143
31962 " guestfs_sh (guestfs_h *g,\n"
31963 " const char *command);\n"
31968 #: ../src/guestfs-actions.pod:7150
31969 msgid "This is like C<guestfs_command>, but passes the command to:"
31973 #: ../src/guestfs-actions.pod:7158
31974 msgid "All the provisos about C<guestfs_command> apply to this call."
31978 #: ../src/guestfs-actions.pod:7165
31979 msgid "guestfs_sh_lines"
31983 #: ../src/guestfs-actions.pod:7167
31987 " guestfs_sh_lines (guestfs_h *g,\n"
31988 " const char *command);\n"
31993 #: ../src/guestfs-actions.pod:7171
31995 "This is the same as C<guestfs_sh>, but splits the result into a list of "
32000 #: ../src/guestfs-actions.pod:7174
32001 msgid "See also: C<guestfs_command_lines>"
32005 #: ../src/guestfs-actions.pod:7182
32006 msgid "guestfs_sleep"
32010 #: ../src/guestfs-actions.pod:7184
32014 " guestfs_sleep (guestfs_h *g,\n"
32020 #: ../src/guestfs-actions.pod:7192
32021 msgid "(Added in 1.0.41)"
32025 #: ../src/guestfs-actions.pod:7194 ../src/guestfs-structs.pod:109
32026 msgid "guestfs_stat"
32030 #: ../src/guestfs-actions.pod:7196
32033 " struct guestfs_stat *\n"
32034 " guestfs_stat (guestfs_h *g,\n"
32035 " const char *path);\n"
32040 #: ../src/guestfs-actions.pod:7210 ../src/guestfs-structs.pod:135
32041 msgid "guestfs_statvfs"
32045 #: ../src/guestfs-actions.pod:7212
32048 " struct guestfs_statvfs *\n"
32049 " guestfs_statvfs (guestfs_h *g,\n"
32050 " const char *path);\n"
32055 #: ../src/guestfs-actions.pod:7222
32057 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
32058 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
32062 #: ../src/guestfs-actions.pod:7228
32063 msgid "guestfs_strings"
32067 #: ../src/guestfs-actions.pod:7230
32071 " guestfs_strings (guestfs_h *g,\n"
32072 " const char *path);\n"
32077 #: ../src/guestfs-actions.pod:7246
32078 msgid "guestfs_strings_e"
32082 #: ../src/guestfs-actions.pod:7248
32086 " guestfs_strings_e (guestfs_h *g,\n"
32087 " const char *encoding,\n"
32088 " const char *path);\n"
32093 #: ../src/guestfs-actions.pod:7253
32095 "This is like the C<guestfs_strings> command, but allows you to specify the "
32096 "encoding of strings that are looked for in the source file C<path>."
32100 #: ../src/guestfs-actions.pod:7263
32102 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
32103 "ISO-8859-X (this is what C<guestfs_strings> uses)."
32107 #: ../src/guestfs-actions.pod:7301
32108 msgid "guestfs_swapoff_device"
32112 #: ../src/guestfs-actions.pod:7303
32116 " guestfs_swapoff_device (guestfs_h *g,\n"
32117 " const char *device);\n"
32122 #: ../src/guestfs-actions.pod:7307
32124 "This command disables the libguestfs appliance swap device or partition "
32125 "named C<device>. See C<guestfs_swapon_device>."
32129 #: ../src/guestfs-actions.pod:7315
32130 msgid "guestfs_swapoff_file"
32134 #: ../src/guestfs-actions.pod:7317
32138 " guestfs_swapoff_file (guestfs_h *g,\n"
32139 " const char *file);\n"
32144 #: ../src/guestfs-actions.pod:7327
32145 msgid "guestfs_swapoff_label"
32149 #: ../src/guestfs-actions.pod:7329
32153 " guestfs_swapoff_label (guestfs_h *g,\n"
32154 " const char *label);\n"
32159 #: ../src/guestfs-actions.pod:7340
32160 msgid "guestfs_swapoff_uuid"
32164 #: ../src/guestfs-actions.pod:7342
32168 " guestfs_swapoff_uuid (guestfs_h *g,\n"
32169 " const char *uuid);\n"
32174 #: ../src/guestfs-actions.pod:7353
32175 msgid "guestfs_swapon_device"
32179 #: ../src/guestfs-actions.pod:7355
32183 " guestfs_swapon_device (guestfs_h *g,\n"
32184 " const char *device);\n"
32189 #: ../src/guestfs-actions.pod:7359
32191 "This command enables the libguestfs appliance to use the swap device or "
32192 "partition named C<device>. The increased memory is made available for all "
32193 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
32197 #: ../src/guestfs-actions.pod:7375
32198 msgid "guestfs_swapon_file"
32202 #: ../src/guestfs-actions.pod:7377
32206 " guestfs_swapon_file (guestfs_h *g,\n"
32207 " const char *file);\n"
32212 #: ../src/guestfs-actions.pod:7381
32214 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
32219 #: ../src/guestfs-actions.pod:7388
32220 msgid "guestfs_swapon_label"
32224 #: ../src/guestfs-actions.pod:7390
32228 " guestfs_swapon_label (guestfs_h *g,\n"
32229 " const char *label);\n"
32234 #: ../src/guestfs-actions.pod:7394
32236 "This command enables swap to a labeled swap partition. See "
32237 "C<guestfs_swapon_device> for other notes."
32241 #: ../src/guestfs-actions.pod:7401
32242 msgid "guestfs_swapon_uuid"
32246 #: ../src/guestfs-actions.pod:7403
32250 " guestfs_swapon_uuid (guestfs_h *g,\n"
32251 " const char *uuid);\n"
32256 #: ../src/guestfs-actions.pod:7407
32258 "This command enables swap to a swap partition with the given UUID. See "
32259 "C<guestfs_swapon_device> for other notes."
32263 #: ../src/guestfs-actions.pod:7414
32264 msgid "guestfs_sync"
32268 #: ../src/guestfs-actions.pod:7416
32272 " guestfs_sync (guestfs_h *g);\n"
32277 #: ../src/guestfs-actions.pod:7429
32278 msgid "guestfs_tail"
32282 #: ../src/guestfs-actions.pod:7431
32286 " guestfs_tail (guestfs_h *g,\n"
32287 " const char *path);\n"
32292 #: ../src/guestfs-actions.pod:7447
32293 msgid "guestfs_tail_n"
32297 #: ../src/guestfs-actions.pod:7449
32301 " guestfs_tail_n (guestfs_h *g,\n"
32303 " const char *path);\n"
32308 #: ../src/guestfs-actions.pod:7471
32309 msgid "guestfs_tar_in"
32313 #: ../src/guestfs-actions.pod:7473
32317 " guestfs_tar_in (guestfs_h *g,\n"
32318 " const char *tarfile,\n"
32319 " const char *directory);\n"
32324 #: ../src/guestfs-actions.pod:7481
32325 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
32329 #: ../src/guestfs-actions.pod:7486 ../src/guestfs-actions.pod:7503 ../src/guestfs-actions.pod:7519 ../src/guestfs-actions.pod:7535
32330 msgid "(Added in 1.0.3)"
32334 #: ../src/guestfs-actions.pod:7488
32335 msgid "guestfs_tar_out"
32339 #: ../src/guestfs-actions.pod:7490
32343 " guestfs_tar_out (guestfs_h *g,\n"
32344 " const char *directory,\n"
32345 " const char *tarfile);\n"
32350 #: ../src/guestfs-actions.pod:7498
32352 "To download a compressed tarball, use C<guestfs_tgz_out> or "
32353 "C<guestfs_txz_out>."
32357 #: ../src/guestfs-actions.pod:7505
32358 msgid "guestfs_tgz_in"
32362 #: ../src/guestfs-actions.pod:7507
32366 " guestfs_tgz_in (guestfs_h *g,\n"
32367 " const char *tarball,\n"
32368 " const char *directory);\n"
32373 #: ../src/guestfs-actions.pod:7515
32374 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
32378 #: ../src/guestfs-actions.pod:7521
32379 msgid "guestfs_tgz_out"
32383 #: ../src/guestfs-actions.pod:7523
32387 " guestfs_tgz_out (guestfs_h *g,\n"
32388 " const char *directory,\n"
32389 " const char *tarball);\n"
32394 #: ../src/guestfs-actions.pod:7531
32395 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
32399 #: ../src/guestfs-actions.pod:7537
32400 msgid "guestfs_touch"
32404 #: ../src/guestfs-actions.pod:7539
32408 " guestfs_touch (guestfs_h *g,\n"
32409 " const char *path);\n"
32414 #: ../src/guestfs-actions.pod:7554
32415 msgid "guestfs_truncate"
32419 #: ../src/guestfs-actions.pod:7556
32423 " guestfs_truncate (guestfs_h *g,\n"
32424 " const char *path);\n"
32429 #: ../src/guestfs-actions.pod:7567
32430 msgid "guestfs_truncate_size"
32434 #: ../src/guestfs-actions.pod:7569
32438 " guestfs_truncate_size (guestfs_h *g,\n"
32439 " const char *path,\n"
32440 " int64_t size);\n"
32445 #: ../src/guestfs-actions.pod:7577
32447 "If the current file size is less than C<size> then the file is extended to "
32448 "the required size with zero bytes. This creates a sparse file (ie. disk "
32449 "blocks are not allocated for the file until you write to it). To create a "
32450 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
32454 #: ../src/guestfs-actions.pod:7587
32455 msgid "guestfs_tune2fs_l"
32459 #: ../src/guestfs-actions.pod:7589
32463 " guestfs_tune2fs_l (guestfs_h *g,\n"
32464 " const char *device);\n"
32469 #: ../src/guestfs-actions.pod:7609
32470 msgid "guestfs_txz_in"
32474 #: ../src/guestfs-actions.pod:7611
32478 " guestfs_txz_in (guestfs_h *g,\n"
32479 " const char *tarball,\n"
32480 " const char *directory);\n"
32485 #: ../src/guestfs-actions.pod:7623
32486 msgid "guestfs_txz_out"
32490 #: ../src/guestfs-actions.pod:7625
32494 " guestfs_txz_out (guestfs_h *g,\n"
32495 " const char *directory,\n"
32496 " const char *tarball);\n"
32501 #: ../src/guestfs-actions.pod:7637
32502 msgid "guestfs_umask"
32506 #: ../src/guestfs-actions.pod:7639
32510 " guestfs_umask (guestfs_h *g,\n"
32516 #: ../src/guestfs-actions.pod:7655
32518 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
32519 "C<guestfs_mkdir>."
32523 #: ../src/guestfs-actions.pod:7664
32524 msgid "guestfs_umount"
32528 #: ../src/guestfs-actions.pod:7666
32532 " guestfs_umount (guestfs_h *g,\n"
32533 " const char *pathordevice);\n"
32538 #: ../src/guestfs-actions.pod:7678
32539 msgid "guestfs_umount_all"
32543 #: ../src/guestfs-actions.pod:7680
32547 " guestfs_umount_all (guestfs_h *g);\n"
32552 #: ../src/guestfs-actions.pod:7691
32553 msgid "guestfs_upload"
32557 #: ../src/guestfs-actions.pod:7693
32561 " guestfs_upload (guestfs_h *g,\n"
32562 " const char *filename,\n"
32563 " const char *remotefilename);\n"
32568 #: ../src/guestfs-actions.pod:7703
32569 msgid "See also C<guestfs_download>."
32573 #: ../src/guestfs-actions.pod:7714
32574 msgid "guestfs_upload_offset"
32578 #: ../src/guestfs-actions.pod:7716
32582 " guestfs_upload_offset (guestfs_h *g,\n"
32583 " const char *filename,\n"
32584 " const char *remotefilename,\n"
32585 " int64_t offset);\n"
32590 #: ../src/guestfs-actions.pod:7732
32592 "Note that there is no limit on the amount of data that can be uploaded with "
32593 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
32594 "full amount unless an error occurs."
32598 #: ../src/guestfs-actions.pod:7737
32599 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
32603 #: ../src/guestfs-actions.pod:7748
32604 msgid "guestfs_utimens"
32608 #: ../src/guestfs-actions.pod:7750
32612 " guestfs_utimens (guestfs_h *g,\n"
32613 " const char *path,\n"
32614 " int64_t atsecs,\n"
32615 " int64_t atnsecs,\n"
32616 " int64_t mtsecs,\n"
32617 " int64_t mtnsecs);\n"
32622 #: ../src/guestfs-actions.pod:7779 ../src/guestfs-structs.pod:175
32623 msgid "guestfs_version"
32627 #: ../src/guestfs-actions.pod:7781
32630 " struct guestfs_version *\n"
32631 " guestfs_version (guestfs_h *g);\n"
32636 #: ../src/guestfs-actions.pod:7809
32638 "I<Note:> Don't use this call to test for availability of features. In "
32639 "enterprise distributions we backport features from later versions into "
32640 "earlier versions, making this an unreliable way to test for features. Use "
32641 "C<guestfs_available> instead."
32645 #: ../src/guestfs-actions.pod:7815
32647 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
32648 "error. I<The caller must call C<guestfs_free_version> after use>."
32652 #: ../src/guestfs-actions.pod:7819
32653 msgid "(Added in 1.0.58)"
32657 #: ../src/guestfs-actions.pod:7821
32658 msgid "guestfs_vfs_label"
32662 #: ../src/guestfs-actions.pod:7823
32666 " guestfs_vfs_label (guestfs_h *g,\n"
32667 " const char *device);\n"
32672 #: ../src/guestfs-actions.pod:7832
32673 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
32677 #: ../src/guestfs-actions.pod:7837 ../src/guestfs-actions.pod:7874
32678 msgid "(Added in 1.3.18)"
32682 #: ../src/guestfs-actions.pod:7839
32683 msgid "guestfs_vfs_type"
32687 #: ../src/guestfs-actions.pod:7841
32691 " guestfs_vfs_type (guestfs_h *g,\n"
32692 " const char *device);\n"
32697 #: ../src/guestfs-actions.pod:7858
32698 msgid "guestfs_vfs_uuid"
32702 #: ../src/guestfs-actions.pod:7860
32706 " guestfs_vfs_uuid (guestfs_h *g,\n"
32707 " const char *device);\n"
32712 #: ../src/guestfs-actions.pod:7869
32713 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
32717 #: ../src/guestfs-actions.pod:7876
32718 msgid "guestfs_vg_activate"
32722 #: ../src/guestfs-actions.pod:7878
32726 " guestfs_vg_activate (guestfs_h *g,\n"
32728 " char *const *volgroups);\n"
32733 #: ../src/guestfs-actions.pod:7895
32734 msgid "guestfs_vg_activate_all"
32738 #: ../src/guestfs-actions.pod:7897
32742 " guestfs_vg_activate_all (guestfs_h *g,\n"
32743 " int activate);\n"
32748 #: ../src/guestfs-actions.pod:7910
32749 msgid "guestfs_vgcreate"
32753 #: ../src/guestfs-actions.pod:7912
32757 " guestfs_vgcreate (guestfs_h *g,\n"
32758 " const char *volgroup,\n"
32759 " char *const *physvols);\n"
32764 #: ../src/guestfs-actions.pod:7924
32765 msgid "guestfs_vglvuuids"
32769 #: ../src/guestfs-actions.pod:7926
32773 " guestfs_vglvuuids (guestfs_h *g,\n"
32774 " const char *vgname);\n"
32779 #: ../src/guestfs-actions.pod:7933
32781 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
32782 "associate logical volumes and volume groups."
32786 #: ../src/guestfs-actions.pod:7936
32787 msgid "See also C<guestfs_vgpvuuids>."
32791 #: ../src/guestfs-actions.pod:7944
32792 msgid "guestfs_vgpvuuids"
32796 #: ../src/guestfs-actions.pod:7946
32800 " guestfs_vgpvuuids (guestfs_h *g,\n"
32801 " const char *vgname);\n"
32806 #: ../src/guestfs-actions.pod:7953
32808 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
32809 "associate physical volumes and volume groups."
32813 #: ../src/guestfs-actions.pod:7956
32814 msgid "See also C<guestfs_vglvuuids>."
32818 #: ../src/guestfs-actions.pod:7964
32819 msgid "guestfs_vgremove"
32823 #: ../src/guestfs-actions.pod:7966
32827 " guestfs_vgremove (guestfs_h *g,\n"
32828 " const char *vgname);\n"
32833 #: ../src/guestfs-actions.pod:7979
32834 msgid "guestfs_vgrename"
32838 #: ../src/guestfs-actions.pod:7981
32842 " guestfs_vgrename (guestfs_h *g,\n"
32843 " const char *volgroup,\n"
32844 " const char *newvolgroup);\n"
32849 #: ../src/guestfs-actions.pod:7992
32850 msgid "guestfs_vgs"
32854 #: ../src/guestfs-actions.pod:7994
32858 " guestfs_vgs (guestfs_h *g);\n"
32863 #: ../src/guestfs-actions.pod:8003
32864 msgid "See also C<guestfs_vgs_full>."
32868 #: ../src/guestfs-actions.pod:8011
32869 msgid "guestfs_vgs_full"
32873 #: ../src/guestfs-actions.pod:8013
32876 " struct guestfs_lvm_vg_list *\n"
32877 " guestfs_vgs_full (guestfs_h *g);\n"
32882 #: ../src/guestfs-actions.pod:8019
32884 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
32885 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after "
32890 #: ../src/guestfs-actions.pod:8025
32891 msgid "guestfs_vgscan"
32895 #: ../src/guestfs-actions.pod:8027
32899 " guestfs_vgscan (guestfs_h *g);\n"
32904 #: ../src/guestfs-actions.pod:8037
32905 msgid "guestfs_vguuid"
32909 #: ../src/guestfs-actions.pod:8039
32913 " guestfs_vguuid (guestfs_h *g,\n"
32914 " const char *vgname);\n"
32919 #: ../src/guestfs-actions.pod:8050
32920 msgid "guestfs_wait_ready"
32924 #: ../src/guestfs-actions.pod:8052
32928 " guestfs_wait_ready (guestfs_h *g);\n"
32933 #: ../src/guestfs-actions.pod:8055
32935 "I<This function is deprecated.> In new code, use the L</guestfs_launch> call "
32940 #: ../src/guestfs-actions.pod:8062
32941 msgid "This function is a no op."
32945 #: ../src/guestfs-actions.pod:8064
32947 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
32948 "calling C<guestfs_launch> to wait for the launch to complete. However this "
32949 "is no longer necessary because C<guestfs_launch> now does the waiting."
32953 #: ../src/guestfs-actions.pod:8069
32955 "If you see any calls to this function in code then you can just remove them, "
32956 "unless you want to retain compatibility with older versions of the API."
32960 #: ../src/guestfs-actions.pod:8077
32961 msgid "guestfs_wc_c"
32965 #: ../src/guestfs-actions.pod:8079
32969 " guestfs_wc_c (guestfs_h *g,\n"
32970 " const char *path);\n"
32975 #: ../src/guestfs-actions.pod:8090
32976 msgid "guestfs_wc_l"
32980 #: ../src/guestfs-actions.pod:8092
32984 " guestfs_wc_l (guestfs_h *g,\n"
32985 " const char *path);\n"
32990 #: ../src/guestfs-actions.pod:8103
32991 msgid "guestfs_wc_w"
32995 #: ../src/guestfs-actions.pod:8105
32999 " guestfs_wc_w (guestfs_h *g,\n"
33000 " const char *path);\n"
33005 #: ../src/guestfs-actions.pod:8116
33006 msgid "guestfs_write"
33010 #: ../src/guestfs-actions.pod:8118
33014 " guestfs_write (guestfs_h *g,\n"
33015 " const char *path,\n"
33016 " const char *content,\n"
33017 " size_t content_size);\n"
33022 #: ../src/guestfs-actions.pod:8127
33023 msgid "See also C<guestfs_write_append>."
33027 #: ../src/guestfs-actions.pod:8136
33028 msgid "guestfs_write_append"
33032 #: ../src/guestfs-actions.pod:8138
33036 " guestfs_write_append (guestfs_h *g,\n"
33037 " const char *path,\n"
33038 " const char *content,\n"
33039 " size_t content_size);\n"
33044 #: ../src/guestfs-actions.pod:8147
33045 msgid "See also C<guestfs_write>."
33049 #: ../src/guestfs-actions.pod:8156
33050 msgid "guestfs_write_file"
33054 #: ../src/guestfs-actions.pod:8158
33058 " guestfs_write_file (guestfs_h *g,\n"
33059 " const char *path,\n"
33060 " const char *content,\n"
33066 #: ../src/guestfs-actions.pod:8164
33068 "I<This function is deprecated.> In new code, use the L</guestfs_write> call "
33073 #: ../src/guestfs-actions.pod:8189
33074 msgid "guestfs_zegrep"
33078 #: ../src/guestfs-actions.pod:8191
33082 " guestfs_zegrep (guestfs_h *g,\n"
33083 " const char *regex,\n"
33084 " const char *path);\n"
33089 #: ../src/guestfs-actions.pod:8208
33090 msgid "guestfs_zegrepi"
33094 #: ../src/guestfs-actions.pod:8210
33098 " guestfs_zegrepi (guestfs_h *g,\n"
33099 " const char *regex,\n"
33100 " const char *path);\n"
33105 #: ../src/guestfs-actions.pod:8227
33106 msgid "guestfs_zero"
33110 #: ../src/guestfs-actions.pod:8229
33114 " guestfs_zero (guestfs_h *g,\n"
33115 " const char *device);\n"
33120 #: ../src/guestfs-actions.pod:8243
33122 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
33123 "C<guestfs_is_zero_device>"
33127 #: ../src/guestfs-actions.pod:8255
33128 msgid "guestfs_zero_device"
33132 #: ../src/guestfs-actions.pod:8257
33136 " guestfs_zero_device (guestfs_h *g,\n"
33137 " const char *device);\n"
33142 #: ../src/guestfs-actions.pod:8261
33144 "This command writes zeroes over the entire C<device>. Compare with "
33145 "C<guestfs_zero> which just zeroes the first few blocks of a device."
33149 #: ../src/guestfs-actions.pod:8276
33150 msgid "(Added in 1.3.1)"
33154 #: ../src/guestfs-actions.pod:8278
33155 msgid "guestfs_zerofree"
33159 #: ../src/guestfs-actions.pod:8280
33163 " guestfs_zerofree (guestfs_h *g,\n"
33164 " const char *device);\n"
33169 #: ../src/guestfs-actions.pod:8299
33170 msgid "guestfs_zfgrep"
33174 #: ../src/guestfs-actions.pod:8301
33178 " guestfs_zfgrep (guestfs_h *g,\n"
33179 " const char *pattern,\n"
33180 " const char *path);\n"
33185 #: ../src/guestfs-actions.pod:8318
33186 msgid "guestfs_zfgrepi"
33190 #: ../src/guestfs-actions.pod:8320
33194 " guestfs_zfgrepi (guestfs_h *g,\n"
33195 " const char *pattern,\n"
33196 " const char *path);\n"
33201 #: ../src/guestfs-actions.pod:8337
33202 msgid "guestfs_zfile"
33206 #: ../src/guestfs-actions.pod:8339
33210 " guestfs_zfile (guestfs_h *g,\n"
33211 " const char *meth,\n"
33212 " const char *path);\n"
33217 #: ../src/guestfs-actions.pod:8344
33219 "I<This function is deprecated.> In new code, use the L</guestfs_file> call "
33224 #: ../src/guestfs-actions.pod:8356
33226 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
33231 #: ../src/guestfs-actions.pod:8364
33232 msgid "guestfs_zgrep"
33236 #: ../src/guestfs-actions.pod:8366
33240 " guestfs_zgrep (guestfs_h *g,\n"
33241 " const char *regex,\n"
33242 " const char *path);\n"
33247 #: ../src/guestfs-actions.pod:8383
33248 msgid "guestfs_zgrepi"
33252 #: ../src/guestfs-actions.pod:8385
33256 " guestfs_zgrepi (guestfs_h *g,\n"
33257 " const char *regex,\n"
33258 " const char *path);\n"
33263 #: ../src/guestfs-availability.pod:3
33268 #: ../src/guestfs-availability.pod:5
33270 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
33271 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
33272 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
33273 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
33274 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
33278 #: ../src/guestfs-availability.pod:21
33283 #: ../src/guestfs-availability.pod:23
33284 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
33288 #: ../src/guestfs-availability.pod:26
33293 #: ../src/guestfs-availability.pod:28
33294 msgid "The following functions: L</guestfs_grub_install>"
33298 #: ../src/guestfs-availability.pod:31
33303 #: ../src/guestfs-availability.pod:33
33305 "The following functions: L</guestfs_inotify_add_watch> "
33306 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
33307 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
33311 #: ../src/guestfs-availability.pod:41
33312 msgid "B<linuxfsuuid>"
33316 #: ../src/guestfs-availability.pod:43
33318 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
33319 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
33323 #: ../src/guestfs-availability.pod:50
33324 msgid "B<linuxmodules>"
33328 #: ../src/guestfs-availability.pod:52
33329 msgid "The following functions: L</guestfs_modprobe>"
33333 #: ../src/guestfs-availability.pod:55
33334 msgid "B<linuxxattrs>"
33338 #: ../src/guestfs-availability.pod:57
33340 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> "
33341 "L</guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> "
33342 "L</guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> "
33343 "L</guestfs_setxattr>"
33347 #: ../src/guestfs-availability.pod:68
33352 #: ../src/guestfs-availability.pod:70
33354 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
33355 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
33356 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
33360 #: ../src/guestfs-availability.pod:79
33365 #: ../src/guestfs-availability.pod:81
33367 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
33368 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
33369 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
33370 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
33371 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
33372 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
33373 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
33374 "L</guestfs_vgs_full>"
33378 #: ../src/guestfs-availability.pod:104
33383 #: ../src/guestfs-availability.pod:106
33385 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
33386 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
33390 #: ../src/guestfs-availability.pod:112
33395 #: ../src/guestfs-availability.pod:114
33396 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
33400 #: ../src/guestfs-availability.pod:117
33401 msgid "B<ntfsprogs>"
33405 #: ../src/guestfs-availability.pod:119
33407 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
33408 "L</guestfs_ntfsresize_size>"
33412 #: ../src/guestfs-availability.pod:124
33413 msgid "B<realpath>"
33417 #: ../src/guestfs-availability.pod:126
33418 msgid "The following functions: L</guestfs_realpath>"
33422 #: ../src/guestfs-availability.pod:129
33427 #: ../src/guestfs-availability.pod:131
33429 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
33430 "L</guestfs_scrub_freespace>"
33434 #: ../src/guestfs-availability.pod:136
33439 #: ../src/guestfs-availability.pod:138
33440 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
33444 #: ../src/guestfs-availability.pod:142
33449 #: ../src/guestfs-availability.pod:144
33450 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
33454 #: ../src/guestfs-availability.pod:148
33455 msgid "B<zerofree>"
33459 #: ../src/guestfs-availability.pod:150
33460 msgid "The following functions: L</guestfs_zerofree>"
33464 #: ../src/guestfs-structs.pod:1
33465 msgid "guestfs_int_bool"
33469 #: ../src/guestfs-structs.pod:3
33472 " struct guestfs_int_bool {\n"
33480 #: ../src/guestfs-structs.pod:8
33483 " struct guestfs_int_bool_list {\n"
33484 " uint32_t len; /* Number of elements in list. */\n"
33485 " struct guestfs_int_bool *val; /* Elements. */\n"
33491 #: ../src/guestfs-structs.pod:13
33494 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
33495 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
33500 #: ../src/guestfs-structs.pod:16
33501 msgid "guestfs_lvm_pv"
33505 #: ../src/guestfs-structs.pod:18
33508 " struct guestfs_lvm_pv {\n"
33509 " char *pv_name;\n"
33510 " /* The next field is NOT nul-terminated, be careful when printing it: "
33512 " char pv_uuid[32];\n"
33514 " uint64_t pv_size;\n"
33515 " uint64_t dev_size;\n"
33516 " uint64_t pv_free;\n"
33517 " uint64_t pv_used;\n"
33518 " char *pv_attr;\n"
33519 " int64_t pv_pe_count;\n"
33520 " int64_t pv_pe_alloc_count;\n"
33521 " char *pv_tags;\n"
33522 " uint64_t pe_start;\n"
33523 " int64_t pv_mda_count;\n"
33524 " uint64_t pv_mda_free;\n"
33530 #: ../src/guestfs-structs.pod:36
33533 " struct guestfs_lvm_pv_list {\n"
33534 " uint32_t len; /* Number of elements in list. */\n"
33535 " struct guestfs_lvm_pv *val; /* Elements. */\n"
33541 #: ../src/guestfs-structs.pod:41
33544 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
33545 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
33550 #: ../src/guestfs-structs.pod:44
33551 msgid "guestfs_lvm_vg"
33555 #: ../src/guestfs-structs.pod:46
33558 " struct guestfs_lvm_vg {\n"
33559 " char *vg_name;\n"
33560 " /* The next field is NOT nul-terminated, be careful when printing it: "
33562 " char vg_uuid[32];\n"
33564 " char *vg_attr;\n"
33565 " uint64_t vg_size;\n"
33566 " uint64_t vg_free;\n"
33567 " char *vg_sysid;\n"
33568 " uint64_t vg_extent_size;\n"
33569 " int64_t vg_extent_count;\n"
33570 " int64_t vg_free_count;\n"
33571 " int64_t max_lv;\n"
33572 " int64_t max_pv;\n"
33573 " int64_t pv_count;\n"
33574 " int64_t lv_count;\n"
33575 " int64_t snap_count;\n"
33576 " int64_t vg_seqno;\n"
33577 " char *vg_tags;\n"
33578 " int64_t vg_mda_count;\n"
33579 " uint64_t vg_mda_free;\n"
33585 #: ../src/guestfs-structs.pod:69
33588 " struct guestfs_lvm_vg_list {\n"
33589 " uint32_t len; /* Number of elements in list. */\n"
33590 " struct guestfs_lvm_vg *val; /* Elements. */\n"
33596 #: ../src/guestfs-structs.pod:74
33599 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
33600 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
33605 #: ../src/guestfs-structs.pod:77
33606 msgid "guestfs_lvm_lv"
33610 #: ../src/guestfs-structs.pod:79
33613 " struct guestfs_lvm_lv {\n"
33614 " char *lv_name;\n"
33615 " /* The next field is NOT nul-terminated, be careful when printing it: "
33617 " char lv_uuid[32];\n"
33618 " char *lv_attr;\n"
33619 " int64_t lv_major;\n"
33620 " int64_t lv_minor;\n"
33621 " int64_t lv_kernel_major;\n"
33622 " int64_t lv_kernel_minor;\n"
33623 " uint64_t lv_size;\n"
33624 " int64_t seg_count;\n"
33626 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
33627 " float snap_percent;\n"
33628 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
33629 " float copy_percent;\n"
33630 " char *move_pv;\n"
33631 " char *lv_tags;\n"
33632 " char *mirror_log;\n"
33633 " char *modules;\n"
33639 #: ../src/guestfs-structs.pod:101
33642 " struct guestfs_lvm_lv_list {\n"
33643 " uint32_t len; /* Number of elements in list. */\n"
33644 " struct guestfs_lvm_lv *val; /* Elements. */\n"
33650 #: ../src/guestfs-structs.pod:106
33653 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
33654 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
33659 #: ../src/guestfs-structs.pod:111
33662 " struct guestfs_stat {\n"
33666 " int64_t nlink;\n"
33671 " int64_t blksize;\n"
33672 " int64_t blocks;\n"
33673 " int64_t atime;\n"
33674 " int64_t mtime;\n"
33675 " int64_t ctime;\n"
33681 #: ../src/guestfs-structs.pod:127
33684 " struct guestfs_stat_list {\n"
33685 " uint32_t len; /* Number of elements in list. */\n"
33686 " struct guestfs_stat *val; /* Elements. */\n"
33692 #: ../src/guestfs-structs.pod:132
33695 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
33696 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
33701 #: ../src/guestfs-structs.pod:137
33704 " struct guestfs_statvfs {\n"
33705 " int64_t bsize;\n"
33706 " int64_t frsize;\n"
33707 " int64_t blocks;\n"
33708 " int64_t bfree;\n"
33709 " int64_t bavail;\n"
33710 " int64_t files;\n"
33711 " int64_t ffree;\n"
33712 " int64_t favail;\n"
33715 " int64_t namemax;\n"
33721 #: ../src/guestfs-structs.pod:151
33724 " struct guestfs_statvfs_list {\n"
33725 " uint32_t len; /* Number of elements in list. */\n"
33726 " struct guestfs_statvfs *val; /* Elements. */\n"
33732 #: ../src/guestfs-structs.pod:156
33735 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
33736 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
33741 #: ../src/guestfs-structs.pod:159
33742 msgid "guestfs_dirent"
33746 #: ../src/guestfs-structs.pod:161
33749 " struct guestfs_dirent {\n"
33758 #: ../src/guestfs-structs.pod:167
33761 " struct guestfs_dirent_list {\n"
33762 " uint32_t len; /* Number of elements in list. */\n"
33763 " struct guestfs_dirent *val; /* Elements. */\n"
33769 #: ../src/guestfs-structs.pod:172
33772 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
33773 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
33778 #: ../src/guestfs-structs.pod:177
33781 " struct guestfs_version {\n"
33782 " int64_t major;\n"
33783 " int64_t minor;\n"
33784 " int64_t release;\n"
33791 #: ../src/guestfs-structs.pod:184
33794 " struct guestfs_version_list {\n"
33795 " uint32_t len; /* Number of elements in list. */\n"
33796 " struct guestfs_version *val; /* Elements. */\n"
33802 #: ../src/guestfs-structs.pod:189
33805 " void guestfs_free_version (struct guestfs_free_version *);\n"
33806 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
33811 #: ../src/guestfs-structs.pod:192
33812 msgid "guestfs_xattr"
33816 #: ../src/guestfs-structs.pod:194
33819 " struct guestfs_xattr {\n"
33820 " char *attrname;\n"
33821 " /* The next two fields describe a byte array. */\n"
33822 " uint32_t attrval_len;\n"
33823 " char *attrval;\n"
33829 #: ../src/guestfs-structs.pod:201
33832 " struct guestfs_xattr_list {\n"
33833 " uint32_t len; /* Number of elements in list. */\n"
33834 " struct guestfs_xattr *val; /* Elements. */\n"
33840 #: ../src/guestfs-structs.pod:206
33843 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
33844 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
33849 #: ../src/guestfs-structs.pod:209
33850 msgid "guestfs_inotify_event"
33854 #: ../src/guestfs-structs.pod:211
33857 " struct guestfs_inotify_event {\n"
33858 " int64_t in_wd;\n"
33859 " uint32_t in_mask;\n"
33860 " uint32_t in_cookie;\n"
33861 " char *in_name;\n"
33867 #: ../src/guestfs-structs.pod:218
33870 " struct guestfs_inotify_event_list {\n"
33871 " uint32_t len; /* Number of elements in list. */\n"
33872 " struct guestfs_inotify_event *val; /* Elements. */\n"
33878 #: ../src/guestfs-structs.pod:223
33881 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
33882 " void guestfs_free_inotify_event_list (struct "
33883 "guestfs_free_inotify_event_list *);\n"
33888 #: ../src/guestfs-structs.pod:226
33889 msgid "guestfs_partition"
33893 #: ../src/guestfs-structs.pod:228
33896 " struct guestfs_partition {\n"
33897 " int32_t part_num;\n"
33898 " uint64_t part_start;\n"
33899 " uint64_t part_end;\n"
33900 " uint64_t part_size;\n"
33906 #: ../src/guestfs-structs.pod:235
33909 " struct guestfs_partition_list {\n"
33910 " uint32_t len; /* Number of elements in list. */\n"
33911 " struct guestfs_partition *val; /* Elements. */\n"
33917 #: ../src/guestfs-structs.pod:240
33920 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
33921 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
33926 #: ../src/guestfs-structs.pod:243
33927 msgid "guestfs_application"
33931 #: ../src/guestfs-structs.pod:245
33934 " struct guestfs_application {\n"
33935 " char *app_name;\n"
33936 " char *app_display_name;\n"
33937 " int32_t app_epoch;\n"
33938 " char *app_version;\n"
33939 " char *app_release;\n"
33940 " char *app_install_path;\n"
33941 " char *app_trans_path;\n"
33942 " char *app_publisher;\n"
33943 " char *app_url;\n"
33944 " char *app_source_package;\n"
33945 " char *app_summary;\n"
33946 " char *app_description;\n"
33952 #: ../src/guestfs-structs.pod:260
33955 " struct guestfs_application_list {\n"
33956 " uint32_t len; /* Number of elements in list. */\n"
33957 " struct guestfs_application *val; /* Elements. */\n"
33963 #: ../src/guestfs-structs.pod:265
33966 " void guestfs_free_application (struct guestfs_free_application *);\n"
33967 " void guestfs_free_application_list (struct guestfs_free_application_list "
33973 #: ../src/guestfs.pod:5
33974 msgid "guestfs - Library for accessing and modifying virtual machine images"
33978 #: ../src/guestfs.pod:11
33981 " guestfs_h *g = guestfs_create ();\n"
33982 " guestfs_add_drive (g, \"guest.img\");\n"
33983 " guestfs_launch (g);\n"
33984 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
33985 " guestfs_touch (g, \"/hello\");\n"
33986 " guestfs_umount (g, \"/\");\n"
33987 " guestfs_close (g);\n"
33992 #: ../src/guestfs.pod:25
33994 "Libguestfs is a library for accessing and modifying guest disk images. "
33995 "Amongst the things this is good for: making batch configuration changes to "
33996 "guests, getting disk used/free statistics (see also: virt-df), migrating "
33997 "between virtualization systems (see also: virt-p2v), performing partial "
33998 "backups, performing partial guest clones, cloning guests and changing "
33999 "registry/UUID/hostname info, and much else besides."
34003 #: ../src/guestfs.pod:33
34005 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
34006 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
34007 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
34012 #: ../src/guestfs.pod:38
34014 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
34015 "what filesystem is in each LV, etc.). It can also run commands in the "
34016 "context of the guest. Also you can access filesystems over FUSE."
34020 #: ../src/guestfs.pod:43
34022 "Libguestfs is a library that can be linked with C and C++ management "
34023 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
34024 "PHP, Erlang, Haskell or C#). You can also use it from shell scripts or the "
34029 #: ../src/guestfs.pod:48
34031 "You don't need to be root to use libguestfs, although obviously you do need "
34032 "enough permissions to access the disk images."
34036 #: ../src/guestfs.pod:51
34038 "Libguestfs is a large API because it can do many things. For a gentle "
34039 "introduction, please read the L</API OVERVIEW> section next."
34043 #: ../src/guestfs.pod:54
34045 "There are also some example programs in the L<guestfs-examples(3)> manual "
34050 #: ../src/guestfs.pod:57
34051 msgid "API OVERVIEW"
34055 #: ../src/guestfs.pod:59
34057 "This section provides a gentler overview of the libguestfs API. We also try "
34058 "to group API calls together, where that may not be obvious from reading "
34059 "about the individual calls in the main section of this manual."
34063 #: ../src/guestfs.pod:64
34068 #: ../src/guestfs.pod:66
34070 "Before you can use libguestfs calls, you have to create a handle. Then you "
34071 "must add at least one disk image to the handle, followed by launching the "
34072 "handle, then performing whatever operations you want, and finally closing "
34073 "the handle. By convention we use the single letter C<g> for the name of the "
34074 "handle variable, although of course you can use any name you want."
34078 #: ../src/guestfs.pod:73
34079 msgid "The general structure of all libguestfs-using programs looks like this:"
34083 #: ../src/guestfs.pod:76
34086 " guestfs_h *g = guestfs_create ();\n"
34091 #: ../src/guestfs.pod:78
34094 " /* Call guestfs_add_drive additional times if there are\n"
34095 " * multiple disk images.\n"
34097 " guestfs_add_drive (g, \"guest.img\");\n"
34102 #: ../src/guestfs.pod:83
34105 " /* Most manipulation calls won't work until you've launched\n"
34106 " * the handle 'g'. You have to do this _after_ adding drives\n"
34107 " * and _before_ other commands.\n"
34109 " guestfs_launch (g);\n"
34114 #: ../src/guestfs.pod:89
34117 " /* Now you can examine what partitions, LVs etc are available.\n"
34119 " char **partitions = guestfs_list_partitions (g);\n"
34120 " char **logvols = guestfs_lvs (g);\n"
34125 #: ../src/guestfs.pod:94
34128 " /* To access a filesystem in the image, you must mount it.\n"
34130 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34135 #: ../src/guestfs.pod:98
34138 " /* Now you can perform filesystem actions on the guest\n"
34141 " guestfs_touch (g, \"/hello\");\n"
34146 #: ../src/guestfs.pod:103
34149 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
34150 " * it is done automatically when you close the handle. See\n"
34151 " * discussion of autosync in this page.\n"
34153 " guestfs_sync (g);\n"
34158 #: ../src/guestfs.pod:109
34161 " /* Close the handle 'g'. */\n"
34162 " guestfs_close (g);\n"
34167 #: ../src/guestfs.pod:112
34169 "The code above doesn't include any error checking. In real code you should "
34170 "check return values carefully for errors. In general all functions that "
34171 "return integers return C<-1> on error, and all functions that return "
34172 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
34173 "how to handle errors, and consult the documentation for each function call "
34174 "below to see precisely how they return error indications. See "
34175 "L<guestfs-examples(3)> for fully worked examples."
34179 #: ../src/guestfs.pod:121
34180 msgid "DISK IMAGES"
34184 #: ../src/guestfs.pod:123
34186 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
34187 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
34188 "actual block device, or simply an empty file of zeroes that you have created "
34189 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
34194 #: ../src/guestfs.pod:129
34196 "The call you should use in modern code for adding drives is "
34197 "L</guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
34198 "specifying that the format is raw, do:"
34202 #: ../src/guestfs.pod:133
34205 " guestfs_add_drive_opts (g, filename,\n"
34206 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34212 #: ../src/guestfs.pod:137
34213 msgid "You can add a disk read-only using:"
34217 #: ../src/guestfs.pod:139
34220 " guestfs_add_drive_opts (g, filename,\n"
34221 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34222 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
34228 #: ../src/guestfs.pod:144
34230 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
34231 "libguestfs won't modify the file."
34235 #: ../src/guestfs.pod:147
34237 "Be extremely cautious if the disk image is in use, eg. if it is being used "
34238 "by a virtual machine. Adding it read-write will almost certainly cause disk "
34239 "corruption, but adding it read-only is safe."
34243 #: ../src/guestfs.pod:151
34245 "You must add at least one disk image, and you may add multiple disk images. "
34246 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
34247 "first one you added), C</dev/sdb> (for the second one you added), etc."
34251 #: ../src/guestfs.pod:156
34253 "Once L</guestfs_launch> has been called you cannot add any more images. You "
34254 "can call L</guestfs_list_devices> to get a list of the device names, in the "
34255 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
34259 #: ../src/guestfs.pod:161
34264 #: ../src/guestfs.pod:163
34266 "Before you can read or write files, create directories and so on in a disk "
34267 "image that contains filesystems, you have to mount those filesystems using "
34268 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
34269 "a disk image contains (for example) one partition with a filesystem on that "
34270 "partition, then you can mount it directly:"
34274 #: ../src/guestfs.pod:170
34277 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
34282 #: ../src/guestfs.pod:172
34284 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
34285 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
34286 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
34287 "that these are libguestfs virtual devices, and are nothing to do with host "
34292 #: ../src/guestfs.pod:178
34294 "If you are given a disk image and you don't know what it contains then you "
34295 "have to find out. Libguestfs can do that too: use "
34296 "L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions "
34297 "and LVs, and either try mounting each to see what is mountable, or else "
34298 "examine them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
34299 "filesystems, use L</guestfs_list_filesystems>."
34303 #: ../src/guestfs.pod:186
34305 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
34306 "L</INSPECTION> below). But you might find it easier to look at higher level "
34307 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
34311 #: ../src/guestfs.pod:191
34313 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
34314 "several other variations of the C<guestfs_mount_*> call."
34318 #: ../src/guestfs.pod:194
34319 msgid "FILESYSTEM ACCESS AND MODIFICATION"
34323 #: ../src/guestfs.pod:196
34325 "The majority of the libguestfs API consists of fairly low-level calls for "
34326 "accessing and modifying the files, directories, symlinks etc on mounted "
34327 "filesystems. There are over a hundred such calls which you can find listed "
34328 "in detail below in this man page, and we don't even pretend to cover them "
34329 "all in this overview."
34333 #: ../src/guestfs.pod:202
34335 "Specify filenames as full paths, starting with C<\"/\"> and including the "
34340 #: ../src/guestfs.pod:205
34342 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
34343 "the file called C<\"etc/passwd\"> then you could do:"
34347 #: ../src/guestfs.pod:208
34350 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
34355 #: ../src/guestfs.pod:210
34357 "This would return C<data> as a newly allocated buffer containing the full "
34358 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
34359 "or C<NULL> if there was an error."
34363 #: ../src/guestfs.pod:214
34365 "As another example, to create a top-level directory on that filesystem "
34366 "called C<\"var\"> you would do:"
34370 #: ../src/guestfs.pod:217
34373 " guestfs_mkdir (g, \"/var\");\n"
34378 #: ../src/guestfs.pod:219
34379 msgid "To create a symlink you could do:"
34383 #: ../src/guestfs.pod:221
34386 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
34387 " \"/etc/rc3.d/S30portmap\");\n"
34392 #: ../src/guestfs.pod:224
34394 "Libguestfs will reject attempts to use relative paths and there is no "
34395 "concept of a current working directory."
34399 #: ../src/guestfs.pod:227
34401 "Libguestfs can return errors in many situations: for example if the "
34402 "filesystem isn't writable, or if a file or directory that you requested "
34403 "doesn't exist. If you are using the C API (documented here) you have to "
34404 "check for those error conditions after each call. (Other language bindings "
34405 "turn these errors into exceptions)."
34409 #: ../src/guestfs.pod:233
34411 "File writes are affected by the per-handle umask, set by calling "
34412 "L</guestfs_umask> and defaulting to 022. See L</UMASK>."
34416 #: ../src/guestfs.pod:236
34417 msgid "PARTITIONING"
34421 #: ../src/guestfs.pod:238
34423 "Libguestfs contains API calls to read, create and modify partition tables on "
34428 #: ../src/guestfs.pod:241
34430 "In the common case where you want to create a single partition covering the "
34431 "whole disk, you should use the L</guestfs_part_disk> call:"
34435 #: ../src/guestfs.pod:245
34438 " const char *parttype = \"mbr\";\n"
34439 " if (disk_is_larger_than_2TB)\n"
34440 " parttype = \"gpt\";\n"
34441 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
34446 #: ../src/guestfs.pod:250
34448 "Obviously this effectively wipes anything that was on that disk image "
34453 #: ../src/guestfs.pod:253
34458 #: ../src/guestfs.pod:255
34460 "Libguestfs provides access to a large part of the LVM2 API, such as "
34461 "L</guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense "
34462 "unless you familiarize yourself with the concepts of physical volumes, "
34463 "volume groups and logical volumes."
34467 #: ../src/guestfs.pod:260
34469 "This author strongly recommends reading the LVM HOWTO, online at "
34470 "L<http://tldp.org/HOWTO/LVM-HOWTO/>."
34474 #: ../src/guestfs.pod:263
34475 msgid "DOWNLOADING"
34479 #: ../src/guestfs.pod:265
34481 "Use L</guestfs_cat> to download small, text only files. This call is "
34482 "limited to files which are less than 2 MB and which cannot contain any ASCII "
34483 "NUL (C<\\0>) characters. However the API is very simple to use."
34487 #: ../src/guestfs.pod:269
34489 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
34490 "bit data, since it returns a (pointer, size) pair. However it is still "
34491 "limited to \"small\" files, less than 2 MB."
34495 #: ../src/guestfs.pod:273
34497 "L</guestfs_download> can be used to download any file, with no limits on "
34498 "content or size (even files larger than 4 GB)."
34502 #: ../src/guestfs.pod:276
34503 msgid "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
34507 #: ../src/guestfs.pod:279
34512 #: ../src/guestfs.pod:281
34514 "It's often the case that you want to write a file or files to the disk "
34519 #: ../src/guestfs.pod:284
34521 "To write a small file with fixed content, use L</guestfs_write>. To create "
34522 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or "
34523 "L</guestfs_fallocate64> (with all disk blocks allocated). There are a "
34524 "variety of other functions for creating test files, for example "
34525 "L</guestfs_fill> and L</guestfs_fill_pattern>."
34529 #: ../src/guestfs.pod:290
34531 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
34532 "file content or size (even files larger than 4 GB)."
34536 #: ../src/guestfs.pod:293
34537 msgid "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
34541 #: ../src/guestfs.pod:295
34543 "However the fastest way to upload I<large numbers of arbitrary files> is to "
34544 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and "
34545 "L<mkisofs(8)>), then attach this using L</guestfs_add_drive_ro>. If you add "
34546 "the drive in a predictable way (eg. adding it last after all other drives) "
34547 "then you can get the device name from L</guestfs_list_devices> and mount it "
34548 "directly using L</guestfs_mount_ro>. Note that squashfs images are "
34549 "sometimes non-portable between kernel versions, and they don't support "
34550 "labels or UUIDs. If you want to pre-build an image or you need to mount it "
34551 "using a label or UUID, use an ISO image instead."
34555 #: ../src/guestfs.pod:306
34560 #: ../src/guestfs.pod:308
34562 "There are various different commands for copying between files and devices "
34563 "and in and out of the guest filesystem. These are summarised in the table "
34568 #: ../src/guestfs.pod:314
34569 msgid "B<file> to B<file>"
34573 #: ../src/guestfs.pod:316
34575 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
34576 "directories recursively."
34580 #: ../src/guestfs.pod:319
34581 msgid "To copy part of a file (offset and size) use L</guestfs_copy_file_to_file>."
34585 #: ../src/guestfs.pod:322
34586 msgid "B<file> to B<device>"
34590 #: ../src/guestfs.pod:324
34591 msgid "B<device> to B<file>"
34595 #: ../src/guestfs.pod:326
34596 msgid "B<device> to B<device>"
34600 #: ../src/guestfs.pod:328
34602 "Use L</guestfs_copy_file_to_device>, L</guestfs_copy_device_to_file>, or "
34603 "L</guestfs_copy_device_to_device>."
34607 #: ../src/guestfs.pod:331
34608 msgid "Example: duplicate the contents of an LV:"
34612 #: ../src/guestfs.pod:333
34615 " guestfs_copy_device_to_device (g,\n"
34616 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
34617 " /* -1 marks the end of the list of optional parameters */\n"
34623 #: ../src/guestfs.pod:338
34625 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
34626 "(C</dev/VG/Original>). To copy less than the whole source device, use the "
34627 "optional C<size> parameter:"
34631 #: ../src/guestfs.pod:342
34634 " guestfs_copy_device_to_device (g,\n"
34635 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
34636 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, 10000,\n"
34642 #: ../src/guestfs.pod:347
34643 msgid "B<file on the host> to B<file or device>"
34647 #: ../src/guestfs.pod:349
34648 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
34652 #: ../src/guestfs.pod:351
34653 msgid "B<file or device> to B<file on the host>"
34657 #: ../src/guestfs.pod:353
34658 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
34662 #: ../src/guestfs.pod:357
34663 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
34667 #: ../src/guestfs.pod:359
34669 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, "
34670 "L</guestfs_tar_out> etc appear to only take filenames as arguments, so it "
34671 "appears you can only upload and download to files. However many Un*x-like "
34672 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, "
34673 "C</dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, "
34674 "stderr, and arbitrary file descriptor N."
34678 #: ../src/guestfs.pod:367
34679 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
34683 #: ../src/guestfs.pod:370
34686 " guestfs_download (g, filename, \"/dev/stdout\");\n"
34691 #: ../src/guestfs.pod:372
34692 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
34696 #: ../src/guestfs.pod:374
34699 " char devfd[64];\n"
34700 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
34701 " guestfs_tar_out (g, \"/\", devfd);\n"
34706 #: ../src/guestfs.pod:378
34707 msgid "LISTING FILES"
34711 #: ../src/guestfs.pod:380
34713 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
34714 "L<guestfish(1)>-equivalent command C<ll>)."
34718 #: ../src/guestfs.pod:383
34720 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
34721 "programs, as a flat list of strings."
34725 #: ../src/guestfs.pod:386
34727 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
34728 "directory, plus additional information about each one. It is more "
34729 "equivalent to using the L<readdir(3)> call on a local filesystem."
34733 #: ../src/guestfs.pod:390
34735 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list "
34740 #: ../src/guestfs.pod:393
34741 msgid "RUNNING COMMANDS"
34745 #: ../src/guestfs.pod:395
34747 "Although libguestfs is primarily an API for manipulating files inside guest "
34748 "images, we also provide some limited facilities for running commands inside "
34753 #: ../src/guestfs.pod:399
34754 msgid "There are many limitations to this:"
34758 #: ../src/guestfs.pod:405
34760 "The kernel version that the command runs under will be different from what "
34765 #: ../src/guestfs.pod:410
34767 "If the command needs to communicate with daemons, then most likely they "
34768 "won't be running."
34772 #: ../src/guestfs.pod:415
34773 msgid "The command will be running in limited memory."
34777 #: ../src/guestfs.pod:419
34779 "The network may not be available unless you enable it (see "
34780 "L</guestfs_set_network>)."
34784 #: ../src/guestfs.pod:424
34785 msgid "Only supports Linux guests (not Windows, BSD, etc)."
34789 #: ../src/guestfs.pod:428
34790 msgid "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
34794 #: ../src/guestfs.pod:433
34796 "For SELinux guests, you may need to enable SELinux and load policy first. "
34797 "See L</SELINUX> in this manpage."
34801 #: ../src/guestfs.pod:438
34803 "I<Security:> It is not safe to run commands from untrusted, possibly "
34804 "malicious guests. These commands may attempt to exploit your program by "
34805 "sending unexpected output. They could also try to exploit the Linux kernel "
34806 "or qemu provided by the libguestfs appliance. They could use the network "
34807 "provided by the libguestfs appliance to bypass ordinary network partitions "
34808 "and firewalls. They could use the elevated privileges or different SELinux "
34809 "context of your program to their advantage."
34813 #: ../src/guestfs.pod:447
34815 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
34816 "(a script which runs when the guest next boots normally), and to have this "
34817 "script run the commands you want in the normal context of the running guest, "
34818 "network security and so on. For information about other security issues, "
34819 "see L</SECURITY>."
34823 #: ../src/guestfs.pod:455
34825 "The two main API calls to run commands are L</guestfs_command> and "
34826 "L</guestfs_sh> (there are also variations)."
34830 #: ../src/guestfs.pod:458
34832 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
34833 "shell globs, redirections, etc will work."
34837 #: ../src/guestfs.pod:461
34838 msgid "CONFIGURATION FILES"
34842 #: ../src/guestfs.pod:463
34844 "To read and write configuration files in Linux guest filesystems, we "
34845 "strongly recommend using Augeas. For example, Augeas understands how to "
34846 "read and write, say, a Linux shadow password file or X.org configuration "
34847 "file, and so avoids you having to write that code."
34851 #: ../src/guestfs.pod:468
34853 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
34854 "document Augeas itself here because there is excellent documentation on the "
34855 "L<http://augeas.net/> website."
34859 #: ../src/guestfs.pod:472
34861 "If you don't want to use Augeas (you fool!) then try calling "
34862 "L</guestfs_read_lines> to get the file as a list of lines which you can "
34867 #: ../src/guestfs.pod:476
34872 #: ../src/guestfs.pod:478
34874 "We support SELinux guests. To ensure that labeling happens correctly in "
34875 "SELinux guests, you need to enable SELinux and load the guest's policy:"
34879 #: ../src/guestfs.pod:486
34880 msgid "Before launching, do:"
34884 #: ../src/guestfs.pod:488
34887 " guestfs_set_selinux (g, 1);\n"
34892 #: ../src/guestfs.pod:492
34894 "After mounting the guest's filesystem(s), load the policy. This is best "
34895 "done by running the L<load_policy(8)> command in the guest itself:"
34899 #: ../src/guestfs.pod:496
34902 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
34907 #: ../src/guestfs.pod:498
34909 "(Older versions of C<load_policy> require you to specify the name of the "
34914 #: ../src/guestfs.pod:503
34916 "Optionally, set the security context for the API. The correct security "
34917 "context to use can only be known by inspecting the guest. As an example:"
34921 #: ../src/guestfs.pod:507
34924 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
34929 #: ../src/guestfs.pod:511
34930 msgid "This will work for running commands and editing existing files."
34934 #: ../src/guestfs.pod:513
34936 "When new files are created, you may need to label them explicitly, for "
34937 "example by running the external command C<restorecon pathname>."
34941 #: ../src/guestfs.pod:517
34946 #: ../src/guestfs.pod:519
34948 "Certain calls are affected by the current file mode creation mask (the "
34949 "\"umask\"). In particular ones which create files or directories, such as "
34950 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
34951 "either the default mode that the file is created with or modifies the mode "
34956 #: ../src/guestfs.pod:525
34958 "The default umask is C<022>, so files are created with modes such as C<0644> "
34959 "and directories with C<0755>."
34963 #: ../src/guestfs.pod:528
34965 "There are two ways to avoid being affected by umask. Either set umask to 0 "
34966 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
34967 "L</guestfs_chmod> after creating each file or directory."
34971 #: ../src/guestfs.pod:532
34972 msgid "For more information about umask, see L<umask(2)>."
34976 #: ../src/guestfs.pod:536
34978 "Libguestfs allows you to access Linux guests which have been encrypted using "
34979 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
34980 "standard. This includes nearly all whole disk encryption systems used by "
34981 "modern Linux guests."
34985 #: ../src/guestfs.pod:542
34987 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
34988 "returns the string C<crypto_LUKS>)."
34992 #: ../src/guestfs.pod:545
34994 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
34995 "will require the passphrase!"
34999 #: ../src/guestfs.pod:548
35001 "Opening a LUKS device creates a new device mapper device called "
35002 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
35003 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
35004 "decrypted from and encrypted to the underlying block device respectively."
35008 #: ../src/guestfs.pod:554
35010 "LVM volume groups on the device can be made visible by calling "
35011 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
35012 "volume(s) can now be mounted in the usual way."
35016 #: ../src/guestfs.pod:558
35018 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
35019 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
35020 "[\"/dev/VG\"])>. Then close the mapper device by calling "
35021 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
35022 "underlying encrypted block device)."
35026 #: ../src/guestfs.pod:565
35031 #: ../src/guestfs.pod:567
35033 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
35034 "contains operating systems, an install CD or a live CD. (These APIs used to "
35035 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
35036 "version 1.5.3 the most frequently used part of this library has been "
35037 "rewritten in C and moved into the core code)."
35041 #: ../src/guestfs.pod:574
35043 "Add all disks belonging to the unknown virtual machine and call "
35044 "L</guestfs_launch> in the usual way."
35048 #: ../src/guestfs.pod:577
35050 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
35051 "and certain heuristics, and returns a list of operating systems that were "
35052 "found. An empty list means none were found. A single element is the root "
35053 "filesystem of the operating system. For dual- or multi-boot guests, "
35054 "multiple roots can be returned, each one corresponding to a separate "
35055 "operating system. (Multi-boot virtual machines are extremely rare in the "
35056 "world of virtualization, but since this scenario can happen, we have built "
35057 "libguestfs to deal with it.)"
35061 #: ../src/guestfs.pod:586
35063 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
35064 "to get additional details about that operating system. For example, call "
35065 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
35066 "Windows and Linux-based operating systems respectively."
35070 #: ../src/guestfs.pod:592
35072 "Un*x-like and Linux-based operating systems usually consist of several "
35073 "filesystems which are mounted at boot time (for example, a separate boot "
35074 "partition mounted on C</boot>). The inspection rules are able to detect how "
35075 "filesystems correspond to mount points. Call "
35076 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
35077 "hash table like this example:"
35081 #: ../src/guestfs.pod:599
35084 " /boot => /dev/sda1\n"
35085 " / => /dev/vg_guest/lv_root\n"
35086 " /usr => /dev/vg_guest/lv_usr\n"
35091 #: ../src/guestfs.pod:603
35093 "The caller can then make calls to L</guestfs_mount_options> to mount the "
35094 "filesystems as suggested."
35098 #: ../src/guestfs.pod:606
35100 "Be careful to mount filesystems in the right order (eg. C</> before "
35101 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
35106 #: ../src/guestfs.pod:610
35108 "Inspection currently only works for some common operating systems. "
35109 "Contributors are welcome to send patches for other operating systems that we "
35110 "currently cannot detect."
35114 #: ../src/guestfs.pod:614
35116 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
35117 "for more details. The L</guestfs_inspect_os> function just ignores any "
35118 "encrypted devices."
35122 #: ../src/guestfs.pod:618
35124 "A note on the implementation: The call L</guestfs_inspect_os> performs "
35125 "inspection and caches the results in the guest handle. Subsequent calls to "
35126 "C<guestfs_inspect_get_*> return this cached information, but I<do not> "
35127 "re-read the disks. If you change the content of the guest disks, you can "
35128 "redo inspection by calling L</guestfs_inspect_os> again. "
35129 "(L</guestfs_inspect_list_applications> works a little differently from the "
35130 "other calls and does read the disks. See documentation for that function "
35135 #: ../src/guestfs.pod:627
35136 msgid "INSPECTING INSTALL DISKS"
35140 #: ../src/guestfs.pod:629
35142 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
35147 #: ../src/guestfs.pod:632
35149 "Call L</guestfs_inspect_get_format> to return the format of the operating "
35150 "system, which currently can be C<installed> (a regular operating system) or "
35151 "C<installer> (some sort of install disk)."
35155 #: ../src/guestfs.pod:636
35157 "Further information is available about the operating system that can be "
35158 "installed using the regular inspection APIs like "
35159 "L</guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> "
35164 #: ../src/guestfs.pod:641
35166 "Some additional information specific to installer disks is also available "
35167 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and "
35168 "L</guestfs_inspect_is_multipart> calls."
35172 #: ../src/guestfs.pod:646
35173 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
35177 #: ../src/guestfs.pod:648
35179 "Libguestfs can mount NTFS partitions. It does this using the "
35180 "L<http://www.ntfs-3g.org/> driver."
35184 #: ../src/guestfs.pod:651
35185 msgid "DRIVE LETTERS AND PATHS"
35189 #: ../src/guestfs.pod:653
35191 "DOS and Windows still use drive letters, and the filesystems are always "
35192 "treated as case insensitive by Windows itself, and therefore you might find "
35193 "a Windows configuration file referring to a path like "
35194 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
35195 "that directory might be referred to as C</WINDOWS/System32>."
35199 #: ../src/guestfs.pod:659
35201 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
35202 "L</guestfs_inspect_get_drive_mappings>)"
35206 #: ../src/guestfs.pod:662
35208 "Dealing with separator characters (backslash vs forward slash) is outside "
35209 "the scope of libguestfs, but usually a simple character replacement will "
35214 #: ../src/guestfs.pod:666
35216 "To resolve the case insensitivity of paths, call "
35217 "L</guestfs_case_sensitive_path>."
35221 #: ../src/guestfs.pod:669
35222 msgid "ACCESSING THE WINDOWS REGISTRY"
35226 #: ../src/guestfs.pod:671
35228 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
35229 "files, through the library C<hivex> which is part of the libguestfs project "
35230 "although ships as a separate tarball. You have to locate and download the "
35231 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
35232 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
35233 "L<virt-win-reg(1)> for more help on this issue."
35237 #: ../src/guestfs.pod:679
35238 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
35242 #: ../src/guestfs.pod:681
35244 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
35245 "provide something which looks like a Linux symlink. The way it tries to do "
35246 "the rewriting is described here:"
35250 #: ../src/guestfs.pod:685
35251 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-symbolic-links/>"
35255 #: ../src/guestfs.pod:687
35257 "The essential problem is that ntfs-3g simply does not have enough "
35258 "information to do a correct job. NTFS links can contain drive letters and "
35259 "references to external device GUIDs that ntfs-3g has no way of resolving. "
35260 "It is almost certainly the case that libguestfs callers should ignore what "
35261 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
35265 #: ../src/guestfs.pod:694
35267 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use "
35268 "L</guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
35269 "attribute, and read the raw reparse data from that (you can find the format "
35270 "documented in various places around the web)."
35274 #: ../src/guestfs.pod:699
35275 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
35279 #: ../src/guestfs.pod:701
35281 "There are other useful extended attributes that can be read from ntfs-3g "
35282 "filesystems (using L</guestfs_getxattr>). See:"
35286 #: ../src/guestfs.pod:704
35287 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
35291 #: ../src/guestfs.pod:706
35292 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
35296 #: ../src/guestfs.pod:708
35298 "Although we don't want to discourage you from using the C API, we will "
35299 "mention here that the same API is also available in other languages."
35303 #: ../src/guestfs.pod:711
35305 "The API is broadly identical in all supported languages. This means that "
35306 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
35307 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
35308 "OCaml. In other words, a straightforward, predictable isomorphism between "
35313 #: ../src/guestfs.pod:717
35315 "Error messages are automatically transformed into exceptions if the language "
35320 #: ../src/guestfs.pod:720
35322 "We don't try to \"object orientify\" parts of the API in OO languages, "
35323 "although contributors are welcome to write higher level APIs above what we "
35324 "provide in their favourite languages if they wish."
35328 #: ../src/guestfs.pod:726
35333 #: ../src/guestfs.pod:728
35335 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
35336 "identical to the C API. C++ classes and exceptions are not used."
35340 #: ../src/guestfs.pod:732
35345 #: ../src/guestfs.pod:734
35347 "The C# bindings are highly experimental. Please read the warnings at the "
35348 "top of C<csharp/Libguestfs.cs>."
35352 #: ../src/guestfs.pod:737
35357 #: ../src/guestfs.pod:739
35358 msgid "See L<guestfs-erlang(3)>."
35362 #: ../src/guestfs.pod:741
35367 #: ../src/guestfs.pod:743
35369 "This is the only language binding that is working but incomplete. Only "
35370 "calls which return simple integers have been bound in Haskell, and we are "
35371 "looking for help to complete this binding."
35375 #: ../src/guestfs.pod:747
35380 #: ../src/guestfs.pod:749
35382 "Full documentation is contained in the Javadoc which is distributed with "
35383 "libguestfs. For examples, see L<guestfs-java(3)>."
35387 #: ../src/guestfs.pod:752
35392 #: ../src/guestfs.pod:754
35393 msgid "See L<guestfs-ocaml(3)>."
35397 #: ../src/guestfs.pod:756
35402 #: ../src/guestfs.pod:758
35403 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
35407 #: ../src/guestfs.pod:760
35412 #: ../src/guestfs.pod:762
35414 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
35415 "the php-libguestfs package for your distribution."
35419 #: ../src/guestfs.pod:765
35420 msgid "The PHP binding only works correctly on 64 bit machines."
35424 #: ../src/guestfs.pod:767
35429 #: ../src/guestfs.pod:769
35430 msgid "See L<guestfs-python(3)>."
35434 #: ../src/guestfs.pod:771
35439 #: ../src/guestfs.pod:773
35440 msgid "See L<guestfs-ruby(3)>."
35444 #: ../src/guestfs.pod:775
35445 msgid "B<shell scripts>"
35449 #: ../src/guestfs.pod:777
35450 msgid "See L<guestfish(1)>."
35454 #: ../src/guestfs.pod:781
35455 msgid "LIBGUESTFS GOTCHAS"
35459 #: ../src/guestfs.pod:783
35461 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
35462 "system [...] that works in the way it is documented but is counterintuitive "
35463 "and almost invites mistakes.\""
35467 #: ../src/guestfs.pod:787
35469 "Since we developed libguestfs and the associated tools, there are several "
35470 "things we would have designed differently, but are now stuck with for "
35471 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
35472 "release, you can expect these to change. Beware of them."
35476 #: ../src/guestfs.pod:795
35477 msgid "Autosync / forgetting to sync."
35481 #: ../src/guestfs.pod:797
35483 "I<Update:> Autosync is enabled by default for all API users starting from "
35484 "libguestfs 1.5.24. This section only applies to older versions."
35488 #: ../src/guestfs.pod:800
35490 "When modifying a filesystem from C or another language, you B<must> unmount "
35491 "all filesystems and call L</guestfs_sync> explicitly before you close the "
35492 "libguestfs handle. You can also call:"
35496 #: ../src/guestfs.pod:804
35499 " guestfs_set_autosync (g, 1);\n"
35504 #: ../src/guestfs.pod:806
35506 "to have the unmount/sync done automatically for you when the handle 'g' is "
35507 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
35512 #: ../src/guestfs.pod:810
35514 "If you forget to do this, then it is entirely possible that your changes "
35515 "won't be written out, or will be partially written, or (very rarely) that "
35516 "you'll get disk corruption."
35520 #: ../src/guestfs.pod:814
35522 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
35523 "guestfish scripts that forget to sync will work just fine, which can make "
35524 "this very puzzling if you are trying to debug a problem."
35528 #: ../src/guestfs.pod:818
35529 msgid "Mount option C<-o sync> should not be the default."
35533 #: ../src/guestfs.pod:820
35535 "I<Update:> L</guestfs_mount> no longer adds any options starting from "
35536 "libguestfs 1.13.16. This section only applies to older versions."
35540 #: ../src/guestfs.pod:823
35542 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
35543 "However C<-o sync> does not add any reliability benefit, but does have a "
35544 "very large performance impact."
35548 #: ../src/guestfs.pod:827
35550 "The work around is to use L</guestfs_mount_options> and set the mount "
35551 "options that you actually want to use."
35555 #: ../src/guestfs.pod:830
35556 msgid "Read-only should be the default."
35560 #: ../src/guestfs.pod:832
35562 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
35563 "specify I<--rw> if you want to make changes to the image."
35567 #: ../src/guestfs.pod:835
35568 msgid "This would reduce the potential to corrupt live VM images."
35572 #: ../src/guestfs.pod:837
35574 "Note that many filesystems change the disk when you just mount and unmount, "
35575 "even if you didn't perform any writes. You need to use "
35576 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
35580 #: ../src/guestfs.pod:841
35581 msgid "guestfish command line is hard to use."
35585 #: ../src/guestfs.pod:843
35587 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
35588 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
35589 "exist, so it fails. In earlier versions of guestfish the error message was "
35590 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
35591 "we should have used C<guestfish -c command> to run commands."
35595 #: ../src/guestfs.pod:850
35596 msgid "guestfish megabyte modifiers don't work right on all commands"
35600 #: ../src/guestfs.pod:852
35602 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
35603 "other modifiers). What guestfish actually does is to multiply the number "
35604 "part by the modifier part and pass the result to the C API. However this "
35605 "doesn't work for a few APIs which aren't expecting bytes, but are already "
35606 "expecting some other unit (eg. megabytes)."
35610 #: ../src/guestfs.pod:859
35611 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
35615 #: ../src/guestfs.pod:861
35618 " lvcreate LV VG 100M\n"
35623 #: ../src/guestfs.pod:863
35625 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
35626 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
35627 "megabytes * megabytes) logical volume. The error message you get from this "
35628 "is also a little obscure."
35632 #: ../src/guestfs.pod:868
35634 "This could be fixed in the generator by specially marking parameters and "
35635 "return values which take bytes or other units."
35639 #: ../src/guestfs.pod:871
35640 msgid "Ambiguity between devices and paths"
35644 #: ../src/guestfs.pod:873
35646 "There is a subtle ambiguity in the API between a device name "
35647 "(eg. C</dev/sdb2>) and a similar pathname. A file might just happen to be "
35648 "called C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
35652 #: ../src/guestfs.pod:878
35654 "In the current API we usually resolve this ambiguity by having two separate "
35655 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
35656 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
35657 "detecting if the path supplied begins with C</dev/>."
35661 #: ../src/guestfs.pod:884
35663 "To avoid both the ambiguity and the need to duplicate some calls, we could "
35664 "make paths/devices into structured names. One way to do this would be to "
35665 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
35666 "aspect of grub. Another way would be to use a structured type, equivalent "
35667 "to this OCaml type:"
35671 #: ../src/guestfs.pod:890
35674 " type path = Path of string | Device of int | Partition of int * int\n"
35679 #: ../src/guestfs.pod:892
35680 msgid "which would allow you to pass arguments like:"
35684 #: ../src/guestfs.pod:894
35687 " Path \"/foo/bar\"\n"
35688 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
35689 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
35690 " Path \"/dev/sdb2\" (* not a device *)\n"
35695 #: ../src/guestfs.pod:899
35697 "As you can see there are still problems to resolve even with this "
35698 "representation. Also consider how it might work in guestfish."
35702 #: ../src/guestfs.pod:904
35703 msgid "KEYS AND PASSPHRASES"
35707 #: ../src/guestfs.pod:906
35709 "Certain libguestfs calls take a parameter that contains sensitive key "
35710 "material, passed in as a C string."
35714 #: ../src/guestfs.pod:909
35716 "In the future we would hope to change the libguestfs implementation so that "
35717 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
35718 "swap. However this is I<not> done at the moment, because of the complexity "
35719 "of such an implementation."
35723 #: ../src/guestfs.pod:914
35725 "Therefore you should be aware that any key parameter you pass to libguestfs "
35726 "might end up being written out to the swap partition. If this is a concern, "
35727 "scrub the swap partition or don't use libguestfs on encrypted devices."
35731 #: ../src/guestfs.pod:919
35732 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
35736 #: ../src/guestfs.pod:921
35738 "All high-level libguestfs actions are synchronous. If you want to use "
35739 "libguestfs asynchronously then you must create a thread."
35743 #: ../src/guestfs.pod:924
35745 "Only use the handle from a single thread. Either use the handle exclusively "
35746 "from one thread, or provide your own mutex so that two threads cannot issue "
35747 "calls on the same handle at the same time."
35751 #: ../src/guestfs.pod:928
35753 "See the graphical program guestfs-browser for one possible architecture for "
35754 "multithreaded programs using libvirt and libguestfs."
35758 #: ../src/guestfs.pod:931
35763 #: ../src/guestfs.pod:933
35765 "Libguestfs needs a supermin appliance, which it finds by looking along an "
35770 #: ../src/guestfs.pod:936
35772 "By default it looks for these in the directory C<$libdir/guestfs> "
35773 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
35777 #: ../src/guestfs.pod:939
35779 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
35780 "to change the directories that libguestfs will search in. The value is a "
35781 "colon-separated list of paths. The current directory is I<not> searched "
35782 "unless the path contains an empty element or C<.>. For example "
35783 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
35784 "then C</usr/lib/guestfs>."
35788 #: ../src/guestfs.pod:946
35789 msgid "QEMU WRAPPERS"
35793 #: ../src/guestfs.pod:948
35795 "If you want to compile your own qemu, run qemu from a non-standard location, "
35796 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
35801 #: ../src/guestfs.pod:952
35803 "There is one important rule to remember: you I<must C<exec qemu>> as the "
35804 "last command in the shell script (so that qemu replaces the shell and "
35805 "becomes the direct child of the libguestfs-using program). If you don't do "
35806 "this, then the qemu process won't be cleaned up correctly."
35810 #: ../src/guestfs.pod:957
35812 "Here is an example of a wrapper, where I have built my own copy of qemu from "
35817 #: ../src/guestfs.pod:960
35821 " qemudir=/home/rjones/d/qemu\n"
35822 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
35828 #: ../src/guestfs.pod:964
35830 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
35831 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
35836 #: ../src/guestfs.pod:968
35839 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
35844 #: ../src/guestfs.pod:970
35846 "Note that libguestfs also calls qemu with the -help and -version options in "
35847 "order to determine features."
35851 #: ../src/guestfs.pod:973
35853 "Wrappers can also be used to edit the options passed to qemu. In the "
35854 "following example, the C<-machine ...> option (C<-machine> and the following "
35855 "argument) are removed from the command line and replaced with C<-machine "
35856 "pc,accel=tcg>. The while loop iterates over the options until it finds the "
35857 "right one to remove, putting the remaining options into the C<args> array."
35861 #: ../src/guestfs.pod:982
35865 " while [ $# -gt 0 ]; do\n"
35866 " case \"$1\" in\n"
35870 " args[i]=\"$1\"\n"
35879 #: ../src/guestfs.pod:994
35882 " exec qemu-kvm -machine pc,accel=tcg \"${args[@]}\"\n"
35887 #: ../src/guestfs.pod:996
35888 msgid "ATTACHING TO RUNNING DAEMONS"
35892 #: ../src/guestfs.pod:998
35894 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
35895 "babies. Use with caution."
35899 #: ../src/guestfs.pod:1001
35901 "I<Note (2):> This section explains how to attach to a running daemon from a "
35902 "low level perspective. For most users, simply using virt tools such as "
35903 "L<guestfish(1)> with the I<--live> option will \"just work\"."
35907 #: ../src/guestfs.pod:1005
35908 msgid "Using guestfs_set_attach_method"
35912 #: ../src/guestfs.pod:1007
35914 "By calling L</guestfs_set_attach_method> you can change how the library "
35915 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read "
35916 "L</ARCHITECTURE> for some background)."
35920 #: ../src/guestfs.pod:1011
35922 "The normal attach method is C<appliance>, where a small appliance is created "
35923 "containing the daemon, and then the library connects to this."
35927 #: ../src/guestfs.pod:1014
35929 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
35930 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
35931 "daemon over the Unix domain socket."
35935 #: ../src/guestfs.pod:1018
35937 "The normal use for this is to connect to a running virtual machine that "
35938 "contains a C<guestfsd> daemon, and send commands so you can read and write "
35939 "files inside the live virtual machine."
35943 #: ../src/guestfs.pod:1022
35944 msgid "Using guestfs_add_domain with live flag"
35948 #: ../src/guestfs.pod:1024
35950 "L</guestfs_add_domain> provides some help for getting the correct attach "
35951 "method. If you pass the C<live> option to this function, then (if the "
35952 "virtual machine is running) it will examine the libvirt XML looking for a "
35953 "virtio-serial channel to connect to:"
35957 #: ../src/guestfs.pod:1030
35964 " <channel type='unix'>\n"
35965 " <source mode='bind' path='/path/to/socket'/>\n"
35966 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
35975 #: ../src/guestfs.pod:1042
35977 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
35978 "method to C<unix:/path/to/socket>."
35982 #: ../src/guestfs.pod:1045
35984 "Some of the libguestfs tools (including guestfish) support a I<--live> "
35985 "option which is passed through to L</guestfs_add_domain> thus allowing you "
35986 "to attach to and modify live virtual machines."
35990 #: ../src/guestfs.pod:1049
35992 "The virtual machine needs to have been set up beforehand so that it has the "
35993 "virtio-serial channel and so that guestfsd is running inside it."
35997 #: ../src/guestfs.pod:1053
35998 msgid "ABI GUARANTEE"
36002 #: ../src/guestfs.pod:1055
36004 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
36005 "actions as outlined in this section. Although we will deprecate some "
36006 "actions, for example if they get replaced by newer calls, we will keep the "
36007 "old actions forever. This allows you the developer to program in confidence "
36008 "against the libguestfs API."
36012 #: ../src/guestfs.pod:1061
36013 msgid "BLOCK DEVICE NAMING"
36017 #: ../src/guestfs.pod:1063
36019 "In the kernel there is now quite a profusion of schemata for naming block "
36020 "devices (in this context, by I<block device> I mean a physical or virtual "
36021 "hard drive). The original Linux IDE driver used names starting with "
36022 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
36023 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
36024 "replacement for the old IDE driver (particularly for SATA devices) those "
36025 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
36026 "machines with paravirtualized drivers. This has created several different "
36027 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
36032 #: ../src/guestfs.pod:1075
36034 "As discussed above, libguestfs uses a qemu appliance running an embedded "
36035 "Linux kernel to access block devices. We can run a variety of appliances "
36036 "based on a variety of Linux kernels."
36040 #: ../src/guestfs.pod:1079
36042 "This causes a problem for libguestfs because many API calls use device or "
36043 "partition names. Working scripts and the recipe (example) scripts that we "
36044 "make available over the internet could fail if the naming scheme changes."
36048 #: ../src/guestfs.pod:1084
36050 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
36051 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
36052 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
36053 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
36057 #: ../src/guestfs.pod:1090
36059 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
36060 "L</guestfs_list_partitions> and similar calls return the true names of the "
36061 "devices and partitions as known to the appliance."
36065 #: ../src/guestfs.pod:1095
36066 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
36070 #: ../src/guestfs.pod:1097
36072 "Usually this translation is transparent. However in some (very rare) cases "
36073 "you may need to know the exact algorithm. Such cases include where you use "
36074 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
36075 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
36080 #: ../src/guestfs.pod:1103
36082 "The algorithm is applied only to I<parameters> which are known to be either "
36083 "device or partition names. Return values from functions such as "
36084 "L</guestfs_list_devices> are never changed."
36088 #: ../src/guestfs.pod:1111
36089 msgid "Is the string a parameter which is a device or partition name?"
36093 #: ../src/guestfs.pod:1115
36094 msgid "Does the string begin with C</dev/sd>?"
36098 #: ../src/guestfs.pod:1119
36100 "Does the named device exist? If so, we use that device. However if I<not> "
36101 "then we continue with this algorithm."
36105 #: ../src/guestfs.pod:1124
36106 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
36110 #: ../src/guestfs.pod:1126
36111 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
36115 #: ../src/guestfs.pod:1128
36116 msgid "If that named device exists, use it. If not, continue."
36120 #: ../src/guestfs.pod:1132
36121 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
36125 #: ../src/guestfs.pod:1134
36126 msgid "If that named device exists, use it. If not, return an error."
36130 #: ../src/guestfs.pod:1138
36131 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
36135 #: ../src/guestfs.pod:1140
36137 "Although the standard naming scheme and automatic translation is useful for "
36138 "simple programs and guestfish scripts, for larger programs it is best not to "
36139 "rely on this mechanism."
36143 #: ../src/guestfs.pod:1144
36145 "Where possible for maximum future portability programs using libguestfs "
36146 "should use these future-proof techniques:"
36150 #: ../src/guestfs.pod:1151
36152 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
36153 "device names, and then use those names directly."
36157 #: ../src/guestfs.pod:1154
36158 msgid "Since those device names exist by definition, they will never be translated."
36162 #: ../src/guestfs.pod:1159
36164 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
36165 "filesystem labels."
36169 #: ../src/guestfs.pod:1166
36171 "This section discusses security implications of using libguestfs, "
36172 "particularly with untrusted or malicious guests or disk images."
36176 #: ../src/guestfs.pod:1169
36177 msgid "GENERAL SECURITY CONSIDERATIONS"
36181 #: ../src/guestfs.pod:1171
36183 "Be careful with any files or data that you download from a guest (by "
36184 "\"download\" we mean not just the L</guestfs_download> command but any "
36185 "command that reads files, filenames, directories or anything else from a "
36186 "disk image). An attacker could manipulate the data to fool your program "
36187 "into doing the wrong thing. Consider cases such as:"
36191 #: ../src/guestfs.pod:1181
36192 msgid "the data (file etc) not being present"
36196 #: ../src/guestfs.pod:1185
36197 msgid "being present but empty"
36201 #: ../src/guestfs.pod:1189
36202 msgid "being much larger than normal"
36206 #: ../src/guestfs.pod:1193
36207 msgid "containing arbitrary 8 bit data"
36211 #: ../src/guestfs.pod:1197
36212 msgid "being in an unexpected character encoding"
36216 #: ../src/guestfs.pod:1201
36217 msgid "containing homoglyphs."
36221 #: ../src/guestfs.pod:1205
36222 msgid "SECURITY OF MOUNTING FILESYSTEMS"
36226 #: ../src/guestfs.pod:1207
36228 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
36229 "(VFS) module can sometimes be escalated into exploits by deliberately "
36230 "creating a malicious, malformed filesystem. These exploits are very severe "
36231 "for two reasons. Firstly there are very many filesystem drivers in the "
36232 "kernel, and many of them are infrequently used and not much developer "
36233 "attention has been paid to the code. Linux userspace helps potential "
36234 "crackers by detecting the filesystem type and automatically choosing the "
36235 "right VFS driver, even if that filesystem type is obscure or unexpected for "
36236 "the administrator. Secondly, a kernel-level exploit is like a local root "
36237 "exploit (worse in some ways), giving immediate and total access to the "
36238 "system right down to the hardware level."
36242 #: ../src/guestfs.pod:1220
36244 "That explains why you should never mount a filesystem from an untrusted "
36245 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
36246 "inside a qemu virtual machine, usually running as a non-root user. The "
36247 "attacker would need to write a filesystem which first exploited the kernel, "
36248 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
36249 "the libguestfs protocol, and finally to be as serious as the host kernel "
36250 "exploit it would need to escalate its privileges to root. This multi-step "
36251 "escalation, performed by a static piece of data, is thought to be extremely "
36252 "hard to do, although we never say 'never' about security issues."
36256 #: ../src/guestfs.pod:1231
36258 "In any case callers can reduce the attack surface by forcing the filesystem "
36259 "type when mounting (use L</guestfs_mount_vfs>)."
36263 #: ../src/guestfs.pod:1234
36264 msgid "PROTOCOL SECURITY"
36268 #: ../src/guestfs.pod:1236
36270 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
36271 "defined upper message size. However a program that uses libguestfs must "
36272 "also take care - for example you can write a program that downloads a binary "
36273 "from a disk image and executes it locally, and no amount of protocol "
36274 "security will save you from the consequences."
36278 #: ../src/guestfs.pod:1242
36279 msgid "INSPECTION SECURITY"
36283 #: ../src/guestfs.pod:1244
36285 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
36286 "directly from the guest, and these could contain any 8 bit data. Callers "
36287 "should be careful to escape these before printing them to a structured file "
36288 "(for example, use HTML escaping if creating a web page)."
36292 #: ../src/guestfs.pod:1250
36294 "Guest configuration may be altered in unusual ways by the administrator of "
36295 "the virtual machine, and may not reflect reality (particularly for untrusted "
36296 "or actively malicious guests). For example we parse the hostname from "
36297 "configuration files like C</etc/sysconfig/network> that we find in the "
36298 "guest, but the guest administrator can easily manipulate these files to "
36299 "provide the wrong hostname."
36303 #: ../src/guestfs.pod:1258
36305 "The inspection API parses guest configuration using two external libraries: "
36306 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
36307 "designed to be robust in the face of malicious data, although denial of "
36308 "service attacks are still possible, for example with oversized configuration "
36313 #: ../src/guestfs.pod:1264
36314 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
36318 #: ../src/guestfs.pod:1266
36320 "Be very cautious about running commands from the guest. By running a "
36321 "command in the guest, you are giving CPU time to a binary that you do not "
36322 "control, under the same user account as the library, albeit wrapped in qemu "
36323 "virtualization. More information and alternatives can be found in the "
36324 "section L</RUNNING COMMANDS>."
36328 #: ../src/guestfs.pod:1272
36329 msgid "CVE-2010-3851"
36333 #: ../src/guestfs.pod:1274
36334 msgid "https://bugzilla.redhat.com/642934"
36338 #: ../src/guestfs.pod:1276
36340 "This security bug concerns the automatic disk format detection that qemu "
36341 "does on disk images."
36345 #: ../src/guestfs.pod:1279
36347 "A raw disk image is just the raw bytes, there is no header. Other disk "
36348 "images like qcow2 contain a special header. Qemu deals with this by looking "
36349 "for one of the known headers, and if none is found then assuming the disk "
36350 "image must be raw."
36354 #: ../src/guestfs.pod:1284
36356 "This allows a guest which has been given a raw disk image to write some "
36357 "other header. At next boot (or when the disk image is accessed by "
36358 "libguestfs) qemu would do autodetection and think the disk image format was, "
36359 "say, qcow2 based on the header written by the guest."
36363 #: ../src/guestfs.pod:1289
36365 "This in itself would not be a problem, but qcow2 offers many features, one "
36366 "of which is to allow a disk image to refer to another image (called the "
36367 "\"backing disk\"). It does this by placing the path to the backing disk "
36368 "into the qcow2 header. This path is not validated and could point to any "
36369 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
36370 "\"holes\" in the qcow2 disk image, which of course is completely under the "
36371 "control of the attacker."
36375 #: ../src/guestfs.pod:1297
36376 msgid "In libguestfs this is rather hard to exploit except under two circumstances:"
36380 #: ../src/guestfs.pod:1304
36381 msgid "You have enabled the network or have opened the disk in write mode."
36385 #: ../src/guestfs.pod:1308
36387 "You are also running untrusted code from the guest (see L</RUNNING "
36392 #: ../src/guestfs.pod:1313
36394 "The way to avoid this is to specify the expected disk format when adding "
36395 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
36396 "should always do this if the disk is raw format, and it's a good idea for "
36401 #: ../src/guestfs.pod:1318
36403 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
36404 "format is fetched from libvirt and passed through."
36408 #: ../src/guestfs.pod:1321
36410 "For libguestfs tools, use the I<--format> command line parameter as "
36415 #: ../src/guestfs.pod:1324
36416 msgid "CONNECTION MANAGEMENT"
36420 #: ../src/guestfs.pod:1326
36421 msgid "guestfs_h *"
36425 #: ../src/guestfs.pod:1328
36427 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
36428 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
36429 "handle and release all resources used."
36433 #: ../src/guestfs.pod:1332
36435 "For information on using multiple handles and threads, see the section "
36436 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> above."
36440 #: ../src/guestfs.pod:1335
36441 msgid "guestfs_create"
36445 #: ../src/guestfs.pod:1337
36448 " guestfs_h *guestfs_create (void);\n"
36453 #: ../src/guestfs.pod:1339
36454 msgid "Create a connection handle."
36458 #: ../src/guestfs.pod:1341
36460 "On success this returns a non-NULL pointer to a handle. On error it returns "
36465 #: ../src/guestfs.pod:1344
36467 "You have to \"configure\" the handle after creating it. This includes "
36468 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
36469 "handle at least once."
36473 #: ../src/guestfs.pod:1348
36474 msgid "After configuring the handle, you have to call L</guestfs_launch>."
36478 #: ../src/guestfs.pod:1350
36480 "You may also want to configure error handling for the handle. See the "
36481 "L</ERROR HANDLING> section below."
36485 #: ../src/guestfs.pod:1353
36486 msgid "guestfs_close"
36490 #: ../src/guestfs.pod:1355
36493 " void guestfs_close (guestfs_h *g);\n"
36498 #: ../src/guestfs.pod:1357
36499 msgid "This closes the connection handle and frees up all resources used."
36503 #: ../src/guestfs.pod:1359
36505 "If autosync was set on the handle and the handle was launched, then this "
36506 "implicitly calls various functions to unmount filesystems and sync the "
36507 "disk. See L</guestfs_set_autosync> for more details."
36511 #: ../src/guestfs.pod:1363
36512 msgid "If a close callback was set on the handle, then it is called."
36516 #: ../src/guestfs.pod:1365
36517 msgid "ERROR HANDLING"
36521 #: ../src/guestfs.pod:1367
36523 "API functions can return errors. For example, almost all functions that "
36524 "return C<int> will return C<-1> to indicate an error."
36528 #: ../src/guestfs.pod:1370
36530 "Additional information is available for errors: an error message string and "
36531 "optionally an error number (errno) if the thing that failed was a system "
36536 #: ../src/guestfs.pod:1374
36538 "You can get at the additional information about the last error on the handle "
36539 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
36540 "up an error handler with L</guestfs_set_error_handler>."
36544 #: ../src/guestfs.pod:1379
36546 "When the handle is created, a default error handler is installed which "
36547 "prints the error message string to C<stderr>. For small short-running "
36548 "command line programs it is sufficient to do:"
36552 #: ../src/guestfs.pod:1383
36555 " if (guestfs_launch (g) == -1)\n"
36556 " exit (EXIT_FAILURE);\n"
36561 #: ../src/guestfs.pod:1386
36563 "since the default error handler will ensure that an error message has been "
36564 "printed to C<stderr> before the program exits."
36568 #: ../src/guestfs.pod:1389
36570 "For other programs the caller will almost certainly want to install an "
36571 "alternate error handler or do error handling in-line like this:"
36575 #: ../src/guestfs.pod:1392
36578 " /* This disables the default behaviour of printing errors\n"
36580 " guestfs_set_error_handler (g, NULL, NULL);\n"
36585 #: ../src/guestfs.pod:1396
36588 " if (guestfs_launch (g) == -1) {\n"
36589 " /* Examine the error message and print it etc. */\n"
36590 " char *msg = guestfs_last_error (g);\n"
36591 " int errnum = guestfs_last_errno (g);\n"
36592 " fprintf (stderr, \"%s\", msg);\n"
36593 " if (errnum != 0)\n"
36594 " fprintf (stderr, \": %s\", strerror (errnum));\n"
36595 " fprintf (stderr, \"\\n\");\n"
36602 #: ../src/guestfs.pod:1407
36604 "Out of memory errors are handled differently. The default action is to call "
36605 "L<abort(3)>. If this is undesirable, then you can set a handler using "
36606 "L</guestfs_set_out_of_memory_handler>."
36610 #: ../src/guestfs.pod:1411
36612 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
36613 "because there is no handle if this happens there is no way to get additional "
36614 "error information. However L</guestfs_create> is supposed to be a "
36615 "lightweight operation which can only fail because of insufficient memory (it "
36616 "returns NULL in this case)."
36620 #: ../src/guestfs.pod:1417
36621 msgid "guestfs_last_error"
36625 #: ../src/guestfs.pod:1419
36628 " const char *guestfs_last_error (guestfs_h *g);\n"
36633 #: ../src/guestfs.pod:1421
36635 "This returns the last error message that happened on C<g>. If there has not "
36636 "been an error since the handle was created, then this returns C<NULL>."
36640 #: ../src/guestfs.pod:1425
36642 "The lifetime of the returned string is until the next error occurs, or "
36643 "L</guestfs_close> is called."
36647 #: ../src/guestfs.pod:1428
36648 msgid "guestfs_last_errno"
36652 #: ../src/guestfs.pod:1430
36655 " int guestfs_last_errno (guestfs_h *g);\n"
36660 #: ../src/guestfs.pod:1432
36661 msgid "This returns the last error number (errno) that happened on C<g>."
36665 #: ../src/guestfs.pod:1434
36666 msgid "If successful, an errno integer not equal to zero is returned."
36670 #: ../src/guestfs.pod:1436
36671 msgid "If no error, this returns 0. This call can return 0 in three situations:"
36675 #: ../src/guestfs.pod:1443
36676 msgid "There has not been any error on the handle."
36680 #: ../src/guestfs.pod:1447
36682 "There has been an error but the errno was meaningless. This corresponds to "
36683 "the case where the error did not come from a failed system call, but for "
36684 "some other reason."
36688 #: ../src/guestfs.pod:1453
36690 "There was an error from a failed system call, but for some reason the errno "
36691 "was not captured and returned. This usually indicates a bug in libguestfs."
36695 #: ../src/guestfs.pod:1459
36697 "Libguestfs tries to convert the errno from inside the applicance into a "
36698 "corresponding errno for the caller (not entirely trivial: the appliance "
36699 "might be running a completely different operating system from the library "
36700 "and error numbers are not standardized across Un*xen). If this could not be "
36701 "done, then the error is translated to C<EINVAL>. In practice this should "
36702 "only happen in very rare circumstances."
36706 #: ../src/guestfs.pod:1467
36707 msgid "guestfs_set_error_handler"
36711 #: ../src/guestfs.pod:1469
36714 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
36716 " const char *msg);\n"
36717 " void guestfs_set_error_handler (guestfs_h *g,\n"
36718 " guestfs_error_handler_cb cb,\n"
36719 " void *opaque);\n"
36724 #: ../src/guestfs.pod:1476
36726 "The callback C<cb> will be called if there is an error. The parameters "
36727 "passed to the callback are an opaque data pointer and the error message "
36732 #: ../src/guestfs.pod:1480
36734 "C<errno> is not passed to the callback. To get that the callback must call "
36735 "L</guestfs_last_errno>."
36739 #: ../src/guestfs.pod:1483
36741 "Note that the message string C<msg> is freed as soon as the callback "
36742 "function returns, so if you want to stash it somewhere you must make your "
36747 #: ../src/guestfs.pod:1487
36748 msgid "The default handler prints messages on C<stderr>."
36752 #: ../src/guestfs.pod:1489
36753 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
36757 #: ../src/guestfs.pod:1491
36758 msgid "guestfs_get_error_handler"
36762 #: ../src/guestfs.pod:1493
36765 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
36766 " void **opaque_rtn);\n"
36771 #: ../src/guestfs.pod:1496
36772 msgid "Returns the current error handler callback."
36776 #: ../src/guestfs.pod:1498
36777 msgid "guestfs_set_out_of_memory_handler"
36781 #: ../src/guestfs.pod:1500
36784 " typedef void (*guestfs_abort_cb) (void);\n"
36785 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
36786 " guestfs_abort_cb);\n"
36791 #: ../src/guestfs.pod:1504
36793 "The callback C<cb> will be called if there is an out of memory situation. "
36794 "I<Note this callback must not return>."
36798 #: ../src/guestfs.pod:1507
36799 msgid "The default is to call L<abort(3)>."
36803 #: ../src/guestfs.pod:1509
36804 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
36808 #: ../src/guestfs.pod:1512
36809 msgid "guestfs_get_out_of_memory_handler"
36813 #: ../src/guestfs.pod:1514
36816 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
36821 #: ../src/guestfs.pod:1516
36822 msgid "This returns the current out of memory handler."
36826 #: ../src/guestfs.pod:1518
36831 #: ../src/guestfs.pod:1522
36836 #: ../src/guestfs.pod:1524
36841 #: ../src/guestfs.pod:1526
36842 msgid "AVAILABILITY"
36846 #: ../src/guestfs.pod:1528
36847 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
36851 #: ../src/guestfs.pod:1530
36853 "Using L</guestfs_available> you can test availability of the following "
36854 "groups of functions. This test queries the appliance to see if the "
36855 "appliance you are currently using supports the functionality."
36859 #: ../src/guestfs.pod:1535
36860 msgid "@AVAILABILITY@"
36864 #: ../src/guestfs.pod:1537
36865 msgid "GUESTFISH supported COMMAND"
36869 #: ../src/guestfs.pod:1539
36871 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
36872 "prints out the available groups and whether they are supported by this build "
36873 "of libguestfs. Note however that you have to do C<run> first."
36877 #: ../src/guestfs.pod:1544
36878 msgid "SINGLE CALLS AT COMPILE TIME"
36882 #: ../src/guestfs.pod:1546
36884 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
36885 "function, such as:"
36889 #: ../src/guestfs.pod:1549
36892 " #define LIBGUESTFS_HAVE_DD 1\n"
36897 #: ../src/guestfs.pod:1551
36898 msgid "if L</guestfs_dd> is available."
36902 #: ../src/guestfs.pod:1553
36904 "Before version 1.5.8, if you needed to test whether a single libguestfs "
36905 "function is available at compile time, we recommended using build tools such "
36906 "as autoconf or cmake. For example in autotools you could use:"
36910 #: ../src/guestfs.pod:1558
36913 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
36914 " AC_CHECK_FUNCS([guestfs_dd])\n"
36919 #: ../src/guestfs.pod:1561
36921 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
36926 #: ../src/guestfs.pod:1564
36927 msgid "SINGLE CALLS AT RUN TIME"
36931 #: ../src/guestfs.pod:1566
36933 "Testing at compile time doesn't guarantee that a function really exists in "
36934 "the library. The reason is that you might be dynamically linked against a "
36935 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
36936 "This situation unfortunately results in a segmentation fault, which is a "
36937 "shortcoming of the C dynamic linking system itself."
36941 #: ../src/guestfs.pod:1573
36943 "You can use L<dlopen(3)> to test if a function is available at run time, as "
36944 "in this example program (note that you still need the compile time check as "
36949 #: ../src/guestfs.pod:1577
36952 " #include <stdio.h>\n"
36953 " #include <stdlib.h>\n"
36954 " #include <unistd.h>\n"
36955 " #include <dlfcn.h>\n"
36956 " #include <guestfs.h>\n"
36961 #: ../src/guestfs.pod:1583
36966 " #ifdef LIBGUESTFS_HAVE_DD\n"
36968 " int has_function;\n"
36973 #: ../src/guestfs.pod:1589
36976 " /* Test if the function guestfs_dd is really available. */\n"
36977 " dl = dlopen (NULL, RTLD_LAZY);\n"
36979 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
36980 " exit (EXIT_FAILURE);\n"
36982 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
36988 #: ../src/guestfs.pod:1598
36991 " if (!has_function)\n"
36992 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
36994 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
36995 " /* Now it's safe to call\n"
36996 " guestfs_dd (g, \"foo\", \"bar\");\n"
37000 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
37007 #: ../src/guestfs.pod:1611
37009 "You may think the above is an awful lot of hassle, and it is. There are "
37010 "other ways outside of the C linking system to ensure that this kind of "
37011 "incompatibility never arises, such as using package versioning:"
37015 #: ../src/guestfs.pod:1616
37018 " Requires: libguestfs >= 1.0.80\n"
37023 #: ../src/guestfs.pod:1618
37024 msgid "CALLS WITH OPTIONAL ARGUMENTS"
37028 #: ../src/guestfs.pod:1620
37030 "A recent feature of the API is the introduction of calls which take optional "
37031 "arguments. In C these are declared 3 ways. The main way is as a call which "
37032 "takes variable arguments (ie. C<...>), as in this example:"
37036 #: ../src/guestfs.pod:1625
37039 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
37044 #: ../src/guestfs.pod:1627
37046 "Call this with a list of optional arguments, terminated by C<-1>. So to "
37047 "call with no optional arguments specified:"
37051 #: ../src/guestfs.pod:1630
37054 " guestfs_add_drive_opts (g, filename, -1);\n"
37059 #: ../src/guestfs.pod:1632
37060 msgid "With a single optional argument:"
37064 #: ../src/guestfs.pod:1634
37067 " guestfs_add_drive_opts (g, filename,\n"
37068 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37074 #: ../src/guestfs.pod:1638
37079 #: ../src/guestfs.pod:1640
37082 " guestfs_add_drive_opts (g, filename,\n"
37083 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37084 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
37090 #: ../src/guestfs.pod:1645
37092 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
37097 #: ../src/guestfs.pod:1648
37098 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
37102 #: ../src/guestfs.pod:1650
37104 "The second variant has the same name with the suffix C<_va>, which works the "
37105 "same way but takes a C<va_list>. See the C manual for details. For the "
37106 "example function, this is declared:"
37110 #: ../src/guestfs.pod:1654
37113 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
37114 " va_list args);\n"
37119 #: ../src/guestfs.pod:1657
37120 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
37124 #: ../src/guestfs.pod:1659
37126 "The third variant is useful where you need to construct these calls. You "
37127 "pass in a structure where you fill in the optional fields. The structure "
37128 "has a bitmask as the first element which you must set to indicate which "
37129 "fields you have filled in. For our example function the structure and call "
37134 #: ../src/guestfs.pod:1665
37137 " struct guestfs_add_drive_opts_argv {\n"
37138 " uint64_t bitmask;\n"
37140 " const char *format;\n"
37143 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
37144 " const struct guestfs_add_drive_opts_argv *optargs);\n"
37149 #: ../src/guestfs.pod:1674
37150 msgid "You could call it like this:"
37154 #: ../src/guestfs.pod:1676
37157 " struct guestfs_add_drive_opts_argv optargs = {\n"
37158 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
37159 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
37160 " .readonly = 1,\n"
37161 " .format = \"qcow2\"\n"
37167 #: ../src/guestfs.pod:1683
37170 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
37175 #: ../src/guestfs.pod:1691
37176 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
37180 #: ../src/guestfs.pod:1696
37181 msgid "You do not need to fill in all fields of the structure."
37185 #: ../src/guestfs.pod:1700
37187 "There must be a one-to-one correspondence between fields of the structure "
37188 "that are filled in, and bits set in the bitmask."
37192 #: ../src/guestfs.pod:1705
37193 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
37197 #: ../src/guestfs.pod:1707
37199 "In other languages, optional arguments are expressed in the way that is "
37200 "natural for that language. We refer you to the language-specific "
37201 "documentation for more details on that."
37205 #: ../src/guestfs.pod:1711
37206 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
37210 #: ../src/guestfs.pod:1713
37211 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
37215 #: ../src/guestfs.pod:1715
37217 "B<Note:> This section documents the generic event mechanism introduced in "
37218 "libguestfs 1.10, which you should use in new code if possible. The old "
37219 "functions C<guestfs_set_log_message_callback>, "
37220 "C<guestfs_set_subprocess_quit_callback>, "
37221 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
37222 "C<guestfs_set_progress_callback> are no longer documented in this manual "
37223 "page. Because of the ABI guarantee, the old functions continue to work."
37227 #: ../src/guestfs.pod:1724
37229 "Handles generate events when certain things happen, such as log messages "
37230 "being generated, progress messages during long-running operations, or the "
37231 "handle being closed. The API calls described below let you register a "
37232 "callback to be called when events happen. You can register multiple "
37233 "callbacks (for the same, different or overlapping sets of events), and "
37234 "individually remove callbacks. If callbacks are not removed, then they "
37235 "remain in force until the handle is closed."
37239 #: ../src/guestfs.pod:1732
37241 "In the current implementation, events are only generated synchronously: that "
37242 "means that events (and hence callbacks) can only happen while you are in the "
37243 "middle of making another libguestfs call. The callback is called in the "
37248 #: ../src/guestfs.pod:1737
37250 "Events may contain a payload, usually nothing (void), an array of 64 bit "
37251 "unsigned integers, or a message buffer. Payloads are discussed later on."
37255 #: ../src/guestfs.pod:1741
37256 msgid "CLASSES OF EVENTS"
37260 #: ../src/guestfs.pod:1745
37261 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
37265 #: ../src/guestfs.pod:1748
37267 "The callback function will be called while the handle is being closed "
37268 "(synchronously from L</guestfs_close>)."
37272 #: ../src/guestfs.pod:1751
37274 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
37275 "handles that are open when the program exits. This means that this callback "
37276 "might be called indirectly from L<exit(3)>, which can cause unexpected "
37277 "problems in higher-level languages (eg. if your HLL interpreter has already "
37278 "been cleaned up by the time this is called, and if your callback then jumps "
37279 "into some HLL function)."
37283 #: ../src/guestfs.pod:1758
37285 "If no callback is registered: the handle is closed without any callback "
37290 #: ../src/guestfs.pod:1761
37291 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
37295 #: ../src/guestfs.pod:1764
37297 "The callback function will be called when the child process quits, either "
37298 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
37299 "corresponds to a transition from any state to the CONFIG state)."
37303 #: ../src/guestfs.pod:1768 ../src/guestfs.pod:1777 ../src/guestfs.pod:1894
37304 msgid "If no callback is registered: the event is ignored."
37308 #: ../src/guestfs.pod:1770
37309 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
37313 #: ../src/guestfs.pod:1773
37315 "The callback function will be called when the child process becomes ready "
37316 "first time after it has been launched. (This corresponds to a transition "
37317 "from LAUNCHING to the READY state)."
37321 #: ../src/guestfs.pod:1779
37322 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
37326 #: ../src/guestfs.pod:1782
37328 "Some long-running operations can generate progress messages. If this "
37329 "callback is registered, then it will be called each time a progress message "
37330 "is generated (usually two seconds after the operation started, and three "
37331 "times per second thereafter until it completes, although the frequency may "
37332 "change in future versions)."
37336 #: ../src/guestfs.pod:1788
37338 "The callback receives in the payload four unsigned 64 bit numbers which are "
37339 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
37343 #: ../src/guestfs.pod:1791
37345 "The units of C<total> are not defined, although for some operations C<total> "
37346 "may relate in some way to the amount of data to be transferred (eg. in bytes "
37347 "or megabytes), and C<position> may be the portion which has been "
37352 #: ../src/guestfs.pod:1796
37353 msgid "The only defined and stable parts of the API are:"
37357 #: ../src/guestfs.pod:1802
37359 "The callback can display to the user some type of progress bar or indicator "
37360 "which shows the ratio of C<position>:C<total>."
37364 #: ../src/guestfs.pod:1807
37365 msgid "0 E<lt>= C<position> E<lt>= C<total>"
37369 #: ../src/guestfs.pod:1811
37371 "If any progress notification is sent during a call, then a final progress "
37372 "notification is always sent when C<position> = C<total> (I<unless> the call "
37373 "fails with an error)."
37377 #: ../src/guestfs.pod:1815
37379 "This is to simplify caller code, so callers can easily set the progress "
37380 "indicator to \"100%\" at the end of the operation, without requiring special "
37381 "code to detect this case."
37385 #: ../src/guestfs.pod:1821
37387 "For some calls we are unable to estimate the progress of the call, but we "
37388 "can still generate progress messages to indicate activity. This is known as "
37389 "\"pulse mode\", and is directly supported by certain progress bar "
37390 "implementations (eg. GtkProgressBar)."
37394 #: ../src/guestfs.pod:1826
37396 "For these calls, zero or more progress messages are generated with "
37397 "C<position = 0> and C<total = 1>, followed by a final message with "
37398 "C<position = total = 1>."
37402 #: ../src/guestfs.pod:1830
37404 "As noted above, if the call fails with an error then the final message may "
37405 "not be generated."
37409 #: ../src/guestfs.pod:1835
37411 "The callback also receives the procedure number (C<proc_nr>) and serial "
37412 "number (C<serial>) of the call. These are only useful for debugging "
37413 "protocol issues, and the callback can normally ignore them. The callback "
37414 "may want to print these numbers in error messages or debugging messages."
37418 #: ../src/guestfs.pod:1841
37419 msgid "If no callback is registered: progress messages are discarded."
37423 #: ../src/guestfs.pod:1843
37424 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
37428 #: ../src/guestfs.pod:1846
37430 "The callback function is called whenever a log message is generated by qemu, "
37431 "the appliance kernel, guestfsd (daemon), or utility programs."
37435 #: ../src/guestfs.pod:1849
37437 "If the verbose flag (L</guestfs_set_verbose>) is set before launch "
37438 "(L</guestfs_launch>) then additional debug messages are generated."
37442 #: ../src/guestfs.pod:1852 ../src/guestfs.pod:1866
37444 "If no callback is registered: the messages are discarded unless the verbose "
37445 "flag is set in which case they are sent to stderr. You can override the "
37446 "printing of verbose messages to stderr by setting up a callback."
37450 #: ../src/guestfs.pod:1857
37451 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
37455 #: ../src/guestfs.pod:1860
37457 "The callback function is called whenever a log message is generated by the "
37458 "library part of libguestfs."
37462 #: ../src/guestfs.pod:1863
37464 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
37465 "messages are generated."
37469 #: ../src/guestfs.pod:1871
37470 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
37474 #: ../src/guestfs.pod:1874
37476 "The callback function is called whenever a trace message is generated. This "
37477 "only applies if the trace flag (L</guestfs_set_trace>) is set."
37481 #: ../src/guestfs.pod:1877
37483 "If no callback is registered: the messages are sent to stderr. You can "
37484 "override the printing of trace messages to stderr by setting up a callback."
37488 #: ../src/guestfs.pod:1881
37489 msgid "GUESTFS_EVENT_ENTER (payload type: function name)"
37493 #: ../src/guestfs.pod:1884
37494 msgid "The callback function is called whenever a libguestfs function is entered."
37498 #: ../src/guestfs.pod:1887
37500 "The payload is a string which contains the name of the function that we are "
37501 "entering (not including C<guestfs_> prefix)."
37505 #: ../src/guestfs.pod:1890
37507 "Note that libguestfs functions can call themselves, so you may see many "
37508 "events from a single call. A few libguestfs functions do not generate this "
37513 #: ../src/guestfs.pod:1898
37514 msgid "guestfs_set_event_callback"
37518 #: ../src/guestfs.pod:1900
37521 " int guestfs_set_event_callback (guestfs_h *g,\n"
37522 " guestfs_event_callback cb,\n"
37523 " uint64_t event_bitmask,\n"
37525 " void *opaque);\n"
37530 #: ../src/guestfs.pod:1906
37532 "This function registers a callback (C<cb>) for all event classes in the "
37533 "C<event_bitmask>."
37537 #: ../src/guestfs.pod:1909
37539 "For example, to register for all log message events, you could call this "
37540 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
37541 "To register a single callback for all possible classes of events, use "
37542 "C<GUESTFS_EVENT_ALL>."
37546 #: ../src/guestfs.pod:1915
37547 msgid "C<flags> should always be passed as 0."
37551 #: ../src/guestfs.pod:1917
37553 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
37554 "it for any purpose."
37558 #: ../src/guestfs.pod:1920
37560 "The return value is the event handle (an integer) which you can use to "
37561 "delete the callback (see below)."
37565 #: ../src/guestfs.pod:1923
37567 "If there is an error, this function returns C<-1>, and sets the error in the "
37568 "handle in the usual way (see L</guestfs_last_error> etc.)"
37572 #: ../src/guestfs.pod:1926
37574 "Callbacks remain in effect until they are deleted, or until the handle is "
37579 #: ../src/guestfs.pod:1929
37581 "In the case where multiple callbacks are registered for a particular event "
37582 "class, all of the callbacks are called. The order in which multiple "
37583 "callbacks are called is not defined."
37587 #: ../src/guestfs.pod:1933
37588 msgid "guestfs_delete_event_callback"
37592 #: ../src/guestfs.pod:1935
37595 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
37600 #: ../src/guestfs.pod:1937
37602 "Delete a callback that was previously registered. C<event_handle> should be "
37603 "the integer that was returned by a previous call to "
37604 "C<guestfs_set_event_callback> on the same handle."
37608 #: ../src/guestfs.pod:1941
37609 msgid "guestfs_event_callback"
37613 #: ../src/guestfs.pod:1943
37616 " typedef void (*guestfs_event_callback) (\n"
37619 " uint64_t event,\n"
37620 " int event_handle,\n"
37622 " const char *buf, size_t buf_len,\n"
37623 " const uint64_t *array, size_t array_len);\n"
37628 #: ../src/guestfs.pod:1952
37629 msgid "This is the type of the event callback function that you have to provide."
37633 #: ../src/guestfs.pod:1955
37635 "The basic parameters are: the handle (C<g>), the opaque user pointer "
37636 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
37637 "handle, and C<flags> which in the current API you should ignore."
37641 #: ../src/guestfs.pod:1959
37643 "The remaining parameters contain the event payload (if any). Each event may "
37644 "contain a payload, which usually relates to the event class, but for future "
37645 "proofing your code should be written to handle any payload for any event "
37650 #: ../src/guestfs.pod:1964
37652 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
37653 "there is no message buffer). Note that this message buffer can contain "
37654 "arbitrary 8 bit data, including NUL bytes."
37658 #: ../src/guestfs.pod:1968
37660 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
37661 "moment this is only used for progress messages."
37665 #: ../src/guestfs.pod:1971
37666 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
37670 #: ../src/guestfs.pod:1973
37672 "One motivation for the generic event API was to allow GUI programs to "
37673 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
37674 "unconditionally to C<stderr>."
37678 #: ../src/guestfs.pod:1977
37680 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
37681 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
37682 "messages are not events; you must capture error messages separately)."
37686 #: ../src/guestfs.pod:1982
37688 "Programs have to set up a callback to capture the classes of events of "
37693 #: ../src/guestfs.pod:1985
37697 " guestfs_set_event_callback\n"
37698 " (g, message_callback,\n"
37699 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
37700 " GUESTFS_EVENT_TRACE,\n"
37701 " 0, NULL) == -1)\n"
37702 " if (eh == -1) {\n"
37703 " // handle error in the usual way\n"
37709 #: ../src/guestfs.pod:1995
37711 "The callback can then direct messages to the appropriate place. In this "
37712 "example, messages are directed to syslog:"
37716 #: ../src/guestfs.pod:1998
37720 " message_callback (\n"
37723 " uint64_t event,\n"
37724 " int event_handle,\n"
37726 " const char *buf, size_t buf_len,\n"
37727 " const uint64_t *array, size_t array_len)\n"
37729 " const int priority = LOG_USER|LOG_INFO;\n"
37730 " if (buf_len > 0)\n"
37731 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
37737 #: ../src/guestfs.pod:2013
37738 msgid "CANCELLING LONG TRANSFERS"
37742 #: ../src/guestfs.pod:2015
37744 "Some operations can be cancelled by the caller while they are in progress. "
37745 "Currently only operations that involve uploading or downloading data can be "
37746 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
37747 "parameters in the generator)."
37751 #: ../src/guestfs.pod:2020
37752 msgid "guestfs_user_cancel"
37756 #: ../src/guestfs.pod:2022
37759 " void guestfs_user_cancel (guestfs_h *g);\n"
37764 #: ../src/guestfs.pod:2024
37765 msgid "C<guestfs_user_cancel> cancels the current upload or download operation."
37769 #: ../src/guestfs.pod:2027
37771 "Unlike most other libguestfs calls, this function is signal safe and thread "
37772 "safe. You can call it from a signal handler or from another thread, without "
37773 "needing to do any locking."
37777 #: ../src/guestfs.pod:2031
37779 "The transfer that was in progress (if there is one) will stop shortly "
37780 "afterwards, and will return an error. The errno (see "
37781 "L</guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find "
37782 "out if the operation was cancelled or failed because of another error."
37786 #: ../src/guestfs.pod:2037
37788 "No cleanup is performed: for example, if a file was being uploaded then "
37789 "after cancellation there may be a partially uploaded file. It is the "
37790 "caller's responsibility to clean up if necessary."
37794 #: ../src/guestfs.pod:2041
37795 msgid "There are two common places that you might call C<guestfs_user_cancel>."
37799 #: ../src/guestfs.pod:2043
37801 "In an interactive text-based program, you might call it from a C<SIGINT> "
37802 "signal handler so that pressing C<^C> cancels the current operation. (You "
37803 "also need to call L</guestfs_set_pgroup> so that child processes don't "
37804 "receive the C<^C> signal)."
37808 #: ../src/guestfs.pod:2048
37810 "In a graphical program, when the main thread is displaying a progress bar "
37811 "with a cancel button, wire up the cancel button to call this function."
37815 #: ../src/guestfs.pod:2052
37816 msgid "PRIVATE DATA AREA"
37820 #: ../src/guestfs.pod:2054
37822 "You can attach named pieces of private data to the libguestfs handle, fetch "
37823 "them by name, and walk over them, for the lifetime of the handle. This is "
37824 "called the private data area and is only available from the C API."
37828 #: ../src/guestfs.pod:2059
37829 msgid "To attach a named piece of data, use the following call:"
37833 #: ../src/guestfs.pod:2061
37836 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
37841 #: ../src/guestfs.pod:2063
37843 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
37844 "pointer (which can be C<NULL>). Any previous item with the same key is "
37849 #: ../src/guestfs.pod:2067
37851 "You can use any C<key> you want, but your key should I<not> start with an "
37852 "underscore character. Keys beginning with an underscore character are "
37853 "reserved for internal libguestfs purposes (eg. for implementing language "
37854 "bindings). It is recommended that you prefix the key with some unique "
37855 "string to avoid collisions with other users."
37859 #: ../src/guestfs.pod:2073
37860 msgid "To retrieve the pointer, use:"
37864 #: ../src/guestfs.pod:2075
37867 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
37872 #: ../src/guestfs.pod:2077
37874 "This function returns C<NULL> if either no data is found associated with "
37875 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
37880 #: ../src/guestfs.pod:2081
37882 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
37883 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
37884 "all. In particular, libguestfs does I<not> try to free the data when the "
37885 "handle is closed. If the data must be freed, then the caller must either "
37886 "free it before calling L</guestfs_close> or must set up a close callback to "
37887 "do it (see L</GUESTFS_EVENT_CLOSE>)."
37891 #: ../src/guestfs.pod:2088
37892 msgid "To walk over all entries, use these two functions:"
37896 #: ../src/guestfs.pod:2090
37899 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
37904 #: ../src/guestfs.pod:2092
37907 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
37912 #: ../src/guestfs.pod:2094
37914 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
37915 "not have any particular meaning -- keys are not returned in any defined "
37916 "order). A pointer to the key is returned in C<*key_rtn> and the "
37917 "corresponding data pointer is returned from the function. C<NULL> is "
37918 "returned if there are no keys stored in the handle."
37922 #: ../src/guestfs.pod:2100
37924 "C<guestfs_next_private> returns the next key, pointer pair. The return "
37925 "value of this function is also C<NULL> is there are no further entries to "
37930 #: ../src/guestfs.pod:2104
37931 msgid "Notes about walking over entries:"
37935 #: ../src/guestfs.pod:2110
37936 msgid "You must not call C<guestfs_set_private> while walking over the entries."
37940 #: ../src/guestfs.pod:2115
37942 "The handle maintains an internal iterator which is reset when you call "
37943 "C<guestfs_first_private>. This internal iterator is invalidated when you "
37944 "call C<guestfs_set_private>."
37948 #: ../src/guestfs.pod:2121
37949 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
37953 #: ../src/guestfs.pod:2123
37956 " guestfs_set_private (g, key, NULL);\n"
37961 #: ../src/guestfs.pod:2125
37962 msgid "then that C<key> is not returned when walking."
37966 #: ../src/guestfs.pod:2129
37968 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
37969 "C<guestfs_next_private> or C<guestfs_set_private>."
37973 #: ../src/guestfs.pod:2135
37975 "The following example code shows how to print all keys and data pointers "
37976 "that are associated with the handle C<g>:"
37980 #: ../src/guestfs.pod:2138
37983 " const char *key;\n"
37984 " void *data = guestfs_first_private (g, &key);\n"
37985 " while (data != NULL)\n"
37987 " printf (\"key = %s, data = %p\\n\", key, data);\n"
37988 " data = guestfs_next_private (g, &key);\n"
37994 #: ../src/guestfs.pod:2146
37996 "More commonly you are only interested in keys that begin with an "
37997 "application-specific prefix C<foo_>. Modify the loop like so:"
38001 #: ../src/guestfs.pod:2149
38004 " const char *key;\n"
38005 " void *data = guestfs_first_private (g, &key);\n"
38006 " while (data != NULL)\n"
38008 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38009 " printf (\"key = %s, data = %p\\n\", key, data);\n"
38010 " data = guestfs_next_private (g, &key);\n"
38016 #: ../src/guestfs.pod:2158
38018 "If you need to modify keys while walking, then you have to jump back to the "
38019 "beginning of the loop. For example, to delete all keys prefixed with "
38024 #: ../src/guestfs.pod:2162
38027 " const char *key;\n"
38030 " data = guestfs_first_private (g, &key);\n"
38031 " while (data != NULL)\n"
38033 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38035 " guestfs_set_private (g, key, NULL);\n"
38036 " /* note that 'key' pointer is now invalid, and so is\n"
38037 " the internal iterator */\n"
38040 " data = guestfs_next_private (g, &key);\n"
38046 #: ../src/guestfs.pod:2178
38048 "Note that the above loop is guaranteed to terminate because the keys are "
38049 "being deleted, but other manipulations of keys within the loop might not "
38050 "terminate unless you also maintain an indication of which keys have been "
38055 #: ../src/guestfs.pod:2183
38060 #: ../src/guestfs.pod:2185
38062 "The libguestfs C library can be probed using systemtap or DTrace. This is "
38063 "true of any library, not just libguestfs. However libguestfs also contains "
38064 "static markers to help in probing internal operations."
38068 #: ../src/guestfs.pod:2189
38069 msgid "You can list all the static markers by doing:"
38073 #: ../src/guestfs.pod:2191
38076 " stap -l 'process(\"/usr/lib*/libguestfs.so.0\")\n"
38077 " .provider(\"guestfs\").mark(\"*\")'\n"
38082 #: ../src/guestfs.pod:2194
38084 "B<Note:> These static markers are I<not> part of the stable API and may "
38085 "change in future versions."
38089 #: ../src/guestfs.pod:2197
38090 msgid "SYSTEMTAP SCRIPT EXAMPLE"
38094 #: ../src/guestfs.pod:2199
38096 "This script contains examples of displaying both the static markers and some "
38097 "ordinary C entry points:"
38101 #: ../src/guestfs.pod:2202
38109 #: ../src/guestfs.pod:2204
38112 " function display_time () {\n"
38113 " now = gettimeofday_us ();\n"
38116 " delta = now - last;\n"
38122 #: ../src/guestfs.pod:2211
38125 " printf (\"%d (+%d):\", now, delta);\n"
38131 #: ../src/guestfs.pod:2214
38136 " printf (\"ready\\n\");\n"
38142 #: ../src/guestfs.pod:2219
38145 " /* Display all calls to static markers. */\n"
38146 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38147 " .provider(\"guestfs\").mark(\"*\") ? {\n"
38148 " display_time();\n"
38149 " printf (\"\\t%s %s\\n\", $$name, $$parms);\n"
38155 #: ../src/guestfs.pod:2226
38158 " /* Display all calls to guestfs_mkfs* functions. */\n"
38159 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38160 " .function(\"guestfs_mkfs*\") ? {\n"
38161 " display_time();\n"
38162 " printf (\"\\t%s %s\\n\", probefunc(), $$parms);\n"
38168 #: ../src/guestfs.pod:2233
38170 "The script above can be saved to C<test.stap> and run using the L<stap(1)> "
38171 "program. Note that you either have to be root, or you have to add yourself "
38172 "to several special stap groups. Consult the systemtap documentation for "
38173 "more information."
38177 #: ../src/guestfs.pod:2238
38180 " # stap /tmp/test.stap\n"
38186 #: ../src/guestfs.pod:2241
38187 msgid "In another terminal, run a guestfish command such as this:"
38191 #: ../src/guestfs.pod:2245
38192 msgid "In the first terminal, stap trace output similar to this is shown:"
38196 #: ../src/guestfs.pod:2247
38199 " 1318248056692655 (+0):\tlaunch_start\n"
38200 " 1318248056692850 (+195): launch_build_appliance_start\n"
38201 " 1318248056818285 (+125435): launch_build_appliance_end\n"
38202 " 1318248056838059 (+19774): launch_run_qemu\n"
38203 " 1318248061071167 (+4233108): launch_end\n"
38204 " 1318248061280324 (+209157): guestfs_mkfs g=0x1024ab0 fstype=0x46116f "
38205 "device=0x1024e60\n"
38210 #: ../src/guestfs.pod:2254 ../src/guestfs.pod:2259
38215 #: ../src/guestfs.pod:2256
38217 "<!-- old anchor for the next section --> <a "
38218 "name=\"state_machine_and_low_level_event_api\"/>"
38222 #: ../src/guestfs.pod:2261
38223 msgid "ARCHITECTURE"
38227 #: ../src/guestfs.pod:2263
38229 "Internally, libguestfs is implemented by running an appliance (a special "
38230 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
38231 "process of the main program."
38235 #: ../src/guestfs.pod:2267
38238 " ___________________\n"
38240 " | main program |\n"
38242 " | | child process / appliance\n"
38243 " | | __________________________\n"
38245 " +-------------------+ RPC | +-----------------+ |\n"
38246 " | libguestfs <--------------------> guestfsd | |\n"
38247 " | | | +-----------------+ |\n"
38248 " \\___________________/ | | Linux kernel | |\n"
38249 " | +--^--------------+ |\n"
38250 " \\_________|________________/\n"
38252 " _______v______\n"
38255 " | disk image |\n"
38256 " \\______________/\n"
38261 #: ../src/guestfs.pod:2287
38263 "The library, linked to the main program, creates the child process and hence "
38264 "the appliance in the L</guestfs_launch> function."
38268 #: ../src/guestfs.pod:2290
38270 "Inside the appliance is a Linux kernel and a complete stack of userspace "
38271 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
38272 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
38273 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
38274 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
38275 "attached to the qemu process which translates device access by the "
38276 "appliance's Linux kernel into accesses to the image."
38280 #: ../src/guestfs.pod:2299
38282 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
38283 "Although the disk image you are attached to might also be used by some "
38284 "virtual machine, libguestfs doesn't know or care about this. (But you will "
38285 "care if both libguestfs's qemu process and your virtual machine are trying "
38286 "to update the disk image at the same time, since these usually results in "
38287 "massive disk corruption)."
38291 #: ../src/guestfs.pod:2306
38292 msgid "STATE MACHINE"
38296 #: ../src/guestfs.pod:2308
38297 msgid "libguestfs uses a state machine to model the child process:"
38301 #: ../src/guestfs.pod:2310
38305 " guestfs_create\n"
38313 " / | \\ \\ guestfs_launch\n"
38314 " / | _\\__V______\n"
38316 " / | | LAUNCHING |\n"
38317 " / | \\___________/\n"
38319 " / | guestfs_launch\n"
38321 " ______ / __|____V\n"
38322 " / \\ ------> / \\\n"
38323 " | BUSY | | READY |\n"
38324 " \\______/ <------ \\________/\n"
38329 #: ../src/guestfs.pod:2332
38331 "The normal transitions are (1) CONFIG (when the handle is created, but there "
38332 "is no child process), (2) LAUNCHING (when the child process is booting up), "
38333 "(3) alternating between READY and BUSY as commands are issued to, and "
38334 "carried out by, the child process."
38338 #: ../src/guestfs.pod:2337
38340 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
38341 "asynchronously at any time (eg. due to some internal error), and that causes "
38342 "the state to transition back to CONFIG."
38346 #: ../src/guestfs.pod:2341
38348 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
38349 "issued when in the CONFIG state."
38353 #: ../src/guestfs.pod:2344
38355 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
38356 "L</guestfs_launch> blocks until the child process is READY to accept "
38357 "commands (or until some failure or timeout). L</guestfs_launch> internally "
38358 "moves the state from CONFIG to LAUNCHING while it is running."
38362 #: ../src/guestfs.pod:2350
38364 "API actions such as L</guestfs_mount> can only be issued when in the READY "
38365 "state. These API calls block waiting for the command to be carried out "
38366 "(ie. the state to transition to BUSY and then back to READY). There are no "
38367 "non-blocking versions, and no way to issue more than one command per handle "
38368 "at the same time."
38372 #: ../src/guestfs.pod:2356
38374 "Finally, the child process sends asynchronous messages back to the main "
38375 "program, such as kernel log messages. You can register a callback to "
38376 "receive these messages."
38380 #: ../src/guestfs.pod:2360
38385 #: ../src/guestfs.pod:2362
38386 msgid "APPLIANCE BOOT PROCESS"
38390 #: ../src/guestfs.pod:2364
38392 "This process has evolved and continues to evolve. The description here "
38393 "corresponds only to the current version of libguestfs and is provided for "
38394 "information only."
38398 #: ../src/guestfs.pod:2368
38400 "In order to follow the stages involved below, enable libguestfs debugging "
38401 "(set the environment variable C<LIBGUESTFS_DEBUG=1>)."
38405 #: ../src/guestfs.pod:2373
38406 msgid "Create the appliance"
38410 #: ../src/guestfs.pod:2375
38412 "C<febootstrap-supermin-helper> is invoked to create the kernel, a small "
38413 "initrd and the appliance."
38417 #: ../src/guestfs.pod:2378
38419 "The appliance is cached in C</var/tmp/.guestfs-E<lt>UIDE<gt>> (or in another "
38420 "directory if C<TMPDIR> is set)."
38424 #: ../src/guestfs.pod:2381
38426 "For a complete description of how the appliance is created and cached, read "
38427 "the L<febootstrap(8)> and L<febootstrap-supermin-helper(8)> man pages."
38431 #: ../src/guestfs.pod:2385
38432 msgid "Start qemu and boot the kernel"
38436 #: ../src/guestfs.pod:2387
38437 msgid "qemu is invoked to boot the kernel."
38441 #: ../src/guestfs.pod:2389
38442 msgid "Run the initrd"
38446 #: ../src/guestfs.pod:2391
38448 "C<febootstrap-supermin-helper> builds a small initrd. The initrd is not the "
38449 "appliance. The purpose of the initrd is to load enough kernel modules in "
38450 "order that the appliance itself can be mounted and started."
38454 #: ../src/guestfs.pod:2395
38456 "The initrd is a cpio archive called "
38457 "C</var/tmp/.guestfs-E<lt>UIDE<gt>/initrd>."
38461 #: ../src/guestfs.pod:2398
38463 "When the initrd has started you will see messages showing that kernel "
38464 "modules are being loaded, similar to this:"
38468 #: ../src/guestfs.pod:2401
38471 " febootstrap: ext2 mini initrd starting up\n"
38472 " febootstrap: mounting /sys\n"
38473 " febootstrap: internal insmod libcrc32c.ko\n"
38474 " febootstrap: internal insmod crc32c-intel.ko\n"
38479 #: ../src/guestfs.pod:2406
38480 msgid "Find and mount the appliance device"
38484 #: ../src/guestfs.pod:2408
38486 "The appliance is a sparse file containing an ext2 filesystem which contains "
38487 "a familiar (although reduced in size) Linux operating system. It would "
38488 "normally be called C</var/tmp/.guestfs-E<lt>UIDE<gt>/root>."
38492 #: ../src/guestfs.pod:2412
38494 "The regular disks being inspected by libguestfs are the first devices "
38495 "exposed by qemu (eg. as C</dev/vda>)."
38499 #: ../src/guestfs.pod:2415
38501 "The last disk added to qemu is the appliance itself (eg. C</dev/vdb> if "
38502 "there was only one regular disk)."
38506 #: ../src/guestfs.pod:2418
38508 "Thus the final job of the initrd is to locate the appliance disk, mount it, "
38509 "and switch root into the appliance, and run C</init> from the appliance."
38513 #: ../src/guestfs.pod:2422
38514 msgid "If this works successfully you will see messages such as:"
38518 #: ../src/guestfs.pod:2424
38521 " febootstrap: picked /sys/block/vdb/dev as root device\n"
38522 " febootstrap: creating /dev/root as block special 252:16\n"
38523 " febootstrap: mounting new root on /root\n"
38524 " febootstrap: chroot\n"
38525 " Starting /init script ...\n"
38530 #: ../src/guestfs.pod:2430
38532 "Note that C<Starting /init script ...> indicates that the appliance's init "
38533 "script is now running."
38537 #: ../src/guestfs.pod:2433
38538 msgid "Initialize the appliance"
38542 #: ../src/guestfs.pod:2435
38544 "The appliance itself now initializes itself. This involves starting certain "
38545 "processes like C<udev>, possibly printing some debug information, and "
38546 "finally running the daemon (C<guestfsd>)."
38550 #: ../src/guestfs.pod:2439
38555 #: ../src/guestfs.pod:2441
38557 "Finally the daemon (C<guestfsd>) runs inside the appliance. If it runs you "
38562 #: ../src/guestfs.pod:2444
38565 " verbose daemon enabled\n"
38570 #: ../src/guestfs.pod:2446
38572 "The daemon expects to see a named virtio-serial port exposed by qemu and "
38573 "connected on the other end to the library."
38577 #: ../src/guestfs.pod:2449
38579 "The daemon connects to this port (and hence to the library) and sends a four "
38580 "byte message C<GUESTFS_LAUNCH_FLAG>, which initiates the communication "
38581 "protocol (see below)."
38585 #: ../src/guestfs.pod:2455
38586 msgid "COMMUNICATION PROTOCOL"
38590 #: ../src/guestfs.pod:2457
38592 "Don't rely on using this protocol directly. This section documents how it "
38593 "currently works, but it may change at any time."
38597 #: ../src/guestfs.pod:2460
38599 "The protocol used to talk between the library and the daemon running inside "
38600 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
38601 "1014, RFC 1832, RFC 4506)."
38605 #: ../src/guestfs.pod:2464
38607 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
38608 "this file is automatically generated)."
38612 #: ../src/guestfs.pod:2467
38614 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
38615 "and C<FileOut> parameters, which are handled with very simple request/reply "
38616 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
38617 "parameters, which use the same request and reply messages, but they may also "
38618 "be followed by files sent using a chunked encoding."
38622 #: ../src/guestfs.pod:2474
38623 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
38627 #: ../src/guestfs.pod:2476
38628 msgid "For ordinary functions, the request message is:"
38632 #: ../src/guestfs.pod:2478
38635 " total length (header + arguments,\n"
38636 " but not including the length word itself)\n"
38637 " struct guestfs_message_header (encoded as XDR)\n"
38638 " struct guestfs_<foo>_args (encoded as XDR)\n"
38643 #: ../src/guestfs.pod:2483
38645 "The total length field allows the daemon to allocate a fixed size buffer "
38646 "into which it slurps the rest of the message. As a result, the total length "
38647 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
38648 "effective size of any request is limited to somewhere under this size."
38652 #: ../src/guestfs.pod:2489
38654 "Note also that many functions don't take any arguments, in which case the "
38655 "C<guestfs_I<foo>_args> is completely omitted."
38659 #: ../src/guestfs.pod:2492
38661 "The header contains the procedure number (C<guestfs_proc>) which is how the "
38662 "receiver knows what type of args structure to expect, or none at all."
38666 #: ../src/guestfs.pod:2496
38668 "For functions that take optional arguments, the optional arguments are "
38669 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
38670 "arguments. A bitmask in the header indicates which optional arguments are "
38671 "meaningful. The bitmask is also checked to see if it contains bits set "
38672 "which the daemon does not know about (eg. if more optional arguments were "
38673 "added in a later version of the library), and this causes the call to be "
38678 #: ../src/guestfs.pod:2504
38679 msgid "The reply message for ordinary functions is:"
38683 #: ../src/guestfs.pod:2506
38686 " total length (header + ret,\n"
38687 " but not including the length word itself)\n"
38688 " struct guestfs_message_header (encoded as XDR)\n"
38689 " struct guestfs_<foo>_ret (encoded as XDR)\n"
38694 #: ../src/guestfs.pod:2511
38696 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
38697 "functions that return no formal return values."
38701 #: ../src/guestfs.pod:2514
38702 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
38706 #: ../src/guestfs.pod:2517
38708 "In the case of an error, a flag is set in the header, and the reply message "
38709 "is slightly changed:"
38713 #: ../src/guestfs.pod:2520
38716 " total length (header + error,\n"
38717 " but not including the length word itself)\n"
38718 " struct guestfs_message_header (encoded as XDR)\n"
38719 " struct guestfs_message_error (encoded as XDR)\n"
38724 #: ../src/guestfs.pod:2525
38726 "The C<guestfs_message_error> structure contains the error message as a "
38731 #: ../src/guestfs.pod:2528
38732 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
38736 #: ../src/guestfs.pod:2530
38738 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
38739 "The normal request message is sent (see above). However this is followed by "
38740 "a sequence of file chunks."
38744 #: ../src/guestfs.pod:2534
38747 " total length (header + arguments,\n"
38748 " but not including the length word itself,\n"
38749 " and not including the chunks)\n"
38750 " struct guestfs_message_header (encoded as XDR)\n"
38751 " struct guestfs_<foo>_args (encoded as XDR)\n"
38752 " sequence of chunks for FileIn param #0\n"
38753 " sequence of chunks for FileIn param #1 etc.\n"
38758 #: ../src/guestfs.pod:2542
38759 msgid "The \"sequence of chunks\" is:"
38763 #: ../src/guestfs.pod:2544
38766 " length of chunk (not including length word itself)\n"
38767 " struct guestfs_chunk (encoded as XDR)\n"
38768 " length of chunk\n"
38769 " struct guestfs_chunk (encoded as XDR)\n"
38771 " length of chunk\n"
38772 " struct guestfs_chunk (with data.data_len == 0)\n"
38777 #: ../src/guestfs.pod:2552
38779 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
38780 "is set in the final chunk to indicate either successful completion or early "
38785 #: ../src/guestfs.pod:2556
38787 "At time of writing there are no functions that have more than one FileIn "
38788 "parameter. However this is (theoretically) supported, by sending the "
38789 "sequence of chunks for each FileIn parameter one after another (from left to "
38794 #: ../src/guestfs.pod:2561
38796 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
38797 "transfer. The library does this by sending a chunk with a special flag set "
38798 "to indicate cancellation. When the daemon sees this, it cancels the whole "
38799 "RPC, does I<not> send any reply, and goes back to reading the next request."
38803 #: ../src/guestfs.pod:2567
38805 "The daemon may also cancel. It does this by writing a special word "
38806 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
38807 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
38808 "cancel chunk). The special word is chosen so that even if cancellation "
38809 "happens right at the end of the transfer (after the library has finished "
38810 "writing and has started listening for the reply), the \"spurious\" cancel "
38811 "flag will not be confused with the reply message."
38815 #: ../src/guestfs.pod:2576
38817 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
38818 "limit), and also files where the size is not known in advance (eg. from "
38819 "pipes or sockets). However the chunks are rather small "
38820 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
38821 "to keep much in memory."
38825 #: ../src/guestfs.pod:2582
38826 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
38830 #: ../src/guestfs.pod:2584
38832 "The protocol for FileOut parameters is exactly the same as for FileIn "
38833 "parameters, but with the roles of daemon and library reversed."
38837 #: ../src/guestfs.pod:2587
38840 " total length (header + ret,\n"
38841 " but not including the length word itself,\n"
38842 " and not including the chunks)\n"
38843 " struct guestfs_message_header (encoded as XDR)\n"
38844 " struct guestfs_<foo>_ret (encoded as XDR)\n"
38845 " sequence of chunks for FileOut param #0\n"
38846 " sequence of chunks for FileOut param #1 etc.\n"
38851 #: ../src/guestfs.pod:2595
38852 msgid "INITIAL MESSAGE"
38856 #: ../src/guestfs.pod:2597
38858 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
38859 "which indicates that the guest and daemon is alive. This is what "
38860 "L</guestfs_launch> waits for."
38864 #: ../src/guestfs.pod:2601
38865 msgid "PROGRESS NOTIFICATION MESSAGES"
38869 #: ../src/guestfs.pod:2603
38871 "The daemon may send progress notification messages at any time. These are "
38872 "distinguished by the normal length word being replaced by "
38873 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
38877 #: ../src/guestfs.pod:2607
38879 "The library turns them into progress callbacks (see "
38880 "L</GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards "
38885 #: ../src/guestfs.pod:2611
38887 "The daemon self-limits the frequency of progress messages it sends (see "
38888 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
38893 #: ../src/guestfs.pod:2615
38894 msgid "LIBGUESTFS VERSION NUMBERS"
38898 #: ../src/guestfs.pod:2617
38900 "Since April 2010, libguestfs has started to make separate development and "
38901 "stable releases, along with corresponding branches in our git repository. "
38902 "These separate releases can be identified by version number:"
38906 #: ../src/guestfs.pod:2622
38909 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
38910 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
38916 " | `-------- sub-version\n"
38918 " `------ always '1' because we don't change the ABI\n"
38923 #: ../src/guestfs.pod:2633
38924 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
38928 #: ../src/guestfs.pod:2635
38930 "As time passes we cherry pick fixes from the development branch and backport "
38931 "those into the stable branch, the effect being that the stable branch should "
38932 "get more stable and less buggy over time. So the stable releases are ideal "
38933 "for people who don't need new features but would just like the software to "
38938 #: ../src/guestfs.pod:2641
38939 msgid "Our criteria for backporting changes are:"
38943 #: ../src/guestfs.pod:2647
38945 "Documentation changes which don't affect any code are backported unless the "
38946 "documentation refers to a future feature which is not in stable."
38950 #: ../src/guestfs.pod:2653
38952 "Bug fixes which are not controversial, fix obvious problems, and have been "
38953 "well tested are backported."
38957 #: ../src/guestfs.pod:2658
38959 "Simple rearrangements of code which shouldn't affect how it works get "
38960 "backported. This is so that the code in the two branches doesn't get too "
38961 "far out of step, allowing us to backport future fixes more easily."
38965 #: ../src/guestfs.pod:2664
38967 "We I<don't> backport new features, new APIs, new tools etc, except in one "
38968 "exceptional case: the new feature is required in order to implement an "
38969 "important bug fix."
38973 #: ../src/guestfs.pod:2670
38975 "A new stable branch starts when we think the new features in development are "
38976 "substantial and compelling enough over the current stable branch to warrant "
38977 "it. When that happens we create new stable and development versions 1.N.0 "
38978 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
38979 "stable at this point, but by backporting fixes from development, that branch "
38980 "will stabilize over time."
38984 #: ../src/guestfs.pod:2678
38985 msgid "EXTENDING LIBGUESTFS"
38989 #: ../src/guestfs.pod:2680
38990 msgid "ADDING A NEW API ACTION"
38994 #: ../src/guestfs.pod:2682
38996 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
38997 "documentation) are generated, and this makes it easy to extend the "
39002 #: ../src/guestfs.pod:2686
39003 msgid "To add a new API action there are two changes:"
39007 #: ../src/guestfs.pod:2692
39009 "You need to add a description of the call (name, parameters, return type, "
39010 "tests, documentation) to C<generator/generator_actions.ml>."
39014 #: ../src/guestfs.pod:2695
39016 "There are two sorts of API action, depending on whether the call goes "
39017 "through to the daemon in the appliance, or is serviced entirely by the "
39018 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
39019 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
39020 "an example of the latter, since a trace flag is maintained in the handle and "
39021 "all tracing is done on the library side."
39025 #: ../src/guestfs.pod:2703
39027 "Most new actions are of the first type, and get added to the "
39028 "C<daemon_functions> list. Each function has a unique procedure number used "
39029 "in the RPC protocol which is assigned to that action when we publish "
39030 "libguestfs and cannot be reused. Take the latest procedure number and "
39035 #: ../src/guestfs.pod:2709
39037 "For library-only actions of the second type, add to the "
39038 "C<non_daemon_functions> list. Since these functions are serviced by the "
39039 "library and do not travel over the RPC mechanism to the daemon, these "
39040 "functions do not need a procedure number, and so the procedure number is set "
39045 #: ../src/guestfs.pod:2717
39046 msgid "Implement the action (in C):"
39050 #: ../src/guestfs.pod:2719
39052 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
39053 "C<daemon/> directory."
39057 #: ../src/guestfs.pod:2722
39059 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
39060 "(note: double underscore) in the C<src/> directory."
39064 #: ../src/guestfs.pod:2725
39065 msgid "In either case, use another function as an example of what to do."
39069 #: ../src/guestfs.pod:2729
39070 msgid "After making these changes, use C<make> to compile."
39074 #: ../src/guestfs.pod:2731
39076 "Note that you don't need to implement the RPC, language bindings, manual "
39077 "pages or anything else. It's all automatically generated from the OCaml "
39082 #: ../src/guestfs.pod:2735
39083 msgid "ADDING TESTS FOR AN API ACTION"
39087 #: ../src/guestfs.pod:2737
39089 "You can supply zero or as many tests as you want per API call. The tests "
39090 "can either be added as part of the API description "
39091 "(C<generator/generator_actions.ml>), or in some rarer cases you may want to "
39092 "drop a script into C<regressions/>. Note that adding a script to "
39093 "C<regressions/> is slower, so if possible use the first method."
39097 #: ../src/guestfs.pod:2743
39099 "The following describes the test environment used when you add an API test "
39100 "in C<generator_actions.ml>."
39104 #: ../src/guestfs.pod:2746
39105 msgid "The test environment has 4 block devices:"
39109 #: ../src/guestfs.pod:2750
39110 msgid "C</dev/sda> 500MB"
39114 #: ../src/guestfs.pod:2752
39115 msgid "General block device for testing."
39119 #: ../src/guestfs.pod:2754
39120 msgid "C</dev/sdb> 50MB"
39124 #: ../src/guestfs.pod:2756
39126 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
39131 #: ../src/guestfs.pod:2759
39132 msgid "C</dev/sdc> 10MB"
39136 #: ../src/guestfs.pod:2761
39137 msgid "Used in a few tests where two block devices are needed."
39141 #: ../src/guestfs.pod:2763
39142 msgid "C</dev/sdd>"
39146 #: ../src/guestfs.pod:2765
39147 msgid "ISO with fixed content (see C<images/test.iso>)."
39151 #: ../src/guestfs.pod:2769
39153 "To be able to run the tests in a reasonable amount of time, the libguestfs "
39154 "appliance and block devices are reused between tests. So don't try testing "
39155 "L</guestfs_kill_subprocess> :-x"
39159 #: ../src/guestfs.pod:2773
39161 "Each test starts with an initial scenario, selected using one of the "
39162 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
39163 "initialize the disks mentioned above in a particular way as documented in "
39164 "C<generator_types.ml>. You should not assume anything about the previous "
39165 "contents of other disks that are not initialized."
39169 #: ../src/guestfs.pod:2779
39171 "You can add a prerequisite clause to any individual test. This is a "
39172 "run-time check, which, if it fails, causes the test to be skipped. Useful "
39173 "if testing a command which might not work on all variations of libguestfs "
39174 "builds. A test that has prerequisite of C<Always> means to run "
39179 #: ../src/guestfs.pod:2785
39181 "In addition, packagers can skip individual tests by setting environment "
39182 "variables before running C<make check>."
39186 #: ../src/guestfs.pod:2788
39189 " SKIP_TEST_<CMD>_<NUM>=1\n"
39194 #: ../src/guestfs.pod:2790
39195 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
39199 #: ../src/guestfs.pod:2794
39202 " SKIP_TEST_<CMD>=1\n"
39207 #: ../src/guestfs.pod:2796
39208 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
39212 #: ../src/guestfs.pod:2798
39213 msgid "Packagers can run only certain tests by setting for example:"
39217 #: ../src/guestfs.pod:2800
39220 " TEST_ONLY=\"vfs_type zerofree\"\n"
39225 #: ../src/guestfs.pod:2802
39227 "See C<capitests/tests.c> for more details of how these environment variables "
39232 #: ../src/guestfs.pod:2805
39233 msgid "DEBUGGING NEW API ACTIONS"
39237 #: ../src/guestfs.pod:2807
39238 msgid "Test new actions work before submitting them."
39242 #: ../src/guestfs.pod:2809
39243 msgid "You can use guestfish to try out new commands."
39247 #: ../src/guestfs.pod:2811
39249 "Debugging the daemon is a problem because it runs inside a minimal "
39250 "environment. However you can fprintf messages in the daemon to stderr, and "
39251 "they will show up if you use C<guestfish -v>."
39255 #: ../src/guestfs.pod:2815
39256 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
39260 #: ../src/guestfs.pod:2817
39262 "Our C source code generally adheres to some basic code-formatting "
39263 "conventions. The existing code base is not totally consistent on this "
39264 "front, but we do prefer that contributed code be formatted similarly. In "
39265 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
39266 "indentation level, and other than that, follow the K&R style."
39270 #: ../src/guestfs.pod:2823
39272 "If you use Emacs, add the following to one of one of your start-up files "
39273 "(e.g., ~/.emacs), to help ensure that you get indentation right:"
39277 #: ../src/guestfs.pod:2826
39280 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
39281 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
39282 " (add-hook 'find-file-hook\n"
39283 " '(lambda () (if (and buffer-file-name\n"
39284 " (string-match \"/libguestfs\\\\>\"\n"
39285 " (buffer-file-name))\n"
39286 " (not (string-equal mode-name \"Change Log\"))\n"
39287 " (not (string-equal mode-name \"Makefile\")))\n"
39288 " (setq indent-tabs-mode nil))))\n"
39293 #: ../src/guestfs.pod:2836
39296 " ;;; When editing C sources in libguestfs, use this style.\n"
39297 " (defun libguestfs-c-mode ()\n"
39298 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
39300 " (c-set-style \"K&R\")\n"
39301 " (setq c-indent-level 2)\n"
39302 " (setq c-basic-offset 2))\n"
39303 " (add-hook 'c-mode-hook\n"
39304 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
39305 " (buffer-file-name))\n"
39306 " (libguestfs-c-mode))))\n"
39311 #: ../src/guestfs.pod:2848
39312 msgid "Enable warnings when compiling (and fix any problems this finds):"
39316 #: ../src/guestfs.pod:2851
39319 " ./configure --enable-gcc-warnings\n"
39324 #: ../src/guestfs.pod:2853
39325 msgid "Useful targets are:"
39329 #: ../src/guestfs.pod:2855
39332 " make syntax-check # checks the syntax of the C code\n"
39333 " make check # runs the test suite\n"
39338 #: ../src/guestfs.pod:2858
39339 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
39343 #: ../src/guestfs.pod:2860
39345 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
39346 "which are used to do shell quoting."
39350 #: ../src/guestfs.pod:2865
39355 #: ../src/guestfs.pod:2867
39357 "Simple shell quoted string. Any spaces or other shell characters are "
39362 #: ../src/guestfs.pod:2870
39367 #: ../src/guestfs.pod:2872
39369 "Same as C<%Q> except the string is treated as a path which is prefixed by "
39374 #: ../src/guestfs.pod:2879
39377 " asprintf (&cmd, \"cat %R\", path);\n"
39382 #: ../src/guestfs.pod:2881
39383 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
39387 #: ../src/guestfs.pod:2883
39389 "I<Note:> Do I<not> use these when you are passing parameters to the "
39390 "C<command{,r,v,rv}()> functions. These parameters do NOT need to be quoted "
39391 "because they are not passed via the shell (instead, straight to exec). You "
39392 "probably want to use the C<sysroot_path()> function however."
39396 #: ../src/guestfs.pod:2889
39397 msgid "SUBMITTING YOUR NEW API ACTIONS"
39401 #: ../src/guestfs.pod:2891
39403 "Submit patches to the mailing list: "
39404 "L<http://www.redhat.com/mailman/listinfo/libguestfs> and CC to "
39405 "L<rjones@redhat.com>."
39409 #: ../src/guestfs.pod:2895
39410 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
39414 #: ../src/guestfs.pod:2897
39415 msgid "We support i18n (gettext anyhow) in the library."
39419 #: ../src/guestfs.pod:2899
39421 "However many messages come from the daemon, and we don't translate those at "
39422 "the moment. One reason is that the appliance generally has all locale files "
39423 "removed from it, because they take up a lot of space. So we'd have to readd "
39424 "some of those, as well as copying our PO files into the appliance."
39428 #: ../src/guestfs.pod:2905
39430 "Debugging messages are never translated, since they are intended for the "
39435 #: ../src/guestfs.pod:2908
39436 msgid "SOURCE CODE SUBDIRECTORIES"
39440 #: ../src/guestfs.pod:2912
39445 #: ../src/guestfs.pod:2914
39446 msgid "L<virt-alignment-scan(1)> command and documentation."
39450 #: ../src/guestfs.pod:2918
39451 msgid "The libguestfs appliance, build scripts and so on."
39455 #: ../src/guestfs.pod:2920
39456 msgid "C<capitests>"
39460 #: ../src/guestfs.pod:2922
39461 msgid "Automated tests of the C API."
39465 #: ../src/guestfs.pod:2924
39470 #: ../src/guestfs.pod:2926
39472 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
39477 #: ../src/guestfs.pod:2929
39482 #: ../src/guestfs.pod:2931
39484 "Safety and liveness tests of components that libguestfs depends upon (not of "
39485 "libguestfs itself). Mainly this is for qemu and the kernel."
39489 #: ../src/guestfs.pod:2934
39494 #: ../src/guestfs.pod:2936
39496 "Tools for cloning virtual machines. Currently contains L<virt-sysprep(1)> "
39497 "command and documentation."
39501 #: ../src/guestfs.pod:2939
39506 #: ../src/guestfs.pod:2941
39507 msgid "Outside contributions, experimental parts."
39511 #: ../src/guestfs.pod:2943
39516 #: ../src/guestfs.pod:2945
39518 "The daemon that runs inside the libguestfs appliance and carries out "
39523 #: ../src/guestfs.pod:2948
39528 #: ../src/guestfs.pod:2950
39529 msgid "L<virt-df(1)> command and documentation."
39533 #: ../src/guestfs.pod:2952
39538 #: ../src/guestfs.pod:2954
39539 msgid "L<virt-edit(1)> command and documentation."
39543 #: ../src/guestfs.pod:2956
39544 msgid "C<examples>"
39548 #: ../src/guestfs.pod:2958
39549 msgid "C API example code."
39553 #: ../src/guestfs.pod:2960
39558 #: ../src/guestfs.pod:2962
39560 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
39561 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
39562 "L<virt-tar-out(1)>."
39566 #: ../src/guestfs.pod:2966
39571 #: ../src/guestfs.pod:2968
39572 msgid "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
39576 #: ../src/guestfs.pod:2970
39577 msgid "C<generator>"
39581 #: ../src/guestfs.pod:2972
39583 "The crucially important generator, used to automatically generate large "
39584 "amounts of boilerplate C code for things like RPC and bindings."
39588 #: ../src/guestfs.pod:2975
39593 #: ../src/guestfs.pod:2977
39594 msgid "Files used by the test suite."
39598 #: ../src/guestfs.pod:2979
39599 msgid "Some \"phony\" guest images which we test against."
39603 #: ../src/guestfs.pod:2981
39604 msgid "C<inspector>"
39608 #: ../src/guestfs.pod:2983
39609 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
39613 #: ../src/guestfs.pod:2985
39618 #: ../src/guestfs.pod:2987
39619 msgid "Logo used on the website. The fish is called Arthur by the way."
39623 #: ../src/guestfs.pod:2989
39628 #: ../src/guestfs.pod:2991
39629 msgid "M4 macros used by autoconf."
39633 #: ../src/guestfs.pod:2993
39638 #: ../src/guestfs.pod:2995
39639 msgid "Translations of simple gettext strings."
39643 #: ../src/guestfs.pod:2997
39648 #: ../src/guestfs.pod:2999
39650 "The build infrastructure and PO files for translations of manpages and POD "
39651 "files. Eventually this will be combined with the C<po> directory, but that "
39652 "is rather complicated."
39656 #: ../src/guestfs.pod:3003
39657 msgid "C<regressions>"
39661 #: ../src/guestfs.pod:3005
39662 msgid "Regression tests."
39666 #: ../src/guestfs.pod:3007
39671 #: ../src/guestfs.pod:3009
39672 msgid "L<virt-rescue(1)> command and documentation."
39676 #: ../src/guestfs.pod:3011
39681 #: ../src/guestfs.pod:3013
39682 msgid "L<virt-resize(1)> command and documentation."
39686 #: ../src/guestfs.pod:3015
39687 msgid "C<sparsify>"
39691 #: ../src/guestfs.pod:3017
39692 msgid "L<virt-sparsify(1)> command and documentation."
39696 #: ../src/guestfs.pod:3019
39701 #: ../src/guestfs.pod:3021
39702 msgid "Source code to the C library."
39706 #: ../src/guestfs.pod:3023
39711 #: ../src/guestfs.pod:3025
39712 msgid "Command line tools written in Perl (L<virt-win-reg(1)> and many others)."
39716 #: ../src/guestfs.pod:3027
39717 msgid "C<test-tool>"
39721 #: ../src/guestfs.pod:3029
39723 "Test tool for end users to test if their qemu/kernel combination will work "
39728 #: ../src/guestfs.pod:3032
39733 #: ../src/guestfs.pod:3034
39738 #: ../src/guestfs.pod:3036
39743 #: ../src/guestfs.pod:3038
39748 #: ../src/guestfs.pod:3040
39753 #: ../src/guestfs.pod:3042
39758 #: ../src/guestfs.pod:3044
39763 #: ../src/guestfs.pod:3046
39768 #: ../src/guestfs.pod:3048
39773 #: ../src/guestfs.pod:3050
39774 msgid "Language bindings."
39778 #: ../src/guestfs.pod:3054
39779 msgid "MAKING A STABLE RELEASE"
39783 #: ../src/guestfs.pod:3056
39785 "When we make a stable release, there are several steps documented here. See "
39786 "L</LIBGUESTFS VERSION NUMBERS> for general information about the stable "
39791 #: ../src/guestfs.pod:3064
39792 msgid "Check C<make && make check> works on at least Fedora, Debian and Ubuntu."
39796 #: ../src/guestfs.pod:3069
39797 msgid "Finalize RELEASE-NOTES."
39801 #: ../src/guestfs.pod:3073
39802 msgid "Update ROADMAP."
39806 #: ../src/guestfs.pod:3077
39807 msgid "Run C<src/api-support/update-from-tarballs.sh>."
39811 #: ../src/guestfs.pod:3081
39812 msgid "Push and pull from Transifex."
39816 #: ../src/guestfs.pod:3085
39824 #: ../src/guestfs.pod:3087
39825 msgid "to push the latest POT files to Transifex. Then run:"
39829 #: ../src/guestfs.pod:3089
39837 #: ../src/guestfs.pod:3091
39838 msgid "which is a wrapper to pull the latest translated C<*.po> files."
39842 #: ../src/guestfs.pod:3095
39844 "Create new stable and development directories under "
39845 "L<http://libguestfs.org/download>."
39849 #: ../src/guestfs.pod:3100
39850 msgid "Create the branch in git:"
39854 #: ../src/guestfs.pod:3102
39857 " git tag -a 1.XX.0 -m \"Version 1.XX.0 (stable)\"\n"
39858 " git tag -a 1.YY.0 -m \"Version 1.YY.0 (development)\"\n"
39859 " git branch stable-1.XX\n"
39860 " git push origin tag 1.XX.0 1.YY.0 stable-1.XX\n"
39865 #: ../src/guestfs.pod:3109
39870 #: ../src/guestfs.pod:3111
39871 msgid "PROTOCOL LIMITS"
39875 #: ../src/guestfs.pod:3113
39877 "Internally libguestfs uses a message-based protocol to pass API calls and "
39878 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
39879 "plenty more detail about this). The maximum message size used by the "
39880 "protocol is slightly less than 4 MB. For some API calls you may need to be "
39881 "aware of this limit. The API calls which may be affected are individually "
39882 "documented, with a link back to this section of the documentation."
39886 #: ../src/guestfs.pod:3121
39888 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
39889 "a simple string. Because this string is at some point internally encoded as "
39890 "a message, the maximum size that it can return is slightly under 4 MB. If "
39891 "the requested file is larger than this then you will get an error."
39895 #: ../src/guestfs.pod:3127
39897 "In order to transfer large files into and out of the guest filesystem, you "
39898 "need to use particular calls that support this. The sections L</UPLOADING> "
39899 "and L</DOWNLOADING> document how to do this."
39903 #: ../src/guestfs.pod:3131
39905 "You might also consider mounting the disk image using our FUSE filesystem "
39906 "support (L<guestmount(1)>)."
39910 #: ../src/guestfs.pod:3134
39911 msgid "MAXIMUM NUMBER OF DISKS"
39915 #: ../src/guestfs.pod:3136
39916 msgid "When using virtio disks (the default) the current limit is B<25> disks."
39920 #: ../src/guestfs.pod:3139
39922 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
39923 "slots. However febootstrap only understands disks with names C</dev/vda> "
39924 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
39929 #: ../src/guestfs.pod:3144
39931 "We are working to substantially raise this limit in future versions but it "
39932 "requires complex changes to qemu."
39936 #: ../src/guestfs.pod:3147
39938 "In future versions of libguestfs it should also be possible to \"hot plug\" "
39939 "disks (add and remove disks after calling L</guestfs_launch>). This also "
39940 "requires changes to qemu."
39944 #: ../src/guestfs.pod:3151
39945 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
39949 #: ../src/guestfs.pod:3153
39950 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
39954 #: ../src/guestfs.pod:3155
39956 "This is because it reserves 4 bits for the minor device number (thus "
39957 "C</dev/vda>, and C</dev/vda1> through C</dev/vda15>)."
39961 #: ../src/guestfs.pod:3158
39963 "If you attach a disk with more than 15 partitions, the extra partitions are "
39964 "ignored by libguestfs."
39968 #: ../src/guestfs.pod:3161
39969 msgid "MAXIMUM SIZE OF A DISK"
39973 #: ../src/guestfs.pod:3163
39974 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
39978 #: ../src/guestfs.pod:3165
39980 "We have tested block devices up to 1 exabyte (2**60 or "
39981 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
39986 #: ../src/guestfs.pod:3169
39988 "Although libguestfs probably does not impose any limit, the underlying host "
39989 "storage will. If you store disk images on a host ext4 filesystem, then the "
39990 "maximum size will be limited by the maximum ext4 file size (currently 16 "
39991 "TB). If you store disk images as host logical volumes then you are limited "
39992 "by the maximum size of an LV."
39996 #: ../src/guestfs.pod:3175
39998 "For the hugest disk image files, we recommend using XFS on the host for "
40003 #: ../src/guestfs.pod:3178
40004 msgid "MAXIMUM SIZE OF A PARTITION"
40008 #: ../src/guestfs.pod:3180
40010 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
40011 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
40012 "address a partition located beyond 2 TB on the disk."
40016 #: ../src/guestfs.pod:3184
40018 "It is recommended that you use GPT partitions on disks which are larger than "
40019 "this size. GPT uses 64 bit sector numbers and so can address partitions "
40020 "which are theoretically larger than the largest disk we could support."
40024 #: ../src/guestfs.pod:3189
40025 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
40029 #: ../src/guestfs.pod:3191
40031 "This depends on the filesystem type. libguestfs itself does not impose any "
40032 "known limit. Consult Wikipedia or the filesystem documentation to find out "
40033 "what these limits are."
40037 #: ../src/guestfs.pod:3195
40038 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
40042 #: ../src/guestfs.pod:3197
40044 "The API functions L</guestfs_upload>, L</guestfs_download>, "
40045 "L</guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
40046 "uploads and downloads."
40050 #: ../src/guestfs.pod:3201
40051 msgid "INSPECTION LIMITS"
40055 #: ../src/guestfs.pod:3203
40057 "The inspection code has several arbitrary limits on things like the size of "
40058 "Windows Registry hive it will read, and the length of product name. These "
40059 "are intended to stop a malicious guest from consuming arbitrary amounts of "
40060 "memory and disk space on the host, and should not be reached in practice. "
40061 "See the source code for more information."
40065 #: ../src/guestfs.pod:3229
40067 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
40068 "effect as calling C<guestfs_set_verbose (g, 1)>."
40072 #: ../src/guestfs.pod:3241
40074 "Set the path that libguestfs uses to search for a supermin appliance. See "
40075 "the discussion of paths in section L</PATH> above."
40079 #: ../src/guestfs.pod:3250
40080 msgid "See also L</QEMU WRAPPERS> above."
40084 #: ../src/guestfs.pod:3254
40086 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
40087 "effect as calling C<guestfs_set_trace (g, 1)>."
40091 #: ../src/guestfs.pod:3272
40093 "L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, "
40094 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
40095 "L<guestfs-ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, "
40096 "L<virt-alignment-scan(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
40097 "L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)>, "
40098 "L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
40099 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
40100 "L<virt-rescue(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, "
40101 "L<virt-sysprep(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, "
40102 "L<virt-win-reg(1)>, L<guestfs-testing(1)>, L<qemu(1)>, L<febootstrap(1)>, "
40103 "L<febootstrap-supermin-helper(8)>, L<hivex(3)>, L<stap(1)>, "
40104 "L<http://libguestfs.org/>."
40108 #: ../src/guestfs.pod:3309
40110 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
40111 "L<lvm(8)>, L<disktype(1)>."
40115 #: ../src/guestfs.pod:3316 ../tools/virt-make-fs.pl:571 ../tools/virt-win-reg.pl:772
40120 #: ../src/guestfs.pod:3318
40121 msgid "To get a list of bugs against libguestfs use this link:"
40125 #: ../src/guestfs.pod:3320
40126 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
40130 #: ../src/guestfs.pod:3322
40131 msgid "To report a new bug against libguestfs use this link:"
40135 #: ../src/guestfs.pod:3324
40136 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
40140 #: ../src/guestfs.pod:3326
40141 msgid "When reporting a bug, please check:"
40145 #: ../src/guestfs.pod:3332
40146 msgid "That the bug hasn't been reported already."
40150 #: ../src/guestfs.pod:3336
40151 msgid "That you are testing a recent version."
40155 #: ../src/guestfs.pod:3340
40156 msgid "Describe the bug accurately, and give a way to reproduce it."
40160 #: ../src/guestfs.pod:3344
40162 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
40167 #: ../test-tool/libguestfs-test-tool.pod:5
40168 msgid "libguestfs-test-tool - Diagnostics for libguestfs"
40172 #: ../test-tool/libguestfs-test-tool.pod:9
40175 " libguestfs-test-tool [--options]\n"
40180 #: ../test-tool/libguestfs-test-tool.pod:13
40182 "libguestfs-test-tool is a test program shipped with libguestfs to allow you "
40183 "to check basic libguestfs functionality is working. This is needed because "
40184 "libguestfs occasionally breaks for reasons beyond our control: usually "
40185 "because of changes in the underlying qemu or kernel packages, or the host "
40190 #: ../test-tool/libguestfs-test-tool.pod:19
40191 msgid "If you suspect a problem in libguestfs, then just run:"
40195 #: ../test-tool/libguestfs-test-tool.pod:21
40198 " libguestfs-test-tool\n"
40203 #: ../test-tool/libguestfs-test-tool.pod:23
40204 msgid "It will print lots of diagnostic messages."
40208 #: ../test-tool/libguestfs-test-tool.pod:25
40209 msgid "If it runs to completion successfully, you will see this near the end:"
40213 #: ../test-tool/libguestfs-test-tool.pod:27
40216 " ===== TEST FINISHED OK =====\n"
40221 #: ../test-tool/libguestfs-test-tool.pod:29
40222 msgid "and the test tool will exit with code 0."
40226 #: ../test-tool/libguestfs-test-tool.pod:31
40228 "If it fails (and/or exits with non-zero error code), please paste the "
40229 "I<complete, unedited> output of the test tool into a bug report. More "
40230 "information about reporting bugs can be found on the "
40231 "L<http://libguestfs.org/> website."
40235 #: ../test-tool/libguestfs-test-tool.pod:42
40236 msgid "Display short usage information and exit."
40240 #: ../test-tool/libguestfs-test-tool.pod:44
40241 msgid "B<--qemu qemu_binary>"
40245 #: ../test-tool/libguestfs-test-tool.pod:46
40247 "If you have downloaded another qemu binary, point this option at the full "
40248 "path of the binary to try it."
40252 #: ../test-tool/libguestfs-test-tool.pod:49
40253 msgid "B<--qemudir qemu_source_dir>"
40257 #: ../test-tool/libguestfs-test-tool.pod:51
40259 "If you have compiled qemu from source, point this option at the source "
40260 "directory to try it."
40264 #: ../test-tool/libguestfs-test-tool.pod:54
40269 #: ../test-tool/libguestfs-test-tool.pod:56
40270 msgid "B<--timeout N>"
40274 #: ../test-tool/libguestfs-test-tool.pod:58
40276 "Set the launch timeout to C<N> seconds. The default is 600 seconds (10 "
40277 "minutes) which does not usually need to be adjusted."
40281 #: ../test-tool/libguestfs-test-tool.pod:63
40282 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
40286 #: ../test-tool/libguestfs-test-tool.pod:65
40288 "If you have compiled another version of qemu from source and would like to "
40289 "try that, then you can use the I<--qemudir> option to point to the qemu "
40290 "source directory."
40294 #: ../test-tool/libguestfs-test-tool.pod:69
40296 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
40297 "option to point to the binary."
40301 #: ../test-tool/libguestfs-test-tool.pod:72
40303 "Note when using these options, you can ignore the business of qemu wrapper "
40304 "scripts (L<guestfs(3)/QEMU WRAPPERS>), since libguestfs-test-tool writes a "
40305 "wrapper script for you if one is needed."
40309 #: ../test-tool/libguestfs-test-tool.pod:76
40310 msgid "TRYING OUT A DIFFERENT KERNEL"
40314 #: ../test-tool/libguestfs-test-tool.pod:78
40316 "If you are using febootstrap E<ge> 3.8 then you can select which kernel "
40317 "libguestfs tries. You do this by setting the environment variables "
40318 "C<FEBOOTSTRAP_KERNEL> and/or C<FEBOOTSTRAP_MODULES>."
40322 #: ../test-tool/libguestfs-test-tool.pod:82
40324 "Refer to L<febootstrap-supermin-helper(8)/ENVIRONMENT VARIABLES> for further "
40329 #: ../test-tool/libguestfs-test-tool.pod:85
40330 msgid "SELF-DIAGNOSIS"
40334 #: ../test-tool/libguestfs-test-tool.pod:87
40336 "Refer to L<guestfs(3)/APPLIANCE BOOT PROCESS> to understand the messages "
40337 "produced by libguestfs-test-tool and/or possible errors."
40341 #: ../test-tool/libguestfs-test-tool.pod:92
40343 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
40344 "I<1> if there was an error."
40348 #: ../test-tool/libguestfs-test-tool.pod:97
40350 "For the full list of environment variables which may affect libguestfs, "
40351 "please see the L<guestfs(3)> manual page."
40355 #: ../test-tool/libguestfs-test-tool.pod:102
40356 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
40360 #: ../tools/virt-list-filesystems.pl:32
40361 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
40365 #: ../tools/virt-list-filesystems.pl:36
40368 " virt-list-filesystems [--options] domname\n"
40373 #: ../tools/virt-list-filesystems.pl:38
40376 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
40381 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
40383 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
40388 #: ../tools/virt-list-filesystems.pl:45
40390 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
40391 "are contained in a virtual machine or disk image."
40395 #: ../tools/virt-list-filesystems.pl:49
40397 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
40398 "functionality. For more complex cases you should look at the "
40399 "L<guestfish(1)> tool."
40403 #: ../tools/virt-list-filesystems.pl:112
40405 "With this option, C<virt-list-filesystems> displays the type of each "
40406 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
40410 #: ../tools/virt-list-filesystems.pl:119
40415 #: ../tools/virt-list-filesystems.pl:123
40417 "Normally we only show mountable filesystems. If this option is given then "
40418 "swap devices are shown too."
40422 #: ../tools/virt-list-filesystems.pl:197
40424 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
40425 "L<virt-filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, "
40426 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
40430 #: ../tools/virt-list-filesystems.pl:214 ../tools/virt-tar.pl:317
40431 msgid "Copyright (C) 2009 Red Hat Inc."
40435 #: ../tools/virt-list-partitions.pl:32
40436 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
40440 #: ../tools/virt-list-partitions.pl:36
40443 " virt-list-partitions [--options] domname\n"
40448 #: ../tools/virt-list-partitions.pl:38
40451 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
40456 #: ../tools/virt-list-partitions.pl:45
40458 "C<virt-list-partitions> is a command line tool to list the partitions that "
40459 "are contained in a virtual machine or disk image. It is mainly useful as a "
40460 "first step to using L<virt-resize(1)>."
40464 #: ../tools/virt-list-partitions.pl:50
40466 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
40467 "functionality. For more complex cases you should look at the "
40468 "L<guestfish(1)> tool."
40472 #: ../tools/virt-list-partitions.pl:113
40473 msgid "Show sizes in human-readable form (eg. \"1G\")."
40477 #: ../tools/virt-list-partitions.pl:123
40479 "With this option, C<virt-list-partitions> displays the type and size of each "
40480 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
40484 #: ../tools/virt-list-partitions.pl:130
40489 #: ../tools/virt-list-partitions.pl:132
40494 #: ../tools/virt-list-partitions.pl:134
40495 msgid "Display the total size of each block device (as a separate row or rows)."
40499 #: ../tools/virt-list-partitions.pl:267
40501 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
40502 "L<virt-list-filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, "
40503 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
40507 #: ../tools/virt-list-partitions.pl:283
40508 msgid "Copyright (C) 2009-2010 Red Hat Inc."
40512 #: ../tools/virt-make-fs.pl:37
40513 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
40517 #: ../tools/virt-make-fs.pl:41
40520 " virt-make-fs [--options] input.tar output.img\n"
40525 #: ../tools/virt-make-fs.pl:43
40528 " virt-make-fs [--options] input.tar.gz output.img\n"
40533 #: ../tools/virt-make-fs.pl:45
40536 " virt-make-fs [--options] directory output.img\n"
40541 #: ../tools/virt-make-fs.pl:49
40543 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
40544 "archive or some files in a directory. It is similar to tools like "
40545 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
40546 "it can create common filesystem types like ext2/3 or NTFS, which can be "
40547 "useful if you want to attach these filesystems to existing virtual machines "
40548 "(eg. to import large amounts of read-only data to a VM)."
40552 #: ../tools/virt-make-fs.pl:57
40553 msgid "Basic usage is:"
40557 #: ../tools/virt-make-fs.pl:59
40560 " virt-make-fs input output.img\n"
40565 #: ../tools/virt-make-fs.pl:61
40567 "where C<input> is either a directory containing files that you want to add, "
40568 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
40569 "C<output.img> is a disk image. The input type is detected automatically. "
40570 "The output disk image defaults to a raw ext2 sparse image unless you specify "
40571 "extra flags (see L</OPTIONS> below)."
40575 #: ../tools/virt-make-fs.pl:67
40576 msgid "FILESYSTEM TYPE"
40580 #: ../tools/virt-make-fs.pl:69
40582 "The default filesystem type is C<ext2>. Just about any filesystem type that "
40583 "libguestfs supports can be used (but I<not> read-only formats like "
40584 "ISO9660). Here are some of the more common choices:"
40588 #: ../tools/virt-make-fs.pl:75
40593 #: ../tools/virt-make-fs.pl:77
40595 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
40596 "you are not going to use the filesystem in a way that requires the journal, "
40597 "then this is just wasted overhead."
40601 #: ../tools/virt-make-fs.pl:81
40602 msgid "I<ntfs> or I<vfat>"
40606 #: ../tools/virt-make-fs.pl:83
40607 msgid "Useful if exporting data to a Windows guest."
40611 #: ../tools/virt-make-fs.pl:85
40613 "I<Note for vfat>: The tar archive or local directory must only contain files "
40614 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
40615 "program running within libguestfs is unable to change the ownership of "
40616 "non-root files, since vfat itself does not support this."
40620 #: ../tools/virt-make-fs.pl:90
40625 #: ../tools/virt-make-fs.pl:92
40627 "Lower overhead than C<ext2>, but certain limitations on filename length and "
40628 "total filesystem size."
40632 #: ../tools/virt-make-fs.pl:97 ../tools/virt-make-fs.pl:116 ../tools/virt-make-fs.pl:149
40637 #: ../tools/virt-make-fs.pl:99
40640 " virt-make-fs --type=minix input minixfs.img\n"
40645 #: ../tools/virt-make-fs.pl:101
40646 msgid "TO PARTITION OR NOT TO PARTITION"
40650 #: ../tools/virt-make-fs.pl:103
40651 msgid "Optionally virt-make-fs can add a partition table to the output disk."
40655 #: ../tools/virt-make-fs.pl:105
40657 "Adding a partition can make the disk image more compatible with certain "
40658 "virtualized operating systems which don't expect to see a filesystem "
40659 "directly located on a block device (Linux doesn't care and will happily "
40660 "handle both types)."
40664 #: ../tools/virt-make-fs.pl:110
40666 "On the other hand, if you have a partition table then the output image is no "
40667 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
40668 "directly on a partitioned disk image. (However libguestfs tools such as "
40669 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
40673 #: ../tools/virt-make-fs.pl:118
40674 msgid "Add an MBR partition:"
40678 #: ../tools/virt-make-fs.pl:120
40681 " virt-make-fs --partition -- input disk.img\n"
40686 #: ../tools/virt-make-fs.pl:122
40688 "If the output disk image could be terabyte-sized or larger, it's better to "
40689 "use an EFI/GPT-compatible partition table:"
40693 #: ../tools/virt-make-fs.pl:125
40696 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
40701 #: ../tools/virt-make-fs.pl:127
40702 msgid "EXTRA SPACE"
40706 #: ../tools/virt-make-fs.pl:129
40708 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
40709 "the files that it contains, but might have extra space. Depending on how "
40710 "you are going to use the output, you might think this extra space is wasted "
40711 "and want to minimize it, or you might want to leave space so that more files "
40712 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
40713 "but you can use the I<--size> flag to leave space in the filesystem if you "
40718 #: ../tools/virt-make-fs.pl:137
40720 "An alternative way to leave extra space but not make the output image any "
40721 "bigger is to use an alternative disk image format (instead of the default "
40722 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
40723 "image format (check your hypervisor supports this before using it). This "
40724 "allows you to choose a large I<--size> but the extra space won't actually be "
40725 "allocated in the image until you try to store something in it."
40729 #: ../tools/virt-make-fs.pl:145
40731 "Don't forget that you can also use local commands including L<resize2fs(8)> "
40732 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
40733 "to build another image from scratch."
40737 #: ../tools/virt-make-fs.pl:151
40740 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
40745 #: ../tools/virt-make-fs.pl:179
40746 msgid "Enable debugging information."
40750 #: ../tools/virt-make-fs.pl:185
40751 msgid "B<--size=E<lt>NE<gt>>"
40755 #: ../tools/virt-make-fs.pl:187
40756 msgid "B<--size=+E<lt>NE<gt>>"
40760 #: ../tools/virt-make-fs.pl:189
40761 msgid "B<-s E<lt>NE<gt>>"
40765 #: ../tools/virt-make-fs.pl:191
40766 msgid "B<-s +E<lt>NE<gt>>"
40770 #: ../tools/virt-make-fs.pl:193
40771 msgid "Use the I<--size> (or I<-s>) option to choose the size of the output image."
40775 #: ../tools/virt-make-fs.pl:196
40777 "If this option is I<not> given, then the output image will be just large "
40778 "enough to contain all the files, with not much wasted space."
40782 #: ../tools/virt-make-fs.pl:199
40784 "To choose a fixed size output disk, specify an absolute number followed by "
40785 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
40786 "Petabytes or Exabytes. This must be large enough to contain all the input "
40787 "files, else you will get an error."
40791 #: ../tools/virt-make-fs.pl:204
40793 "To leave extra space, specify C<+> (plus sign) and a number followed by "
40794 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
40795 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
40796 "the input files, and (approximately) an extra 200 MB free space."
40800 #: ../tools/virt-make-fs.pl:210
40802 "Note that virt-make-fs estimates free space, and therefore will not produce "
40803 "filesystems containing precisely the free space requested. (It is much more "
40804 "expensive and time-consuming to produce a filesystem which has precisely the "
40805 "desired free space)."
40809 #: ../tools/virt-make-fs.pl:219
40810 msgid "B<--format=E<lt>fmtE<gt>>"
40814 #: ../tools/virt-make-fs.pl:221
40815 msgid "B<-F E<lt>fmtE<gt>>"
40819 #: ../tools/virt-make-fs.pl:223
40820 msgid "Choose the output disk image format."
40824 #: ../tools/virt-make-fs.pl:225
40825 msgid "The default is C<raw> (raw sparse disk image)."
40829 #: ../tools/virt-make-fs.pl:227
40831 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
40832 "that would really make sense here is C<qcow2>."
40836 #: ../tools/virt-make-fs.pl:234
40837 msgid "B<--type=E<lt>fsE<gt>>"
40841 #: ../tools/virt-make-fs.pl:236
40842 msgid "B<-t E<lt>fsE<gt>>"
40846 #: ../tools/virt-make-fs.pl:238
40847 msgid "Choose the output filesystem type."
40851 #: ../tools/virt-make-fs.pl:240
40852 msgid "The default is C<ext2>."
40856 #: ../tools/virt-make-fs.pl:242
40857 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
40861 #: ../tools/virt-make-fs.pl:249
40862 msgid "B<--partition>"
40866 #: ../tools/virt-make-fs.pl:251
40867 msgid "B<--partition=E<lt>parttypeE<gt>>"
40871 #: ../tools/virt-make-fs.pl:253
40873 "If specified, this flag adds an MBR partition table to the output disk "
40878 #: ../tools/virt-make-fs.pl:256
40880 "You can change the partition table type, eg. I<--partition=gpt> for large "
40885 #: ../tools/virt-make-fs.pl:259
40887 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
40888 "might consider the next parameter to be the partition type. For example:"
40892 #: ../tools/virt-make-fs.pl:263
40895 " virt-make-fs --partition input.tar output.img\n"
40900 #: ../tools/virt-make-fs.pl:265
40902 "would cause virt-make-fs to think you wanted to use a partition type of "
40903 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
40904 "dash) between options and the input and output arguments:"
40908 #: ../tools/virt-make-fs.pl:269
40911 " virt-make-fs --partition -- input.tar output.img\n"
40916 #: ../tools/virt-make-fs.pl:271
40917 msgid "For MBR, virt-make-fs sets the partition type byte automatically."
40921 #: ../tools/virt-make-fs.pl:559
40923 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
40924 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
40925 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
40929 #: ../tools/virt-make-fs.pl:573 ../tools/virt-win-reg.pl:774
40931 "When reporting bugs, please enable debugging and capture the I<complete> "
40936 #: ../tools/virt-make-fs.pl:576
40939 " export LIBGUESTFS_DEBUG=1\n"
40940 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
40945 #: ../tools/virt-make-fs.pl:579
40947 "Attach /tmp/virt-make-fs.log to a new bug report at "
40948 "L<https://bugzilla.redhat.com/>"
40952 #: ../tools/virt-tar.pl:33
40953 msgid "virt-tar - Extract or upload files to a virtual machine"
40957 #: ../tools/virt-tar.pl:37
40960 " virt-tar [--options] -x domname directory tarball\n"
40965 #: ../tools/virt-tar.pl:39
40968 " virt-tar [--options] -u domname tarball directory\n"
40973 #: ../tools/virt-tar.pl:41
40976 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
40981 #: ../tools/virt-tar.pl:43
40984 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
40989 #: ../tools/virt-tar.pl:45 ../tools/virt-win-reg.pl:88
40994 #: ../tools/virt-tar.pl:47
40996 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
40997 "L<virt-tar-in(1)>, L<virt-tar-out(1)> as replacements."
41001 #: ../tools/virt-tar.pl:52
41002 msgid "Download C</home> from the VM into a local tarball:"
41006 #: ../tools/virt-tar.pl:54
41009 " virt-tar -x domname /home home.tar\n"
41014 #: ../tools/virt-tar.pl:56
41017 " virt-tar -zx domname /home home.tar.gz\n"
41022 #: ../tools/virt-tar.pl:58
41023 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
41027 #: ../tools/virt-tar.pl:60
41030 " virt-tar -u domname uploadstuff.tar /tmp\n"
41035 #: ../tools/virt-tar.pl:62
41038 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
41043 #: ../tools/virt-tar.pl:66
41045 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
41046 "virtual machines. If you do this, you risk disk corruption in the VM. "
41047 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
41051 #: ../tools/virt-tar.pl:71
41053 "You can use I<-x> (extract) on live virtual machines, but you might get "
41054 "inconsistent results or errors if there is filesystem activity inside the "
41055 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
41056 "work, but the only way to guarantee consistent results is if the virtual "
41057 "machine is shut down."
41061 #: ../tools/virt-tar.pl:79
41063 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
41064 "parts of a guest filesystem. There are many possibilities: making backups, "
41065 "uploading data files, snooping on guest activity, fixing or customizing "
41070 #: ../tools/virt-tar.pl:84
41072 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
41073 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
41074 "should look at the L<guestfish(1)> tool."
41078 #: ../tools/virt-tar.pl:88
41080 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
41081 "its contents (recursively) from the virtual machine into a local tarball. "
41082 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
41083 "virtual machine. You cannot use these two options together."
41087 #: ../tools/virt-tar.pl:94
41089 "In addition, you may need to use the I<-z> (gZip) option to enable "
41090 "compression. When uploading, you have to specify I<-z> if the upload file "
41091 "is compressed because virt-tar won't detect this on its own."
41095 #: ../tools/virt-tar.pl:98
41097 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
41098 "example it cannot do PKZip files or bzip2 compression. If you want that "
41099 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
41100 "the L<libguestfs(3)> API)."
41104 #: ../tools/virt-tar.pl:160
41105 msgid "B<--extract>"
41109 #: ../tools/virt-tar.pl:162
41110 msgid "B<--download>"
41114 #: ../tools/virt-tar.pl:164
41119 #: ../tools/virt-tar.pl:166
41120 msgid "B<--upload>"
41124 #: ../tools/virt-tar.pl:168
41126 "Use I<-x> to extract (download) a directory from a virtual machine to a "
41131 #: ../tools/virt-tar.pl:171
41133 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
41134 "Please read the L</WARNING> section above before using this option."
41138 #: ../tools/virt-tar.pl:175
41139 msgid "You must specify exactly one of these options."
41143 #: ../tools/virt-tar.pl:181
41148 #: ../tools/virt-tar.pl:183
41153 #: ../tools/virt-tar.pl:185
41154 msgid "Specify that the input or output tarball is gzip-compressed."
41158 #: ../tools/virt-tar.pl:298
41160 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
41161 "L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
41162 "L<virt-tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
41163 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41167 #: ../tools/virt-win-reg.pl:37
41169 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
41174 #: ../tools/virt-win-reg.pl:41
41177 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
41182 #: ../tools/virt-win-reg.pl:43
41185 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
41190 #: ../tools/virt-win-reg.pl:45
41193 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
41198 #: ../tools/virt-win-reg.pl:47
41201 " virt-win-reg --merge domname [input.reg ...]\n"
41206 #: ../tools/virt-win-reg.pl:49
41209 " virt-win-reg [--options] disk.img ... # instead of domname\n"
41214 #: ../tools/virt-win-reg.pl:53
41216 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
41217 "virtual machines. If you do this, you I<will> get irreversible disk "
41218 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
41219 "but doesn't catch all cases."
41223 #: ../tools/virt-win-reg.pl:58
41225 "Modifying the Windows Registry is an inherently risky operation. The format "
41226 "is deliberately obscure and undocumented, and Registry changes can leave the "
41227 "system unbootable. Therefore when using the I<--merge> option, make sure "
41228 "you have a reliable backup first."
41232 #: ../tools/virt-win-reg.pl:65
41234 "This program can export and merge Windows Registry entries from a Windows "
41239 #: ../tools/virt-win-reg.pl:68
41241 "The first parameter is the libvirt guest name or the raw disk image of a "
41246 #: ../tools/virt-win-reg.pl:71
41248 "If I<--merge> is I<not> specified, then the chosen registry key is "
41249 "displayed/exported (recursively). For example:"
41253 #: ../tools/virt-win-reg.pl:74
41256 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
41261 #: ../tools/virt-win-reg.pl:76
41262 msgid "You can also display single values from within registry keys, for example:"
41266 #: ../tools/virt-win-reg.pl:79
41269 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
41270 " $ virt-win-reg Windows7 $cvkey ProductName\n"
41271 " Windows 7 Enterprise\n"
41276 #: ../tools/virt-win-reg.pl:83
41278 "With I<--merge>, you can merge a textual regedit file into the Windows "
41283 #: ../tools/virt-win-reg.pl:86
41286 " $ virt-win-reg --merge Windows7 changes.reg\n"
41291 #: ../tools/virt-win-reg.pl:90
41293 "This program is only meant for simple access to the registry. If you want "
41294 "to do complicated things with the registry, we suggest you download the "
41295 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
41296 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
41297 "L<hivexregedit(1)>."
41301 #: ../tools/virt-win-reg.pl:159
41306 #: ../tools/virt-win-reg.pl:161
41308 "In merge mode, this merges a textual regedit file into the Windows Registry "
41309 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
41310 "displays or exports Registry entries instead."
41314 #: ../tools/virt-win-reg.pl:165
41316 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
41317 "result in disk corruption. However exporting (without this flag) is always "
41322 #: ../tools/virt-win-reg.pl:173
41323 msgid "B<--encoding> UTF-16LE|ASCII"
41327 #: ../tools/virt-win-reg.pl:175
41329 "When merging (only), you may need to specify the encoding for strings to be "
41330 "used in the hive file. This is explained in detail in "
41331 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
41335 #: ../tools/virt-win-reg.pl:179
41337 "The default is to use UTF-16LE, which should work with recent versions of "
41342 #: ../tools/virt-win-reg.pl:186
41343 msgid "B<--unsafe-printable-strings>"
41347 #: ../tools/virt-win-reg.pl:188
41349 "When exporting (only), assume strings are UTF-16LE and print them as strings "
41350 "instead of hex sequences. Remove the final zero codepoint from strings if "
41355 #: ../tools/virt-win-reg.pl:192
41357 "This is unsafe and does not preserve the fidelity of strings in the original "
41358 "Registry for various reasons:"
41362 #: ../tools/virt-win-reg.pl:199
41364 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
41365 "other encodings will be corrupted by this transformation."
41369 #: ../tools/virt-win-reg.pl:204
41371 "Assumes that everything which has type 1 or 2 is really a string and that "
41372 "everything else is not a string, but the type field in real Registries is "
41377 #: ../tools/virt-win-reg.pl:210
41379 "Loses information about whether a zero codepoint followed the string in the "
41384 #: ../tools/virt-win-reg.pl:215
41386 "This all happens because the Registry itself contains no information about "
41387 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
41391 #: ../tools/virt-win-reg.pl:219
41393 "You should only use this option for quick hacking and debugging of the "
41394 "Registry contents, and I<never> use it if the output is going to be passed "
41395 "into another program or stored in another Registry."
41399 #: ../tools/virt-win-reg.pl:556
41400 msgid "SUPPORTED SYSTEMS"
41404 #: ../tools/virt-win-reg.pl:558
41406 "The program currently supports Windows NT-derived guests starting with "
41407 "Windows XP through to at least Windows 7."
41411 #: ../tools/virt-win-reg.pl:561
41412 msgid "The following Registry keys are supported:"
41416 #: ../tools/virt-win-reg.pl:565
41417 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
41421 #: ../tools/virt-win-reg.pl:567
41422 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
41426 #: ../tools/virt-win-reg.pl:569
41427 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
41431 #: ../tools/virt-win-reg.pl:571
41432 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
41436 #: ../tools/virt-win-reg.pl:573
41437 msgid "C<HKEY_USERS\\.DEFAULT>"
41441 #: ../tools/virt-win-reg.pl:575
41442 msgid "C<HKEY_USERS\\I<SID>>"
41446 #: ../tools/virt-win-reg.pl:577
41447 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
41451 #: ../tools/virt-win-reg.pl:579
41452 msgid "C<HKEY_USERS\\I<username>>"
41456 #: ../tools/virt-win-reg.pl:581
41457 msgid "where I<username> is a local user name (this is a libguestfs extension)."
41461 #: ../tools/virt-win-reg.pl:585
41463 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
41468 #: ../tools/virt-win-reg.pl:588
41470 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
41471 "supported (there is no \"current user\")."
41475 #: ../tools/virt-win-reg.pl:591
41480 #: ../tools/virt-win-reg.pl:593
41482 "C<virt-win-reg> expects that regedit files have already been reencoded in "
41483 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
41484 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
41485 "with Windows-style line endings, you may need to reencode the whole file "
41486 "before or after processing."
41490 #: ../tools/virt-win-reg.pl:599
41492 "To reencode a file from Windows format to Linux (before processing it with "
41493 "the I<--merge> option), you would do something like this:"
41497 #: ../tools/virt-win-reg.pl:602
41500 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
41505 #: ../tools/virt-win-reg.pl:604
41507 "To go in the opposite direction, after exporting and before sending the file "
41508 "to a Windows user, do something like this:"
41512 #: ../tools/virt-win-reg.pl:607
41515 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
41520 #: ../tools/virt-win-reg.pl:609
41521 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
41525 #: ../tools/virt-win-reg.pl:611
41527 "If you are unsure about the current encoding, use the L<file(1)> command. "
41528 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
41529 "Windows-style (CRLF) line endings, like this:"
41533 #: ../tools/virt-win-reg.pl:615
41536 " $ file software.reg\n"
41537 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
41538 " with CRLF line terminators\n"
41543 #: ../tools/virt-win-reg.pl:619
41544 msgid "This file would need conversion before you could I<--merge> it."
41548 #: ../tools/virt-win-reg.pl:621
41549 msgid "CurrentControlSet etc."
41553 #: ../tools/virt-win-reg.pl:623
41555 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
41556 "Registry at the level of the hive file, and therefore you cannot modify "
41561 #: ../tools/virt-win-reg.pl:627
41563 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
41564 "circumstances it might refer to another control set. The way to find out is "
41565 "to look at the C<HKLM\\SYSTEM\\Select> key:"
41569 #: ../tools/virt-win-reg.pl:631
41572 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
41573 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
41574 " \"Current\"=dword:00000001\n"
41575 " \"Default\"=dword:00000001\n"
41576 " \"Failed\"=dword:00000000\n"
41577 " \"LastKnownGood\"=dword:00000002\n"
41582 #: ../tools/virt-win-reg.pl:638
41583 msgid "\"Current\" is the one which Windows will choose when it boots."
41587 #: ../tools/virt-win-reg.pl:640
41588 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
41592 #: ../tools/virt-win-reg.pl:643
41593 msgid "DELETING REGISTRY KEYS AND VALUES"
41597 #: ../tools/virt-win-reg.pl:645
41598 msgid "To delete a whole registry key, use the syntax:"
41602 #: ../tools/virt-win-reg.pl:647
41605 " [-HKEY_LOCAL_MACHINE\\Foo]\n"
41610 #: ../tools/virt-win-reg.pl:649
41611 msgid "To delete a single value within a key, use the syntax:"
41615 #: ../tools/virt-win-reg.pl:651
41618 " [HKEY_LOCAL_MACHINE\\Foo]\n"
41624 #: ../tools/virt-win-reg.pl:654
41625 msgid "WINDOWS TIPS"
41629 #: ../tools/virt-win-reg.pl:656
41631 "Note that some of these tips modify the guest disk image. The guest I<must> "
41632 "be shut off, else you will get disk corruption."
41636 #: ../tools/virt-win-reg.pl:659
41637 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
41641 #: ../tools/virt-win-reg.pl:661
41643 "Prepare a DOS batch script, VBScript or executable. Upload this using "
41644 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
41645 "is uploaded into C<C:\\>:"
41649 #: ../tools/virt-win-reg.pl:665
41652 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
41657 #: ../tools/virt-win-reg.pl:667
41658 msgid "Prepare a regedit file containing the registry change:"
41662 #: ../tools/virt-win-reg.pl:669
41665 " cat > test.reg <<'EOF'\n"
41666 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
41667 " \"Test\"=\"c:\\\\test.bat\"\n"
41673 #: ../tools/virt-win-reg.pl:674
41675 "In this example we use the key C<RunOnce> which means that the script will "
41676 "run precisely once when the first user logs in. If you want it to run every "
41677 "time a user logs in, replace C<RunOnce> with C<Run>."
41681 #: ../tools/virt-win-reg.pl:678
41682 msgid "Now update the registry:"
41686 #: ../tools/virt-win-reg.pl:680
41689 " virt-win-reg --merge WindowsGuest test.reg\n"
41694 #: ../tools/virt-win-reg.pl:682
41695 msgid "INSTALLING A SERVICE"
41699 #: ../tools/virt-win-reg.pl:684
41701 "This section assumes you are familiar with Windows services, and you either "
41702 "have a program which handles the Windows Service Control Protocol directly "
41703 "or you want to run any program using a service wrapper like SrvAny or the "
41708 #: ../tools/virt-win-reg.pl:689
41710 "First upload the program and optionally the service wrapper. In this case "
41711 "the test program is called C<test.exe> and we are using the RHSrvAny "
41716 #: ../tools/virt-win-reg.pl:693
41719 " guestfish -i -d WindowsGuest <<EOF\n"
41720 " upload rhsrvany.exe /rhsrvany.exe\n"
41721 " upload test.exe /test.exe\n"
41727 #: ../tools/virt-win-reg.pl:698
41729 "Prepare a regedit file containing the registry changes. In this example, "
41730 "the first registry change is needed for the service itself or the service "
41731 "wrapper (if used). The second registry change is only needed because I am "
41732 "using the RHSrvAny service wrapper."
41736 #: ../tools/virt-win-reg.pl:703
41739 " cat > service.reg <<'EOF'\n"
41740 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
41741 " \"Type\"=dword:00000010\n"
41742 " \"Start\"=dword:00000002\n"
41743 " \"ErrorControl\"=dword:00000001\n"
41744 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
41745 " \"DisplayName\"=\"RHSrvAny\"\n"
41746 " \"ObjectName\"=\"NetworkService\"\n"
41751 #: ../tools/virt-win-reg.pl:712
41754 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
41755 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
41756 " \"PWD\"=\"c:\\\\Temp\"\n"
41762 #: ../tools/virt-win-reg.pl:723
41764 "For use of C<ControlSet001> see the section above in this manual page. You "
41765 "may need to adjust this according to the control set that is in use by the "
41770 #: ../tools/virt-win-reg.pl:729
41772 "C<\"ObjectName\"> controls the privileges that the service will have. An "
41773 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
41774 "privileged account."
41778 #: ../tools/virt-win-reg.pl:735
41780 "For the meaning of the magic numbers, see this Microsoft KB article: "
41781 "L<http://support.microsoft.com/kb/103000>."
41785 #: ../tools/virt-win-reg.pl:740
41786 msgid "Update the registry:"
41790 #: ../tools/virt-win-reg.pl:742
41793 " virt-win-reg --merge WindowsGuest service.reg\n"
41798 #: ../tools/virt-win-reg.pl:746
41800 "Be careful when passing parameters containing C<\\> (backslash) in the "
41801 "shell. Usually you will have to use 'single quotes' or double backslashes "
41802 "(but not both) to protect them from the shell."
41806 #: ../tools/virt-win-reg.pl:750
41807 msgid "Paths and value names are case-insensitive."
41811 #: ../tools/virt-win-reg.pl:759
41813 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
41814 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
41815 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
41816 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41820 #: ../tools/virt-win-reg.pl:777
41823 " export LIBGUESTFS_DEBUG=1\n"
41824 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
41829 #: ../tools/virt-win-reg.pl:780
41831 "Attach /tmp/virt-win-reg.log to a new bug report at "
41832 "L<https://bugzilla.redhat.com/>"