1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Red Hat Inc.
3 # This file is distributed under the same license as the libguestfs package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
9 "Project-Id-Version: libguestfs 1.15.4\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2011-11-17 13:11+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 ../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 ../fish/guestfish.pod:30 ../fish/virt-copy-in.pod:19 ../fish/virt-copy-out.pod:13 ../fish/virt-tar-in.pod:21 ../fish/virt-tar-out.pod:15 ../fuse/guestmount.pod:20 ../inspector/virt-inspector.pod:19 ../java/examples/guestfs-java.pod:15 ../ocaml/examples/guestfs-ocaml.pod:25 ../perl/examples/guestfs-perl.pod:18 ../python/examples/guestfs-python.pod:14 ../rescue/virt-rescue.pod:31 ../resize/virt-resize.pod:13 ../ruby/examples/guestfs-ruby.pod:15 ../sparsify/virt-sparsify.pod:11 ../src/guestfs.pod:23 ../test-tool/libguestfs-test-tool.pod:11 ../tools/virt-list-filesystems.pl:40 ../tools/virt-list-partitions.pl:40 ../tools/virt-make-fs.pl:47 ../tools/virt-tar.pl:77 ../tools/virt-win-reg.pl:63
57 #: ../align/virt-alignment-scan.pod:15
59 "When older operating systems install themselves, the partitioning tools "
60 "place partitions at a sector misaligned with the underlying storage "
61 "(commonly the first partition starts on sector C<63>). Misaligned "
62 "partitions can result in an operating system issuing more I/O than should be "
67 #: ../align/virt-alignment-scan.pod:21
69 "The virt-alignment-scan tool checks the alignment of partitions in virtual "
70 "machines and disk images and warns you if there are alignment problems."
74 #: ../align/virt-alignment-scan.pod:25
76 "Currently there is no virt tool for fixing alignment problems. You can only "
77 "reinstall the guest operating system. The following NetApp document "
78 "summarises the problem and possible solutions: "
79 "L<http://media.netapp.com/documents/tr-3747.pdf>"
83 #: ../align/virt-alignment-scan.pod:30
88 #: ../align/virt-alignment-scan.pod:32
89 msgid "To run this tool on a disk image directly, use the I<-a> option:"
93 #: ../align/virt-alignment-scan.pod:34
96 " $ virt-alignment-scan -a winxp.img\n"
97 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
102 #: ../align/virt-alignment-scan.pod:37
105 " $ virt-alignment-scan -a fedora16.img\n"
106 " /dev/sda1 1048576 1024K ok\n"
107 " /dev/sda2 2097152 2048K ok\n"
108 " /dev/sda3 526385152 2048K ok\n"
113 #: ../align/virt-alignment-scan.pod:42
115 "To run the tool on a guest known to libvirt, use the I<-d> option and "
116 "possibly the I<-c> option:"
120 #: ../align/virt-alignment-scan.pod:45
123 " # virt-alignment-scan -d RHEL5\n"
124 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
125 " /dev/sda2 106928640 512 bad (alignment < 4K)\n"
130 #: ../align/virt-alignment-scan.pod:49
133 " $ virt-alignment-scan -c qemu:///system -d Win7TwoDisks\n"
134 " /dev/sda1 1048576 1024K ok\n"
135 " /dev/sda2 105906176 1024K ok\n"
136 " /dev/sdb1 65536 64K ok\n"
141 #: ../align/virt-alignment-scan.pod:54
143 "The output consists of 4 or more whitespace-separated columns. Only the "
144 "first 4 columns are signficant if you want to parse this from a program. "
149 #: ../align/virt-alignment-scan.pod:60
154 #: ../align/virt-alignment-scan.pod:62
156 "the device and partition name (eg. C</dev/sda1> meaning the first partition "
157 "on the first block device)"
161 #: ../align/virt-alignment-scan.pod:65
166 #: ../align/virt-alignment-scan.pod:67
167 msgid "the start of the partition in bytes"
171 #: ../align/virt-alignment-scan.pod:69
176 #: ../align/virt-alignment-scan.pod:71
177 msgid "the alignment in bytes or Kbytes (eg. C<512> or C<4K>)"
181 #: ../align/virt-alignment-scan.pod:73
186 #: ../align/virt-alignment-scan.pod:75
188 "C<ok> if the alignment is best for performance, or C<bad> if the alignment "
189 "can cause performance problems"
193 #: ../align/virt-alignment-scan.pod:78
198 #: ../align/virt-alignment-scan.pod:80
199 msgid "optional free-text explanation."
203 #: ../align/virt-alignment-scan.pod:84
205 "The exit code from the program changes depending on whether poorly aligned "
206 "partitions were found. See L</EXIT STATUS> below."
210 #: ../align/virt-alignment-scan.pod:87
211 msgid "If you just want the exit code with no output, use the I<-q> option."
215 #: ../align/virt-alignment-scan.pod:89 ../cat/virt-cat.pod:62 ../cat/virt-filesystems.pod:91 ../cat/virt-ls.pod:261 ../clone/virt-sysprep.pod:42 ../df/virt-df.pod:59 ../edit/virt-edit.pod:62 ../fish/guestfish.pod:148 ../fish/virt-copy-in.pod:45 ../fish/virt-copy-out.pod:34 ../fish/virt-tar-in.pod:42 ../fish/virt-tar-out.pod:36 ../fuse/guestmount.pod:92 ../inspector/virt-inspector.pod:55 ../rescue/virt-rescue.pod:112 ../resize/virt-resize.pod:262 ../sparsify/virt-sparsify.pod:99 ../test-tool/libguestfs-test-tool.pod:36 ../tools/virt-list-filesystems.pl:53 ../tools/virt-list-partitions.pl:54 ../tools/virt-make-fs.pl:153 ../tools/virt-tar.pl:103 ../tools/virt-win-reg.pl:96
220 #: ../align/virt-alignment-scan.pod:93 ../cat/virt-cat.pod:66 ../cat/virt-filesystems.pod:95 ../cat/virt-ls.pod:265 ../clone/virt-sysprep.pod:46 ../df/virt-df.pod:63 ../edit/virt-edit.pod:66 ../fish/guestfish.pod:152 ../fuse/guestmount.pod:160 ../inspector/virt-inspector.pod:59 ../rescue/virt-rescue.pod:116 ../resize/virt-resize.pod:266 ../sparsify/virt-sparsify.pod:103 ../test-tool/libguestfs-test-tool.pod:40 ../tools/virt-list-filesystems.pl:61 ../tools/virt-list-partitions.pl:62 ../tools/virt-make-fs.pl:161 ../tools/virt-tar.pl:111 ../tools/virt-win-reg.pl:104
225 #: ../align/virt-alignment-scan.pod:95 ../cat/virt-cat.pod:68 ../cat/virt-filesystems.pod:97 ../cat/virt-ls.pod:267 ../clone/virt-sysprep.pod:48 ../df/virt-df.pod:65 ../edit/virt-edit.pod:68 ../inspector/virt-inspector.pod:61 ../rescue/virt-rescue.pod:118 ../tools/virt-list-filesystems.pl:63 ../tools/virt-list-partitions.pl:64 ../tools/virt-make-fs.pl:163 ../tools/virt-tar.pl:113 ../tools/virt-win-reg.pl:106
226 msgid "Display brief help."
230 #: ../align/virt-alignment-scan.pod:97 ../cat/virt-cat.pod:70 ../cat/virt-filesystems.pod:99 ../cat/virt-ls.pod:269 ../clone/virt-sysprep.pod:50 ../df/virt-df.pod:67 ../edit/virt-edit.pod:70 ../inspector/virt-inspector.pod:63 ../rescue/virt-rescue.pod:120
235 #: ../align/virt-alignment-scan.pod:99 ../cat/virt-cat.pod:72 ../cat/virt-filesystems.pod:101 ../cat/virt-ls.pod:271 ../clone/virt-sysprep.pod:52 ../df/virt-df.pod:69 ../edit/virt-edit.pod:72 ../inspector/virt-inspector.pod:65 ../rescue/virt-rescue.pod:122
236 msgid "B<--add> file"
240 #: ../align/virt-alignment-scan.pod:101 ../clone/virt-sysprep.pod:54
241 msgid "Add I<file> which should be a disk image from a virtual machine."
245 #: ../align/virt-alignment-scan.pod:103 ../cat/virt-cat.pod:78 ../cat/virt-filesystems.pod:107 ../cat/virt-ls.pod:277 ../clone/virt-sysprep.pod:56 ../df/virt-df.pod:75 ../edit/virt-edit.pod:78 ../fish/guestfish.pod:174 ../fuse/guestmount.pod:102 ../inspector/virt-inspector.pod:71 ../rescue/virt-rescue.pod:128
247 "The format of the disk image is auto-detected. To override this and force a "
248 "particular format use the I<--format=..> option."
252 #: ../align/virt-alignment-scan.pod:106 ../cat/virt-cat.pod:81 ../cat/virt-filesystems.pod:125 ../cat/virt-ls.pod:291 ../clone/virt-sysprep.pod:59 ../df/virt-df.pod:78 ../rescue/virt-rescue.pod:135
257 #: ../align/virt-alignment-scan.pod:108 ../cat/virt-cat.pod:83 ../cat/virt-filesystems.pod:127 ../cat/virt-ls.pod:293 ../clone/virt-sysprep.pod:61 ../df/virt-df.pod:80 ../rescue/virt-rescue.pod:137
258 msgid "B<--connect> URI"
262 #: ../align/virt-alignment-scan.pod:110 ../cat/virt-cat.pod:85 ../cat/virt-filesystems.pod:129 ../cat/virt-ls.pod:295 ../clone/virt-sysprep.pod:63 ../df/virt-df.pod:82 ../edit/virt-edit.pod:99 ../inspector/virt-inspector.pod:78 ../rescue/virt-rescue.pod:139 ../tools/virt-list-filesystems.pl:81 ../tools/virt-list-partitions.pl:82 ../tools/virt-tar.pl:131 ../tools/virt-win-reg.pl:132
264 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
265 "to the default libvirt hypervisor."
269 #: ../align/virt-alignment-scan.pod:113 ../cat/virt-cat.pod:88 ../cat/virt-filesystems.pod:132 ../cat/virt-ls.pod:298 ../clone/virt-sysprep.pod:66 ../df/virt-df.pod:85 ../rescue/virt-rescue.pod:142
271 "If you specify guest block devices directly (I<-a>), then libvirt is not "
276 #: ../align/virt-alignment-scan.pod:116 ../cat/virt-cat.pod:91 ../cat/virt-filesystems.pod:141 ../cat/virt-ls.pod:307 ../clone/virt-sysprep.pod:69 ../df/virt-df.pod:94 ../edit/virt-edit.pod:105 ../inspector/virt-inspector.pod:85 ../rescue/virt-rescue.pod:145
281 #: ../align/virt-alignment-scan.pod:118 ../cat/virt-cat.pod:93 ../cat/virt-filesystems.pod:143 ../cat/virt-ls.pod:309 ../clone/virt-sysprep.pod:71 ../df/virt-df.pod:96 ../edit/virt-edit.pod:107 ../inspector/virt-inspector.pod:87 ../rescue/virt-rescue.pod:147
282 msgid "B<--domain> guest"
286 #: ../align/virt-alignment-scan.pod:120 ../cat/virt-cat.pod:95 ../cat/virt-filesystems.pod:145 ../cat/virt-ls.pod:311 ../clone/virt-sysprep.pod:73 ../df/virt-df.pod:98 ../edit/virt-edit.pod:109 ../inspector/virt-inspector.pod:89 ../rescue/virt-rescue.pod:149
288 "Add all the disks from the named libvirt guest. Domain UUIDs can be used "
293 #: ../align/virt-alignment-scan.pod:123 ../cat/virt-cat.pod:105 ../cat/virt-filesystems.pod:170 ../cat/virt-ls.pod:328 ../clone/virt-sysprep.pod:95 ../df/virt-df.pod:101 ../fish/guestfish.pod:233 ../fuse/guestmount.pod:142 ../inspector/virt-inspector.pod:99 ../rescue/virt-rescue.pod:152
294 msgid "B<--format=raw|qcow2|..>"
298 #: ../align/virt-alignment-scan.pod:125 ../cat/virt-cat.pod:107 ../cat/virt-filesystems.pod:172 ../cat/virt-ls.pod:330 ../clone/virt-sysprep.pod:97 ../df/virt-df.pod:103 ../edit/virt-edit.pod:134 ../fish/guestfish.pod:235 ../fuse/guestmount.pod:144 ../inspector/virt-inspector.pod:101 ../rescue/virt-rescue.pod:154
303 #: ../align/virt-alignment-scan.pod:127 ../cat/virt-cat.pod:109 ../cat/virt-filesystems.pod:174 ../cat/virt-ls.pod:332 ../clone/virt-sysprep.pod:99 ../df/virt-df.pod:105 ../edit/virt-edit.pod:136 ../fish/guestfish.pod:237 ../fuse/guestmount.pod:146 ../rescue/virt-rescue.pod:156
305 "The default for the I<-a> option is to auto-detect the format of the disk "
306 "image. Using this forces the disk format for I<-a> options which follow on "
307 "the command line. Using I<--format> with no argument switches back to "
308 "auto-detection for subsequent I<-a> options."
312 #: ../align/virt-alignment-scan.pod:132 ../cat/virt-cat.pod:114 ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337 ../clone/virt-sysprep.pod:104 ../df/virt-df.pod:110 ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242 ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:351 ../rescue/virt-rescue.pod:161 ../src/guestfs.pod:2877
317 #: ../align/virt-alignment-scan.pod:134
320 " virt-alignment-scan --format=raw -a disk.img\n"
325 #: ../align/virt-alignment-scan.pod:136 ../cat/virt-cat.pod:118 ../cat/virt-filesystems.pod:183 ../cat/virt-ls.pod:341 ../clone/virt-sysprep.pod:108 ../df/virt-df.pod:114 ../edit/virt-edit.pod:145 ../fish/guestfish.pod:246 ../rescue/virt-rescue.pod:165
326 msgid "forces raw format (no auto-detection) for C<disk.img>."
330 #: ../align/virt-alignment-scan.pod:138
333 " virt-alignment-scan --format=raw -a disk.img --format -a another.img\n"
338 #: ../align/virt-alignment-scan.pod:140 ../cat/virt-cat.pod:122 ../cat/virt-filesystems.pod:187 ../cat/virt-ls.pod:345 ../clone/virt-sysprep.pod:112 ../df/virt-df.pod:118 ../edit/virt-edit.pod:149 ../fish/guestfish.pod:250 ../rescue/virt-rescue.pod:169
340 "forces raw format (no auto-detection) for C<disk.img> and reverts to "
341 "auto-detection for C<another.img>."
345 #: ../align/virt-alignment-scan.pod:143 ../cat/virt-cat.pod:125 ../cat/virt-filesystems.pod:190 ../cat/virt-ls.pod:348 ../clone/virt-sysprep.pod:115 ../df/virt-df.pod:121 ../edit/virt-edit.pod:152 ../rescue/virt-rescue.pod:172
347 "If you have untrusted raw-format guest disk images, you should use this "
348 "option to specify the disk format. This avoids a possible security problem "
349 "with malicious guests (CVE-2010-3851)."
353 #: ../align/virt-alignment-scan.pod:147 ../resize/virt-resize.pod:491 ../sparsify/virt-sparsify.pod:153
358 #: ../align/virt-alignment-scan.pod:149 ../resize/virt-resize.pod:493 ../sparsify/virt-sparsify.pod:155
363 #: ../align/virt-alignment-scan.pod:151
365 "Don't produce any output. Just set the exit code (see L</EXIT STATUS> "
370 #: ../align/virt-alignment-scan.pod:154 ../cat/virt-cat.pod:134 ../cat/virt-filesystems.pod:261 ../cat/virt-ls.pod:425 ../clone/virt-sysprep.pod:138 ../df/virt-df.pod:173 ../edit/virt-edit.pod:161 ../fish/guestfish.pod:390 ../fuse/guestmount.pod:266 ../inspector/virt-inspector.pod:119 ../rescue/virt-rescue.pod:219 ../sparsify/virt-sparsify.pod:159
375 #: ../align/virt-alignment-scan.pod:156 ../cat/virt-cat.pod:136 ../cat/virt-filesystems.pod:263 ../cat/virt-ls.pod:427 ../clone/virt-sysprep.pod:140 ../df/virt-df.pod:175 ../edit/virt-edit.pod:163 ../fish/guestfish.pod:392 ../fuse/guestmount.pod:268 ../inspector/virt-inspector.pod:121 ../rescue/virt-rescue.pod:221 ../sparsify/virt-sparsify.pod:161
380 #: ../align/virt-alignment-scan.pod:158 ../cat/virt-cat.pod:138 ../cat/virt-filesystems.pod:265 ../cat/virt-ls.pod:429 ../clone/virt-sysprep.pod:142 ../df/virt-df.pod:177 ../edit/virt-edit.pod:165 ../inspector/virt-inspector.pod:123 ../rescue/virt-rescue.pod:223 ../sparsify/virt-sparsify.pod:163
381 msgid "Enable verbose messages for debugging."
385 #: ../align/virt-alignment-scan.pod:160 ../cat/virt-cat.pod:140 ../cat/virt-filesystems.pod:267 ../cat/virt-ls.pod:431 ../clone/virt-sysprep.pod:144 ../df/virt-df.pod:179 ../edit/virt-edit.pod:167 ../fish/guestfish.pod:397 ../fuse/guestmount.pod:272 ../inspector/virt-inspector.pod:125 ../rescue/virt-rescue.pod:225 ../resize/virt-resize.pod:561 ../sparsify/virt-sparsify.pod:165
390 #: ../align/virt-alignment-scan.pod:162 ../cat/virt-cat.pod:142 ../cat/virt-filesystems.pod:269 ../cat/virt-ls.pod:433 ../clone/virt-sysprep.pod:146 ../df/virt-df.pod:181 ../edit/virt-edit.pod:169 ../fish/guestfish.pod:399 ../fuse/guestmount.pod:274 ../inspector/virt-inspector.pod:127 ../rescue/virt-rescue.pod:227 ../resize/virt-resize.pod:563 ../sparsify/virt-sparsify.pod:167 ../tools/virt-list-filesystems.pl:69 ../tools/virt-list-partitions.pl:70 ../tools/virt-make-fs.pl:169 ../tools/virt-tar.pl:119 ../tools/virt-win-reg.pl:112
395 #: ../align/virt-alignment-scan.pod:164 ../cat/virt-cat.pod:144 ../cat/virt-filesystems.pod:271 ../cat/virt-ls.pod:435 ../clone/virt-sysprep.pod:148 ../df/virt-df.pod:183 ../edit/virt-edit.pod:171 ../inspector/virt-inspector.pod:129 ../rescue/virt-rescue.pod:229 ../resize/virt-resize.pod:565 ../sparsify/virt-sparsify.pod:169 ../tools/virt-list-filesystems.pl:71 ../tools/virt-list-partitions.pl:72 ../tools/virt-make-fs.pl:171 ../tools/virt-tar.pl:121 ../tools/virt-win-reg.pl:114
396 msgid "Display version number and exit."
400 #: ../align/virt-alignment-scan.pod:166 ../cat/virt-cat.pod:146 ../cat/virt-filesystems.pod:281 ../cat/virt-ls.pod:437 ../clone/virt-sysprep.pod:150 ../df/virt-df.pod:185 ../edit/virt-edit.pod:173 ../fish/guestfish.pod:412 ../fuse/guestmount.pod:287 ../inspector/virt-inspector.pod:131 ../rescue/virt-rescue.pod:240 ../sparsify/virt-sparsify.pod:171 ../tools/virt-tar.pl:158
405 #: ../align/virt-alignment-scan.pod:168 ../cat/virt-cat.pod:148 ../cat/virt-filesystems.pod:283 ../cat/virt-ls.pod:439 ../clone/virt-sysprep.pod:152 ../df/virt-df.pod:187 ../edit/virt-edit.pod:175 ../inspector/virt-inspector.pod:133 ../rescue/virt-rescue.pod:242 ../sparsify/virt-sparsify.pod:173
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:215 ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:367 ../rescue/virt-rescue.pod:303 ../resize/virt-resize.pod:676 ../tools/virt-list-filesystems.pl:188 ../tools/virt-list-partitions.pl:258 ../tools/virt-make-fs.pl:550 ../tools/virt-tar.pl:289 ../tools/virt-win-reg.pl:744
677 msgid "SHELL QUOTING"
681 #: ../align/virt-alignment-scan.pod:313 ../cat/virt-cat.pod:233 ../cat/virt-filesystems.pod:375 ../cat/virt-ls.pod:485 ../clone/virt-sysprep.pod:477 ../df/virt-df.pod:217 ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:369 ../rescue/virt-rescue.pod:305 ../resize/virt-resize.pod:678 ../tools/virt-list-filesystems.pl:190 ../tools/virt-list-partitions.pl:260 ../tools/virt-make-fs.pl:552 ../tools/virt-tar.pl:291 ../tools/virt-win-reg.pl:752
683 "Libvirt guest names can contain arbitrary characters, some of which have "
684 "meaning to the shell such as C<#> and space. You may need to quote or "
685 "escape these characters on the command line. See the shell manual page "
686 "L<sh(1)> for details."
690 #: ../align/virt-alignment-scan.pod:318 ../cat/virt-cat.pod:238 ../cat/virt-filesystems.pod:380 ../cat/virt-ls.pod:490 ../clone/virt-sysprep.pod:482 ../df/virt-df.pod:222 ../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:227 ../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 ../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:3329 ../src/guestfs.pod:3333 ../src/guestfs.pod:3337 ../src/guestfs.pod:3341 ../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:227 ../edit/virt-edit.pod:354 ../erlang/examples/guestfs-erlang.pod:97 ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384 ../fish/guestfish.pod:1268 ../fish/virt-copy-in.pod:50 ../fish/virt-copy-out.pod:39 ../fish/virt-tar-in.pod:47 ../fish/virt-tar-out.pod:41 ../fuse/guestmount.pod:317 ../inspector/virt-inspector.pod:395 ../java/examples/guestfs-java.pod:45 ../ocaml/examples/guestfs-ocaml.pod:78 ../perl/examples/guestfs-perl.pod:39 ../python/examples/guestfs-python.pod:42 ../rescue/virt-rescue.pod:325 ../resize/virt-resize.pod:688 ../ruby/examples/guestfs-ruby.pod:36 ../sparsify/virt-sparsify.pod:251 ../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:235 ../edit/virt-edit.pod:368 ../rescue/virt-rescue.pod:334 ../resize/virt-resize.pod:711 ../sparsify/virt-sparsify.pod:264 ../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:237 ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:410 ../rescue/virt-rescue.pod:336 ../resize/virt-resize.pod:713 ../sparsify/virt-sparsify.pod:266 ../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:239 ../edit/virt-edit.pod:372 ../erlang/examples/guestfs-erlang.pod:114 ../examples/guestfs-examples.pod:49 ../examples/guestfs-recipes.pod:401 ../fish/guestfish.pod:1300 ../fish/virt-copy-in.pod:64 ../fish/virt-copy-out.pod:53 ../fish/virt-tar-in.pod:62 ../fish/virt-tar-out.pod:55 ../fuse/guestmount.pod:332 ../inspector/virt-inspector.pod:418 ../java/examples/guestfs-java.pod:62 ../ocaml/examples/guestfs-ocaml.pod:95 ../perl/examples/guestfs-perl.pod:56 ../python/examples/guestfs-python.pod:58 ../rescue/virt-rescue.pod:338 ../resize/virt-resize.pod:715 ../ruby/examples/guestfs-ruby.pod:52 ../sparsify/virt-sparsify.pod:268 ../src/guestfs.pod:3352 ../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:270
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:243 ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1305 ../fish/virt-copy-in.pod:69 ../fish/virt-copy-out.pod:58 ../fish/virt-tar-in.pod:67 ../fish/virt-tar-out.pod:60 ../fuse/guestmount.pod:337 ../inspector/virt-inspector.pod:422 ../rescue/virt-rescue.pod:342 ../resize/virt-resize.pod:719 ../sparsify/virt-sparsify.pod:272 ../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:248 ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1310 ../fish/virt-copy-in.pod:74 ../fish/virt-copy-out.pod:63 ../fish/virt-tar-in.pod:72 ../fish/virt-tar-out.pod:65 ../fuse/guestmount.pod:342 ../inspector/virt-inspector.pod:427 ../rescue/virt-rescue.pod:347 ../resize/virt-resize.pod:724 ../sparsify/virt-sparsify.pod:277 ../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:253 ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1315 ../fish/virt-copy-in.pod:79 ../fish/virt-copy-out.pod:68 ../fish/virt-tar-in.pod:77 ../fish/virt-tar-out.pod:70 ../fuse/guestmount.pod:347 ../inspector/virt-inspector.pod:432 ../rescue/virt-rescue.pod:352 ../resize/virt-resize.pod:729 ../sparsify/virt-sparsify.pod:282 ../test-tool/libguestfs-test-tool.pod:125 ../tools/virt-list-filesystems.pl:226 ../tools/virt-list-partitions.pl:295 ../tools/virt-make-fs.pl:600 ../tools/virt-tar.pl:329 ../tools/virt-win-reg.pl:801
801 "You should have received a copy of the GNU General Public License along with "
802 "this program; if not, write to the Free Software Foundation, Inc., 51 "
803 "Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
807 #: ../cat/virt-cat.pod:5
808 msgid "virt-cat - Display files in a virtual machine"
812 #: ../cat/virt-cat.pod:9
815 " virt-cat [--options] -d domname file [file ...]\n"
820 #: ../cat/virt-cat.pod:11
823 " virt-cat [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
828 #: ../cat/virt-cat.pod:13 ../edit/virt-edit.pod:15 ../inspector/virt-inspector.pod:13
833 #: ../cat/virt-cat.pod:15
836 " virt-cat domname file\n"
841 #: ../cat/virt-cat.pod:17
844 " virt-cat disk.img file\n"
849 #: ../cat/virt-cat.pod:21
851 "C<virt-cat> is a command line tool to display the contents of C<file> where "
852 "C<file> exists in the named virtual machine (or disk image)."
856 #: ../cat/virt-cat.pod:24
858 "Multiple filenames can be given, in which case they are concatenated "
859 "together. Each filename must be a full path, starting at the root directory "
860 "(starting with '/')."
864 #: ../cat/virt-cat.pod:28
866 "C<virt-cat> can be used to quickly view a file. To edit a file, use "
867 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
868 "tool (see L</USING GUESTFISH> below)."
872 #: ../cat/virt-cat.pod:32 ../cat/virt-ls.pod:35 ../df/virt-df.pod:43 ../edit/virt-edit.pod:44 ../fish/guestfish.pod:41 ../fish/guestfish.pod:1051 ../fish/virt-copy-in.pod:29 ../fish/virt-copy-out.pod:21 ../fish/virt-tar-in.pod:30 ../fish/virt-tar-out.pod:24 ../fuse/guestmount.pod:39 ../resize/virt-resize.pod:27 ../sparsify/virt-sparsify.pod:75 ../tools/virt-tar.pl:50
877 #: ../cat/virt-cat.pod:34
878 msgid "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
882 #: ../cat/virt-cat.pod:37
885 " virt-cat -d mydomain /etc/fstab\n"
890 #: ../cat/virt-cat.pod:39
891 msgid "List syslog messages from a VM disk image file:"
895 #: ../cat/virt-cat.pod:41
898 " virt-cat -a disk.img /var/log/messages | tail\n"
903 #: ../cat/virt-cat.pod:43
904 msgid "Find out what DHCP IP address a VM acquired:"
908 #: ../cat/virt-cat.pod:45
911 " virt-cat -d mydomain /var/log/messages | \\\n"
912 " grep 'dhclient: bound to' | tail\n"
917 #: ../cat/virt-cat.pod:48
918 msgid "Find out what packages were recently installed:"
922 #: ../cat/virt-cat.pod:50
925 " virt-cat -d mydomain /var/log/yum.log | tail\n"
930 #: ../cat/virt-cat.pod:52
931 msgid "Find out who is logged on inside a virtual machine:"
935 #: ../cat/virt-cat.pod:54
938 " virt-cat -d mydomain /var/run/utmp > /tmp/utmp\n"
944 #: ../cat/virt-cat.pod:57
945 msgid "or who was logged on:"
949 #: ../cat/virt-cat.pod:59
952 " virt-cat -d mydomain /var/log/wtmp > /tmp/wtmp\n"
953 " last -f /tmp/wtmp\n"
958 #: ../cat/virt-cat.pod:74 ../cat/virt-filesystems.pod:103 ../cat/virt-ls.pod:273 ../df/virt-df.pod:71 ../edit/virt-edit.pod:74 ../inspector/virt-inspector.pod:67 ../rescue/virt-rescue.pod:124
960 "Add I<file> which should be a disk image from a virtual machine. If the "
961 "virtual machine has multiple block devices, you must supply all of them with "
962 "separate I<-a> options."
966 #: ../cat/virt-cat.pod:98 ../cat/virt-filesystems.pod:148 ../cat/virt-ls.pod:314 ../edit/virt-edit.pod:112 ../fish/guestfish.pod:217 ../fuse/guestmount.pod:135 ../inspector/virt-inspector.pod:92
967 msgid "B<--echo-keys>"
971 #: ../cat/virt-cat.pod:100
973 "When prompting for keys and passphrases, virt-cat normally turns echoing off "
974 "so you cannot see what you are typing. If you are not worried about Tempest "
975 "attacks and there is no one else in the room you can specify this flag to "
976 "see what you are typing."
980 #: ../cat/virt-cat.pod:116
983 " virt-cat --format=raw -a disk.img file\n"
988 #: ../cat/virt-cat.pod:120
991 " virt-cat --format=raw -a disk.img --format -a another.img file\n"
996 #: ../cat/virt-cat.pod:129 ../cat/virt-filesystems.pod:200 ../cat/virt-ls.pod:361 ../edit/virt-edit.pod:156 ../fish/guestfish.pod:289 ../fuse/guestmount.pod:172 ../inspector/virt-inspector.pod:114
997 msgid "B<--keys-from-stdin>"
1001 #: ../cat/virt-cat.pod:131 ../cat/virt-filesystems.pod:202 ../cat/virt-ls.pod:363 ../edit/virt-edit.pod:158 ../fish/guestfish.pod:291 ../fuse/guestmount.pod:174 ../inspector/virt-inspector.pod:116
1003 "Read key or passphrase parameters from stdin. The default is to try to read "
1004 "passphrases from the user by opening C</dev/tty>."
1008 #: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179 ../inspector/virt-inspector.pod:144 ../rescue/virt-rescue.pod:246
1009 msgid "OLD-STYLE COMMAND LINE ARGUMENTS"
1013 #: ../cat/virt-cat.pod:154
1014 msgid "Previous versions of virt-cat allowed you to write either:"
1018 #: ../cat/virt-cat.pod:156
1021 " virt-cat disk.img [disk.img ...] file\n"
1026 #: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185 ../inspector/virt-inspector.pod:150 ../rescue/virt-rescue.pod:252
1031 #: ../cat/virt-cat.pod:160
1034 " virt-cat guestname file\n"
1039 #: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189 ../inspector/virt-inspector.pod:154 ../rescue/virt-rescue.pod:256
1041 "whereas in this version you should use I<-a> or I<-d> respectively to avoid "
1042 "the confusing case where a disk image might have the same name as a guest."
1046 #: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193 ../inspector/virt-inspector.pod:158 ../rescue/virt-rescue.pod:260
1047 msgid "For compatibility the old style is still supported."
1051 #: ../cat/virt-cat.pod:168 ../edit/virt-edit.pod:257 ../fish/guestfish.pod:858
1052 msgid "WINDOWS PATHS"
1056 #: ../cat/virt-cat.pod:170
1058 "C<virt-cat> has a limited ability to understand Windows drive letters and "
1059 "paths (eg. C<E:\\foo\\bar.txt>)."
1063 #: ../cat/virt-cat.pod:173 ../edit/virt-edit.pod:262
1064 msgid "If and only if the guest is running Windows then:"
1068 #: ../cat/virt-cat.pod:179 ../edit/virt-edit.pod:268
1070 "Drive letter prefixes like C<C:> are resolved against the Windows Registry "
1071 "to the correct filesystem."
1075 #: ../cat/virt-cat.pod:184 ../edit/virt-edit.pod:273
1077 "Any backslash (C<\\>) characters in the path are replaced with forward "
1078 "slashes so that libguestfs can process it."
1082 #: ../cat/virt-cat.pod:189
1084 "The path is resolved case insensitively to locate the file that should be "
1089 #: ../cat/virt-cat.pod:194 ../edit/virt-edit.pod:283
1090 msgid "There are some known shortcomings:"
1094 #: ../cat/virt-cat.pod:200 ../edit/virt-edit.pod:289
1095 msgid "Some NTFS symbolic links may not be followed correctly."
1099 #: ../cat/virt-cat.pod:204 ../edit/virt-edit.pod:293
1100 msgid "NTFS junction points that cross filesystems are not followed."
1104 #: ../cat/virt-cat.pod:208 ../edit/virt-edit.pod:297
1105 msgid "USING GUESTFISH"
1109 #: ../cat/virt-cat.pod:210
1111 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
1112 "C<virt-cat> doesn't work."
1116 #: ../cat/virt-cat.pod:213
1117 msgid "Using C<virt-cat> is approximately equivalent to doing:"
1121 #: ../cat/virt-cat.pod:215
1124 " guestfish --ro -i -d domname download file -\n"
1129 #: ../cat/virt-cat.pod:217
1131 "where C<domname> is the name of the libvirt guest, and C<file> is the full "
1132 "path to the file. Note the final C<-> (meaning \"output to stdout\")."
1136 #: ../cat/virt-cat.pod:221
1138 "The command above uses libguestfs's guest inspection feature and so does not "
1139 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
1140 "disk images that don't contain guests. To display a file from a disk image "
1145 #: ../cat/virt-cat.pod:226
1148 " guestfish --ro -a disk.img -m /dev/sda1 download file -\n"
1153 #: ../cat/virt-cat.pod:228
1155 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
1156 "the disk image, and C<file> is the full path to the file."
1160 #: ../cat/virt-cat.pod:240 ../cat/virt-filesystems.pod:382 ../cat/virt-ls.pod:492 ../df/virt-df.pod:224 ../edit/virt-edit.pod:351 ../fuse/guestmount.pod:314 ../inspector/virt-inspector.pod:392 ../resize/virt-resize.pod:685 ../sparsify/virt-sparsify.pod:229
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:191
1761 msgid "NOTE ABOUT CSV FORMAT"
1765 #: ../cat/virt-filesystems.pod:351 ../cat/virt-ls.pod:461 ../df/virt-df.pod:193
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:196
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:199
1782 " \"foo,bar\",baz\n"
1787 #: ../cat/virt-filesystems.pod:359 ../cat/virt-ls.pod:469 ../df/virt-df.pod:201
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:204
1803 #: ../cat/virt-filesystems.pod:365 ../cat/virt-ls.pod:475 ../df/virt-df.pod:207
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:210
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:213
1818 msgid "Most spreadsheets and databases can import CSV directly."
1822 #: ../cat/virt-filesystems.pod:387
1824 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-df(1)>, "
1825 "L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, L<csvtool(1)>, "
1826 "L<http://libguestfs.org/>."
1830 #: ../cat/virt-filesystems.pod:402 ../tools/virt-win-reg.pl:789
1831 msgid "Copyright (C) 2010 Red Hat Inc."
1835 #: ../cat/virt-ls.pod:5
1836 msgid "virt-ls - List files in a virtual machine"
1840 #: ../cat/virt-ls.pod:9
1843 " virt-ls [--options] -d domname directory [directory ...]\n"
1848 #: ../cat/virt-ls.pod:11
1851 " virt-ls [--options] -a disk.img [-a disk.img ...] directory [directory "
1857 #: ../cat/virt-ls.pod:13 ../df/virt-df.pod:15 ../rescue/virt-rescue.pod:15
1862 #: ../cat/virt-ls.pod:15
1865 " virt-ls [--options] domname directory\n"
1870 #: ../cat/virt-ls.pod:17
1873 " virt-ls [--options] disk.img [disk.img ...] directory\n"
1878 #: ../cat/virt-ls.pod:21
1880 "C<virt-ls> lists filenames, file sizes, checksums, extended attributes and "
1881 "more from a virtual machine or disk image."
1885 #: ../cat/virt-ls.pod:24
1887 "Multiple directory names can be given, in which case the output from each is "
1892 #: ../cat/virt-ls.pod:27
1894 "To list directories from a libvirt guest use the I<-d> option to specify the "
1895 "name of the guest. For a disk image, use the I<-a> option."
1899 #: ../cat/virt-ls.pod:31
1901 "C<virt-ls> can do many simple file listings. For more complicated cases you "
1902 "may need to use L<guestfish(1)>, or write a program directly to the "
1903 "L<guestfs(3)> API."
1907 #: ../cat/virt-ls.pod:37
1908 msgid "Get a list of all files and directories in a virtual machine:"
1912 #: ../cat/virt-ls.pod:39
1915 " virt-ls -R -d guest /\n"
1920 #: ../cat/virt-ls.pod:41
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
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
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
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
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
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:4477
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:241 ../edit/virt-edit.pod:374 ../rescue/virt-rescue.pod:340
2582 msgid "Copyright (C) 2009-2011 Red Hat Inc."
2586 #: ../clone/virt-sysprep.pod:5
2587 msgid "virt-sysprep - Reset or unconfigure a virtual machine so clones can be made"
2591 #: ../clone/virt-sysprep.pod:9
2594 " virt-sysprep [--options] -d domname\n"
2599 #: ../clone/virt-sysprep.pod:11
2602 " virt-sysprep [--options] -a disk.img [-a disk.img ...]\n"
2607 #: ../clone/virt-sysprep.pod:15
2609 "Virt-sysprep \"resets\" or \"unconfigures\" a virtual machine so that clones "
2610 "can be made from it. Steps in this process include removing SSH host keys, "
2611 "removing persistent network MAC configuration, and removing user accounts. "
2612 "Each step can be enabled or disabled as required."
2616 #: ../clone/virt-sysprep.pod:21
2618 "Virt-sysprep is a simple shell script, allowing easy inspection or "
2619 "customization by the system administrator."
2623 #: ../clone/virt-sysprep.pod:24
2625 "Virt-sysprep modifies the guest or disk image I<in place>. The guest must "
2626 "be shut down. If you want to preserve the existing contents of the guest, "
2627 "you I<must copy or clone the disk first>. See L</COPYING AND CLONING> "
2632 #: ../clone/virt-sysprep.pod:29
2634 "You do I<not> need to run virt-sysprep as root. In fact we'd generally "
2635 "recommend that you don't. The time you might want to run it as root is when "
2636 "you need root in order to access the disk image, but even in this case it "
2637 "would be better to change the permissions on the disk image to be writable "
2638 "as the non-root user running virt-sysprep."
2642 #: ../clone/virt-sysprep.pod:35
2644 "\"Sysprep\" stands for \"system preparation\" tool. The name comes from the "
2645 "Microsoft program C<sysprep.exe> which is used to unconfigure Windows "
2646 "machines in preparation for cloning them. Having said that, virt-sysprep "
2647 "does I<not> currently work on Microsoft Windows guests. We plan to support "
2648 "Windows sysprepping in a future version, and we already have code to do it."
2652 #: ../clone/virt-sysprep.pod:76
2653 msgid "B<--enable=...>"
2657 #: ../clone/virt-sysprep.pod:78
2659 "Choose which sysprep operations to perform. Give a comma-separated list of "
2660 "operations, for example:"
2664 #: ../clone/virt-sysprep.pod:81
2667 " --enable=ssh-hostkeys,udev-persistent-net\n"
2672 #: ../clone/virt-sysprep.pod:83
2673 msgid "would enable ONLY C<ssh-hostkeys> and C<udev-persistent-net> operations."
2677 #: ../clone/virt-sysprep.pod:85
2679 "If the I<--enable> option is not given, then we default to trying all "
2680 "possible sysprep operations. But some sysprep operations are skipped for "
2685 #: ../clone/virt-sysprep.pod:89
2687 "Use I<--list-operations> to list operations supported by a particular "
2688 "version of virt-sysprep."
2692 #: ../clone/virt-sysprep.pod:92
2693 msgid "See L</OPERATIONS> below for a list and an explanation of each operation."
2697 #: ../clone/virt-sysprep.pod:106
2700 " virt-sysprep --format=raw -a disk.img\n"
2705 #: ../clone/virt-sysprep.pod:110
2708 " virt-sysprep --format=raw -a disk.img --format -a another.img\n"
2713 #: ../clone/virt-sysprep.pod:119
2714 msgid "B<--hostname> newhostname"
2718 #: ../clone/virt-sysprep.pod:121
2720 "Change the hostname. See the L</hostname> operation below. If not given, "
2721 "defaults to C<localhost.localdomain>."
2725 #: ../clone/virt-sysprep.pod:124
2726 msgid "B<--list-operations>"
2730 #: ../clone/virt-sysprep.pod:126
2731 msgid "List the operations supported by the virt-sysprep program."
2735 #: ../clone/virt-sysprep.pod:128
2736 msgid "B<--selinux-relabel>"
2740 #: ../clone/virt-sysprep.pod:130
2741 msgid "B<--no-selinux-relabel>"
2745 #: ../clone/virt-sysprep.pod:132
2747 "I<--selinux-relabel> forces SELinux relabelling next time the guest boots. "
2748 "I<--no-selinux-relabel> disables relabelling."
2752 #: ../clone/virt-sysprep.pod:135
2754 "The default is to try to detect if SELinux relabelling is required. See "
2755 "L</SELINUX RELABELLING> below for more details."
2759 #: ../clone/virt-sysprep.pod:156
2764 #: ../clone/virt-sysprep.pod:158
2766 "If the I<--enable> option is I<not> given, then I<all sysprep operations are "
2767 "enabled>, although some are skipped depending on the type of guest."
2771 #: ../clone/virt-sysprep.pod:162
2773 "Operations can be individually enabled using the I<--enable> option. Use a "
2774 "comma-separated list, for example:"
2778 #: ../clone/virt-sysprep.pod:165
2781 " virt-sysprep --enable=ssh-hostkeys,udev-persistent-net [etc..]\n"
2786 #: ../clone/virt-sysprep.pod:167
2788 "To list the operations supported by the current version of virt-sysprep, use "
2789 "I<--list-operations>."
2793 #: ../clone/virt-sysprep.pod:170
2795 "Future versions of virt-sysprep may add more operations. If you are using "
2796 "virt-sysprep and want predictable behaviour, specify only the operations "
2797 "that you want to have enabled."
2801 #: ../clone/virt-sysprep.pod:174
2806 #: ../clone/virt-sysprep.pod:176
2807 msgid "Remove user at-jobs and cron-jobs."
2811 #: ../clone/virt-sysprep.pod:178
2812 msgid "dhcp-client-state"
2816 #: ../clone/virt-sysprep.pod:180
2817 msgid "Remove DHCP client leases."
2821 #: ../clone/virt-sysprep.pod:182
2822 msgid "dhcp-server-state"
2826 #: ../clone/virt-sysprep.pod:184
2827 msgid "Remove DHCP server leases."
2831 #: ../clone/virt-sysprep.pod:186
2836 #: ../clone/virt-sysprep.pod:188
2838 "Changes the hostname of the guest to the value given in the I<--hostname> "
2843 #: ../clone/virt-sysprep.pod:191
2845 "If the I<--hostname> parameter is not given, then the hostname is changed to "
2846 "C<localhost.localdomain>."
2850 #: ../clone/virt-sysprep.pod:194
2855 #: ../clone/virt-sysprep.pod:196
2856 msgid "Remove many log files."
2860 #: ../clone/virt-sysprep.pod:198
2865 #: ../clone/virt-sysprep.pod:200
2866 msgid "Remove email from the local mail spool directory."
2870 #: ../clone/virt-sysprep.pod:202
2875 #: ../clone/virt-sysprep.pod:204
2877 "Remove HWADDR (hard-coded MAC address) configuration. For Fedora and Red "
2878 "Hat Enterprise Linux, this is removed from C<ifcfg-*> files."
2882 #: ../clone/virt-sysprep.pod:207
2887 #: ../clone/virt-sysprep.pod:209
2889 "Write some random bytes from the host into the random seed file of the "
2894 #: ../clone/virt-sysprep.pod:212
2895 msgid "See L</RANDOM SEED> below."
2899 #: ../clone/virt-sysprep.pod:214
2900 msgid "rhn-systemid"
2904 #: ../clone/virt-sysprep.pod:216
2905 msgid "Remove the RHN system ID."
2909 #: ../clone/virt-sysprep.pod:218
2914 #: ../clone/virt-sysprep.pod:220
2915 msgid "Remove the Smolt hardware UUID."
2919 #: ../clone/virt-sysprep.pod:222
2920 msgid "ssh-hostkeys"
2924 #: ../clone/virt-sysprep.pod:224
2925 msgid "Remove the SSH host keys in the guest."
2929 #: ../clone/virt-sysprep.pod:226
2931 "The SSH host keys are regenerated (differently) next time the guest is "
2936 #: ../clone/virt-sysprep.pod:229
2938 "If, after cloning, the guest gets the same IP address, ssh will give you a "
2939 "stark warning about the host key changing:"
2943 #: ../clone/virt-sysprep.pod:232
2946 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
2947 " @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\n"
2948 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
2949 " IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\n"
2954 #: ../clone/virt-sysprep.pod:237
2955 msgid "udev-persistent-net"
2959 #: ../clone/virt-sysprep.pod:239
2961 "Remove udev persistent net rules which map the guest's existing MAC address "
2962 "to a fixed ethernet device (eg. eth0)."
2966 #: ../clone/virt-sysprep.pod:242
2968 "After a guest is cloned, the MAC address usually changes. Since the old MAC "
2969 "address occupies the old name (eg. eth0), this means the fresh MAC address "
2970 "is assigned to a new name (eg. eth1) and this is usually undesirable. "
2971 "Erasing the udev persistent net rules avoids this."
2975 #: ../clone/virt-sysprep.pod:247
2980 #: ../clone/virt-sysprep.pod:249
2981 msgid "Remove the utmp file."
2985 #: ../clone/virt-sysprep.pod:251
2987 "This records who is currently logged in on a machine. In modern Linux "
2988 "distros it is stored in a ramdisk and hence not part of the virtual "
2989 "machine's disk, but it was stored on disk in older distros."
2993 #: ../clone/virt-sysprep.pod:255
2998 #: ../clone/virt-sysprep.pod:257
2999 msgid "Remove the yum UUID."
3003 #: ../clone/virt-sysprep.pod:259
3005 "Yum creates a fresh UUID the next time it runs when it notices that the "
3006 "original UUID has been erased."
3010 #: ../clone/virt-sysprep.pod:262
3011 msgid "COPYING AND CLONING"
3015 #: ../clone/virt-sysprep.pod:264
3017 "Virt-sysprep can be used as part of a process of cloning guests, or to "
3018 "prepare a template from which guests can be cloned. There are many "
3019 "different ways to achieve this using the virt tools, and this section is "
3020 "just an introduction."
3024 #: ../clone/virt-sysprep.pod:269
3025 msgid "A virtual machine (when switched off) consists of two parts:"
3029 #: ../clone/virt-sysprep.pod:273
3030 msgid "I<configuration>"
3034 #: ../clone/virt-sysprep.pod:275
3036 "The configuration or description of the guest. eg. The libvirt XML (see "
3037 "C<virsh dumpxml>), the running configuration of the guest, or another "
3038 "external format like OVF."
3042 #: ../clone/virt-sysprep.pod:279
3043 msgid "Some configuration items that might need to be changed:"
3047 #: ../clone/virt-sysprep.pod:285
3052 #: ../clone/virt-sysprep.pod:289 ../clone/virt-sysprep.pod:316
3057 #: ../clone/virt-sysprep.pod:293
3058 msgid "path to block device(s)"
3062 #: ../clone/virt-sysprep.pod:297
3063 msgid "network card MAC address"
3067 #: ../clone/virt-sysprep.pod:301
3068 msgid "I<block device(s)>"
3072 #: ../clone/virt-sysprep.pod:303
3074 "One or more hard disk images, themselves containing files, directories, "
3075 "applications, kernels, configuration, etc."
3079 #: ../clone/virt-sysprep.pod:306
3080 msgid "Some things inside the block devices that might need to be changed:"
3084 #: ../clone/virt-sysprep.pod:312
3085 msgid "hostname and other net configuration"
3089 #: ../clone/virt-sysprep.pod:320
3090 msgid "SSH host keys"
3094 #: ../clone/virt-sysprep.pod:324
3095 msgid "Windows unique security ID (SID)"
3099 #: ../clone/virt-sysprep.pod:328
3100 msgid "Puppet registration"
3104 #: ../clone/virt-sysprep.pod:334
3105 msgid "COPYING THE BLOCK DEVICE"
3109 #: ../clone/virt-sysprep.pod:336
3111 "Starting with an original guest, you probably wish to copy the guest block "
3112 "device and its configuration to make a template. Then once you are happy "
3113 "with the template, you will want to make many clones from it."
3117 #: ../clone/virt-sysprep.pod:341
3123 " original guest --------> template ---------->\n"
3124 " \\------> cloned\n"
3125 " \\-----> guests\n"
3131 #: ../clone/virt-sysprep.pod:349
3133 "You can, of course, just copy the block device on the host using L<cp(1)> or "
3138 #: ../clone/virt-sysprep.pod:352
3142 " original guest --------> template ---------->\n"
3143 " \\------> cloned\n"
3144 " \\-----> guests\n"
3150 #: ../clone/virt-sysprep.pod:358
3151 msgid "There are some smarter (and faster) ways too:"
3155 #: ../clone/virt-sysprep.pod:364
3159 " template ---------->\n"
3160 " \\------> cloned\n"
3161 " \\-----> guests\n"
3167 #: ../clone/virt-sysprep.pod:370
3169 "Use the block device as a backing file and create a snapshot on top for each "
3170 "guest. The advantage is that you don't need to copy the block device (very "
3171 "fast) and only changes are stored (less storage required)."
3175 #: ../clone/virt-sysprep.pod:375
3177 "Note that writing to the backing file once you have created guests on top of "
3178 "it is not possible: you will corrupt the guests."
3182 #: ../clone/virt-sysprep.pod:378
3184 "Tools that can do this include: L<qemu-img(1)> (with the I<create -f qcow2 "
3185 "-o backing_file> option), L<lvcreate(8)> (I<--snapshot> option). Some "
3186 "filesystems (such as btrfs) and most Network Attached Storage devices can "
3187 "also create cheap snapshots from files or LUNs."
3191 #: ../clone/virt-sysprep.pod:386
3192 msgid "Get your NAS to snapshot and/or duplicate the LUN."
3196 #: ../clone/virt-sysprep.pod:390
3197 msgid "Prepare your template using L<virt-sparsify(1)>. See below."
3201 #: ../clone/virt-sysprep.pod:394
3206 #: ../clone/virt-sysprep.pod:396
3208 "A separate tool, L<virt-clone(1)>, can be used to duplicate the block device "
3209 "and/or modify the external libvirt configuration of a guest. It will reset "
3210 "the name, UUID and MAC address of the guest in the libvirt XML."
3214 #: ../clone/virt-sysprep.pod:401
3216 "L<virt-clone(1)> does not use libguestfs and cannot look inside the disk "
3217 "image. This was the original motivation to write virt-sysprep."
3221 #: ../clone/virt-sysprep.pod:404
3226 #: ../clone/virt-sysprep.pod:406
3230 " original guest --------> template\n"
3235 #: ../clone/virt-sysprep.pod:409
3237 "L<virt-sparsify(1)> can be used to make the cloning template smaller, making "
3238 "it easier to compress and/or faster to copy."
3242 #: ../clone/virt-sysprep.pod:412
3244 "Notice that since virt-sparsify also copies the image, you can use it to "
3245 "make the initial copy (instead of C<dd>)."
3249 #: ../clone/virt-sysprep.pod:415
3254 #: ../clone/virt-sysprep.pod:417
3258 " template ---------->\n"
3259 " \\------> cloned\n"
3260 " \\-----> guests\n"
3266 #: ../clone/virt-sysprep.pod:423
3268 "If you want to give people cloned guests, but let them pick the size of the "
3269 "guest themselves (eg. depending on how much they are prepared to pay for "
3270 "disk space), then instead of copying the template, you can run "
3271 "L<virt-resize(1)>. Virt-resize performs a copy and resize, and thus is "
3272 "ideal for cloning guests from a template."
3276 #: ../clone/virt-sysprep.pod:429 ../src/guestfs.pod:1164
3281 #: ../clone/virt-sysprep.pod:431
3283 "Although virt-sysprep removes some sensitive information from the guest, it "
3284 "does not pretend to remove all of it. You should examine the L</OPERATIONS> "
3285 "above, and the implementation of the operations in the shell script. You "
3286 "should also examine the guest afterwards."
3290 #: ../clone/virt-sysprep.pod:436
3292 "Sensitive files are simply removed. The data they contained may still exist "
3293 "on the disk, easily recovered with a hex editor or undelete tool. Use "
3294 "L<virt-sparsify(1)> as one way to remove this content. See also the "
3295 "L<scrub(1)> command to get rid of deleted content in directory entries and "
3300 #: ../clone/virt-sysprep.pod:442
3305 #: ../clone/virt-sysprep.pod:444
3306 msgid "I<(This section applies to Linux guests only)>"
3310 #: ../clone/virt-sysprep.pod:446
3312 "The virt-sysprep C<random-seed> operation writes a few bytes of randomness "
3313 "from the host into the guest's random seed file."
3317 #: ../clone/virt-sysprep.pod:449
3319 "If this is just done once and the guest is cloned from the same template, "
3320 "then each guest will start with the same entropy, and things like SSH host "
3321 "keys and TCP sequence numbers may be predictable."
3325 #: ../clone/virt-sysprep.pod:453
3327 "Therefore you should arrange to add more randomness I<after> cloning from a "
3328 "template too, which can be done by just enabling the C<random-seed> "
3333 #: ../clone/virt-sysprep.pod:457
3336 " cp template.img newguest.img\n"
3337 " virt-sysprep --enable=random-seed -a newguest.img\n"
3342 #: ../clone/virt-sysprep.pod:460
3343 msgid "SELINUX RELABELLING"
3347 #: ../clone/virt-sysprep.pod:462
3348 msgid "I<(This section applies to Linux guests using SELinux only)>"
3352 #: ../clone/virt-sysprep.pod:464
3354 "If any new files are created by virt-sysprep, then virt-sysprep touches "
3355 "C</.autorelabel> so that these will be correctly labelled by SELinux the "
3356 "next time the guest is booted. This process interrupts boot and can take "
3361 #: ../clone/virt-sysprep.pod:469
3363 "You can force relabelling for all guests by supplying the "
3364 "I<--selinux-relabel> option."
3368 #: ../clone/virt-sysprep.pod:472
3370 "You can disable relabelling entirely by supplying the "
3371 "I<--no-selinux-relabel> option."
3375 #: ../clone/virt-sysprep.pod:484
3376 msgid "This program returns 0 on success, or 1 if there was an error."
3380 #: ../clone/virt-sysprep.pod:488
3382 "L<guestfs(3)>, L<guestfish(1)>, L<virt-clone(1)>, L<virt-rescue(1)>, "
3383 "L<virt-resize(1)>, L<virt-sparsify(1)>, L<virsh(1)>, L<lvcreate(8)>, "
3384 "L<qemu-img(1)>, L<scrub(1)>, L<http://libguestfs.org/>, "
3385 "L<http://libvirt.org/>."
3389 #: ../df/virt-df.pod:5
3390 msgid "virt-df - Display free space on virtual filesystems"
3394 #: ../df/virt-df.pod:9
3397 " virt-df [--options]\n"
3402 #: ../df/virt-df.pod:11
3405 " virt-df [--options] -d domname\n"
3410 #: ../df/virt-df.pod:13
3413 " virt-df [--options] -a disk.img [-a disk.img ...]\n"
3418 #: ../df/virt-df.pod:17
3421 " virt-df [--options] domname\n"
3426 #: ../df/virt-df.pod:19
3429 " virt-df [--options] disk.img [disk.img ...]\n"
3434 #: ../df/virt-df.pod:23
3436 "C<virt-df> is a command line tool to display free space on virtual machine "
3437 "filesystems. Unlike other tools, it doesn't just display the size of disk "
3438 "allocated to a virtual machine, but can look inside disk images to see how "
3439 "much space is really being used."
3443 #: ../df/virt-df.pod:28
3445 "If used without any I<-a> or I<-d> arguments, C<virt-df> checks with libvirt "
3446 "to get a list of all active and inactive guests, and performs a C<df>-type "
3447 "operation on each one in turn, printing out the results."
3451 #: ../df/virt-df.pod:32
3453 "If any I<-a> or I<-d> arguments are specified, C<virt-df> performs a "
3454 "C<df>-type operation on either the single named libvirt domain, or on the "
3455 "disk image(s) listed on the command line (which must all belong to a single "
3456 "VM). In this mode (with arguments), C<virt-df> will I<only work for a "
3457 "single guest>. If you want to run on multiple guests, then you have to "
3458 "invoke C<virt-df> multiple times."
3462 #: ../df/virt-df.pod:39
3464 "Use the I<--csv> option to get a format which can be easily parsed by other "
3465 "programs. Other options are similar to the standard L<df(1)> command."
3469 #: ../df/virt-df.pod:45
3471 "Show disk usage for a single libvirt guest called C<F14x64>. Make the "
3472 "output human-readable:"
3476 #: ../df/virt-df.pod:48
3479 " # virt-df -d F14x64 -h\n"
3480 " Filesystem Size Used Available Use%\n"
3481 " F14x64:/dev/sda1 484M 66M 393M 14%\n"
3482 " F14x64:/dev/vg_f13x64/lv_root 7.4G 3.4G 4.0G 46%\n"
3487 #: ../df/virt-df.pod:53
3488 msgid "Show disk usage for a disk image file called C<test.img>:"
3492 #: ../df/virt-df.pod:55
3495 " $ virt-df -a test1.img\n"
3496 " Filesystem 1K-blocks Used Available Use%\n"
3497 " test1.img:/dev/sda1 99099 1551 92432 2%\n"
3502 #: ../df/virt-df.pod:112
3505 " virt-df --format=raw -a disk.img\n"
3510 #: ../df/virt-df.pod:116
3513 " virt-df --format=raw -a disk.img --format -a another.img\n"
3518 #: ../df/virt-df.pod:129
3519 msgid "Print sizes in human-readable format."
3523 #: ../df/virt-df.pod:131
3524 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
3528 #: ../df/virt-df.pod:133 ../fish/guestfish.pod:258 ../fuse/guestmount.pod:164
3533 #: ../df/virt-df.pod:135
3538 #: ../df/virt-df.pod:137
3539 msgid "Print inodes instead of blocks."
3543 #: ../df/virt-df.pod:139
3544 msgid "B<--one-per-guest>"
3548 #: ../df/virt-df.pod:141
3550 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
3551 "disks from several guests to a single libguestfs appliance."
3555 #: ../df/virt-df.pod:144
3556 msgid "You might use this option in the following circumstances:"
3560 #: ../df/virt-df.pod:150
3562 "If you think an untrusted guest might actively try to exploit the libguestfs "
3563 "appliance kernel, then this prevents one guest from interfering with the "
3564 "stats printed for another guest."
3568 #: ../df/virt-df.pod:156
3570 "If the kernel has a bug which stops it from accessing a filesystem in one "
3571 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
3572 "and report stats for further guests."
3576 #: ../df/virt-df.pod:165
3578 "Print UUIDs instead of names. This is useful for following a guest even "
3579 "when the guest is migrated or renamed, or when two guests happen to have the "
3584 #: ../df/virt-df.pod:169
3586 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
3587 "images, we still print the disk image name even when this option is "
3592 #: ../df/virt-df.pod:229
3594 "L<df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
3595 "L<http://libguestfs.org/>."
3599 #: ../edit/virt-edit.pod:5
3600 msgid "virt-edit - Edit a file in a virtual machine"
3604 #: ../edit/virt-edit.pod:9
3607 " virt-edit [--options] -d domname file [file ...]\n"
3612 #: ../edit/virt-edit.pod:11
3615 " virt-edit [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
3620 #: ../edit/virt-edit.pod:13
3623 " virt-edit [-d domname|-a disk.img] file -e 'expr'\n"
3628 #: ../edit/virt-edit.pod:17
3631 " virt-edit domname file\n"
3636 #: ../edit/virt-edit.pod:19 ../edit/virt-edit.pod:183
3639 " virt-edit disk.img [disk.img ...] file\n"
3644 #: ../edit/virt-edit.pod:21 ../fish/guestfish.pod:23 ../fish/virt-copy-in.pod:13 ../fish/virt-tar-in.pod:15 ../fuse/guestmount.pod:15 ../rescue/virt-rescue.pod:21 ../tools/virt-tar.pl:64 ../tools/virt-win-reg.pl:51
3649 #: ../edit/virt-edit.pod:23
3651 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
3652 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
3653 "doing this, but doesn't catch all cases."
3657 #: ../edit/virt-edit.pod:29
3659 "C<virt-edit> is a command line tool to edit C<file> where each C<file> "
3660 "exists in the named virtual machine (or disk image)."
3664 #: ../edit/virt-edit.pod:32
3666 "Multiple filenames can be given, in which case they are each edited in "
3667 "turn. Each filename must be a full path, starting at the root directory "
3668 "(starting with '/')."
3672 #: ../edit/virt-edit.pod:36
3673 msgid "If you want to just view a file, use L<virt-cat(1)>."
3677 #: ../edit/virt-edit.pod:38
3679 "For more complex cases you should look at the L<guestfish(1)> tool (see "
3680 "L</USING GUESTFISH> below)."
3684 #: ../edit/virt-edit.pod:41
3686 "C<virt-edit> cannot be used to create a new file. L<guestfish(1)> can do "
3687 "that and much more."
3691 #: ../edit/virt-edit.pod:46
3692 msgid "Edit the named files interactively:"
3696 #: ../edit/virt-edit.pod:48
3699 " virt-edit -d mydomain /boot/grub/grub.conf\n"
3704 #: ../edit/virt-edit.pod:50
3707 " virt-edit -d mydomain /etc/passwd\n"
3712 #: ../edit/virt-edit.pod:52
3713 msgid "For Windows guests, some Windows paths are understood:"
3717 #: ../edit/virt-edit.pod:54
3720 " virt-edit -d mywindomain 'c:\\autoexec.bat'\n"
3725 #: ../edit/virt-edit.pod:56
3727 "If Perl is installed, you can also edit files non-interactively (see "
3728 "L</NON-INTERACTIVE EDITING> below). To change the init default level to 5:"
3732 #: ../edit/virt-edit.pod:60
3735 " virt-edit -d mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
3740 #: ../edit/virt-edit.pod:81
3741 msgid "B<-b> extension"
3745 #: ../edit/virt-edit.pod:83
3746 msgid "B<--backup> extension"
3750 #: ../edit/virt-edit.pod:85
3752 "Create a backup of the original file I<in the guest disk image>. The backup "
3753 "has the original filename with C<extension> added."
3757 #: ../edit/virt-edit.pod:88
3759 "Usually the first character of C<extension> would be a dot C<.> so you would "
3764 #: ../edit/virt-edit.pod:91
3767 " virt-edit -b .orig [etc]\n"
3772 #: ../edit/virt-edit.pod:93
3773 msgid "By default, no backup file is made."
3777 #: ../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
3782 #: ../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
3783 msgid "B<--connect URI>"
3787 #: ../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
3789 "If you specify guest block devices directly, then libvirt is not used at "
3794 #: ../edit/virt-edit.pod:114
3796 "When prompting for keys and passphrases, virt-edit normally turns echoing "
3797 "off so you cannot see what you are typing. If you are not worried about "
3798 "Tempest attacks and there is no one else in the room you can specify this "
3799 "flag to see what you are typing."
3803 #: ../edit/virt-edit.pod:119
3808 #: ../edit/virt-edit.pod:121
3809 msgid "B<--expr> EXPR"
3813 #: ../edit/virt-edit.pod:123
3815 "Instead of launching the external editor, non-interactively apply the Perl "
3816 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
3821 #: ../edit/virt-edit.pod:127
3823 "Be careful to properly quote the expression to prevent it from being altered "
3828 #: ../edit/virt-edit.pod:130
3829 msgid "Note that this option is only available when Perl 5 is installed."
3833 #: ../edit/virt-edit.pod:132
3834 msgid "B<--format> raw|qcow2|..."
3838 #: ../edit/virt-edit.pod:143
3841 " virt-edit --format=raw -a disk.img file\n"
3846 #: ../edit/virt-edit.pod:147
3849 " virt-edit --format=raw -a disk.img --format -a another.img file\n"
3854 #: ../edit/virt-edit.pod:181
3855 msgid "Previous versions of virt-edit allowed you to write either:"
3859 #: ../edit/virt-edit.pod:187
3862 " virt-edit guestname file\n"
3867 #: ../edit/virt-edit.pod:195
3868 msgid "NON-INTERACTIVE EDITING"
3872 #: ../edit/virt-edit.pod:197
3874 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
3875 "administrator can interactively edit the file."
3879 #: ../edit/virt-edit.pod:200
3881 "There are two ways also to use C<virt-edit> from scripts in order to make "
3882 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
3883 "like this, it's less error-prone to write scripts directly using the "
3884 "libguestfs API and Augeas for configuration file editing.)"
3888 #: ../edit/virt-edit.pod:206
3890 "The first method is to temporarily set C<$EDITOR> to any script or program "
3891 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
3892 "update C<tmpfile> in place however it likes."
3896 #: ../edit/virt-edit.pod:210
3898 "The second method is to use the I<-e> parameter of C<virt-edit> to run a "
3899 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
3900 "instances of C<foo> with C<bar> in a file:"
3904 #: ../edit/virt-edit.pod:214
3907 " virt-edit -d domname filename -e 's/foo/bar/'\n"
3912 #: ../edit/virt-edit.pod:216
3914 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
3915 "For example to delete root's password you could do:"
3919 #: ../edit/virt-edit.pod:219
3922 " virt-edit -d domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
3927 #: ../edit/virt-edit.pod:221
3929 "What really happens is that the snippet is evaluated as a Perl expression "
3930 "for each line of the file. The line, including the final C<\\n>, is passed "
3931 "in C<$_> and the expression should update C<$_> or leave it unchanged."
3935 #: ../edit/virt-edit.pod:226
3937 "To delete a line, set C<$_> to the empty string. For example, to delete the "
3938 "C<apache> user account from the password file you can do:"
3942 #: ../edit/virt-edit.pod:229
3945 " virt-edit -d mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
3950 #: ../edit/virt-edit.pod:231
3952 "To insert a line, prepend or append it to C<$_>. However appending lines to "
3953 "the end of the file is rather difficult this way since there is no concept "
3954 "of \"last line of the file\" - your expression just doesn't get called "
3955 "again. You might want to use the first method (setting C<$EDITOR>) if you "
3960 #: ../edit/virt-edit.pod:237
3962 "The variable C<$lineno> contains the current line number. As is "
3963 "traditional, the first line in the file is number C<1>."
3967 #: ../edit/virt-edit.pod:240
3969 "The return value from the expression is ignored, but the expression may call "
3970 "C<die> in order to abort the whole program, leaving the original file "
3975 #: ../edit/virt-edit.pod:244
3977 "Remember when matching the end of a line that C<$_> may contain the final "
3978 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
3979 "newline then neither of these. Thus to match or substitute some text at the "
3980 "end of a line, use this regular expression:"
3984 #: ../edit/virt-edit.pod:249
3987 " /some text(\\r?\\n)?$/\n"
3992 #: ../edit/virt-edit.pod:251
3994 "Alternately, use the perl C<chomp> function, being careful not to chomp "
3995 "C<$_> itself (since that would remove all newlines from the file):"
3999 #: ../edit/virt-edit.pod:255
4002 " my $m = $_; chomp $m; $m =~ /some text$/\n"
4007 #: ../edit/virt-edit.pod:259
4009 "C<virt-edit> has a limited ability to understand Windows drive letters and "
4010 "paths (eg. C<E:\\foo\\bar.txt>)."
4014 #: ../edit/virt-edit.pod:278
4016 "The path is resolved case insensitively to locate the file that should be "
4021 #: ../edit/virt-edit.pod:299
4023 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
4024 "C<virt-edit> doesn't work."
4028 #: ../edit/virt-edit.pod:302
4029 msgid "Using C<virt-edit> is approximately equivalent to doing:"
4033 #: ../edit/virt-edit.pod:304
4036 " guestfish --rw -i -d domname edit /file\n"
4041 #: ../edit/virt-edit.pod:306
4043 "where C<domname> is the name of the libvirt guest, and C</file> is the full "
4048 #: ../edit/virt-edit.pod:309
4050 "The command above uses libguestfs's guest inspection feature and so does not "
4051 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
4052 "disk images that don't contain guests. To edit a file on a disk image "
4057 #: ../edit/virt-edit.pod:314
4060 " guestfish --rw -a disk.img -m /dev/sda1 edit /file\n"
4065 #: ../edit/virt-edit.pod:316
4067 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
4068 "the disk image to edit, and C</file> is the full path to the file."
4072 #: ../edit/virt-edit.pod:320
4074 "C<virt-edit> cannot create new files. Use the guestfish commands C<touch>, "
4075 "C<write> or C<upload> instead:"
4079 #: ../edit/virt-edit.pod:323
4082 " guestfish --rw -i -d domname touch /newfile\n"
4087 #: ../edit/virt-edit.pod:325
4090 " guestfish --rw -i -d domname write /newfile \"new content\"\n"
4095 #: ../edit/virt-edit.pod:327
4098 " guestfish --rw -i -d domname upload localfile /newfile\n"
4103 #: ../edit/virt-edit.pod:329 ../fish/guestfish.pod:1119 ../rescue/virt-rescue.pod:298 ../sparsify/virt-sparsify.pod:232 ../src/guestfs.pod:3209 ../test-tool/libguestfs-test-tool.pod:95
4104 msgid "ENVIRONMENT VARIABLES"
4108 #: ../edit/virt-edit.pod:333
4113 #: ../edit/virt-edit.pod:335
4115 "If set, this string is used as the editor. It may contain arguments, "
4116 "eg. C<\"emacs -nw\">"
4120 #: ../edit/virt-edit.pod:338
4121 msgid "If not set, C<vi> is used."
4125 #: ../edit/virt-edit.pod:356
4127 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
4128 "L<virt-tar-in(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
4129 "L<Sys::Virt(3)>, L<http://libguestfs.org/>, L<perl(1)>, L<perlre(1)>."
4133 #: ../erlang/examples/guestfs-erlang.pod:5
4134 msgid "guestfs-erlang - How to use libguestfs from Erlang"
4138 #: ../erlang/examples/guestfs-erlang.pod:9
4141 " {ok, G} = guestfs:create(),\n"
4142 " ok = guestfs:add_drive_opts(G, Disk,\n"
4143 " [{format, \"raw\"}, {readonly, true}]),\n"
4144 " ok = guestfs:launch(G),\n"
4145 " [Device] = guestfs:list_devices(G),\n"
4146 " ok = guestfs:close(G).\n"
4151 #: ../erlang/examples/guestfs-erlang.pod:18
4153 "This manual page documents how to call libguestfs from the Erlang "
4154 "programming language. This page just documents the differences from the C "
4155 "API and gives some examples. If you are not familiar with using libguestfs, "
4156 "you also need to read L<guestfs(3)>."
4160 #: ../erlang/examples/guestfs-erlang.pod:23
4161 msgid "OPENING AND CLOSING THE HANDLE"
4165 #: ../erlang/examples/guestfs-erlang.pod:25
4167 "The Erlang bindings are implemented using an external program called "
4168 "C<erl-guestfs>. This program must be on the current PATH, or else you "
4169 "should specify the full path to the program:"
4173 #: ../erlang/examples/guestfs-erlang.pod:29
4176 " {ok, G} = guestfs:create().\n"
4181 #: ../erlang/examples/guestfs-erlang.pod:31
4184 " {ok, G} = guestfs:create(\"/path/to/erl-guestfs\").\n"
4189 #: ../erlang/examples/guestfs-erlang.pod:33
4190 msgid "C<G> is the libguestfs handle which you should pass to other functions."
4194 #: ../erlang/examples/guestfs-erlang.pod:36
4195 msgid "To close the handle:"
4199 #: ../erlang/examples/guestfs-erlang.pod:38
4202 " ok = guestfs:close(G).\n"
4207 #: ../erlang/examples/guestfs-erlang.pod:40
4208 msgid "FUNCTIONS WITH OPTIONAL ARGUMENTS"
4212 #: ../erlang/examples/guestfs-erlang.pod:42
4214 "For functions that take optional arguments, the first arguments are the "
4215 "non-optional ones. The last argument is a list of tuples supplying the "
4216 "remaining optional arguments."
4220 #: ../erlang/examples/guestfs-erlang.pod:46
4223 " ok = guestfs:add_drive_opts(G, Disk,\n"
4224 " [{format, \"raw\"}, {readonly, true}]).\n"
4229 #: ../erlang/examples/guestfs-erlang.pod:49
4230 msgid "If the last argument would be an empty list, you can also omit it:"
4234 #: ../erlang/examples/guestfs-erlang.pod:51
4237 " ok = guestfs:add_drive_opts(G, Disk).\n"
4242 #: ../erlang/examples/guestfs-erlang.pod:53
4243 msgid "RETURN VALUES AND ERRORS"
4247 #: ../erlang/examples/guestfs-erlang.pod:55
4249 "On success, most functions return a C<Result> term (which could be a list, "
4250 "string, tuple etc.). If there is nothing for the function to return, then "
4251 "the atom C<ok> is returned."
4255 #: ../erlang/examples/guestfs-erlang.pod:59
4256 msgid "On error, you would see one of the following tuples:"
4260 #: ../erlang/examples/guestfs-erlang.pod:63
4261 msgid "C<{error, Msg, Errno}>"
4265 #: ../erlang/examples/guestfs-erlang.pod:65
4266 msgid "This indicates an ordinary error from the function."
4270 #: ../erlang/examples/guestfs-erlang.pod:67
4272 "C<Msg> is the error message (string) and C<Errno> is the Unix error "
4277 #: ../erlang/examples/guestfs-erlang.pod:70
4278 msgid "C<Errno> can be zero. See L<guestfs(3)/guestfs_last_errno>."
4282 #: ../erlang/examples/guestfs-erlang.pod:72
4283 msgid "C<{unknown, Function}>"
4287 #: ../erlang/examples/guestfs-erlang.pod:74
4289 "This indicates that the function you called is not known. Generally this "
4290 "means you are mixing C<erl-guestfs> from another version of libguestfs, "
4291 "which you should not do."
4295 #: ../erlang/examples/guestfs-erlang.pod:78
4296 msgid "C<Function> is the name of the unknown function."
4300 #: ../erlang/examples/guestfs-erlang.pod:80
4301 msgid "C<{unknownarg, Arg}>"
4305 #: ../erlang/examples/guestfs-erlang.pod:82
4307 "This indicates that you called a function with optional arguments, with an "
4308 "unknown argument name."
4312 #: ../erlang/examples/guestfs-erlang.pod:85
4313 msgid "C<Arg> is the name of the unknown argument."
4317 #: ../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
4318 msgid "EXAMPLE 1: CREATE A DISK IMAGE"
4322 #: ../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
4327 #: ../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
4328 msgid "EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE"
4332 #: ../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
4337 #: ../erlang/examples/guestfs-erlang.pod:99
4339 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-java(3)>, "
4340 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
4341 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://www.erlang.org/>. "
4342 "L<http://libguestfs.org/>."
4346 #: ../erlang/examples/guestfs-erlang.pod:110 ../examples/guestfs-examples.pod:45 ../examples/guestfs-recipes.pod:397 ../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:3348 ../test-tool/libguestfs-test-tool.pod:106
4351 #: ../erlang/examples/guestfs-erlang.pod:112 ../examples/guestfs-examples.pod:47 ../examples/guestfs-recipes.pod:399 ../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:3350 ../test-tool/libguestfs-test-tool.pod:108
4352 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
4356 #: ../erlang/examples/guestfs-erlang.pod:116 ../java/examples/guestfs-java.pod:64 ../perl/examples/guestfs-perl.pod:58
4357 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
4361 #: ../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
4363 "The examples in this manual page may be freely copied, modified and "
4364 "distributed without any restrictions."
4368 #: ../erlang/examples/guestfs-erlang.pod:121 ../examples/guestfs-examples.pod:56 ../examples/guestfs-recipes.pod:408 ../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:3357
4370 "This library is free software; you can redistribute it and/or modify it "
4371 "under the terms of the GNU Lesser General Public License as published by the "
4372 "Free Software Foundation; either version 2 of the License, or (at your "
4373 "option) any later version."
4377 #: ../erlang/examples/guestfs-erlang.pod:126 ../examples/guestfs-examples.pod:61 ../examples/guestfs-recipes.pod:413 ../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:3362
4379 "This library is distributed in the hope that it will be useful, but WITHOUT "
4380 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
4381 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
4386 #: ../erlang/examples/guestfs-erlang.pod:131 ../examples/guestfs-examples.pod:66 ../examples/guestfs-recipes.pod:418 ../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:3367
4388 "You should have received a copy of the GNU Lesser General Public License "
4389 "along with this library; if not, write to the Free Software Foundation, "
4390 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
4394 #: ../examples/guestfs-examples.pod:5
4395 msgid "guestfs-examples - Examples of using libguestfs from C"
4399 #: ../examples/guestfs-examples.pod:9 ../src/guestfs.pod:9
4402 " #include <guestfs.h>\n"
4407 #: ../examples/guestfs-examples.pod:11
4410 " guestfs_h *g = guestfs_create ();\n"
4411 " guestfs_add_drive_ro (g, \"disk.img\");\n"
4412 " guestfs_launch (g);\n"
4417 #: ../examples/guestfs-examples.pod:15 ../src/guestfs.pod:19
4420 " cc prog.c -o prog -lguestfs\n"
4422 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
4427 #: ../examples/guestfs-examples.pod:21
4429 "This manual page contains examples of calling libguestfs from the C "
4430 "programming language. If you are not familiar with using libguestfs, you "
4431 "also need to read L<guestfs(3)>."
4435 #: ../examples/guestfs-examples.pod:35
4437 "L<guestfs(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, "
4438 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
4439 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
4443 #: ../examples/guestfs-examples.pod:51 ../ocaml/examples/guestfs-ocaml.pod:97 ../python/examples/guestfs-python.pod:60 ../ruby/examples/guestfs-ruby.pod:54
4444 msgid "Copyright (C) 2010 Red Hat Inc. L<http://libguestfs.org/>"
4448 #: ../examples/guestfs-recipes.pod:3 ../examples/guestfs-recipes.pod:12
4453 #: ../examples/guestfs-recipes.pod:5
4455 "pod2man and pod2html have differing bugs which makes it hard to write URLs "
4456 "here. The only way which works for both sorts of output is to just write "
4457 "the URL directly. Do NOT use L<...> for URLs."
4461 #: ../examples/guestfs-recipes.pod:9
4463 "We break with tradition here and don't use ALL CAPS for the section "
4464 "headings, as this makes them much easier to read."
4468 #: ../examples/guestfs-recipes.pod:16
4469 msgid "guestfs-recipes - libguestfs, guestfish and virt tools recipes"
4473 #: ../examples/guestfs-recipes.pod:20
4475 "This page contains recipes for and links to things you can do using "
4476 "libguestfs, L<guestfish(1)> and the virt tools."
4480 #: ../examples/guestfs-recipes.pod:23
4481 msgid "Audit a virtual machine for setuid files"
4485 #: ../examples/guestfs-recipes.pod:25
4487 "The link below contains a small program which can be used to audit a Linux "
4488 "virtual machine to see what setuid and setgid files it contains."
4492 #: ../examples/guestfs-recipes.pod:28
4493 msgid "https://rwmj.wordpress.com/2010/12/15/tip-audit-virtual-machine-for-setuid-files/#content"
4497 #: ../examples/guestfs-recipes.pod:30
4498 msgid "Change the background image in a Windows XP VM"
4502 #: ../examples/guestfs-recipes.pod:32
4504 "The links below explain how to use L<guestfish(1)> to change the background "
4505 "image for a user of a Windows XP VM. Unfortunately the technique appears to "
4506 "be substantially different for each version of Windows."
4510 #: ../examples/guestfs-recipes.pod:37
4512 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002655.html "
4513 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002658.html"
4517 #: ../examples/guestfs-recipes.pod:40
4518 msgid "Cloning a virtual machine (Linux)"
4522 #: ../examples/guestfs-recipes.pod:42
4524 "The guestfish technique described in the link below works well for most "
4525 "Linux VMs. Depending on the Linux distro you may need to change the paths "
4530 #: ../examples/guestfs-recipes.pod:46
4531 msgid "https://rwmj.wordpress.com/2010/09/24/tip-my-procedure-for-cloning-a-fedora-vm/#content"
4535 #: ../examples/guestfs-recipes.pod:48
4537 "Avoid L<virt-clone(1)>. Currently what to do about virt-clone is under "
4542 #: ../examples/guestfs-recipes.pod:51
4543 msgid "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
4547 #: ../examples/guestfs-recipes.pod:53
4548 msgid "Cloning a virtual machine (Windows)"
4552 #: ../examples/guestfs-recipes.pod:55
4554 "It is possible to do a \"sysprep\" using libguestfs alone, although not "
4555 "straightforward. Currently there is code in the Aeolus Oz project which "
4556 "does this (using libguestfs). As part of our review of the virt-clone tool, "
4557 "we may add sysprepping ability."
4561 #: ../examples/guestfs-recipes.pod:60
4563 "https://github.com/clalancette/oz "
4564 "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
4568 #: ../examples/guestfs-recipes.pod:63
4569 msgid "Convert a CD-ROM / DVD / ISO to a tarball"
4573 #: ../examples/guestfs-recipes.pod:65
4574 msgid "This converts input C<cd.iso> to output C<cd.tar.gz>:"
4578 #: ../examples/guestfs-recipes.pod:67
4581 " guestfish --ro -a cd.iso -m /dev/sda tgz-out / cd.tar.gz\n"
4586 #: ../examples/guestfs-recipes.pod:69
4587 msgid "To export just a subdirectory, eg. C</files>, do:"
4591 #: ../examples/guestfs-recipes.pod:71
4594 " guestfish --ro -a cd.iso -m /dev/sda tgz-out /files cd.tar.gz\n"
4599 #: ../examples/guestfs-recipes.pod:73
4600 msgid "Create empty disk images"
4604 #: ../examples/guestfs-recipes.pod:75
4606 "You can use the L<guestfish(1)> I<-N> option to create empty disk images. "
4607 "The useful guide below explains the options available."
4611 #: ../examples/guestfs-recipes.pod:78
4612 msgid "https://rwmj.wordpress.com/2010/09/08/new-guestfish-n-options-in-1-5-9/#content"
4616 #: ../examples/guestfs-recipes.pod:80
4617 msgid "Dump raw filesystem content from inside a disk image or VM"
4621 #: ../examples/guestfs-recipes.pod:82
4623 "You can use the L<guestfish(1)> C<download> command to extract the raw "
4624 "filesystem content from any filesystem in a disk image or a VM (even one "
4625 "which is encrypted or buried inside an LV):"
4629 #: ../examples/guestfs-recipes.pod:86
4632 " guestfish --ro -a disk.img run : download /dev/sda1 sda1.img\n"
4637 #: ../examples/guestfs-recipes.pod:88
4640 " guestfish --ro -d Guest run : download /dev/vg_guest/lv_root lv.img\n"
4645 #: ../examples/guestfs-recipes.pod:90
4646 msgid "To list the filesystems in a disk image, use L<virt-filesystems(1)>."
4650 #: ../examples/guestfs-recipes.pod:92
4651 msgid "Edit grub configuration in a VM"
4655 #: ../examples/guestfs-recipes.pod:94
4656 msgid "You can use this to:"
4660 #: ../examples/guestfs-recipes.pod:100
4661 msgid "Fix a virtual machine that does not boot."
4665 #: ../examples/guestfs-recipes.pod:104
4666 msgid "Change which kernel is used to boot the VM."
4670 #: ../examples/guestfs-recipes.pod:108
4671 msgid "Change kernel command line options."
4675 #: ../examples/guestfs-recipes.pod:112
4676 msgid "Use L<virt-edit(1)> to edit the grub configuration:"
4680 #: ../examples/guestfs-recipes.pod:114
4683 " virt-edit -d BrokenGuest /boot/grub/grub.conf\n"
4688 #: ../examples/guestfs-recipes.pod:116
4690 "or for general tinkering inside an unbootable VM use L<virt-rescue(1)> like "
4695 #: ../examples/guestfs-recipes.pod:119
4698 " virt-rescue -d BrokenGuest\n"
4703 #: ../examples/guestfs-recipes.pod:121
4704 msgid "Export any directory from a VM"
4708 #: ../examples/guestfs-recipes.pod:123
4709 msgid "To export C</home> from a VM into a local directory use L<virt-copy-out(1)>:"
4713 #: ../examples/guestfs-recipes.pod:126
4716 " virt-copy-out -d Guest /home .\n"
4721 #: ../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
4726 #: ../examples/guestfs-recipes.pod:134
4728 "The final dot of the command is not a printing error. It means we want to "
4729 "copy out to the current directory."
4733 #: ../examples/guestfs-recipes.pod:139
4734 msgid "This creates a directory called C<home> under the current directory."
4738 #: ../examples/guestfs-recipes.pod:143
4740 "If the guest is a Windows guest then you can use drive letters and "
4741 "backslashes, but you must prefix the path with C<win:> and quote it to "
4742 "protect it from the shell, like this:"
4746 #: ../examples/guestfs-recipes.pod:147
4749 " virt-copy-out -d WinGuest 'win:c:\\windows\\system32\\config' .\n"
4754 #: ../examples/guestfs-recipes.pod:149
4755 msgid "To get the output as a compressed tarball, do:"
4759 #: ../examples/guestfs-recipes.pod:151
4762 " virt-tar-out -d Guest /home - | gzip --best > home.tar.gz\n"
4767 #: ../examples/guestfs-recipes.pod:153
4769 "Although it sounds tempting, this is usually not a reliable way to get a "
4770 "backup from a running guest. See the entry in the FAQ: "
4771 "http://libguestfs.org/FAQ.html#backup"
4775 #: ../examples/guestfs-recipes.pod:157
4776 msgid "Find out which user is using the most space"
4780 #: ../examples/guestfs-recipes.pod:159
4782 "This simple script examines a Linux guest to find out which user is using "
4783 "the most space in their home directory:"
4787 #: ../examples/guestfs-recipes.pod:162
4795 #: ../examples/guestfs-recipes.pod:164 ../fish/guestfish.pod:984
4803 #: ../examples/guestfs-recipes.pod:166
4812 #: ../examples/guestfs-recipes.pod:169
4815 " eval $(guestfish --ro -d \"$vm\" -i --listen)\n"
4820 #: ../examples/guestfs-recipes.pod:171
4823 " for d in $(guestfish --remote ls \"$dir\"); do\n"
4824 " echo -n \"$dir/$d\"\n"
4826 " guestfish --remote du \"$dir/$d\";\n"
4827 " done | sort -nr -k 2\n"
4832 #: ../examples/guestfs-recipes.pod:177 ../fish/guestfish.pod:941
4835 " guestfish --remote exit\n"
4840 #: ../examples/guestfs-recipes.pod:179
4841 msgid "Get DHCP address from a VM"
4845 #: ../examples/guestfs-recipes.pod:181
4847 "The link below explains the many different possible techniques for getting "
4848 "the last assigned DHCP address of a virtual machine."
4852 #: ../examples/guestfs-recipes.pod:184
4853 msgid "https://rwmj.wordpress.com/2011/03/31/tip-code-for-getting-dhcp-address-from-a-virtual-machine-disk-image/#content"
4857 #: ../examples/guestfs-recipes.pod:186
4859 "In the libguestfs source examples directory you will find the latest version "
4860 "of the C<virt-dhcp-address.c> program."
4864 #: ../examples/guestfs-recipes.pod:189
4865 msgid "Get the operating system product name string"
4869 #: ../examples/guestfs-recipes.pod:191
4870 msgid "Save the following script into a file called C<product-name.sh>:"
4874 #: ../examples/guestfs-recipes.pod:193
4879 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
4880 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
4881 " guestfish --remote inspect-get-product-name \"$root\"\n"
4882 " guestfish --remote exit\n"
4887 #: ../examples/guestfs-recipes.pod:200
4888 msgid "Make the script executable and run it on a named guest:"
4892 #: ../examples/guestfs-recipes.pod:202
4895 " # product-name.sh RHEL60x64\n"
4896 " Red Hat Enterprise Linux Server release 6.0 (Santiago)\n"
4901 #: ../examples/guestfs-recipes.pod:205
4903 "You can also use an XPath query on the L<virt-inspector(1)> XML using the "
4904 "C<xpath> command line tool or from your favourite programming language:"
4908 #: ../examples/guestfs-recipes.pod:209
4911 " # virt-inspector RHEL60x64 > xml\n"
4912 " # xpath '//product_name' < xml\n"
4915 " <product_name>Red Hat Enterprise Linux Server release 6.0 "
4916 "(Santiago)</product_name>\n"
4921 #: ../examples/guestfs-recipes.pod:215
4922 msgid "Get the default boot kernel for a Linux VM"
4926 #: ../examples/guestfs-recipes.pod:217
4928 "The link below contains a program to print the default boot kernel for a "
4933 #: ../examples/guestfs-recipes.pod:220
4934 msgid "https://rwmj.wordpress.com/2010/10/30/tip-use-augeas-to-get-the-default-boot-kernel-for-a-vm/#content"
4938 #: ../examples/guestfs-recipes.pod:222
4940 "It uses Augeas, and the technique is generally applicable for many different "
4945 #: ../examples/guestfs-recipes.pod:229
4946 msgid "listing the user accounts in the guest"
4950 #: ../examples/guestfs-recipes.pod:233
4951 msgid "what repositories is it configured to use"
4955 #: ../examples/guestfs-recipes.pod:237
4956 msgid "what NTP servers does it connect to"
4960 #: ../examples/guestfs-recipes.pod:241
4961 msgid "what were the boot messages last time it booted"
4965 #: ../examples/guestfs-recipes.pod:245
4966 msgid "listing who was logged in recently"
4970 #: ../examples/guestfs-recipes.pod:249
4971 msgid "http://augeas.net/"
4975 #: ../examples/guestfs-recipes.pod:251
4976 msgid "Install RPMs in a guest"
4980 #: ../examples/guestfs-recipes.pod:253
4982 "The link below contains a method to install RPMs in a guest. In fact the "
4983 "RPMs are just uploaded to the guest along with a \"firstboot\" script that "
4984 "installs them next time the guest is booted. You could use this technique "
4985 "to install vital security updates in an offline guest."
4989 #: ../examples/guestfs-recipes.pod:259
4990 msgid "https://rwmj.wordpress.com/2010/12/01/tip-install-rpms-in-a-guest/#content"
4994 #: ../examples/guestfs-recipes.pod:261
4995 msgid "List applications installed in a VM"
4999 #: ../examples/guestfs-recipes.pod:263
5000 msgid "Save the following to a file C<list-apps.sh>:"
5004 #: ../examples/guestfs-recipes.pod:265
5009 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
5010 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
5011 " guestfish --remote inspect-list-applications \"$root\"\n"
5012 " guestfish --remote exit\n"
5017 #: ../examples/guestfs-recipes.pod:272
5019 "Make the file executable and then you can run it on any named virtual "
5024 #: ../examples/guestfs-recipes.pod:275
5027 " # list-apps.sh WinGuest\n"
5029 " app_name: Mozilla Firefox (3.6.12)\n"
5030 " app_display_name: Mozilla Firefox (3.6.12)\n"
5032 " app_version: 3.6.12 (en-GB)\n"
5034 " app_install_path: C:\\Program Files\\Mozilla Firefox\n"
5035 " app_trans_path:\n"
5036 " app_publisher: Mozilla\n"
5037 " app_url: http://www.mozilla.com/en-GB/\n"
5038 " app_source_package:\n"
5040 " app_description: Mozilla Firefox\n"
5043 " app_name: VLC media player\n"
5044 " app_display_name: VLC media player 1.1.5\n"
5046 " app_version: 1.1.5\n"
5048 " app_install_path: C:\\Program Files\\VideoLAN\\VLC\n"
5049 " app_trans_path:\n"
5050 " app_publisher: VideoLAN\n"
5051 " app_url: http://www.videolan.org/\n"
5052 " app_source_package:\n"
5054 " app_description:\n"
5060 #: ../examples/guestfs-recipes.pod:305
5062 "If you want to run the script on disk images (instead of libvirt virtual "
5063 "machines), change C<-d \"$1\"> to C<-a \"$1\">. See also "
5064 "L<virt-inspector(1)>."
5068 #: ../examples/guestfs-recipes.pod:309
5069 msgid "List files and directories in a VM"
5073 #: ../examples/guestfs-recipes.pod:311
5074 msgid "This involves using the L<guestfish(1)> C<find0> command like this:"
5078 #: ../examples/guestfs-recipes.pod:313
5081 " guestfish --ro -d Guest -i find0 / - | tr '\\0' '\\n' | sort\n"
5086 #: ../examples/guestfs-recipes.pod:315
5087 msgid "List services in a Windows VM"
5091 #: ../examples/guestfs-recipes.pod:317
5093 "The link below contains a script that can be used to list out the services "
5094 "from a Windows VM, and whether those services run at boot time or are loaded "
5099 #: ../examples/guestfs-recipes.pod:321
5100 msgid "https://rwmj.wordpress.com/2010/12/10/tip-list-services-in-a-windows-guest/#content"
5104 #: ../examples/guestfs-recipes.pod:323
5105 msgid "Make a disk image sparse"
5109 #: ../examples/guestfs-recipes.pod:325
5111 "The link below contains some guides for making a disk image sparse (or "
5112 "reintroducing sparseness)."
5116 #: ../examples/guestfs-recipes.pod:328
5117 msgid "https://rwmj.wordpress.com/2010/10/19/tip-making-a-disk-image-sparse/#content"
5121 #: ../examples/guestfs-recipes.pod:330
5122 msgid "Monitor disk usage over time"
5126 #: ../examples/guestfs-recipes.pod:332
5128 "You can use L<virt-df(1)> to monitor disk usage of your guests over time. "
5129 "The link below contains a guide."
5133 #: ../examples/guestfs-recipes.pod:335
5134 msgid "http://virt-tools.org/learning/advanced-virt-df/"
5138 #: ../examples/guestfs-recipes.pod:337
5139 msgid "Reading the Windows Event Log from Windows Vista (or later)"
5143 #: ../examples/guestfs-recipes.pod:339
5145 "L<guestfish(1)> plus the tools described in the link below can be used to "
5146 "read out the Windows Event Log from any virtual machine running Windows "
5147 "Vista or a later version."
5151 #: ../examples/guestfs-recipes.pod:343
5152 msgid "https://rwmj.wordpress.com/2011/04/17/decoding-the-windows-event-log-using-guestfish/#content"
5156 #: ../examples/guestfs-recipes.pod:345
5157 msgid "Remove root password (Linux)"
5161 #: ../examples/guestfs-recipes.pod:347
5163 "Using the L<virt-edit(1)> I<-e> option you can do simple replacements on "
5164 "files. One use is to remove the root password from a Linux guest:"
5168 #: ../examples/guestfs-recipes.pod:350
5171 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
5176 #: ../examples/guestfs-recipes.pod:352
5177 msgid "Remove Administrator password (Windows)"
5181 #: ../examples/guestfs-recipes.pod:354
5183 "The link below contains one technique for removing the Administrator "
5184 "password from a Windows VM, or to be more precise, it gives you a command "
5185 "prompt the next time you log in which you can use to bypass any security:"
5189 #: ../examples/guestfs-recipes.pod:359
5190 msgid "https://mdbooth.wordpress.com/2010/10/18/resetting-a-windows-guests-administrator-password-with-guestfish/"
5194 #: ../examples/guestfs-recipes.pod:361
5195 msgid "Unpack a live CD"
5199 #: ../examples/guestfs-recipes.pod:363
5201 "Linux live CDs often contain multiple layers of disk images wrapped like a "
5202 "Russian doll. You can use L<guestfish(1)> to look inside these multiple "
5203 "layers, as outlined in the guide below."
5207 #: ../examples/guestfs-recipes.pod:367
5208 msgid "https://rwmj.wordpress.com/2009/07/15/unpack-the-russian-doll-of-a-f11-live-cd/#content"
5212 #: ../examples/guestfs-recipes.pod:369
5213 msgid "Uploading and downloading files"
5217 #: ../examples/guestfs-recipes.pod:371
5219 "The link below contains general tips on uploading (copying in) and "
5220 "downloading (copying out) files from VMs."
5224 #: ../examples/guestfs-recipes.pod:374
5225 msgid "https://rwmj.wordpress.com/2010/12/02/tip-uploading-and-downloading/#content"
5229 #: ../examples/guestfs-recipes.pod:376
5230 msgid "Use libguestfs tools on VMware ESX guests"
5234 #: ../examples/guestfs-recipes.pod:378
5236 "The link below explains how to use libguestfs, L<guestfish(1)> and the virt "
5237 "tools on any VMware ESX guests, by first sharing the VMware VMFS over sshfs."
5241 #: ../examples/guestfs-recipes.pod:382
5242 msgid "https://rwmj.wordpress.com/2011/05/10/tip-use-libguestfs-on-vmware-esx-guests/#content"
5246 #: ../examples/guestfs-recipes.pod:386
5248 "L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>, "
5249 "L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, "
5250 "L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-ruby(3)>, "
5251 "L<http://libguestfs.org/>."
5255 #: ../examples/guestfs-recipes.pod:403
5256 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
5260 #: ../fish/guestfish-actions.pod:1
5265 #: ../fish/guestfish-actions.pod:3
5268 " add-cdrom filename\n"
5273 #: ../fish/guestfish-actions.pod:5 ../src/guestfs-actions.pod:14
5274 msgid "This function adds a virtual CD-ROM disk image to the guest."
5278 #: ../fish/guestfish-actions.pod:7 ../src/guestfs-actions.pod:16
5279 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
5283 #: ../fish/guestfish-actions.pod:15
5285 "This call checks for the existence of C<filename>. This stops you from "
5286 "specifying other types of drive which are supported by qemu such as C<nbd:> "
5287 "and C<http:> URLs. To specify those, use the general L</config> call "
5292 #: ../fish/guestfish-actions.pod:22
5294 "If you just want to add an ISO file (often you use this as an efficient way "
5295 "to transfer large files into the guest), then you should probably use "
5296 "L</add-drive-ro> instead."
5300 #: ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:214 ../fish/guestfish-actions.pod:228
5302 "I<This function is deprecated.> In new code, use the L</add_drive_opts> call "
5307 #: ../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:3381 ../fish/guestfish-actions.pod:3692 ../fish/guestfish-actions.pod:3740 ../fish/guestfish-actions.pod:4658 ../fish/guestfish-actions.pod:4678 ../fish/guestfish-actions.pod:4697 ../fish/guestfish-actions.pod:4735 ../fish/guestfish-actions.pod:5463 ../fish/guestfish-actions.pod:5566 ../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:5225 ../src/guestfs-actions.pod:5747 ../src/guestfs-actions.pod:5847 ../src/guestfs-actions.pod:7143 ../src/guestfs-actions.pod:7184 ../src/guestfs-actions.pod:7215 ../src/guestfs-actions.pod:7275 ../src/guestfs-actions.pod:8327 ../src/guestfs-actions.pod:8436 ../src/guestfs-actions.pod:8616
5309 "Deprecated functions will not be removed from the API, but the fact that "
5310 "they are deprecated indicates that there are problems with correct use of "
5315 #: ../fish/guestfish-actions.pod:35
5320 #: ../fish/guestfish-actions.pod:37
5325 #: ../fish/guestfish-actions.pod:39
5328 " add-domain dom [libvirturi:..] [readonly:true|false] [iface:..] "
5329 "[live:true|false] [allowuuid:true|false] [readonlydisk:..]\n"
5334 #: ../fish/guestfish-actions.pod:41
5336 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
5337 "It works by connecting to libvirt, requesting the domain and domain XML from "
5338 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
5342 #: ../fish/guestfish-actions.pod:46 ../src/guestfs-actions.pod:65
5344 "The number of disks added is returned. This operation is atomic: if an "
5345 "error is returned, then no disks are added."
5349 #: ../fish/guestfish-actions.pod:49 ../src/guestfs-actions.pod:68
5351 "This function does some minimal checks to make sure the libvirt domain is "
5352 "not running (unless C<readonly> is true). In a future version we will try "
5353 "to acquire the libvirt lock on each disk."
5357 #: ../fish/guestfish-actions.pod:53 ../src/guestfs-actions.pod:72
5359 "Disks must be accessible locally. This often means that adding disks from a "
5360 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
5361 "unless those disks are accessible via the same device path locally too."
5365 #: ../fish/guestfish-actions.pod:58 ../src/guestfs-actions.pod:77
5367 "The optional C<libvirturi> parameter sets the libvirt URI (see "
5368 "L<http://libvirt.org/uri.html>). If this is not set then we connect to the "
5369 "default libvirt URI (or one set through an environment variable, see the "
5370 "libvirt documentation for full details)."
5374 #: ../fish/guestfish-actions.pod:64 ../src/guestfs-actions.pod:83
5376 "The optional C<live> flag controls whether this call will try to connect to "
5377 "a running virtual machine C<guestfsd> process if it sees a suitable "
5378 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
5379 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
5380 "DAEMONS> for more information."
5384 #: ../fish/guestfish-actions.pod:71 ../src/guestfs-actions.pod:90
5386 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
5387 "passed instead of the domain name. The C<dom> string is treated as a UUID "
5388 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
5393 #: ../fish/guestfish-actions.pod:76 ../src/guestfs-actions.pod:95
5395 "The optional C<readonlydisk> parameter controls what we do for disks which "
5396 "are marked E<lt>readonly/E<gt> in the libvirt XML. Possible values are:"
5400 #: ../fish/guestfish-actions.pod:82 ../src/guestfs-actions.pod:101
5401 msgid "readonlydisk = \"error\""
5405 #: ../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
5406 msgid "If C<readonly> is false:"
5410 #: ../fish/guestfish-actions.pod:86 ../src/guestfs-actions.pod:105
5412 "The whole call is aborted with an error if any disk with the "
5413 "E<lt>readonly/E<gt> flag is found."
5417 #: ../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
5418 msgid "If C<readonly> is true:"
5422 #: ../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
5423 msgid "Disks with the E<lt>readonly/E<gt> flag are added read-only."
5427 #: ../fish/guestfish-actions.pod:93 ../src/guestfs-actions.pod:112
5428 msgid "readonlydisk = \"read\""
5432 #: ../fish/guestfish-actions.pod:97 ../src/guestfs-actions.pod:116
5434 "Disks with the E<lt>readonly/E<gt> flag are added read-only. Other disks "
5435 "are added read/write."
5439 #: ../fish/guestfish-actions.pod:104 ../src/guestfs-actions.pod:123
5440 msgid "readonlydisk = \"write\" (default)"
5444 #: ../fish/guestfish-actions.pod:108 ../src/guestfs-actions.pod:127
5445 msgid "Disks with the E<lt>readonly/E<gt> flag are added read/write."
5449 #: ../fish/guestfish-actions.pod:114 ../src/guestfs-actions.pod:133
5450 msgid "readonlydisk = \"ignore\""
5454 #: ../fish/guestfish-actions.pod:116 ../src/guestfs-actions.pod:135
5455 msgid "If C<readonly> is true or false:"
5459 #: ../fish/guestfish-actions.pod:118 ../src/guestfs-actions.pod:137
5460 msgid "Disks with the E<lt>readonly/E<gt> flag are skipped."
5464 #: ../fish/guestfish-actions.pod:122
5466 "The other optional parameters are passed directly through to "
5467 "L</add-drive-opts>."
5471 #: ../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:3215 ../fish/guestfish-actions.pod:3430 ../fish/guestfish-actions.pod:3593 ../fish/guestfish-actions.pod:3728 ../fish/guestfish-actions.pod:5099
5473 "This command has one or more optional arguments. See L</OPTIONAL "
5478 #: ../fish/guestfish-actions.pod:127
5483 #: ../fish/guestfish-actions.pod:129
5486 " add-drive filename\n"
5491 #: ../fish/guestfish-actions.pod:131
5493 "This function is the equivalent of calling L</add-drive-opts> with no "
5494 "optional parameters, so the disk is added writable, with the format being "
5495 "detected automatically."
5499 #: ../fish/guestfish-actions.pod:135
5501 "Automatic detection of the format opens you up to a potential security hole "
5502 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
5503 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
5504 "you should think about replacing calls to this function with calls to "
5505 "L</add-drive-opts>, and specifying the format."
5509 #: ../fish/guestfish-actions.pod:142
5510 msgid "add-drive-opts"
5514 #: ../fish/guestfish-actions.pod:144
5519 #: ../fish/guestfish-actions.pod:146
5522 " add-drive-opts filename [readonly:true|false] [format:..] [iface:..] "
5528 #: ../fish/guestfish-actions.pod:148 ../src/guestfs-actions.pod:208
5530 "This function adds a virtual machine disk image C<filename> to libguestfs. "
5531 "The first time you call this function, the disk appears as C</dev/sda>, the "
5532 "second time as C</dev/sdb>, and so on."
5536 #: ../fish/guestfish-actions.pod:153 ../src/guestfs-actions.pod:213
5538 "You don't necessarily need to be root when using libguestfs. However you "
5539 "obviously do need sufficient permissions to access the filename for whatever "
5540 "operations you want to perform (ie. read access if you just want to read the "
5541 "image or write access if you want to modify the image)."
5545 #: ../fish/guestfish-actions.pod:159 ../src/guestfs-actions.pod:219
5546 msgid "This call checks that C<filename> exists."
5550 #: ../fish/guestfish-actions.pod:161 ../fish/guestfish-actions.pod:3392 ../src/guestfs-actions.pod:221 ../src/guestfs-actions.pod:5262
5551 msgid "The optional arguments are:"
5555 #: ../fish/guestfish-actions.pod:165 ../src/guestfs-actions.pod:225
5560 #: ../fish/guestfish-actions.pod:167 ../src/guestfs-actions.pod:227
5562 "If true then the image is treated as read-only. Writes are still allowed, "
5563 "but they are stored in a temporary snapshot overlay which is discarded at "
5564 "the end. The disk that you add is not modified."
5568 #: ../fish/guestfish-actions.pod:171 ../src/guestfs-actions.pod:231
5573 #: ../fish/guestfish-actions.pod:173
5575 "This forces the image format. If you omit this (or use L</add-drive> or "
5576 "L</add-drive-ro>) then the format is automatically detected. Possible "
5577 "formats include C<raw> and C<qcow2>."
5581 #: ../fish/guestfish-actions.pod:177 ../src/guestfs-actions.pod:237
5583 "Automatic detection of the format opens you up to a potential security hole "
5584 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
5585 "RHBZ#642934. Specifying the format closes this security hole."
5589 #: ../fish/guestfish-actions.pod:182 ../src/guestfs-actions.pod:242
5594 #: ../fish/guestfish-actions.pod:184
5596 "This rarely-used option lets you emulate the behaviour of the deprecated "
5597 "L</add-drive-with-if> call (q.v.)"
5601 #: ../fish/guestfish-actions.pod:187 ../fish/guestfish-actions.pod:3242 ../src/guestfs-actions.pod:247 ../src/guestfs-actions.pod:4994
5606 #: ../fish/guestfish-actions.pod:189 ../src/guestfs-actions.pod:249
5608 "The name the drive had in the original guest, e.g. /dev/sdb. This is used as "
5609 "a hint to the guest inspection process if it is available."
5613 #: ../fish/guestfish-actions.pod:196
5614 msgid "add-drive-ro"
5618 #: ../fish/guestfish-actions.pod:198
5623 #: ../fish/guestfish-actions.pod:200
5626 " add-drive-ro filename\n"
5631 #: ../fish/guestfish-actions.pod:202
5633 "This function is the equivalent of calling L</add-drive-opts> with the "
5634 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
5635 "is added read-only, with the format being detected automatically."
5639 #: ../fish/guestfish-actions.pod:207
5640 msgid "add-drive-ro-with-if"
5644 #: ../fish/guestfish-actions.pod:209
5647 " add-drive-ro-with-if filename iface\n"
5652 #: ../fish/guestfish-actions.pod:211
5654 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
5655 "interface emulation to use at run time."
5659 #: ../fish/guestfish-actions.pod:221
5660 msgid "add-drive-with-if"
5664 #: ../fish/guestfish-actions.pod:223
5667 " add-drive-with-if filename iface\n"
5672 #: ../fish/guestfish-actions.pod:225
5674 "This is the same as L</add-drive> but it allows you to specify the QEMU "
5675 "interface emulation to use at run time."
5679 #: ../fish/guestfish-actions.pod:235
5684 #: ../fish/guestfish-actions.pod:237
5687 " aug-clear augpath\n"
5692 #: ../fish/guestfish-actions.pod:239 ../src/guestfs-actions.pod:343
5694 "Set the value associated with C<path> to C<NULL>. This is the same as the "
5695 "L<augtool(1)> C<clear> command."
5699 #: ../fish/guestfish-actions.pod:242
5704 #: ../fish/guestfish-actions.pod:244
5712 #: ../fish/guestfish-actions.pod:246
5714 "Close the current Augeas handle and free up any resources used by it. After "
5715 "calling this, you have to call L</aug-init> again before you can use any "
5716 "other Augeas functions."
5720 #: ../fish/guestfish-actions.pod:251
5725 #: ../fish/guestfish-actions.pod:253
5728 " aug-defnode name expr val\n"
5733 #: ../fish/guestfish-actions.pod:255 ../src/guestfs-actions.pod:372
5734 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
5738 #: ../fish/guestfish-actions.pod:258
5740 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
5741 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
5742 "containing that single node."
5746 #: ../fish/guestfish-actions.pod:262 ../src/guestfs-actions.pod:379
5748 "On success this returns a pair containing the number of nodes in the "
5749 "nodeset, and a boolean flag if a node was created."
5753 #: ../fish/guestfish-actions.pod:266
5758 #: ../fish/guestfish-actions.pod:268
5761 " aug-defvar name expr\n"
5766 #: ../fish/guestfish-actions.pod:270 ../src/guestfs-actions.pod:396
5768 "Defines an Augeas variable C<name> whose value is the result of evaluating "
5769 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
5773 #: ../fish/guestfish-actions.pod:274 ../src/guestfs-actions.pod:400
5775 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
5776 "evaluates to something which is not a nodeset."
5780 #: ../fish/guestfish-actions.pod:277
5785 #: ../fish/guestfish-actions.pod:279
5788 " aug-get augpath\n"
5793 #: ../fish/guestfish-actions.pod:281 ../src/guestfs-actions.pod:413
5795 "Look up the value associated with C<path>. If C<path> matches exactly one "
5796 "node, the C<value> is returned."
5800 #: ../fish/guestfish-actions.pod:284
5805 #: ../fish/guestfish-actions.pod:286
5808 " aug-init root flags\n"
5813 #: ../fish/guestfish-actions.pod:288 ../src/guestfs-actions.pod:428
5815 "Create a new Augeas handle for editing configuration files. If there was "
5816 "any previous Augeas handle associated with this guestfs session, then it is "
5821 #: ../fish/guestfish-actions.pod:292
5822 msgid "You must call this before using any other L</aug-*> commands."
5826 #: ../fish/guestfish-actions.pod:295 ../src/guestfs-actions.pod:435
5827 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
5831 #: ../fish/guestfish-actions.pod:298 ../src/guestfs-actions.pod:438
5833 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
5834 "logical I<or> of the following integers:"
5838 #: ../fish/guestfish-actions.pod:304 ../src/guestfs-actions.pod:444
5839 msgid "C<AUG_SAVE_BACKUP> = 1"
5843 #: ../fish/guestfish-actions.pod:306 ../src/guestfs-actions.pod:446
5844 msgid "Keep the original file with a C<.augsave> extension."
5848 #: ../fish/guestfish-actions.pod:308 ../src/guestfs-actions.pod:448
5849 msgid "C<AUG_SAVE_NEWFILE> = 2"
5853 #: ../fish/guestfish-actions.pod:310 ../src/guestfs-actions.pod:450
5855 "Save changes into a file with extension C<.augnew>, and do not overwrite "
5856 "original. Overrides C<AUG_SAVE_BACKUP>."
5860 #: ../fish/guestfish-actions.pod:313 ../src/guestfs-actions.pod:453
5861 msgid "C<AUG_TYPE_CHECK> = 4"
5865 #: ../fish/guestfish-actions.pod:315 ../src/guestfs-actions.pod:455
5866 msgid "Typecheck lenses."
5870 #: ../fish/guestfish-actions.pod:317
5872 "This option is only useful when debugging Augeas lenses. Use of this option "
5873 "may require additional memory for the libguestfs appliance. You may need to "
5874 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call L</set-memsize>."
5878 #: ../fish/guestfish-actions.pod:322 ../src/guestfs-actions.pod:462
5879 msgid "C<AUG_NO_STDINC> = 8"
5883 #: ../fish/guestfish-actions.pod:324 ../src/guestfs-actions.pod:464
5884 msgid "Do not use standard load path for modules."
5888 #: ../fish/guestfish-actions.pod:326 ../src/guestfs-actions.pod:466
5889 msgid "C<AUG_SAVE_NOOP> = 16"
5893 #: ../fish/guestfish-actions.pod:328 ../src/guestfs-actions.pod:468
5894 msgid "Make save a no-op, just record what would have been changed."
5898 #: ../fish/guestfish-actions.pod:330 ../src/guestfs-actions.pod:470
5899 msgid "C<AUG_NO_LOAD> = 32"
5903 #: ../fish/guestfish-actions.pod:332
5904 msgid "Do not load the tree in L</aug-init>."
5908 #: ../fish/guestfish-actions.pod:336
5909 msgid "To close the handle, you can call L</aug-close>."
5913 #: ../fish/guestfish-actions.pod:338 ../src/guestfs-actions.pod:478
5914 msgid "To find out more about Augeas, see L<http://augeas.net/>."
5918 #: ../fish/guestfish-actions.pod:340
5923 #: ../fish/guestfish-actions.pod:342
5926 " aug-insert augpath label true|false\n"
5931 #: ../fish/guestfish-actions.pod:344 ../src/guestfs-actions.pod:492
5933 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
5934 "or after C<path> (depending on the boolean flag C<before>)."
5938 #: ../fish/guestfish-actions.pod:348 ../src/guestfs-actions.pod:496
5940 "C<path> must match exactly one existing node in the tree, and C<label> must "
5941 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
5945 #: ../fish/guestfish-actions.pod:352
5950 #: ../fish/guestfish-actions.pod:354
5958 #: ../fish/guestfish-actions.pod:356 ../src/guestfs-actions.pod:509
5959 msgid "Load files into the tree."
5963 #: ../fish/guestfish-actions.pod:358 ../src/guestfs-actions.pod:511
5964 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
5968 #: ../fish/guestfish-actions.pod:361
5973 #: ../fish/guestfish-actions.pod:363
5981 #: ../fish/guestfish-actions.pod:365
5983 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
5984 "resulting nodes into alphabetical order."
5988 #: ../fish/guestfish-actions.pod:368
5993 #: ../fish/guestfish-actions.pod:370
5996 " aug-match augpath\n"
6001 #: ../fish/guestfish-actions.pod:372 ../src/guestfs-actions.pod:539
6003 "Returns a list of paths which match the path expression C<path>. The "
6004 "returned paths are sufficiently qualified so that they match exactly one "
6005 "node in the current tree."
6009 #: ../fish/guestfish-actions.pod:376
6014 #: ../fish/guestfish-actions.pod:378
6017 " aug-mv src dest\n"
6022 #: ../fish/guestfish-actions.pod:380 ../src/guestfs-actions.pod:556
6024 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
6025 "C<dest> is overwritten if it exists."
6029 #: ../fish/guestfish-actions.pod:383
6034 #: ../fish/guestfish-actions.pod:385
6042 #: ../fish/guestfish-actions.pod:387 ../src/guestfs-actions.pod:569
6043 msgid "Remove C<path> and all of its children."
6047 #: ../fish/guestfish-actions.pod:389 ../src/guestfs-actions.pod:571
6048 msgid "On success this returns the number of entries which were removed."
6052 #: ../fish/guestfish-actions.pod:391
6057 #: ../fish/guestfish-actions.pod:393
6065 #: ../fish/guestfish-actions.pod:395 ../src/guestfs-actions.pod:582
6066 msgid "This writes all pending changes to disk."
6070 #: ../fish/guestfish-actions.pod:397
6072 "The flags which were passed to L</aug-init> affect exactly how files are "
6077 #: ../fish/guestfish-actions.pod:400
6082 #: ../fish/guestfish-actions.pod:402
6085 " aug-set augpath val\n"
6090 #: ../fish/guestfish-actions.pod:404 ../src/guestfs-actions.pod:598
6091 msgid "Set the value associated with C<path> to C<val>."
6095 #: ../fish/guestfish-actions.pod:406
6097 "In the Augeas API, it is possible to clear a node by setting the value to "
6098 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
6099 "this call. Instead you must use the L</aug-clear> call."
6103 #: ../fish/guestfish-actions.pod:411
6108 #: ../fish/guestfish-actions.pod:413
6111 " available 'groups ...'\n"
6116 #: ../fish/guestfish-actions.pod:415 ../src/guestfs-actions.pod:615
6118 "This command is used to check the availability of some groups of "
6119 "functionality in the appliance, which not all builds of the libguestfs "
6120 "appliance will be able to provide."
6124 #: ../fish/guestfish-actions.pod:419
6126 "The libguestfs groups, and the functions that those groups correspond to, "
6127 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
6128 "runtime by calling L</available-all-groups>."
6132 #: ../fish/guestfish-actions.pod:424 ../src/guestfs-actions.pod:624
6134 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
6135 "\"augeas\"]> would check for the availability of the Linux inotify functions "
6136 "and Augeas (configuration file editing) functions."
6140 #: ../fish/guestfish-actions.pod:429 ../src/guestfs-actions.pod:629
6141 msgid "The command returns no error if I<all> requested groups are available."
6145 #: ../fish/guestfish-actions.pod:431 ../src/guestfs-actions.pod:631
6147 "It fails with an error if one or more of the requested groups is unavailable "
6152 #: ../fish/guestfish-actions.pod:434 ../src/guestfs-actions.pod:634
6154 "If an unknown group name is included in the list of groups then an error is "
6159 #: ../fish/guestfish-actions.pod:437 ../src/guestfs-actions.pod:637
6164 #: ../fish/guestfish-actions.pod:443
6165 msgid "You must call L</launch> before calling this function."
6169 #: ../fish/guestfish-actions.pod:445 ../src/guestfs-actions.pod:645
6171 "The reason is because we don't know what groups are supported by the "
6172 "appliance/daemon until it is running and can be queried."
6176 #: ../fish/guestfish-actions.pod:451 ../src/guestfs-actions.pod:651
6178 "If a group of functions is available, this does not necessarily mean that "
6179 "they will work. You still have to check for errors when calling individual "
6180 "API functions even if they are available."
6184 #: ../fish/guestfish-actions.pod:458 ../src/guestfs-actions.pod:658
6186 "It is usually the job of distro packagers to build complete functionality "
6187 "into the libguestfs appliance. Upstream libguestfs, if built from source "
6188 "with all requirements satisfied, will support everything."
6192 #: ../fish/guestfish-actions.pod:465
6194 "This call was added in version C<1.0.80>. In previous versions of "
6195 "libguestfs all you could do would be to speculatively execute a command to "
6196 "find out if the daemon implemented it. See also L</version>."
6200 #: ../fish/guestfish-actions.pod:472
6201 msgid "available-all-groups"
6205 #: ../fish/guestfish-actions.pod:474
6208 " available-all-groups\n"
6213 #: ../fish/guestfish-actions.pod:476
6215 "This command returns a list of all optional groups that this daemon knows "
6216 "about. Note this returns both supported and unsupported groups. To find "
6217 "out which ones the daemon can actually support you have to call "
6218 "L</available> on each member of the returned list."
6222 #: ../fish/guestfish-actions.pod:482
6223 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
6227 #: ../fish/guestfish-actions.pod:484
6232 #: ../fish/guestfish-actions.pod:486
6235 " base64-in (base64file|-) filename\n"
6240 #: ../fish/guestfish-actions.pod:488 ../src/guestfs-actions.pod:702
6241 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
6245 #: ../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:4955 ../fish/guestfish-actions.pod:4967 ../fish/guestfish-actions.pod:4978 ../fish/guestfish-actions.pod:4989 ../fish/guestfish-actions.pod:5120 ../fish/guestfish-actions.pod:5129 ../fish/guestfish-actions.pod:5183 ../fish/guestfish-actions.pod:5206
6246 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
6250 #: ../fish/guestfish-actions.pod:493
6255 #: ../fish/guestfish-actions.pod:495
6258 " base64-out filename (base64file|-)\n"
6263 #: ../fish/guestfish-actions.pod:497 ../src/guestfs-actions.pod:716
6265 "This command downloads the contents of C<filename>, writing it out to local "
6266 "file C<base64file> encoded as base64."
6270 #: ../fish/guestfish-actions.pod:502
6271 msgid "blockdev-flushbufs"
6275 #: ../fish/guestfish-actions.pod:504
6278 " blockdev-flushbufs device\n"
6283 #: ../fish/guestfish-actions.pod:506 ../src/guestfs-actions.pod:729
6284 msgid "This tells the kernel to flush internal buffers associated with C<device>."
6288 #: ../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
6289 msgid "This uses the L<blockdev(8)> command."
6293 #: ../fish/guestfish-actions.pod:511
6294 msgid "blockdev-getbsz"
6298 #: ../fish/guestfish-actions.pod:513
6301 " blockdev-getbsz device\n"
6306 #: ../fish/guestfish-actions.pod:515 ../src/guestfs-actions.pod:744
6307 msgid "This returns the block size of a device."
6311 #: ../fish/guestfish-actions.pod:517 ../fish/guestfish-actions.pod:580 ../src/guestfs-actions.pod:746 ../src/guestfs-actions.pod:846
6313 "(Note this is different from both I<size in blocks> and I<filesystem block "
6318 #: ../fish/guestfish-actions.pod:522
6319 msgid "blockdev-getro"
6323 #: ../fish/guestfish-actions.pod:524
6326 " blockdev-getro device\n"
6331 #: ../fish/guestfish-actions.pod:526 ../src/guestfs-actions.pod:761
6333 "Returns a boolean indicating if the block device is read-only (true if "
6334 "read-only, false if not)."
6338 #: ../fish/guestfish-actions.pod:531
6339 msgid "blockdev-getsize64"
6343 #: ../fish/guestfish-actions.pod:533
6346 " blockdev-getsize64 device\n"
6351 #: ../fish/guestfish-actions.pod:535 ../src/guestfs-actions.pod:776
6352 msgid "This returns the size of the device in bytes."
6356 #: ../fish/guestfish-actions.pod:537
6357 msgid "See also L</blockdev-getsz>."
6361 #: ../fish/guestfish-actions.pod:541
6362 msgid "blockdev-getss"
6366 #: ../fish/guestfish-actions.pod:543
6369 " blockdev-getss device\n"
6374 #: ../fish/guestfish-actions.pod:545 ../src/guestfs-actions.pod:792
6376 "This returns the size of sectors on a block device. Usually 512, but can be "
6377 "larger for modern devices."
6381 #: ../fish/guestfish-actions.pod:548
6382 msgid "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
6386 #: ../fish/guestfish-actions.pod:553
6387 msgid "blockdev-getsz"
6391 #: ../fish/guestfish-actions.pod:555
6394 " blockdev-getsz device\n"
6399 #: ../fish/guestfish-actions.pod:557 ../src/guestfs-actions.pod:810
6401 "This returns the size of the device in units of 512-byte sectors (even if "
6402 "the sectorsize isn't 512 bytes ... weird)."
6406 #: ../fish/guestfish-actions.pod:560
6408 "See also L</blockdev-getss> for the real sector size of the device, and "
6409 "L</blockdev-getsize64> for the more useful I<size in bytes>."
6413 #: ../fish/guestfish-actions.pod:566
6414 msgid "blockdev-rereadpt"
6418 #: ../fish/guestfish-actions.pod:568
6421 " blockdev-rereadpt device\n"
6426 #: ../fish/guestfish-actions.pod:570 ../src/guestfs-actions.pod:829
6427 msgid "Reread the partition table on C<device>."
6431 #: ../fish/guestfish-actions.pod:574
6432 msgid "blockdev-setbsz"
6436 #: ../fish/guestfish-actions.pod:576
6439 " blockdev-setbsz device blocksize\n"
6444 #: ../fish/guestfish-actions.pod:578 ../src/guestfs-actions.pod:844
6445 msgid "This sets the block size of a device."
6449 #: ../fish/guestfish-actions.pod:585
6450 msgid "blockdev-setro"
6454 #: ../fish/guestfish-actions.pod:587
6457 " blockdev-setro device\n"
6462 #: ../fish/guestfish-actions.pod:589 ../src/guestfs-actions.pod:861
6463 msgid "Sets the block device named C<device> to read-only."
6467 #: ../fish/guestfish-actions.pod:593
6468 msgid "blockdev-setrw"
6472 #: ../fish/guestfish-actions.pod:595
6475 " blockdev-setrw device\n"
6480 #: ../fish/guestfish-actions.pod:597 ../src/guestfs-actions.pod:875
6481 msgid "Sets the block device named C<device> to read-write."
6485 #: ../fish/guestfish-actions.pod:601
6486 msgid "btrfs-filesystem-resize"
6490 #: ../fish/guestfish-actions.pod:603
6493 " btrfs-filesystem-resize mountpoint [size:N]\n"
6498 #: ../fish/guestfish-actions.pod:605 ../src/guestfs-actions.pod:897
6499 msgid "This command resizes a btrfs filesystem."
6503 #: ../fish/guestfish-actions.pod:607 ../src/guestfs-actions.pod:899
6505 "Note that unlike other resize calls, the filesystem has to be mounted and "
6506 "the parameter is the mountpoint not the device (this is a requirement of "
6511 #: ../fish/guestfish-actions.pod:611 ../fish/guestfish-actions.pod:3164 ../fish/guestfish-actions.pod:3703 ../fish/guestfish-actions.pod:5029 ../src/guestfs-actions.pod:903 ../src/guestfs-actions.pod:4890 ../src/guestfs-actions.pod:5786 ../src/guestfs-actions.pod:7762
6512 msgid "The optional parameters are:"
6516 #: ../fish/guestfish-actions.pod:615 ../fish/guestfish-actions.pod:3707 ../src/guestfs-actions.pod:907 ../src/guestfs-actions.pod:5790
6521 #: ../fish/guestfish-actions.pod:617 ../src/guestfs-actions.pod:909
6523 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
6524 "resized to the maximum size."
6528 #: ../fish/guestfish-actions.pod:622 ../src/guestfs-actions.pod:914
6529 msgid "See also L<btrfs(8)>."
6533 #: ../fish/guestfish-actions.pod:626
6534 msgid "case-sensitive-path"
6538 #: ../fish/guestfish-actions.pod:628
6541 " case-sensitive-path path\n"
6546 #: ../fish/guestfish-actions.pod:630 ../src/guestfs-actions.pod:948
6548 "This can be used to resolve case insensitive paths on a filesystem which is "
6549 "case sensitive. The use case is to resolve paths which you have read from "
6550 "Windows configuration files or the Windows Registry, to the true path."
6554 #: ../fish/guestfish-actions.pod:635 ../src/guestfs-actions.pod:953
6556 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
6557 "(and probably others), which is that although the underlying filesystem is "
6558 "case-insensitive, the driver exports the filesystem to Linux as "
6563 #: ../fish/guestfish-actions.pod:640 ../src/guestfs-actions.pod:958
6565 "One consequence of this is that special directories such as C<c:\\windows> "
6566 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
6567 "precise details of how they were created. In Windows itself this would not "
6572 #: ../fish/guestfish-actions.pod:646 ../src/guestfs-actions.pod:964
6574 "Bug or feature? You decide: "
6575 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
6579 #: ../fish/guestfish-actions.pod:649 ../src/guestfs-actions.pod:967
6581 "This function resolves the true case of each element in the path and returns "
6582 "the case-sensitive path."
6586 #: ../fish/guestfish-actions.pod:652
6588 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return "
6589 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
6590 "how the directories were originally created under Windows)."
6594 #: ../fish/guestfish-actions.pod:657 ../src/guestfs-actions.pod:975
6595 msgid "I<Note>: This function does not handle drive names, backslashes etc."
6599 #: ../fish/guestfish-actions.pod:660
6600 msgid "See also L</realpath>."
6604 #: ../fish/guestfish-actions.pod:662
6609 #: ../fish/guestfish-actions.pod:664
6617 #: ../fish/guestfish-actions.pod:666 ../fish/guestfish-actions.pod:4134 ../src/guestfs-actions.pod:991 ../src/guestfs-actions.pod:6446
6618 msgid "Return the contents of the file named C<path>."
6622 #: ../fish/guestfish-actions.pod:668
6624 "Note that this function cannot correctly handle binary files (specifically, "
6625 "files containing C<\\0> character which is treated as end of string). For "
6626 "those you need to use the L</read-file> or L</download> functions which have "
6627 "a more complex interface."
6631 #: ../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:4004 ../fish/guestfish-actions.pod:4019 ../fish/guestfish-actions.pod:4095 ../fish/guestfish-actions.pod:4112 ../fish/guestfish-actions.pod:4127 ../fish/guestfish-actions.pod:4796 ../fish/guestfish-actions.pod:4842 ../fish/guestfish-actions.pod:4927 ../fish/guestfish-actions.pod:4942 ../fish/guestfish-actions.pod:5427 ../fish/guestfish-actions.pod:5439 ../fish/guestfish-actions.pod:5457 ../fish/guestfish-actions.pod:5474 ../fish/guestfish-actions.pod:5484 ../fish/guestfish-actions.pod:5538 ../fish/guestfish-actions.pod:5548 ../fish/guestfish-actions.pod:5577 ../fish/guestfish-actions.pod:5587 ../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:6228 ../src/guestfs-actions.pod:6254 ../src/guestfs-actions.pod:6385 ../src/guestfs-actions.pod:6411 ../src/guestfs-actions.pod:6435 ../src/guestfs-actions.pod:7390 ../src/guestfs-actions.pod:7445 ../src/guestfs-actions.pod:7591 ../src/guestfs-actions.pod:7615 ../src/guestfs-actions.pod:8400 ../src/guestfs-actions.pod:8420 ../src/guestfs-actions.pod:8453 ../src/guestfs-actions.pod:8472 ../src/guestfs-actions.pod:8491 ../src/guestfs-actions.pod:8582 ../src/guestfs-actions.pod:8601 ../src/guestfs-actions.pod:8647 ../src/guestfs-actions.pod:8666
6633 "Because of the message protocol, there is a transfer limit of somewhere "
6634 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
6638 #: ../fish/guestfish-actions.pod:676
6643 #: ../fish/guestfish-actions.pod:678
6646 " checksum csumtype path\n"
6651 #: ../fish/guestfish-actions.pod:680 ../src/guestfs-actions.pod:1013
6652 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
6656 #: ../fish/guestfish-actions.pod:683 ../src/guestfs-actions.pod:1016
6658 "The type of checksum to compute is given by the C<csumtype> parameter which "
6659 "must have one of the following values:"
6663 #: ../fish/guestfish-actions.pod:688 ../src/guestfs-actions.pod:1021
6668 #: ../fish/guestfish-actions.pod:690 ../src/guestfs-actions.pod:1023
6670 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
6675 #: ../fish/guestfish-actions.pod:693 ../src/guestfs-actions.pod:1026
6680 #: ../fish/guestfish-actions.pod:695 ../src/guestfs-actions.pod:1028
6681 msgid "Compute the MD5 hash (using the C<md5sum> program)."
6685 #: ../fish/guestfish-actions.pod:697 ../src/guestfs-actions.pod:1030
6690 #: ../fish/guestfish-actions.pod:699 ../src/guestfs-actions.pod:1032
6691 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
6695 #: ../fish/guestfish-actions.pod:701 ../src/guestfs-actions.pod:1034
6700 #: ../fish/guestfish-actions.pod:703 ../src/guestfs-actions.pod:1036
6701 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
6705 #: ../fish/guestfish-actions.pod:705 ../src/guestfs-actions.pod:1038
6710 #: ../fish/guestfish-actions.pod:707 ../src/guestfs-actions.pod:1040
6711 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
6715 #: ../fish/guestfish-actions.pod:709 ../src/guestfs-actions.pod:1042
6720 #: ../fish/guestfish-actions.pod:711 ../src/guestfs-actions.pod:1044
6721 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
6725 #: ../fish/guestfish-actions.pod:713 ../src/guestfs-actions.pod:1046
6730 #: ../fish/guestfish-actions.pod:715 ../src/guestfs-actions.pod:1048
6731 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
6735 #: ../fish/guestfish-actions.pod:719 ../src/guestfs-actions.pod:1052
6736 msgid "The checksum is returned as a printable string."
6740 #: ../fish/guestfish-actions.pod:721
6741 msgid "To get the checksum for a device, use L</checksum-device>."
6745 #: ../fish/guestfish-actions.pod:723
6746 msgid "To get the checksums for many files, use L</checksums-out>."
6750 #: ../fish/guestfish-actions.pod:725
6751 msgid "checksum-device"
6755 #: ../fish/guestfish-actions.pod:727
6758 " checksum-device csumtype device\n"
6763 #: ../fish/guestfish-actions.pod:729
6765 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
6766 "device named C<device>. For the types of checksums supported see the "
6767 "L</checksum> command."
6771 #: ../fish/guestfish-actions.pod:733
6772 msgid "checksums-out"
6776 #: ../fish/guestfish-actions.pod:735
6779 " checksums-out csumtype directory (sumsfile|-)\n"
6784 #: ../fish/guestfish-actions.pod:737 ../src/guestfs-actions.pod:1087
6786 "This command computes the checksums of all regular files in C<directory> and "
6787 "then emits a list of those checksums to the local output file C<sumsfile>."
6791 #: ../fish/guestfish-actions.pod:741 ../src/guestfs-actions.pod:1091
6793 "This can be used for verifying the integrity of a virtual machine. However "
6794 "to be properly secure you should pay attention to the output of the checksum "
6795 "command (it uses the ones from GNU coreutils). In particular when the "
6796 "filename is not printable, coreutils uses a special backslash syntax. For "
6797 "more information, see the GNU coreutils info file."
6801 #: ../fish/guestfish-actions.pod:751
6806 #: ../fish/guestfish-actions.pod:753
6809 " chmod mode path\n"
6814 #: ../fish/guestfish-actions.pod:755 ../src/guestfs-actions.pod:1110
6816 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
6821 #: ../fish/guestfish-actions.pod:758 ../src/guestfs-actions.pod:1113
6823 "I<Note>: When using this command from guestfish, C<mode> by default would be "
6824 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
6829 #: ../fish/guestfish-actions.pod:762 ../fish/guestfish-actions.pod:3356 ../fish/guestfish-actions.pod:3495 ../fish/guestfish-actions.pod:3505 ../fish/guestfish-actions.pod:3515 ../src/guestfs-actions.pod:1117 ../src/guestfs-actions.pod:5193 ../src/guestfs-actions.pod:5402 ../src/guestfs-actions.pod:5421 ../src/guestfs-actions.pod:5440
6830 msgid "The mode actually set is affected by the umask."
6834 #: ../fish/guestfish-actions.pod:764
6839 #: ../fish/guestfish-actions.pod:766
6842 " chown owner group path\n"
6847 #: ../fish/guestfish-actions.pod:768 ../src/guestfs-actions.pod:1131
6848 msgid "Change the file owner to C<owner> and group to C<group>."
6852 #: ../fish/guestfish-actions.pod:770 ../fish/guestfish-actions.pod:2703 ../src/guestfs-actions.pod:1133 ../src/guestfs-actions.pod:4124
6854 "Only numeric uid and gid are supported. If you want to use names, you will "
6855 "need to locate and parse the password file yourself (Augeas support makes "
6856 "this relatively easy)."
6860 #: ../fish/guestfish-actions.pod:774
6865 #: ../fish/guestfish-actions.pod:776
6868 " command 'arguments ...'\n"
6873 #: ../fish/guestfish-actions.pod:778 ../src/guestfs-actions.pod:1147
6875 "This call runs a command from the guest filesystem. The filesystem must be "
6876 "mounted, and must contain a compatible operating system (ie. something "
6877 "Linux, with the same or compatible processor architecture)."
6881 #: ../fish/guestfish-actions.pod:783
6883 "The single parameter is an argv-style list of arguments. The first element "
6884 "is the name of the program to run. Subsequent elements are parameters. The "
6885 "list must be non-empty (ie. must contain a program name). Note that the "
6886 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
6890 #: ../fish/guestfish-actions.pod:790 ../src/guestfs-actions.pod:1159
6891 msgid "The return value is anything printed to I<stdout> by the command."
6895 #: ../fish/guestfish-actions.pod:793 ../src/guestfs-actions.pod:1162
6897 "If the command returns a non-zero exit status, then this function returns an "
6898 "error message. The error message string is the content of I<stderr> from "
6903 #: ../fish/guestfish-actions.pod:797 ../src/guestfs-actions.pod:1166
6905 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
6906 "C</bin>. If you require a program from another location, you should provide "
6907 "the full path in the first parameter."
6911 #: ../fish/guestfish-actions.pod:802 ../src/guestfs-actions.pod:1171
6913 "Shared libraries and data files required by the program must be available on "
6914 "filesystems which are mounted in the correct places. It is the caller's "
6915 "responsibility to ensure all filesystems that are needed are mounted at the "
6920 #: ../fish/guestfish-actions.pod:811
6921 msgid "command-lines"
6925 #: ../fish/guestfish-actions.pod:813
6928 " command-lines 'arguments ...'\n"
6933 #: ../fish/guestfish-actions.pod:815
6934 msgid "This is the same as L</command>, but splits the result into a list of lines."
6938 #: ../fish/guestfish-actions.pod:818
6939 msgid "See also: L</sh-lines>"
6943 #: ../fish/guestfish-actions.pod:823
6944 msgid "compress-device-out"
6948 #: ../fish/guestfish-actions.pod:825
6951 " compress-device-out ctype device (zdevice|-) [level:N]\n"
6956 #: ../fish/guestfish-actions.pod:827 ../src/guestfs-actions.pod:1221
6958 "This command compresses C<device> and writes it out to the local file "
6963 #: ../fish/guestfish-actions.pod:830
6965 "The C<ctype> and optional C<level> parameters have the same meaning as in "
6970 #: ../fish/guestfish-actions.pod:837
6971 msgid "compress-out"
6975 #: ../fish/guestfish-actions.pod:839
6978 " compress-out ctype file (zfile|-) [level:N]\n"
6983 #: ../fish/guestfish-actions.pod:841 ../src/guestfs-actions.pod:1273
6985 "This command compresses C<file> and writes it out to the local file "
6990 #: ../fish/guestfish-actions.pod:844 ../src/guestfs-actions.pod:1276
6992 "The compression program used is controlled by the C<ctype> parameter. "
6993 "Currently this includes: C<compress>, C<gzip>, C<bzip2>, C<xz> or C<lzop>. "
6994 "Some compression types may not be supported by particular builds of "
6995 "libguestfs, in which case you will get an error containing the substring "
6996 "\"not supported\"."
7000 #: ../fish/guestfish-actions.pod:850 ../src/guestfs-actions.pod:1282
7002 "The optional C<level> parameter controls compression level. The meaning and "
7003 "default for this parameter depends on the compression program being used."
7007 #: ../fish/guestfish-actions.pod:858
7012 #: ../fish/guestfish-actions.pod:860
7015 " config qemuparam qemuvalue\n"
7020 #: ../fish/guestfish-actions.pod:862 ../src/guestfs-actions.pod:1323
7022 "This can be used to add arbitrary qemu command line parameters of the form "
7023 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
7024 "setting some parameters which would interfere with parameters that we use."
7028 #: ../fish/guestfish-actions.pod:867 ../src/guestfs-actions.pod:1328
7029 msgid "The first character of C<param> string must be a C<-> (dash)."
7033 #: ../fish/guestfish-actions.pod:869 ../src/guestfs-actions.pod:1330
7034 msgid "C<value> can be NULL."
7038 #: ../fish/guestfish-actions.pod:871
7039 msgid "copy-device-to-device"
7043 #: ../fish/guestfish-actions.pod:873
7046 " copy-device-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7051 #: ../fish/guestfish-actions.pod:875
7053 "The four calls L</copy-device-to-device>, L</copy-device-to-file>, "
7054 "L</copy-file-to-device>, and L</copy-file-to-file> let you copy from a "
7055 "source (device|file) to a destination (device|file)."
7059 #: ../fish/guestfish-actions.pod:882 ../src/guestfs-actions.pod:1360
7061 "Partial copies can be made since you can specify optionally the source "
7062 "offset, destination offset and size to copy. These values are all specified "
7063 "in bytes. If not given, the offsets both default to zero, and the size "
7064 "defaults to copying as much as possible until we hit the end of the source."
7068 #: ../fish/guestfish-actions.pod:888 ../src/guestfs-actions.pod:1366
7070 "The source and destination may be the same object. However overlapping "
7071 "regions may not be copied correctly."
7075 #: ../fish/guestfish-actions.pod:891 ../src/guestfs-actions.pod:1369
7077 "If the destination is a file, it is created if required. If the destination "
7078 "file is not large enough, it is extended."
7082 #: ../fish/guestfish-actions.pod:896
7083 msgid "copy-device-to-file"
7087 #: ../fish/guestfish-actions.pod:898
7090 " copy-device-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7095 #: ../fish/guestfish-actions.pod:900 ../fish/guestfish-actions.pod:909 ../fish/guestfish-actions.pod:918
7096 msgid "See L</copy-device-to-device> for a general overview of this call."
7100 #: ../fish/guestfish-actions.pod:905
7101 msgid "copy-file-to-device"
7105 #: ../fish/guestfish-actions.pod:907
7108 " copy-file-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7113 #: ../fish/guestfish-actions.pod:914
7114 msgid "copy-file-to-file"
7118 #: ../fish/guestfish-actions.pod:916
7121 " copy-file-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7126 #: ../fish/guestfish-actions.pod:921
7128 "This is B<not> the function you want for copying files. This is for copying "
7129 "blocks within existing files. See L</cp>, L</cp-a> and L</mv> for general "
7130 "file copying and moving functions."
7134 #: ../fish/guestfish-actions.pod:928
7139 #: ../fish/guestfish-actions.pod:930
7142 " copy-size src dest size\n"
7147 #: ../fish/guestfish-actions.pod:932 ../src/guestfs-actions.pod:1584
7149 "This command copies exactly C<size> bytes from one source device or file "
7150 "C<src> to another destination device or file C<dest>."
7154 #: ../fish/guestfish-actions.pod:935 ../src/guestfs-actions.pod:1587
7156 "Note this will fail if the source is too short or if the destination is not "
7161 #: ../fish/guestfish-actions.pod:938 ../fish/guestfish-actions.pod:973
7163 "I<This function is deprecated.> In new code, use the "
7164 "L</copy_device_to_device> call instead."
7168 #: ../fish/guestfish-actions.pod:945
7173 #: ../fish/guestfish-actions.pod:947
7181 #: ../fish/guestfish-actions.pod:949 ../src/guestfs-actions.pod:1606
7183 "This copies a file from C<src> to C<dest> where C<dest> is either a "
7184 "destination filename or destination directory."
7188 #: ../fish/guestfish-actions.pod:952
7193 #: ../fish/guestfish-actions.pod:954
7201 #: ../fish/guestfish-actions.pod:956 ../src/guestfs-actions.pod:1620
7203 "This copies a file or directory from C<src> to C<dest> recursively using the "
7208 #: ../fish/guestfish-actions.pod:959
7213 #: ../fish/guestfish-actions.pod:961
7221 #: ../fish/guestfish-actions.pod:963 ../src/guestfs-actions.pod:1641
7223 "This command copies from one source device or file C<src> to another "
7224 "destination device or file C<dest>. Normally you would use this to copy to "
7225 "or from a device or partition, for example to duplicate a filesystem."
7229 #: ../fish/guestfish-actions.pod:968
7231 "If the destination is a device, it must be as large or larger than the "
7232 "source file or device, otherwise the copy will fail. This command cannot do "
7233 "partial copies (see L</copy-device-to-device>)."
7237 #: ../fish/guestfish-actions.pod:980
7242 #: ../fish/guestfish-actions.pod:982
7250 #: ../fish/guestfish-actions.pod:984 ../src/guestfs-actions.pod:1660
7251 msgid "This command runs the C<df> command to report disk space used."
7255 #: ../fish/guestfish-actions.pod:986 ../fish/guestfish-actions.pod:997
7257 "This command is mostly useful for interactive sessions. It is I<not> "
7258 "intended that you try to parse the output string. Use L</statvfs> from "
7263 #: ../fish/guestfish-actions.pod:990
7268 #: ../fish/guestfish-actions.pod:992
7276 #: ../fish/guestfish-actions.pod:994 ../src/guestfs-actions.pod:1676
7278 "This command runs the C<df -h> command to report disk space used in "
7279 "human-readable format."
7283 #: ../fish/guestfish-actions.pod:1001
7288 #: ../fish/guestfish-actions.pod:1003
7296 #: ../fish/guestfish-actions.pod:1005 ../src/guestfs-actions.pod:1693
7298 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
7299 "This is sometimes useful for extended debugging of problems."
7303 #: ../fish/guestfish-actions.pod:1009
7305 "Another way to get the same information is to enable verbose messages with "
7306 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
7307 "before running the program."
7311 #: ../fish/guestfish-actions.pod:1014
7316 #: ../fish/guestfish-actions.pod:1016
7319 " download remotefilename (filename|-)\n"
7324 #: ../fish/guestfish-actions.pod:1018 ../fish/guestfish-actions.pod:1031 ../src/guestfs-actions.pod:1714 ../src/guestfs-actions.pod:1739
7326 "Download file C<remotefilename> and save it as C<filename> on the local "
7331 #: ../fish/guestfish-actions.pod:1021 ../fish/guestfish-actions.pod:5179 ../src/guestfs-actions.pod:1717 ../src/guestfs-actions.pod:7970
7332 msgid "C<filename> can also be a named pipe."
7336 #: ../fish/guestfish-actions.pod:1023
7337 msgid "See also L</upload>, L</cat>."
7341 #: ../fish/guestfish-actions.pod:1027
7342 msgid "download-offset"
7346 #: ../fish/guestfish-actions.pod:1029
7349 " download-offset remotefilename (filename|-) offset size\n"
7354 #: ../fish/guestfish-actions.pod:1034 ../src/guestfs-actions.pod:1742
7356 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
7357 "region must be within the file or device)."
7361 #: ../fish/guestfish-actions.pod:1037
7363 "Note that there is no limit on the amount of data that can be downloaded "
7364 "with this call, unlike with L</pread>, and this call always reads the full "
7365 "amount unless an error occurs."
7369 #: ../fish/guestfish-actions.pod:1042
7370 msgid "See also L</download>, L</pread>."
7374 #: ../fish/guestfish-actions.pod:1046
7379 #: ../fish/guestfish-actions.pod:1048
7382 " drop-caches whattodrop\n"
7387 #: ../fish/guestfish-actions.pod:1050 ../src/guestfs-actions.pod:1767
7389 "This instructs the guest kernel to drop its page cache, and/or dentries and "
7390 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
7391 "to drop, see L<http://linux-mm.org/Drop_Caches>"
7395 #: ../fish/guestfish-actions.pod:1055 ../src/guestfs-actions.pod:1772
7396 msgid "Setting C<whattodrop> to 3 should drop everything."
7400 #: ../fish/guestfish-actions.pod:1057 ../src/guestfs-actions.pod:1774
7402 "This automatically calls L<sync(2)> before the operation, so that the "
7403 "maximum guest memory is freed."
7407 #: ../fish/guestfish-actions.pod:1060
7412 #: ../fish/guestfish-actions.pod:1062
7420 #: ../fish/guestfish-actions.pod:1064 ../src/guestfs-actions.pod:1787
7422 "This command runs the C<du -s> command to estimate file space usage for "
7427 #: ../fish/guestfish-actions.pod:1067 ../src/guestfs-actions.pod:1790
7429 "C<path> can be a file or a directory. If C<path> is a directory then the "
7430 "estimate includes the contents of the directory and all subdirectories "
7435 #: ../fish/guestfish-actions.pod:1071 ../src/guestfs-actions.pod:1794
7436 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
7440 #: ../fish/guestfish-actions.pod:1074
7445 #: ../fish/guestfish-actions.pod:1076
7448 " e2fsck-f device\n"
7453 #: ../fish/guestfish-actions.pod:1078 ../src/guestfs-actions.pod:1812
7455 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
7456 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
7461 #: ../fish/guestfish-actions.pod:1082
7463 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
7464 "should use L</fsck>."
7468 #: ../fish/guestfish-actions.pod:1085
7473 #: ../fish/guestfish-actions.pod:1087
7476 " echo-daemon 'words ...'\n"
7481 #: ../fish/guestfish-actions.pod:1089 ../src/guestfs-actions.pod:1829
7483 "This command concatenates the list of C<words> passed with single spaces "
7484 "between them and returns the resulting string."
7488 #: ../fish/guestfish-actions.pod:1092 ../src/guestfs-actions.pod:1832
7489 msgid "You can use this command to test the connection through to the daemon."
7493 #: ../fish/guestfish-actions.pod:1094
7494 msgid "See also L</ping-daemon>."
7498 #: ../fish/guestfish-actions.pod:1096
7503 #: ../fish/guestfish-actions.pod:1098
7506 " egrep regex path\n"
7511 #: ../fish/guestfish-actions.pod:1100 ../src/guestfs-actions.pod:1848
7512 msgid "This calls the external C<egrep> program and returns the matching lines."
7516 #: ../fish/guestfish-actions.pod:1106
7521 #: ../fish/guestfish-actions.pod:1108
7524 " egrepi regex path\n"
7529 #: ../fish/guestfish-actions.pod:1110 ../src/guestfs-actions.pod:1867
7530 msgid "This calls the external C<egrep -i> program and returns the matching lines."
7534 #: ../fish/guestfish-actions.pod:1116
7539 #: ../fish/guestfish-actions.pod:1118
7542 " equal file1 file2\n"
7547 #: ../fish/guestfish-actions.pod:1120 ../src/guestfs-actions.pod:1886
7549 "This compares the two files C<file1> and C<file2> and returns true if their "
7550 "content is exactly equal, or false otherwise."
7554 #: ../fish/guestfish-actions.pod:1123 ../src/guestfs-actions.pod:1889
7555 msgid "The external L<cmp(1)> program is used for the comparison."
7559 #: ../fish/guestfish-actions.pod:1125
7564 #: ../fish/guestfish-actions.pod:1127
7572 #: ../fish/guestfish-actions.pod:1129 ../src/guestfs-actions.pod:1901
7574 "This returns C<true> if and only if there is a file, directory (or anything) "
7575 "with the given C<path> name."
7579 #: ../fish/guestfish-actions.pod:1132
7580 msgid "See also L</is-file>, L</is-dir>, L</stat>."
7584 #: ../fish/guestfish-actions.pod:1134
7589 #: ../fish/guestfish-actions.pod:1136
7592 " fallocate path len\n"
7597 #: ../fish/guestfish-actions.pod:1138 ../fish/guestfish-actions.pod:1157 ../src/guestfs-actions.pod:1924 ../src/guestfs-actions.pod:1943
7599 "This command preallocates a file (containing zero bytes) named C<path> of "
7600 "size C<len> bytes. If the file exists already, it is overwritten."
7604 #: ../fish/guestfish-actions.pod:1142 ../src/guestfs-actions.pod:1928
7606 "Do not confuse this with the guestfish-specific C<alloc> command which "
7607 "allocates a file in the host and attaches it as a device."
7611 #: ../fish/guestfish-actions.pod:1146
7613 "I<This function is deprecated.> In new code, use the L</fallocate64> call "
7618 #: ../fish/guestfish-actions.pod:1153
7623 #: ../fish/guestfish-actions.pod:1155
7626 " fallocate64 path len\n"
7631 #: ../fish/guestfish-actions.pod:1161
7633 "Note that this call allocates disk blocks for the file. To create a sparse "
7634 "file use L</truncate-size> instead."
7638 #: ../fish/guestfish-actions.pod:1164
7640 "The deprecated call L</fallocate> does the same, but owing to an oversight "
7641 "it only allowed 30 bit lengths to be specified, effectively limiting the "
7642 "maximum size of files created through that call to 1GB."
7646 #: ../fish/guestfish-actions.pod:1169 ../src/guestfs-actions.pod:1955
7648 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
7649 "commands which create a file in the host and attach it as a device."
7653 #: ../fish/guestfish-actions.pod:1173
7658 #: ../fish/guestfish-actions.pod:1175
7661 " fgrep pattern path\n"
7666 #: ../fish/guestfish-actions.pod:1177 ../src/guestfs-actions.pod:1970
7667 msgid "This calls the external C<fgrep> program and returns the matching lines."
7671 #: ../fish/guestfish-actions.pod:1183
7676 #: ../fish/guestfish-actions.pod:1185
7679 " fgrepi pattern path\n"
7684 #: ../fish/guestfish-actions.pod:1187 ../src/guestfs-actions.pod:1989
7685 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
7689 #: ../fish/guestfish-actions.pod:1193
7694 #: ../fish/guestfish-actions.pod:1195
7702 #: ../fish/guestfish-actions.pod:1197 ../src/guestfs-actions.pod:2007
7704 "This call uses the standard L<file(1)> command to determine the type or "
7705 "contents of the file."
7709 #: ../fish/guestfish-actions.pod:1200 ../src/guestfs-actions.pod:2010
7711 "This call will also transparently look inside various types of compressed "
7716 #: ../fish/guestfish-actions.pod:1203 ../src/guestfs-actions.pod:2013
7718 "The exact command which runs is C<file -zb path>. Note in particular that "
7719 "the filename is not prepended to the output (the I<-b> option)."
7723 #: ../fish/guestfish-actions.pod:1207 ../src/guestfs-actions.pod:2017
7725 "The output depends on the output of the underlying L<file(1)> command and it "
7726 "can change in future in ways beyond our control. In other words, the output "
7727 "is not guaranteed by the ABI."
7731 #: ../fish/guestfish-actions.pod:1211
7733 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
7734 "(etc), L</is-zero>."
7738 #: ../fish/guestfish-actions.pod:1214
7739 msgid "file-architecture"
7743 #: ../fish/guestfish-actions.pod:1216
7746 " file-architecture filename\n"
7751 #: ../fish/guestfish-actions.pod:1218 ../src/guestfs-actions.pod:2035
7753 "This detects the architecture of the binary C<filename>, and returns it if "
7758 #: ../fish/guestfish-actions.pod:1221 ../src/guestfs-actions.pod:2038
7759 msgid "Currently defined architectures are:"
7763 #: ../fish/guestfish-actions.pod:1225 ../src/guestfs-actions.pod:2042
7768 #: ../fish/guestfish-actions.pod:1227 ../src/guestfs-actions.pod:2044
7770 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
7771 "irrespective of the precise processor requirements of the binary."
7775 #: ../fish/guestfish-actions.pod:1230 ../src/guestfs-actions.pod:2047
7780 #: ../fish/guestfish-actions.pod:1232 ../src/guestfs-actions.pod:2049
7781 msgid "64 bit x86-64."
7785 #: ../fish/guestfish-actions.pod:1234 ../src/guestfs-actions.pod:2051
7790 #: ../fish/guestfish-actions.pod:1236 ../src/guestfs-actions.pod:2053
7791 msgid "32 bit SPARC."
7795 #: ../fish/guestfish-actions.pod:1238 ../src/guestfs-actions.pod:2055
7800 #: ../fish/guestfish-actions.pod:1240 ../src/guestfs-actions.pod:2057
7801 msgid "64 bit SPARC V9 and above."
7805 #: ../fish/guestfish-actions.pod:1242 ../src/guestfs-actions.pod:2059
7810 #: ../fish/guestfish-actions.pod:1244 ../src/guestfs-actions.pod:2061
7811 msgid "Intel Itanium."
7815 #: ../fish/guestfish-actions.pod:1246 ../src/guestfs-actions.pod:2063
7820 #: ../fish/guestfish-actions.pod:1248 ../src/guestfs-actions.pod:2065
7821 msgid "32 bit Power PC."
7825 #: ../fish/guestfish-actions.pod:1250 ../src/guestfs-actions.pod:2067
7830 #: ../fish/guestfish-actions.pod:1252 ../src/guestfs-actions.pod:2069
7831 msgid "64 bit Power PC."
7835 #: ../fish/guestfish-actions.pod:1256 ../src/guestfs-actions.pod:2073
7836 msgid "Libguestfs may return other architecture strings in future."
7840 #: ../fish/guestfish-actions.pod:1258 ../src/guestfs-actions.pod:2075
7841 msgid "The function works on at least the following types of files:"
7845 #: ../fish/guestfish-actions.pod:1264 ../src/guestfs-actions.pod:2081
7846 msgid "many types of Un*x and Linux binary"
7850 #: ../fish/guestfish-actions.pod:1268 ../src/guestfs-actions.pod:2085
7851 msgid "many types of Un*x and Linux shared library"
7855 #: ../fish/guestfish-actions.pod:1272 ../src/guestfs-actions.pod:2089
7856 msgid "Windows Win32 and Win64 binaries"
7860 #: ../fish/guestfish-actions.pod:1276 ../src/guestfs-actions.pod:2093
7861 msgid "Windows Win32 and Win64 DLLs"
7865 #: ../fish/guestfish-actions.pod:1278 ../src/guestfs-actions.pod:2095
7866 msgid "Win32 binaries and DLLs return C<i386>."
7870 #: ../fish/guestfish-actions.pod:1280 ../src/guestfs-actions.pod:2097
7871 msgid "Win64 binaries and DLLs return C<x86_64>."
7875 #: ../fish/guestfish-actions.pod:1284 ../src/guestfs-actions.pod:2101
7876 msgid "Linux kernel modules"
7880 #: ../fish/guestfish-actions.pod:1288 ../src/guestfs-actions.pod:2105
7881 msgid "Linux new-style initrd images"
7885 #: ../fish/guestfish-actions.pod:1292 ../src/guestfs-actions.pod:2109
7886 msgid "some non-x86 Linux vmlinuz kernels"
7890 #: ../fish/guestfish-actions.pod:1296 ../src/guestfs-actions.pod:2113
7891 msgid "What it can't do currently:"
7895 #: ../fish/guestfish-actions.pod:1302 ../src/guestfs-actions.pod:2119
7896 msgid "static libraries (libfoo.a)"
7900 #: ../fish/guestfish-actions.pod:1306 ../src/guestfs-actions.pod:2123
7901 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
7905 #: ../fish/guestfish-actions.pod:1310 ../src/guestfs-actions.pod:2127
7906 msgid "x86 Linux vmlinuz kernels"
7910 #: ../fish/guestfish-actions.pod:1312 ../src/guestfs-actions.pod:2129
7912 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
7913 "compressed code, and are horribly hard to unpack. If you want to find the "
7914 "architecture of a kernel, use the architecture of the associated initrd or "
7915 "kernel module(s) instead."
7919 #: ../fish/guestfish-actions.pod:1319
7924 #: ../fish/guestfish-actions.pod:1321
7932 #: ../fish/guestfish-actions.pod:1323 ../src/guestfs-actions.pod:2147
7933 msgid "This command returns the size of C<file> in bytes."
7937 #: ../fish/guestfish-actions.pod:1325
7939 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, "
7940 "L</is-file> etc. To get the size of block devices, use "
7941 "L</blockdev-getsize64>."
7945 #: ../fish/guestfish-actions.pod:1329
7950 #: ../fish/guestfish-actions.pod:1331
7953 " fill c len path\n"
7958 #: ../fish/guestfish-actions.pod:1333 ../src/guestfs-actions.pod:2165
7960 "This command creates a new file called C<path>. The initial content of the "
7961 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
7966 #: ../fish/guestfish-actions.pod:1337
7968 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
7969 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
7974 #: ../fish/guestfish-actions.pod:1342
7975 msgid "fill-pattern"
7979 #: ../fish/guestfish-actions.pod:1344
7982 " fill-pattern pattern len path\n"
7987 #: ../fish/guestfish-actions.pod:1346
7989 "This function is like L</fill> except that it creates a new file of length "
7990 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
7991 "is truncated if necessary to ensure the length of the file is exactly C<len> "
7996 #: ../fish/guestfish-actions.pod:1351
8001 #: ../fish/guestfish-actions.pod:1353
8009 #: ../fish/guestfish-actions.pod:1355 ../src/guestfs-actions.pod:2211
8011 "This command lists out all files and directories, recursively, starting at "
8012 "C<directory>. It is essentially equivalent to running the shell command "
8013 "C<find directory -print> but some post-processing happens on the output, "
8018 #: ../fish/guestfish-actions.pod:1360 ../src/guestfs-actions.pod:2216
8020 "This returns a list of strings I<without any prefix>. Thus if the directory "
8025 #: ../fish/guestfish-actions.pod:1363 ../src/guestfs-actions.pod:2219
8035 #: ../fish/guestfish-actions.pod:1367
8036 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
8040 #: ../fish/guestfish-actions.pod:1370 ../src/guestfs-actions.pod:2226
8051 #: ../fish/guestfish-actions.pod:1375 ../src/guestfs-actions.pod:2231
8052 msgid "If C<directory> is not a directory, then this command returns an error."
8056 #: ../fish/guestfish-actions.pod:1378 ../src/guestfs-actions.pod:2234
8057 msgid "The returned list is sorted."
8061 #: ../fish/guestfish-actions.pod:1380
8062 msgid "See also L</find0>."
8066 #: ../fish/guestfish-actions.pod:1385
8071 #: ../fish/guestfish-actions.pod:1387
8074 " find0 directory (files|-)\n"
8079 #: ../fish/guestfish-actions.pod:1389 ../src/guestfs-actions.pod:2254
8081 "This command lists out all files and directories, recursively, starting at "
8082 "C<directory>, placing the resulting list in the external file called "
8087 #: ../fish/guestfish-actions.pod:1393
8088 msgid "This command works the same way as L</find> with the following exceptions:"
8092 #: ../fish/guestfish-actions.pod:1400 ../src/guestfs-actions.pod:2265
8093 msgid "The resulting list is written to an external file."
8097 #: ../fish/guestfish-actions.pod:1404 ../src/guestfs-actions.pod:2269
8099 "Items (filenames) in the result are separated by C<\\0> characters. See "
8100 "L<find(1)> option I<-print0>."
8104 #: ../fish/guestfish-actions.pod:1409 ../src/guestfs-actions.pod:2274
8105 msgid "This command is not limited in the number of names that it can return."
8109 #: ../fish/guestfish-actions.pod:1414 ../src/guestfs-actions.pod:2279
8110 msgid "The result list is not sorted."
8114 #: ../fish/guestfish-actions.pod:1420
8115 msgid "findfs-label"
8119 #: ../fish/guestfish-actions.pod:1422
8122 " findfs-label label\n"
8127 #: ../fish/guestfish-actions.pod:1424 ../src/guestfs-actions.pod:2293
8129 "This command searches the filesystems and returns the one which has the "
8130 "given label. An error is returned if no such filesystem can be found."
8134 #: ../fish/guestfish-actions.pod:1428
8135 msgid "To find the label of a filesystem, use L</vfs-label>."
8139 #: ../fish/guestfish-actions.pod:1430
8144 #: ../fish/guestfish-actions.pod:1432
8147 " findfs-uuid uuid\n"
8152 #: ../fish/guestfish-actions.pod:1434 ../src/guestfs-actions.pod:2310
8154 "This command searches the filesystems and returns the one which has the "
8155 "given UUID. An error is returned if no such filesystem can be found."
8159 #: ../fish/guestfish-actions.pod:1438
8160 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
8164 #: ../fish/guestfish-actions.pod:1440
8169 #: ../fish/guestfish-actions.pod:1442
8172 " fsck fstype device\n"
8177 #: ../fish/guestfish-actions.pod:1444 ../src/guestfs-actions.pod:2328
8179 "This runs the filesystem checker (fsck) on C<device> which should have "
8180 "filesystem type C<fstype>."
8184 #: ../fish/guestfish-actions.pod:1447 ../src/guestfs-actions.pod:2331
8186 "The returned integer is the status. See L<fsck(8)> for the list of status "
8187 "codes from C<fsck>."
8191 #: ../fish/guestfish-actions.pod:1456 ../src/guestfs-actions.pod:2340
8192 msgid "Multiple status codes can be summed together."
8196 #: ../fish/guestfish-actions.pod:1460 ../src/guestfs-actions.pod:2344
8198 "A non-zero return code can mean \"success\", for example if errors have been "
8199 "corrected on the filesystem."
8203 #: ../fish/guestfish-actions.pod:1465 ../src/guestfs-actions.pod:2349
8204 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
8208 #: ../fish/guestfish-actions.pod:1470 ../src/guestfs-actions.pod:2354
8209 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
8213 #: ../fish/guestfish-actions.pod:1472
8218 #: ../fish/guestfish-actions.pod:1474
8226 #: ../fish/guestfish-actions.pod:1476 ../src/guestfs-actions.pod:2365
8228 "Return the additional kernel options which are added to the guest kernel "
8233 #: ../fish/guestfish-actions.pod:1479 ../src/guestfs-actions.pod:2368
8234 msgid "If C<NULL> then no options are added."
8238 #: ../fish/guestfish-actions.pod:1481
8239 msgid "get-attach-method"
8243 #: ../fish/guestfish-actions.pod:1483
8246 " get-attach-method\n"
8251 #: ../fish/guestfish-actions.pod:1485
8252 msgid "Return the current attach method. See L</set-attach-method>."
8256 #: ../fish/guestfish-actions.pod:1487
8257 msgid "get-autosync"
8261 #: ../fish/guestfish-actions.pod:1489
8269 #: ../fish/guestfish-actions.pod:1491 ../src/guestfs-actions.pod:2393
8270 msgid "Get the autosync flag."
8274 #: ../fish/guestfish-actions.pod:1493
8279 #: ../fish/guestfish-actions.pod:1495
8287 #: ../fish/guestfish-actions.pod:1497 ../src/guestfs-actions.pod:2404
8288 msgid "Return the direct appliance mode flag."
8292 #: ../fish/guestfish-actions.pod:1499
8297 #: ../fish/guestfish-actions.pod:1501
8300 " get-e2label device\n"
8305 #: ../fish/guestfish-actions.pod:1503 ../src/guestfs-actions.pod:2423
8306 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
8310 #: ../fish/guestfish-actions.pod:1506
8312 "I<This function is deprecated.> In new code, use the L</vfs_label> call "
8317 #: ../fish/guestfish-actions.pod:1513
8322 #: ../fish/guestfish-actions.pod:1515
8325 " get-e2uuid device\n"
8330 #: ../fish/guestfish-actions.pod:1517 ../src/guestfs-actions.pod:2444
8331 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
8335 #: ../fish/guestfish-actions.pod:1520
8337 "I<This function is deprecated.> In new code, use the L</vfs_uuid> call "
8342 #: ../fish/guestfish-actions.pod:1527
8347 #: ../fish/guestfish-actions.pod:1529
8355 #: ../fish/guestfish-actions.pod:1531 ../src/guestfs-actions.pod:2457
8356 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
8360 #: ../fish/guestfish-actions.pod:1534
8362 "If L</set-memsize> was not called on this handle, and if "
8363 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
8364 "value for memsize."
8368 #: ../fish/guestfish-actions.pod:1538 ../fish/guestfish-actions.pod:1595 ../fish/guestfish-actions.pod:4457 ../fish/guestfish-actions.pod:4559 ../src/guestfs-actions.pod:2464 ../src/guestfs-actions.pod:2556 ../src/guestfs-actions.pod:6904 ../src/guestfs-actions.pod:7030
8369 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
8373 #: ../fish/guestfish-actions.pod:1541
8378 #: ../fish/guestfish-actions.pod:1543
8386 #: ../fish/guestfish-actions.pod:1545 ../src/guestfs-actions.pod:2476
8387 msgid "This returns the enable network flag."
8391 #: ../fish/guestfish-actions.pod:1547
8396 #: ../fish/guestfish-actions.pod:1549
8404 #: ../fish/guestfish-actions.pod:1551 ../src/guestfs-actions.pod:2487
8405 msgid "Return the current search path."
8409 #: ../fish/guestfish-actions.pod:1553 ../src/guestfs-actions.pod:2489
8411 "This is always non-NULL. If it wasn't set already, then this will return "
8416 #: ../fish/guestfish-actions.pod:1556
8421 #: ../fish/guestfish-actions.pod:1558
8429 #: ../fish/guestfish-actions.pod:1560 ../src/guestfs-actions.pod:2502
8430 msgid "This returns the process group flag."
8434 #: ../fish/guestfish-actions.pod:1562
8439 #: ../fish/guestfish-actions.pod:1564
8444 #: ../fish/guestfish-actions.pod:1566
8452 #: ../fish/guestfish-actions.pod:1568 ../src/guestfs-actions.pod:2513
8454 "Return the process ID of the qemu subprocess. If there is no qemu "
8455 "subprocess, then this will return an error."
8459 #: ../fish/guestfish-actions.pod:1571 ../src/guestfs-actions.pod:2516
8460 msgid "This is an internal call used for debugging and testing."
8464 #: ../fish/guestfish-actions.pod:1573
8469 #: ../fish/guestfish-actions.pod:1575
8477 #: ../fish/guestfish-actions.pod:1577 ../src/guestfs-actions.pod:2527
8478 msgid "Return the current qemu binary."
8482 #: ../fish/guestfish-actions.pod:1579 ../src/guestfs-actions.pod:2529
8484 "This is always non-NULL. If it wasn't set already, then this will return "
8485 "the default qemu binary name."
8489 #: ../fish/guestfish-actions.pod:1582
8490 msgid "get-recovery-proc"
8494 #: ../fish/guestfish-actions.pod:1584
8497 " get-recovery-proc\n"
8502 #: ../fish/guestfish-actions.pod:1586 ../src/guestfs-actions.pod:2542
8503 msgid "Return the recovery process enabled flag."
8507 #: ../fish/guestfish-actions.pod:1588
8512 #: ../fish/guestfish-actions.pod:1590
8520 #: ../fish/guestfish-actions.pod:1592
8522 "This returns the current setting of the selinux flag which is passed to the "
8523 "appliance at boot time. See L</set-selinux>."
8527 #: ../fish/guestfish-actions.pod:1598
8532 #: ../fish/guestfish-actions.pod:1600
8540 #: ../fish/guestfish-actions.pod:1602 ../src/guestfs-actions.pod:2568
8541 msgid "This returns the number of virtual CPUs assigned to the appliance."
8545 #: ../fish/guestfish-actions.pod:1604
8550 #: ../fish/guestfish-actions.pod:1606
8558 #: ../fish/guestfish-actions.pod:1608 ../src/guestfs-actions.pod:2579
8560 "This returns the current state as an opaque integer. This is only useful "
8561 "for printing debug and internal error messages."
8565 #: ../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
8566 msgid "For more information on states, see L<guestfs(3)>."
8570 #: ../fish/guestfish-actions.pod:1613
8575 #: ../fish/guestfish-actions.pod:1615
8583 #: ../fish/guestfish-actions.pod:1617 ../src/guestfs-actions.pod:2593
8584 msgid "Return the command trace flag."
8588 #: ../fish/guestfish-actions.pod:1619
8593 #: ../fish/guestfish-actions.pod:1621
8601 #: ../fish/guestfish-actions.pod:1623
8603 "Return the current umask. By default the umask is C<022> unless it has been "
8604 "set by calling L</umask>."
8608 #: ../fish/guestfish-actions.pod:1626
8613 #: ../fish/guestfish-actions.pod:1628
8621 #: ../fish/guestfish-actions.pod:1630 ../src/guestfs-actions.pod:2616
8622 msgid "This returns the verbose messages flag."
8626 #: ../fish/guestfish-actions.pod:1632
8631 #: ../fish/guestfish-actions.pod:1634
8639 #: ../fish/guestfish-actions.pod:1636 ../src/guestfs-actions.pod:2627
8640 msgid "This gets the SELinux security context of the daemon."
8644 #: ../fish/guestfish-actions.pod:1638
8645 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
8649 #: ../fish/guestfish-actions.pod:1641
8654 #: ../fish/guestfish-actions.pod:1643
8657 " getxattr path name\n"
8662 #: ../fish/guestfish-actions.pod:1645
8664 "Get a single extended attribute from file C<path> named C<name>. This call "
8665 "follows symlinks. If you want to lookup an extended attribute for the "
8666 "symlink itself, use L</lgetxattr>."
8670 #: ../fish/guestfish-actions.pod:1649 ../fish/guestfish-actions.pod:2715
8672 "Normally it is better to get all extended attributes from a file in one go "
8673 "by calling L</getxattrs>. However some Linux filesystem implementations are "
8674 "buggy and do not provide a way to list out attributes. For these "
8675 "filesystems (notably ntfs-3g) you have to know the names of the extended "
8676 "attributes you want in advance and call this function."
8680 #: ../fish/guestfish-actions.pod:1656 ../fish/guestfish-actions.pod:2722 ../src/guestfs-actions.pod:2656 ../src/guestfs-actions.pod:4151
8682 "Extended attribute values are blobs of binary data. If there is no extended "
8683 "attribute named C<name>, this returns an error."
8687 #: ../fish/guestfish-actions.pod:1659
8688 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
8692 #: ../fish/guestfish-actions.pod:1661
8697 #: ../fish/guestfish-actions.pod:1663
8705 #: ../fish/guestfish-actions.pod:1665 ../src/guestfs-actions.pod:2673
8706 msgid "This call lists the extended attributes of the file or directory C<path>."
8710 #: ../fish/guestfish-actions.pod:1668 ../src/guestfs-actions.pod:2676
8712 "At the system call level, this is a combination of the L<listxattr(2)> and "
8713 "L<getxattr(2)> calls."
8717 #: ../fish/guestfish-actions.pod:1671
8718 msgid "See also: L</lgetxattrs>, L<attr(5)>."
8722 #: ../fish/guestfish-actions.pod:1673
8727 #: ../fish/guestfish-actions.pod:1675
8730 " glob-expand pattern\n"
8735 #: ../fish/guestfish-actions.pod:1677 ../src/guestfs-actions.pod:2693
8737 "This command searches for all the pathnames matching C<pattern> according to "
8738 "the wildcard expansion rules used by the shell."
8742 #: ../fish/guestfish-actions.pod:1681 ../src/guestfs-actions.pod:2697
8743 msgid "If no paths match, then this returns an empty list (note: not an error)."
8747 #: ../fish/guestfish-actions.pod:1684 ../src/guestfs-actions.pod:2700
8749 "It is just a wrapper around the C L<glob(3)> function with flags "
8750 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
8754 #: ../fish/guestfish-actions.pod:1688
8759 #: ../fish/guestfish-actions.pod:1690
8762 " grep regex path\n"
8767 #: ../fish/guestfish-actions.pod:1692 ../src/guestfs-actions.pod:2717
8768 msgid "This calls the external C<grep> program and returns the matching lines."
8772 #: ../fish/guestfish-actions.pod:1698
8777 #: ../fish/guestfish-actions.pod:1700
8780 " grepi regex path\n"
8785 #: ../fish/guestfish-actions.pod:1702 ../src/guestfs-actions.pod:2736
8786 msgid "This calls the external C<grep -i> program and returns the matching lines."
8790 #: ../fish/guestfish-actions.pod:1708
8791 msgid "grub-install"
8795 #: ../fish/guestfish-actions.pod:1710
8798 " grub-install root device\n"
8803 #: ../fish/guestfish-actions.pod:1712 ../src/guestfs-actions.pod:2755
8805 "This command installs GRUB 1 (the Grand Unified Bootloader) on C<device>, "
8806 "with the root directory being C<root>."
8810 #: ../fish/guestfish-actions.pod:1721 ../src/guestfs-actions.pod:2764
8812 "There is currently no way in the API to install grub2, which is used by most "
8813 "modern Linux guests. It is possible to run the grub2 command from the "
8814 "guest, although see the caveats in L<guestfs(3)/RUNNING COMMANDS>."
8818 #: ../fish/guestfish-actions.pod:1728 ../src/guestfs-actions.pod:2771
8820 "This uses C<grub-install> from the host. Unfortunately grub is not always "
8821 "compatible with itself, so this only works in rather narrow circumstances. "
8822 "Careful testing with each guest version is advisable."
8826 #: ../fish/guestfish-actions.pod:1735 ../src/guestfs-actions.pod:2778
8828 "If grub-install reports the error \"No suitable drive was found in the "
8829 "generated device map.\" it may be that you need to create a "
8830 "C</boot/grub/device.map> file first that contains the mapping between grub "
8831 "device names and Linux device names. It is usually sufficient to create a "
8836 #: ../fish/guestfish-actions.pod:1742 ../src/guestfs-actions.pod:2785
8844 #: ../fish/guestfish-actions.pod:1744 ../src/guestfs-actions.pod:2787
8845 msgid "replacing C</dev/vda> with the name of the installation device."
8849 #: ../fish/guestfish-actions.pod:1748
8854 #: ../fish/guestfish-actions.pod:1750
8862 #: ../fish/guestfish-actions.pod:1752 ../src/guestfs-actions.pod:2801
8864 "This command returns up to the first 10 lines of a file as a list of "
8869 #: ../fish/guestfish-actions.pod:1758
8874 #: ../fish/guestfish-actions.pod:1760
8877 " head-n nrlines path\n"
8882 #: ../fish/guestfish-actions.pod:1762 ../src/guestfs-actions.pod:2820
8884 "If the parameter C<nrlines> is a positive number, this returns the first "
8885 "C<nrlines> lines of the file C<path>."
8889 #: ../fish/guestfish-actions.pod:1765 ../src/guestfs-actions.pod:2823
8891 "If the parameter C<nrlines> is a negative number, this returns lines from "
8892 "the file C<path>, excluding the last C<nrlines> lines."
8896 #: ../fish/guestfish-actions.pod:1768 ../fish/guestfish-actions.pod:4940 ../src/guestfs-actions.pod:2826 ../src/guestfs-actions.pod:7609
8897 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
8901 #: ../fish/guestfish-actions.pod:1773
8906 #: ../fish/guestfish-actions.pod:1775
8914 #: ../fish/guestfish-actions.pod:1777 ../src/guestfs-actions.pod:2843
8916 "This runs C<hexdump -C> on the given C<path>. The result is the "
8917 "human-readable, canonical hex dump of the file."
8921 #: ../fish/guestfish-actions.pod:1783
8926 #: ../fish/guestfish-actions.pod:1785
8929 " initrd-cat initrdpath filename\n"
8934 #: ../fish/guestfish-actions.pod:1787 ../src/guestfs-actions.pod:2862
8936 "This command unpacks the file C<filename> from the initrd file called "
8937 "C<initrdpath>. The filename must be given I<without> the initial C</> "
8942 #: ../fish/guestfish-actions.pod:1791 ../src/guestfs-actions.pod:2866
8944 "For example, in guestfish you could use the following command to examine the "
8945 "boot script (usually called C</init>) contained in a Linux initrd or "
8950 #: ../fish/guestfish-actions.pod:1795 ../src/guestfs-actions.pod:2870
8953 " initrd-cat /boot/initrd-<version>.img init\n"
8958 #: ../fish/guestfish-actions.pod:1797
8959 msgid "See also L</initrd-list>."
8963 #: ../fish/guestfish-actions.pod:1802
8968 #: ../fish/guestfish-actions.pod:1804
8971 " initrd-list path\n"
8976 #: ../fish/guestfish-actions.pod:1806 ../src/guestfs-actions.pod:2889
8977 msgid "This command lists out files contained in an initrd."
8981 #: ../fish/guestfish-actions.pod:1808 ../src/guestfs-actions.pod:2891
8983 "The files are listed without any initial C</> character. The files are "
8984 "listed in the order they appear (not necessarily alphabetical). Directory "
8985 "names are listed as separate items."
8989 #: ../fish/guestfish-actions.pod:1812 ../src/guestfs-actions.pod:2895
8991 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
8992 "initrd. We I<only> support the newer initramfs format (compressed cpio "
8997 #: ../fish/guestfish-actions.pod:1816
8998 msgid "inotify-add-watch"
9002 #: ../fish/guestfish-actions.pod:1818
9005 " inotify-add-watch path mask\n"
9010 #: ../fish/guestfish-actions.pod:1820 ../src/guestfs-actions.pod:2912
9011 msgid "Watch C<path> for the events listed in C<mask>."
9015 #: ../fish/guestfish-actions.pod:1822 ../src/guestfs-actions.pod:2914
9017 "Note that if C<path> is a directory then events within that directory are "
9018 "watched, but this does I<not> happen recursively (in subdirectories)."
9022 #: ../fish/guestfish-actions.pod:1826 ../src/guestfs-actions.pod:2918
9024 "Note for non-C or non-Linux callers: the inotify events are defined by the "
9025 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
9029 #: ../fish/guestfish-actions.pod:1830
9030 msgid "inotify-close"
9034 #: ../fish/guestfish-actions.pod:1832
9042 #: ../fish/guestfish-actions.pod:1834 ../src/guestfs-actions.pod:2931
9044 "This closes the inotify handle which was previously opened by inotify_init. "
9045 "It removes all watches, throws away any pending events, and deallocates all "
9050 #: ../fish/guestfish-actions.pod:1838
9051 msgid "inotify-files"
9055 #: ../fish/guestfish-actions.pod:1840
9063 #: ../fish/guestfish-actions.pod:1842
9065 "This function is a helpful wrapper around L</inotify-read> which just "
9066 "returns a list of pathnames of objects that were touched. The returned "
9067 "pathnames are sorted and deduplicated."
9071 #: ../fish/guestfish-actions.pod:1846
9072 msgid "inotify-init"
9076 #: ../fish/guestfish-actions.pod:1848
9079 " inotify-init maxevents\n"
9084 #: ../fish/guestfish-actions.pod:1850 ../src/guestfs-actions.pod:2960
9086 "This command creates a new inotify handle. The inotify subsystem can be "
9087 "used to notify events which happen to objects in the guest filesystem."
9091 #: ../fish/guestfish-actions.pod:1854
9093 "C<maxevents> is the maximum number of events which will be queued up between "
9094 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
9095 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
9096 "default was 16384 events. Beyond this limit, the kernel throws away events, "
9097 "but records the fact that it threw them away by setting a flag "
9098 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
9102 #: ../fish/guestfish-actions.pod:1864
9104 "Before any events are generated, you have to add some watches to the "
9105 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
9106 "L</inotify-watch-all>."
9110 #: ../fish/guestfish-actions.pod:1870
9112 "Queued up events should be read periodically by calling L</inotify-read> (or "
9113 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
9114 "If you don't read the events out often enough then you risk the internal "
9115 "queue overflowing."
9119 #: ../fish/guestfish-actions.pod:1877
9121 "The handle should be closed after use by calling L</inotify-close>. This "
9122 "also removes any watches automatically."
9126 #: ../fish/guestfish-actions.pod:1881 ../src/guestfs-actions.pod:2991
9128 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
9129 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
9130 "that there is one global inotify handle per libguestfs instance."
9134 #: ../fish/guestfish-actions.pod:1886
9135 msgid "inotify-read"
9139 #: ../fish/guestfish-actions.pod:1888
9147 #: ../fish/guestfish-actions.pod:1890 ../src/guestfs-actions.pod:3005
9149 "Return the complete queue of events that have happened since the previous "
9154 #: ../fish/guestfish-actions.pod:1893 ../src/guestfs-actions.pod:3008
9155 msgid "If no events have happened, this returns an empty list."
9159 #: ../fish/guestfish-actions.pod:1895 ../src/guestfs-actions.pod:3010
9161 "I<Note>: In order to make sure that all events have been read, you must call "
9162 "this function repeatedly until it returns an empty list. The reason is that "
9163 "the call will read events up to the maximum appliance-to-host message size "
9164 "and leave remaining events in the queue."
9168 #: ../fish/guestfish-actions.pod:1901
9169 msgid "inotify-rm-watch"
9173 #: ../fish/guestfish-actions.pod:1903
9176 " inotify-rm-watch wd\n"
9181 #: ../fish/guestfish-actions.pod:1905
9182 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
9186 #: ../fish/guestfish-actions.pod:1908
9187 msgid "inspect-get-arch"
9191 #: ../fish/guestfish-actions.pod:1910
9194 " inspect-get-arch root\n"
9199 #: ../fish/guestfish-actions.pod:1912
9201 "This returns the architecture of the inspected operating system. The "
9202 "possible return values are listed under L</file-architecture>."
9206 #: ../fish/guestfish-actions.pod:1916 ../src/guestfs-actions.pod:3045
9208 "If the architecture could not be determined, then the string C<unknown> is "
9213 #: ../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
9214 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
9218 #: ../fish/guestfish-actions.pod:1921
9219 msgid "inspect-get-distro"
9223 #: ../fish/guestfish-actions.pod:1923
9226 " inspect-get-distro root\n"
9231 #: ../fish/guestfish-actions.pod:1925 ../src/guestfs-actions.pod:3061
9232 msgid "This returns the distro (distribution) of the inspected operating system."
9236 #: ../fish/guestfish-actions.pod:1928 ../src/guestfs-actions.pod:3064
9237 msgid "Currently defined distros are:"
9241 #: ../fish/guestfish-actions.pod:1932 ../src/guestfs-actions.pod:3068
9242 msgid "\"archlinux\""
9246 #: ../fish/guestfish-actions.pod:1934 ../src/guestfs-actions.pod:3070
9251 #: ../fish/guestfish-actions.pod:1936 ../src/guestfs-actions.pod:3072
9256 #: ../fish/guestfish-actions.pod:1938 ../src/guestfs-actions.pod:3074
9261 #: ../fish/guestfish-actions.pod:1940 ../src/guestfs-actions.pod:3076
9266 #: ../fish/guestfish-actions.pod:1942 ../src/guestfs-actions.pod:3078
9271 #: ../fish/guestfish-actions.pod:1944 ../src/guestfs-actions.pod:3080
9276 #: ../fish/guestfish-actions.pod:1946 ../src/guestfs-actions.pod:3082
9281 #: ../fish/guestfish-actions.pod:1948 ../src/guestfs-actions.pod:3084
9286 #: ../fish/guestfish-actions.pod:1950 ../src/guestfs-actions.pod:3086
9291 #: ../fish/guestfish-actions.pod:1952 ../src/guestfs-actions.pod:3088
9292 msgid "\"linuxmint\""
9296 #: ../fish/guestfish-actions.pod:1954 ../src/guestfs-actions.pod:3090
9301 #: ../fish/guestfish-actions.pod:1956 ../src/guestfs-actions.pod:3092
9306 #: ../fish/guestfish-actions.pod:1958 ../src/guestfs-actions.pod:3094
9311 #: ../fish/guestfish-actions.pod:1960 ../src/guestfs-actions.pod:3096
9312 msgid "\"mandriva\""
9316 #: ../fish/guestfish-actions.pod:1962 ../src/guestfs-actions.pod:3098
9321 #: ../fish/guestfish-actions.pod:1964 ../src/guestfs-actions.pod:3100
9326 #: ../fish/guestfish-actions.pod:1966 ../src/guestfs-actions.pod:3102
9331 #: ../fish/guestfish-actions.pod:1968 ../src/guestfs-actions.pod:3104
9332 msgid "\"opensuse\""
9336 #: ../fish/guestfish-actions.pod:1970 ../src/guestfs-actions.pod:3106
9341 #: ../fish/guestfish-actions.pod:1972 ../src/guestfs-actions.pod:3108
9346 #: ../fish/guestfish-actions.pod:1974 ../src/guestfs-actions.pod:3110
9351 #: ../fish/guestfish-actions.pod:1976 ../src/guestfs-actions.pod:3112
9352 msgid "\"redhat-based\""
9356 #: ../fish/guestfish-actions.pod:1978 ../src/guestfs-actions.pod:3114
9357 msgid "Some Red Hat-derived distro."
9361 #: ../fish/guestfish-actions.pod:1980 ../src/guestfs-actions.pod:3116
9366 #: ../fish/guestfish-actions.pod:1982 ../src/guestfs-actions.pod:3118
9367 msgid "Red Hat Enterprise Linux."
9371 #: ../fish/guestfish-actions.pod:1984 ../src/guestfs-actions.pod:3120
9372 msgid "\"scientificlinux\""
9376 #: ../fish/guestfish-actions.pod:1986 ../src/guestfs-actions.pod:3122
9377 msgid "Scientific Linux."
9381 #: ../fish/guestfish-actions.pod:1988 ../src/guestfs-actions.pod:3124
9382 msgid "\"slackware\""
9386 #: ../fish/guestfish-actions.pod:1990 ../src/guestfs-actions.pod:3126
9391 #: ../fish/guestfish-actions.pod:1992 ../src/guestfs-actions.pod:3128
9392 msgid "\"ttylinux\""
9396 #: ../fish/guestfish-actions.pod:1994 ../src/guestfs-actions.pod:3130
9401 #: ../fish/guestfish-actions.pod:1996 ../src/guestfs-actions.pod:3132
9406 #: ../fish/guestfish-actions.pod:1998 ../src/guestfs-actions.pod:3134
9411 #: ../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
9416 #: ../fish/guestfish-actions.pod:2002 ../src/guestfs-actions.pod:3138
9417 msgid "The distro could not be determined."
9421 #: ../fish/guestfish-actions.pod:2004 ../fish/guestfish-actions.pod:2341 ../src/guestfs-actions.pod:3140 ../src/guestfs-actions.pod:3613
9426 #: ../fish/guestfish-actions.pod:2006 ../src/guestfs-actions.pod:3142
9428 "Windows does not have distributions. This string is returned if the OS type "
9433 #: ../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
9435 "Future versions of libguestfs may return other strings here. The caller "
9436 "should be prepared to handle any string."
9440 #: ../fish/guestfish-actions.pod:2016
9441 msgid "inspect-get-drive-mappings"
9445 #: ../fish/guestfish-actions.pod:2018
9448 " inspect-get-drive-mappings root\n"
9453 #: ../fish/guestfish-actions.pod:2020 ../src/guestfs-actions.pod:3163
9455 "This call is useful for Windows which uses a primitive system of assigning "
9456 "drive letters (like \"C:\") to partitions. This inspection API examines the "
9457 "Windows Registry to find out how disks/partitions are mapped to drive "
9458 "letters, and returns a hash table as in the example below:"
9462 #: ../fish/guestfish-actions.pod:2026 ../src/guestfs-actions.pod:3169
9472 #: ../fish/guestfish-actions.pod:2030 ../src/guestfs-actions.pod:3173
9474 "Note that keys are drive letters. For Windows, the key is case insensitive "
9475 "and just contains the drive letter, without the customary colon separator "
9480 #: ../fish/guestfish-actions.pod:2034 ../src/guestfs-actions.pod:3177
9482 "In future we may support other operating systems that also used drive "
9483 "letters, but the keys for those might not be case insensitive and might be "
9484 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
9489 #: ../fish/guestfish-actions.pod:2039 ../src/guestfs-actions.pod:3182
9491 "For Windows guests, currently only hard drive mappings are returned. "
9492 "Removable disks (eg. DVD-ROMs) are ignored."
9496 #: ../fish/guestfish-actions.pod:2042 ../src/guestfs-actions.pod:3185
9498 "For guests that do not use drive mappings, or if the drive mappings could "
9499 "not be determined, this returns an empty hash table."
9503 #: ../fish/guestfish-actions.pod:2045
9505 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
9506 "L</inspect-get-mountpoints>, L</inspect-get-filesystems>."
9510 #: ../fish/guestfish-actions.pod:2049
9511 msgid "inspect-get-filesystems"
9515 #: ../fish/guestfish-actions.pod:2051
9518 " inspect-get-filesystems root\n"
9523 #: ../fish/guestfish-actions.pod:2053 ../src/guestfs-actions.pod:3206
9525 "This returns a list of all the filesystems that we think are associated with "
9526 "this operating system. This includes the root filesystem, other ordinary "
9527 "filesystems, and non-mounted devices like swap partitions."
9531 #: ../fish/guestfish-actions.pod:2058 ../src/guestfs-actions.pod:3211
9533 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
9534 "to be shared between operating systems."
9538 #: ../fish/guestfish-actions.pod:2061
9540 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
9541 "L</inspect-get-mountpoints>."
9545 #: ../fish/guestfish-actions.pod:2064
9546 msgid "inspect-get-format"
9550 #: ../fish/guestfish-actions.pod:2066
9553 " inspect-get-format root\n"
9558 #: ../fish/guestfish-actions.pod:2068 ../src/guestfs-actions.pod:3229
9560 "This returns the format of the inspected operating system. You can use it "
9561 "to detect install images, live CDs and similar."
9565 #: ../fish/guestfish-actions.pod:2071 ../src/guestfs-actions.pod:3232
9566 msgid "Currently defined formats are:"
9570 #: ../fish/guestfish-actions.pod:2075 ../src/guestfs-actions.pod:3236
9571 msgid "\"installed\""
9575 #: ../fish/guestfish-actions.pod:2077 ../src/guestfs-actions.pod:3238
9576 msgid "This is an installed operating system."
9580 #: ../fish/guestfish-actions.pod:2079 ../src/guestfs-actions.pod:3240
9581 msgid "\"installer\""
9585 #: ../fish/guestfish-actions.pod:2081 ../src/guestfs-actions.pod:3242
9587 "The disk image being inspected is not an installed operating system, but a "
9588 "I<bootable> install disk, live CD, or similar."
9592 #: ../fish/guestfish-actions.pod:2086 ../src/guestfs-actions.pod:3247
9593 msgid "The format of this disk image is not known."
9597 #: ../fish/guestfish-actions.pod:2095
9598 msgid "inspect-get-hostname"
9602 #: ../fish/guestfish-actions.pod:2097
9605 " inspect-get-hostname root\n"
9610 #: ../fish/guestfish-actions.pod:2099 ../src/guestfs-actions.pod:3267
9612 "This function returns the hostname of the operating system as found by "
9613 "inspection of the guest's configuration files."
9617 #: ../fish/guestfish-actions.pod:2102 ../src/guestfs-actions.pod:3270
9619 "If the hostname could not be determined, then the string C<unknown> is "
9624 #: ../fish/guestfish-actions.pod:2107
9625 msgid "inspect-get-icon"
9629 #: ../fish/guestfish-actions.pod:2109
9632 " inspect-get-icon root [favicon:true|false] [highquality:true|false]\n"
9637 #: ../fish/guestfish-actions.pod:2111 ../src/guestfs-actions.pod:3296
9639 "This function returns an icon corresponding to the inspected operating "
9640 "system. The icon is returned as a buffer containing a PNG image (re-encoded "
9641 "to PNG if necessary)."
9645 #: ../fish/guestfish-actions.pod:2115 ../src/guestfs-actions.pod:3300
9647 "If it was not possible to get an icon this function returns a zero-length "
9648 "(non-NULL) buffer. I<Callers must check for this case>."
9652 #: ../fish/guestfish-actions.pod:2118 ../src/guestfs-actions.pod:3303
9654 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
9655 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
9656 "this file will be returned. You can disable favicons by passing the "
9657 "optional C<favicon> boolean as false (default is true)."
9661 #: ../fish/guestfish-actions.pod:2124 ../src/guestfs-actions.pod:3309
9663 "If finding the favicon fails, then we look in other places in the guest for "
9668 #: ../fish/guestfish-actions.pod:2127 ../src/guestfs-actions.pod:3312
9670 "If the optional C<highquality> boolean is true then only high quality icons "
9671 "are returned, which means only icons of high resolution with an alpha "
9672 "channel. The default (false) is to return any icon we can, even if it is of "
9673 "substandard quality."
9677 #: ../fish/guestfish-actions.pod:2138 ../src/guestfs-actions.pod:3323
9679 "Unlike most other inspection API calls, the guest's disks must be mounted up "
9680 "before you call this, since it needs to read information from the guest "
9681 "filesystem during the call."
9685 #: ../fish/guestfish-actions.pod:2144 ../src/guestfs-actions.pod:3329
9687 "B<Security:> The icon data comes from the untrusted guest, and should be "
9688 "treated with caution. PNG files have been known to contain exploits. "
9689 "Ensure that libpng (or other relevant libraries) are fully up to date before "
9690 "trying to process or display the icon."
9694 #: ../fish/guestfish-actions.pod:2152 ../src/guestfs-actions.pod:3337
9696 "The PNG image returned can be any size. It might not be square. Libguestfs "
9697 "tries to return the largest, highest quality icon available. The "
9698 "application must scale the icon to the required size."
9702 #: ../fish/guestfish-actions.pod:2159 ../src/guestfs-actions.pod:3344
9704 "Extracting icons from Windows guests requires the external C<wrestool> "
9705 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
9706 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
9707 "installed separately."
9711 #: ../fish/guestfish-actions.pod:2166 ../src/guestfs-actions.pod:3351
9713 "Operating system icons are usually trademarks. Seek legal advice before "
9714 "using trademarks in applications."
9718 #: ../fish/guestfish-actions.pod:2173
9719 msgid "inspect-get-major-version"
9723 #: ../fish/guestfish-actions.pod:2175
9726 " inspect-get-major-version root\n"
9731 #: ../fish/guestfish-actions.pod:2177 ../src/guestfs-actions.pod:3392
9732 msgid "This returns the major version number of the inspected operating system."
9736 #: ../fish/guestfish-actions.pod:2180 ../src/guestfs-actions.pod:3395
9738 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
9739 "popular public names used by the operating system. Notably the operating "
9740 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
9741 "1). You can find out the real versions corresponding to releases of Windows "
9742 "by consulting Wikipedia or MSDN."
9746 #: ../fish/guestfish-actions.pod:2187 ../fish/guestfish-actions.pod:2198 ../src/guestfs-actions.pod:3402 ../src/guestfs-actions.pod:3419
9747 msgid "If the version could not be determined, then C<0> is returned."
9751 #: ../fish/guestfish-actions.pod:2191
9752 msgid "inspect-get-minor-version"
9756 #: ../fish/guestfish-actions.pod:2193
9759 " inspect-get-minor-version root\n"
9764 #: ../fish/guestfish-actions.pod:2195 ../src/guestfs-actions.pod:3416
9765 msgid "This returns the minor version number of the inspected operating system."
9769 #: ../fish/guestfish-actions.pod:2200
9771 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
9772 "L</inspect-get-major-version>."
9776 #: ../fish/guestfish-actions.pod:2203
9777 msgid "inspect-get-mountpoints"
9781 #: ../fish/guestfish-actions.pod:2205
9784 " inspect-get-mountpoints root\n"
9789 #: ../fish/guestfish-actions.pod:2207 ../src/guestfs-actions.pod:3434
9791 "This returns a hash of where we think the filesystems associated with this "
9792 "operating system should be mounted. Callers should note that this is at "
9793 "best an educated guess made by reading configuration files such as "
9794 "C</etc/fstab>. I<In particular note> that this may return filesystems which "
9795 "are non-existent or not mountable and callers should be prepared to handle "
9796 "or ignore failures if they try to mount them."
9800 #: ../fish/guestfish-actions.pod:2216 ../src/guestfs-actions.pod:3443
9802 "Each element in the returned hashtable has a key which is the path of the "
9803 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
9804 "mounted there (eg. C</dev/sda1>)."
9808 #: ../fish/guestfish-actions.pod:2221 ../src/guestfs-actions.pod:3448
9809 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
9813 #: ../fish/guestfish-actions.pod:2224
9815 "For operating systems like Windows which still use drive letters, this call "
9816 "will only return an entry for the first drive \"mounted on\" C</>. For "
9817 "information about the mapping of drive letters to partitions, see "
9818 "L</inspect-get-drive-mappings>."
9822 #: ../fish/guestfish-actions.pod:2230
9824 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
9825 "L</inspect-get-filesystems>."
9829 #: ../fish/guestfish-actions.pod:2233
9830 msgid "inspect-get-package-format"
9834 #: ../fish/guestfish-actions.pod:2235
9837 " inspect-get-package-format root\n"
9842 #: ../fish/guestfish-actions.pod:2237
9844 "This function and L</inspect-get-package-management> return the package "
9845 "format and package management tool used by the inspected operating system. "
9846 "For example for Fedora these functions would return C<rpm> (package format) "
9847 "and C<yum> (package management)."
9851 #: ../fish/guestfish-actions.pod:2243 ../src/guestfs-actions.pod:3480
9853 "This returns the string C<unknown> if we could not determine the package "
9854 "format I<or> if the operating system does not have a real packaging system "
9859 #: ../fish/guestfish-actions.pod:2247 ../src/guestfs-actions.pod:3484
9861 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>, "
9862 "C<pkgsrc>. Future versions of libguestfs may return other strings."
9866 #: ../fish/guestfish-actions.pod:2253
9867 msgid "inspect-get-package-management"
9871 #: ../fish/guestfish-actions.pod:2255
9874 " inspect-get-package-management root\n"
9879 #: ../fish/guestfish-actions.pod:2257
9881 "L</inspect-get-package-format> and this function return the package format "
9882 "and package management tool used by the inspected operating system. For "
9883 "example for Fedora these functions would return C<rpm> (package format) and "
9884 "C<yum> (package management)."
9888 #: ../fish/guestfish-actions.pod:2263 ../src/guestfs-actions.pod:3507
9890 "This returns the string C<unknown> if we could not determine the package "
9891 "management tool I<or> if the operating system does not have a real packaging "
9892 "system (eg. Windows)."
9896 #: ../fish/guestfish-actions.pod:2267 ../src/guestfs-actions.pod:3511
9898 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
9899 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>, C<zypper>. Future "
9900 "versions of libguestfs may return other strings."
9904 #: ../fish/guestfish-actions.pod:2274
9905 msgid "inspect-get-product-name"
9909 #: ../fish/guestfish-actions.pod:2276
9912 " inspect-get-product-name root\n"
9917 #: ../fish/guestfish-actions.pod:2278 ../src/guestfs-actions.pod:3529
9919 "This returns the product name of the inspected operating system. The "
9920 "product name is generally some freeform string which can be displayed to the "
9921 "user, but should not be parsed by programs."
9925 #: ../fish/guestfish-actions.pod:2283 ../src/guestfs-actions.pod:3534
9927 "If the product name could not be determined, then the string C<unknown> is "
9932 #: ../fish/guestfish-actions.pod:2288
9933 msgid "inspect-get-product-variant"
9937 #: ../fish/guestfish-actions.pod:2290
9940 " inspect-get-product-variant root\n"
9945 #: ../fish/guestfish-actions.pod:2292 ../src/guestfs-actions.pod:3550
9946 msgid "This returns the product variant of the inspected operating system."
9950 #: ../fish/guestfish-actions.pod:2295 ../src/guestfs-actions.pod:3553
9952 "For Windows guests, this returns the contents of the Registry key "
9953 "C<HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> "
9954 "which is usually a string such as C<Client> or C<Server> (other values are "
9955 "possible). This can be used to distinguish consumer and enterprise versions "
9956 "of Windows that have the same version number (for example, Windows 7 and "
9957 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
9958 "the latter is C<Server>)."
9962 #: ../fish/guestfish-actions.pod:2304 ../src/guestfs-actions.pod:3562
9964 "For enterprise Linux guests, in future we intend this to return the product "
9965 "variant such as C<Desktop>, C<Server> and so on. But this is not "
9966 "implemented at present."
9970 #: ../fish/guestfish-actions.pod:2308 ../src/guestfs-actions.pod:3566
9972 "If the product variant could not be determined, then the string C<unknown> "
9977 #: ../fish/guestfish-actions.pod:2311
9979 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
9980 "L</inspect-get-product-name>, L</inspect-get-major-version>."
9984 #: ../fish/guestfish-actions.pod:2315
9985 msgid "inspect-get-roots"
9989 #: ../fish/guestfish-actions.pod:2317
9992 " inspect-get-roots\n"
9997 #: ../fish/guestfish-actions.pod:2319
9999 "This function is a convenient way to get the list of root devices, as "
10000 "returned from a previous call to L</inspect-os>, but without redoing the "
10001 "whole inspection process."
10005 #: ../fish/guestfish-actions.pod:2323
10007 "This returns an empty list if either no root devices were found or the "
10008 "caller has not called L</inspect-os>."
10012 #: ../fish/guestfish-actions.pod:2328
10013 msgid "inspect-get-type"
10017 #: ../fish/guestfish-actions.pod:2330
10020 " inspect-get-type root\n"
10025 #: ../fish/guestfish-actions.pod:2332 ../src/guestfs-actions.pod:3604
10027 "This returns the type of the inspected operating system. Currently defined "
10032 #: ../fish/guestfish-actions.pod:2337 ../src/guestfs-actions.pod:3609
10037 #: ../fish/guestfish-actions.pod:2339 ../src/guestfs-actions.pod:3611
10038 msgid "Any Linux-based operating system."
10042 #: ../fish/guestfish-actions.pod:2343 ../src/guestfs-actions.pod:3615
10043 msgid "Any Microsoft Windows operating system."
10047 #: ../fish/guestfish-actions.pod:2345 ../src/guestfs-actions.pod:3617
10048 msgid "\"freebsd\""
10052 #: ../fish/guestfish-actions.pod:2347 ../src/guestfs-actions.pod:3619
10057 #: ../fish/guestfish-actions.pod:2349 ../src/guestfs-actions.pod:3621
10062 #: ../fish/guestfish-actions.pod:2351 ../src/guestfs-actions.pod:3623
10067 #: ../fish/guestfish-actions.pod:2355 ../src/guestfs-actions.pod:3627
10068 msgid "The operating system type could not be determined."
10072 #: ../fish/guestfish-actions.pod:2364
10073 msgid "inspect-get-windows-current-control-set"
10077 #: ../fish/guestfish-actions.pod:2366
10080 " inspect-get-windows-current-control-set root\n"
10085 #: ../fish/guestfish-actions.pod:2368 ../src/guestfs-actions.pod:3647
10087 "This returns the Windows CurrentControlSet of the inspected guest. The "
10088 "CurrentControlSet is a registry key name such as C<ControlSet001>."
10092 #: ../fish/guestfish-actions.pod:2371 ../src/guestfs-actions.pod:3650
10094 "This call assumes that the guest is Windows and that the Registry could be "
10095 "examined by inspection. If this is not the case then an error is returned."
10099 #: ../fish/guestfish-actions.pod:2377
10100 msgid "inspect-get-windows-systemroot"
10104 #: ../fish/guestfish-actions.pod:2379
10107 " inspect-get-windows-systemroot root\n"
10112 #: ../fish/guestfish-actions.pod:2381 ../src/guestfs-actions.pod:3667
10114 "This returns the Windows systemroot of the inspected guest. The systemroot "
10115 "is a directory path such as C</WINDOWS>."
10119 #: ../fish/guestfish-actions.pod:2384 ../src/guestfs-actions.pod:3670
10121 "This call assumes that the guest is Windows and that the systemroot could be "
10122 "determined by inspection. If this is not the case then an error is "
10127 #: ../fish/guestfish-actions.pod:2390
10128 msgid "inspect-is-live"
10132 #: ../fish/guestfish-actions.pod:2392
10135 " inspect-is-live root\n"
10140 #: ../fish/guestfish-actions.pod:2394
10142 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10143 "then this returns true if a live image was detected on the disk."
10147 #: ../fish/guestfish-actions.pod:2400
10148 msgid "inspect-is-multipart"
10152 #: ../fish/guestfish-actions.pod:2402
10155 " inspect-is-multipart root\n"
10160 #: ../fish/guestfish-actions.pod:2404
10162 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10163 "then this returns true if the disk is part of a set."
10167 #: ../fish/guestfish-actions.pod:2410
10168 msgid "inspect-is-netinst"
10172 #: ../fish/guestfish-actions.pod:2412
10175 " inspect-is-netinst root\n"
10180 #: ../fish/guestfish-actions.pod:2414
10182 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10183 "then this returns true if the disk is a network installer, ie. not a "
10184 "self-contained install CD but one which is likely to require network access "
10185 "to complete the install."
10189 #: ../fish/guestfish-actions.pod:2422
10190 msgid "inspect-list-applications"
10194 #: ../fish/guestfish-actions.pod:2424
10197 " inspect-list-applications root\n"
10202 #: ../fish/guestfish-actions.pod:2426 ../src/guestfs-actions.pod:3737
10203 msgid "Return the list of applications installed in the operating system."
10207 #: ../fish/guestfish-actions.pod:2428
10209 "I<Note:> This call works differently from other parts of the inspection "
10210 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
10211 "then mount up the disks, before calling this. Listing applications is a "
10212 "significantly more difficult operation which requires access to the full "
10213 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
10214 "are just returning data cached in the libguestfs handle, this call actually "
10215 "reads parts of the mounted filesystems during the call."
10219 #: ../fish/guestfish-actions.pod:2438 ../src/guestfs-actions.pod:3749
10221 "This returns an empty list if the inspection code was not able to determine "
10222 "the list of applications."
10226 #: ../fish/guestfish-actions.pod:2441 ../src/guestfs-actions.pod:3752
10227 msgid "The application structure contains the following fields:"
10231 #: ../fish/guestfish-actions.pod:2445 ../src/guestfs-actions.pod:3756
10232 msgid "C<app_name>"
10236 #: ../fish/guestfish-actions.pod:2447 ../src/guestfs-actions.pod:3758
10238 "The name of the application. For Red Hat-derived and Debian-derived Linux "
10239 "guests, this is the package name."
10243 #: ../fish/guestfish-actions.pod:2450 ../src/guestfs-actions.pod:3761
10244 msgid "C<app_display_name>"
10248 #: ../fish/guestfish-actions.pod:2452 ../src/guestfs-actions.pod:3763
10250 "The display name of the application, sometimes localized to the install "
10251 "language of the guest operating system."
10255 #: ../fish/guestfish-actions.pod:2455 ../src/guestfs-actions.pod:3766
10257 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
10258 "to display something can use C<app_name> instead."
10262 #: ../fish/guestfish-actions.pod:2458 ../src/guestfs-actions.pod:3769
10263 msgid "C<app_epoch>"
10267 #: ../fish/guestfish-actions.pod:2460 ../src/guestfs-actions.pod:3771
10269 "For package managers which use epochs, this contains the epoch of the "
10270 "package (an integer). If unavailable, this is returned as C<0>."
10274 #: ../fish/guestfish-actions.pod:2463 ../src/guestfs-actions.pod:3774
10275 msgid "C<app_version>"
10279 #: ../fish/guestfish-actions.pod:2465 ../src/guestfs-actions.pod:3776
10281 "The version string of the application or package. If unavailable this is "
10282 "returned as an empty string C<\"\">."
10286 #: ../fish/guestfish-actions.pod:2468 ../src/guestfs-actions.pod:3779
10287 msgid "C<app_release>"
10291 #: ../fish/guestfish-actions.pod:2470 ../src/guestfs-actions.pod:3781
10293 "The release string of the application or package, for package managers that "
10294 "use this. If unavailable this is returned as an empty string C<\"\">."
10298 #: ../fish/guestfish-actions.pod:2474 ../src/guestfs-actions.pod:3785
10299 msgid "C<app_install_path>"
10303 #: ../fish/guestfish-actions.pod:2476 ../src/guestfs-actions.pod:3787
10305 "The installation path of the application (on operating systems such as "
10306 "Windows which use installation paths). This path is in the format used by "
10307 "the guest operating system, it is not a libguestfs path."
10311 #: ../fish/guestfish-actions.pod:2481 ../src/guestfs-actions.pod:3792
10312 msgid "If unavailable this is returned as an empty string C<\"\">."
10316 #: ../fish/guestfish-actions.pod:2483 ../src/guestfs-actions.pod:3794
10317 msgid "C<app_trans_path>"
10321 #: ../fish/guestfish-actions.pod:2485 ../src/guestfs-actions.pod:3796
10323 "The install path translated into a libguestfs path. If unavailable this is "
10324 "returned as an empty string C<\"\">."
10328 #: ../fish/guestfish-actions.pod:2488 ../src/guestfs-actions.pod:3799
10329 msgid "C<app_publisher>"
10333 #: ../fish/guestfish-actions.pod:2490 ../src/guestfs-actions.pod:3801
10335 "The name of the publisher of the application, for package managers that use "
10336 "this. If unavailable this is returned as an empty string C<\"\">."
10340 #: ../fish/guestfish-actions.pod:2494 ../src/guestfs-actions.pod:3805
10345 #: ../fish/guestfish-actions.pod:2496 ../src/guestfs-actions.pod:3807
10347 "The URL (eg. upstream URL) of the application. If unavailable this is "
10348 "returned as an empty string C<\"\">."
10352 #: ../fish/guestfish-actions.pod:2499 ../src/guestfs-actions.pod:3810
10353 msgid "C<app_source_package>"
10357 #: ../fish/guestfish-actions.pod:2501 ../src/guestfs-actions.pod:3812
10359 "For packaging systems which support this, the name of the source package. "
10360 "If unavailable this is returned as an empty string C<\"\">."
10364 #: ../fish/guestfish-actions.pod:2504 ../src/guestfs-actions.pod:3815
10365 msgid "C<app_summary>"
10369 #: ../fish/guestfish-actions.pod:2506 ../src/guestfs-actions.pod:3817
10371 "A short (usually one line) description of the application or package. If "
10372 "unavailable this is returned as an empty string C<\"\">."
10376 #: ../fish/guestfish-actions.pod:2509 ../src/guestfs-actions.pod:3820
10377 msgid "C<app_description>"
10381 #: ../fish/guestfish-actions.pod:2511 ../src/guestfs-actions.pod:3822
10383 "A longer description of the application or package. If unavailable this is "
10384 "returned as an empty string C<\"\">."
10388 #: ../fish/guestfish-actions.pod:2518
10393 #: ../fish/guestfish-actions.pod:2520
10401 #: ../fish/guestfish-actions.pod:2522 ../src/guestfs-actions.pod:3840
10403 "This function uses other libguestfs functions and certain heuristics to "
10404 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
10405 "for operating systems."
10409 #: ../fish/guestfish-actions.pod:2526 ../src/guestfs-actions.pod:3844
10410 msgid "The list returned is empty if no operating systems were found."
10414 #: ../fish/guestfish-actions.pod:2528 ../src/guestfs-actions.pod:3846
10416 "If one operating system was found, then this returns a list with a single "
10417 "element, which is the name of the root filesystem of this operating system. "
10418 "It is also possible for this function to return a list containing more than "
10419 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
10420 "element being the root filesystem of one of the operating systems."
10424 #: ../fish/guestfish-actions.pod:2535
10426 "You can pass the root string(s) returned to other L</inspect-get-*> "
10427 "functions in order to query further information about each operating system, "
10428 "such as the name and version."
10432 #: ../fish/guestfish-actions.pod:2540
10434 "This function uses other libguestfs features such as L</mount-ro> and "
10435 "L</umount-all> in order to mount and unmount filesystems and look at the "
10436 "contents. This should be called with no disks currently mounted. The "
10437 "function may also use Augeas, so any existing Augeas handle will be closed."
10441 #: ../fish/guestfish-actions.pod:2546 ../src/guestfs-actions.pod:3864
10443 "This function cannot decrypt encrypted disks. The caller must do that first "
10444 "(supplying the necessary keys) if the disk is encrypted."
10448 #: ../fish/guestfish-actions.pod:2552 ../fish/guestfish-actions.pod:2750 ../fish/guestfish-actions.pod:2815
10449 msgid "See also L</list-filesystems>."
10453 #: ../fish/guestfish-actions.pod:2554
10454 msgid "is-blockdev"
10458 #: ../fish/guestfish-actions.pod:2556
10461 " is-blockdev path\n"
10466 #: ../fish/guestfish-actions.pod:2558 ../src/guestfs-actions.pod:3884
10468 "This returns C<true> if and only if there is a block device with the given "
10473 #: ../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
10474 msgid "See also L</stat>."
10478 #: ../fish/guestfish-actions.pod:2563
10483 #: ../fish/guestfish-actions.pod:2565
10491 #: ../fish/guestfish-actions.pod:2567 ../src/guestfs-actions.pod:3898
10493 "This returns true iff this handle is busy processing a command (in the "
10498 #: ../fish/guestfish-actions.pod:2572
10503 #: ../fish/guestfish-actions.pod:2574
10506 " is-chardev path\n"
10511 #: ../fish/guestfish-actions.pod:2576 ../src/guestfs-actions.pod:3913
10513 "This returns C<true> if and only if there is a character device with the "
10514 "given C<path> name."
10518 #: ../fish/guestfish-actions.pod:2581
10523 #: ../fish/guestfish-actions.pod:2583
10531 #: ../fish/guestfish-actions.pod:2585 ../src/guestfs-actions.pod:3927
10533 "This returns true iff this handle is being configured (in the C<CONFIG> "
10538 #: ../fish/guestfish-actions.pod:2590
10543 #: ../fish/guestfish-actions.pod:2592
10551 #: ../fish/guestfish-actions.pod:2594 ../src/guestfs-actions.pod:3942
10553 "This returns C<true> if and only if there is a directory with the given "
10554 "C<path> name. Note that it returns false for other objects like files."
10558 #: ../fish/guestfish-actions.pod:2600
10563 #: ../fish/guestfish-actions.pod:2602
10571 #: ../fish/guestfish-actions.pod:2604 ../src/guestfs-actions.pod:3958
10573 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
10574 "given C<path> name."
10578 #: ../fish/guestfish-actions.pod:2609
10583 #: ../fish/guestfish-actions.pod:2611
10591 #: ../fish/guestfish-actions.pod:2613 ../src/guestfs-actions.pod:3973
10593 "This returns C<true> if and only if there is a regular file with the given "
10594 "C<path> name. Note that it returns false for other objects like "
10599 #: ../fish/guestfish-actions.pod:2619
10600 msgid "is-launching"
10604 #: ../fish/guestfish-actions.pod:2621
10612 #: ../fish/guestfish-actions.pod:2623 ../src/guestfs-actions.pod:3988
10614 "This returns true iff this handle is launching the subprocess (in the "
10615 "C<LAUNCHING> state)."
10619 #: ../fish/guestfish-actions.pod:2628
10624 #: ../fish/guestfish-actions.pod:2630
10632 #: ../fish/guestfish-actions.pod:2632 ../src/guestfs-actions.pod:4003
10634 "This command tests whether C<device> is a logical volume, and returns true "
10635 "iff this is the case."
10639 #: ../fish/guestfish-actions.pod:2635
10644 #: ../fish/guestfish-actions.pod:2637
10652 #: ../fish/guestfish-actions.pod:2639 ../src/guestfs-actions.pod:4015
10654 "This returns true iff this handle is ready to accept commands (in the "
10659 #: ../fish/guestfish-actions.pod:2644
10664 #: ../fish/guestfish-actions.pod:2646
10667 " is-socket path\n"
10672 #: ../fish/guestfish-actions.pod:2648 ../src/guestfs-actions.pod:4030
10674 "This returns C<true> if and only if there is a Unix domain socket with the "
10675 "given C<path> name."
10679 #: ../fish/guestfish-actions.pod:2653
10684 #: ../fish/guestfish-actions.pod:2655
10687 " is-symlink path\n"
10692 #: ../fish/guestfish-actions.pod:2657 ../src/guestfs-actions.pod:4045
10694 "This returns C<true> if and only if there is a symbolic link with the given "
10699 #: ../fish/guestfish-actions.pod:2662
10704 #: ../fish/guestfish-actions.pod:2664
10712 #: ../fish/guestfish-actions.pod:2666 ../src/guestfs-actions.pod:4060
10714 "This returns true iff the file exists and the file is empty or it contains "
10719 #: ../fish/guestfish-actions.pod:2669
10720 msgid "is-zero-device"
10724 #: ../fish/guestfish-actions.pod:2671
10727 " is-zero-device device\n"
10732 #: ../fish/guestfish-actions.pod:2673 ../src/guestfs-actions.pod:4073
10733 msgid "This returns true iff the device exists and contains all zero bytes."
10737 #: ../fish/guestfish-actions.pod:2675 ../src/guestfs-actions.pod:4075
10738 msgid "Note that for large devices this can take a long time to run."
10742 #: ../fish/guestfish-actions.pod:2677
10743 msgid "kill-subprocess"
10747 #: ../fish/guestfish-actions.pod:2679
10750 " kill-subprocess\n"
10755 #: ../fish/guestfish-actions.pod:2681 ../src/guestfs-actions.pod:4086
10756 msgid "This kills the qemu subprocess. You should never need to call this."
10760 #: ../fish/guestfish-actions.pod:2683
10765 #: ../fish/guestfish-actions.pod:2685
10770 #: ../fish/guestfish-actions.pod:2687
10778 #: ../fish/guestfish-actions.pod:2689 ../src/guestfs-actions.pod:4097
10780 "Internally libguestfs is implemented by running a virtual machine using "
10785 #: ../fish/guestfish-actions.pod:2692 ../src/guestfs-actions.pod:4100
10787 "You should call this after configuring the handle (eg. adding drives) but "
10788 "before performing any actions."
10792 #: ../fish/guestfish-actions.pod:2695
10797 #: ../fish/guestfish-actions.pod:2697
10800 " lchown owner group path\n"
10805 #: ../fish/guestfish-actions.pod:2699
10807 "Change the file owner to C<owner> and group to C<group>. This is like "
10808 "L</chown> but if C<path> is a symlink then the link itself is changed, not "
10813 #: ../fish/guestfish-actions.pod:2707
10818 #: ../fish/guestfish-actions.pod:2709
10821 " lgetxattr path name\n"
10826 #: ../fish/guestfish-actions.pod:2711 ../src/guestfs-actions.pod:4140
10828 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
10829 "is a symlink, then this call returns an extended attribute from the symlink."
10833 #: ../fish/guestfish-actions.pod:2725
10834 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
10838 #: ../fish/guestfish-actions.pod:2727
10843 #: ../fish/guestfish-actions.pod:2729
10846 " lgetxattrs path\n"
10851 #: ../fish/guestfish-actions.pod:2731
10853 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
10854 "it returns the extended attributes of the link itself."
10858 #: ../fish/guestfish-actions.pod:2735
10863 #: ../fish/guestfish-actions.pod:2737
10871 #: ../fish/guestfish-actions.pod:2739 ../src/guestfs-actions.pod:4183
10873 "List all 9p filesystems attached to the guest. A list of mount tags is "
10878 #: ../fish/guestfish-actions.pod:2742
10879 msgid "list-devices"
10883 #: ../fish/guestfish-actions.pod:2744
10891 #: ../fish/guestfish-actions.pod:2746 ../src/guestfs-actions.pod:4197
10892 msgid "List all the block devices."
10896 #: ../fish/guestfish-actions.pod:2748 ../src/guestfs-actions.pod:4199
10897 msgid "The full block device names are returned, eg. C</dev/sda>."
10901 #: ../fish/guestfish-actions.pod:2752
10902 msgid "list-dm-devices"
10906 #: ../fish/guestfish-actions.pod:2754
10909 " list-dm-devices\n"
10914 #: ../fish/guestfish-actions.pod:2756 ../src/guestfs-actions.pod:4214
10915 msgid "List all device mapper devices."
10919 #: ../fish/guestfish-actions.pod:2758
10921 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
10922 "previous call to L</luks-open>."
10926 #: ../fish/guestfish-actions.pod:2761
10928 "Device mapper devices which correspond to logical volumes are I<not> "
10929 "returned in this list. Call L</lvs> if you want to list logical volumes."
10933 #: ../fish/guestfish-actions.pod:2765
10934 msgid "list-filesystems"
10938 #: ../fish/guestfish-actions.pod:2767
10941 " list-filesystems\n"
10946 #: ../fish/guestfish-actions.pod:2769 ../src/guestfs-actions.pod:4234
10948 "This inspection command looks for filesystems on partitions, block devices "
10949 "and logical volumes, returning a list of devices containing filesystems and "
10954 #: ../fish/guestfish-actions.pod:2773 ../src/guestfs-actions.pod:4238
10956 "The return value is a hash, where the keys are the devices containing "
10957 "filesystems, and the values are the filesystem types. For example:"
10961 #: ../fish/guestfish-actions.pod:2777 ../src/guestfs-actions.pod:4242
10964 " \"/dev/sda1\" => \"ntfs\"\n"
10965 " \"/dev/sda2\" => \"ext2\"\n"
10966 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
10967 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
10972 #: ../fish/guestfish-actions.pod:2782 ../src/guestfs-actions.pod:4247
10974 "The value can have the special value \"unknown\", meaning the content of the "
10975 "device is undetermined or empty. \"swap\" means a Linux swap partition."
10979 #: ../fish/guestfish-actions.pod:2786
10981 "This command runs other libguestfs commands, which might include L</mount> "
10982 "and L</umount>, and therefore you should use this soon after launch and only "
10983 "when nothing is mounted."
10987 #: ../fish/guestfish-actions.pod:2790
10989 "Not all of the filesystems returned will be mountable. In particular, swap "
10990 "partitions are returned in the list. Also this command does not check that "
10991 "each filesystem found is valid and mountable, and some filesystems might be "
10992 "mountable but require special options. Filesystems may not all belong to a "
10993 "single logical operating system (use L</inspect-os> to look for OSes)."
10997 #: ../fish/guestfish-actions.pod:2798
10998 msgid "list-md-devices"
11002 #: ../fish/guestfish-actions.pod:2800
11005 " list-md-devices\n"
11010 #: ../fish/guestfish-actions.pod:2802 ../src/guestfs-actions.pod:4276
11011 msgid "List all Linux md devices."
11015 #: ../fish/guestfish-actions.pod:2804
11016 msgid "list-partitions"
11020 #: ../fish/guestfish-actions.pod:2806
11023 " list-partitions\n"
11028 #: ../fish/guestfish-actions.pod:2808 ../src/guestfs-actions.pod:4287
11029 msgid "List all the partitions detected on all block devices."
11033 #: ../fish/guestfish-actions.pod:2810 ../src/guestfs-actions.pod:4289
11034 msgid "The full partition device names are returned, eg. C</dev/sda1>"
11038 #: ../fish/guestfish-actions.pod:2812
11040 "This does not return logical volumes. For that you will need to call "
11045 #: ../fish/guestfish-actions.pod:2817
11050 #: ../fish/guestfish-actions.pod:2819
11058 #: ../fish/guestfish-actions.pod:2821 ../src/guestfs-actions.pod:4308
11060 "List the files in C<directory> (relative to the root directory, there is no "
11061 "cwd) in the format of 'ls -la'."
11065 #: ../fish/guestfish-actions.pod:2824 ../src/guestfs-actions.pod:4311
11067 "This command is mostly useful for interactive sessions. It is I<not> "
11068 "intended that you try to parse the output string."
11072 #: ../fish/guestfish-actions.pod:2827
11077 #: ../fish/guestfish-actions.pod:2829
11080 " ln target linkname\n"
11085 #: ../fish/guestfish-actions.pod:2831 ../src/guestfs-actions.pod:4326
11086 msgid "This command creates a hard link using the C<ln> command."
11090 #: ../fish/guestfish-actions.pod:2833
11095 #: ../fish/guestfish-actions.pod:2835
11098 " ln-f target linkname\n"
11103 #: ../fish/guestfish-actions.pod:2837 ../src/guestfs-actions.pod:4339
11105 "This command creates a hard link using the C<ln -f> command. The I<-f> "
11106 "option removes the link (C<linkname>) if it exists already."
11110 #: ../fish/guestfish-actions.pod:2840
11115 #: ../fish/guestfish-actions.pod:2842
11118 " ln-s target linkname\n"
11123 #: ../fish/guestfish-actions.pod:2844 ../src/guestfs-actions.pod:4353
11124 msgid "This command creates a symbolic link using the C<ln -s> command."
11128 #: ../fish/guestfish-actions.pod:2846
11133 #: ../fish/guestfish-actions.pod:2848
11136 " ln-sf target linkname\n"
11141 #: ../fish/guestfish-actions.pod:2850 ../src/guestfs-actions.pod:4366
11143 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
11144 "option removes the link (C<linkname>) if it exists already."
11148 #: ../fish/guestfish-actions.pod:2853
11149 msgid "lremovexattr"
11153 #: ../fish/guestfish-actions.pod:2855
11156 " lremovexattr xattr path\n"
11161 #: ../fish/guestfish-actions.pod:2857
11163 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
11164 "it removes an extended attribute of the link itself."
11168 #: ../fish/guestfish-actions.pod:2861
11173 #: ../fish/guestfish-actions.pod:2863
11181 #: ../fish/guestfish-actions.pod:2865 ../src/guestfs-actions.pod:4394
11183 "List the files in C<directory> (relative to the root directory, there is no "
11184 "cwd). The '.' and '..' entries are not returned, but hidden files are "
11189 #: ../fish/guestfish-actions.pod:2869
11191 "This command is mostly useful for interactive sessions. Programs should "
11192 "probably use L</readdir> instead."
11196 #: ../fish/guestfish-actions.pod:2872
11201 #: ../fish/guestfish-actions.pod:2874
11204 " lsetxattr xattr val vallen path\n"
11209 #: ../fish/guestfish-actions.pod:2876
11211 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
11212 "sets an extended attribute of the link itself."
11216 #: ../fish/guestfish-actions.pod:2880
11221 #: ../fish/guestfish-actions.pod:2882
11229 #: ../fish/guestfish-actions.pod:2884 ../fish/guestfish-actions.pod:4775 ../src/guestfs-actions.pod:4430 ../src/guestfs-actions.pod:7349
11230 msgid "Returns file information for the given C<path>."
11234 #: ../fish/guestfish-actions.pod:2886
11236 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
11237 "the link is stat-ed, not the file it refers to."
11241 #: ../fish/guestfish-actions.pod:2890 ../src/guestfs-actions.pod:4436
11242 msgid "This is the same as the C<lstat(2)> system call."
11246 #: ../fish/guestfish-actions.pod:2892
11251 #: ../fish/guestfish-actions.pod:2894
11254 " lstatlist path 'names ...'\n"
11259 #: ../fish/guestfish-actions.pod:2896
11261 "This call allows you to perform the L</lstat> operation on multiple files, "
11262 "where all files are in the directory C<path>. C<names> is the list of files "
11263 "from this directory."
11267 #: ../fish/guestfish-actions.pod:2900 ../src/guestfs-actions.pod:4455
11269 "On return you get a list of stat structs, with a one-to-one correspondence "
11270 "to the C<names> list. If any name did not exist or could not be lstat'd, "
11271 "then the C<ino> field of that structure is set to C<-1>."
11275 #: ../fish/guestfish-actions.pod:2905
11277 "This call is intended for programs that want to efficiently list a directory "
11278 "contents without making many round-trips. See also L</lxattrlist> for a "
11279 "similarly efficient call for getting extended attributes. Very long "
11280 "directory listings might cause the protocol message size to be exceeded, "
11281 "causing this call to fail. The caller must split up such requests into "
11282 "smaller groups of names."
11286 #: ../fish/guestfish-actions.pod:2913
11287 msgid "luks-add-key"
11291 #: ../fish/guestfish-actions.pod:2915
11294 " luks-add-key device keyslot\n"
11299 #: ../fish/guestfish-actions.pod:2917 ../src/guestfs-actions.pod:4483
11301 "This command adds a new key on LUKS device C<device>. C<key> is any "
11302 "existing key, and is used to access the device. C<newkey> is the new key to "
11303 "add. C<keyslot> is the key slot that will be replaced."
11307 #: ../fish/guestfish-actions.pod:2922
11309 "Note that if C<keyslot> already contains a key, then this command will "
11310 "fail. You have to use L</luks-kill-slot> first to remove that key."
11314 #: ../fish/guestfish-actions.pod:2926 ../fish/guestfish-actions.pod:2948 ../fish/guestfish-actions.pod:2958 ../fish/guestfish-actions.pod:2969 ../fish/guestfish-actions.pod:2995 ../fish/guestfish-actions.pod:3005
11316 "This command has one or more key or passphrase parameters. Guestfish will "
11317 "prompt for these separately."
11321 #: ../fish/guestfish-actions.pod:2929
11326 #: ../fish/guestfish-actions.pod:2931
11329 " luks-close device\n"
11334 #: ../fish/guestfish-actions.pod:2933
11336 "This closes a LUKS device that was created earlier by L</luks-open> or "
11337 "L</luks-open-ro>. The C<device> parameter must be the name of the LUKS "
11338 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
11339 "underlying block device."
11343 #: ../fish/guestfish-actions.pod:2939
11344 msgid "luks-format"
11348 #: ../fish/guestfish-actions.pod:2941
11351 " luks-format device keyslot\n"
11356 #: ../fish/guestfish-actions.pod:2943 ../src/guestfs-actions.pod:4524
11358 "This command erases existing data on C<device> and formats the device as a "
11359 "LUKS encrypted device. C<key> is the initial key, which is added to key "
11360 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
11364 #: ../fish/guestfish-actions.pod:2951
11365 msgid "luks-format-cipher"
11369 #: ../fish/guestfish-actions.pod:2953
11372 " luks-format-cipher device keyslot cipher\n"
11377 #: ../fish/guestfish-actions.pod:2955
11379 "This command is the same as L</luks-format> but it also allows you to set "
11380 "the C<cipher> used."
11384 #: ../fish/guestfish-actions.pod:2961
11385 msgid "luks-kill-slot"
11389 #: ../fish/guestfish-actions.pod:2963
11392 " luks-kill-slot device keyslot\n"
11397 #: ../fish/guestfish-actions.pod:2965 ../src/guestfs-actions.pod:4565
11399 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
11400 "device C<device>. C<key> must be one of the I<other> keys."
11404 #: ../fish/guestfish-actions.pod:2972
11409 #: ../fish/guestfish-actions.pod:2974
11412 " luks-open device mapname\n"
11417 #: ../fish/guestfish-actions.pod:2976 ../src/guestfs-actions.pod:4585
11419 "This command opens a block device which has been encrypted according to the "
11420 "Linux Unified Key Setup (LUKS) standard."
11424 #: ../fish/guestfish-actions.pod:2979 ../src/guestfs-actions.pod:4588
11425 msgid "C<device> is the encrypted block device or partition."
11429 #: ../fish/guestfish-actions.pod:2981 ../src/guestfs-actions.pod:4590
11431 "The caller must supply one of the keys associated with the LUKS block "
11432 "device, in the C<key> parameter."
11436 #: ../fish/guestfish-actions.pod:2984 ../src/guestfs-actions.pod:4593
11438 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
11439 "writes to this block device are decrypted from and encrypted to the "
11440 "underlying C<device> respectively."
11444 #: ../fish/guestfish-actions.pod:2988
11446 "If this block device contains LVM volume groups, then calling L</vgscan> "
11447 "followed by L</vg-activate-all> will make them visible."
11451 #: ../fish/guestfish-actions.pod:2992
11452 msgid "Use L</list-dm-devices> to list all device mapper devices."
11456 #: ../fish/guestfish-actions.pod:2998
11457 msgid "luks-open-ro"
11461 #: ../fish/guestfish-actions.pod:3000
11464 " luks-open-ro device mapname\n"
11469 #: ../fish/guestfish-actions.pod:3002
11471 "This is the same as L</luks-open> except that a read-only mapping is "
11476 #: ../fish/guestfish-actions.pod:3008
11481 #: ../fish/guestfish-actions.pod:3010
11484 " lvcreate logvol volgroup mbytes\n"
11489 #: ../fish/guestfish-actions.pod:3012 ../src/guestfs-actions.pod:4639
11491 "This creates an LVM logical volume called C<logvol> on the volume group "
11492 "C<volgroup>, with C<size> megabytes."
11496 #: ../fish/guestfish-actions.pod:3015
11497 msgid "lvm-canonical-lv-name"
11501 #: ../fish/guestfish-actions.pod:3017
11504 " lvm-canonical-lv-name lvname\n"
11509 #: ../fish/guestfish-actions.pod:3019 ../src/guestfs-actions.pod:4652
11511 "This converts alternative naming schemes for LVs that you might find to the "
11512 "canonical name. For example, C</dev/mapper/VG-LV> is converted to "
11517 #: ../fish/guestfish-actions.pod:3023 ../src/guestfs-actions.pod:4656
11519 "This command returns an error if the C<lvname> parameter does not refer to a "
11524 #: ../fish/guestfish-actions.pod:3026
11525 msgid "See also L</is-lv>."
11529 #: ../fish/guestfish-actions.pod:3028
11530 msgid "lvm-clear-filter"
11534 #: ../fish/guestfish-actions.pod:3030
11537 " lvm-clear-filter\n"
11542 #: ../fish/guestfish-actions.pod:3032
11544 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
11549 #: ../fish/guestfish-actions.pod:3035 ../fish/guestfish-actions.pod:3063 ../src/guestfs-actions.pod:4674 ../src/guestfs-actions.pod:4713
11550 msgid "This command also clears the LVM cache and performs a volume group scan."
11554 #: ../fish/guestfish-actions.pod:3038
11555 msgid "lvm-remove-all"
11559 #: ../fish/guestfish-actions.pod:3040
11562 " lvm-remove-all\n"
11567 #: ../fish/guestfish-actions.pod:3042 ../src/guestfs-actions.pod:4686
11569 "This command removes all LVM logical volumes, volume groups and physical "
11574 #: ../fish/guestfish-actions.pod:3045
11575 msgid "lvm-set-filter"
11579 #: ../fish/guestfish-actions.pod:3047
11582 " lvm-set-filter 'devices ...'\n"
11587 #: ../fish/guestfish-actions.pod:3049 ../src/guestfs-actions.pod:4699
11589 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
11590 "block devices in the list C<devices>, and will ignore all other attached "
11595 #: ../fish/guestfish-actions.pod:3053 ../src/guestfs-actions.pod:4703
11597 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
11598 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
11599 "there are two types of duplication possible: either cloned PVs/VGs which "
11600 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
11601 "same name. In normal operation you cannot create this situation, but you "
11602 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
11603 "inside the LVM metadata."
11607 #: ../fish/guestfish-actions.pod:3066 ../src/guestfs-actions.pod:4716
11608 msgid "You can filter whole block devices or individual partitions."
11612 #: ../fish/guestfish-actions.pod:3068 ../src/guestfs-actions.pod:4718
11614 "You cannot use this if any VG is currently in use (eg. contains a mounted "
11615 "filesystem), even if you are not filtering out that VG."
11619 #: ../fish/guestfish-actions.pod:3072
11624 #: ../fish/guestfish-actions.pod:3074
11627 " lvremove device\n"
11632 #: ../fish/guestfish-actions.pod:3076 ../src/guestfs-actions.pod:4732
11634 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
11635 "LV, such as C</dev/VG/LV>."
11639 #: ../fish/guestfish-actions.pod:3079 ../src/guestfs-actions.pod:4735
11641 "You can also remove all LVs in a volume group by specifying the VG name, "
11646 #: ../fish/guestfish-actions.pod:3082
11651 #: ../fish/guestfish-actions.pod:3084
11654 " lvrename logvol newlogvol\n"
11659 #: ../fish/guestfish-actions.pod:3086 ../src/guestfs-actions.pod:4749
11660 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
11664 #: ../fish/guestfish-actions.pod:3088
11669 #: ../fish/guestfish-actions.pod:3090
11672 " lvresize device mbytes\n"
11677 #: ../fish/guestfish-actions.pod:3092 ../src/guestfs-actions.pod:4762
11679 "This resizes (expands or shrinks) an existing LVM logical volume to "
11680 "C<mbytes>. When reducing, data in the reduced part is lost."
11684 #: ../fish/guestfish-actions.pod:3096
11685 msgid "lvresize-free"
11689 #: ../fish/guestfish-actions.pod:3098
11692 " lvresize-free lv percent\n"
11697 #: ../fish/guestfish-actions.pod:3100 ../src/guestfs-actions.pod:4777
11699 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
11700 "remaining free space in the volume group. Commonly you would call this with "
11701 "pc = 100 which expands the logical volume as much as possible, using all "
11702 "remaining free space in the volume group."
11706 #: ../fish/guestfish-actions.pod:3106
11711 #: ../fish/guestfish-actions.pod:3108
11719 #: ../fish/guestfish-actions.pod:3110 ../src/guestfs-actions.pod:4792
11721 "List all the logical volumes detected. This is the equivalent of the "
11722 "L<lvs(8)> command."
11726 #: ../fish/guestfish-actions.pod:3113 ../src/guestfs-actions.pod:4795
11728 "This returns a list of the logical volume device names "
11729 "(eg. C</dev/VolGroup00/LogVol00>)."
11733 #: ../fish/guestfish-actions.pod:3116
11734 msgid "See also L</lvs-full>, L</list-filesystems>."
11738 #: ../fish/guestfish-actions.pod:3118
11743 #: ../fish/guestfish-actions.pod:3120
11751 #: ../fish/guestfish-actions.pod:3122 ../src/guestfs-actions.pod:4811
11753 "List all the logical volumes detected. This is the equivalent of the "
11754 "L<lvs(8)> command. The \"full\" version includes all fields."
11758 #: ../fish/guestfish-actions.pod:3125
11763 #: ../fish/guestfish-actions.pod:3127
11771 #: ../fish/guestfish-actions.pod:3129 ../src/guestfs-actions.pod:4826
11772 msgid "This command returns the UUID of the LVM LV C<device>."
11776 #: ../fish/guestfish-actions.pod:3131
11781 #: ../fish/guestfish-actions.pod:3133
11784 " lxattrlist path 'names ...'\n"
11789 #: ../fish/guestfish-actions.pod:3135 ../src/guestfs-actions.pod:4840
11791 "This call allows you to get the extended attributes of multiple files, where "
11792 "all files are in the directory C<path>. C<names> is the list of files from "
11797 #: ../fish/guestfish-actions.pod:3139 ../src/guestfs-actions.pod:4844
11799 "On return you get a flat list of xattr structs which must be interpreted "
11800 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
11801 "C<attrval> in this struct is zero-length to indicate there was an error "
11802 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
11803 "number (the number of following attributes for this file, which could be "
11804 "C<\"0\">). Then after the first xattr struct are the zero or more "
11805 "attributes for the first named file. This repeats for the second and "
11806 "subsequent files."
11810 #: ../fish/guestfish-actions.pod:3149
11812 "This call is intended for programs that want to efficiently list a directory "
11813 "contents without making many round-trips. See also L</lstatlist> for a "
11814 "similarly efficient call for getting standard stats. Very long directory "
11815 "listings might cause the protocol message size to be exceeded, causing this "
11816 "call to fail. The caller must split up such requests into smaller groups of "
11821 #: ../fish/guestfish-actions.pod:3157
11822 msgid "mdadm-create"
11826 #: ../fish/guestfish-actions.pod:3159
11829 " mdadm-create name 'devices ...' [missingbitmap:N] [nrdevices:N] [spare:N] "
11830 "[chunk:N] [level:..]\n"
11835 #: ../fish/guestfish-actions.pod:3161 ../src/guestfs-actions.pod:4887
11837 "Create a Linux md (RAID) device named C<name> on the devices in the list "
11842 #: ../fish/guestfish-actions.pod:3168 ../src/guestfs-actions.pod:4894
11843 msgid "C<missingbitmap>"
11847 #: ../fish/guestfish-actions.pod:3170 ../src/guestfs-actions.pod:4896
11849 "A bitmap of missing devices. If a bit is set it means that a missing device "
11850 "is added to the array. The least significant bit corresponds to the first "
11851 "device in the array."
11855 #: ../fish/guestfish-actions.pod:3174 ../src/guestfs-actions.pod:4900
11856 msgid "As examples:"
11860 #: ../fish/guestfish-actions.pod:3176 ../src/guestfs-actions.pod:4902
11862 "If C<devices = [\"/dev/sda\"]> and C<missingbitmap = 0x1> then the resulting "
11863 "array would be C<[E<lt>missingE<gt>, \"/dev/sda\"]>."
11867 #: ../fish/guestfish-actions.pod:3179 ../src/guestfs-actions.pod:4905
11869 "If C<devices = [\"/dev/sda\"]> and C<missingbitmap = 0x2> then the resulting "
11870 "array would be C<[\"/dev/sda\", E<lt>missingE<gt>]>."
11874 #: ../fish/guestfish-actions.pod:3182 ../src/guestfs-actions.pod:4908
11875 msgid "This defaults to C<0> (no missing devices)."
11879 #: ../fish/guestfish-actions.pod:3184 ../src/guestfs-actions.pod:4910
11881 "The length of C<devices> + the number of bits set in C<missingbitmap> must "
11882 "equal C<nrdevices> + C<spare>."
11886 #: ../fish/guestfish-actions.pod:3187 ../src/guestfs-actions.pod:4913
11887 msgid "C<nrdevices>"
11891 #: ../fish/guestfish-actions.pod:3189 ../src/guestfs-actions.pod:4915
11892 msgid "The number of active RAID devices."
11896 #: ../fish/guestfish-actions.pod:3191 ../src/guestfs-actions.pod:4917
11898 "If not set, this defaults to the length of C<devices> plus the number of "
11899 "bits set in C<missingbitmap>."
11903 #: ../fish/guestfish-actions.pod:3194 ../src/guestfs-actions.pod:4920
11908 #: ../fish/guestfish-actions.pod:3196 ../src/guestfs-actions.pod:4922
11909 msgid "The number of spare devices."
11913 #: ../fish/guestfish-actions.pod:3198 ../src/guestfs-actions.pod:4924
11914 msgid "If not set, this defaults to C<0>."
11918 #: ../fish/guestfish-actions.pod:3200 ../src/guestfs-actions.pod:4926
11923 #: ../fish/guestfish-actions.pod:3202 ../src/guestfs-actions.pod:4928
11924 msgid "The chunk size in bytes."
11928 #: ../fish/guestfish-actions.pod:3204 ../fish/guestfish-actions.pod:3226 ../src/guestfs-actions.pod:4930 ../src/guestfs-actions.pod:4978
11933 #: ../fish/guestfish-actions.pod:3206 ../src/guestfs-actions.pod:4932
11935 "The RAID level, which can be one of: I<linear>, I<raid0>, I<0>, I<stripe>, "
11936 "I<raid1>, I<1>, I<mirror>, I<raid4>, I<4>, I<raid5>, I<5>, I<raid6>, I<6>, "
11937 "I<raid10>, I<10>. Some of these are synonymous, and more levels may be "
11942 #: ../fish/guestfish-actions.pod:3211 ../src/guestfs-actions.pod:4937
11943 msgid "If not set, this defaults to C<raid1>."
11947 #: ../fish/guestfish-actions.pod:3217
11948 msgid "mdadm-detail"
11952 #: ../fish/guestfish-actions.pod:3219
11955 " mdadm-detail md\n"
11960 #: ../fish/guestfish-actions.pod:3221 ../src/guestfs-actions.pod:4973
11962 "This command exposes the output of 'mdadm -DY <md>'. The following fields "
11963 "are usually present in the returned hash. Other fields may also be present."
11967 #: ../fish/guestfish-actions.pod:3228 ../src/guestfs-actions.pod:4980
11968 msgid "The raid level of the MD device."
11972 #: ../fish/guestfish-actions.pod:3230 ../src/guestfs-actions.pod:4982
11977 #: ../fish/guestfish-actions.pod:3232 ../src/guestfs-actions.pod:4984
11978 msgid "The number of underlying devices in the MD device."
11982 #: ../fish/guestfish-actions.pod:3234 ../src/guestfs-actions.pod:4986
11983 msgid "C<metadata>"
11987 #: ../fish/guestfish-actions.pod:3236 ../src/guestfs-actions.pod:4988
11988 msgid "The metadata version used."
11992 #: ../fish/guestfish-actions.pod:3238 ../src/guestfs-actions.pod:4990
11997 #: ../fish/guestfish-actions.pod:3240 ../src/guestfs-actions.pod:4992
11998 msgid "The UUID of the MD device."
12002 #: ../fish/guestfish-actions.pod:3244 ../src/guestfs-actions.pod:4996
12003 msgid "The name of the MD device."
12007 #: ../fish/guestfish-actions.pod:3248
12012 #: ../fish/guestfish-actions.pod:3250
12020 #: ../fish/guestfish-actions.pod:3252 ../src/guestfs-actions.pod:5012
12021 msgid "Create a directory named C<path>."
12025 #: ../fish/guestfish-actions.pod:3254
12030 #: ../fish/guestfish-actions.pod:3256
12033 " mkdir-mode path mode\n"
12038 #: ../fish/guestfish-actions.pod:3258 ../src/guestfs-actions.pod:5025
12040 "This command creates a directory, setting the initial permissions of the "
12041 "directory to C<mode>."
12045 #: ../fish/guestfish-actions.pod:3261 ../src/guestfs-actions.pod:5028
12047 "For common Linux filesystems, the actual mode which is set will be C<mode & "
12048 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
12053 #: ../fish/guestfish-actions.pod:3265
12054 msgid "See also L</mkdir>, L</umask>"
12058 #: ../fish/guestfish-actions.pod:3267
12063 #: ../fish/guestfish-actions.pod:3269
12071 #: ../fish/guestfish-actions.pod:3271 ../src/guestfs-actions.pod:5044
12073 "Create a directory named C<path>, creating any parent directories as "
12074 "necessary. This is like the C<mkdir -p> shell command."
12078 #: ../fish/guestfish-actions.pod:3274
12083 #: ../fish/guestfish-actions.pod:3276
12086 " mkdtemp template\n"
12091 #: ../fish/guestfish-actions.pod:3278 ../src/guestfs-actions.pod:5057
12093 "This command creates a temporary directory. The C<template> parameter "
12094 "should be a full pathname for the temporary directory name with the final "
12095 "six characters being \"XXXXXX\"."
12099 #: ../fish/guestfish-actions.pod:3283 ../src/guestfs-actions.pod:5062
12101 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
12102 "being suitable for Windows filesystems."
12106 #: ../fish/guestfish-actions.pod:3286 ../src/guestfs-actions.pod:5065
12107 msgid "The name of the temporary directory that was created is returned."
12111 #: ../fish/guestfish-actions.pod:3289 ../src/guestfs-actions.pod:5068
12112 msgid "The temporary directory is created with mode 0700 and is owned by root."
12116 #: ../fish/guestfish-actions.pod:3292 ../src/guestfs-actions.pod:5071
12118 "The caller is responsible for deleting the temporary directory and its "
12119 "contents after use."
12123 #: ../fish/guestfish-actions.pod:3295 ../src/guestfs-actions.pod:5074
12124 msgid "See also: L<mkdtemp(3)>"
12128 #: ../fish/guestfish-actions.pod:3297
12133 #: ../fish/guestfish-actions.pod:3299
12136 " mke2fs-J fstype blocksize device journal\n"
12141 #: ../fish/guestfish-actions.pod:3301 ../src/guestfs-actions.pod:5090
12143 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12144 "C<journal>. It is equivalent to the command:"
12148 #: ../fish/guestfish-actions.pod:3305 ../src/guestfs-actions.pod:5094
12151 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
12156 #: ../fish/guestfish-actions.pod:3307
12157 msgid "See also L</mke2journal>."
12161 #: ../fish/guestfish-actions.pod:3309
12166 #: ../fish/guestfish-actions.pod:3311
12169 " mke2fs-JL fstype blocksize device label\n"
12174 #: ../fish/guestfish-actions.pod:3313 ../src/guestfs-actions.pod:5111
12176 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12177 "the journal labeled C<label>."
12181 #: ../fish/guestfish-actions.pod:3316
12182 msgid "See also L</mke2journal-L>."
12186 #: ../fish/guestfish-actions.pod:3318
12191 #: ../fish/guestfish-actions.pod:3320
12194 " mke2fs-JU fstype blocksize device uuid\n"
12199 #: ../fish/guestfish-actions.pod:3322 ../src/guestfs-actions.pod:5129
12201 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12202 "the journal with UUID C<uuid>."
12206 #: ../fish/guestfish-actions.pod:3325
12207 msgid "See also L</mke2journal-U>."
12211 #: ../fish/guestfish-actions.pod:3327
12212 msgid "mke2journal"
12216 #: ../fish/guestfish-actions.pod:3329
12219 " mke2journal blocksize device\n"
12224 #: ../fish/guestfish-actions.pod:3331 ../src/guestfs-actions.pod:5145
12226 "This creates an ext2 external journal on C<device>. It is equivalent to the "
12231 #: ../fish/guestfish-actions.pod:3334 ../src/guestfs-actions.pod:5148
12234 " mke2fs -O journal_dev -b blocksize device\n"
12239 #: ../fish/guestfish-actions.pod:3336
12240 msgid "mke2journal-L"
12244 #: ../fish/guestfish-actions.pod:3338
12247 " mke2journal-L blocksize label device\n"
12252 #: ../fish/guestfish-actions.pod:3340 ../src/guestfs-actions.pod:5162
12253 msgid "This creates an ext2 external journal on C<device> with label C<label>."
12257 #: ../fish/guestfish-actions.pod:3342
12258 msgid "mke2journal-U"
12262 #: ../fish/guestfish-actions.pod:3344
12265 " mke2journal-U blocksize uuid device\n"
12270 #: ../fish/guestfish-actions.pod:3346 ../src/guestfs-actions.pod:5176
12271 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
12275 #: ../fish/guestfish-actions.pod:3348
12280 #: ../fish/guestfish-actions.pod:3350
12283 " mkfifo mode path\n"
12288 #: ../fish/guestfish-actions.pod:3352
12290 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
12291 "is just a convenient wrapper around L</mknod>."
12295 #: ../fish/guestfish-actions.pod:3358
12300 #: ../fish/guestfish-actions.pod:3360
12303 " mkfs fstype device\n"
12308 #: ../fish/guestfish-actions.pod:3362 ../src/guestfs-actions.pod:5206
12310 "This creates a filesystem on C<device> (usually a partition or LVM logical "
12311 "volume). The filesystem type is C<fstype>, for example C<ext3>."
12315 #: ../fish/guestfish-actions.pod:3366
12320 #: ../fish/guestfish-actions.pod:3368
12323 " mkfs-b fstype blocksize device\n"
12328 #: ../fish/guestfish-actions.pod:3370
12330 "This call is similar to L</mkfs>, but it allows you to control the block "
12331 "size of the resulting filesystem. Supported block sizes depend on the "
12332 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
12336 #: ../fish/guestfish-actions.pod:3375 ../fish/guestfish-actions.pod:3402 ../src/guestfs-actions.pod:5234 ../src/guestfs-actions.pod:5272
12338 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
12343 #: ../fish/guestfish-actions.pod:3378
12345 "I<This function is deprecated.> In new code, use the L</mkfs_opts> call "
12350 #: ../fish/guestfish-actions.pod:3385
12355 #: ../fish/guestfish-actions.pod:3387
12358 " mkfs-opts fstype device [blocksize:N] [features:..] [inode:N] "
12364 #: ../fish/guestfish-actions.pod:3389 ../src/guestfs-actions.pod:5259
12366 "This function creates a filesystem on C<device>. The filesystem type is "
12367 "C<fstype>, for example C<ext3>."
12371 #: ../fish/guestfish-actions.pod:3396 ../src/guestfs-actions.pod:5266
12372 msgid "C<blocksize>"
12376 #: ../fish/guestfish-actions.pod:3398 ../src/guestfs-actions.pod:5268
12378 "The filesystem block size. Supported block sizes depend on the filesystem "
12379 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
12384 #: ../fish/guestfish-actions.pod:3405 ../src/guestfs-actions.pod:5275
12385 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
12389 #: ../fish/guestfish-actions.pod:3407 ../src/guestfs-actions.pod:5277
12390 msgid "C<features>"
12394 #: ../fish/guestfish-actions.pod:3409 ../src/guestfs-actions.pod:5279
12395 msgid "This passes the I<-O> parameter to the external mkfs program."
12399 #: ../fish/guestfish-actions.pod:3411 ../src/guestfs-actions.pod:5281
12401 "For certain filesystem types, this allows extra filesystem features to be "
12402 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
12406 #: ../fish/guestfish-actions.pod:3415 ../src/guestfs-actions.pod:5285
12408 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
12413 #: ../fish/guestfish-actions.pod:3418 ../src/guestfs-actions.pod:5288
12418 #: ../fish/guestfish-actions.pod:3420 ../src/guestfs-actions.pod:5290
12420 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
12421 "sets the inode size (only for ext2/3/4 filesystems at present)."
12425 #: ../fish/guestfish-actions.pod:3423 ../src/guestfs-actions.pod:5293
12426 msgid "C<sectorsize>"
12430 #: ../fish/guestfish-actions.pod:3425 ../src/guestfs-actions.pod:5295
12432 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
12433 "sets sector size for ufs filesystem."
12437 #: ../fish/guestfish-actions.pod:3432
12438 msgid "mkmountpoint"
12442 #: ../fish/guestfish-actions.pod:3434
12445 " mkmountpoint exemptpath\n"
12450 #: ../fish/guestfish-actions.pod:3436
12452 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
12453 "to create extra mountpoints before mounting the first filesystem."
12457 #: ../fish/guestfish-actions.pod:3440 ../src/guestfs-actions.pod:5338
12459 "These calls are I<only> necessary in some very limited circumstances, mainly "
12460 "the case where you want to mount a mix of unrelated and/or read-only "
12461 "filesystems together."
12465 #: ../fish/guestfish-actions.pod:3444 ../src/guestfs-actions.pod:5342
12467 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
12468 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
12469 "inside that. You can unpack this as follows in guestfish:"
12473 #: ../fish/guestfish-actions.pod:3449 ../src/guestfs-actions.pod:5347
12476 " add-ro Fedora-11-i686-Live.iso\n"
12478 " mkmountpoint /cd\n"
12479 " mkmountpoint /sqsh\n"
12480 " mkmountpoint /ext3fs\n"
12481 " mount /dev/sda /cd\n"
12482 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
12483 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
12488 #: ../fish/guestfish-actions.pod:3458 ../src/guestfs-actions.pod:5356
12489 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
12493 #: ../fish/guestfish-actions.pod:3460
12495 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
12496 "unexpected errors if you try to mix these calls. It is safest to manually "
12497 "unmount filesystems and remove mountpoints after use."
12501 #: ../fish/guestfish-actions.pod:3464
12503 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
12504 "for this to work for manual mountpoints, you must ensure that the innermost "
12505 "mountpoints have the longest pathnames, as in the example code above."
12509 #: ../fish/guestfish-actions.pod:3469 ../src/guestfs-actions.pod:5367
12510 msgid "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
12514 #: ../fish/guestfish-actions.pod:3471
12516 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
12517 "L</umount-all> to be called when the handle is closed which can also trigger "
12522 #: ../fish/guestfish-actions.pod:3475
12527 #: ../fish/guestfish-actions.pod:3477
12530 " mknod mode devmajor devminor path\n"
12535 #: ../fish/guestfish-actions.pod:3479 ../src/guestfs-actions.pod:5386
12537 "This call creates block or character special devices, or named pipes "
12542 #: ../fish/guestfish-actions.pod:3482 ../src/guestfs-actions.pod:5389
12544 "The C<mode> parameter should be the mode, using the standard constants. "
12545 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
12546 "used when creating block and character special devices."
12550 #: ../fish/guestfish-actions.pod:3487
12552 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
12553 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
12554 "regular file). These constants are available in the standard Linux header "
12555 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
12556 "wrappers around this command which bitwise OR in the appropriate constant "
12561 #: ../fish/guestfish-actions.pod:3497
12566 #: ../fish/guestfish-actions.pod:3499
12569 " mknod-b mode devmajor devminor path\n"
12574 #: ../fish/guestfish-actions.pod:3501
12576 "This call creates a block device node called C<path> with mode C<mode> and "
12577 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
12578 "wrapper around L</mknod>."
12582 #: ../fish/guestfish-actions.pod:3507
12587 #: ../fish/guestfish-actions.pod:3509
12590 " mknod-c mode devmajor devminor path\n"
12595 #: ../fish/guestfish-actions.pod:3511
12597 "This call creates a char device node called C<path> with mode C<mode> and "
12598 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
12599 "wrapper around L</mknod>."
12603 #: ../fish/guestfish-actions.pod:3517
12608 #: ../fish/guestfish-actions.pod:3519
12616 #: ../fish/guestfish-actions.pod:3521 ../src/guestfs-actions.pod:5452
12617 msgid "Create a swap partition on C<device>."
12621 #: ../fish/guestfish-actions.pod:3523
12626 #: ../fish/guestfish-actions.pod:3525
12629 " mkswap-L label device\n"
12634 #: ../fish/guestfish-actions.pod:3527 ../src/guestfs-actions.pod:5465
12635 msgid "Create a swap partition on C<device> with label C<label>."
12639 #: ../fish/guestfish-actions.pod:3529 ../src/guestfs-actions.pod:5467
12641 "Note that you cannot attach a swap label to a block device "
12642 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
12643 "the kernel or swap tools."
12647 #: ../fish/guestfish-actions.pod:3533
12652 #: ../fish/guestfish-actions.pod:3535
12655 " mkswap-U uuid device\n"
12660 #: ../fish/guestfish-actions.pod:3537 ../src/guestfs-actions.pod:5482
12661 msgid "Create a swap partition on C<device> with UUID C<uuid>."
12665 #: ../fish/guestfish-actions.pod:3539
12666 msgid "mkswap-file"
12670 #: ../fish/guestfish-actions.pod:3541
12673 " mkswap-file path\n"
12678 #: ../fish/guestfish-actions.pod:3543 ../src/guestfs-actions.pod:5494
12679 msgid "Create a swap file."
12683 #: ../fish/guestfish-actions.pod:3545
12685 "This command just writes a swap file signature to an existing file. To "
12686 "create the file itself, use something like L</fallocate>."
12690 #: ../fish/guestfish-actions.pod:3548
12695 #: ../fish/guestfish-actions.pod:3550
12698 " modprobe modulename\n"
12703 #: ../fish/guestfish-actions.pod:3552 ../src/guestfs-actions.pod:5509
12704 msgid "This loads a kernel module in the appliance."
12708 #: ../fish/guestfish-actions.pod:3554 ../src/guestfs-actions.pod:5511
12710 "The kernel module must have been whitelisted when libguestfs was built (see "
12711 "C<appliance/kmod.whitelist.in> in the source)."
12715 #: ../fish/guestfish-actions.pod:3557
12720 #: ../fish/guestfish-actions.pod:3559
12723 " mount device mountpoint\n"
12728 #: ../fish/guestfish-actions.pod:3561 ../src/guestfs-actions.pod:5525
12730 "Mount a guest disk at a position in the filesystem. Block devices are named "
12731 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
12732 "those block devices contain partitions, they will have the usual names "
12733 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
12737 #: ../fish/guestfish-actions.pod:3567 ../src/guestfs-actions.pod:5531
12739 "The rules are the same as for L<mount(2)>: A filesystem must first be "
12740 "mounted on C</> before others can be mounted. Other filesystems can only be "
12741 "mounted on directories which already exist."
12745 #: ../fish/guestfish-actions.pod:3572 ../src/guestfs-actions.pod:5536
12747 "The mounted filesystem is writable, if we have sufficient permissions on the "
12748 "underlying device."
12752 #: ../fish/guestfish-actions.pod:3575
12754 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
12755 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
12756 "problems for users. If your program might need to work with older versions "
12757 "of libguestfs, use L</mount-options> instead (using an empty string for the "
12758 "first parameter if you don't want any options)."
12762 #: ../fish/guestfish-actions.pod:3582
12767 #: ../fish/guestfish-actions.pod:3584
12770 " mount-9p mounttag mountpoint [options:..]\n"
12775 #: ../fish/guestfish-actions.pod:3586 ../src/guestfs-actions.pod:5565
12777 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
12782 #: ../fish/guestfish-actions.pod:3589 ../src/guestfs-actions.pod:5568
12784 "If required, C<trans=virtio> will be automatically added to the options. "
12785 "Any other options required can be passed in the optional C<options> "
12790 #: ../fish/guestfish-actions.pod:3595
12795 #: ../fish/guestfish-actions.pod:3597
12798 " mount-loop file mountpoint\n"
12803 #: ../fish/guestfish-actions.pod:3599 ../src/guestfs-actions.pod:5607
12805 "This command lets you mount C<file> (a filesystem image in a file) on a "
12806 "mount point. It is entirely equivalent to the command C<mount -o loop file "
12811 #: ../fish/guestfish-actions.pod:3603
12812 msgid "mount-options"
12816 #: ../fish/guestfish-actions.pod:3605
12819 " mount-options options device mountpoint\n"
12824 #: ../fish/guestfish-actions.pod:3607
12826 "This is the same as the L</mount> command, but it allows you to set the "
12827 "mount options as for the L<mount(8)> I<-o> flag."
12831 #: ../fish/guestfish-actions.pod:3611 ../src/guestfs-actions.pod:5627
12833 "If the C<options> parameter is an empty string, then no options are passed "
12834 "(all options default to whatever the filesystem uses)."
12838 #: ../fish/guestfish-actions.pod:3615
12843 #: ../fish/guestfish-actions.pod:3617
12846 " mount-ro device mountpoint\n"
12851 #: ../fish/guestfish-actions.pod:3619
12853 "This is the same as the L</mount> command, but it mounts the filesystem with "
12854 "the read-only (I<-o ro>) flag."
12858 #: ../fish/guestfish-actions.pod:3622
12863 #: ../fish/guestfish-actions.pod:3624
12866 " mount-vfs options vfstype device mountpoint\n"
12871 #: ../fish/guestfish-actions.pod:3626
12873 "This is the same as the L</mount> command, but it allows you to set both the "
12874 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
12878 #: ../fish/guestfish-actions.pod:3630
12879 msgid "mountpoints"
12883 #: ../fish/guestfish-actions.pod:3632
12891 #: ../fish/guestfish-actions.pod:3634
12893 "This call is similar to L</mounts>. That call returns a list of devices. "
12894 "This one returns a hash table (map) of device name to directory where the "
12895 "device is mounted."
12899 #: ../fish/guestfish-actions.pod:3638
12904 #: ../fish/guestfish-actions.pod:3640
12912 #: ../fish/guestfish-actions.pod:3642 ../src/guestfs-actions.pod:5688
12914 "This returns the list of currently mounted filesystems. It returns the list "
12915 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
12919 #: ../fish/guestfish-actions.pod:3645 ../src/guestfs-actions.pod:5691
12920 msgid "Some internal mounts are not shown."
12924 #: ../fish/guestfish-actions.pod:3647
12925 msgid "See also: L</mountpoints>"
12929 #: ../fish/guestfish-actions.pod:3649
12934 #: ../fish/guestfish-actions.pod:3651
12942 #: ../fish/guestfish-actions.pod:3653 ../src/guestfs-actions.pod:5708
12944 "This moves a file from C<src> to C<dest> where C<dest> is either a "
12945 "destination filename or destination directory."
12949 #: ../fish/guestfish-actions.pod:3656
12950 msgid "ntfs-3g-probe"
12954 #: ../fish/guestfish-actions.pod:3658
12957 " ntfs-3g-probe true|false device\n"
12962 #: ../fish/guestfish-actions.pod:3660 ../src/guestfs-actions.pod:5722
12964 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
12965 "C<device> for mountability. (Not all NTFS volumes can be mounted "
12966 "read-write, and some cannot be mounted at all)."
12970 #: ../fish/guestfish-actions.pod:3664 ../src/guestfs-actions.pod:5726
12972 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
12973 "can be mounted read-write. Set it to false if you want to test if the "
12974 "volume can be mounted read-only."
12978 #: ../fish/guestfish-actions.pod:3668 ../src/guestfs-actions.pod:5730
12980 "The return value is an integer which C<0> if the operation would succeed, or "
12981 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
12985 #: ../fish/guestfish-actions.pod:3672
12990 #: ../fish/guestfish-actions.pod:3674
12993 " ntfsresize device\n"
12998 #: ../fish/guestfish-actions.pod:3676 ../fish/guestfish-actions.pod:3700 ../src/guestfs-actions.pod:5751 ../src/guestfs-actions.pod:5783
13000 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
13001 "size of the underlying device."
13005 #: ../fish/guestfish-actions.pod:3679 ../src/guestfs-actions.pod:5754
13007 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
13008 "consistency check (for safety). You have to boot into Windows to perform "
13009 "this check and clear this condition. Furthermore, ntfsresize refuses to "
13010 "resize filesystems which have been marked in this way. So in effect it is "
13011 "not possible to call ntfsresize multiple times on a single filesystem "
13012 "without booting into Windows between each resize."
13016 #: ../fish/guestfish-actions.pod:3687 ../fish/guestfish-actions.pod:3726 ../src/guestfs-actions.pod:5762 ../src/guestfs-actions.pod:5809
13017 msgid "See also L<ntfsresize(8)>."
13021 #: ../fish/guestfish-actions.pod:3689 ../fish/guestfish-actions.pod:3737
13023 "I<This function is deprecated.> In new code, use the L</ntfsresize_opts> "
13028 #: ../fish/guestfish-actions.pod:3696
13029 msgid "ntfsresize-opts"
13033 #: ../fish/guestfish-actions.pod:3698
13036 " ntfsresize-opts device [size:N] [force:true|false]\n"
13041 #: ../fish/guestfish-actions.pod:3709 ../src/guestfs-actions.pod:5792
13043 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
13044 "resized to fit the container (eg. partition)."
13048 #: ../fish/guestfish-actions.pod:3712 ../fish/guestfish-actions.pod:5033 ../src/guestfs-actions.pod:5795 ../src/guestfs-actions.pod:7766
13053 #: ../fish/guestfish-actions.pod:3714 ../src/guestfs-actions.pod:5797
13055 "If this option is true, then force the resize of the filesystem even if the "
13056 "filesystem is marked as requiring a consistency check."
13060 #: ../fish/guestfish-actions.pod:3717
13062 "After the resize operation, the filesystem is always marked as requiring a "
13063 "consistency check (for safety). You have to boot into Windows to perform "
13064 "this check and clear this condition. If you I<don't> set the C<force> "
13065 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
13066 "a single filesystem without booting into Windows between each resize."
13070 #: ../fish/guestfish-actions.pod:3730
13071 msgid "ntfsresize-size"
13075 #: ../fish/guestfish-actions.pod:3732
13078 " ntfsresize-size device size\n"
13083 #: ../fish/guestfish-actions.pod:3734
13085 "This command is the same as L</ntfsresize> except that it allows you to "
13086 "specify the new size (in bytes) explicitly."
13090 #: ../fish/guestfish-actions.pod:3744
13095 #: ../fish/guestfish-actions.pod:3746
13098 " part-add device prlogex startsect endsect\n"
13103 #: ../fish/guestfish-actions.pod:3748
13105 "This command adds a partition to C<device>. If there is no partition table "
13106 "on the device, call L</part-init> first."
13110 #: ../fish/guestfish-actions.pod:3751 ../src/guestfs-actions.pod:5870
13112 "The C<prlogex> parameter is the type of partition. Normally you should pass "
13113 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
13114 "C<logical>) and C<e> (or C<extended>) partition types."
13118 #: ../fish/guestfish-actions.pod:3756 ../src/guestfs-actions.pod:5875
13120 "C<startsect> and C<endsect> are the start and end of the partition in "
13121 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
13122 "from the end of the disk (C<-1> is the last sector)."
13126 #: ../fish/guestfish-actions.pod:3760
13128 "Creating a partition which covers the whole disk is not so easy. Use "
13129 "L</part-disk> to do that."
13133 #: ../fish/guestfish-actions.pod:3763
13138 #: ../fish/guestfish-actions.pod:3765
13141 " part-del device partnum\n"
13146 #: ../fish/guestfish-actions.pod:3767 ../src/guestfs-actions.pod:5893
13147 msgid "This command deletes the partition numbered C<partnum> on C<device>."
13151 #: ../fish/guestfish-actions.pod:3769 ../src/guestfs-actions.pod:5895
13153 "Note that in the case of MBR partitioning, deleting an extended partition "
13154 "also deletes any logical partitions it contains."
13158 #: ../fish/guestfish-actions.pod:3773
13163 #: ../fish/guestfish-actions.pod:3775
13166 " part-disk device parttype\n"
13171 #: ../fish/guestfish-actions.pod:3777
13173 "This command is simply a combination of L</part-init> followed by "
13174 "L</part-add> to create a single primary partition covering the whole disk."
13178 #: ../fish/guestfish-actions.pod:3781
13180 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
13181 "possible values are described in L</part-init>."
13185 #: ../fish/guestfish-actions.pod:3784
13186 msgid "part-get-bootable"
13190 #: ../fish/guestfish-actions.pod:3786
13193 " part-get-bootable device partnum\n"
13198 #: ../fish/guestfish-actions.pod:3788 ../src/guestfs-actions.pod:5928
13200 "This command returns true if the partition C<partnum> on C<device> has the "
13201 "bootable flag set."
13205 #: ../fish/guestfish-actions.pod:3791
13206 msgid "See also L</part-set-bootable>."
13210 #: ../fish/guestfish-actions.pod:3793
13211 msgid "part-get-mbr-id"
13215 #: ../fish/guestfish-actions.pod:3795
13218 " part-get-mbr-id device partnum\n"
13223 #: ../fish/guestfish-actions.pod:3797 ../src/guestfs-actions.pod:5944
13225 "Returns the MBR type byte (also known as the ID byte) from the numbered "
13226 "partition C<partnum>."
13230 #: ../fish/guestfish-actions.pod:3800 ../fish/guestfish-actions.pod:3944
13232 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
13233 "undefined results for other partition table types (see "
13234 "L</part-get-parttype>)."
13238 #: ../fish/guestfish-actions.pod:3804
13239 msgid "part-get-parttype"
13243 #: ../fish/guestfish-actions.pod:3806
13246 " part-get-parttype device\n"
13251 #: ../fish/guestfish-actions.pod:3808 ../src/guestfs-actions.pod:5961
13253 "This command examines the partition table on C<device> and returns the "
13254 "partition table type (format) being used."
13258 #: ../fish/guestfish-actions.pod:3811
13260 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
13261 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
13262 "possible, although unusual. See L</part-init> for a full list."
13266 #: ../fish/guestfish-actions.pod:3816
13271 #: ../fish/guestfish-actions.pod:3818
13274 " part-init device parttype\n"
13279 #: ../fish/guestfish-actions.pod:3820 ../src/guestfs-actions.pod:5981
13281 "This creates an empty partition table on C<device> of one of the partition "
13282 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
13283 "(for large disks)."
13287 #: ../fish/guestfish-actions.pod:3824
13289 "Initially there are no partitions. Following this, you should call "
13290 "L</part-add> for each partition required."
13294 #: ../fish/guestfish-actions.pod:3827 ../src/guestfs-actions.pod:5988
13295 msgid "Possible values for C<parttype> are:"
13299 #: ../fish/guestfish-actions.pod:3831 ../src/guestfs-actions.pod:5992
13304 #: ../fish/guestfish-actions.pod:3833 ../src/guestfs-actions.pod:5994
13309 #: ../fish/guestfish-actions.pod:3835 ../src/guestfs-actions.pod:5996
13310 msgid "Intel EFI / GPT partition table."
13314 #: ../fish/guestfish-actions.pod:3837 ../src/guestfs-actions.pod:5998
13316 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
13317 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
13318 "the C<mbr> format."
13322 #: ../fish/guestfish-actions.pod:3841 ../src/guestfs-actions.pod:6002
13327 #: ../fish/guestfish-actions.pod:3843 ../src/guestfs-actions.pod:6004
13332 #: ../fish/guestfish-actions.pod:3845 ../src/guestfs-actions.pod:6006
13334 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
13335 "Windows. This partition type will B<only> work for device sizes up to 2 "
13336 "TB. For large disks we recommend using C<gpt>."
13340 #: ../fish/guestfish-actions.pod:3852 ../src/guestfs-actions.pod:6013
13341 msgid "Other partition table types that may work but are not supported include:"
13345 #: ../fish/guestfish-actions.pod:3857 ../src/guestfs-actions.pod:6018
13350 #: ../fish/guestfish-actions.pod:3859 ../src/guestfs-actions.pod:6020
13351 msgid "AIX disk labels."
13355 #: ../fish/guestfish-actions.pod:3861 ../src/guestfs-actions.pod:6022
13360 #: ../fish/guestfish-actions.pod:3863 ../src/guestfs-actions.pod:6024
13365 #: ../fish/guestfish-actions.pod:3865 ../src/guestfs-actions.pod:6026
13366 msgid "Amiga \"Rigid Disk Block\" format."
13370 #: ../fish/guestfish-actions.pod:3867 ../src/guestfs-actions.pod:6028
13375 #: ../fish/guestfish-actions.pod:3869 ../src/guestfs-actions.pod:6030
13376 msgid "BSD disk labels."
13380 #: ../fish/guestfish-actions.pod:3871 ../src/guestfs-actions.pod:6032
13385 #: ../fish/guestfish-actions.pod:3873 ../src/guestfs-actions.pod:6034
13386 msgid "DASD, used on IBM mainframes."
13390 #: ../fish/guestfish-actions.pod:3875 ../src/guestfs-actions.pod:6036
13395 #: ../fish/guestfish-actions.pod:3877 ../src/guestfs-actions.pod:6038
13396 msgid "MIPS/SGI volumes."
13400 #: ../fish/guestfish-actions.pod:3879 ../src/guestfs-actions.pod:6040
13405 #: ../fish/guestfish-actions.pod:3881 ../src/guestfs-actions.pod:6042
13406 msgid "Old Mac partition format. Modern Macs use C<gpt>."
13410 #: ../fish/guestfish-actions.pod:3883 ../src/guestfs-actions.pod:6044
13415 #: ../fish/guestfish-actions.pod:3885 ../src/guestfs-actions.pod:6046
13416 msgid "NEC PC-98 format, common in Japan apparently."
13420 #: ../fish/guestfish-actions.pod:3887 ../src/guestfs-actions.pod:6048
13425 #: ../fish/guestfish-actions.pod:3889 ../src/guestfs-actions.pod:6050
13426 msgid "Sun disk labels."
13430 #: ../fish/guestfish-actions.pod:3893
13435 #: ../fish/guestfish-actions.pod:3895
13438 " part-list device\n"
13443 #: ../fish/guestfish-actions.pod:3897 ../src/guestfs-actions.pod:6064
13445 "This command parses the partition table on C<device> and returns the list of "
13446 "partitions found."
13450 #: ../fish/guestfish-actions.pod:3900 ../src/guestfs-actions.pod:6067
13451 msgid "The fields in the returned structure are:"
13455 #: ../fish/guestfish-actions.pod:3904 ../src/guestfs-actions.pod:6071
13456 msgid "B<part_num>"
13460 #: ../fish/guestfish-actions.pod:3906 ../src/guestfs-actions.pod:6073
13461 msgid "Partition number, counting from 1."
13465 #: ../fish/guestfish-actions.pod:3908 ../src/guestfs-actions.pod:6075
13466 msgid "B<part_start>"
13470 #: ../fish/guestfish-actions.pod:3910
13472 "Start of the partition I<in bytes>. To get sectors you have to divide by "
13473 "the device's sector size, see L</blockdev-getss>."
13477 #: ../fish/guestfish-actions.pod:3913 ../src/guestfs-actions.pod:6080
13478 msgid "B<part_end>"
13482 #: ../fish/guestfish-actions.pod:3915 ../src/guestfs-actions.pod:6082
13483 msgid "End of the partition in bytes."
13487 #: ../fish/guestfish-actions.pod:3917 ../src/guestfs-actions.pod:6084
13488 msgid "B<part_size>"
13492 #: ../fish/guestfish-actions.pod:3919 ../src/guestfs-actions.pod:6086
13493 msgid "Size of the partition in bytes."
13497 #: ../fish/guestfish-actions.pod:3923
13498 msgid "part-set-bootable"
13502 #: ../fish/guestfish-actions.pod:3925
13505 " part-set-bootable device partnum true|false\n"
13510 #: ../fish/guestfish-actions.pod:3927 ../src/guestfs-actions.pod:6104
13512 "This sets the bootable flag on partition numbered C<partnum> on device "
13513 "C<device>. Note that partitions are numbered from 1."
13517 #: ../fish/guestfish-actions.pod:3930 ../src/guestfs-actions.pod:6107
13519 "The bootable flag is used by some operating systems (notably Windows) to "
13520 "determine which partition to boot from. It is by no means universally "
13525 #: ../fish/guestfish-actions.pod:3934
13526 msgid "part-set-mbr-id"
13530 #: ../fish/guestfish-actions.pod:3936
13533 " part-set-mbr-id device partnum idbyte\n"
13538 #: ../fish/guestfish-actions.pod:3938 ../src/guestfs-actions.pod:6123
13540 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
13541 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
13542 "documentation are in fact hexadecimal numbers, but usually documented "
13543 "without any leading \"0x\" which might be confusing."
13547 #: ../fish/guestfish-actions.pod:3948
13548 msgid "part-set-name"
13552 #: ../fish/guestfish-actions.pod:3950
13555 " part-set-name device partnum name\n"
13560 #: ../fish/guestfish-actions.pod:3952 ../src/guestfs-actions.pod:6145
13562 "This sets the partition name on partition numbered C<partnum> on device "
13563 "C<device>. Note that partitions are numbered from 1."
13567 #: ../fish/guestfish-actions.pod:3955 ../src/guestfs-actions.pod:6148
13569 "The partition name can only be set on certain types of partition table. "
13570 "This works on C<gpt> but not on C<mbr> partitions."
13574 #: ../fish/guestfish-actions.pod:3958
13575 msgid "part-to-dev"
13579 #: ../fish/guestfish-actions.pod:3960
13582 " part-to-dev partition\n"
13587 #: ../fish/guestfish-actions.pod:3962 ../src/guestfs-actions.pod:6161
13589 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
13590 "partition number, returning the device name (eg. \"/dev/sdb\")."
13594 #: ../fish/guestfish-actions.pod:3966 ../fish/guestfish-actions.pod:3978
13596 "The named partition must exist, for example as a string returned from "
13597 "L</list-partitions>."
13601 #: ../fish/guestfish-actions.pod:3969
13602 msgid "See also L</part-to-partnum>."
13606 #: ../fish/guestfish-actions.pod:3971
13607 msgid "part-to-partnum"
13611 #: ../fish/guestfish-actions.pod:3973
13614 " part-to-partnum partition\n"
13619 #: ../fish/guestfish-actions.pod:3975 ../src/guestfs-actions.pod:6181
13621 "This function takes a partition name (eg. \"/dev/sdb1\") and returns the "
13622 "partition number (eg. C<1>)."
13626 #: ../fish/guestfish-actions.pod:3981
13627 msgid "See also L</part-to-dev>."
13631 #: ../fish/guestfish-actions.pod:3983
13632 msgid "ping-daemon"
13636 #: ../fish/guestfish-actions.pod:3985
13644 #: ../fish/guestfish-actions.pod:3987 ../src/guestfs-actions.pod:6198
13646 "This is a test probe into the guestfs daemon running inside the qemu "
13647 "subprocess. Calling this function checks that the daemon responds to the "
13648 "ping message, without affecting the daemon or attached block device(s) in "
13653 #: ../fish/guestfish-actions.pod:3992
13658 #: ../fish/guestfish-actions.pod:3994
13661 " pread path count offset\n"
13666 #: ../fish/guestfish-actions.pod:3996 ../src/guestfs-actions.pod:6216
13668 "This command lets you read part of a file. It reads C<count> bytes of the "
13669 "file, starting at C<offset>, from file C<path>."
13673 #: ../fish/guestfish-actions.pod:3999 ../fish/guestfish-actions.pod:4014 ../src/guestfs-actions.pod:6219 ../src/guestfs-actions.pod:6245
13675 "This may read fewer bytes than requested. For further details see the "
13676 "L<pread(2)> system call."
13680 #: ../fish/guestfish-actions.pod:4002
13681 msgid "See also L</pwrite>, L</pread-device>."
13685 #: ../fish/guestfish-actions.pod:4007
13686 msgid "pread-device"
13690 #: ../fish/guestfish-actions.pod:4009
13693 " pread-device device count offset\n"
13698 #: ../fish/guestfish-actions.pod:4011 ../src/guestfs-actions.pod:6242
13700 "This command lets you read part of a file. It reads C<count> bytes of "
13701 "C<device>, starting at C<offset>."
13705 #: ../fish/guestfish-actions.pod:4017
13706 msgid "See also L</pread>."
13710 #: ../fish/guestfish-actions.pod:4022
13715 #: ../fish/guestfish-actions.pod:4024
13718 " pvcreate device\n"
13723 #: ../fish/guestfish-actions.pod:4026 ../src/guestfs-actions.pod:6265
13725 "This creates an LVM physical volume on the named C<device>, where C<device> "
13726 "should usually be a partition name such as C</dev/sda1>."
13730 #: ../fish/guestfish-actions.pod:4030
13735 #: ../fish/guestfish-actions.pod:4032
13738 " pvremove device\n"
13743 #: ../fish/guestfish-actions.pod:4034 ../src/guestfs-actions.pod:6279
13745 "This wipes a physical volume C<device> so that LVM will no longer recognise "
13750 #: ../fish/guestfish-actions.pod:4037 ../src/guestfs-actions.pod:6282
13752 "The implementation uses the C<pvremove> command which refuses to wipe "
13753 "physical volumes that contain any volume groups, so you have to remove those "
13758 #: ../fish/guestfish-actions.pod:4041
13763 #: ../fish/guestfish-actions.pod:4043
13766 " pvresize device\n"
13771 #: ../fish/guestfish-actions.pod:4045 ../src/guestfs-actions.pod:6296
13773 "This resizes (expands or shrinks) an existing LVM physical volume to match "
13774 "the new size of the underlying device."
13778 #: ../fish/guestfish-actions.pod:4048
13779 msgid "pvresize-size"
13783 #: ../fish/guestfish-actions.pod:4050
13786 " pvresize-size device size\n"
13791 #: ../fish/guestfish-actions.pod:4052
13793 "This command is the same as L</pvresize> except that it allows you to "
13794 "specify the new size (in bytes) explicitly."
13798 #: ../fish/guestfish-actions.pod:4055
13803 #: ../fish/guestfish-actions.pod:4057
13811 #: ../fish/guestfish-actions.pod:4059 ../src/guestfs-actions.pod:6322
13813 "List all the physical volumes detected. This is the equivalent of the "
13814 "L<pvs(8)> command."
13818 #: ../fish/guestfish-actions.pod:4062 ../src/guestfs-actions.pod:6325
13820 "This returns a list of just the device names that contain PVs "
13821 "(eg. C</dev/sda2>)."
13825 #: ../fish/guestfish-actions.pod:4065
13826 msgid "See also L</pvs-full>."
13830 #: ../fish/guestfish-actions.pod:4067
13835 #: ../fish/guestfish-actions.pod:4069
13843 #: ../fish/guestfish-actions.pod:4071 ../src/guestfs-actions.pod:6341
13845 "List all the physical volumes detected. This is the equivalent of the "
13846 "L<pvs(8)> command. The \"full\" version includes all fields."
13850 #: ../fish/guestfish-actions.pod:4074
13855 #: ../fish/guestfish-actions.pod:4076
13863 #: ../fish/guestfish-actions.pod:4078 ../src/guestfs-actions.pod:6356
13864 msgid "This command returns the UUID of the LVM PV C<device>."
13868 #: ../fish/guestfish-actions.pod:4080
13873 #: ../fish/guestfish-actions.pod:4082
13876 " pwrite path content offset\n"
13881 #: ../fish/guestfish-actions.pod:4084 ../src/guestfs-actions.pod:6372
13883 "This command writes to part of a file. It writes the data buffer C<content> "
13884 "to the file C<path> starting at offset C<offset>."
13888 #: ../fish/guestfish-actions.pod:4087 ../src/guestfs-actions.pod:6375
13890 "This command implements the L<pwrite(2)> system call, and like that system "
13891 "call it may not write the full data requested. The return value is the "
13892 "number of bytes that were actually written to the file. This could even be "
13893 "0, although short writes are unlikely for regular files in ordinary "
13898 #: ../fish/guestfish-actions.pod:4093
13899 msgid "See also L</pread>, L</pwrite-device>."
13903 #: ../fish/guestfish-actions.pod:4098
13904 msgid "pwrite-device"
13908 #: ../fish/guestfish-actions.pod:4100
13911 " pwrite-device device content offset\n"
13916 #: ../fish/guestfish-actions.pod:4102 ../src/guestfs-actions.pod:6399
13918 "This command writes to part of a device. It writes the data buffer "
13919 "C<content> to C<device> starting at offset C<offset>."
13923 #: ../fish/guestfish-actions.pod:4105 ../src/guestfs-actions.pod:6402
13925 "This command implements the L<pwrite(2)> system call, and like that system "
13926 "call it may not write the full data requested (although short writes to disk "
13927 "devices and partitions are probably impossible with standard Linux kernels)."
13931 #: ../fish/guestfish-actions.pod:4110
13932 msgid "See also L</pwrite>."
13936 #: ../fish/guestfish-actions.pod:4115
13941 #: ../fish/guestfish-actions.pod:4117
13944 " read-file path\n"
13949 #: ../fish/guestfish-actions.pod:4119 ../src/guestfs-actions.pod:6423
13950 msgid "This calls returns the contents of the file C<path> as a buffer."
13954 #: ../fish/guestfish-actions.pod:4122
13956 "Unlike L</cat>, this function can correctly handle files that contain "
13957 "embedded ASCII NUL characters. However unlike L</download>, this function "
13958 "is limited in the total size of file that can be handled."
13962 #: ../fish/guestfish-actions.pod:4130
13967 #: ../fish/guestfish-actions.pod:4132
13970 " read-lines path\n"
13975 #: ../fish/guestfish-actions.pod:4136 ../src/guestfs-actions.pod:6448
13977 "The file contents are returned as a list of lines. Trailing C<LF> and "
13978 "C<CRLF> character sequences are I<not> returned."
13982 #: ../fish/guestfish-actions.pod:4139
13984 "Note that this function cannot correctly handle binary files (specifically, "
13985 "files containing C<\\0> character which is treated as end of line). For "
13986 "those you need to use the L</read-file> function which has a more complex "
13991 #: ../fish/guestfish-actions.pod:4144
13996 #: ../fish/guestfish-actions.pod:4146
14004 #: ../fish/guestfish-actions.pod:4148 ../src/guestfs-actions.pod:6468
14005 msgid "This returns the list of directory entries in directory C<dir>."
14009 #: ../fish/guestfish-actions.pod:4150 ../src/guestfs-actions.pod:6470
14011 "All entries in the directory are returned, including C<.> and C<..>. The "
14012 "entries are I<not> sorted, but returned in the same order as the underlying "
14017 #: ../fish/guestfish-actions.pod:4154 ../src/guestfs-actions.pod:6474
14019 "Also this call returns basic file type information about each file. The "
14020 "C<ftyp> field will contain one of the following characters:"
14024 #: ../fish/guestfish-actions.pod:4159 ../src/guestfs-actions.pod:6479
14029 #: ../fish/guestfish-actions.pod:4161 ../src/guestfs-actions.pod:6481
14030 msgid "Block special"
14034 #: ../fish/guestfish-actions.pod:4163 ../src/guestfs-actions.pod:6483
14039 #: ../fish/guestfish-actions.pod:4165 ../src/guestfs-actions.pod:6485
14040 msgid "Char special"
14044 #: ../fish/guestfish-actions.pod:4167 ../src/guestfs-actions.pod:6487
14049 #: ../fish/guestfish-actions.pod:4169 ../src/guestfs-actions.pod:6489
14054 #: ../fish/guestfish-actions.pod:4171 ../src/guestfs-actions.pod:6491
14059 #: ../fish/guestfish-actions.pod:4173 ../src/guestfs-actions.pod:6493
14060 msgid "FIFO (named pipe)"
14064 #: ../fish/guestfish-actions.pod:4175 ../src/guestfs-actions.pod:6495
14069 #: ../fish/guestfish-actions.pod:4177 ../src/guestfs-actions.pod:6497
14070 msgid "Symbolic link"
14074 #: ../fish/guestfish-actions.pod:4179 ../src/guestfs-actions.pod:6499
14079 #: ../fish/guestfish-actions.pod:4181 ../src/guestfs-actions.pod:6501
14080 msgid "Regular file"
14084 #: ../fish/guestfish-actions.pod:4183 ../src/guestfs-actions.pod:6503
14089 #: ../fish/guestfish-actions.pod:4185 ../src/guestfs-actions.pod:6505
14094 #: ../fish/guestfish-actions.pod:4187 ../src/guestfs-actions.pod:6507
14099 #: ../fish/guestfish-actions.pod:4189 ../src/guestfs-actions.pod:6509
14100 msgid "Unknown file type"
14104 #: ../fish/guestfish-actions.pod:4191 ../src/guestfs-actions.pod:6511
14109 #: ../fish/guestfish-actions.pod:4193 ../src/guestfs-actions.pod:6513
14110 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
14114 #: ../fish/guestfish-actions.pod:4198
14116 "This function is primarily intended for use by programs. To get a simple "
14117 "list of names, use L</ls>. To get a printable directory for human "
14118 "consumption, use L</ll>."
14122 #: ../fish/guestfish-actions.pod:4202
14127 #: ../fish/guestfish-actions.pod:4204
14135 #: ../fish/guestfish-actions.pod:4206 ../src/guestfs-actions.pod:6534
14136 msgid "This command reads the target of a symbolic link."
14140 #: ../fish/guestfish-actions.pod:4208
14141 msgid "readlinklist"
14145 #: ../fish/guestfish-actions.pod:4210
14148 " readlinklist path 'names ...'\n"
14153 #: ../fish/guestfish-actions.pod:4212 ../src/guestfs-actions.pod:6548
14155 "This call allows you to do a C<readlink> operation on multiple files, where "
14156 "all files are in the directory C<path>. C<names> is the list of files from "
14161 #: ../fish/guestfish-actions.pod:4216 ../src/guestfs-actions.pod:6552
14163 "On return you get a list of strings, with a one-to-one correspondence to the "
14164 "C<names> list. Each string is the value of the symbolic link."
14168 #: ../fish/guestfish-actions.pod:4220 ../src/guestfs-actions.pod:6556
14170 "If the C<readlink(2)> operation fails on any name, then the corresponding "
14171 "result string is the empty string C<\"\">. However the whole operation is "
14172 "completed even if there were C<readlink(2)> errors, and so you can call this "
14173 "function with names where you don't know if they are symbolic links already "
14174 "(albeit slightly less efficient)."
14178 #: ../fish/guestfish-actions.pod:4227 ../src/guestfs-actions.pod:6563
14180 "This call is intended for programs that want to efficiently list a directory "
14181 "contents without making many round-trips. Very long directory listings "
14182 "might cause the protocol message size to be exceeded, causing this call to "
14183 "fail. The caller must split up such requests into smaller groups of names."
14187 #: ../fish/guestfish-actions.pod:4234
14192 #: ../fish/guestfish-actions.pod:4236
14200 #: ../fish/guestfish-actions.pod:4238 ../src/guestfs-actions.pod:6582
14202 "Return the canonicalized absolute pathname of C<path>. The returned path "
14203 "has no C<.>, C<..> or symbolic link path elements."
14207 #: ../fish/guestfish-actions.pod:4241
14208 msgid "removexattr"
14212 #: ../fish/guestfish-actions.pod:4243
14215 " removexattr xattr path\n"
14220 #: ../fish/guestfish-actions.pod:4245 ../src/guestfs-actions.pod:6597
14221 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
14225 #: ../fish/guestfish-actions.pod:4248
14226 msgid "See also: L</lremovexattr>, L<attr(5)>."
14230 #: ../fish/guestfish-actions.pod:4250
14235 #: ../fish/guestfish-actions.pod:4252
14238 " resize2fs device\n"
14243 #: ../fish/guestfish-actions.pod:4254 ../src/guestfs-actions.pod:6612
14245 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
14246 "underlying device."
14250 #: ../fish/guestfish-actions.pod:4257
14252 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
14253 "before calling this command. For unknown reasons C<resize2fs> sometimes "
14254 "gives an error about this and sometimes not. In any case, it is always safe "
14255 "to call L</e2fsck-f> before calling this function."
14259 #: ../fish/guestfish-actions.pod:4263
14260 msgid "resize2fs-M"
14264 #: ../fish/guestfish-actions.pod:4265
14267 " resize2fs-M device\n"
14272 #: ../fish/guestfish-actions.pod:4267
14274 "This command is the same as L</resize2fs>, but the filesystem is resized to "
14275 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
14280 #: ../fish/guestfish-actions.pod:4271
14282 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
14283 "and read the C<Block size> and C<Block count> values. These two numbers, "
14284 "multiplied together, give the resulting size of the minimal filesystem in "
14289 #: ../fish/guestfish-actions.pod:4276
14290 msgid "resize2fs-size"
14294 #: ../fish/guestfish-actions.pod:4278
14297 " resize2fs-size device size\n"
14302 #: ../fish/guestfish-actions.pod:4280
14304 "This command is the same as L</resize2fs> except that it allows you to "
14305 "specify the new size (in bytes) explicitly."
14309 #: ../fish/guestfish-actions.pod:4283
14314 #: ../fish/guestfish-actions.pod:4285
14322 #: ../fish/guestfish-actions.pod:4287 ../src/guestfs-actions.pod:6664
14323 msgid "Remove the single file C<path>."
14327 #: ../fish/guestfish-actions.pod:4289
14332 #: ../fish/guestfish-actions.pod:4291
14340 #: ../fish/guestfish-actions.pod:4293 ../src/guestfs-actions.pod:6676
14342 "Remove the file or directory C<path>, recursively removing the contents if "
14343 "its a directory. This is like the C<rm -rf> shell command."
14347 #: ../fish/guestfish-actions.pod:4297
14352 #: ../fish/guestfish-actions.pod:4299
14360 #: ../fish/guestfish-actions.pod:4301 ../src/guestfs-actions.pod:6690
14361 msgid "Remove the single directory C<path>."
14365 #: ../fish/guestfish-actions.pod:4303
14366 msgid "rmmountpoint"
14370 #: ../fish/guestfish-actions.pod:4305
14373 " rmmountpoint exemptpath\n"
14378 #: ../fish/guestfish-actions.pod:4307
14380 "This calls removes a mountpoint that was previously created with "
14381 "L</mkmountpoint>. See L</mkmountpoint> for full details."
14385 #: ../fish/guestfish-actions.pod:4311
14386 msgid "scrub-device"
14390 #: ../fish/guestfish-actions.pod:4313
14393 " scrub-device device\n"
14398 #: ../fish/guestfish-actions.pod:4315 ../src/guestfs-actions.pod:6716
14400 "This command writes patterns over C<device> to make data retrieval more "
14405 #: ../fish/guestfish-actions.pod:4318 ../fish/guestfish-actions.pod:4330 ../fish/guestfish-actions.pod:4343 ../src/guestfs-actions.pod:6719 ../src/guestfs-actions.pod:6737 ../src/guestfs-actions.pod:6756
14407 "It is an interface to the L<scrub(1)> program. See that manual page for "
14412 #: ../fish/guestfish-actions.pod:4321
14417 #: ../fish/guestfish-actions.pod:4323
14420 " scrub-file file\n"
14425 #: ../fish/guestfish-actions.pod:4325 ../src/guestfs-actions.pod:6732
14427 "This command writes patterns over a file to make data retrieval more "
14432 #: ../fish/guestfish-actions.pod:4328 ../src/guestfs-actions.pod:6735
14433 msgid "The file is I<removed> after scrubbing."
14437 #: ../fish/guestfish-actions.pod:4333
14438 msgid "scrub-freespace"
14442 #: ../fish/guestfish-actions.pod:4335
14445 " scrub-freespace dir\n"
14450 #: ../fish/guestfish-actions.pod:4337
14452 "This command creates the directory C<dir> and then fills it with files until "
14453 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
14454 "deletes them. The intention is to scrub any free space on the partition "
14455 "containing C<dir>."
14459 #: ../fish/guestfish-actions.pod:4346
14464 #: ../fish/guestfish-actions.pod:4348
14469 #: ../fish/guestfish-actions.pod:4350
14472 " set-append append\n"
14477 #: ../fish/guestfish-actions.pod:4352 ../src/guestfs-actions.pod:6769
14479 "This function is used to add additional options to the guest kernel command "
14484 #: ../fish/guestfish-actions.pod:4355 ../src/guestfs-actions.pod:6772
14486 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
14487 "environment variable."
14491 #: ../fish/guestfish-actions.pod:4358 ../src/guestfs-actions.pod:6775
14493 "Setting C<append> to C<NULL> means I<no> additional options are passed "
14494 "(libguestfs always adds a few of its own)."
14498 #: ../fish/guestfish-actions.pod:4361
14499 msgid "set-attach-method"
14503 #: ../fish/guestfish-actions.pod:4363
14504 msgid "attach-method"
14508 #: ../fish/guestfish-actions.pod:4365
14511 " set-attach-method attachmethod\n"
14516 #: ../fish/guestfish-actions.pod:4367 ../src/guestfs-actions.pod:6788
14518 "Set the method that libguestfs uses to connect to the back end guestfsd "
14519 "daemon. Possible methods are:"
14523 #: ../fish/guestfish-actions.pod:4372 ../src/guestfs-actions.pod:6793 ../src/guestfs.pod:2916
14524 msgid "C<appliance>"
14528 #: ../fish/guestfish-actions.pod:4374 ../src/guestfs-actions.pod:6795
14530 "Launch an appliance and connect to it. This is the ordinary method and the "
14535 #: ../fish/guestfish-actions.pod:4377 ../src/guestfs-actions.pod:6798
14536 msgid "C<unix:I<path>>"
14540 #: ../fish/guestfish-actions.pod:4379 ../src/guestfs-actions.pod:6800
14541 msgid "Connect to the Unix domain socket I<path>."
14545 #: ../fish/guestfish-actions.pod:4381 ../src/guestfs-actions.pod:6802
14547 "This method lets you connect to an existing daemon or (using virtio-serial) "
14548 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
14549 "RUNNING DAEMONS>."
14553 #: ../fish/guestfish-actions.pod:4387
14554 msgid "set-autosync"
14558 #: ../fish/guestfish-actions.pod:4389
14563 #: ../fish/guestfish-actions.pod:4391
14566 " set-autosync true|false\n"
14571 #: ../fish/guestfish-actions.pod:4393 ../src/guestfs-actions.pod:6818
14573 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
14574 "effort attempt to make filesystems consistent and synchronized when the "
14575 "handle is closed (also if the program exits without closing handles)."
14579 #: ../fish/guestfish-actions.pod:4398 ../src/guestfs-actions.pod:6823
14581 "This is enabled by default (since libguestfs 1.5.24, previously it was "
14582 "disabled by default)."
14586 #: ../fish/guestfish-actions.pod:4401
14591 #: ../fish/guestfish-actions.pod:4403
14596 #: ../fish/guestfish-actions.pod:4405
14599 " set-direct true|false\n"
14604 #: ../fish/guestfish-actions.pod:4407 ../src/guestfs-actions.pod:6836
14606 "If the direct appliance mode flag is enabled, then stdin and stdout are "
14607 "passed directly through to the appliance once it is launched."
14611 #: ../fish/guestfish-actions.pod:4411
14613 "One consequence of this is that log messages aren't caught by the library "
14614 "and handled by L</set-log-message-callback>, but go straight to stdout."
14618 #: ../fish/guestfish-actions.pod:4415 ../src/guestfs-actions.pod:6844
14619 msgid "You probably don't want to use this unless you know what you are doing."
14623 #: ../fish/guestfish-actions.pod:4418 ../src/guestfs-actions.pod:6847
14624 msgid "The default is disabled."
14628 #: ../fish/guestfish-actions.pod:4420
14629 msgid "set-e2label"
14633 #: ../fish/guestfish-actions.pod:4422
14636 " set-e2label device label\n"
14641 #: ../fish/guestfish-actions.pod:4424 ../src/guestfs-actions.pod:6860
14643 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
14644 "C<label>. Filesystem labels are limited to 16 characters."
14648 #: ../fish/guestfish-actions.pod:4428
14650 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
14651 "label on a filesystem."
14655 #: ../fish/guestfish-actions.pod:4431
14660 #: ../fish/guestfish-actions.pod:4433
14663 " set-e2uuid device uuid\n"
14668 #: ../fish/guestfish-actions.pod:4435 ../src/guestfs-actions.pod:6878
14670 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
14671 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
14672 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
14676 #: ../fish/guestfish-actions.pod:4440
14678 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
14679 "UUID of a filesystem."
14683 #: ../fish/guestfish-actions.pod:4443
14684 msgid "set-memsize"
14688 #: ../fish/guestfish-actions.pod:4445
14693 #: ../fish/guestfish-actions.pod:4447
14696 " set-memsize memsize\n"
14701 #: ../fish/guestfish-actions.pod:4449
14703 "This sets the memory size in megabytes allocated to the qemu subprocess. "
14704 "This only has any effect if called before L</launch>."
14708 #: ../fish/guestfish-actions.pod:4453 ../src/guestfs-actions.pod:6900
14710 "You can also change this by setting the environment variable "
14711 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
14715 #: ../fish/guestfish-actions.pod:4460
14716 msgid "set-network"
14720 #: ../fish/guestfish-actions.pod:4462
14725 #: ../fish/guestfish-actions.pod:4464
14728 " set-network true|false\n"
14733 #: ../fish/guestfish-actions.pod:4466 ../src/guestfs-actions.pod:6917
14735 "If C<network> is true, then the network is enabled in the libguestfs "
14736 "appliance. The default is false."
14740 #: ../fish/guestfish-actions.pod:4469 ../src/guestfs-actions.pod:6920
14742 "This affects whether commands are able to access the network (see "
14743 "L<guestfs(3)/RUNNING COMMANDS>)."
14747 #: ../fish/guestfish-actions.pod:4472
14748 msgid "You must call this before calling L</launch>, otherwise it has no effect."
14752 #: ../fish/guestfish-actions.pod:4475
14757 #: ../fish/guestfish-actions.pod:4479
14760 " set-path searchpath\n"
14765 #: ../fish/guestfish-actions.pod:4481 ../src/guestfs-actions.pod:6936
14766 msgid "Set the path that libguestfs searches for kernel and initrd.img."
14770 #: ../fish/guestfish-actions.pod:4483 ../src/guestfs-actions.pod:6938
14772 "The default is C<$libdir/guestfs> unless overridden by setting "
14773 "C<LIBGUESTFS_PATH> environment variable."
14777 #: ../fish/guestfish-actions.pod:4486 ../src/guestfs-actions.pod:6941
14778 msgid "Setting C<path> to C<NULL> restores the default path."
14782 #: ../fish/guestfish-actions.pod:4488
14787 #: ../fish/guestfish-actions.pod:4490
14792 #: ../fish/guestfish-actions.pod:4492
14795 " set-pgroup true|false\n"
14800 #: ../fish/guestfish-actions.pod:4494 ../src/guestfs-actions.pod:6953
14802 "If C<pgroup> is true, child processes are placed into their own process "
14807 #: ../fish/guestfish-actions.pod:4497 ../src/guestfs-actions.pod:6956
14809 "The practical upshot of this is that signals like C<SIGINT> (from users "
14810 "pressing C<^C>) won't be received by the child process."
14814 #: ../fish/guestfish-actions.pod:4500 ../src/guestfs-actions.pod:6959
14816 "The default for this flag is false, because usually you want C<^C> to kill "
14821 #: ../fish/guestfish-actions.pod:4503
14826 #: ../fish/guestfish-actions.pod:4505
14831 #: ../fish/guestfish-actions.pod:4507
14839 #: ../fish/guestfish-actions.pod:4509 ../src/guestfs-actions.pod:6972
14840 msgid "Set the qemu binary that we will use."
14844 #: ../fish/guestfish-actions.pod:4511 ../src/guestfs-actions.pod:6974
14845 msgid "The default is chosen when the library was compiled by the configure script."
14849 #: ../fish/guestfish-actions.pod:4514 ../src/guestfs-actions.pod:6977
14851 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
14856 #: ../fish/guestfish-actions.pod:4517 ../src/guestfs-actions.pod:6980
14857 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
14861 #: ../fish/guestfish-actions.pod:4519 ../src/guestfs-actions.pod:6982
14863 "Note that you should call this function as early as possible after creating "
14864 "the handle. This is because some pre-launch operations depend on testing "
14865 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
14866 "don't retest features, and so you might see inconsistent results. Using the "
14867 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
14868 "the qemu binary at the same time as the handle is created."
14872 #: ../fish/guestfish-actions.pod:4527
14873 msgid "set-recovery-proc"
14877 #: ../fish/guestfish-actions.pod:4529
14878 msgid "recovery-proc"
14882 #: ../fish/guestfish-actions.pod:4531
14885 " set-recovery-proc true|false\n"
14890 #: ../fish/guestfish-actions.pod:4533
14892 "If this is called with the parameter C<false> then L</launch> does not "
14893 "create a recovery process. The purpose of the recovery process is to stop "
14894 "runaway qemu processes in the case where the main program aborts abruptly."
14898 #: ../fish/guestfish-actions.pod:4538
14900 "This only has any effect if called before L</launch>, and the default is "
14905 #: ../fish/guestfish-actions.pod:4541 ../src/guestfs-actions.pod:7008
14907 "About the only time when you would want to disable this is if the main "
14908 "process will fork itself into the background (\"daemonize\" itself). In "
14909 "this case the recovery process thinks that the main program has disappeared "
14910 "and so kills qemu, which is not very helpful."
14914 #: ../fish/guestfish-actions.pod:4547
14915 msgid "set-selinux"
14919 #: ../fish/guestfish-actions.pod:4549
14924 #: ../fish/guestfish-actions.pod:4551
14927 " set-selinux true|false\n"
14932 #: ../fish/guestfish-actions.pod:4553 ../src/guestfs-actions.pod:7024
14934 "This sets the selinux flag that is passed to the appliance at boot time. "
14935 "The default is C<selinux=0> (disabled)."
14939 #: ../fish/guestfish-actions.pod:4556 ../src/guestfs-actions.pod:7027
14941 "Note that if SELinux is enabled, it is always in Permissive mode "
14942 "(C<enforcing=0>)."
14946 #: ../fish/guestfish-actions.pod:4562
14951 #: ../fish/guestfish-actions.pod:4564
14956 #: ../fish/guestfish-actions.pod:4566
14964 #: ../fish/guestfish-actions.pod:4568 ../src/guestfs-actions.pod:7043
14966 "Change the number of virtual CPUs assigned to the appliance. The default is "
14967 "C<1>. Increasing this may improve performance, though often it has no "
14972 #: ../fish/guestfish-actions.pod:4572
14973 msgid "This function must be called before L</launch>."
14977 #: ../fish/guestfish-actions.pod:4574
14982 #: ../fish/guestfish-actions.pod:4576
14987 #: ../fish/guestfish-actions.pod:4578
14990 " set-trace true|false\n"
14995 #: ../fish/guestfish-actions.pod:4580 ../src/guestfs-actions.pod:7059
14997 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
14998 "return values are traced."
15002 #: ../fish/guestfish-actions.pod:4583 ../src/guestfs-actions.pod:7062
15004 "If you want to trace C API calls into libguestfs (and other libraries) then "
15005 "possibly a better way is to use the external ltrace(1) command."
15009 #: ../fish/guestfish-actions.pod:4587 ../src/guestfs-actions.pod:7066
15011 "Command traces are disabled unless the environment variable "
15012 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
15016 #: ../fish/guestfish-actions.pod:4590
15018 "Trace messages are normally sent to C<stderr>, unless you register a "
15019 "callback to send them somewhere else (see L</set-event-callback>)."
15023 #: ../fish/guestfish-actions.pod:4594
15024 msgid "set-verbose"
15028 #: ../fish/guestfish-actions.pod:4596
15033 #: ../fish/guestfish-actions.pod:4598
15036 " set-verbose true|false\n"
15041 #: ../fish/guestfish-actions.pod:4600 ../src/guestfs-actions.pod:7083
15042 msgid "If C<verbose> is true, this turns on verbose messages."
15046 #: ../fish/guestfish-actions.pod:4602 ../src/guestfs-actions.pod:7085
15048 "Verbose messages are disabled unless the environment variable "
15049 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
15053 #: ../fish/guestfish-actions.pod:4605
15055 "Verbose messages are normally sent to C<stderr>, unless you register a "
15056 "callback to send them somewhere else (see L</set-event-callback>)."
15060 #: ../fish/guestfish-actions.pod:4609
15065 #: ../fish/guestfish-actions.pod:4611
15068 " setcon context\n"
15073 #: ../fish/guestfish-actions.pod:4613 ../src/guestfs-actions.pod:7102
15075 "This sets the SELinux security context of the daemon to the string "
15080 #: ../fish/guestfish-actions.pod:4616 ../src/guestfs-actions.pod:7105
15081 msgid "See the documentation about SELINUX in L<guestfs(3)>."
15085 #: ../fish/guestfish-actions.pod:4618
15090 #: ../fish/guestfish-actions.pod:4620
15093 " setxattr xattr val vallen path\n"
15098 #: ../fish/guestfish-actions.pod:4622 ../src/guestfs-actions.pod:7120
15100 "This call sets the extended attribute named C<xattr> of the file C<path> to "
15101 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
15105 #: ../fish/guestfish-actions.pod:4626
15106 msgid "See also: L</lsetxattr>, L<attr(5)>."
15110 #: ../fish/guestfish-actions.pod:4628
15115 #: ../fish/guestfish-actions.pod:4630
15118 " sfdisk device cyls heads sectors 'lines ...'\n"
15123 #: ../fish/guestfish-actions.pod:4632 ../src/guestfs-actions.pod:7147
15125 "This is a direct interface to the L<sfdisk(8)> program for creating "
15126 "partitions on block devices."
15130 #: ../fish/guestfish-actions.pod:4635 ../src/guestfs-actions.pod:7150
15131 msgid "C<device> should be a block device, for example C</dev/sda>."
15135 #: ../fish/guestfish-actions.pod:4637 ../src/guestfs-actions.pod:7152
15137 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
15138 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
15139 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
15140 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
15141 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
15142 "the kernel) cannot work out the right geometry and you will need to tell it."
15146 #: ../fish/guestfish-actions.pod:4645 ../src/guestfs-actions.pod:7160
15148 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
15149 "refer to the L<sfdisk(8)> manpage."
15153 #: ../fish/guestfish-actions.pod:4648 ../src/guestfs-actions.pod:7163
15155 "To create a single partition occupying the whole disk, you would pass "
15156 "C<lines> as a single element list, when the single element being the string "
15161 #: ../fish/guestfish-actions.pod:4652
15162 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
15166 #: ../fish/guestfish-actions.pod:4655 ../fish/guestfish-actions.pod:4675 ../fish/guestfish-actions.pod:4694
15168 "I<This function is deprecated.> In new code, use the L</part_add> call "
15173 #: ../fish/guestfish-actions.pod:4662
15178 #: ../fish/guestfish-actions.pod:4664
15181 " sfdiskM device 'lines ...'\n"
15186 #: ../fish/guestfish-actions.pod:4666
15188 "This is a simplified interface to the L</sfdisk> command, where partition "
15189 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
15190 "you don't need to specify the cyls, heads and sectors parameters which were "
15191 "rarely if ever used anyway."
15195 #: ../fish/guestfish-actions.pod:4672
15196 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
15200 #: ../fish/guestfish-actions.pod:4682
15205 #: ../fish/guestfish-actions.pod:4684
15208 " sfdisk-N device partnum cyls heads sectors line\n"
15213 #: ../fish/guestfish-actions.pod:4686 ../src/guestfs-actions.pod:7219
15215 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
15216 "(note: C<n> counts from 1)."
15220 #: ../fish/guestfish-actions.pod:4689
15222 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
15223 "cyls/heads/sectors parameters."
15227 #: ../fish/guestfish-actions.pod:4692
15228 msgid "See also: L</part-add>"
15232 #: ../fish/guestfish-actions.pod:4701
15233 msgid "sfdisk-disk-geometry"
15237 #: ../fish/guestfish-actions.pod:4703
15240 " sfdisk-disk-geometry device\n"
15245 #: ../fish/guestfish-actions.pod:4705
15247 "This displays the disk geometry of C<device> read from the partition table. "
15248 "Especially in the case where the underlying block device has been resized, "
15249 "this can be different from the kernel's idea of the geometry (see "
15250 "L</sfdisk-kernel-geometry>)."
15254 #: ../fish/guestfish-actions.pod:4710 ../fish/guestfish-actions.pod:4719 ../src/guestfs-actions.pod:7242 ../src/guestfs-actions.pod:7258
15255 msgid "The result is in human-readable format, and not designed to be parsed."
15259 #: ../fish/guestfish-actions.pod:4713
15260 msgid "sfdisk-kernel-geometry"
15264 #: ../fish/guestfish-actions.pod:4715
15267 " sfdisk-kernel-geometry device\n"
15272 #: ../fish/guestfish-actions.pod:4717 ../src/guestfs-actions.pod:7256
15273 msgid "This displays the kernel's idea of the geometry of C<device>."
15277 #: ../fish/guestfish-actions.pod:4722
15282 #: ../fish/guestfish-actions.pod:4724
15285 " sfdisk-l device\n"
15290 #: ../fish/guestfish-actions.pod:4726 ../src/guestfs-actions.pod:7279
15292 "This displays the partition table on C<device>, in the human-readable output "
15293 "of the L<sfdisk(8)> command. It is not intended to be parsed."
15297 #: ../fish/guestfish-actions.pod:4730
15298 msgid "See also: L</part-list>"
15302 #: ../fish/guestfish-actions.pod:4732
15304 "I<This function is deprecated.> In new code, use the L</part_list> call "
15309 #: ../fish/guestfish-actions.pod:4739
15314 #: ../fish/guestfish-actions.pod:4741
15322 #: ../fish/guestfish-actions.pod:4743 ../src/guestfs-actions.pod:7296
15324 "This call runs a command from the guest filesystem via the guest's "
15329 #: ../fish/guestfish-actions.pod:4746
15330 msgid "This is like L</command>, but passes the command to:"
15334 #: ../fish/guestfish-actions.pod:4748 ../src/guestfs-actions.pod:7301
15337 " /bin/sh -c \"command\"\n"
15342 #: ../fish/guestfish-actions.pod:4750 ../src/guestfs-actions.pod:7303
15344 "Depending on the guest's shell, this usually results in wildcards being "
15345 "expanded, shell expressions being interpolated and so on."
15349 #: ../fish/guestfish-actions.pod:4754
15350 msgid "All the provisos about L</command> apply to this call."
15354 #: ../fish/guestfish-actions.pod:4756
15359 #: ../fish/guestfish-actions.pod:4758
15362 " sh-lines command\n"
15367 #: ../fish/guestfish-actions.pod:4760
15368 msgid "This is the same as L</sh>, but splits the result into a list of lines."
15372 #: ../fish/guestfish-actions.pod:4763
15373 msgid "See also: L</command-lines>"
15377 #: ../fish/guestfish-actions.pod:4765
15382 #: ../fish/guestfish-actions.pod:4767
15390 #: ../fish/guestfish-actions.pod:4769 ../src/guestfs-actions.pod:7337
15391 msgid "Sleep for C<secs> seconds."
15395 #: ../fish/guestfish-actions.pod:4771
15400 #: ../fish/guestfish-actions.pod:4773
15408 #: ../fish/guestfish-actions.pod:4777 ../src/guestfs-actions.pod:7351
15409 msgid "This is the same as the C<stat(2)> system call."
15413 #: ../fish/guestfish-actions.pod:4779
15418 #: ../fish/guestfish-actions.pod:4781
15426 #: ../fish/guestfish-actions.pod:4783 ../src/guestfs-actions.pod:7365
15428 "Returns file system statistics for any mounted file system. C<path> should "
15429 "be a file or directory in the mounted file system (typically it is the mount "
15430 "point itself, but it doesn't need to be)."
15434 #: ../fish/guestfish-actions.pod:4787 ../src/guestfs-actions.pod:7369
15435 msgid "This is the same as the C<statvfs(2)> system call."
15439 #: ../fish/guestfish-actions.pod:4789
15444 #: ../fish/guestfish-actions.pod:4791
15452 #: ../fish/guestfish-actions.pod:4793 ../src/guestfs-actions.pod:7383
15454 "This runs the L<strings(1)> command on a file and returns the list of "
15455 "printable strings found."
15459 #: ../fish/guestfish-actions.pod:4799
15464 #: ../fish/guestfish-actions.pod:4801
15467 " strings-e encoding path\n"
15472 #: ../fish/guestfish-actions.pod:4803
15474 "This is like the L</strings> command, but allows you to specify the encoding "
15475 "of strings that are looked for in the source file C<path>."
15479 #: ../fish/guestfish-actions.pod:4807 ../src/guestfs-actions.pod:7406
15480 msgid "Allowed encodings are:"
15484 #: ../fish/guestfish-actions.pod:4811 ../src/guestfs-actions.pod:7410
15489 #: ../fish/guestfish-actions.pod:4813
15491 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
15492 "ISO-8859-X (this is what L</strings> uses)."
15496 #: ../fish/guestfish-actions.pod:4816 ../src/guestfs-actions.pod:7415
15501 #: ../fish/guestfish-actions.pod:4818 ../src/guestfs-actions.pod:7417
15502 msgid "Single 8-bit-byte characters."
15506 #: ../fish/guestfish-actions.pod:4820 ../src/guestfs-actions.pod:7419
15511 #: ../fish/guestfish-actions.pod:4822 ../src/guestfs-actions.pod:7421
15512 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
15516 #: ../fish/guestfish-actions.pod:4825 ../src/guestfs-actions.pod:7424
15517 msgid "l (lower case letter L)"
15521 #: ../fish/guestfish-actions.pod:4827 ../src/guestfs-actions.pod:7426
15523 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
15524 "examining binaries in Windows guests."
15528 #: ../fish/guestfish-actions.pod:4830 ../src/guestfs-actions.pod:7429
15533 #: ../fish/guestfish-actions.pod:4832 ../src/guestfs-actions.pod:7431
15534 msgid "32-bit big endian such as UCS-4BE."
15538 #: ../fish/guestfish-actions.pod:4834 ../src/guestfs-actions.pod:7433
15543 #: ../fish/guestfish-actions.pod:4836 ../src/guestfs-actions.pod:7435
15544 msgid "32-bit little endian such as UCS-4LE."
15548 #: ../fish/guestfish-actions.pod:4840 ../src/guestfs-actions.pod:7439
15549 msgid "The returned strings are transcoded to UTF-8."
15553 #: ../fish/guestfish-actions.pod:4845
15554 msgid "swapoff-device"
15558 #: ../fish/guestfish-actions.pod:4847
15561 " swapoff-device device\n"
15566 #: ../fish/guestfish-actions.pod:4849
15568 "This command disables the libguestfs appliance swap device or partition "
15569 "named C<device>. See L</swapon-device>."
15573 #: ../fish/guestfish-actions.pod:4853
15574 msgid "swapoff-file"
15578 #: ../fish/guestfish-actions.pod:4855
15581 " swapoff-file file\n"
15586 #: ../fish/guestfish-actions.pod:4857 ../src/guestfs-actions.pod:7470
15587 msgid "This command disables the libguestfs appliance swap on file."
15591 #: ../fish/guestfish-actions.pod:4859
15592 msgid "swapoff-label"
15596 #: ../fish/guestfish-actions.pod:4861
15599 " swapoff-label label\n"
15604 #: ../fish/guestfish-actions.pod:4863 ../src/guestfs-actions.pod:7482
15606 "This command disables the libguestfs appliance swap on labeled swap "
15611 #: ../fish/guestfish-actions.pod:4866
15612 msgid "swapoff-uuid"
15616 #: ../fish/guestfish-actions.pod:4868
15619 " swapoff-uuid uuid\n"
15624 #: ../fish/guestfish-actions.pod:4870 ../src/guestfs-actions.pod:7495
15626 "This command disables the libguestfs appliance swap partition with the given "
15631 #: ../fish/guestfish-actions.pod:4873
15632 msgid "swapon-device"
15636 #: ../fish/guestfish-actions.pod:4875
15639 " swapon-device device\n"
15644 #: ../fish/guestfish-actions.pod:4877
15646 "This command enables the libguestfs appliance to use the swap device or "
15647 "partition named C<device>. The increased memory is made available for all "
15648 "commands, for example those run using L</command> or L</sh>."
15652 #: ../fish/guestfish-actions.pod:4882 ../src/guestfs-actions.pod:7513
15654 "Note that you should not swap to existing guest swap partitions unless you "
15655 "know what you are doing. They may contain hibernation information, or other "
15656 "information that the guest doesn't want you to trash. You also risk leaking "
15657 "information about the host to the guest this way. Instead, attach a new "
15658 "host device to the guest and swap on that."
15662 #: ../fish/guestfish-actions.pod:4889
15663 msgid "swapon-file"
15667 #: ../fish/guestfish-actions.pod:4891
15670 " swapon-file file\n"
15675 #: ../fish/guestfish-actions.pod:4893
15676 msgid "This command enables swap to a file. See L</swapon-device> for other notes."
15680 #: ../fish/guestfish-actions.pod:4896
15681 msgid "swapon-label"
15685 #: ../fish/guestfish-actions.pod:4898
15688 " swapon-label label\n"
15693 #: ../fish/guestfish-actions.pod:4900
15695 "This command enables swap to a labeled swap partition. See "
15696 "L</swapon-device> for other notes."
15700 #: ../fish/guestfish-actions.pod:4903
15701 msgid "swapon-uuid"
15705 #: ../fish/guestfish-actions.pod:4905
15708 " swapon-uuid uuid\n"
15713 #: ../fish/guestfish-actions.pod:4907
15715 "This command enables swap to a swap partition with the given UUID. See "
15716 "L</swapon-device> for other notes."
15720 #: ../fish/guestfish-actions.pod:4910
15725 #: ../fish/guestfish-actions.pod:4912
15733 #: ../fish/guestfish-actions.pod:4914 ../src/guestfs-actions.pod:7568
15735 "This syncs the disk, so that any writes are flushed through to the "
15736 "underlying disk image."
15740 #: ../fish/guestfish-actions.pod:4917 ../src/guestfs-actions.pod:7571
15742 "You should always call this if you have modified a disk image, before "
15743 "closing the handle."
15747 #: ../fish/guestfish-actions.pod:4920
15752 #: ../fish/guestfish-actions.pod:4922
15760 #: ../fish/guestfish-actions.pod:4924 ../src/guestfs-actions.pod:7584
15761 msgid "This command returns up to the last 10 lines of a file as a list of strings."
15765 #: ../fish/guestfish-actions.pod:4930
15770 #: ../fish/guestfish-actions.pod:4932
15773 " tail-n nrlines path\n"
15778 #: ../fish/guestfish-actions.pod:4934 ../src/guestfs-actions.pod:7603
15780 "If the parameter C<nrlines> is a positive number, this returns the last "
15781 "C<nrlines> lines of the file C<path>."
15785 #: ../fish/guestfish-actions.pod:4937 ../src/guestfs-actions.pod:7606
15787 "If the parameter C<nrlines> is a negative number, this returns lines from "
15788 "the file C<path>, starting with the C<-nrlines>th line."
15792 #: ../fish/guestfish-actions.pod:4945
15797 #: ../fish/guestfish-actions.pod:4947
15800 " tar-in (tarfile|-) directory\n"
15805 #: ../fish/guestfish-actions.pod:4949 ../src/guestfs-actions.pod:7627
15807 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
15808 "tar file) into C<directory>."
15812 #: ../fish/guestfish-actions.pod:4952
15813 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
15817 #: ../fish/guestfish-actions.pod:4957
15822 #: ../fish/guestfish-actions.pod:4959
15825 " tar-out directory (tarfile|-)\n"
15830 #: ../fish/guestfish-actions.pod:4961 ../src/guestfs-actions.pod:7644
15832 "This command packs the contents of C<directory> and downloads it to local "
15837 #: ../fish/guestfish-actions.pod:4964
15838 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
15842 #: ../fish/guestfish-actions.pod:4969
15847 #: ../fish/guestfish-actions.pod:4971
15850 " tgz-in (tarball|-) directory\n"
15855 #: ../fish/guestfish-actions.pod:4973 ../src/guestfs-actions.pod:7661
15857 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
15858 "tar file) into C<directory>."
15862 #: ../fish/guestfish-actions.pod:4976
15863 msgid "To upload an uncompressed tarball, use L</tar-in>."
15867 #: ../fish/guestfish-actions.pod:4980
15872 #: ../fish/guestfish-actions.pod:4982
15875 " tgz-out directory (tarball|-)\n"
15880 #: ../fish/guestfish-actions.pod:4984 ../src/guestfs-actions.pod:7677
15882 "This command packs the contents of C<directory> and downloads it to local "
15887 #: ../fish/guestfish-actions.pod:4987
15888 msgid "To download an uncompressed tarball, use L</tar-out>."
15892 #: ../fish/guestfish-actions.pod:4991
15897 #: ../fish/guestfish-actions.pod:4993
15905 #: ../fish/guestfish-actions.pod:4995 ../src/guestfs-actions.pod:7692
15907 "Touch acts like the L<touch(1)> command. It can be used to update the "
15908 "timestamps on a file, or, if the file does not exist, to create a new "
15909 "zero-length file."
15913 #: ../fish/guestfish-actions.pod:4999 ../src/guestfs-actions.pod:7696
15915 "This command only works on regular files, and will fail on other file types "
15916 "such as directories, symbolic links, block special etc."
15920 #: ../fish/guestfish-actions.pod:5002
15925 #: ../fish/guestfish-actions.pod:5004
15933 #: ../fish/guestfish-actions.pod:5006 ../src/guestfs-actions.pod:7709
15935 "This command truncates C<path> to a zero-length file. The file must exist "
15940 #: ../fish/guestfish-actions.pod:5009
15941 msgid "truncate-size"
15945 #: ../fish/guestfish-actions.pod:5011
15948 " truncate-size path size\n"
15953 #: ../fish/guestfish-actions.pod:5013 ../src/guestfs-actions.pod:7723
15955 "This command truncates C<path> to size C<size> bytes. The file must exist "
15960 #: ../fish/guestfish-actions.pod:5016
15962 "If the current file size is less than C<size> then the file is extended to "
15963 "the required size with zero bytes. This creates a sparse file (ie. disk "
15964 "blocks are not allocated for the file until you write to it). To create a "
15965 "non-sparse file of zeroes, use L</fallocate64> instead."
15969 #: ../fish/guestfish-actions.pod:5022
15974 #: ../fish/guestfish-actions.pod:5024
15977 " tune2fs device [force:true|false] [maxmountcount:N] [mountcount:N] "
15978 "[errorbehavior:..] [group:N] [intervalbetweenchecks:N] "
15979 "[reservedblockspercentage:N] [lastmounteddirectory:..] "
15980 "[reservedblockscount:N] [user:N]\n"
15985 #: ../fish/guestfish-actions.pod:5026 ../src/guestfs-actions.pod:7759
15987 "This call allows you to adjust various filesystem parameters of an "
15988 "ext2/ext3/ext4 filesystem called C<device>."
15992 #: ../fish/guestfish-actions.pod:5035 ../src/guestfs-actions.pod:7768
15994 "Force tune2fs to complete the operation even in the face of errors. This is "
15995 "the same as the tune2fs C<-f> option."
15999 #: ../fish/guestfish-actions.pod:5038 ../src/guestfs-actions.pod:7771
16000 msgid "C<maxmountcount>"
16004 #: ../fish/guestfish-actions.pod:5040 ../src/guestfs-actions.pod:7773
16006 "Set the number of mounts after which the filesystem is checked by "
16007 "L<e2fsck(8)>. If this is C<0> then the number of mounts is disregarded. "
16008 "This is the same as the tune2fs C<-c> option."
16012 #: ../fish/guestfish-actions.pod:5044 ../src/guestfs-actions.pod:7777
16013 msgid "C<mountcount>"
16017 #: ../fish/guestfish-actions.pod:5046 ../src/guestfs-actions.pod:7779
16019 "Set the number of times the filesystem has been mounted. This is the same "
16020 "as the tune2fs C<-C> option."
16024 #: ../fish/guestfish-actions.pod:5049 ../src/guestfs-actions.pod:7782
16025 msgid "C<errorbehavior>"
16029 #: ../fish/guestfish-actions.pod:5051 ../src/guestfs-actions.pod:7784
16031 "Change the behavior of the kernel code when errors are detected. Possible "
16032 "values currently are: C<continue>, C<remount-ro>, C<panic>. In practice "
16033 "these options don't really make any difference, particularly for write "
16038 #: ../fish/guestfish-actions.pod:5056 ../src/guestfs-actions.pod:7789
16039 msgid "This is the same as the tune2fs C<-e> option."
16043 #: ../fish/guestfish-actions.pod:5058 ../src/guestfs-actions.pod:7791
16048 #: ../fish/guestfish-actions.pod:5060 ../src/guestfs-actions.pod:7793
16050 "Set the group which can use reserved filesystem blocks. This is the same as "
16051 "the tune2fs C<-g> option except that it can only be specified as a number."
16055 #: ../fish/guestfish-actions.pod:5064 ../src/guestfs-actions.pod:7797
16056 msgid "C<intervalbetweenchecks>"
16060 #: ../fish/guestfish-actions.pod:5066 ../src/guestfs-actions.pod:7799
16062 "Adjust the maximal time between two filesystem checks (in seconds). If the "
16063 "option is passed as C<0> then time-dependent checking is disabled."
16067 #: ../fish/guestfish-actions.pod:5070 ../src/guestfs-actions.pod:7803
16068 msgid "This is the same as the tune2fs C<-i> option."
16072 #: ../fish/guestfish-actions.pod:5072 ../src/guestfs-actions.pod:7805
16073 msgid "C<reservedblockspercentage>"
16077 #: ../fish/guestfish-actions.pod:5074 ../src/guestfs-actions.pod:7807
16079 "Set the percentage of the filesystem which may only be allocated by "
16080 "privileged processes. This is the same as the tune2fs C<-m> option."
16084 #: ../fish/guestfish-actions.pod:5078 ../src/guestfs-actions.pod:7811
16085 msgid "C<lastmounteddirectory>"
16089 #: ../fish/guestfish-actions.pod:5080 ../src/guestfs-actions.pod:7813
16091 "Set the last mounted directory. This is the same as the tune2fs C<-M> "
16096 #: ../fish/guestfish-actions.pod:5083 ../src/guestfs-actions.pod:7816
16098 "C<reservedblockscount> Set the number of reserved filesystem blocks. This "
16099 "is the same as the tune2fs C<-r> option."
16103 #: ../fish/guestfish-actions.pod:5087 ../src/guestfs-actions.pod:7820
16108 #: ../fish/guestfish-actions.pod:5089 ../src/guestfs-actions.pod:7822
16110 "Set the user who can use the reserved filesystem blocks. This is the same "
16111 "as the tune2fs C<-u> option except that it can only be specified as a "
16116 #: ../fish/guestfish-actions.pod:5095
16118 "To get the current values of filesystem parameters, see L</tune2fs-l>. For "
16119 "precise details of how tune2fs works, see the L<tune2fs(8)> man page."
16123 #: ../fish/guestfish-actions.pod:5101
16128 #: ../fish/guestfish-actions.pod:5103
16131 " tune2fs-l device\n"
16136 #: ../fish/guestfish-actions.pod:5105 ../src/guestfs-actions.pod:7862
16138 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
16143 #: ../fish/guestfish-actions.pod:5108 ../src/guestfs-actions.pod:7865
16145 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
16146 "for more details. The list of fields returned isn't clearly defined, and "
16147 "depends on both the version of C<tune2fs> that libguestfs was built against, "
16148 "and the filesystem itself."
16152 #: ../fish/guestfish-actions.pod:5113
16157 #: ../fish/guestfish-actions.pod:5115
16160 " txz-in (tarball|-) directory\n"
16165 #: ../fish/guestfish-actions.pod:5117 ../src/guestfs-actions.pod:7885
16167 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
16168 "tar file) into C<directory>."
16172 #: ../fish/guestfish-actions.pod:5122
16177 #: ../fish/guestfish-actions.pod:5124
16180 " txz-out directory (tarball|-)\n"
16185 #: ../fish/guestfish-actions.pod:5126 ../src/guestfs-actions.pod:7899
16187 "This command packs the contents of C<directory> and downloads it to local "
16188 "file C<tarball> (as an xz compressed tar archive)."
16192 #: ../fish/guestfish-actions.pod:5131
16197 #: ../fish/guestfish-actions.pod:5133
16205 #: ../fish/guestfish-actions.pod:5135 ../src/guestfs-actions.pod:7912
16207 "This function sets the mask used for creating new files and device nodes to "
16212 #: ../fish/guestfish-actions.pod:5138 ../src/guestfs-actions.pod:7915
16214 "Typical umask values would be C<022> which creates new files with "
16215 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
16216 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
16220 #: ../fish/guestfish-actions.pod:5143 ../src/guestfs-actions.pod:7920
16222 "The default umask is C<022>. This is important because it means that "
16223 "directories and device nodes will be created with C<0644> or C<0755> mode "
16224 "even if you specify C<0777>."
16228 #: ../fish/guestfish-actions.pod:5147
16229 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
16233 #: ../fish/guestfish-actions.pod:5150 ../src/guestfs-actions.pod:7927
16234 msgid "This call returns the previous umask."
16238 #: ../fish/guestfish-actions.pod:5152
16243 #: ../fish/guestfish-actions.pod:5154
16248 #: ../fish/guestfish-actions.pod:5156
16251 " umount pathordevice\n"
16256 #: ../fish/guestfish-actions.pod:5158 ../src/guestfs-actions.pod:7939
16258 "This unmounts the given filesystem. The filesystem may be specified either "
16259 "by its mountpoint (path) or the device which contains the filesystem."
16263 #: ../fish/guestfish-actions.pod:5162
16268 #: ../fish/guestfish-actions.pod:5164
16269 msgid "unmount-all"
16273 #: ../fish/guestfish-actions.pod:5166
16281 #: ../fish/guestfish-actions.pod:5168 ../src/guestfs-actions.pod:7952
16282 msgid "This unmounts all mounted filesystems."
16286 #: ../fish/guestfish-actions.pod:5170 ../src/guestfs-actions.pod:7954
16287 msgid "Some internal mounts are not unmounted by this call."
16291 #: ../fish/guestfish-actions.pod:5172
16296 #: ../fish/guestfish-actions.pod:5174
16299 " upload (filename|-) remotefilename\n"
16304 #: ../fish/guestfish-actions.pod:5176 ../fish/guestfish-actions.pod:5189 ../src/guestfs-actions.pod:7967 ../src/guestfs-actions.pod:7991
16305 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
16309 #: ../fish/guestfish-actions.pod:5181
16310 msgid "See also L</download>."
16314 #: ../fish/guestfish-actions.pod:5185
16315 msgid "upload-offset"
16319 #: ../fish/guestfish-actions.pod:5187
16322 " upload-offset (filename|-) remotefilename offset\n"
16327 #: ../fish/guestfish-actions.pod:5192 ../src/guestfs-actions.pod:7994
16329 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
16330 "The intention is to overwrite parts of existing files or devices, although "
16331 "if a non-existant file is specified then it is created with a \"hole\" "
16332 "before C<offset>. The size of the data written is implicit in the size of "
16333 "the source C<filename>."
16337 #: ../fish/guestfish-actions.pod:5199
16339 "Note that there is no limit on the amount of data that can be uploaded with "
16340 "this call, unlike with L</pwrite>, and this call always writes the full "
16341 "amount unless an error occurs."
16345 #: ../fish/guestfish-actions.pod:5204
16346 msgid "See also L</upload>, L</pwrite>."
16350 #: ../fish/guestfish-actions.pod:5208
16355 #: ../fish/guestfish-actions.pod:5210
16358 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
16363 #: ../fish/guestfish-actions.pod:5212 ../src/guestfs-actions.pod:8027
16364 msgid "This command sets the timestamps of a file with nanosecond precision."
16368 #: ../fish/guestfish-actions.pod:5215 ../src/guestfs-actions.pod:8030
16370 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
16375 #: ../fish/guestfish-actions.pod:5218 ../src/guestfs-actions.pod:8033
16377 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
16378 "nanoseconds from the epoch."
16382 #: ../fish/guestfish-actions.pod:5221 ../src/guestfs-actions.pod:8036
16384 "If the C<*nsecs> field contains the special value C<-1> then the "
16385 "corresponding timestamp is set to the current time. (The C<*secs> field is "
16386 "ignored in this case)."
16390 #: ../fish/guestfish-actions.pod:5225 ../src/guestfs-actions.pod:8040
16392 "If the C<*nsecs> field contains the special value C<-2> then the "
16393 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
16398 #: ../fish/guestfish-actions.pod:5229
16403 #: ../fish/guestfish-actions.pod:5231
16411 #: ../fish/guestfish-actions.pod:5233 ../src/guestfs-actions.pod:8053
16412 msgid "Return the libguestfs version number that the program is linked against."
16416 #: ../fish/guestfish-actions.pod:5236 ../src/guestfs-actions.pod:8056
16418 "Note that because of dynamic linking this is not necessarily the version of "
16419 "libguestfs that you compiled against. You can compile the program, and then "
16420 "at runtime dynamically link against a completely different C<libguestfs.so> "
16425 #: ../fish/guestfish-actions.pod:5241 ../src/guestfs-actions.pod:8061
16427 "This call was added in version C<1.0.58>. In previous versions of "
16428 "libguestfs there was no way to get the version number. From C code you can "
16429 "use dynamic linker functions to find out if this symbol exists (if it "
16430 "doesn't, then it's an earlier version)."
16434 #: ../fish/guestfish-actions.pod:5247 ../src/guestfs-actions.pod:8067
16436 "The call returns a structure with four elements. The first three (C<major>, "
16437 "C<minor> and C<release>) are numbers and correspond to the usual version "
16438 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
16439 "but may be used for distro-specific information."
16443 #: ../fish/guestfish-actions.pod:5253 ../src/guestfs-actions.pod:8073
16444 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
16448 #: ../fish/guestfish-actions.pod:5256 ../src/guestfs-actions.pod:8076
16449 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
16453 #: ../fish/guestfish-actions.pod:5258
16455 "I<Note:> Don't use this call to test for availability of features. In "
16456 "enterprise distributions we backport features from later versions into "
16457 "earlier versions, making this an unreliable way to test for features. Use "
16458 "L</available> instead."
16462 #: ../fish/guestfish-actions.pod:5264
16467 #: ../fish/guestfish-actions.pod:5266
16470 " vfs-label device\n"
16475 #: ../fish/guestfish-actions.pod:5268 ../src/guestfs-actions.pod:8096
16476 msgid "This returns the filesystem label of the filesystem on C<device>."
16480 #: ../fish/guestfish-actions.pod:5271 ../src/guestfs-actions.pod:8099
16481 msgid "If the filesystem is unlabeled, this returns the empty string."
16485 #: ../fish/guestfish-actions.pod:5273
16486 msgid "To find a filesystem from the label, use L</findfs-label>."
16490 #: ../fish/guestfish-actions.pod:5275
16495 #: ../fish/guestfish-actions.pod:5277
16498 " vfs-type device\n"
16503 #: ../fish/guestfish-actions.pod:5279 ../src/guestfs-actions.pod:8114
16505 "This command gets the filesystem type corresponding to the filesystem on "
16510 #: ../fish/guestfish-actions.pod:5282 ../src/guestfs-actions.pod:8117
16512 "For most filesystems, the result is the name of the Linux VFS module which "
16513 "would be used to mount this filesystem if you mounted it without specifying "
16514 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
16518 #: ../fish/guestfish-actions.pod:5287
16523 #: ../fish/guestfish-actions.pod:5289
16526 " vfs-uuid device\n"
16531 #: ../fish/guestfish-actions.pod:5291 ../src/guestfs-actions.pod:8133
16532 msgid "This returns the filesystem UUID of the filesystem on C<device>."
16536 #: ../fish/guestfish-actions.pod:5294 ../src/guestfs-actions.pod:8136
16537 msgid "If the filesystem does not have a UUID, this returns the empty string."
16541 #: ../fish/guestfish-actions.pod:5296
16542 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
16546 #: ../fish/guestfish-actions.pod:5298
16547 msgid "vg-activate"
16551 #: ../fish/guestfish-actions.pod:5300
16554 " vg-activate true|false 'volgroups ...'\n"
16559 #: ../fish/guestfish-actions.pod:5302 ../src/guestfs-actions.pod:8152
16561 "This command activates or (if C<activate> is false) deactivates all logical "
16562 "volumes in the listed volume groups C<volgroups>."
16566 #: ../fish/guestfish-actions.pod:5305 ../src/guestfs-actions.pod:8155
16567 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
16571 #: ../fish/guestfish-actions.pod:5307 ../src/guestfs-actions.pod:8157
16573 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
16574 "activated or deactivated."
16578 #: ../fish/guestfish-actions.pod:5310
16579 msgid "vg-activate-all"
16583 #: ../fish/guestfish-actions.pod:5312
16586 " vg-activate-all true|false\n"
16591 #: ../fish/guestfish-actions.pod:5314 ../src/guestfs-actions.pod:8170
16593 "This command activates or (if C<activate> is false) deactivates all logical "
16594 "volumes in all volume groups."
16598 #: ../fish/guestfish-actions.pod:5317 ../src/guestfs-actions.pod:8173
16599 msgid "This command is the same as running C<vgchange -a y|n>"
16603 #: ../fish/guestfish-actions.pod:5319
16608 #: ../fish/guestfish-actions.pod:5321
16611 " vgcreate volgroup 'physvols ...'\n"
16616 #: ../fish/guestfish-actions.pod:5323 ../src/guestfs-actions.pod:8186
16618 "This creates an LVM volume group called C<volgroup> from the non-empty list "
16619 "of physical volumes C<physvols>."
16623 #: ../fish/guestfish-actions.pod:5326
16628 #: ../fish/guestfish-actions.pod:5328
16631 " vglvuuids vgname\n"
16636 #: ../fish/guestfish-actions.pod:5330 ../src/guestfs-actions.pod:8199
16638 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
16639 "volumes created in this volume group."
16643 #: ../fish/guestfish-actions.pod:5333
16645 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
16646 "logical volumes and volume groups."
16650 #: ../fish/guestfish-actions.pod:5336
16651 msgid "See also L</vgpvuuids>."
16655 #: ../fish/guestfish-actions.pod:5338
16660 #: ../fish/guestfish-actions.pod:5340
16663 " vgpvuuids vgname\n"
16668 #: ../fish/guestfish-actions.pod:5342 ../src/guestfs-actions.pod:8219
16670 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
16671 "volumes that this volume group resides on."
16675 #: ../fish/guestfish-actions.pod:5345
16677 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
16678 "physical volumes and volume groups."
16682 #: ../fish/guestfish-actions.pod:5348
16683 msgid "See also L</vglvuuids>."
16687 #: ../fish/guestfish-actions.pod:5350
16692 #: ../fish/guestfish-actions.pod:5352
16695 " vgremove vgname\n"
16700 #: ../fish/guestfish-actions.pod:5354 ../src/guestfs-actions.pod:8239
16701 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
16705 #: ../fish/guestfish-actions.pod:5356 ../src/guestfs-actions.pod:8241
16706 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
16710 #: ../fish/guestfish-actions.pod:5359
16715 #: ../fish/guestfish-actions.pod:5361
16718 " vgrename volgroup newvolgroup\n"
16723 #: ../fish/guestfish-actions.pod:5363 ../src/guestfs-actions.pod:8255
16724 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
16728 #: ../fish/guestfish-actions.pod:5365
16733 #: ../fish/guestfish-actions.pod:5367
16741 #: ../fish/guestfish-actions.pod:5369 ../src/guestfs-actions.pod:8266
16743 "List all the volumes groups detected. This is the equivalent of the "
16744 "L<vgs(8)> command."
16748 #: ../fish/guestfish-actions.pod:5372 ../src/guestfs-actions.pod:8269
16750 "This returns a list of just the volume group names that were detected "
16751 "(eg. C<VolGroup00>)."
16755 #: ../fish/guestfish-actions.pod:5375
16756 msgid "See also L</vgs-full>."
16760 #: ../fish/guestfish-actions.pod:5377
16765 #: ../fish/guestfish-actions.pod:5379
16773 #: ../fish/guestfish-actions.pod:5381 ../src/guestfs-actions.pod:8285
16775 "List all the volumes groups detected. This is the equivalent of the "
16776 "L<vgs(8)> command. The \"full\" version includes all fields."
16780 #: ../fish/guestfish-actions.pod:5384
16785 #: ../fish/guestfish-actions.pod:5386
16793 #: ../fish/guestfish-actions.pod:5388 ../src/guestfs-actions.pod:8299
16795 "This rescans all block devices and rebuilds the list of LVM physical "
16796 "volumes, volume groups and logical volumes."
16800 #: ../fish/guestfish-actions.pod:5391
16805 #: ../fish/guestfish-actions.pod:5393
16813 #: ../fish/guestfish-actions.pod:5395 ../src/guestfs-actions.pod:8312
16814 msgid "This command returns the UUID of the LVM VG named C<vgname>."
16818 #: ../fish/guestfish-actions.pod:5397
16823 #: ../fish/guestfish-actions.pod:5399
16831 #: ../fish/guestfish-actions.pod:5401 ../src/guestfs-actions.pod:8352
16833 "This command counts the characters in a file, using the C<wc -c> external "
16838 #: ../fish/guestfish-actions.pod:5404
16843 #: ../fish/guestfish-actions.pod:5406
16851 #: ../fish/guestfish-actions.pod:5408 ../src/guestfs-actions.pod:8365
16853 "This command counts the lines in a file, using the C<wc -l> external "
16858 #: ../fish/guestfish-actions.pod:5411
16863 #: ../fish/guestfish-actions.pod:5413
16871 #: ../fish/guestfish-actions.pod:5415 ../src/guestfs-actions.pod:8378
16873 "This command counts the words in a file, using the C<wc -w> external "
16878 #: ../fish/guestfish-actions.pod:5418
16883 #: ../fish/guestfish-actions.pod:5420
16886 " write path content\n"
16891 #: ../fish/guestfish-actions.pod:5422 ../src/guestfs-actions.pod:8393
16893 "This call creates a file called C<path>. The content of the file is the "
16894 "string C<content> (which can contain any 8 bit data)."
16898 #: ../fish/guestfish-actions.pod:5425
16899 msgid "See also L</write-append>."
16903 #: ../fish/guestfish-actions.pod:5430
16904 msgid "write-append"
16908 #: ../fish/guestfish-actions.pod:5432
16911 " write-append path content\n"
16916 #: ../fish/guestfish-actions.pod:5434 ../src/guestfs-actions.pod:8413
16918 "This call appends C<content> to the end of file C<path>. If C<path> does "
16919 "not exist, then a new file is created."
16923 #: ../fish/guestfish-actions.pod:5437
16924 msgid "See also L</write>."
16928 #: ../fish/guestfish-actions.pod:5442
16933 #: ../fish/guestfish-actions.pod:5444
16936 " write-file path content size\n"
16941 #: ../fish/guestfish-actions.pod:5446 ../src/guestfs-actions.pod:8440
16943 "This call creates a file called C<path>. The contents of the file is the "
16944 "string C<content> (which can contain any 8 bit data), with length C<size>."
16948 #: ../fish/guestfish-actions.pod:5450 ../src/guestfs-actions.pod:8444
16950 "As a special case, if C<size> is C<0> then the length is calculated using "
16951 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
16955 #: ../fish/guestfish-actions.pod:5454 ../src/guestfs-actions.pod:8448
16957 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
16958 "I<not> work, even if the length is specified."
16962 #: ../fish/guestfish-actions.pod:5460
16963 msgid "I<This function is deprecated.> In new code, use the L</write> call instead."
16967 #: ../fish/guestfish-actions.pod:5467
16972 #: ../fish/guestfish-actions.pod:5469
16975 " zegrep regex path\n"
16980 #: ../fish/guestfish-actions.pod:5471 ../src/guestfs-actions.pod:8465
16981 msgid "This calls the external C<zegrep> program and returns the matching lines."
16985 #: ../fish/guestfish-actions.pod:5477
16990 #: ../fish/guestfish-actions.pod:5479
16993 " zegrepi regex path\n"
16998 #: ../fish/guestfish-actions.pod:5481 ../src/guestfs-actions.pod:8484
16999 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
17003 #: ../fish/guestfish-actions.pod:5487
17008 #: ../fish/guestfish-actions.pod:5489
17016 #: ../fish/guestfish-actions.pod:5491 ../src/guestfs-actions.pod:8502
17017 msgid "This command writes zeroes over the first few blocks of C<device>."
17021 #: ../fish/guestfish-actions.pod:5493 ../src/guestfs-actions.pod:8504
17023 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
17024 "securely wipe the device). It should be sufficient to remove any partition "
17025 "tables, filesystem superblocks and so on."
17029 #: ../fish/guestfish-actions.pod:5497 ../fish/guestfish-actions.pod:5512 ../src/guestfs-actions.pod:8508 ../src/guestfs-actions.pod:8534
17031 "If blocks are already zero, then this command avoids writing zeroes. This "
17032 "prevents the underlying device from becoming non-sparse or growing "
17037 #: ../fish/guestfish-actions.pod:5501
17038 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
17042 #: ../fish/guestfish-actions.pod:5504
17043 msgid "zero-device"
17047 #: ../fish/guestfish-actions.pod:5506
17050 " zero-device device\n"
17055 #: ../fish/guestfish-actions.pod:5508
17057 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
17058 "which just zeroes the first few blocks of a device."
17062 #: ../fish/guestfish-actions.pod:5516
17067 #: ../fish/guestfish-actions.pod:5518
17070 " zerofree device\n"
17075 #: ../fish/guestfish-actions.pod:5520 ../src/guestfs-actions.pod:8553
17077 "This runs the I<zerofree> program on C<device>. This program claims to zero "
17078 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
17079 "possible to compress the filesystem more effectively."
17083 #: ../fish/guestfish-actions.pod:5525 ../src/guestfs-actions.pod:8558
17084 msgid "You should B<not> run this program if the filesystem is mounted."
17088 #: ../fish/guestfish-actions.pod:5528 ../src/guestfs-actions.pod:8561
17090 "It is possible that using this program can damage the filesystem or data on "
17095 #: ../fish/guestfish-actions.pod:5531
17100 #: ../fish/guestfish-actions.pod:5533
17103 " zfgrep pattern path\n"
17108 #: ../fish/guestfish-actions.pod:5535 ../src/guestfs-actions.pod:8575
17109 msgid "This calls the external C<zfgrep> program and returns the matching lines."
17113 #: ../fish/guestfish-actions.pod:5541
17118 #: ../fish/guestfish-actions.pod:5543
17121 " zfgrepi pattern path\n"
17126 #: ../fish/guestfish-actions.pod:5545 ../src/guestfs-actions.pod:8594
17127 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
17131 #: ../fish/guestfish-actions.pod:5551
17136 #: ../fish/guestfish-actions.pod:5553
17139 " zfile meth path\n"
17144 #: ../fish/guestfish-actions.pod:5555 ../src/guestfs-actions.pod:8620
17145 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
17149 #: ../fish/guestfish-actions.pod:5558 ../src/guestfs-actions.pod:8623
17150 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
17154 #: ../fish/guestfish-actions.pod:5560
17155 msgid "Since 1.0.63, use L</file> instead which can now process compressed files."
17159 #: ../fish/guestfish-actions.pod:5563
17160 msgid "I<This function is deprecated.> In new code, use the L</file> call instead."
17164 #: ../fish/guestfish-actions.pod:5570
17169 #: ../fish/guestfish-actions.pod:5572
17172 " zgrep regex path\n"
17177 #: ../fish/guestfish-actions.pod:5574 ../src/guestfs-actions.pod:8640
17178 msgid "This calls the external C<zgrep> program and returns the matching lines."
17182 #: ../fish/guestfish-actions.pod:5580
17187 #: ../fish/guestfish-actions.pod:5582
17190 " zgrepi regex path\n"
17195 #: ../fish/guestfish-actions.pod:5584 ../src/guestfs-actions.pod:8659
17196 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
17200 #: ../fish/guestfish-commands.pod:1
17205 #: ../fish/guestfish-commands.pod:3
17210 #: ../fish/guestfish-commands.pod:5
17213 " alloc filename size\n"
17218 #: ../fish/guestfish-commands.pod:7
17220 "This creates an empty (zeroed) file of the given size, and then adds so it "
17221 "can be further examined."
17225 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:193
17226 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
17230 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:195
17231 msgid "Size can be specified using standard suffixes, eg. C<1M>."
17235 #: ../fish/guestfish-commands.pod:14
17237 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
17238 "image, see L</PREPARED DISK IMAGES>."
17242 #: ../fish/guestfish-commands.pod:17
17247 #: ../fish/guestfish-commands.pod:19
17250 " copy-in local [local ...] /remotedir\n"
17255 #: ../fish/guestfish-commands.pod:21
17257 "C<copy-in> copies local files or directories recursively into the disk "
17258 "image, placing them in the directory called C</remotedir> (which must "
17259 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
17260 "other commands as necessary."
17264 #: ../fish/guestfish-commands.pod:26
17266 "Multiple local files and directories can be specified, but the last "
17267 "parameter must always be a remote directory. Wildcards cannot be used."
17271 #: ../fish/guestfish-commands.pod:30
17276 #: ../fish/guestfish-commands.pod:32
17279 " copy-out remote [remote ...] localdir\n"
17284 #: ../fish/guestfish-commands.pod:34
17286 "C<copy-out> copies remote files or directories recursively out of the disk "
17287 "image, placing them on the host disk in a local directory called C<localdir> "
17288 "(which must exist). This guestfish meta-command turns into a sequence of "
17289 "L</download>, L</tar-out> and other commands as necessary."
17293 #: ../fish/guestfish-commands.pod:40
17295 "Multiple remote files and directories can be specified, but the last "
17296 "parameter must always be a local directory. To download to the current "
17297 "directory, use C<.> as in:"
17301 #: ../fish/guestfish-commands.pod:44
17304 " copy-out /home .\n"
17309 #: ../fish/guestfish-commands.pod:46
17311 "Wildcards cannot be used in the ordinary command, but you can use them with "
17312 "the help of L</glob> like this:"
17316 #: ../fish/guestfish-commands.pod:49
17319 " glob copy-out /home/* .\n"
17324 #: ../fish/guestfish-commands.pod:51
17329 #: ../fish/guestfish-commands.pod:53
17332 " display filename\n"
17337 #: ../fish/guestfish-commands.pod:55
17339 "Use C<display> (a graphical display program) to display an image file. It "
17340 "downloads the file, and runs C<display> on it."
17344 #: ../fish/guestfish-commands.pod:58
17346 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
17347 "environment variable. For example to use the GNOME display program:"
17351 #: ../fish/guestfish-commands.pod:61
17354 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
17359 #: ../fish/guestfish-commands.pod:63
17360 msgid "See also L<display(1)>."
17364 #: ../fish/guestfish-commands.pod:65
17369 #: ../fish/guestfish-commands.pod:67
17372 " echo [params ...]\n"
17377 #: ../fish/guestfish-commands.pod:69
17378 msgid "This echos the parameters to the terminal."
17382 #: ../fish/guestfish-commands.pod:71
17387 #: ../fish/guestfish-commands.pod:73
17392 #: ../fish/guestfish-commands.pod:75
17397 #: ../fish/guestfish-commands.pod:77
17405 #: ../fish/guestfish-commands.pod:79
17407 "This is used to edit a file. It downloads the file, edits it locally using "
17408 "your editor, then uploads the result."
17412 #: ../fish/guestfish-commands.pod:82
17414 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
17415 "or C<emacs> you will get those corresponding editors."
17419 #: ../fish/guestfish-commands.pod:86
17424 #: ../fish/guestfish-commands.pod:88
17427 " glob command args...\n"
17432 #: ../fish/guestfish-commands.pod:90
17434 "Expand wildcards in any paths in the args list, and run C<command> "
17435 "repeatedly on each matching path."
17439 #: ../fish/guestfish-commands.pod:93
17440 msgid "See L</WILDCARDS AND GLOBBING>."
17444 #: ../fish/guestfish-commands.pod:95
17449 #: ../fish/guestfish-commands.pod:97
17452 " hexedit <filename|device>\n"
17453 " hexedit <filename|device> <max>\n"
17454 " hexedit <filename|device> <start> <max>\n"
17459 #: ../fish/guestfish-commands.pod:101
17461 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
17466 #: ../fish/guestfish-commands.pod:104
17468 "This command works by downloading potentially the whole file or device, "
17469 "editing it locally, then uploading it. If the file or device is large, you "
17470 "have to specify which part you wish to edit by using C<max> and/or C<start> "
17471 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
17472 "usual modifiers allowed such as C<1M> (1 megabyte)."
17476 #: ../fish/guestfish-commands.pod:111
17477 msgid "For example to edit the first few sectors of a disk you might do:"
17481 #: ../fish/guestfish-commands.pod:114
17484 " hexedit /dev/sda 1M\n"
17489 #: ../fish/guestfish-commands.pod:116
17491 "which would allow you to edit anywhere within the first megabyte of the "
17496 #: ../fish/guestfish-commands.pod:119
17497 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
17501 #: ../fish/guestfish-commands.pod:121
17504 " hexedit /dev/sda1 0x400 0x400\n"
17509 #: ../fish/guestfish-commands.pod:123
17510 msgid "(assuming the superblock is in the standard location)."
17514 #: ../fish/guestfish-commands.pod:125
17516 "This command requires the external L<hexedit(1)> program. You can specify "
17517 "another program to use by setting the C<HEXEDITOR> environment variable."
17521 #: ../fish/guestfish-commands.pod:129
17522 msgid "See also L</hexdump>."
17526 #: ../fish/guestfish-commands.pod:131
17531 #: ../fish/guestfish-commands.pod:133
17539 #: ../fish/guestfish-commands.pod:135
17540 msgid "Change the local directory, ie. the current directory of guestfish itself."
17544 #: ../fish/guestfish-commands.pod:138
17545 msgid "Note that C<!cd> won't do what you might expect."
17549 #: ../fish/guestfish-commands.pod:140
17554 #: ../fish/guestfish-commands.pod:142
17559 #: ../fish/guestfish-commands.pod:144
17567 #: ../fish/guestfish-commands.pod:146
17568 msgid "Opens the manual page for guestfish."
17572 #: ../fish/guestfish-commands.pod:148
17577 #: ../fish/guestfish-commands.pod:150
17582 #: ../fish/guestfish-commands.pod:152
17590 #: ../fish/guestfish-commands.pod:154
17598 #: ../fish/guestfish-commands.pod:156
17599 msgid "This is used to view a file."
17603 #: ../fish/guestfish-commands.pod:158
17605 "The default viewer is C<$PAGER>. However if you use the alternate command "
17606 "C<less> you will get the C<less> command specifically."
17610 #: ../fish/guestfish-commands.pod:161
17615 #: ../fish/guestfish-commands.pod:163
17623 #: ../fish/guestfish-commands.pod:165
17625 "Close and reopen the libguestfs handle. It is not necessary to use this "
17626 "normally, because the handle is closed properly when guestfish exits. "
17627 "However this is occasionally useful for testing."
17631 #: ../fish/guestfish-commands.pod:169
17636 #: ../fish/guestfish-commands.pod:171
17639 " setenv VAR value\n"
17644 #: ../fish/guestfish-commands.pod:173
17645 msgid "Set the environment variable C<VAR> to the string C<value>."
17649 #: ../fish/guestfish-commands.pod:175
17650 msgid "To print the value of an environment variable use a shell command such as:"
17654 #: ../fish/guestfish-commands.pod:178
17662 #: ../fish/guestfish-commands.pod:180
17667 #: ../fish/guestfish-commands.pod:182
17670 " sparse filename size\n"
17675 #: ../fish/guestfish-commands.pod:184
17677 "This creates an empty sparse file of the given size, and then adds so it can "
17678 "be further examined."
17682 #: ../fish/guestfish-commands.pod:187
17684 "In all respects it works the same as the L</alloc> command, except that the "
17685 "image file is allocated sparsely, which means that disk blocks are not "
17686 "assigned to the file until they are needed. Sparse disk files only use "
17687 "space when written to, but they are slower and there is a danger you could "
17688 "run out of real disk space during a write operation."
17692 #: ../fish/guestfish-commands.pod:197
17697 #: ../fish/guestfish-commands.pod:199
17705 #: ../fish/guestfish-commands.pod:201
17707 "This command returns a list of the optional groups known to the daemon, and "
17708 "indicates which ones are supported by this build of the libguestfs "
17713 #: ../fish/guestfish-commands.pod:205
17714 msgid "See also L<guestfs(3)/AVAILABILITY>."
17718 #: ../fish/guestfish-commands.pod:207
17723 #: ../fish/guestfish-commands.pod:209
17726 " time command args...\n"
17731 #: ../fish/guestfish-commands.pod:211
17733 "Run the command as usual, but print the elapsed time afterwards. This can "
17734 "be useful for benchmarking operations."
17738 #: ../fish/guestfish-commands.pod:214
17743 #: ../fish/guestfish-commands.pod:216
17751 #: ../fish/guestfish-commands.pod:218
17752 msgid "Remove C<VAR> from the environment."
17756 #: ../fish/guestfish.pod:5
17757 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
17761 #: ../fish/guestfish.pod:9
17764 " guestfish [--options] [commands]\n"
17769 #: ../fish/guestfish.pod:11
17777 #: ../fish/guestfish.pod:13
17780 " guestfish [--ro|--rw] -a disk.img\n"
17785 #: ../fish/guestfish.pod:15
17788 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
17793 #: ../fish/guestfish.pod:17
17796 " guestfish -d libvirt-domain\n"
17801 #: ../fish/guestfish.pod:19
17804 " guestfish [--ro|--rw] -a disk.img -i\n"
17809 #: ../fish/guestfish.pod:21
17812 " guestfish -d libvirt-domain -i\n"
17817 #: ../fish/guestfish.pod:25
17819 "Using guestfish in read/write mode on live virtual machines can be "
17820 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
17821 "option to use guestfish safely if the disk image or virtual machine might be "
17826 #: ../fish/guestfish.pod:32
17828 "Guestfish is a shell and command-line tool for examining and modifying "
17829 "virtual machine filesystems. It uses libguestfs and exposes all of the "
17830 "functionality of the guestfs API, see L<guestfs(3)>."
17834 #: ../fish/guestfish.pod:36
17836 "Guestfish gives you structured access to the libguestfs API, from shell "
17837 "scripts or the command line or interactively. If you want to rescue a "
17838 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
17843 #: ../fish/guestfish.pod:43
17844 msgid "As an interactive shell"
17848 #: ../fish/guestfish.pod:45
17856 #: ../fish/guestfish.pod:47
17859 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
17860 " editing virtual machine filesystems.\n"
17865 #: ../fish/guestfish.pod:50
17868 " Type: 'help' for a list of commands\n"
17869 " 'man' to read the manual\n"
17870 " 'quit' to quit the shell\n"
17875 #: ../fish/guestfish.pod:54
17878 " ><fs> add-ro disk.img\n"
17880 " ><fs> list-filesystems\n"
17881 " /dev/sda1: ext4\n"
17882 " /dev/vg_guest/lv_root: ext4\n"
17883 " /dev/vg_guest/lv_swap: swap\n"
17884 " ><fs> mount /dev/vg_guest/lv_root /\n"
17885 " ><fs> cat /etc/fstab\n"
17887 " # Created by anaconda\n"
17894 #: ../fish/guestfish.pod:67
17895 msgid "From shell scripts"
17899 #: ../fish/guestfish.pod:69
17900 msgid "Create a new C</etc/motd> file in a guest or disk image:"
17904 #: ../fish/guestfish.pod:71
17907 " guestfish <<_EOF_\n"
17910 " mount /dev/vg_guest/lv_root /\n"
17911 " write /etc/motd \"Welcome, new users\"\n"
17917 #: ../fish/guestfish.pod:78
17918 msgid "List the LVM logical volumes in a disk image:"
17922 #: ../fish/guestfish.pod:80
17925 " guestfish -a disk.img --ro <<_EOF_\n"
17933 #: ../fish/guestfish.pod:85
17934 msgid "List all the filesystems in a disk image:"
17938 #: ../fish/guestfish.pod:87
17941 " guestfish -a disk.img --ro <<_EOF_\n"
17943 " list-filesystems\n"
17949 #: ../fish/guestfish.pod:92
17950 msgid "On one command line"
17954 #: ../fish/guestfish.pod:94 ../fish/virt-copy-in.pod:31
17955 msgid "Update C</etc/resolv.conf> in a guest:"
17959 #: ../fish/guestfish.pod:96
17963 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
17964 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
17969 #: ../fish/guestfish.pod:100
17970 msgid "Edit C</boot/grub/grub.conf> interactively:"
17974 #: ../fish/guestfish.pod:102
17977 " guestfish --rw --add disk.img \\\n"
17978 " --mount /dev/vg_guest/lv_root \\\n"
17979 " --mount /dev/sda1:/boot \\\n"
17980 " edit /boot/grub/grub.conf\n"
17985 #: ../fish/guestfish.pod:107
17986 msgid "Mount disks automatically"
17990 #: ../fish/guestfish.pod:109
17992 "Use the I<-i> option to automatically mount the disks from a virtual "
17997 #: ../fish/guestfish.pod:112
18000 " guestfish --ro -a disk.img -i cat /etc/group\n"
18005 #: ../fish/guestfish.pod:114
18008 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
18013 #: ../fish/guestfish.pod:116
18014 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
18018 #: ../fish/guestfish.pod:118
18021 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
18026 #: ../fish/guestfish.pod:120
18027 msgid "As a script interpreter"
18031 #: ../fish/guestfish.pod:122
18032 msgid "Create a 100MB disk containing an ext2-formatted partition:"
18036 #: ../fish/guestfish.pod:124
18039 " #!/usr/bin/guestfish -f\n"
18040 " sparse test1.img 100M\n"
18042 " part-disk /dev/sda mbr\n"
18043 " mkfs ext2 /dev/sda1\n"
18048 #: ../fish/guestfish.pod:130
18049 msgid "Start with a prepared disk"
18053 #: ../fish/guestfish.pod:132
18055 "An alternate way to create a 100MB disk called C<test1.img> containing a "
18056 "single ext2-formatted partition:"
18060 #: ../fish/guestfish.pod:135 ../src/guestfs.pod:2243
18063 " guestfish -N fs\n"
18068 #: ../fish/guestfish.pod:137
18069 msgid "To list what is available do:"
18073 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:1042
18076 " guestfish -N help | less\n"
18081 #: ../fish/guestfish.pod:141
18082 msgid "Remote control"
18086 #: ../fish/guestfish.pod:143
18089 " eval \"`guestfish --listen`\"\n"
18090 " guestfish --remote add-ro disk.img\n"
18091 " guestfish --remote run\n"
18092 " guestfish --remote lvs\n"
18097 #: ../fish/guestfish.pod:154
18098 msgid "Displays general help on options."
18102 #: ../fish/guestfish.pod:158
18103 msgid "B<--cmd-help>"
18107 #: ../fish/guestfish.pod:160
18108 msgid "Lists all available guestfish commands."
18112 #: ../fish/guestfish.pod:162
18117 #: ../fish/guestfish.pod:164
18118 msgid "B<--cmd-help cmd>"
18122 #: ../fish/guestfish.pod:166
18123 msgid "Displays detailed help on a single command C<cmd>."
18127 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:96
18128 msgid "B<-a image>"
18132 #: ../fish/guestfish.pod:170 ../fuse/guestmount.pod:98
18133 msgid "B<--add image>"
18137 #: ../fish/guestfish.pod:172
18138 msgid "Add a block device or virtual machine image to the shell."
18142 #: ../fish/guestfish.pod:177
18144 "Using this flag is mostly equivalent to using the C<add> command, with "
18145 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
18146 "the I<--format=...> flag was given."
18150 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:109
18152 "When used in conjunction with the I<-d> option, this specifies the libvirt "
18153 "URI to use. The default is to use the default libvirt connection."
18157 #: ../fish/guestfish.pod:189
18162 #: ../fish/guestfish.pod:191
18164 "If using the I<--listen> option and a csh-like shell, use this option. See "
18165 "section L</REMOTE CONTROL AND CSH> below."
18169 #: ../fish/guestfish.pod:194 ../fuse/guestmount.pod:113
18170 msgid "B<-d libvirt-domain>"
18174 #: ../fish/guestfish.pod:196 ../fuse/guestmount.pod:115
18175 msgid "B<--domain libvirt-domain>"
18179 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:117
18181 "Add disks from the named libvirt domain. If the I<--ro> option is also "
18182 "used, then any libvirt domain can be used. However in write mode, only "
18183 "libvirt domains which are shut down can be named here."
18187 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:121
18188 msgid "Domain UUIDs can be used instead of names."
18192 #: ../fish/guestfish.pod:204
18194 "Using this flag is mostly equivalent to using the C<add-domain> command, "
18195 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
18196 "if the I<--format:...> flag was given."
18200 #: ../fish/guestfish.pod:208
18205 #: ../fish/guestfish.pod:210
18206 msgid "B<--no-dest-paths>"
18210 #: ../fish/guestfish.pod:212
18212 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
18213 "to hit the tab key to complete paths on the guest filesystem, but this "
18214 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
18215 "allow this feature to be disabled."
18219 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:137
18221 "When prompting for keys and passphrases, guestfish normally turns echoing "
18222 "off so you cannot see what you are typing. If you are not worried about "
18223 "Tempest attacks and there is no one else in the room you can specify this "
18224 "flag to see what you are typing."
18228 #: ../fish/guestfish.pod:224
18233 #: ../fish/guestfish.pod:226
18234 msgid "B<--file file>"
18238 #: ../fish/guestfish.pod:228
18239 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
18243 #: ../fish/guestfish.pod:231
18246 " #!/usr/bin/guestfish -f\n"
18251 #: ../fish/guestfish.pod:244
18254 " guestfish --format=raw -a disk.img\n"
18259 #: ../fish/guestfish.pod:248
18262 " guestfish --format=raw -a disk.img --format -a another.img\n"
18267 #: ../fish/guestfish.pod:253
18269 "If you have untrusted raw-format guest disk images, you should use this "
18270 "option to specify the disk format. This avoids a possible security problem "
18271 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
18275 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:166
18276 msgid "B<--inspector>"
18280 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:168
18282 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
18283 "system and mount filesystems as they would be mounted on the real virtual "
18288 #: ../fish/guestfish.pod:266
18289 msgid "Typical usage is either:"
18293 #: ../fish/guestfish.pod:268
18296 " guestfish -d myguest -i\n"
18301 #: ../fish/guestfish.pod:270
18302 msgid "(for an inactive libvirt domain called I<myguest>), or:"
18306 #: ../fish/guestfish.pod:272
18309 " guestfish --ro -d myguest -i\n"
18314 #: ../fish/guestfish.pod:274
18315 msgid "(for active domains, readonly), or specify the block device directly:"
18319 #: ../fish/guestfish.pod:276
18322 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
18327 #: ../fish/guestfish.pod:278
18329 "Note that the command line syntax changed slightly over older versions of "
18330 "guestfish. You can still use the old syntax:"
18334 #: ../fish/guestfish.pod:281
18337 " guestfish [--ro] -i disk.img\n"
18342 #: ../fish/guestfish.pod:283
18345 " guestfish [--ro] -i libvirt-domain\n"
18350 #: ../fish/guestfish.pod:285
18352 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
18353 "then using other commands to mount the filesystems that were found."
18357 #: ../fish/guestfish.pod:294
18358 msgid "B<--listen>"
18362 #: ../fish/guestfish.pod:296
18364 "Fork into the background and listen for remote commands. See section "
18365 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
18369 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:177
18374 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:179
18376 "Connect to a live virtual machine. (Experimental, see "
18377 "L<guestfs(3)/ATTACHING TO RUNNING DAEMONS>)."
18381 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:182
18382 msgid "B<-m dev[:mountpoint[:options]]>"
18386 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:184
18387 msgid "B<--mount dev[:mountpoint[:options]]>"
18391 #: ../fish/guestfish.pod:308
18392 msgid "Mount the named partition or logical volume on the given mountpoint."
18396 #: ../fish/guestfish.pod:310
18397 msgid "If the mountpoint is omitted, it defaults to C</>."
18401 #: ../fish/guestfish.pod:312
18402 msgid "You have to mount something on C</> before most commands will work."
18406 #: ../fish/guestfish.pod:314
18408 "If any I<-m> or I<--mount> options are given, the guest is automatically "
18413 #: ../fish/guestfish.pod:317
18415 "If you don't know what filesystems a disk image contains, you can either run "
18416 "guestfish without this option, then list the partitions, filesystems and LVs "
18417 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
18418 "commands), or you can use the L<virt-filesystems(1)> program."
18422 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:192
18424 "The third (and rarely used) part of the mount parameter is the list of mount "
18425 "options used to mount the underlying filesystem. If this is not given, then "
18426 "the mount options are either the empty string or C<ro> (the latter if the "
18427 "I<--ro> flag is used). By specifying the mount options, you override this "
18428 "default choice. Probably the only time you would use this is to enable ACLs "
18429 "and/or extended attributes if the filesystem can support them:"
18433 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:200
18436 " -m /dev/sda1:/:acl,user_xattr\n"
18441 #: ../fish/guestfish.pod:333
18442 msgid "Using this flag is equivalent to using the C<mount-options> command."
18446 #: ../fish/guestfish.pod:335 ../fuse/guestmount.pod:202 ../resize/virt-resize.pod:435
18451 #: ../fish/guestfish.pod:337 ../fuse/guestmount.pod:204
18452 msgid "B<--no-sync>"
18456 #: ../fish/guestfish.pod:339
18458 "Disable autosync. This is enabled by default. See the discussion of "
18459 "autosync in the L<guestfs(3)> manpage."
18463 #: ../fish/guestfish.pod:342
18468 #: ../fish/guestfish.pod:344
18469 msgid "B<--new type>"
18473 #: ../fish/guestfish.pod:346
18478 #: ../fish/guestfish.pod:348
18480 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
18481 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
18482 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
18487 #: ../fish/guestfish.pod:353
18488 msgid "B<--progress-bars>"
18492 #: ../fish/guestfish.pod:355
18493 msgid "Enable progress bars, even when guestfish is used non-interactively."
18497 #: ../fish/guestfish.pod:357
18499 "Progress bars are enabled by default when guestfish is used as an "
18500 "interactive shell."
18504 #: ../fish/guestfish.pod:360
18505 msgid "B<--no-progress-bars>"
18509 #: ../fish/guestfish.pod:362
18510 msgid "Disable progress bars."
18514 #: ../fish/guestfish.pod:364
18515 msgid "B<--remote[=pid]>"
18519 #: ../fish/guestfish.pod:366
18521 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
18522 "CONTROL GUESTFISH OVER A SOCKET> below."
18526 #: ../fish/guestfish.pod:369 ../fuse/guestmount.pod:248 ../rescue/virt-rescue.pod:189
18531 #: ../fish/guestfish.pod:371 ../fuse/guestmount.pod:250 ../rescue/virt-rescue.pod:191
18536 #: ../fish/guestfish.pod:373
18538 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18539 "mounts are done read-only."
18543 #: ../fish/guestfish.pod:376 ../rescue/virt-rescue.pod:195
18545 "The option must always be used if the disk image or virtual machine might be "
18546 "running, and is generally recommended in cases where you don't need write "
18547 "access to the disk."
18551 #: ../fish/guestfish.pod:380
18553 "Note that prepared disk images created with I<-N> are not affected by this "
18554 "option. Also commands like C<add> are not affected - you have to specify "
18555 "the C<readonly:true> option explicitly if you need it."
18559 #: ../fish/guestfish.pod:384
18560 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
18564 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:262 ../rescue/virt-rescue.pod:201
18565 msgid "B<--selinux>"
18569 #: ../fish/guestfish.pod:388
18570 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
18574 #: ../fish/guestfish.pod:394
18576 "Enable very verbose messages. This is particularly useful if you find a "
18581 #: ../fish/guestfish.pod:401
18582 msgid "Display the guestfish / libguestfs version number and exit."
18586 #: ../fish/guestfish.pod:403 ../fuse/guestmount.pod:278 ../rescue/virt-rescue.pod:231
18591 #: ../fish/guestfish.pod:405 ../fuse/guestmount.pod:280 ../rescue/virt-rescue.pod:233
18596 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:282
18598 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18599 "mounts are done read-write."
18603 #: ../fish/guestfish.pod:410
18604 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
18608 #: ../fish/guestfish.pod:414
18609 msgid "Echo each command before executing it."
18613 #: ../fish/guestfish.pod:418
18614 msgid "COMMANDS ON COMMAND LINE"
18618 #: ../fish/guestfish.pod:420
18619 msgid "Any additional (non-option) arguments are treated as commands to execute."
18623 #: ../fish/guestfish.pod:423
18625 "Commands to execute should be separated by a colon (C<:>), where the colon "
18626 "is a separate parameter. Thus:"
18630 #: ../fish/guestfish.pod:426
18633 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
18638 #: ../fish/guestfish.pod:428
18640 "If there are no additional arguments, then we enter a shell, either an "
18641 "interactive shell with a prompt (if the input is a terminal) or a "
18642 "non-interactive shell."
18646 #: ../fish/guestfish.pod:432
18648 "In either command line mode or non-interactive shell, the first command that "
18649 "gives an error causes the whole shell to exit. In interactive mode (with a "
18650 "prompt) if a command fails, you can continue to enter commands."
18654 #: ../fish/guestfish.pod:437
18655 msgid "USING launch (OR run)"
18659 #: ../fish/guestfish.pod:439
18661 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
18662 "then launch it, then mount any disks you need, and finally issue "
18663 "actions/commands. So the general order of the day is:"
18667 #: ../fish/guestfish.pod:447
18668 msgid "add or -a/--add"
18672 #: ../fish/guestfish.pod:451
18673 msgid "launch (aka run)"
18677 #: ../fish/guestfish.pod:455
18678 msgid "mount or -m/--mount"
18682 #: ../fish/guestfish.pod:459
18683 msgid "any other commands"
18687 #: ../fish/guestfish.pod:463
18689 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
18690 "guest before mounting or performing any other commands."
18694 #: ../fish/guestfish.pod:466
18696 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
18697 "I<--new> options were given then C<run> is done automatically, simply "
18698 "because guestfish can't perform the action you asked for without doing this."
18702 #: ../fish/guestfish.pod:471
18703 msgid "OPENING DISKS FOR READ AND WRITE"
18707 #: ../fish/guestfish.pod:473
18709 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
18710 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
18711 "I<-i> and I<-m> open disk images read-only or for writing."
18715 #: ../fish/guestfish.pod:478
18717 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
18718 "opening disk images supplied on the command line for write. To open a disk "
18719 "image read-only you have to do I<-a image --ro>."
18723 #: ../fish/guestfish.pod:482
18725 "This matters: If you accidentally open a live VM disk image writable then "
18726 "you will cause irreversible disk corruption."
18730 #: ../fish/guestfish.pod:485
18732 "In a future libguestfs we intend to change the default the other way. Disk "
18733 "images will be opened read-only. You will have to either specify "
18734 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
18735 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
18736 "access for disk images specified by those other command line options."
18740 #: ../fish/guestfish.pod:492
18742 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
18743 "which does nothing (it is already the default). However it is highly "
18744 "recommended that you use this option to indicate that you need write access, "
18745 "and prepare your scripts for the day when this option will be required for "
18750 #: ../fish/guestfish.pod:498
18752 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
18753 "other libguestfs program apart from guestfish and guestmount."
18757 #: ../fish/guestfish.pod:501
18762 #: ../fish/guestfish.pod:503
18764 "You can quote ordinary parameters using either single or double quotes. For "
18769 #: ../fish/guestfish.pod:506
18772 " add \"file with a space.img\"\n"
18777 #: ../fish/guestfish.pod:508
18780 " rm '/file name'\n"
18785 #: ../fish/guestfish.pod:510
18793 #: ../fish/guestfish.pod:512
18795 "A few commands require a list of strings to be passed. For these, use a "
18796 "whitespace-separated list, enclosed in quotes. Strings containing "
18797 "whitespace to be passed through must be enclosed in single quotes. A "
18798 "literal single quote must be escaped with a backslash."
18802 #: ../fish/guestfish.pod:517
18805 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
18806 " command \"/bin/echo 'foo bar'\"\n"
18807 " command \"/bin/echo \\'foo\\'\"\n"
18812 #: ../fish/guestfish.pod:521
18813 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
18817 #: ../fish/guestfish.pod:523
18819 "In double-quoted arguments (only) use backslash to insert special "
18824 #: ../fish/guestfish.pod:528
18829 #: ../fish/guestfish.pod:530
18830 msgid "Alert (bell) character."
18834 #: ../fish/guestfish.pod:532
18839 #: ../fish/guestfish.pod:534
18840 msgid "Backspace character."
18844 #: ../fish/guestfish.pod:536
18849 #: ../fish/guestfish.pod:538
18850 msgid "Form feed character."
18854 #: ../fish/guestfish.pod:540
18859 #: ../fish/guestfish.pod:542
18860 msgid "Newline character."
18864 #: ../fish/guestfish.pod:544
18869 #: ../fish/guestfish.pod:546
18870 msgid "Carriage return character."
18874 #: ../fish/guestfish.pod:548
18879 #: ../fish/guestfish.pod:550
18880 msgid "Horizontal tab character."
18884 #: ../fish/guestfish.pod:552
18889 #: ../fish/guestfish.pod:554
18890 msgid "Vertical tab character."
18894 #: ../fish/guestfish.pod:556
18899 #: ../fish/guestfish.pod:558
18900 msgid "A literal double quote character."
18904 #: ../fish/guestfish.pod:560
18909 #: ../fish/guestfish.pod:562
18911 "A character with octal value I<ooo>. There must be precisely 3 octal digits "
18916 #: ../fish/guestfish.pod:565
18921 #: ../fish/guestfish.pod:567
18922 msgid "A character with hex value I<hh>. There must be precisely 2 hex digits."
18926 #: ../fish/guestfish.pod:570
18928 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
18933 #: ../fish/guestfish.pod:573
18938 #: ../fish/guestfish.pod:575
18939 msgid "A literal backslash character."
18943 #: ../fish/guestfish.pod:579
18944 msgid "OPTIONAL ARGUMENTS"
18948 #: ../fish/guestfish.pod:581
18950 "Some commands take optional arguments. These arguments appear in this "
18951 "documentation as C<[argname:..]>. You can use them as in these examples:"
18955 #: ../fish/guestfish.pod:585
18958 " add-drive-opts filename\n"
18963 #: ../fish/guestfish.pod:587
18966 " add-drive-opts filename readonly:true\n"
18971 #: ../fish/guestfish.pod:589
18974 " add-drive-opts filename format:qcow2 readonly:false\n"
18979 #: ../fish/guestfish.pod:591
18981 "Each optional argument can appear at most once. All optional arguments must "
18982 "appear after the required ones."
18986 #: ../fish/guestfish.pod:594
18991 #: ../fish/guestfish.pod:596
18992 msgid "This section applies to all commands which can take integers as parameters."
18996 #: ../fish/guestfish.pod:599
18997 msgid "SIZE SUFFIX"
19001 #: ../fish/guestfish.pod:601
19003 "When the command takes a parameter measured in bytes, you can use one of the "
19004 "following suffixes to specify kilobytes, megabytes and larger sizes:"
19008 #: ../fish/guestfish.pod:607
19009 msgid "B<k> or B<K> or B<KiB>"
19013 #: ../fish/guestfish.pod:609
19014 msgid "The size in kilobytes (multiplied by 1024)."
19018 #: ../fish/guestfish.pod:611
19023 #: ../fish/guestfish.pod:613
19024 msgid "The size in SI 1000 byte units."
19028 #: ../fish/guestfish.pod:615
19029 msgid "B<M> or B<MiB>"
19033 #: ../fish/guestfish.pod:617
19034 msgid "The size in megabytes (multiplied by 1048576)."
19038 #: ../fish/guestfish.pod:619
19043 #: ../fish/guestfish.pod:621
19044 msgid "The size in SI 1000000 byte units."
19048 #: ../fish/guestfish.pod:623
19049 msgid "B<G> or B<GiB>"
19053 #: ../fish/guestfish.pod:625
19054 msgid "The size in gigabytes (multiplied by 2**30)."
19058 #: ../fish/guestfish.pod:627
19063 #: ../fish/guestfish.pod:629
19064 msgid "The size in SI 10**9 byte units."
19068 #: ../fish/guestfish.pod:631
19069 msgid "B<T> or B<TiB>"
19073 #: ../fish/guestfish.pod:633
19074 msgid "The size in terabytes (multiplied by 2**40)."
19078 #: ../fish/guestfish.pod:635
19083 #: ../fish/guestfish.pod:637
19084 msgid "The size in SI 10**12 byte units."
19088 #: ../fish/guestfish.pod:639
19089 msgid "B<P> or B<PiB>"
19093 #: ../fish/guestfish.pod:641
19094 msgid "The size in petabytes (multiplied by 2**50)."
19098 #: ../fish/guestfish.pod:643
19103 #: ../fish/guestfish.pod:645
19104 msgid "The size in SI 10**15 byte units."
19108 #: ../fish/guestfish.pod:647
19109 msgid "B<E> or B<EiB>"
19113 #: ../fish/guestfish.pod:649
19114 msgid "The size in exabytes (multiplied by 2**60)."
19118 #: ../fish/guestfish.pod:651
19123 #: ../fish/guestfish.pod:653
19124 msgid "The size in SI 10**18 byte units."
19128 #: ../fish/guestfish.pod:655
19129 msgid "B<Z> or B<ZiB>"
19133 #: ../fish/guestfish.pod:657
19134 msgid "The size in zettabytes (multiplied by 2**70)."
19138 #: ../fish/guestfish.pod:659
19143 #: ../fish/guestfish.pod:661
19144 msgid "The size in SI 10**21 byte units."
19148 #: ../fish/guestfish.pod:663
19149 msgid "B<Y> or B<YiB>"
19153 #: ../fish/guestfish.pod:665
19154 msgid "The size in yottabytes (multiplied by 2**80)."
19158 #: ../fish/guestfish.pod:667
19163 #: ../fish/guestfish.pod:669
19164 msgid "The size in SI 10**24 byte units."
19168 #: ../fish/guestfish.pod:675
19171 " truncate-size /file 1G\n"
19176 #: ../fish/guestfish.pod:677
19177 msgid "would truncate the file to 1 gigabyte."
19181 #: ../fish/guestfish.pod:679
19183 "Be careful because a few commands take sizes in kilobytes or megabytes "
19184 "(eg. the parameter to L</memsize> is specified in megabytes already). "
19185 "Adding a suffix will probably not do what you expect."
19189 #: ../fish/guestfish.pod:683
19190 msgid "OCTAL AND HEXADECIMAL NUMBERS"
19194 #: ../fish/guestfish.pod:685
19196 "For specifying the radix (base) use the C convention: C<0> to prefix an "
19197 "octal number or C<0x> to prefix a hexadecimal number. For example:"
19201 #: ../fish/guestfish.pod:688
19204 " 1234 decimal number 1234\n"
19205 " 02322 octal number, equivalent to decimal 1234\n"
19206 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
19211 #: ../fish/guestfish.pod:692
19213 "When using the C<chmod> command, you almost always want to specify an octal "
19214 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
19215 "L<chmod(1)> program):"
19219 #: ../fish/guestfish.pod:696
19222 " chmod 0777 /public # OK\n"
19223 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
19228 #: ../fish/guestfish.pod:699
19230 "Commands that return numbers usually print them in decimal, but some "
19231 "commands print numbers in other radices (eg. C<umask> prints the mode in "
19232 "octal, preceeded by C<0>)."
19236 #: ../fish/guestfish.pod:703
19237 msgid "WILDCARDS AND GLOBBING"
19241 #: ../fish/guestfish.pod:705
19243 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
19244 "(globbing) by default. So for example the following will not do what you "
19249 #: ../fish/guestfish.pod:709
19257 #: ../fish/guestfish.pod:711
19259 "Assuming you don't have a directory called literally C</home/*> then the "
19260 "above command will return an error."
19264 #: ../fish/guestfish.pod:714
19265 msgid "To perform wildcard expansion, use the C<glob> command."
19269 #: ../fish/guestfish.pod:716
19272 " glob rm-rf /home/*\n"
19277 #: ../fish/guestfish.pod:718
19279 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
19280 "many times), equivalent to:"
19284 #: ../fish/guestfish.pod:721
19287 " rm-rf /home/jim\n"
19288 " rm-rf /home/joe\n"
19289 " rm-rf /home/mary\n"
19294 #: ../fish/guestfish.pod:725
19295 msgid "C<glob> only works on simple guest paths and not on device names."
19299 #: ../fish/guestfish.pod:727
19301 "If you have several parameters, each containing a wildcard, then glob will "
19302 "perform a Cartesian product."
19306 #: ../fish/guestfish.pod:730
19311 #: ../fish/guestfish.pod:732
19313 "Any line which starts with a I<#> character is treated as a comment and "
19314 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
19315 "a command. For example:"
19319 #: ../fish/guestfish.pod:736
19322 " # this is a comment\n"
19323 " # this is a comment\n"
19324 " foo # NOT a comment\n"
19329 #: ../fish/guestfish.pod:740
19330 msgid "Blank lines are also ignored."
19334 #: ../fish/guestfish.pod:742
19335 msgid "RUNNING COMMANDS LOCALLY"
19339 #: ../fish/guestfish.pod:744
19341 "Any line which starts with a I<!> character is treated as a command sent to "
19342 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
19346 #: ../fish/guestfish.pod:748
19350 " tgz-out /remote local/remote-data.tar.gz\n"
19355 #: ../fish/guestfish.pod:751
19357 "will create a directory C<local> on the host, and then export the contents "
19358 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
19359 "(See C<tgz-out>)."
19363 #: ../fish/guestfish.pod:755
19365 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
19366 "effect, due to the way that subprocesses work in Unix."
19370 #: ../fish/guestfish.pod:758
19371 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
19375 #: ../fish/guestfish.pod:760
19377 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
19378 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
19379 "and executed as guestfish commands."
19383 #: ../fish/guestfish.pod:764
19385 "Thus you can use shell script to construct arbitrary guestfish commands "
19386 "which are then parsed by guestfish."
19390 #: ../fish/guestfish.pod:767
19392 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
19393 "through C</foo.100>) using guestfish commands alone. However this is simple "
19394 "if we use a shell script to create the guestfish commands for us:"
19398 #: ../fish/guestfish.pod:772
19401 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
19406 #: ../fish/guestfish.pod:774
19407 msgid "or with names like C</foo.001>:"
19411 #: ../fish/guestfish.pod:776
19414 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
19419 #: ../fish/guestfish.pod:778
19421 "When using guestfish interactively it can be helpful to just run the shell "
19422 "script first (ie. remove the initial C<E<lt>> character so it is just an "
19423 "ordinary I<!> local command), see what guestfish commands it would run, and "
19424 "when you are happy with those prepend the C<E<lt>> character to run the "
19425 "guestfish commands for real."
19429 #: ../fish/guestfish.pod:784
19434 #: ../fish/guestfish.pod:786
19436 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
19437 "command (a guestfish command) to the second command (any host command). For "
19442 #: ../fish/guestfish.pod:790
19445 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
19450 #: ../fish/guestfish.pod:792
19452 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
19453 "program). The above command would list all accounts in the guest filesystem "
19454 "which have UID 0, ie. root accounts including backdoors. Other examples:"
19458 #: ../fish/guestfish.pod:797
19461 " hexdump /bin/ls | head\n"
19462 " list-devices | tail -1\n"
19463 " tgz-out / - | tar ztf -\n"
19468 #: ../fish/guestfish.pod:801
19470 "The space before the pipe symbol is required, any space after the pipe "
19471 "symbol is optional. Everything after the pipe symbol is just passed "
19472 "straight to the host shell, so it can contain redirections, globs and "
19473 "anything else that makes sense on the host side."
19477 #: ../fish/guestfish.pod:806
19479 "To use a literal argument which begins with a pipe symbol, you have to quote "
19484 #: ../fish/guestfish.pod:809
19492 #: ../fish/guestfish.pod:811
19493 msgid "HOME DIRECTORIES"
19497 #: ../fish/guestfish.pod:813
19499 "If a parameter starts with the character C<~> then the tilde may be expanded "
19500 "as a home directory path (either C<~> for the current user's home directory, "
19501 "or C<~user> for another user)."
19505 #: ../fish/guestfish.pod:817
19507 "Note that home directory expansion happens for users known I<on the host>, "
19508 "not in the guest filesystem."
19512 #: ../fish/guestfish.pod:820
19514 "To use a literal argument which begins with a tilde, you have to quote it, "
19519 #: ../fish/guestfish.pod:823
19527 #: ../fish/guestfish.pod:825 ../src/guestfs.pod:534
19528 msgid "ENCRYPTED DISKS"
19532 #: ../fish/guestfish.pod:827
19534 "Libguestfs has some support for Linux guests encrypted according to the "
19535 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
19536 "disk encryption systems used by modern Linux guests. Currently only "
19537 "LVM-on-LUKS is supported."
19541 #: ../fish/guestfish.pod:832
19542 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
19546 #: ../fish/guestfish.pod:834
19549 " ><fs> vfs-type /dev/sda2\n"
19555 #: ../fish/guestfish.pod:837
19557 "Then open those devices using L</luks-open>. This creates a device-mapper "
19558 "device called C</dev/mapper/luksdev>."
19562 #: ../fish/guestfish.pod:840
19565 " ><fs> luks-open /dev/sda2 luksdev\n"
19566 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
19571 #: ../fish/guestfish.pod:843
19573 "Finally you have to tell LVM to scan for volume groups on the newly created "
19578 #: ../fish/guestfish.pod:846
19582 " vg-activate-all true\n"
19587 #: ../fish/guestfish.pod:849
19588 msgid "The logical volume(s) can now be mounted in the usual way."
19592 #: ../fish/guestfish.pod:851
19594 "Before closing a LUKS device you must unmount any logical volumes on it and "
19595 "deactivate the volume groups by calling C<vg-activate false VG> on each "
19596 "one. Then you can close the mapper device:"
19600 #: ../fish/guestfish.pod:855
19603 " vg-activate false /dev/VG\n"
19604 " luks-close /dev/mapper/luksdev\n"
19609 #: ../fish/guestfish.pod:860
19611 "If a path is prefixed with C<win:> then you can use Windows-style drive "
19612 "letters and paths (with some limitations). The following commands are "
19617 #: ../fish/guestfish.pod:864
19620 " file /WINDOWS/system32/config/system.LOG\n"
19625 #: ../fish/guestfish.pod:866
19628 " file win:\\windows\\system32\\config\\system.log\n"
19633 #: ../fish/guestfish.pod:868
19636 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
19641 #: ../fish/guestfish.pod:870
19643 "The parameter is rewritten \"behind the scenes\" by looking up the position "
19644 "where the drive is mounted, prepending that to the path, changing all "
19645 "backslash characters to forward slash, then resolving the result using "
19646 "L</case-sensitive-path>. For example if the E: drive was mounted on C</e> "
19647 "then the parameter might be rewritten like this:"
19651 #: ../fish/guestfish.pod:876
19654 " win:e:\\foo\\bar => /e/FOO/bar\n"
19659 #: ../fish/guestfish.pod:878
19660 msgid "This only works in argument positions that expect a path."
19664 #: ../fish/guestfish.pod:880
19665 msgid "UPLOADING AND DOWNLOADING FILES"
19669 #: ../fish/guestfish.pod:882
19671 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
19672 "others which upload from or download to a local file, you can use the "
19673 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
19677 #: ../fish/guestfish.pod:886
19685 #: ../fish/guestfish.pod:888
19686 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
19690 #: ../fish/guestfish.pod:891
19693 " tar-out /etc - | tar tf -\n"
19698 #: ../fish/guestfish.pod:893
19700 "writes the tarball to stdout and then pipes that into the external \"tar\" "
19701 "command (see L</PIPES>)."
19705 #: ../fish/guestfish.pod:896
19707 "When using C<-> to read from stdin, the input is read up to the end of "
19708 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
19709 "some arbitrary end marker:"
19713 #: ../fish/guestfish.pod:900
19716 " upload -<<END /foo\n"
19725 #: ../fish/guestfish.pod:906
19727 "Any string of characters can be used instead of C<END>. The end marker must "
19728 "appear on a line of its own, without any preceeding or following characters "
19729 "(not even spaces)."
19733 #: ../fish/guestfish.pod:910
19735 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
19736 "upload local files (so-called \"FileIn\" parameters in the generator)."
19740 #: ../fish/guestfish.pod:913
19741 msgid "EXIT ON ERROR BEHAVIOUR"
19745 #: ../fish/guestfish.pod:915
19747 "By default, guestfish will ignore any errors when in interactive mode "
19748 "(ie. taking commands from a human over a tty), and will exit on the first "
19749 "error in non-interactive mode (scripts, commands given on the command line)."
19753 #: ../fish/guestfish.pod:920
19755 "If you prefix a command with a I<-> character, then that command will not "
19756 "cause guestfish to exit, even if that (one) command returns an error."
19760 #: ../fish/guestfish.pod:924
19761 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
19765 #: ../fish/guestfish.pod:926
19767 "Guestfish can be remote-controlled over a socket. This is useful "
19768 "particularly in shell scripts where you want to make several different "
19769 "changes to a filesystem, but you don't want the overhead of starting up a "
19770 "guestfish process each time."
19774 #: ../fish/guestfish.pod:931
19775 msgid "Start a guestfish server process using:"
19779 #: ../fish/guestfish.pod:933
19782 " eval \"`guestfish --listen`\"\n"
19787 #: ../fish/guestfish.pod:935
19788 msgid "and then send it commands by doing:"
19792 #: ../fish/guestfish.pod:937
19795 " guestfish --remote cmd [...]\n"
19800 #: ../fish/guestfish.pod:939
19801 msgid "To cause the server to exit, send it the exit command:"
19805 #: ../fish/guestfish.pod:943
19807 "Note that the server will normally exit if there is an error in a command. "
19808 "You can change this in the usual way. See section L</EXIT ON ERROR "
19813 #: ../fish/guestfish.pod:947
19814 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
19818 #: ../fish/guestfish.pod:949
19820 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
19821 "is how the I<--remote> option knows where to send the commands. You can "
19822 "have several guestfish listener processes running using:"
19826 #: ../fish/guestfish.pod:953
19829 " eval \"`guestfish --listen`\"\n"
19830 " pid1=$GUESTFISH_PID\n"
19831 " eval \"`guestfish --listen`\"\n"
19832 " pid2=$GUESTFISH_PID\n"
19834 " guestfish --remote=$pid1 cmd\n"
19835 " guestfish --remote=$pid2 cmd\n"
19840 #: ../fish/guestfish.pod:961
19841 msgid "REMOTE CONTROL AND CSH"
19845 #: ../fish/guestfish.pod:963
19847 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
19852 #: ../fish/guestfish.pod:966
19855 " eval \"`guestfish --listen --csh`\"\n"
19860 #: ../fish/guestfish.pod:968
19861 msgid "REMOTE CONTROL DETAILS"
19865 #: ../fish/guestfish.pod:970
19867 "Remote control happens over a Unix domain socket called "
19868 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
19869 "of the process, and C<$PID> is the process ID of the server."
19873 #: ../fish/guestfish.pod:974
19874 msgid "Guestfish client and server versions must match exactly."
19878 #: ../fish/guestfish.pod:976
19879 msgid "USING REMOTE CONTROL ROBUSTLY FROM SHELL SCRIPTS"
19883 #: ../fish/guestfish.pod:978
19885 "From Bash, you can use the following code which creates a guestfish "
19886 "instance, correctly quotes the command line, handles failure to start, and "
19887 "cleans up guestfish when the script exits:"
19891 #: ../fish/guestfish.pod:982 ../src/guestfs.pod:980
19899 #: ../fish/guestfish.pod:986
19902 " guestfish[0]=\"guestfish\"\n"
19903 " guestfish[1]=\"--listen\"\n"
19904 " guestfish[2]=\"--ro\"\n"
19905 " guestfish[3]=\"-a\"\n"
19906 " guestfish[4]=\"disk.img\"\n"
19911 #: ../fish/guestfish.pod:992
19914 " GUESTFISH_PID=\n"
19915 " eval $(\"${guestfish[@]}\")\n"
19916 " if [ -z \"$GUESTFISH_PID\" ]; then\n"
19917 " echo \"error: guestfish didn't start up, see error messages above\"\n"
19924 #: ../fish/guestfish.pod:999
19927 " cleanup_guestfish ()\n"
19929 " guestfish --remote -- exit >/dev/null 2>&1 ||:\n"
19931 " trap cleanup_guestfish EXIT ERR\n"
19936 #: ../fish/guestfish.pod:1005
19939 " guestfish --remote -- run\n"
19944 #: ../fish/guestfish.pod:1007
19952 #: ../fish/guestfish.pod:1009
19953 msgid "REMOTE CONTROL RUN COMMAND HANGING"
19957 #: ../fish/guestfish.pod:1011
19959 "Using the C<run> (or C<launch>) command remotely in a command substitution "
19960 "context hangs, ie. don't do (note the backquotes):"
19964 #: ../fish/guestfish.pod:1014
19967 " a=`guestfish --remote run`\n"
19972 #: ../fish/guestfish.pod:1016
19974 "Since the C<run> command produces no output on stdout, this is not useful "
19975 "anyway. For further information see "
19976 "L<https://bugzilla.redhat.com/show_bug.cgi?id=592910>."
19980 #: ../fish/guestfish.pod:1020
19981 msgid "PREPARED DISK IMAGES"
19985 #: ../fish/guestfish.pod:1022
19987 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
19988 "preformatted disk images that guestfish can make for you to save typing. "
19989 "This is particularly useful for testing purposes. This option is used "
19990 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
19991 "can be mixed with I<-a>)."
19995 #: ../fish/guestfish.pod:1028
19997 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
19998 "the second and so on. Existing files in the current directory are "
20003 #: ../fish/guestfish.pod:1032
20005 "The type briefly describes how the disk should be sized, partitioned, how "
20006 "filesystem(s) should be created, and how content should be added. "
20007 "Optionally the type can be followed by extra parameters, separated by C<:> "
20008 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
20009 "sparsely-allocated disk, containing a single partition, with the partition "
20010 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
20011 "on a 1GB disk instead."
20015 #: ../fish/guestfish.pod:1040
20016 msgid "To list the available types and any extra parameters they take, run:"
20020 #: ../fish/guestfish.pod:1044
20022 "Note that the prepared filesystem is not mounted. You would usually have to "
20023 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
20027 #: ../fish/guestfish.pod:1048
20029 "If any I<-N> or I<--new> options are given, the guest is automatically "
20034 #: ../fish/guestfish.pod:1053
20035 msgid "Create a 100MB disk with an ext4-formatted partition:"
20039 #: ../fish/guestfish.pod:1055
20042 " guestfish -N fs:ext4\n"
20047 #: ../fish/guestfish.pod:1057
20048 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
20052 #: ../fish/guestfish.pod:1059
20055 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
20060 #: ../fish/guestfish.pod:1061
20061 msgid "Create a blank 200MB disk:"
20065 #: ../fish/guestfish.pod:1063
20068 " guestfish -N disk:200M\n"
20073 #: ../fish/guestfish.pod:1065
20074 msgid "PROGRESS BARS"
20078 #: ../fish/guestfish.pod:1067
20080 "Some (not all) long-running commands send progress notification messages as "
20081 "they are running. Guestfish turns these messages into progress bars."
20085 #: ../fish/guestfish.pod:1071
20087 "When a command that supports progress bars takes longer than two seconds to "
20088 "run, and if progress bars are enabled, then you will see one appearing below "
20093 #: ../fish/guestfish.pod:1075
20096 " ><fs> copy-size /large-file /another-file 2048M\n"
20097 " / 10% [#####-----------------------------------------] 00:30\n"
20102 #: ../fish/guestfish.pod:1078
20104 "The spinner on the left hand side moves round once for every progress "
20105 "notification received from the backend. This is a (reasonably) golden "
20106 "assurance that the command is \"doing something\" even if the progress bar "
20107 "is not moving, because the command is able to send the progress "
20108 "notifications. When the bar reaches 100% and the command finishes, the "
20109 "spinner disappears."
20113 #: ../fish/guestfish.pod:1085
20115 "Progress bars are enabled by default when guestfish is used interactively. "
20116 "You can enable them even for non-interactive modes using I<--progress-bars>, "
20117 "and you can disable them completely using I<--no-progress-bars>."
20121 #: ../fish/guestfish.pod:1090
20122 msgid "GUESTFISH COMMANDS"
20126 #: ../fish/guestfish.pod:1092
20128 "The commands in this section are guestfish convenience commands, in other "
20129 "words, they are not part of the L<guestfs(3)> API."
20133 #: ../fish/guestfish.pod:1095
20138 #: ../fish/guestfish.pod:1097
20147 #: ../fish/guestfish.pod:1100
20148 msgid "Without any parameter, this provides general help."
20152 #: ../fish/guestfish.pod:1102
20153 msgid "With a C<cmd> parameter, this displays detailed help for that command."
20157 #: ../fish/guestfish.pod:1104
20158 msgid "quit | exit"
20162 #: ../fish/guestfish.pod:1106
20163 msgid "This exits guestfish. You can also use C<^D> key."
20167 #: ../fish/guestfish.pod:1108
20168 msgid "@FISH_COMMANDS@"
20172 #: ../fish/guestfish.pod:1110
20177 #: ../fish/guestfish.pod:1112 ../src/guestfs.pod:1520
20182 #: ../fish/guestfish.pod:1116
20184 "guestfish returns 0 if the commands completed without error, or 1 if there "
20189 #: ../fish/guestfish.pod:1123
20194 #: ../fish/guestfish.pod:1125
20196 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
20201 #: ../fish/guestfish.pod:1128 ../src/guestfs.pod:3213
20202 msgid "FEBOOTSTRAP_KERNEL"
20206 #: ../fish/guestfish.pod:1130 ../src/guestfs.pod:3215
20207 msgid "FEBOOTSTRAP_MODULES"
20211 #: ../fish/guestfish.pod:1132 ../src/guestfs.pod:3217
20213 "These two environment variables allow the kernel that libguestfs uses in the "
20214 "appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not set, then the "
20215 "most recent host kernel is chosen. For more information about kernel "
20216 "selection, see L<febootstrap-supermin-helper(8)>. This feature is only "
20217 "available in febootstrap E<ge> 3.8."
20221 #: ../fish/guestfish.pod:1138
20222 msgid "GUESTFISH_DISPLAY_IMAGE"
20226 #: ../fish/guestfish.pod:1140
20228 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
20229 "If not set, it uses L<display(1)>."
20233 #: ../fish/guestfish.pod:1143
20234 msgid "GUESTFISH_PID"
20238 #: ../fish/guestfish.pod:1145
20240 "Used with the I<--remote> option to specify the remote guestfish process to "
20241 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
20245 #: ../fish/guestfish.pod:1149
20250 #: ../fish/guestfish.pod:1151
20252 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
20253 "not specified, the external L<hexedit(1)> program is used."
20257 #: ../fish/guestfish.pod:1155
20262 #: ../fish/guestfish.pod:1157
20264 "If compiled with GNU readline support, various files in the home directory "
20265 "can be used. See L</FILES>."
20269 #: ../fish/guestfish.pod:1160 ../src/guestfs.pod:3223
20270 msgid "LIBGUESTFS_APPEND"
20274 #: ../fish/guestfish.pod:1162 ../src/guestfs.pod:3225
20275 msgid "Pass additional options to the guest kernel."
20279 #: ../fish/guestfish.pod:1164 ../src/guestfs.pod:3227
20280 msgid "LIBGUESTFS_DEBUG"
20284 #: ../fish/guestfish.pod:1166
20286 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
20287 "effect as using the B<-v> option."
20291 #: ../fish/guestfish.pod:1169 ../src/guestfs.pod:3232
20292 msgid "LIBGUESTFS_MEMSIZE"
20296 #: ../fish/guestfish.pod:1171 ../src/guestfs.pod:3234
20297 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
20301 #: ../fish/guestfish.pod:1174 ../src/guestfs.pod:3237
20304 " LIBGUESTFS_MEMSIZE=700\n"
20309 #: ../fish/guestfish.pod:1176 ../src/guestfs.pod:3239
20310 msgid "LIBGUESTFS_PATH"
20314 #: ../fish/guestfish.pod:1178
20316 "Set the path that guestfish uses to search for kernel and initrd.img. See "
20317 "the discussion of paths in L<guestfs(3)>."
20321 #: ../fish/guestfish.pod:1181 ../src/guestfs.pod:3244
20322 msgid "LIBGUESTFS_QEMU"
20326 #: ../fish/guestfish.pod:1183 ../src/guestfs.pod:3246
20328 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
20329 "which was found at compile time by the configure script is used."
20333 #: ../fish/guestfish.pod:1187 ../src/guestfs.pod:3252
20334 msgid "LIBGUESTFS_TRACE"
20338 #: ../fish/guestfish.pod:1189
20339 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
20343 #: ../fish/guestfish.pod:1191
20348 #: ../fish/guestfish.pod:1193
20350 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
20355 #: ../fish/guestfish.pod:1196 ../sparsify/virt-sparsify.pod:236 ../src/guestfs.pod:3257
20360 #: ../fish/guestfish.pod:1198 ../src/guestfs.pod:3259
20362 "Location of temporary directory, defaults to C</tmp> except for the cached "
20363 "supermin appliance which defaults to C</var/tmp>."
20367 #: ../fish/guestfish.pod:1201 ../src/guestfs.pod:3262
20369 "If libguestfs was compiled to use the supermin appliance then the real "
20370 "appliance is cached in this directory, shared between all handles belonging "
20371 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
20372 "use in case C</var/tmp> is not large enough."
20376 #: ../fish/guestfish.pod:1209 ../fuse/guestmount.pod:297 ../rescue/virt-rescue.pod:310
20381 #: ../fish/guestfish.pod:1213 ../fuse/guestmount.pod:301 ../rescue/virt-rescue.pod:314
20382 msgid "$HOME/.libguestfs-tools.rc"
20386 #: ../fish/guestfish.pod:1215 ../fuse/guestmount.pod:303 ../rescue/virt-rescue.pod:316
20387 msgid "/etc/libguestfs-tools.conf"
20391 #: ../fish/guestfish.pod:1217 ../fuse/guestmount.pod:305 ../rescue/virt-rescue.pod:318
20393 "This configuration file controls the default read-only or read-write mode "
20394 "(I<--ro> or I<--rw>)."
20398 #: ../fish/guestfish.pod:1220
20399 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
20403 #: ../fish/guestfish.pod:1222
20404 msgid "$HOME/.guestfish"
20408 #: ../fish/guestfish.pod:1224
20410 "If compiled with GNU readline support, then the command history is saved in "
20415 #: ../fish/guestfish.pod:1227
20416 msgid "$HOME/.inputrc"
20420 #: ../fish/guestfish.pod:1229
20421 msgid "/etc/inputrc"
20425 #: ../fish/guestfish.pod:1231
20427 "If compiled with GNU readline support, then these files can be used to "
20428 "configure readline. For further information, please see "
20429 "L<readline(3)/INITIALIZATION FILE>."
20433 #: ../fish/guestfish.pod:1235
20434 msgid "To write rules which only apply to guestfish, use:"
20438 #: ../fish/guestfish.pod:1237
20448 #: ../fish/guestfish.pod:1241
20450 "Variables that you can set in inputrc that change the behaviour of guestfish "
20451 "in useful ways include:"
20455 #: ../fish/guestfish.pod:1246
20456 msgid "completion-ignore-case (default: on)"
20460 #: ../fish/guestfish.pod:1248
20462 "By default, guestfish will ignore case when tab-completing paths on the "
20467 #: ../fish/guestfish.pod:1251
20470 " set completion-ignore-case off\n"
20475 #: ../fish/guestfish.pod:1253
20476 msgid "to make guestfish case sensitive."
20480 #: ../fish/guestfish.pod:1257
20485 #: ../fish/guestfish.pod:1259
20486 msgid "test2.img (etc)"
20490 #: ../fish/guestfish.pod:1261
20492 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
20493 "will be created in the file C<test1.img> in the current directory. The "
20494 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
20495 "the same name will be overwritten."
20499 #: ../fish/guestfish.pod:1270
20501 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-alignment-scan(1)>, "
20502 "L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, "
20503 "L<virt-edit(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, "
20504 "L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, "
20505 "L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
20506 "L<virt-sparsify(1)>, L<virt-sysprep(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, "
20507 "L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<display(1)>, L<hexedit(1)>, "
20508 "L<febootstrap-supermin-helper(8)>."
20512 #: ../fish/guestfish.pod:1302 ../src/guestfs.pod:3354 ../test-tool/libguestfs-test-tool.pod:112
20513 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
20517 #: ../fish/virt-copy-in.pod:5
20518 msgid "virt-copy-in - Copy files and directories into a virtual machine disk image."
20522 #: ../fish/virt-copy-in.pod:9
20525 " virt-copy-in -a disk.img file|dir [file|dir ...] /destination\n"
20530 #: ../fish/virt-copy-in.pod:11
20533 " virt-copy-in -d domain file|dir [file|dir ...] /destination\n"
20538 #: ../fish/virt-copy-in.pod:15
20540 "Using C<virt-copy-in> on live virtual machines can be dangerous, potentially "
20541 "causing disk corruption. The virtual machine must be shut down before you "
20542 "use this command."
20546 #: ../fish/virt-copy-in.pod:21
20548 "C<virt-copy-in> copies files and directories from the local disk into a "
20549 "virtual machine disk image or named libvirt domain."
20553 #: ../fish/virt-copy-in.pod:24
20555 "You can give one of more filenames and directories on the command line. "
20556 "Directories are copied in recursively. The final parameter must be the "
20557 "destination directory in the disk image which must be an absolute path "
20558 "starting with a C</> character."
20562 #: ../fish/virt-copy-in.pod:33
20565 " virt-copy-in -d MyGuest resolv.conf /etc\n"
20570 #: ../fish/virt-copy-in.pod:35 ../fish/virt-tar-in.pod:32
20571 msgid "Upload a home directory to a guest:"
20575 #: ../fish/virt-copy-in.pod:37
20578 " virt-copy-in -d MyGuest skel /home\n"
20583 #: ../fish/virt-copy-in.pod:39 ../fish/virt-copy-out.pod:28 ../fish/virt-tar-in.pod:36 ../fish/virt-tar-out.pod:30
20584 msgid "JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH"
20588 #: ../fish/virt-copy-in.pod:41
20590 "This command is just a simple shell script wrapper around the "
20591 "L<guestfish(1)> C<copy-in> command. For anything more complex than a "
20592 "trivial copy, you are probably better off using guestfish directly."
20596 #: ../fish/virt-copy-in.pod:47 ../fish/virt-copy-out.pod:36 ../fish/virt-tar-in.pod:44 ../fish/virt-tar-out.pod:38
20598 "Since the shell script just passes options straight to guestfish, read "
20599 "L<guestfish(1)> to see the full list of options."
20603 #: ../fish/virt-copy-in.pod:52
20605 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
20606 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
20610 #: ../fish/virt-copy-in.pod:66 ../fish/virt-copy-out.pod:55 ../fish/virt-tar-in.pod:64 ../fish/virt-tar-out.pod:57
20611 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
20615 #: ../fish/virt-copy-out.pod:5
20617 "virt-copy-out - Copy files and directories out of a virtual machine disk "
20622 #: ../fish/virt-copy-out.pod:9
20625 " virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir\n"
20630 #: ../fish/virt-copy-out.pod:11
20633 " virt-copy-out -d domain /file|dir [/file|dir ...] localdir\n"
20638 #: ../fish/virt-copy-out.pod:15
20640 "C<virt-copy-out> copies files and directories out of a virtual machine disk "
20641 "image or named libvirt domain."
20645 #: ../fish/virt-copy-out.pod:18
20647 "You can give one of more filenames and directories on the command line. "
20648 "Directories are copied out recursively."
20652 #: ../fish/virt-copy-out.pod:23
20653 msgid "Download the home directories from a virtual machine:"
20657 #: ../fish/virt-copy-out.pod:25
20661 " virt-copy-out -d MyGuest /home homes\n"
20666 #: ../fish/virt-copy-out.pod:30
20668 "This command is just a simple shell script wrapper around the "
20669 "L<guestfish(1)> C<copy-out> command. For anything more complex than a "
20670 "trivial copy, you are probably better off using guestfish directly."
20674 #: ../fish/virt-copy-out.pod:41
20676 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-edit(1)>, "
20677 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
20681 #: ../fish/virt-tar-in.pod:5
20682 msgid "virt-tar-in - Unpack a tarball into a virtual machine disk image."
20686 #: ../fish/virt-tar-in.pod:9
20689 " virt-tar-in -a disk.img data.tar /destination\n"
20694 #: ../fish/virt-tar-in.pod:11
20697 " virt-tar-in -d domain data.tar /destination\n"
20702 #: ../fish/virt-tar-in.pod:13
20705 " zcat data.tar.gz | virt-tar-in -d domain - /destination\n"
20710 #: ../fish/virt-tar-in.pod:17
20712 "Using C<virt-tar-in> on live virtual machines can be dangerous, potentially "
20713 "causing disk corruption. The virtual machine must be shut down before you "
20714 "use this command."
20718 #: ../fish/virt-tar-in.pod:23
20720 "C<virt-tar-in> unpacks an uncompressed tarball into a virtual machine disk "
20721 "image or named libvirt domain."
20725 #: ../fish/virt-tar-in.pod:26
20727 "The first parameter is the tar file. Use C<-> to read the tar file from "
20728 "standard input. The second parameter is the absolute target directory to "
20733 #: ../fish/virt-tar-in.pod:34
20736 " virt-tar-in -d MyGuest homes.tar /home\n"
20741 #: ../fish/virt-tar-in.pod:38
20743 "This command is just a simple shell script wrapper around the "
20744 "L<guestfish(1)> C<tar-in> command. For anything more complex than a trivial "
20745 "copy, you are probably better off using guestfish directly."
20749 #: ../fish/virt-tar-in.pod:49
20751 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
20752 "L<virt-edit(1)>, L<virt-make-fs(1)>, L<virt-tar-out(1)>, "
20753 "L<http://libguestfs.org/>."
20757 #: ../fish/virt-tar-out.pod:5
20758 msgid "virt-tar-out - Pack a virtual machine disk image directory into a tarball."
20762 #: ../fish/virt-tar-out.pod:9
20765 " virt-tar-out -a disk.img /dir files.tar\n"
20770 #: ../fish/virt-tar-out.pod:11
20773 " virt-tar-out -d domain /dir files.tar\n"
20778 #: ../fish/virt-tar-out.pod:13
20781 " virt-tar-out -d domain /dir - | gzip --best > files.tar.gz\n"
20786 #: ../fish/virt-tar-out.pod:17
20787 msgid "C<virt-tar-out> packs a virtual machine disk image directory into a tarball."
20791 #: ../fish/virt-tar-out.pod:20
20793 "The first parameter is the absolute path of the virtual machine directory. "
20794 "The second parameter is the tar file to write. Use C<-> to write to "
20799 #: ../fish/virt-tar-out.pod:26
20800 msgid "Download the home directories from a guest:"
20804 #: ../fish/virt-tar-out.pod:28
20807 " virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz\n"
20812 #: ../fish/virt-tar-out.pod:32
20814 "This command is just a simple shell script wrapper around the "
20815 "L<guestfish(1)> C<tar-out> command. For anything more complex than a "
20816 "trivial copy, you are probably better off using guestfish directly."
20820 #: ../fish/virt-tar-out.pod:43
20822 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
20823 "L<virt-edit(1)>, L<virt-tar-in(1)>, L<http://libguestfs.org/>."
20827 #: ../fuse/guestmount.pod:5
20828 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
20832 #: ../fuse/guestmount.pod:9
20835 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
20840 #: ../fuse/guestmount.pod:11
20843 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
20848 #: ../fuse/guestmount.pod:13
20851 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
20856 #: ../fuse/guestmount.pod:17
20858 "You must I<not> use C<guestmount> in read-write mode on live virtual "
20859 "machines. If you do this, you risk disk corruption in the VM."
20863 #: ../fuse/guestmount.pod:22
20865 "The guestmount program can be used to mount virtual machine filesystems and "
20866 "other disk images on the host. It uses libguestfs for access to the guest "
20867 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
20868 "a mountable device."
20872 #: ../fuse/guestmount.pod:27
20874 "Along with other options, you have to give at least one device (I<-a> "
20875 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
20876 "option) or use the I<-i> inspection option or the I<--live> option. How "
20877 "this works is better explained in the L<guestfish(1)> manual page, or by "
20878 "looking at the examples below."
20882 #: ../fuse/guestmount.pod:33
20884 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
20885 "by you, and the filesystem will not be visible to any other users unless you "
20886 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
20887 "the filesystem, use the C<fusermount -u> command."
20891 #: ../fuse/guestmount.pod:41
20893 "For a typical Windows guest which has its main filesystem on the first "
20898 #: ../fuse/guestmount.pod:44
20901 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
20906 #: ../fuse/guestmount.pod:46
20908 "For a typical Linux guest which has a /boot filesystem on the first "
20909 "partition, and the root filesystem on a logical volume:"
20913 #: ../fuse/guestmount.pod:49
20916 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
20921 #: ../fuse/guestmount.pod:51
20922 msgid "To get libguestfs to detect guest mountpoints for you:"
20926 #: ../fuse/guestmount.pod:53
20929 " guestmount -a guest.img -i --ro /mnt\n"
20934 #: ../fuse/guestmount.pod:55
20935 msgid "For a libvirt guest called \"Guest\" you could do:"
20939 #: ../fuse/guestmount.pod:57
20942 " guestmount -d Guest -i --ro /mnt\n"
20947 #: ../fuse/guestmount.pod:59
20949 "If you don't know what filesystems are contained in a guest or disk image, "
20950 "use L<virt-filesystems(1)> first:"
20954 #: ../fuse/guestmount.pod:62
20957 " virt-filesystems MyGuest\n"
20962 #: ../fuse/guestmount.pod:64
20964 "If you want to trace the libguestfs calls but without excessive debugging "
20965 "information, we recommend:"
20969 #: ../fuse/guestmount.pod:67
20972 " guestmount [...] --trace /mnt\n"
20977 #: ../fuse/guestmount.pod:69
20978 msgid "If you want to debug the program, we recommend:"
20982 #: ../fuse/guestmount.pod:71
20985 " guestmount [...] --trace --verbose /mnt\n"
20990 #: ../fuse/guestmount.pod:73 ../rescue/virt-rescue.pod:96 ../resize/virt-resize.pod:621
20995 #: ../fuse/guestmount.pod:75
20996 msgid "Other users cannot see the filesystem by default"
21000 #: ../fuse/guestmount.pod:77
21002 "If you mount a filesystem as one user (eg. root), then other users will not "
21003 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
21004 "option when mounting:"
21008 #: ../fuse/guestmount.pod:81
21011 " sudo guestmount [...] -o allow_other /mnt\n"
21016 #: ../fuse/guestmount.pod:83
21017 msgid "Enabling FUSE"
21021 #: ../fuse/guestmount.pod:85
21023 "On some distros, you may need to add yourself to a special group "
21024 "(eg. C<fuse>) before you can use any FUSE filesystem. This is necessary on "
21025 "Debian and derivatives."
21029 #: ../fuse/guestmount.pod:89
21031 "On other distros, no special group is required. It is not necessary on "
21032 "Fedora or Red Hat Enterprise Linux."
21036 #: ../fuse/guestmount.pod:100
21037 msgid "Add a block device or virtual machine image."
21041 #: ../fuse/guestmount.pod:123
21042 msgid "B<--dir-cache-timeout N>"
21046 #: ../fuse/guestmount.pod:125
21048 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
21049 "seconds. The readdir cache [actually, there are several semi-independent "
21050 "caches] is populated after a readdir(2) call with the stat and extended "
21051 "attributes of the files in the directory, in anticipation that they will be "
21052 "requested soon after."
21056 #: ../fuse/guestmount.pod:131
21058 "There is also a different attribute cache implemented by FUSE (see the FUSE "
21059 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
21060 "requests, only cache existing ones."
21064 #: ../fuse/guestmount.pod:151
21066 "If you have untrusted raw-format guest disk images, you should use this "
21067 "option to specify the disk format. This avoids a possible security problem "
21068 "with malicious guests (CVE-2010-3851). See also "
21069 "L<guestfs(3)/guestfs_add_drive_opts>."
21073 #: ../fuse/guestmount.pod:156
21074 msgid "B<--fuse-help>"
21078 #: ../fuse/guestmount.pod:158
21079 msgid "Display help on special FUSE options (see I<-o> below)."
21083 #: ../fuse/guestmount.pod:162
21084 msgid "Display brief help and exit."
21088 #: ../fuse/guestmount.pod:186
21090 "Mount the named partition or logical volume on the given mountpoint B<in the "
21091 "guest> (this has nothing to do with mountpoints in the host)."
21095 #: ../fuse/guestmount.pod:189
21097 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
21098 "something on C</>."
21102 #: ../fuse/guestmount.pod:206
21104 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
21105 "unmounted. If you specify this option, then we don't attempt to sync the "
21106 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
21110 #: ../fuse/guestmount.pod:211
21111 msgid "B<-o option>"
21115 #: ../fuse/guestmount.pod:213
21116 msgid "B<--option option>"
21120 #: ../fuse/guestmount.pod:215
21121 msgid "Pass extra options to FUSE."
21125 #: ../fuse/guestmount.pod:217
21127 "To get a list of all the extra options supported by FUSE, use the command "
21128 "below. Note that only the FUSE I<-o> options can be passed, and only some "
21129 "of them are a good idea."
21133 #: ../fuse/guestmount.pod:221
21136 " guestmount --fuse-help\n"
21141 #: ../fuse/guestmount.pod:223
21142 msgid "Some potentially useful FUSE options:"
21146 #: ../fuse/guestmount.pod:227
21147 msgid "B<-o allow_other>"
21151 #: ../fuse/guestmount.pod:229
21152 msgid "Allow other users to see the filesystem."
21156 #: ../fuse/guestmount.pod:231
21157 msgid "B<-o attr_timeout=N>"
21161 #: ../fuse/guestmount.pod:233
21162 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
21166 #: ../fuse/guestmount.pod:235
21167 msgid "B<-o kernel_cache>"
21171 #: ../fuse/guestmount.pod:237
21173 "Allow the kernel to cache files (reduces the number of reads that have to go "
21174 "through the L<guestfs(3)> API). This is generally a good idea if you can "
21175 "afford the extra memory usage."
21179 #: ../fuse/guestmount.pod:241
21180 msgid "B<-o uid=N> B<-o gid=N>"
21184 #: ../fuse/guestmount.pod:243
21186 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
21187 "the chosen values."
21191 #: ../fuse/guestmount.pod:252
21193 "Add devices and mount everything read-only. Also disallow writes and make "
21194 "the disk appear read-only to FUSE."
21198 #: ../fuse/guestmount.pod:255
21200 "This is highly recommended if you are not going to edit the guest disk. If "
21201 "the guest is running and this option is I<not> supplied, then there is a "
21202 "strong risk of disk corruption in the guest. We try to prevent this from "
21203 "happening, but it is not always possible."
21207 #: ../fuse/guestmount.pod:260 ../rescue/virt-rescue.pod:199
21208 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21212 #: ../fuse/guestmount.pod:264
21213 msgid "Enable SELinux support for the guest."
21217 #: ../fuse/guestmount.pod:270
21218 msgid "Enable verbose messages from underlying libguestfs."
21222 #: ../fuse/guestmount.pod:276
21223 msgid "Display the program version and exit."
21227 #: ../fuse/guestmount.pod:285 ../fuse/guestmount.pod:308 ../rescue/virt-rescue.pod:238 ../rescue/virt-rescue.pod:321
21228 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21232 #: ../fuse/guestmount.pod:289
21237 #: ../fuse/guestmount.pod:291
21238 msgid "Trace libguestfs calls and entry into each FUSE function."
21242 #: ../fuse/guestmount.pod:293
21243 msgid "This also stops the daemon from forking into the background."
21247 #: ../fuse/guestmount.pod:319
21249 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
21250 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
21251 "L<http://fuse.sf.net/>."
21255 #: ../fuse/guestmount.pod:334
21256 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
21260 #: ../inspector/virt-inspector.pod:5
21262 "virt-inspector - Display operating system version and other information "
21263 "about a virtual machine"
21267 #: ../inspector/virt-inspector.pod:9
21270 " virt-inspector [--options] -d domname\n"
21275 #: ../inspector/virt-inspector.pod:11
21278 " virt-inspector [--options] -a disk.img [-a disk.img ...]\n"
21283 #: ../inspector/virt-inspector.pod:15
21286 " virt-inspector domname\n"
21291 #: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:148
21294 " virt-inspector disk.img [disk.img ...]\n"
21299 #: ../inspector/virt-inspector.pod:21
21301 "B<virt-inspector> examines a virtual machine or disk image and tries to "
21302 "determine the version of the operating system and other information about "
21303 "the virtual machine."
21307 #: ../inspector/virt-inspector.pod:25
21308 msgid "Virt-inspector produces XML output for feeding into other programs."
21312 #: ../inspector/virt-inspector.pod:27
21314 "In the normal usage, use C<virt-inspector -d domname> where C<domname> is "
21315 "the libvirt domain (see: C<virsh list --all>)."
21319 #: ../inspector/virt-inspector.pod:30
21321 "You can also run virt-inspector directly on disk images from a single "
21322 "virtual machine. Use C<virt-inspector -a disk.img>. In rare cases a domain "
21323 "has several block devices, in which case you should list several I<-a> "
21324 "options one after another, with the first corresponding to the guest's "
21325 "C</dev/sda>, the second to the guest's C</dev/sdb> and so on."
21329 #: ../inspector/virt-inspector.pod:37
21331 "You can also run virt-inspector on install disks, live CDs, bootable USB "
21332 "keys and similar."
21336 #: ../inspector/virt-inspector.pod:40
21338 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
21339 "inspect several virtual machines, you have to run virt-inspector several "
21340 "times (for example, from a shell script for-loop)."
21344 #: ../inspector/virt-inspector.pod:45
21346 "Because virt-inspector needs direct access to guest images, it won't "
21347 "normally work over remote libvirt connections."
21351 #: ../inspector/virt-inspector.pod:48
21353 "All of the information available from virt-inspector is also available "
21354 "through the core libguestfs inspection API (see L<guestfs(3)/INSPECTION>). "
21355 "The same information can also be fetched using guestfish or via libguestfs "
21356 "bindings in many programming languages (see L<guestfs(3)/USING LIBGUESTFS "
21357 "WITH OTHER PROGRAMMING LANGUAGES>)."
21361 #: ../inspector/virt-inspector.pod:81
21363 "Libvirt is only used if you specify a C<domname> on the command line. If "
21364 "you specify guest block devices directly (I<-a>), then libvirt is not used "
21369 #: ../inspector/virt-inspector.pod:94
21371 "When prompting for keys and passphrases, virt-inspector normally turns "
21372 "echoing off so you cannot see what you are typing. If you are not worried "
21373 "about Tempest attacks and there is no one else in the room you can specify "
21374 "this flag to see what you are typing."
21378 #: ../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
21380 "Specify the format of disk images given on the command line. If this is "
21381 "omitted then the format is autodetected from the content of the disk image."
21385 #: ../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
21387 "If disk images are requested from libvirt, then this program asks libvirt "
21388 "for this information. In this case, the value of the format parameter is "
21393 #: ../inspector/virt-inspector.pod:111 ../resize/virt-resize.pod:391 ../resize/virt-resize.pod:483 ../sparsify/virt-sparsify.pod:132 ../tools/virt-list-filesystems.pl:101 ../tools/virt-list-partitions.pl:102 ../tools/virt-tar.pl:151 ../tools/virt-win-reg.pl:152
21395 "If working with untrusted raw-format guest disk images, you should ensure "
21396 "the format is always specified."
21400 #: ../inspector/virt-inspector.pod:135
21401 msgid "B<--xpath> query"
21405 #: ../inspector/virt-inspector.pod:137
21407 "Perform an XPath query on the XML on stdin, and print the result on stdout. "
21408 "In this mode virt-inspector simply runs an XPath query; all other inspection "
21409 "functions are disabled. See L</XPATH QUERIES> below for some examples."
21413 #: ../inspector/virt-inspector.pod:146
21414 msgid "Previous versions of virt-inspector allowed you to write either:"
21418 #: ../inspector/virt-inspector.pod:152
21421 " virt-inspector guestname\n"
21426 #: ../inspector/virt-inspector.pod:160
21431 #: ../inspector/virt-inspector.pod:162
21433 "The virt-inspector XML is described precisely in a RELAX NG schema file "
21434 "C<virt-inspector.rng> which is supplied with libguestfs. This section is "
21435 "just an overview."
21439 #: ../inspector/virt-inspector.pod:166
21441 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
21442 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
21443 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
21444 "which is vanishingly rare in real world VMs."
21448 #: ../inspector/virt-inspector.pod:171
21449 msgid "E<lt>operatingsystemE<gt>"
21453 #: ../inspector/virt-inspector.pod:173
21455 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
21456 "describe the operating system, its architecture, the descriptive \"product "
21457 "name\" string, the type of OS and so on, as in this example:"
21461 #: ../inspector/virt-inspector.pod:177
21464 " <operatingsystems>\n"
21465 " <operatingsystem>\n"
21466 " <root>/dev/sda2</root>\n"
21467 " <name>windows</name>\n"
21468 " <arch>i386</arch>\n"
21469 " <distro>windows</distro>\n"
21470 " <product_name>Windows 7 Enterprise</product_name>\n"
21471 " <product_variant>Client</product_variant>\n"
21472 " <major_version>6</major_version>\n"
21473 " <minor_version>1</minor_version>\n"
21474 " <windows_systemroot>/Windows</windows_systemroot>\n"
21475 " <format>installed</format>\n"
21480 #: ../inspector/virt-inspector.pod:190
21482 "In brief, E<lt>nameE<gt> is the class of operating system (something like "
21483 "C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
21484 "but many other distros are recognized) and E<lt>archE<gt> is the guest "
21485 "architecture. The other fields are fairly self-explanatory, but because "
21486 "these fields are taken directly from the libguestfs inspection API you can "
21487 "find precise information from L<guestfs(3)/INSPECTION>."
21491 #: ../inspector/virt-inspector.pod:198
21493 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
21494 "of view of libguestfs (block devices may have completely different names "
21495 "inside the VM itself)."
21499 #: ../inspector/virt-inspector.pod:202
21500 msgid "E<lt>mountpointsE<gt>"
21504 #: ../inspector/virt-inspector.pod:204
21506 "Un*x-like guests typically have multiple filesystems which are mounted at "
21507 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
21508 "element which looks like this:"
21512 #: ../inspector/virt-inspector.pod:208
21515 " <operatingsystems>\n"
21516 " <operatingsystem>\n"
21519 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
21520 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
21521 " </mountpoints>\n"
21526 #: ../inspector/virt-inspector.pod:216
21528 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
21529 "and may have completely different names inside the guest. Only mountable "
21530 "filesystems appear in this list, not things like swap devices."
21534 #: ../inspector/virt-inspector.pod:221
21535 msgid "E<lt>filesystemsE<gt>"
21539 #: ../inspector/virt-inspector.pod:223
21541 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
21542 "filesystems belonging to the guest, including swap and empty partitions. "
21543 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
21544 "this OS or shared with this OS and other OSes)."
21548 #: ../inspector/virt-inspector.pod:229
21549 msgid "You might see something like this:"
21553 #: ../inspector/virt-inspector.pod:231
21556 " <operatingsystems>\n"
21557 " <operatingsystem>\n"
21560 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
21561 " <type>ext4</type>\n"
21562 " <label>Fedora-13-x86_64</label>\n"
21563 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
21569 #: ../inspector/virt-inspector.pod:241
21571 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
21572 "the label, and the UUID."
21576 #: ../inspector/virt-inspector.pod:244
21577 msgid "E<lt>applicationsE<gt>"
21581 #: ../inspector/virt-inspector.pod:246
21583 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
21584 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
21589 #: ../inspector/virt-inspector.pod:250
21591 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
21592 "Typical values would be C<rpm> and C<deb>."
21596 #: ../inspector/virt-inspector.pod:253
21598 "E<lt>package_managementE<gt>, if present, describes the package manager. "
21599 "Typical values include C<yum>, C<up2date> and C<apt>"
21603 #: ../inspector/virt-inspector.pod:256
21604 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
21608 #: ../inspector/virt-inspector.pod:259
21611 " <operatingsystems>\n"
21612 " <operatingsystem>\n"
21614 " <applications>\n"
21616 " <name>coreutils</name>\n"
21617 " <version>8.5</version>\n"
21618 " <release>1</release>\n"
21619 " </application>\n"
21624 #: ../inspector/virt-inspector.pod:269
21626 "The version and release fields may not be available for some types guests. "
21627 "Other fields are possible, see "
21628 "L<guestfs(3)/guestfs_inspect_list_applications>."
21632 #: ../inspector/virt-inspector.pod:273
21633 msgid "E<lt>drive_mappingsE<gt>"
21637 #: ../inspector/virt-inspector.pod:275
21639 "For operating systems like Windows which use drive letters, virt-inspector "
21640 "is able to find out how drive letters map to filesystems."
21644 #: ../inspector/virt-inspector.pod:279
21647 " <operatingsystems>\n"
21648 " <operatingsystem>\n"
21650 " <drive_mappings>\n"
21651 " <drive_mapping name=\"C\">/dev/sda2</drive_mapping>\n"
21652 " <drive_mapping name=\"E\">/dev/sdb1</drive_mapping>\n"
21653 " </drive_mappings>\n"
21658 #: ../inspector/virt-inspector.pod:287
21660 "In the example above, drive C maps to the filesystem on the second partition "
21661 "on the first disk, and drive E maps to the filesystem on the first partition "
21662 "on the second disk."
21666 #: ../inspector/virt-inspector.pod:291
21668 "Note that this only covers permanent local filesystem mappings, not things "
21669 "like network shares. Furthermore NTFS volume mount points may not be listed "
21674 #: ../inspector/virt-inspector.pod:295
21675 msgid "E<lt>iconE<gt>"
21679 #: ../inspector/virt-inspector.pod:297
21681 "Virt-inspector is sometimes able to extract an icon or logo for the guest. "
21682 "The icon is returned as base64-encoded PNG data. Note that the icon can be "
21683 "very large and high quality."
21687 #: ../inspector/virt-inspector.pod:301
21690 " <operatingsystems>\n"
21691 " <operatingsystem>\n"
21694 " iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]\n"
21695 " [... many lines of base64 data ...]\n"
21701 #: ../inspector/virt-inspector.pod:309
21703 "To display the icon, you have to extract it and convert the base64 data back "
21704 "to a binary file. Use an XPath query or simply an editor to extract the "
21705 "data, then use the coreutils L<base64(1)> program to do the conversion back "
21710 #: ../inspector/virt-inspector.pod:314
21713 " base64 -i -d < icon.data > icon.png\n"
21718 #: ../inspector/virt-inspector.pod:316
21719 msgid "INSPECTING INSTALL DISKS, LIVE CDs"
21723 #: ../inspector/virt-inspector.pod:318
21725 "Virt-inspector can detect some operating system installers on install disks, "
21726 "live CDs, bootable USB keys and more."
21730 #: ../inspector/virt-inspector.pod:321
21732 "In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
21733 "fields may be present to indicate a live CD, network installer, or one part "
21734 "of a multipart CD. For example:"
21738 #: ../inspector/virt-inspector.pod:325
21741 " <operatingsystems>\n"
21742 " <operatingsystem>\n"
21743 " <root>/dev/sda</root>\n"
21744 " <name>linux</name>\n"
21745 " <arch>i386</arch>\n"
21746 " <distro>ubuntu</distro>\n"
21747 " <product_name>Ubuntu 10.10 "Maverick "
21748 "Meerkat"</product_name>\n"
21749 " <major_version>10</major_version>\n"
21750 " <minor_version>10</minor_version>\n"
21751 " <format>installer</format>\n"
21757 #: ../inspector/virt-inspector.pod:337
21758 msgid "XPATH QUERIES"
21762 #: ../inspector/virt-inspector.pod:339
21764 "Virt-inspector includes built in support for running XPath queries. The "
21765 "reason for including XPath support directly in virt-inspector is simply that "
21766 "there are no good and widely available command line programs that can do "
21767 "XPath queries. The only good one is L<xmlstarlet(1)> and that is not "
21768 "available on Red Hat Enterprise Linux."
21772 #: ../inspector/virt-inspector.pod:346
21774 "To perform an XPath query, use the I<--xpath> option. Note that in this "
21775 "mode, virt-inspector simply reads XML from stdin and outputs the query "
21776 "result on stdout. All other inspection features are disabled in this mode."
21780 #: ../inspector/virt-inspector.pod:353
21783 " $ virt-inspector -d Guest | virt-inspector --xpath '//filesystems'\n"
21785 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
21786 " <type>ext4</type>\n"
21792 #: ../inspector/virt-inspector.pod:359
21795 " $ virt-inspector -d Guest | \\\n"
21796 " virt-inspector --xpath "
21797 "\"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
21803 #: ../inspector/virt-inspector.pod:363
21806 " $ virt-inspector -d Guest | \\\n"
21807 " virt-inspector --xpath 'string(//icon)' | base64 -i -d | display -\n"
21808 " [displays the guest icon, if there is one]\n"
21813 #: ../inspector/virt-inspector.pod:374
21814 msgid "OLD VERSIONS OF VIRT-INSPECTOR"
21818 #: ../inspector/virt-inspector.pod:376
21820 "Early versions of libguestfs shipped with a different virt-inspector program "
21821 "written in Perl (the current version is written in C). The XML output of "
21822 "the Perl virt-inspector was different and it could also output in other "
21823 "formats like text."
21827 #: ../inspector/virt-inspector.pod:381
21828 msgid "The old virt-inspector is no longer supported or shipped with libguestfs."
21832 #: ../inspector/virt-inspector.pod:384
21834 "To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
21835 "versions of virt-inspector with different names:"
21839 #: ../inspector/virt-inspector.pod:387
21842 " virt-inspector Old Perl version.\n"
21843 " virt-inspector2 New C version.\n"
21848 #: ../inspector/virt-inspector.pod:397
21850 "L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, "
21851 "L<base64(1)>, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
21855 #: ../inspector/virt-inspector.pod:414
21856 msgid "Matthew Booth L<mbooth@redhat.com>"
21860 #: ../java/examples/guestfs-java.pod:5
21861 msgid "guestfs-java - How to use libguestfs from Java"
21865 #: ../java/examples/guestfs-java.pod:9
21868 " import com.redhat.et.libguestfs.*;\n"
21873 #: ../java/examples/guestfs-java.pod:11
21876 " GuestFS g = new GuestFS ();\n"
21877 " g.add_drive_opts (\"disk.img\", null);\n"
21883 #: ../java/examples/guestfs-java.pod:17
21885 "This manual page documents how to call libguestfs from the Java programming "
21886 "language. This page just documents the differences from the C API and gives "
21887 "some examples. If you are not familiar with using libguestfs, you also need "
21888 "to read L<guestfs(3)>."
21892 #: ../java/examples/guestfs-java.pod:22 ../ocaml/examples/guestfs-ocaml.pod:53
21893 msgid "CLOSING THE HANDLE"
21897 #: ../java/examples/guestfs-java.pod:24
21899 "The handle is closed when it is reaped by the garbage collector. Because "
21900 "libguestfs handles include a lot of state, it is also possible to close (and "
21901 "hence free) them explicitly by calling the C<close> method."
21905 #: ../java/examples/guestfs-java.pod:29 ../ocaml/examples/guestfs-ocaml.pod:60 ../python/examples/guestfs-python.pod:21 ../ruby/examples/guestfs-ruby.pod:22
21910 #: ../java/examples/guestfs-java.pod:31
21912 "Errors from libguestfs functions are mapped into the C<LibGuestFSException> "
21913 "exception. This has a single parameter which is the error message (a "
21918 #: ../java/examples/guestfs-java.pod:35
21919 msgid "Calling any method on a closed handle raises the same exception."
21923 #: ../java/examples/guestfs-java.pod:47
21925 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
21926 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
21927 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>, "
21928 "L<http://caml.inria.fr/>."
21932 #: ../ocaml/examples/guestfs-ocaml.pod:5
21933 msgid "guestfs-ocaml - How to use libguestfs from OCaml"
21937 #: ../ocaml/examples/guestfs-ocaml.pod:9
21938 msgid "Module style:"
21942 #: ../ocaml/examples/guestfs-ocaml.pod:11
21945 " let g = Guestfs.create () in\n"
21946 " Guestfs.add_drive_opts g ~format:\"raw\" ~readonly:true \"disk.img\";\n"
21947 " Guestfs.launch g;\n"
21952 #: ../ocaml/examples/guestfs-ocaml.pod:15
21953 msgid "Object-oriented style:"
21957 #: ../ocaml/examples/guestfs-ocaml.pod:17
21960 " let g = new Guestfs.guestfs () in\n"
21961 " g#add_drive_opts ~format:\"raw\" ~readonly:true \"disk.img\";\n"
21967 #: ../ocaml/examples/guestfs-ocaml.pod:21
21970 " ocamlfind opt prog.ml -package guestfs -linkpkg -o prog\n"
21972 " ocamlopt -I +guestfs mlguestfs.cmxa prog.ml -o prog\n"
21977 #: ../ocaml/examples/guestfs-ocaml.pod:27
21979 "This manual page documents how to call libguestfs from the OCaml programming "
21980 "language. This page just documents the differences from the C API and gives "
21981 "some examples. If you are not familiar with using libguestfs, you also need "
21982 "to read L<guestfs(3)>."
21986 #: ../ocaml/examples/guestfs-ocaml.pod:32
21987 msgid "PROGRAMMING STYLES"
21991 #: ../ocaml/examples/guestfs-ocaml.pod:34
21993 "There are two different programming styles supported by the OCaml bindings. "
21994 "You can use a module style, with each C function mapped to an OCaml "
21999 #: ../ocaml/examples/guestfs-ocaml.pod:38
22002 " int guestfs_set_verbose (guestfs_h *g, int flag);\n"
22007 #: ../ocaml/examples/guestfs-ocaml.pod:40
22012 #: ../ocaml/examples/guestfs-ocaml.pod:42
22015 " val Guestfs.set_verbose : Guestfs.t -> bool -> unit\n"
22020 #: ../ocaml/examples/guestfs-ocaml.pod:44
22022 "Alternately you can use an object-oriented style, calling methods on the "
22023 "class C<Guestfs.guestfs>:"
22027 #: ../ocaml/examples/guestfs-ocaml.pod:47
22030 " method set_verbose : bool -> unit\n"
22035 #: ../ocaml/examples/guestfs-ocaml.pod:49
22037 "The object-oriented style is usually briefer, and the minor performance "
22038 "penalty isn't noticable in the general overhead of performing libguestfs "
22043 #: ../ocaml/examples/guestfs-ocaml.pod:55
22045 "The handle is closed when it is reaped by the garbage collector. Because "
22046 "libguestfs handles include a lot of state, it is also possible to close (and "
22047 "hence free) them explicitly by calling C<Guestfs.close> or the C<#close> "
22052 #: ../ocaml/examples/guestfs-ocaml.pod:62
22054 "Errors from libguestfs functions are mapped into the C<Guestfs.Error> "
22055 "exception. This has a single parameter which is the error message (a "
22060 #: ../ocaml/examples/guestfs-ocaml.pod:66
22062 "Calling any function/method on a closed handle raises "
22063 "C<Guestfs.Handle_closed>. The single parameter is the name of the function "
22068 #: ../ocaml/examples/guestfs-ocaml.pod:80
22070 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22071 "L<guestfs-java(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
22072 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>, "
22073 "L<http://caml.inria.fr/>."
22077 #: ../perl/examples/guestfs-perl.pod:5
22078 msgid "guestfs-perl - How to use libguestfs from Perl"
22082 #: ../perl/examples/guestfs-perl.pod:9
22085 " use Sys::Guestfs;\n"
22090 #: ../perl/examples/guestfs-perl.pod:11
22093 " my $h = Sys::Guestfs->new ();\n"
22094 " $h->add_drive_opts ('guest.img', format => 'raw');\n"
22095 " $h->launch ();\n"
22096 " $h->mount_options ('', '/dev/sda1', '/');\n"
22097 " $h->touch ('/hello');\n"
22103 #: ../perl/examples/guestfs-perl.pod:20
22105 "This manual page documents how to call libguestfs from the Perl programming "
22106 "language. This page just documents the differences from the C API and gives "
22107 "some examples. If you are not familiar with using libguestfs, you also need "
22108 "to read L<guestfs(3)>. To read the full Perl API, see L<Sys::Guestfs(3)>."
22112 #: ../perl/examples/guestfs-perl.pod:26
22117 #: ../perl/examples/guestfs-perl.pod:28
22119 "Errors from libguestfs functions turn into calls to C<croak> (see "
22124 #: ../perl/examples/guestfs-perl.pod:41
22126 "L<Sys::Guestfs(3)>, L<guestfs(3)>, L<guestfs-examples(3)>, "
22127 "L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, "
22128 "L<guestfs-python(3)>, L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, "
22129 "L<http://libguestfs.org/>."
22133 #: ../python/examples/guestfs-python.pod:5
22134 msgid "guestfs-python - How to use libguestfs from Python"
22138 #: ../python/examples/guestfs-python.pod:9
22141 " import guestfs\n"
22142 " g = guestfs.GuestFS ()\n"
22143 " g.add_drive_opts (\"disk.img\", format=\"raw\", readonly=1)\n"
22149 #: ../python/examples/guestfs-python.pod:16
22151 "This manual page documents how to call libguestfs from the Python "
22152 "programming language. This page just documents the differences from the C "
22153 "API and gives some examples. If you are not familiar with using libguestfs, "
22154 "you also need to read L<guestfs(3)>."
22158 #: ../python/examples/guestfs-python.pod:23
22160 "Errors from libguestfs functions are mapped into C<RuntimeException> with a "
22161 "single string argument which is the error message."
22165 #: ../python/examples/guestfs-python.pod:26
22166 msgid "MORE DOCUMENTATION"
22170 #: ../python/examples/guestfs-python.pod:28
22175 #: ../python/examples/guestfs-python.pod:30
22179 " >>> import guestfs\n"
22180 " >>> help (guestfs)\n"
22185 #: ../python/examples/guestfs-python.pod:44
22187 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22188 "L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, "
22189 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
22193 #: ../rescue/virt-rescue.pod:5
22194 msgid "virt-rescue - Run a rescue shell on a virtual machine"
22198 #: ../rescue/virt-rescue.pod:9
22201 " virt-rescue [--options] -d domname\n"
22206 #: ../rescue/virt-rescue.pod:11
22209 " virt-rescue [--options] -a disk.img [-a disk.img ...]\n"
22214 #: ../rescue/virt-rescue.pod:13
22217 " virt-rescue --suggest (-d domname | -a disk.img ...)\n"
22222 #: ../rescue/virt-rescue.pod:17
22225 " virt-rescue [--options] domname\n"
22230 #: ../rescue/virt-rescue.pod:19
22233 " virt-rescue [--options] disk.img [disk.img ...]\n"
22238 #: ../rescue/virt-rescue.pod:23
22240 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
22241 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
22242 "you from doing this, but doesn't catch all cases."
22246 #: ../rescue/virt-rescue.pod:27
22248 "However if you use the I<--ro> (read only) option, then you can attach a "
22249 "shell to a live virtual machine. The results might be strange or "
22250 "inconsistent at times but you won't get disk corruption."
22254 #: ../rescue/virt-rescue.pod:33
22256 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
22257 "need for a CD. virt-rescue gives you a rescue shell and some simple "
22258 "recovery tools which you can use to examine or rescue a virtual machine or "
22263 #: ../rescue/virt-rescue.pod:38
22265 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
22266 "on disk image(s):"
22270 #: ../rescue/virt-rescue.pod:41
22273 " virt-rescue -d GuestName\n"
22278 #: ../rescue/virt-rescue.pod:43
22281 " virt-rescue --ro -a /path/to/disk.img\n"
22286 #: ../rescue/virt-rescue.pod:45
22289 " virt-rescue -a /dev/sdc\n"
22294 #: ../rescue/virt-rescue.pod:47
22295 msgid "For live VMs you I<must> use the --ro option."
22299 #: ../rescue/virt-rescue.pod:49
22301 "When you run virt-rescue on a virtual machine or disk image, you are placed "
22302 "in an interactive bash shell where you can use many ordinary Linux "
22303 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
22304 "appliance. You must mount the virtual machine's filesystems by hand. There "
22305 "is an empty directory called C</sysroot> where you can mount filesystems."
22309 #: ../rescue/virt-rescue.pod:56
22311 "You can get virt-rescue to suggest mount commands for you by using the "
22312 "I<--suggest> option (in another terminal):"
22316 #: ../rescue/virt-rescue.pod:59
22319 " $ virt-rescue --suggest -d Fedora15\n"
22320 " Inspecting the virtual machine or disk image ...\n"
22325 #: ../rescue/virt-rescue.pod:62
22328 " This disk contains one or more operating systems. You can use these\n"
22329 " mount commands in virt-rescue (at the ><rescue> prompt) to mount the\n"
22335 #: ../rescue/virt-rescue.pod:66
22338 " # /dev/vg_f15x32/lv_root is the root of a linux operating system\n"
22339 " # type: linux, distro: fedora, version: 15.0\n"
22340 " # Fedora release 15 (Lovelock)\n"
22345 #: ../rescue/virt-rescue.pod:70
22348 " mount /dev/vg_f15x32/lv_root /sysroot/\n"
22349 " mount /dev/vda1 /sysroot/boot\n"
22350 " mount --bind /dev /sysroot/dev\n"
22351 " mount --bind /dev/pts /sysroot/dev/pts\n"
22352 " mount --bind /proc /sysroot/proc\n"
22353 " mount --bind /sys /sysroot/sys\n"
22358 #: ../rescue/virt-rescue.pod:77
22360 "Another way is to list the logical volumes (with L<lvs(8)>) and partitions "
22361 "(with L<parted(8)>) and mount them by hand:"
22365 #: ../rescue/virt-rescue.pod:80
22369 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
22370 " lv_root vg_f15x32 -wi-a- 8.83G\n"
22371 " lv_swap vg_f15x32 -wi-a- 992.00M\n"
22372 " ><rescue> mount /dev/vg_f15x32/lv_root /sysroot\n"
22373 " ><rescue> mount /dev/vda1 /sysroot/boot\n"
22374 " ><rescue> ls /sysroot\n"
22379 #: ../rescue/virt-rescue.pod:88
22380 msgid "Another command to list available filesystems is L<virt-filesystems(1)>."
22384 #: ../rescue/virt-rescue.pod:91
22386 "To run commands in a Linux guest (for example, grub), you should chroot into "
22387 "the /sysroot directory first:"
22391 #: ../rescue/virt-rescue.pod:94
22394 " ><rescue> chroot /sysroot\n"
22399 #: ../rescue/virt-rescue.pod:98
22401 "Virt-rescue can be used on I<any> disk image file or device, not just a "
22402 "virtual machine. For example you can use it on a blank file if you want to "
22403 "partition that file (although we would recommend using L<guestfish(1)> "
22404 "instead as it is more suitable for this purpose). You can even use "
22405 "virt-rescue on things like SD cards."
22409 #: ../rescue/virt-rescue.pod:104
22411 "Virt-rescue does not require root. You only need to run it as root if you "
22412 "need root to open the disk image."
22416 #: ../rescue/virt-rescue.pod:107
22418 "This tool is just designed for quick interactive hacking on a virtual "
22419 "machine. For more structured access to a virtual machine disk image, you "
22420 "should use L<guestfs(3)>. To get a structured shell that you can use to "
22421 "make scripted changes to guests, use L<guestfish(1)>."
22425 #: ../rescue/virt-rescue.pod:131
22426 msgid "B<--append kernelopts>"
22430 #: ../rescue/virt-rescue.pod:133
22431 msgid "Pass additional options to the rescue kernel."
22435 #: ../rescue/virt-rescue.pod:163
22438 " virt-rescue --format=raw -a disk.img\n"
22443 #: ../rescue/virt-rescue.pod:167
22446 " virt-rescue --format=raw -a disk.img --format -a another.img\n"
22451 #: ../rescue/virt-rescue.pod:176
22456 #: ../rescue/virt-rescue.pod:178
22457 msgid "B<--memsize MB>"
22461 #: ../rescue/virt-rescue.pod:180
22463 "Change the amount of memory allocated to the rescue system. The default is "
22464 "set by libguestfs and is small but adequate for running system tools. The "
22465 "occasional program might need more memory. The parameter is specified in "
22470 #: ../rescue/virt-rescue.pod:185
22471 msgid "B<--network>"
22475 #: ../rescue/virt-rescue.pod:187
22476 msgid "Enable QEMU user networking in the guest. See L</NETWORK>."
22480 #: ../rescue/virt-rescue.pod:193
22481 msgid "Open the image read-only."
22485 #: ../rescue/virt-rescue.pod:203
22487 "Enable SELinux in the rescue appliance. You should read "
22488 "L<guestfs(3)/SELINUX> before using this option."
22492 #: ../rescue/virt-rescue.pod:206
22497 #: ../rescue/virt-rescue.pod:208
22498 msgid "Enable N E<ge> 2 virtual CPUs in the rescue appliance."
22502 #: ../rescue/virt-rescue.pod:210
22503 msgid "B<--suggest>"
22507 #: ../rescue/virt-rescue.pod:212
22509 "Inspect the disk image and suggest what mount commands should be used to "
22510 "mount the disks. You should use the I<--suggest> option in a second "
22511 "terminal, then paste the commands into another virt-rescue."
22515 #: ../rescue/virt-rescue.pod:216
22517 "This option implies I<--ro> and is safe to use even if the guest is up or if "
22518 "another virt-rescue is running."
22522 #: ../rescue/virt-rescue.pod:235
22524 "This changes the I<-a> and I<-d> options so that disks are added and mounts "
22525 "are done read-write."
22529 #: ../rescue/virt-rescue.pod:248
22530 msgid "Previous versions of virt-rescue allowed you to write either:"
22534 #: ../rescue/virt-rescue.pod:250
22537 " virt-rescue disk.img [disk.img ...]\n"
22542 #: ../rescue/virt-rescue.pod:254
22545 " virt-rescue guestname\n"
22550 #: ../rescue/virt-rescue.pod:262
22555 #: ../rescue/virt-rescue.pod:264
22557 "Adding the I<--network> option enables QEMU user networking in the rescue "
22558 "appliance. There are some differences between user networking and ordinary "
22563 #: ../rescue/virt-rescue.pod:270
22564 msgid "ping does not work"
22568 #: ../rescue/virt-rescue.pod:272
22570 "Because the ICMP ECHO_REQUEST protocol generally requires root in order to "
22571 "send the ping packets, and because virt-rescue must be able to run as "
22572 "non-root, QEMU user networking is not able to emulate the L<ping(8)> "
22573 "command. The ping command will appear to resolve addresses but will not be "
22574 "able to send or receive any packets. This does not mean that the network is "
22579 #: ../rescue/virt-rescue.pod:279
22580 msgid "cannot receive connections"
22584 #: ../rescue/virt-rescue.pod:281
22585 msgid "QEMU user networking cannot receive incoming connections."
22589 #: ../rescue/virt-rescue.pod:283
22590 msgid "making TCP connections"
22594 #: ../rescue/virt-rescue.pod:285
22596 "The virt-rescue appliance needs to be small and so does not include many "
22597 "network tools. In particular there is no L<telnet(1)> command. You can "
22598 "make TCP connections from the shell using the magical "
22599 "C</dev/tcp/E<lt>hostnameE<gt>/E<lt>portE<gt>> syntax:"
22603 #: ../rescue/virt-rescue.pod:290
22606 " exec 3<>/dev/tcp/redhat.com/80\n"
22607 " echo \"GET /\" >&3\n"
22613 #: ../rescue/virt-rescue.pod:294
22614 msgid "See L<bash(1)> for more details."
22618 #: ../rescue/virt-rescue.pod:300
22620 "Several environment variables affect virt-rescue. See "
22621 "L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list."
22625 #: ../rescue/virt-rescue.pod:327
22627 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
22628 "L<virt-filesystems(1)>, L<http://libguestfs.org/>."
22632 #: ../resize/virt-resize.pod:5
22633 msgid "virt-resize - Resize a virtual machine disk"
22637 #: ../resize/virt-resize.pod:9
22640 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
22641 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
22642 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
22647 #: ../resize/virt-resize.pod:15
22649 "Virt-resize is a tool which can resize a virtual machine disk, making it "
22650 "larger or smaller overall, and resizing or deleting any partitions contained "
22655 #: ../resize/virt-resize.pod:19
22657 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
22658 "not> be used on live virtual machines - for consistent results, shut the "
22659 "virtual machine down before resizing it."
22663 #: ../resize/virt-resize.pod:23
22665 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
22666 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
22670 #: ../resize/virt-resize.pod:31 ../resize/virt-resize.pod:597 ../sparsify/virt-sparsify.pod:203 ../src/guestfs.pod:484 ../src/guestfs.pod:1302 ../src/guestfs.pod:1441 ../src/guestfs.pod:2690
22675 #: ../resize/virt-resize.pod:33
22677 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
22678 "fill the extra 5GB of space."
22682 #: ../resize/virt-resize.pod:36
22685 " virt-filesystems --long -h --all -a olddisk\n"
22690 #: ../resize/virt-resize.pod:38
22693 " truncate -r olddisk newdisk\n"
22694 " truncate -s +5G newdisk\n"
22699 #: ../resize/virt-resize.pod:41
22702 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
22703 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
22708 #: ../resize/virt-resize.pod:44 ../resize/virt-resize.pod:604 ../sparsify/virt-sparsify.pod:210 ../src/guestfs.pod:490 ../src/guestfs.pod:1306 ../src/guestfs.pod:1445 ../src/guestfs.pod:2715
22713 #: ../resize/virt-resize.pod:46
22715 "As above, but make the /boot partition 200MB bigger, while giving the "
22716 "remaining space to /dev/sda2:"
22720 #: ../resize/virt-resize.pod:49
22723 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
22724 " olddisk newdisk\n"
22729 #: ../resize/virt-resize.pod:52 ../resize/virt-resize.pod:610 ../sparsify/virt-sparsify.pod:216 ../src/guestfs.pod:501 ../src/guestfs.pod:1451
22734 #: ../resize/virt-resize.pod:54
22736 "As in the first example, but expand a logical volume as the final step. "
22737 "This is what you would typically use for Linux guests that use LVM:"
22741 #: ../resize/virt-resize.pod:58
22744 " virt-resize --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root \\\n"
22745 " olddisk newdisk\n"
22750 #: ../resize/virt-resize.pod:61
22755 #: ../resize/virt-resize.pod:63
22757 "As in the first example, but the output format will be qcow2 instead of a "
22762 #: ../resize/virt-resize.pod:66
22765 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
22766 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
22771 #: ../resize/virt-resize.pod:71
22772 msgid "DETAILED USAGE"
22776 #: ../resize/virt-resize.pod:73
22777 msgid "EXPANDING A VIRTUAL MACHINE DISK"
22781 #: ../resize/virt-resize.pod:77
22782 msgid "1. Shut down the virtual machine"
22786 #: ../resize/virt-resize.pod:79
22787 msgid "2. Locate input disk image"
22791 #: ../resize/virt-resize.pod:81
22793 "Locate the input disk image (ie. the file or device on the host containing "
22794 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
22795 "dumpxml> like this to find the disk image name:"
22799 #: ../resize/virt-resize.pod:85
22802 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
22803 " Found 1 nodes:\n"
22805 " <source dev=\"/dev/vg/lv_guest\" />\n"
22810 #: ../resize/virt-resize.pod:90
22811 msgid "3. Look at current sizing"
22815 #: ../resize/virt-resize.pod:92
22816 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
22820 #: ../resize/virt-resize.pod:95
22823 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
22824 " Name Type Size Parent\n"
22825 " /dev/sda1 partition 101M /dev/sda\n"
22826 " /dev/sda2 partition 7.9G /dev/sda\n"
22827 " /dev/sda device 8.0G -\n"
22832 #: ../resize/virt-resize.pod:101
22834 "(This example is a virtual machine with an 8 GB disk which we would like to "
22835 "expand up to 10 GB)."
22839 #: ../resize/virt-resize.pod:104
22840 msgid "4. Create output disk"
22844 #: ../resize/virt-resize.pod:106
22846 "Virt-resize cannot do in-place disk modifications. You have to have space "
22847 "to store the resized output disk."
22851 #: ../resize/virt-resize.pod:109
22852 msgid "To store the resized disk image in a file, create a file of a suitable size:"
22856 #: ../resize/virt-resize.pod:112
22859 " # rm -f outdisk\n"
22860 " # truncate -s 10G outdisk\n"
22865 #: ../resize/virt-resize.pod:115
22866 msgid "Or use L<lvcreate(1)> to create a logical volume:"
22870 #: ../resize/virt-resize.pod:117
22873 " # lvcreate -L 10G -n lv_name vg_name\n"
22878 #: ../resize/virt-resize.pod:119
22879 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
22883 #: ../resize/virt-resize.pod:121
22886 " # virsh pool-list\n"
22887 " # virsh vol-create-as poolname newvol 10G\n"
22892 #: ../resize/virt-resize.pod:124
22897 #: ../resize/virt-resize.pod:126
22899 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
22900 "file) and the output disk. The output disk is the one created in the "
22905 #: ../resize/virt-resize.pod:130
22908 " # virt-resize indisk outdisk\n"
22913 #: ../resize/virt-resize.pod:132
22915 "This command just copies disk image C<indisk> to disk image C<outdisk> "
22916 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
22917 "larger, then an extra, empty partition is created at the end of the disk "
22918 "covering the extra space. If C<outdisk> is smaller, then it will give an "
22923 #: ../resize/virt-resize.pod:138
22925 "More realistically you'd want to expand existing partitions in the disk "
22926 "image by passing extra options (for the full list see the L</OPTIONS> "
22931 #: ../resize/virt-resize.pod:142
22933 "L</--expand> is the most useful option. It expands the named partition "
22934 "within the disk to fill any extra space:"
22938 #: ../resize/virt-resize.pod:145
22941 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
22946 #: ../resize/virt-resize.pod:147
22948 "(In this case, an extra partition is I<not> created at the end of the disk, "
22949 "because there will be no unused space)."
22953 #: ../resize/virt-resize.pod:150
22955 "L</--resize> is the other commonly used option. The following would "
22956 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
22957 "rest of the available space:"
22961 #: ../resize/virt-resize.pod:154
22964 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
22965 " indisk outdisk\n"
22970 #: ../resize/virt-resize.pod:157
22972 "If the expanded partition in the image contains a filesystem or LVM PV, then "
22973 "if virt-resize knows how, it will resize the contents, the equivalent of "
22974 "calling a command such as L<pvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)> "
22975 "or L<btrfs(8)>. However virt-resize does not know how to resize some "
22976 "filesystems, so you would have to online resize them after booting the "
22981 #: ../resize/virt-resize.pod:164
22982 msgid "Other options are covered below."
22986 #: ../resize/virt-resize.pod:166
22991 #: ../resize/virt-resize.pod:168
22992 msgid "Thoroughly test the new disk image I<before> discarding the old one."
22996 #: ../resize/virt-resize.pod:170
22997 msgid "If you are using libvirt, edit the XML to point at the new disk:"
23001 #: ../resize/virt-resize.pod:172
23004 " # virsh edit guestname\n"
23009 #: ../resize/virt-resize.pod:174
23011 "Change E<lt>source ...E<gt>, see "
23012 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
23016 #: ../resize/virt-resize.pod:177
23017 msgid "Then start up the domain with the new, resized disk:"
23021 #: ../resize/virt-resize.pod:179
23024 " # virsh start guestname\n"
23029 #: ../resize/virt-resize.pod:181
23031 "and check that it still works. See also the L</NOTES> section below for "
23032 "additional information."
23036 #: ../resize/virt-resize.pod:184
23037 msgid "7. Resize LVs etc inside the guest"
23041 #: ../resize/virt-resize.pod:186
23042 msgid "(This can also be done offline using L<guestfish(1)>)"
23046 #: ../resize/virt-resize.pod:188
23048 "Once the guest has booted you should see the new space available, at least "
23049 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
23050 "may need to resize LVs inside PVs, and also resize filesystem types that "
23051 "virt-resize does not know how to expand."
23055 #: ../resize/virt-resize.pod:195
23056 msgid "SHRINKING A VIRTUAL MACHINE DISK"
23060 #: ../resize/virt-resize.pod:197
23062 "Shrinking is somewhat more complex than expanding, and only an overview is "
23067 #: ../resize/virt-resize.pod:200
23069 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
23070 "filesystems). The user has to shrink content before passing the disk image "
23071 "to virt-resize, and virt-resize will check that the content has been shrunk "
23076 #: ../resize/virt-resize.pod:205
23077 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
23081 #: ../resize/virt-resize.pod:207
23083 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
23084 "steps 3 and 4 above to allocate a new disk image."
23088 #: ../resize/virt-resize.pod:210
23089 msgid "Then run virt-resize with any of the I<--shrink> and/or I<--resize> options."
23093 #: ../resize/virt-resize.pod:213
23094 msgid "IGNORING OR DELETING PARTITIONS"
23098 #: ../resize/virt-resize.pod:215
23100 "virt-resize also gives a convenient way to ignore or delete partitions when "
23101 "copying from the input disk to the output disk. Ignoring a partition speeds "
23102 "up the copy where you don't care about the existing contents of a "
23103 "partition. Deleting a partition removes it completely, but note that it "
23104 "also renumbers any partitions after the one which is deleted, which can "
23105 "leave some guests unbootable."
23109 #: ../resize/virt-resize.pod:222
23110 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
23114 #: ../resize/virt-resize.pod:224
23116 "If the input disk is in qcow2 format, then you may prefer that the output is "
23117 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
23118 "the fly. The output format is simply determined by the format of the empty "
23119 "output container that you provide. Thus to create qcow2 output, use:"
23123 #: ../resize/virt-resize.pod:230
23126 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
23131 #: ../resize/virt-resize.pod:232
23132 msgid "instead of the truncate command (use I<-c> for a compressed disk)."
23136 #: ../resize/virt-resize.pod:234
23137 msgid "Similarly, to get non-sparse raw output use:"
23141 #: ../resize/virt-resize.pod:236
23144 " fallocate -l size outdisk\n"
23149 #: ../resize/virt-resize.pod:238
23151 "(on older systems that don't have the L<fallocate(1)> command use C<dd "
23152 "if=/dev/zero of=outdisk bs=1M count=..>)"
23156 #: ../resize/virt-resize.pod:241
23157 msgid "LOGICAL PARTITIONS"
23161 #: ../resize/virt-resize.pod:243
23163 "Logical partitions (a.k.a. C</dev/sda5+> on disks using DOS partition "
23164 "tables) cannot be resized."
23168 #: ../resize/virt-resize.pod:246
23170 "To understand what is going on, firstly one of the four partitions "
23171 "C</dev/sda1-4> will have MBR partition type C<05> or C<0f>. This is called "
23172 "the B<extended partition>. Use L<virt-filesystems(1)> to see the MBR "
23177 #: ../resize/virt-resize.pod:251
23178 msgid "Logical partitions live inside the extended partition."
23182 #: ../resize/virt-resize.pod:253
23184 "The extended partition can be expanded, but not shrunk (unless you force it, "
23185 "which is not advisable). When the extended partition is copied across, all "
23186 "the logical partitions contained inside are copied over implicitly. "
23187 "Virt-resize does not look inside the extended partition, so it copies the "
23188 "logical partitions blindly."
23192 #: ../resize/virt-resize.pod:259
23194 "You cannot specify a logical partition (C</dev/sda5+>) at all on the command "
23195 "line. Doing so will give an error."
23199 #: ../resize/virt-resize.pod:268 ../sparsify/virt-sparsify.pod:105
23200 msgid "Display help."
23204 #: ../resize/virt-resize.pod:270
23205 msgid "B<--align-first auto>"
23209 #: ../resize/virt-resize.pod:272
23210 msgid "B<--align-first never>"
23214 #: ../resize/virt-resize.pod:274
23215 msgid "B<--align-first always>"
23219 #: ../resize/virt-resize.pod:276
23221 "Align the first partition for improved performance (see also the "
23222 "I<--alignment> option)."
23226 #: ../resize/virt-resize.pod:279
23228 "The default is I<--align-first auto> which only aligns the first partition "
23229 "if it is safe to do so. That is, only when we know how to fix the "
23230 "bootloader automatically, and at the moment that can only be done for "
23235 #: ../resize/virt-resize.pod:284
23237 "I<--align-first never> means we never move the first partition. This is the "
23238 "safest option. Try this if the guest does not boot after resizing."
23242 #: ../resize/virt-resize.pod:288
23244 "I<--align-first always> means we always align the first partition (if it "
23245 "needs to be aligned). For some guests this will break the bootloader, "
23246 "making the guest unbootable."
23250 #: ../resize/virt-resize.pod:292
23251 msgid "B<--alignment N>"
23255 #: ../resize/virt-resize.pod:294
23257 "Set the alignment of partitions to C<N> sectors. The default in virt-resize "
23258 "E<lt> 1.13.19 was 64 sectors, and after that is 128 sectors."
23262 #: ../resize/virt-resize.pod:298
23264 "Assuming 512 byte sector size inside the guest, here are some suitable "
23269 #: ../resize/virt-resize.pod:303
23270 msgid "I<--alignment 1> (512 bytes)"
23274 #: ../resize/virt-resize.pod:305
23276 "The partitions would be packed together as closely as possible, but would be "
23277 "completely unaligned. In some cases this can cause very poor performance. "
23278 "See L<virt-alignment-scan(1)> for further details."
23282 #: ../resize/virt-resize.pod:309
23283 msgid "I<--alignment 8> (4K)"
23287 #: ../resize/virt-resize.pod:311
23289 "This would be the minimum acceptable alignment for reasonable performance on "
23294 #: ../resize/virt-resize.pod:314
23295 msgid "I<--alignment 128> (64K)"
23299 #: ../resize/virt-resize.pod:316
23301 "This alignment provides good performance when the host is using high end "
23306 #: ../resize/virt-resize.pod:319
23307 msgid "I<--alignment 2048> (1M)"
23311 #: ../resize/virt-resize.pod:321
23313 "This is the standard alignment used by all newly installed guests since "
23318 #: ../resize/virt-resize.pod:326
23323 #: ../resize/virt-resize.pod:328 ../tools/virt-make-fs.pl:177 ../tools/virt-win-reg.pl:120
23328 #: ../resize/virt-resize.pod:330 ../tools/virt-win-reg.pl:122
23329 msgid "Enable debugging messages."
23333 #: ../resize/virt-resize.pod:332
23334 msgid "B<--delete part>"
23338 #: ../resize/virt-resize.pod:334
23340 "Delete the named partition. It would be more accurate to describe this as "
23341 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
23342 "the original disk image is left intact."
23346 #: ../resize/virt-resize.pod:338
23348 "Note that when you delete a partition, then anything contained in the "
23349 "partition is also deleted. Furthermore, this causes any partitions that "
23350 "come after to be I<renumbered>, which can easily make your guest unbootable."
23354 #: ../resize/virt-resize.pod:343 ../resize/virt-resize.pod:404 ../resize/virt-resize.pod:531 ../sparsify/virt-sparsify.pod:145
23355 msgid "You can give this option multiple times."
23359 #: ../resize/virt-resize.pod:345
23360 msgid "B<--expand part>"
23364 #: ../resize/virt-resize.pod:347
23366 "Expand the named partition so it uses up all extra space (space left over "
23367 "after any other resize changes that you request have been done)."
23371 #: ../resize/virt-resize.pod:350
23373 "If virt-resize knows how, it will expand the direct content of the "
23374 "partition. For example, if the partition is an LVM PV, it will expand the "
23375 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
23376 "content it doesn't know about alone."
23380 #: ../resize/virt-resize.pod:355
23381 msgid "Currently virt-resize can resize:"
23385 #: ../resize/virt-resize.pod:361
23386 msgid "ext2, ext3 and ext4 filesystems."
23390 #: ../resize/virt-resize.pod:365
23391 msgid "NTFS filesystems, if libguestfs was compiled with support for NTFS."
23395 #: ../resize/virt-resize.pod:367
23397 "The filesystem must have been shut down consistently last time it was used. "
23398 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
23399 "consistency check, so at the first boot after resizing Windows will check "
23404 #: ../resize/virt-resize.pod:374
23406 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
23407 "inside the PV, but see the I<--LV-expand> option. The user could also "
23408 "resize LVs as desired after boot."
23412 #: ../resize/virt-resize.pod:380
23413 msgid "Btrfs filesystems, if libguestfs was compiled with support for btrfs."
23417 #: ../resize/virt-resize.pod:384 ../resize/virt-resize.pod:559
23418 msgid "Note that you cannot use I<--expand> and I<--shrink> together."
23422 #: ../resize/virt-resize.pod:386 ../sparsify/virt-sparsify.pod:125 ../tools/virt-list-filesystems.pl:91 ../tools/virt-list-partitions.pl:92 ../tools/virt-tar.pl:141 ../tools/virt-win-reg.pl:142
23423 msgid "B<--format> raw"
23427 #: ../resize/virt-resize.pod:388 ../sparsify/virt-sparsify.pod:129
23429 "Specify the format of the input disk image. If this flag is not given then "
23430 "it is auto-detected from the image itself."
23434 #: ../resize/virt-resize.pod:394
23436 "Note that this option I<does not> affect the output format. See L</QCOW2 "
23437 "AND NON-SPARSE RAW FORMATS>."
23441 #: ../resize/virt-resize.pod:397
23442 msgid "B<--ignore part>"
23446 #: ../resize/virt-resize.pod:399
23448 "Ignore the named partition. Effectively this means the partition is "
23449 "allocated on the destination disk, but the content is not copied across from "
23450 "the source disk. The content of the partition will be blank (all zero "
23455 #: ../resize/virt-resize.pod:406
23456 msgid "B<--LV-expand logvol>"
23460 #: ../resize/virt-resize.pod:408
23462 "This takes the logical volume and, as a final step, expands it to fill all "
23463 "the space available in its volume group. A typical usage, assuming a Linux "
23464 "guest with a single PV C</dev/sda2> and a root device called "
23465 "C</dev/vg_guest/lv_root> would be:"
23469 #: ../resize/virt-resize.pod:413
23472 " virt-resize indisk outdisk \\\n"
23473 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
23478 #: ../resize/virt-resize.pod:416
23480 "This would first expand the partition (and PV), and then expand the root "
23481 "device to fill the extra space in the PV."
23485 #: ../resize/virt-resize.pod:419
23487 "The contents of the LV are also resized if virt-resize knows how to do "
23488 "that. You can stop virt-resize from trying to expand the content by using "
23489 "the option I<--no-expand-content>."
23493 #: ../resize/virt-resize.pod:423
23494 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
23498 #: ../resize/virt-resize.pod:425
23500 "You can give this option multiple times, I<but> it doesn't make sense to do "
23501 "this unless the logical volumes you specify are all in different volume "
23506 #: ../resize/virt-resize.pod:429 ../sparsify/virt-sparsify.pod:147
23507 msgid "B<--machine-readable>"
23511 #: ../resize/virt-resize.pod:431 ../sparsify/virt-sparsify.pod:149
23513 "This option is used to make the output more machine friendly when being "
23514 "parsed by other programs. See L</MACHINE READABLE OUTPUT> below."
23518 #: ../resize/virt-resize.pod:437
23519 msgid "B<--dryrun>"
23523 #: ../resize/virt-resize.pod:439
23524 msgid "Print a summary of what would be done, but don't do anything."
23528 #: ../resize/virt-resize.pod:441
23529 msgid "B<--no-copy-boot-loader>"
23533 #: ../resize/virt-resize.pod:443
23535 "By default, virt-resize copies over some sectors at the start of the disk "
23536 "(up to the beginning of the first partition). Commonly these sectors "
23537 "contain the Master Boot Record (MBR) and the boot loader, and are required "
23538 "in order for the guest to boot correctly."
23542 #: ../resize/virt-resize.pod:448
23544 "If you specify this flag, then this initial copy is not done. You may need "
23545 "to reinstall the boot loader in this case."
23549 #: ../resize/virt-resize.pod:451
23550 msgid "B<--no-extra-partition>"
23554 #: ../resize/virt-resize.pod:453
23556 "By default, virt-resize creates an extra partition if there is any extra, "
23557 "unused space after all resizing has happened. Use this option to prevent "
23558 "the extra partition from being created. If you do this then the extra space "
23559 "will be inaccessible until you run fdisk, parted, or some other partitioning "
23560 "tool in the guest."
23564 #: ../resize/virt-resize.pod:459
23566 "Note that if the surplus space is smaller than 10 MB, no extra partition "
23571 #: ../resize/virt-resize.pod:462
23572 msgid "B<--no-expand-content>"
23576 #: ../resize/virt-resize.pod:464
23578 "By default, virt-resize will try to expand the direct contents of "
23579 "partitions, if it knows how (see I<--expand> option above)."
23583 #: ../resize/virt-resize.pod:467
23585 "If you give the I<--no-expand-content> option then virt-resize will not "
23590 #: ../resize/virt-resize.pod:470
23591 msgid "B<--ntfsresize-force>"
23595 #: ../resize/virt-resize.pod:472
23597 "Pass the I<--force> option to L<ntfsresize(8)>, allowing resizing even if "
23598 "the NTFS disk is marked as needing a consistency check. You have to use "
23599 "this option if you want to resize a Windows guest multiple times without "
23600 "booting into Windows between each resize."
23604 #: ../resize/virt-resize.pod:478
23605 msgid "B<--output-format> raw"
23609 #: ../resize/virt-resize.pod:480
23611 "Specify the format of the output disk image. If this flag is not given then "
23612 "it is auto-detected from the image itself."
23616 #: ../resize/virt-resize.pod:486
23618 "Note that this option I<does not create> the output format. This option "
23619 "just tells libguestfs what it is so it doesn't try to guess it. You still "
23620 "need to create the output disk with the right format. See L</QCOW2 AND "
23621 "NON-SPARSE RAW FORMATS>."
23625 #: ../resize/virt-resize.pod:495
23626 msgid "Don't print the summary."
23630 #: ../resize/virt-resize.pod:497
23631 msgid "B<--resize part=size>"
23635 #: ../resize/virt-resize.pod:499
23637 "Resize the named partition (expanding or shrinking it) so that it has the "
23642 #: ../resize/virt-resize.pod:502
23644 "C<size> can be expressed as an absolute number followed by b/K/M/G to mean "
23645 "bytes, Kilobytes, Megabytes, or Gigabytes; or as a percentage of the current "
23646 "size; or as a relative number or percentage. For example:"
23650 #: ../resize/virt-resize.pod:508
23653 " --resize /dev/sda2=10G\n"
23658 #: ../resize/virt-resize.pod:510
23661 " --resize /dev/sda4=90%\n"
23666 #: ../resize/virt-resize.pod:512
23669 " --resize /dev/sda2=+1G\n"
23674 #: ../resize/virt-resize.pod:514
23677 " --resize /dev/sda2=-200M\n"
23682 #: ../resize/virt-resize.pod:516
23685 " --resize /dev/sda1=+128K\n"
23690 #: ../resize/virt-resize.pod:518
23693 " --resize /dev/sda1=+10%\n"
23698 #: ../resize/virt-resize.pod:520
23701 " --resize /dev/sda1=-10%\n"
23706 #: ../resize/virt-resize.pod:522
23708 "You can increase the size of any partition. Virt-resize will expand the "
23709 "direct content of the partition if it knows how (see I<--expand> below)."
23713 #: ../resize/virt-resize.pod:526
23715 "You can only I<decrease> the size of partitions that contain filesystems or "
23716 "PVs which have already been shrunk. Virt-resize will check this has been "
23717 "done before proceeding, or else will print an error (see also "
23718 "I<--resize-force>)."
23722 #: ../resize/virt-resize.pod:533
23723 msgid "B<--resize-force part=size>"
23727 #: ../resize/virt-resize.pod:535
23729 "This is the same as I<--resize> except that it will let you decrease the "
23730 "size of any partition. Generally this means you will lose any data which "
23731 "was at the end of the partition you shrink, but you may not care about that "
23732 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
23733 "as a swap partition)."
23737 #: ../resize/virt-resize.pod:541
23738 msgid "See also the I<--ignore> option."
23742 #: ../resize/virt-resize.pod:543
23743 msgid "B<--shrink part>"
23747 #: ../resize/virt-resize.pod:545
23749 "Shrink the named partition until the overall disk image fits in the "
23750 "destination. The named partition B<must> contain a filesystem or PV which "
23751 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
23752 "online tools). Virt-resize will check this and give an error if it has not "
23757 #: ../resize/virt-resize.pod:551
23759 "The amount by which the overall disk must be shrunk (after carrying out all "
23760 "other operations requested by the user) is called the \"deficit\". For "
23761 "example, a straight copy (assume no other operations) from a 5GB disk image "
23762 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
23763 "would give an error unless the user specified a partition to shrink and that "
23764 "partition had more than a gigabyte of free space."
23768 #: ../resize/virt-resize.pod:569 ../sparsify/virt-sparsify.pod:177
23769 msgid "MACHINE READABLE OUTPUT"
23773 #: ../resize/virt-resize.pod:571
23775 "The I<--machine-readable> option can be used to make the output more machine "
23776 "friendly, which is useful when calling virt-resize from other programs, GUIs "
23781 #: ../resize/virt-resize.pod:575 ../sparsify/virt-sparsify.pod:183
23782 msgid "There are two ways to use this option."
23786 #: ../resize/virt-resize.pod:577
23788 "Firstly use the option on its own to query the capabilities of the "
23789 "virt-resize binary. Typical output looks like this:"
23793 #: ../resize/virt-resize.pod:580
23796 " $ virt-resize --machine-readable\n"
23798 " ntfsresize-force\n"
23806 #: ../resize/virt-resize.pod:587 ../sparsify/virt-sparsify.pod:193
23808 "A list of features is printed, one per line, and the program exits with "
23813 #: ../resize/virt-resize.pod:590 ../sparsify/virt-sparsify.pod:196
23815 "Secondly use the option in conjunction with other options to make the "
23816 "regular program output more machine friendly."
23820 #: ../resize/virt-resize.pod:593 ../sparsify/virt-sparsify.pod:199
23821 msgid "At the moment this means:"
23825 #: ../resize/virt-resize.pod:599 ../sparsify/virt-sparsify.pod:205
23827 "Progress bar messages can be parsed from stdout by looking for this regular "
23832 #: ../resize/virt-resize.pod:602 ../sparsify/virt-sparsify.pod:208
23835 " ^[0-9]+/[0-9]+$\n"
23840 #: ../resize/virt-resize.pod:606 ../sparsify/virt-sparsify.pod:212
23842 "The calling program should treat messages sent to stdout (except for "
23843 "progress bar messages) as status messages. They can be logged and/or "
23844 "displayed to the user."
23848 #: ../resize/virt-resize.pod:612
23850 "The calling program should treat messages sent to stderr as error messages. "
23851 "In addition, virt-resize exits with a non-zero status code if there was a "
23856 #: ../resize/virt-resize.pod:618
23858 "Versions of the program prior to 1.13.9 did not support the "
23859 "I<--machine-readable> option and will return an error."
23863 #: ../resize/virt-resize.pod:623
23864 msgid "\"Partition 1 does not end on cylinder boundary.\""
23868 #: ../resize/virt-resize.pod:625
23870 "Virt-resize aligns partitions to multiples of 128 sectors (see the "
23871 "I<--alignment> parameter). Usually this means the partitions will not be "
23872 "aligned to the ancient CHS geometry. However CHS geometry is meaningless "
23873 "for disks manufactured since the early 1990s, and doubly so for virtual hard "
23874 "drives. Alignment of partitions to cylinders is not required by any modern "
23875 "operating system."
23879 #: ../resize/virt-resize.pod:632
23880 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
23884 #: ../resize/virt-resize.pod:634
23886 "In Windows Vista and later versions, Microsoft switched to using a separate "
23887 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
23888 "and C</dev/sda2> is the main (C:) drive. Resizing the first (boot) "
23889 "partition causes the bootloader to fail with C<0xC0000225> error. Resizing "
23890 "the second partition (ie. C: drive) should work."
23894 #: ../resize/virt-resize.pod:641
23896 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
23897 "NTFS partitions have been expanded. This is just a safety check and (unless "
23898 "it find errors) is nothing to worry about."
23902 #: ../resize/virt-resize.pod:645
23903 msgid "GUEST BOOT STUCK AT \"GRUB\""
23907 #: ../resize/virt-resize.pod:647
23909 "If a Linux guest does not boot after resizing, and the boot is stuck after "
23910 "printing C<GRUB> on the console, try reinstalling grub."
23914 #: ../resize/virt-resize.pod:650
23917 " guestfish -i -a newdisk\n"
23918 " ><fs> cat /boot/grub/device.map\n"
23919 " # check the contents of this file are sensible or\n"
23920 " # edit the file if necessary\n"
23921 " ><fs> grub-install / /dev/vda\n"
23927 #: ../resize/virt-resize.pod:657
23929 "For more flexible guest reconfiguration, including if you need to specify "
23930 "other parameters to grub-install, use L<virt-rescue(1)>."
23934 #: ../resize/virt-resize.pod:660
23935 msgid "ALTERNATIVE TOOLS"
23939 #: ../resize/virt-resize.pod:662
23941 "There are several proprietary tools for resizing partitions. We won't "
23942 "mention any here."
23946 #: ../resize/virt-resize.pod:665
23948 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
23949 "operations on disk images. They can resize and move partitions, but I don't "
23950 "think they can do anything with the contents, and they certainly don't "
23955 #: ../resize/virt-resize.pod:670
23957 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
23958 "but at a much lower level. You will probably end up hand-calculating sector "
23959 "offsets, which is something that virt-resize was designed to avoid. If you "
23960 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
23965 #: ../resize/virt-resize.pod:690
23967 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, "
23968 "L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, "
23969 "L<ntfsresize(8)>, L<btrfs(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, "
23970 "L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, "
23971 "L<virt-sparsify(1)>, L<virt-alignment-scan(1)>, L<http://libguestfs.org/>."
23975 #: ../ruby/examples/guestfs-ruby.pod:5
23976 msgid "guestfs-ruby - How to use libguestfs from Ruby"
23980 #: ../ruby/examples/guestfs-ruby.pod:9
23983 " require 'guestfs'\n"
23984 " g = Guestfs::Guestfs.new()\n"
23985 " g.add_drive_opts(\"disk.img\",\n"
23986 " :readonly => 1, :format => \"raw\")\n"
23992 #: ../ruby/examples/guestfs-ruby.pod:17
23994 "This manual page documents how to call libguestfs from the Ruby programming "
23995 "language. This page just documents the differences from the C API and gives "
23996 "some examples. If you are not familiar with using libguestfs, you also need "
23997 "to read L<guestfs(3)>."
24001 #: ../ruby/examples/guestfs-ruby.pod:24
24003 "Errors from libguestfs functions are mapped into the C<Error> exception. "
24004 "This has a single parameter which is the error message (a string)."
24008 #: ../ruby/examples/guestfs-ruby.pod:38
24010 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
24011 "L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, "
24012 "L<guestfs-python(3)>, L<guestfs-recipes(1)>, L<http://libguestfs.org/>."
24016 #: ../sparsify/virt-sparsify.pod:5
24017 msgid "virt-sparsify - Make a virtual machine disk sparse"
24021 #: ../sparsify/virt-sparsify.pod:9
24024 " virt-sparsify [--options] indisk outdisk\n"
24029 #: ../sparsify/virt-sparsify.pod:13
24031 "Virt-sparsify is a tool which can make a virtual machine disk (or any disk "
24032 "image) sparse a.k.a. thin-provisioned. This means that free space within "
24033 "the disk image can be converted back to free space on the host."
24037 #: ../sparsify/virt-sparsify.pod:18
24039 "Virt-sparsify can locate and sparsify free space in most filesystems "
24040 "(eg. ext2/3/4, btrfs, NTFS, etc.), and also in LVM physical volumes."
24044 #: ../sparsify/virt-sparsify.pod:21
24046 "Virt-sparsify can also convert between some disk formats, for example "
24047 "converting a raw disk image to a thin-provisioned qcow2 image."
24051 #: ../sparsify/virt-sparsify.pod:24
24053 "Virt-sparsify can operate on any disk image, not just ones from virtual "
24054 "machines. If a virtual machine has more than one attached disk, you must "
24055 "sparsify each one separately."
24059 #: ../sparsify/virt-sparsify.pod:28
24060 msgid "IMPORTANT LIMITATIONS"
24064 #: ../sparsify/virt-sparsify.pod:34
24066 "Virt-sparsify does not do in-place modifications. It copies from a source "
24067 "image to a destination image, leaving the source unchanged. I<Check that "
24068 "the sparsification was successful before deleting the source image>."
24072 #: ../sparsify/virt-sparsify.pod:41
24073 msgid "The virtual machine I<must be shut down> before using this tool."
24077 #: ../sparsify/virt-sparsify.pod:45
24079 "Virt-sparsify may require up to 2x the virtual size of the source disk image "
24080 "(1 temporary copy + 1 destination image). This is in the worst case and "
24081 "usually much less space is required."
24085 #: ../sparsify/virt-sparsify.pod:51
24086 msgid "Virt-sparsify cannot resize disk images. To do that, use L<virt-resize(1)>."
24090 #: ../sparsify/virt-sparsify.pod:56
24091 msgid "Virt-sparsify cannot handle encrypted disks."
24095 #: ../sparsify/virt-sparsify.pod:60
24097 "Virt-sparsify cannot yet sparsify the space between partitions. Note that "
24098 "this space is often used for critical items like bootloaders so it's not "
24103 #: ../sparsify/virt-sparsify.pod:66
24105 "Virt-sparsify does not yet know how to sparsify swapspace. It is not safe "
24106 "to do this unless we can be sure there is no hibernation data, so at the "
24107 "moment swap partitions are ignored."
24111 #: ../sparsify/virt-sparsify.pod:72
24113 "You may also want to read the manual pages for the associated tools "
24114 "L<virt-filesystems(1)> and L<virt-df(1)> before starting."
24118 #: ../sparsify/virt-sparsify.pod:77
24119 msgid "Typical usage is:"
24123 #: ../sparsify/virt-sparsify.pod:79
24126 " virt-sparsify indisk outdisk\n"
24131 #: ../sparsify/virt-sparsify.pod:81
24133 "which copies C<indisk> to C<outdisk>, making the output sparse. C<outdisk> "
24134 "is created, or overwritten if it already exists. The format of the input "
24135 "disk is detected (eg. qcow2) and the same format is used for the output "
24140 #: ../sparsify/virt-sparsify.pod:86
24141 msgid "To convert between formats, use the I<--convert> option:"
24145 #: ../sparsify/virt-sparsify.pod:88
24148 " virt-sparsify disk.raw --convert qcow2 disk.qcow2\n"
24153 #: ../sparsify/virt-sparsify.pod:90
24155 "Virt-sparsify tries to zero and sparsify free space on every filesystem it "
24156 "can find within the source disk image. You can get it to ignore (don't zero "
24157 "free space on) certain filesystems by doing:"
24161 #: ../sparsify/virt-sparsify.pod:94
24164 " virt-sparsify --ignore /dev/sda1 indisk outdisk\n"
24169 #: ../sparsify/virt-sparsify.pod:96
24170 msgid "See L<virt-filesystems(1)> to get a list of filesystems within a disk image."
24174 #: ../sparsify/virt-sparsify.pod:107
24175 msgid "B<--convert> raw"
24179 #: ../sparsify/virt-sparsify.pod:109
24180 msgid "B<--convert> qcow2"
24184 #: ../sparsify/virt-sparsify.pod:111
24185 msgid "B<--convert> [other formats]"
24189 #: ../sparsify/virt-sparsify.pod:113
24191 "Use C<output-format> as the format for the destination image. If this is "
24192 "not specified, then the input format is used."
24196 #: ../sparsify/virt-sparsify.pod:116
24197 msgid "Supported and known-working output formats are: C<raw>, C<qcow2>."
24201 #: ../sparsify/virt-sparsify.pod:118
24203 "You can also use any format supported by the L<qemu-img(1)> program, "
24204 "eg. C<vdi> or C<vmdk>, but support for other formats is reliant on qemu."
24208 #: ../sparsify/virt-sparsify.pod:122
24210 "Specifying the I<--convert> option is usually a good idea, because then "
24211 "virt-sparsify doesn't need to try to guess the input format."
24215 #: ../sparsify/virt-sparsify.pod:127
24216 msgid "B<--format> qcow2"
24220 #: ../sparsify/virt-sparsify.pod:135
24221 msgid "B<--ignore> filesystem"
24225 #: ../sparsify/virt-sparsify.pod:137
24226 msgid "B<--ignore> volgroup"
24230 #: ../sparsify/virt-sparsify.pod:139
24232 "Ignore the named filesystem. Free space on the filesystem will not be "
24233 "zeroed, but existing blocks of zeroes will still be sparsified."
24237 #: ../sparsify/virt-sparsify.pod:142
24239 "In the second form, this ignores the named volume group. Use the volume "
24240 "group name without the C</dev/> prefix, eg. I<--ignore vg_foo>"
24244 #: ../sparsify/virt-sparsify.pod:157
24245 msgid "This disables progress bars and other unnecessary output."
24249 #: ../sparsify/virt-sparsify.pod:179
24251 "The I<--machine-readable> option can be used to make the output more machine "
24252 "friendly, which is useful when calling virt-sparsify from other programs, "
24257 #: ../sparsify/virt-sparsify.pod:185
24259 "Firstly use the option on its own to query the capabilities of the "
24260 "virt-sparsify binary. Typical output looks like this:"
24264 #: ../sparsify/virt-sparsify.pod:188
24267 " $ virt-sparsify --machine-readable\n"
24275 #: ../sparsify/virt-sparsify.pod:218
24277 "The calling program should treat messages sent to stderr as error messages. "
24278 "In addition, virt-sparsify exits with a non-zero status code if there was a "
24283 #: ../sparsify/virt-sparsify.pod:224
24285 "All versions of virt-sparsify have supported the I<--machine-readable> "
24290 #: ../sparsify/virt-sparsify.pod:238
24292 "Location of the temporary directory used for the potentially large temporary "
24297 #: ../sparsify/virt-sparsify.pod:241
24299 "You should ensure there is enough free space in the worst case for a full "
24300 "copy of the source disk (I<virtual> size), or else set C<$TMPDIR> to point "
24301 "to another directory that has enough space."
24305 #: ../sparsify/virt-sparsify.pod:245
24306 msgid "This defaults to C</tmp>."
24310 #: ../sparsify/virt-sparsify.pod:249
24311 msgid "For other environment variables, see L<guestfs(3)/ENVIRONMENT VARIABLES>."
24315 #: ../sparsify/virt-sparsify.pod:253
24317 "L<virt-filesystems(1)>, L<virt-df(1)>, L<virt-resize(1)>, L<virt-rescue(1)>, "
24318 "L<guestfs(3)>, L<guestfish(1)>, L<truncate(1)>, L<fallocate(1)>, "
24319 "L<qemu-img(1)>, L<http://libguestfs.org/>."
24323 #: ../src/guestfs-actions.pod:1
24324 msgid "guestfs_add_cdrom"
24328 #: ../src/guestfs-actions.pod:3
24332 " guestfs_add_cdrom (guestfs_h *g,\n"
24333 " const char *filename);\n"
24338 #: ../src/guestfs-actions.pod:7 ../src/guestfs-actions.pod:302 ../src/guestfs-actions.pod:323
24340 "I<This function is deprecated.> In new code, use the "
24341 "L</guestfs_add_drive_opts> call instead."
24345 #: ../src/guestfs-actions.pod:24
24347 "This call checks for the existence of C<filename>. This stops you from "
24348 "specifying other types of drive which are supported by qemu such as C<nbd:> "
24349 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
24354 #: ../src/guestfs-actions.pod:31
24356 "If you just want to add an ISO file (often you use this as an efficient way "
24357 "to transfer large files into the guest), then you should probably use "
24358 "C<guestfs_add_drive_ro> instead."
24362 #: ../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:4328 ../src/guestfs-actions.pod:4342 ../src/guestfs-actions.pod:4355 ../src/guestfs-actions.pod:4369 ../src/guestfs-actions.pod:4384 ../src/guestfs-actions.pod:4420 ../src/guestfs-actions.pod:4492 ../src/guestfs-actions.pod:4512 ../src/guestfs-actions.pod:4529 ../src/guestfs-actions.pod:4549 ../src/guestfs-actions.pod:4569 ../src/guestfs-actions.pod:4604 ../src/guestfs-actions.pod:4623 ../src/guestfs-actions.pod:4642 ../src/guestfs-actions.pod:4677 ../src/guestfs-actions.pod:4689 ../src/guestfs-actions.pod:4722 ../src/guestfs-actions.pod:4738 ../src/guestfs-actions.pod:4751 ../src/guestfs-actions.pod:4766 ../src/guestfs-actions.pod:4783 ../src/guestfs-actions.pod:4941 ../src/guestfs-actions.pod:5014 ../src/guestfs-actions.pod:5034 ../src/guestfs-actions.pod:5047 ../src/guestfs-actions.pod:5098 ../src/guestfs-actions.pod:5116 ../src/guestfs-actions.pod:5134 ../src/guestfs-actions.pod:5150 ../src/guestfs-actions.pod:5164 ../src/guestfs-actions.pod:5178 ../src/guestfs-actions.pod:5195 ../src/guestfs-actions.pod:5210 ../src/guestfs-actions.pod:5237 ../src/guestfs-actions.pod:5300 ../src/guestfs-actions.pod:5373 ../src/guestfs-actions.pod:5404 ../src/guestfs-actions.pod:5423 ../src/guestfs-actions.pod:5442 ../src/guestfs-actions.pod:5454 ../src/guestfs-actions.pod:5471 ../src/guestfs-actions.pod:5484 ../src/guestfs-actions.pod:5499 ../src/guestfs-actions.pod:5514 ../src/guestfs-actions.pod:5546 ../src/guestfs-actions.pod:5572 ../src/guestfs-actions.pod:5611 ../src/guestfs-actions.pod:5631 ../src/guestfs-actions.pod:5645 ../src/guestfs-actions.pod:5662 ../src/guestfs-actions.pod:5711 ../src/guestfs-actions.pod:5764 ../src/guestfs-actions.pod:5811 ../src/guestfs-actions.pod:5854 ../src/guestfs-actions.pod:5882 ../src/guestfs-actions.pod:5899 ../src/guestfs-actions.pod:5917 ../src/guestfs-actions.pod:6054 ../src/guestfs-actions.pod:6111 ../src/guestfs-actions.pod:6133 ../src/guestfs-actions.pod:6151 ../src/guestfs-actions.pod:6203 ../src/guestfs-actions.pod:6269 ../src/guestfs-actions.pod:6286 ../src/guestfs-actions.pod:6299 ../src/guestfs-actions.pod:6313 ../src/guestfs-actions.pod:6602 ../src/guestfs-actions.pod:6621 ../src/guestfs-actions.pod:6640 ../src/guestfs-actions.pod:6654 ../src/guestfs-actions.pod:6666 ../src/guestfs-actions.pod:6680 ../src/guestfs-actions.pod:6692 ../src/guestfs-actions.pod:6706 ../src/guestfs-actions.pod:6722 ../src/guestfs-actions.pod:6740 ../src/guestfs-actions.pod:6759 ../src/guestfs-actions.pod:6778 ../src/guestfs-actions.pod:6808 ../src/guestfs-actions.pod:6826 ../src/guestfs-actions.pod:6849 ../src/guestfs-actions.pod:6867 ../src/guestfs-actions.pod:6886 ../src/guestfs-actions.pod:6907 ../src/guestfs-actions.pod:6926 ../src/guestfs-actions.pod:6943 ../src/guestfs-actions.pod:6962 ../src/guestfs-actions.pod:6990 ../src/guestfs-actions.pod:7014 ../src/guestfs-actions.pod:7033 ../src/guestfs-actions.pod:7049 ../src/guestfs-actions.pod:7073 ../src/guestfs-actions.pod:7092 ../src/guestfs-actions.pod:7107 ../src/guestfs-actions.pod:7126 ../src/guestfs-actions.pod:7170 ../src/guestfs-actions.pod:7197 ../src/guestfs-actions.pod:7227 ../src/guestfs-actions.pod:7339 ../src/guestfs-actions.pod:7460 ../src/guestfs-actions.pod:7472 ../src/guestfs-actions.pod:7485 ../src/guestfs-actions.pod:7498 ../src/guestfs-actions.pod:7520 ../src/guestfs-actions.pod:7533 ../src/guestfs-actions.pod:7546 ../src/guestfs-actions.pod:7559 ../src/guestfs-actions.pod:7574 ../src/guestfs-actions.pod:7633 ../src/guestfs-actions.pod:7650 ../src/guestfs-actions.pod:7666 ../src/guestfs-actions.pod:7682 ../src/guestfs-actions.pod:7699 ../src/guestfs-actions.pod:7712 ../src/guestfs-actions.pod:7732 ../src/guestfs-actions.pod:7832 ../src/guestfs-actions.pod:7888 ../src/guestfs-actions.pod:7902 ../src/guestfs-actions.pod:7943 ../src/guestfs-actions.pod:7956 ../src/guestfs-actions.pod:7974 ../src/guestfs-actions.pod:8008 ../src/guestfs-actions.pod:8044 ../src/guestfs-actions.pod:8160 ../src/guestfs-actions.pod:8175 ../src/guestfs-actions.pod:8189 ../src/guestfs-actions.pod:8244 ../src/guestfs-actions.pod:8257 ../src/guestfs-actions.pod:8302 ../src/guestfs-actions.pod:8342 ../src/guestfs-actions.pod:8398 ../src/guestfs-actions.pod:8418 ../src/guestfs-actions.pod:8451 ../src/guestfs-actions.pod:8515 ../src/guestfs-actions.pod:8538 ../src/guestfs-actions.pod:8564
24363 msgid "This function returns 0 on success or -1 on error."
24367 #: ../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:5548 ../src/guestfs-actions.pod:6828 ../src/guestfs-actions.pod:6945 ../src/guestfs-actions.pod:7094 ../src/guestfs-actions.pod:7576 ../src/guestfs-actions.pod:7701 ../src/guestfs-actions.pod:8344
24368 msgid "(Added in 0.3)"
24372 #: ../src/guestfs-actions.pod:41
24373 msgid "guestfs_add_domain"
24377 #: ../src/guestfs-actions.pod:43
24381 " guestfs_add_domain (guestfs_h *g,\n"
24382 " const char *dom,\n"
24388 #: ../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:4876 ../src/guestfs-actions.pod:5249 ../src/guestfs-actions.pod:5558 ../src/guestfs-actions.pod:5775 ../src/guestfs-actions.pod:7743
24390 "You may supply a list of optional arguments to this call. Use zero or more "
24391 "of the following pairs of parameters, and terminate the list with C<-1> on "
24392 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
24396 #: ../src/guestfs-actions.pod:53
24399 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
24400 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
24401 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
24402 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
24403 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
24404 " GUESTFS_ADD_DOMAIN_READONLYDISK, const char *readonlydisk,\n"
24409 #: ../src/guestfs-actions.pod:60
24411 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
24412 "It works by connecting to libvirt, requesting the domain and domain XML from "
24413 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
24418 #: ../src/guestfs-actions.pod:141
24420 "The other optional parameters are passed directly through to "
24421 "C<guestfs_add_drive_opts>."
24425 #: ../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:5734 ../src/guestfs-actions.pod:5951 ../src/guestfs-actions.pod:6189 ../src/guestfs-actions.pod:6383 ../src/guestfs-actions.pod:6409 ../src/guestfs-actions.pod:7929 ../src/guestfs-actions.pod:8355 ../src/guestfs-actions.pod:8368 ../src/guestfs-actions.pod:8381
24426 msgid "On error this function returns -1."
24430 #: ../src/guestfs-actions.pod:146
24431 msgid "(Added in 1.7.4)"
24435 #: ../src/guestfs-actions.pod:148
24436 msgid "guestfs_add_domain_va"
24440 #: ../src/guestfs-actions.pod:150
24444 " guestfs_add_domain_va (guestfs_h *g,\n"
24445 " const char *dom,\n"
24446 " va_list args);\n"
24451 #: ../src/guestfs-actions.pod:155
24452 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
24456 #: ../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:4953 ../src/guestfs-actions.pod:4965 ../src/guestfs-actions.pod:5314 ../src/guestfs-actions.pod:5326 ../src/guestfs-actions.pod:5586 ../src/guestfs-actions.pod:5598 ../src/guestfs-actions.pod:5824 ../src/guestfs-actions.pod:5835 ../src/guestfs-actions.pod:7843 ../src/guestfs-actions.pod:7854
24457 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
24461 #: ../src/guestfs-actions.pod:159
24462 msgid "guestfs_add_domain_argv"
24466 #: ../src/guestfs-actions.pod:161
24470 " guestfs_add_domain_argv (guestfs_h *g,\n"
24471 " const char *dom,\n"
24472 " const struct guestfs_add_domain_argv *optargs);\n"
24477 #: ../src/guestfs-actions.pod:166
24478 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
24482 #: ../src/guestfs-actions.pod:170
24483 msgid "guestfs_add_drive"
24487 #: ../src/guestfs-actions.pod:172
24491 " guestfs_add_drive (guestfs_h *g,\n"
24492 " const char *filename);\n"
24497 #: ../src/guestfs-actions.pod:176
24499 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
24500 "optional parameters, so the disk is added writable, with the format being "
24501 "detected automatically."
24505 #: ../src/guestfs-actions.pod:180
24507 "Automatic detection of the format opens you up to a potential security hole "
24508 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
24509 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
24510 "you should think about replacing calls to this function with calls to "
24511 "C<guestfs_add_drive_opts>, and specifying the format."
24515 #: ../src/guestfs-actions.pod:191
24516 msgid "guestfs_add_drive_opts"
24520 #: ../src/guestfs-actions.pod:193
24524 " guestfs_add_drive_opts (guestfs_h *g,\n"
24525 " const char *filename,\n"
24531 #: ../src/guestfs-actions.pod:203
24534 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
24535 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
24536 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
24537 " GUESTFS_ADD_DRIVE_OPTS_NAME, const char *name,\n"
24542 #: ../src/guestfs-actions.pod:233
24544 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
24545 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
24546 "Possible formats include C<raw> and C<qcow2>."
24550 #: ../src/guestfs-actions.pod:244
24552 "This rarely-used option lets you emulate the behaviour of the deprecated "
24553 "C<guestfs_add_drive_with_if> call (q.v.)"
24557 #: ../src/guestfs-actions.pod:256
24558 msgid "(Added in 1.5.23)"
24562 #: ../src/guestfs-actions.pod:258
24563 msgid "guestfs_add_drive_opts_va"
24567 #: ../src/guestfs-actions.pod:260
24571 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
24572 " const char *filename,\n"
24573 " va_list args);\n"
24578 #: ../src/guestfs-actions.pod:265
24579 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
24583 #: ../src/guestfs-actions.pod:269
24584 msgid "guestfs_add_drive_opts_argv"
24588 #: ../src/guestfs-actions.pod:271
24592 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
24593 " const char *filename,\n"
24594 " const struct guestfs_add_drive_opts_argv "
24600 #: ../src/guestfs-actions.pod:276
24601 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
24605 #: ../src/guestfs-actions.pod:280
24606 msgid "guestfs_add_drive_ro"
24610 #: ../src/guestfs-actions.pod:282
24614 " guestfs_add_drive_ro (guestfs_h *g,\n"
24615 " const char *filename);\n"
24620 #: ../src/guestfs-actions.pod:286
24622 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
24623 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
24624 "disk is added read-only, with the format being detected automatically."
24628 #: ../src/guestfs-actions.pod:293
24629 msgid "(Added in 1.0.38)"
24633 #: ../src/guestfs-actions.pod:295
24634 msgid "guestfs_add_drive_ro_with_if"
24638 #: ../src/guestfs-actions.pod:297
24642 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
24643 " const char *filename,\n"
24644 " const char *iface);\n"
24649 #: ../src/guestfs-actions.pod:309
24651 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
24652 "QEMU interface emulation to use at run time."
24656 #: ../src/guestfs-actions.pod:314 ../src/guestfs-actions.pod:335 ../src/guestfs-actions.pod:2881
24657 msgid "(Added in 1.0.84)"
24661 #: ../src/guestfs-actions.pod:316
24662 msgid "guestfs_add_drive_with_if"
24666 #: ../src/guestfs-actions.pod:318
24670 " guestfs_add_drive_with_if (guestfs_h *g,\n"
24671 " const char *filename,\n"
24672 " const char *iface);\n"
24677 #: ../src/guestfs-actions.pod:330
24679 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
24680 "QEMU interface emulation to use at run time."
24684 #: ../src/guestfs-actions.pod:337
24685 msgid "guestfs_aug_clear"
24689 #: ../src/guestfs-actions.pod:339
24693 " guestfs_aug_clear (guestfs_h *g,\n"
24694 " const char *augpath);\n"
24699 #: ../src/guestfs-actions.pod:348 ../src/guestfs-actions.pod:2609
24700 msgid "(Added in 1.3.4)"
24704 #: ../src/guestfs-actions.pod:350
24705 msgid "guestfs_aug_close"
24709 #: ../src/guestfs-actions.pod:352
24713 " guestfs_aug_close (guestfs_h *g);\n"
24718 #: ../src/guestfs-actions.pod:355
24720 "Close the current Augeas handle and free up any resources used by it. After "
24721 "calling this, you have to call C<guestfs_aug_init> again before you can use "
24722 "any other Augeas functions."
24726 #: ../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:6460
24727 msgid "(Added in 0.7)"
24731 #: ../src/guestfs-actions.pod:364
24732 msgid "guestfs_aug_defnode"
24736 #: ../src/guestfs-actions.pod:366
24739 " struct guestfs_int_bool *\n"
24740 " guestfs_aug_defnode (guestfs_h *g,\n"
24741 " const char *name,\n"
24742 " const char *expr,\n"
24743 " const char *val);\n"
24748 #: ../src/guestfs-actions.pod:375
24750 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
24751 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
24752 "containing that single node."
24756 #: ../src/guestfs-actions.pod:383
24758 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
24759 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
24763 #: ../src/guestfs-actions.pod:389
24764 msgid "guestfs_aug_defvar"
24768 #: ../src/guestfs-actions.pod:391
24772 " guestfs_aug_defvar (guestfs_h *g,\n"
24773 " const char *name,\n"
24774 " const char *expr);\n"
24779 #: ../src/guestfs-actions.pod:407
24780 msgid "guestfs_aug_get"
24784 #: ../src/guestfs-actions.pod:409
24788 " guestfs_aug_get (guestfs_h *g,\n"
24789 " const char *augpath);\n"
24794 #: ../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:4314 ../src/guestfs-actions.pod:4661 ../src/guestfs-actions.pod:4828 ../src/guestfs-actions.pod:5076 ../src/guestfs-actions.pod:5969 ../src/guestfs-actions.pod:6170 ../src/guestfs-actions.pod:6358 ../src/guestfs-actions.pod:6536 ../src/guestfs-actions.pod:6585 ../src/guestfs-actions.pod:7245 ../src/guestfs-actions.pod:7261 ../src/guestfs-actions.pod:7285 ../src/guestfs-actions.pod:7309 ../src/guestfs-actions.pod:8103 ../src/guestfs-actions.pod:8122 ../src/guestfs-actions.pod:8140 ../src/guestfs-actions.pod:8314 ../src/guestfs-actions.pod:8628
24796 "This function returns a string, or NULL on error. I<The caller must free "
24797 "the returned string after use>."
24801 #: ../src/guestfs-actions.pod:421
24802 msgid "guestfs_aug_init"
24806 #: ../src/guestfs-actions.pod:423
24810 " guestfs_aug_init (guestfs_h *g,\n"
24811 " const char *root,\n"
24817 #: ../src/guestfs-actions.pod:432
24818 msgid "You must call this before using any other C<guestfs_aug_*> commands."
24822 #: ../src/guestfs-actions.pod:457
24824 "This option is only useful when debugging Augeas lenses. Use of this option "
24825 "may require additional memory for the libguestfs appliance. You may need to "
24826 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
24827 "C<guestfs_set_memsize>."
24831 #: ../src/guestfs-actions.pod:472
24832 msgid "Do not load the tree in C<guestfs_aug_init>."
24836 #: ../src/guestfs-actions.pod:476
24837 msgid "To close the handle, you can call C<guestfs_aug_close>."
24841 #: ../src/guestfs-actions.pod:484
24842 msgid "guestfs_aug_insert"
24846 #: ../src/guestfs-actions.pod:486
24850 " guestfs_aug_insert (guestfs_h *g,\n"
24851 " const char *augpath,\n"
24852 " const char *label,\n"
24858 #: ../src/guestfs-actions.pod:504
24859 msgid "guestfs_aug_load"
24863 #: ../src/guestfs-actions.pod:506
24867 " guestfs_aug_load (guestfs_h *g);\n"
24872 #: ../src/guestfs-actions.pod:518
24873 msgid "guestfs_aug_ls"
24877 #: ../src/guestfs-actions.pod:520
24881 " guestfs_aug_ls (guestfs_h *g,\n"
24882 " const char *augpath);\n"
24887 #: ../src/guestfs-actions.pod:524
24889 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
24890 "sorting the resulting nodes into alphabetical order."
24894 #: ../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:4278 ../src/guestfs-actions.pod:4296 ../src/guestfs-actions.pod:4401 ../src/guestfs-actions.pod:4800 ../src/guestfs-actions.pod:5695 ../src/guestfs-actions.pod:6330 ../src/guestfs-actions.pod:6456 ../src/guestfs-actions.pod:6570 ../src/guestfs-actions.pod:7325 ../src/guestfs-actions.pod:7386 ../src/guestfs-actions.pod:7441 ../src/guestfs-actions.pod:7587 ../src/guestfs-actions.pod:7611 ../src/guestfs-actions.pod:8207 ../src/guestfs-actions.pod:8227 ../src/guestfs-actions.pod:8274 ../src/guestfs-actions.pod:8468 ../src/guestfs-actions.pod:8487 ../src/guestfs-actions.pod:8578 ../src/guestfs-actions.pod:8597 ../src/guestfs-actions.pod:8643 ../src/guestfs-actions.pod:8662
24896 "This function returns a NULL-terminated array of strings (like "
24897 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
24898 "strings and the array after use>."
24902 #: ../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:4644 ../src/guestfs-actions.pod:4691 ../src/guestfs-actions.pod:5016 ../src/guestfs-actions.pod:5049 ../src/guestfs-actions.pod:5212 ../src/guestfs-actions.pod:5699 ../src/guestfs-actions.pod:6271 ../src/guestfs-actions.pod:6668 ../src/guestfs-actions.pod:6682 ../src/guestfs-actions.pod:6694 ../src/guestfs-actions.pod:7172 ../src/guestfs-actions.pod:7945 ../src/guestfs-actions.pod:7958 ../src/guestfs-actions.pod:8191 ../src/guestfs-actions.pod:8456
24903 msgid "(Added in 0.8)"
24907 #: ../src/guestfs-actions.pod:533
24908 msgid "guestfs_aug_match"
24912 #: ../src/guestfs-actions.pod:535
24916 " guestfs_aug_match (guestfs_h *g,\n"
24917 " const char *augpath);\n"
24922 #: ../src/guestfs-actions.pod:549
24923 msgid "guestfs_aug_mv"
24927 #: ../src/guestfs-actions.pod:551
24931 " guestfs_aug_mv (guestfs_h *g,\n"
24932 " const char *src,\n"
24933 " const char *dest);\n"
24938 #: ../src/guestfs-actions.pod:563
24939 msgid "guestfs_aug_rm"
24943 #: ../src/guestfs-actions.pod:565
24947 " guestfs_aug_rm (guestfs_h *g,\n"
24948 " const char *augpath);\n"
24953 #: ../src/guestfs-actions.pod:577
24954 msgid "guestfs_aug_save"
24958 #: ../src/guestfs-actions.pod:579
24962 " guestfs_aug_save (guestfs_h *g);\n"
24967 #: ../src/guestfs-actions.pod:584
24969 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
24974 #: ../src/guestfs-actions.pod:591
24975 msgid "guestfs_aug_set"
24979 #: ../src/guestfs-actions.pod:593
24983 " guestfs_aug_set (guestfs_h *g,\n"
24984 " const char *augpath,\n"
24985 " const char *val);\n"
24990 #: ../src/guestfs-actions.pod:600
24992 "In the Augeas API, it is possible to clear a node by setting the value to "
24993 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
24994 "this call. Instead you must use the C<guestfs_aug_clear> call."
24998 #: ../src/guestfs-actions.pod:609
24999 msgid "guestfs_available"
25003 #: ../src/guestfs-actions.pod:611
25007 " guestfs_available (guestfs_h *g,\n"
25008 " char *const *groups);\n"
25013 #: ../src/guestfs-actions.pod:619
25015 "The libguestfs groups, and the functions that those groups correspond to, "
25016 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
25017 "runtime by calling C<guestfs_available_all_groups>."
25021 #: ../src/guestfs-actions.pod:643
25022 msgid "You must call C<guestfs_launch> before calling this function."
25026 #: ../src/guestfs-actions.pod:665
25028 "This call was added in version C<1.0.80>. In previous versions of "
25029 "libguestfs all you could do would be to speculatively execute a command to "
25030 "find out if the daemon implemented it. See also C<guestfs_version>."
25034 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:1653
25035 msgid "(Added in 1.0.80)"
25039 #: ../src/guestfs-actions.pod:676
25040 msgid "guestfs_available_all_groups"
25044 #: ../src/guestfs-actions.pod:678
25048 " guestfs_available_all_groups (guestfs_h *g);\n"
25053 #: ../src/guestfs-actions.pod:681
25055 "This command returns a list of all optional groups that this daemon knows "
25056 "about. Note this returns both supported and unsupported groups. To find "
25057 "out which ones the daemon can actually support you have to call "
25058 "C<guestfs_available> on each member of the returned list."
25062 #: ../src/guestfs-actions.pod:687
25063 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
25067 #: ../src/guestfs-actions.pod:693
25068 msgid "(Added in 1.3.15)"
25072 #: ../src/guestfs-actions.pod:695
25073 msgid "guestfs_base64_in"
25077 #: ../src/guestfs-actions.pod:697
25081 " guestfs_base64_in (guestfs_h *g,\n"
25082 " const char *base64file,\n"
25083 " const char *filename);\n"
25088 #: ../src/guestfs-actions.pod:707 ../src/guestfs-actions.pod:721
25089 msgid "(Added in 1.3.5)"
25093 #: ../src/guestfs-actions.pod:709
25094 msgid "guestfs_base64_out"
25098 #: ../src/guestfs-actions.pod:711
25102 " guestfs_base64_out (guestfs_h *g,\n"
25103 " const char *filename,\n"
25104 " const char *base64file);\n"
25109 #: ../src/guestfs-actions.pod:723
25110 msgid "guestfs_blockdev_flushbufs"
25114 #: ../src/guestfs-actions.pod:725
25118 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
25119 " const char *device);\n"
25124 #: ../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
25125 msgid "(Added in 0.9.3)"
25129 #: ../src/guestfs-actions.pod:738
25130 msgid "guestfs_blockdev_getbsz"
25134 #: ../src/guestfs-actions.pod:740
25138 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
25139 " const char *device);\n"
25144 #: ../src/guestfs-actions.pod:755
25145 msgid "guestfs_blockdev_getro"
25149 #: ../src/guestfs-actions.pod:757
25153 " guestfs_blockdev_getro (guestfs_h *g,\n"
25154 " const char *device);\n"
25159 #: ../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:5933
25160 msgid "This function returns a C truth value on success or -1 on error."
25164 #: ../src/guestfs-actions.pod:770
25165 msgid "guestfs_blockdev_getsize64"
25169 #: ../src/guestfs-actions.pod:772
25173 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
25174 " const char *device);\n"
25179 #: ../src/guestfs-actions.pod:778
25180 msgid "See also C<guestfs_blockdev_getsz>."
25184 #: ../src/guestfs-actions.pod:786
25185 msgid "guestfs_blockdev_getss"
25189 #: ../src/guestfs-actions.pod:788
25193 " guestfs_blockdev_getss (guestfs_h *g,\n"
25194 " const char *device);\n"
25199 #: ../src/guestfs-actions.pod:795
25201 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
25206 #: ../src/guestfs-actions.pod:804
25207 msgid "guestfs_blockdev_getsz"
25211 #: ../src/guestfs-actions.pod:806
25215 " guestfs_blockdev_getsz (guestfs_h *g,\n"
25216 " const char *device);\n"
25221 #: ../src/guestfs-actions.pod:813
25223 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
25224 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
25228 #: ../src/guestfs-actions.pod:823
25229 msgid "guestfs_blockdev_rereadpt"
25233 #: ../src/guestfs-actions.pod:825
25237 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
25238 " const char *device);\n"
25243 #: ../src/guestfs-actions.pod:837
25244 msgid "guestfs_blockdev_setbsz"
25248 #: ../src/guestfs-actions.pod:839
25252 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
25253 " const char *device,\n"
25254 " int blocksize);\n"
25259 #: ../src/guestfs-actions.pod:855
25260 msgid "guestfs_blockdev_setro"
25264 #: ../src/guestfs-actions.pod:857
25268 " guestfs_blockdev_setro (guestfs_h *g,\n"
25269 " const char *device);\n"
25274 #: ../src/guestfs-actions.pod:869
25275 msgid "guestfs_blockdev_setrw"
25279 #: ../src/guestfs-actions.pod:871
25283 " guestfs_blockdev_setrw (guestfs_h *g,\n"
25284 " const char *device);\n"
25289 #: ../src/guestfs-actions.pod:883
25290 msgid "guestfs_btrfs_filesystem_resize"
25294 #: ../src/guestfs-actions.pod:885
25298 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
25299 " const char *mountpoint,\n"
25305 #: ../src/guestfs-actions.pod:895
25308 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
25313 #: ../src/guestfs-actions.pod:918
25314 msgid "(Added in 1.11.17)"
25318 #: ../src/guestfs-actions.pod:920
25319 msgid "guestfs_btrfs_filesystem_resize_va"
25323 #: ../src/guestfs-actions.pod:922
25327 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
25328 " const char *mountpoint,\n"
25329 " va_list args);\n"
25334 #: ../src/guestfs-actions.pod:927
25335 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
25339 #: ../src/guestfs-actions.pod:931
25340 msgid "guestfs_btrfs_filesystem_resize_argv"
25344 #: ../src/guestfs-actions.pod:933
25348 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
25349 " const char *mountpoint,\n"
25351 "guestfs_btrfs_filesystem_resize_argv *optargs);\n"
25356 #: ../src/guestfs-actions.pod:938
25357 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
25361 #: ../src/guestfs-actions.pod:942
25362 msgid "guestfs_case_sensitive_path"
25366 #: ../src/guestfs-actions.pod:944
25370 " guestfs_case_sensitive_path (guestfs_h *g,\n"
25371 " const char *path);\n"
25376 #: ../src/guestfs-actions.pod:970
25378 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
25379 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
25380 "how the directories were originally created under Windows)."
25384 #: ../src/guestfs-actions.pod:978
25385 msgid "See also C<guestfs_realpath>."
25389 #: ../src/guestfs-actions.pod:983 ../src/guestfs-actions.pod:8125
25390 msgid "(Added in 1.0.75)"
25394 #: ../src/guestfs-actions.pod:985
25395 msgid "guestfs_cat"
25399 #: ../src/guestfs-actions.pod:987
25403 " guestfs_cat (guestfs_h *g,\n"
25404 " const char *path);\n"
25409 #: ../src/guestfs-actions.pod:993
25411 "Note that this function cannot correctly handle binary files (specifically, "
25412 "files containing C<\\0> character which is treated as end of string). For "
25413 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
25414 "functions which have a more complex interface."
25418 #: ../src/guestfs-actions.pod:1004 ../src/guestfs-actions.pod:4207 ../src/guestfs-actions.pod:4300 ../src/guestfs-actions.pod:4317 ../src/guestfs-actions.pod:4405 ../src/guestfs-actions.pod:4804 ../src/guestfs-actions.pod:4818 ../src/guestfs-actions.pod:6334 ../src/guestfs-actions.pod:6348 ../src/guestfs-actions.pod:8278 ../src/guestfs-actions.pod:8292
25419 msgid "(Added in 0.4)"
25423 #: ../src/guestfs-actions.pod:1006
25424 msgid "guestfs_checksum"
25428 #: ../src/guestfs-actions.pod:1008
25432 " guestfs_checksum (guestfs_h *g,\n"
25433 " const char *csumtype,\n"
25434 " const char *path);\n"
25439 #: ../src/guestfs-actions.pod:1054
25440 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
25444 #: ../src/guestfs-actions.pod:1056
25445 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
25449 #: ../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:7981
25450 msgid "(Added in 1.0.2)"
25454 #: ../src/guestfs-actions.pod:1063
25455 msgid "guestfs_checksum_device"
25459 #: ../src/guestfs-actions.pod:1065
25463 " guestfs_checksum_device (guestfs_h *g,\n"
25464 " const char *csumtype,\n"
25465 " const char *device);\n"
25470 #: ../src/guestfs-actions.pod:1070
25472 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
25473 "device named C<device>. For the types of checksums supported see the "
25474 "C<guestfs_checksum> command."
25478 #: ../src/guestfs-actions.pod:1077 ../src/guestfs-actions.pod:5766 ../src/guestfs-actions.pod:5901 ../src/guestfs-actions.pod:5935 ../src/guestfs-actions.pod:5953 ../src/guestfs-actions.pod:6135 ../src/guestfs-actions.pod:7890 ../src/guestfs-actions.pod:7904 ../src/guestfs-actions.pod:8304
25479 msgid "(Added in 1.3.2)"
25483 #: ../src/guestfs-actions.pod:1079
25484 msgid "guestfs_checksums_out"
25488 #: ../src/guestfs-actions.pod:1081
25492 " guestfs_checksums_out (guestfs_h *g,\n"
25493 " const char *csumtype,\n"
25494 " const char *directory,\n"
25495 " const char *sumsfile);\n"
25500 #: ../src/guestfs-actions.pod:1101
25501 msgid "(Added in 1.3.7)"
25505 #: ../src/guestfs-actions.pod:1103
25506 msgid "guestfs_chmod"
25510 #: ../src/guestfs-actions.pod:1105
25514 " guestfs_chmod (guestfs_h *g,\n"
25516 " const char *path);\n"
25521 #: ../src/guestfs-actions.pod:1123
25522 msgid "guestfs_chown"
25526 #: ../src/guestfs-actions.pod:1125
25530 " guestfs_chown (guestfs_h *g,\n"
25533 " const char *path);\n"
25538 #: ../src/guestfs-actions.pod:1141
25539 msgid "guestfs_command"
25543 #: ../src/guestfs-actions.pod:1143
25547 " guestfs_command (guestfs_h *g,\n"
25548 " char *const *arguments);\n"
25553 #: ../src/guestfs-actions.pod:1152
25555 "The single parameter is an argv-style list of arguments. The first element "
25556 "is the name of the program to run. Subsequent elements are parameters. The "
25557 "list must be non-empty (ie. must contain a program name). Note that the "
25558 "command runs directly, and is I<not> invoked via the shell (see "
25563 #: ../src/guestfs-actions.pod:1183 ../src/guestfs-actions.pod:1203 ../src/guestfs-actions.pod:2027
25564 msgid "(Added in 0.9.1)"
25568 #: ../src/guestfs-actions.pod:1185
25569 msgid "guestfs_command_lines"
25573 #: ../src/guestfs-actions.pod:1187
25577 " guestfs_command_lines (guestfs_h *g,\n"
25578 " char *const *arguments);\n"
25583 #: ../src/guestfs-actions.pod:1191
25585 "This is the same as C<guestfs_command>, but splits the result into a list of "
25590 #: ../src/guestfs-actions.pod:1194
25591 msgid "See also: C<guestfs_sh_lines>"
25595 #: ../src/guestfs-actions.pod:1205
25596 msgid "guestfs_compress_device_out"
25600 #: ../src/guestfs-actions.pod:1207
25604 " guestfs_compress_device_out (guestfs_h *g,\n"
25605 " const char *ctype,\n"
25606 " const char *device,\n"
25607 " const char *zdevice,\n"
25613 #: ../src/guestfs-actions.pod:1219
25616 " GUESTFS_COMPRESS_DEVICE_OUT_LEVEL, int level,\n"
25621 #: ../src/guestfs-actions.pod:1224
25623 "The C<ctype> and optional C<level> parameters have the same meaning as in "
25624 "C<guestfs_compress_out>."
25628 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:1288 ../src/guestfs-actions.pod:2572 ../src/guestfs-actions.pod:7051
25629 msgid "(Added in 1.13.15)"
25633 #: ../src/guestfs-actions.pod:1231
25634 msgid "guestfs_compress_device_out_va"
25638 #: ../src/guestfs-actions.pod:1233
25642 " guestfs_compress_device_out_va (guestfs_h *g,\n"
25643 " const char *ctype,\n"
25644 " const char *device,\n"
25645 " const char *zdevice,\n"
25646 " va_list args);\n"
25651 #: ../src/guestfs-actions.pod:1240
25652 msgid "This is the \"va_list variant\" of L</guestfs_compress_device_out>."
25656 #: ../src/guestfs-actions.pod:1244
25657 msgid "guestfs_compress_device_out_argv"
25661 #: ../src/guestfs-actions.pod:1246
25665 " guestfs_compress_device_out_argv (guestfs_h *g,\n"
25666 " const char *ctype,\n"
25667 " const char *device,\n"
25668 " const char *zdevice,\n"
25670 "guestfs_compress_device_out_argv *optargs);\n"
25675 #: ../src/guestfs-actions.pod:1253
25676 msgid "This is the \"argv variant\" of L</guestfs_compress_device_out>."
25680 #: ../src/guestfs-actions.pod:1257
25681 msgid "guestfs_compress_out"
25685 #: ../src/guestfs-actions.pod:1259
25689 " guestfs_compress_out (guestfs_h *g,\n"
25690 " const char *ctype,\n"
25691 " const char *file,\n"
25692 " const char *zfile,\n"
25698 #: ../src/guestfs-actions.pod:1271
25701 " GUESTFS_COMPRESS_OUT_LEVEL, int level,\n"
25706 #: ../src/guestfs-actions.pod:1290
25707 msgid "guestfs_compress_out_va"
25711 #: ../src/guestfs-actions.pod:1292
25715 " guestfs_compress_out_va (guestfs_h *g,\n"
25716 " const char *ctype,\n"
25717 " const char *file,\n"
25718 " const char *zfile,\n"
25719 " va_list args);\n"
25724 #: ../src/guestfs-actions.pod:1299
25725 msgid "This is the \"va_list variant\" of L</guestfs_compress_out>."
25729 #: ../src/guestfs-actions.pod:1303
25730 msgid "guestfs_compress_out_argv"
25734 #: ../src/guestfs-actions.pod:1305
25738 " guestfs_compress_out_argv (guestfs_h *g,\n"
25739 " const char *ctype,\n"
25740 " const char *file,\n"
25741 " const char *zfile,\n"
25742 " const struct guestfs_compress_out_argv "
25748 #: ../src/guestfs-actions.pod:1312
25749 msgid "This is the \"argv variant\" of L</guestfs_compress_out>."
25753 #: ../src/guestfs-actions.pod:1316
25754 msgid "guestfs_config"
25758 #: ../src/guestfs-actions.pod:1318
25762 " guestfs_config (guestfs_h *g,\n"
25763 " const char *qemuparam,\n"
25764 " const char *qemuvalue);\n"
25769 #: ../src/guestfs-actions.pod:1336
25770 msgid "guestfs_copy_device_to_device"
25774 #: ../src/guestfs-actions.pod:1338
25778 " guestfs_copy_device_to_device (guestfs_h *g,\n"
25779 " const char *src,\n"
25780 " const char *dest,\n"
25786 #: ../src/guestfs-actions.pod:1349
25789 " GUESTFS_COPY_DEVICE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
25790 " GUESTFS_COPY_DEVICE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
25791 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, int64_t size,\n"
25796 #: ../src/guestfs-actions.pod:1353
25798 "The four calls C<guestfs_copy_device_to_device>, "
25799 "C<guestfs_copy_device_to_file>, C<guestfs_copy_file_to_device>, and "
25800 "C<guestfs_copy_file_to_file> let you copy from a source (device|file) to a "
25801 "destination (device|file)."
25805 #: ../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:7976 ../src/guestfs-actions.pod:8010 ../src/guestfs-actions.pod:8517 ../src/guestfs-actions.pod:8540
25807 "This long-running command can generate progress notification messages so "
25808 "that the caller can display a progress bar or indicator. To receive these "
25809 "messages, the caller must register a progress event callback. See "
25810 "L<guestfs(3)/GUESTFS_EVENT_PROGRESS>."
25814 #: ../src/guestfs-actions.pod:1379 ../src/guestfs-actions.pod:1432 ../src/guestfs-actions.pod:1485 ../src/guestfs-actions.pod:1543 ../src/guestfs-actions.pod:6191
25815 msgid "(Added in 1.13.25)"
25819 #: ../src/guestfs-actions.pod:1381
25820 msgid "guestfs_copy_device_to_device_va"
25824 #: ../src/guestfs-actions.pod:1383
25828 " guestfs_copy_device_to_device_va (guestfs_h *g,\n"
25829 " const char *src,\n"
25830 " const char *dest,\n"
25831 " va_list args);\n"
25836 #: ../src/guestfs-actions.pod:1389
25837 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_device>."
25841 #: ../src/guestfs-actions.pod:1393
25842 msgid "guestfs_copy_device_to_device_argv"
25846 #: ../src/guestfs-actions.pod:1395
25850 " guestfs_copy_device_to_device_argv (guestfs_h *g,\n"
25851 " const char *src,\n"
25852 " const char *dest,\n"
25854 "guestfs_copy_device_to_device_argv *optargs);\n"
25859 #: ../src/guestfs-actions.pod:1401
25860 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_device>."
25864 #: ../src/guestfs-actions.pod:1405
25865 msgid "guestfs_copy_device_to_file"
25869 #: ../src/guestfs-actions.pod:1407
25873 " guestfs_copy_device_to_file (guestfs_h *g,\n"
25874 " const char *src,\n"
25875 " const char *dest,\n"
25881 #: ../src/guestfs-actions.pod:1418
25884 " GUESTFS_COPY_DEVICE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
25885 " GUESTFS_COPY_DEVICE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
25886 " GUESTFS_COPY_DEVICE_TO_FILE_SIZE, int64_t size,\n"
25891 #: ../src/guestfs-actions.pod:1422 ../src/guestfs-actions.pod:1475 ../src/guestfs-actions.pod:1528
25892 msgid "See C<guestfs_copy_device_to_device> for a general overview of this call."
25896 #: ../src/guestfs-actions.pod:1434
25897 msgid "guestfs_copy_device_to_file_va"
25901 #: ../src/guestfs-actions.pod:1436
25905 " guestfs_copy_device_to_file_va (guestfs_h *g,\n"
25906 " const char *src,\n"
25907 " const char *dest,\n"
25908 " va_list args);\n"
25913 #: ../src/guestfs-actions.pod:1442
25914 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_file>."
25918 #: ../src/guestfs-actions.pod:1446
25919 msgid "guestfs_copy_device_to_file_argv"
25923 #: ../src/guestfs-actions.pod:1448
25927 " guestfs_copy_device_to_file_argv (guestfs_h *g,\n"
25928 " const char *src,\n"
25929 " const char *dest,\n"
25931 "guestfs_copy_device_to_file_argv *optargs);\n"
25936 #: ../src/guestfs-actions.pod:1454
25937 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_file>."
25941 #: ../src/guestfs-actions.pod:1458
25942 msgid "guestfs_copy_file_to_device"
25946 #: ../src/guestfs-actions.pod:1460
25950 " guestfs_copy_file_to_device (guestfs_h *g,\n"
25951 " const char *src,\n"
25952 " const char *dest,\n"
25958 #: ../src/guestfs-actions.pod:1471
25961 " GUESTFS_COPY_FILE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
25962 " GUESTFS_COPY_FILE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
25963 " GUESTFS_COPY_FILE_TO_DEVICE_SIZE, int64_t size,\n"
25968 #: ../src/guestfs-actions.pod:1487
25969 msgid "guestfs_copy_file_to_device_va"
25973 #: ../src/guestfs-actions.pod:1489
25977 " guestfs_copy_file_to_device_va (guestfs_h *g,\n"
25978 " const char *src,\n"
25979 " const char *dest,\n"
25980 " va_list args);\n"
25985 #: ../src/guestfs-actions.pod:1495
25986 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_device>."
25990 #: ../src/guestfs-actions.pod:1499
25991 msgid "guestfs_copy_file_to_device_argv"
25995 #: ../src/guestfs-actions.pod:1501
25999 " guestfs_copy_file_to_device_argv (guestfs_h *g,\n"
26000 " const char *src,\n"
26001 " const char *dest,\n"
26003 "guestfs_copy_file_to_device_argv *optargs);\n"
26008 #: ../src/guestfs-actions.pod:1507
26009 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_device>."
26013 #: ../src/guestfs-actions.pod:1511
26014 msgid "guestfs_copy_file_to_file"
26018 #: ../src/guestfs-actions.pod:1513
26022 " guestfs_copy_file_to_file (guestfs_h *g,\n"
26023 " const char *src,\n"
26024 " const char *dest,\n"
26030 #: ../src/guestfs-actions.pod:1524
26033 " GUESTFS_COPY_FILE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26034 " GUESTFS_COPY_FILE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26035 " GUESTFS_COPY_FILE_TO_FILE_SIZE, int64_t size,\n"
26040 #: ../src/guestfs-actions.pod:1531
26042 "This is B<not> the function you want for copying files. This is for copying "
26043 "blocks within existing files. See C<guestfs_cp>, C<guestfs_cp_a> and "
26044 "C<guestfs_mv> for general file copying and moving functions."
26048 #: ../src/guestfs-actions.pod:1545
26049 msgid "guestfs_copy_file_to_file_va"
26053 #: ../src/guestfs-actions.pod:1547
26057 " guestfs_copy_file_to_file_va (guestfs_h *g,\n"
26058 " const char *src,\n"
26059 " const char *dest,\n"
26060 " va_list args);\n"
26065 #: ../src/guestfs-actions.pod:1553
26066 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_file>."
26070 #: ../src/guestfs-actions.pod:1557
26071 msgid "guestfs_copy_file_to_file_argv"
26075 #: ../src/guestfs-actions.pod:1559
26079 " guestfs_copy_file_to_file_argv (guestfs_h *g,\n"
26080 " const char *src,\n"
26081 " const char *dest,\n"
26082 " const struct guestfs_copy_file_to_file_argv "
26088 #: ../src/guestfs-actions.pod:1565
26089 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_file>."
26093 #: ../src/guestfs-actions.pod:1569
26094 msgid "guestfs_copy_size"
26098 #: ../src/guestfs-actions.pod:1571
26102 " guestfs_copy_size (guestfs_h *g,\n"
26103 " const char *src,\n"
26104 " const char *dest,\n"
26105 " int64_t size);\n"
26110 #: ../src/guestfs-actions.pod:1577 ../src/guestfs-actions.pod:1634
26112 "I<This function is deprecated.> In new code, use the "
26113 "L</guestfs_copy_device_to_device> call instead."
26117 #: ../src/guestfs-actions.pod:1597 ../src/guestfs-actions.pod:4831 ../src/guestfs-actions.pod:6361 ../src/guestfs-actions.pod:8211 ../src/guestfs-actions.pod:8231 ../src/guestfs-actions.pod:8317
26118 msgid "(Added in 1.0.87)"
26122 #: ../src/guestfs-actions.pod:1599
26127 #: ../src/guestfs-actions.pod:1601
26131 " guestfs_cp (guestfs_h *g,\n"
26132 " const char *src,\n"
26133 " const char *dest);\n"
26138 #: ../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:5713 ../src/guestfs-actions.pod:6205
26139 msgid "(Added in 1.0.18)"
26143 #: ../src/guestfs-actions.pod:1613
26144 msgid "guestfs_cp_a"
26148 #: ../src/guestfs-actions.pod:1615
26152 " guestfs_cp_a (guestfs_h *g,\n"
26153 " const char *src,\n"
26154 " const char *dest);\n"
26159 #: ../src/guestfs-actions.pod:1627
26164 #: ../src/guestfs-actions.pod:1629
26168 " guestfs_dd (guestfs_h *g,\n"
26169 " const char *src,\n"
26170 " const char *dest);\n"
26175 #: ../src/guestfs-actions.pod:1646
26177 "If the destination is a device, it must be as large or larger than the "
26178 "source file or device, otherwise the copy will fail. This command cannot do "
26179 "partial copies (see C<guestfs_copy_device_to_device>)."
26183 #: ../src/guestfs-actions.pod:1655
26188 #: ../src/guestfs-actions.pod:1657
26192 " guestfs_df (guestfs_h *g);\n"
26197 #: ../src/guestfs-actions.pod:1662 ../src/guestfs-actions.pod:1679
26199 "This command is mostly useful for interactive sessions. It is I<not> "
26200 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
26205 #: ../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:5079 ../src/guestfs-actions.pod:5613 ../src/guestfs-actions.pod:7594 ../src/guestfs-actions.pod:7618 ../src/guestfs-actions.pod:8357 ../src/guestfs-actions.pod:8370 ../src/guestfs-actions.pod:8383
26206 msgid "(Added in 1.0.54)"
26210 #: ../src/guestfs-actions.pod:1671
26211 msgid "guestfs_df_h"
26215 #: ../src/guestfs-actions.pod:1673
26219 " guestfs_df_h (guestfs_h *g);\n"
26224 #: ../src/guestfs-actions.pod:1688
26225 msgid "guestfs_dmesg"
26229 #: ../src/guestfs-actions.pod:1690
26233 " guestfs_dmesg (guestfs_h *g);\n"
26238 #: ../src/guestfs-actions.pod:1697
26240 "Another way to get the same information is to enable verbose messages with "
26241 "C<guestfs_set_verbose> or by setting the environment variable "
26242 "C<LIBGUESTFS_DEBUG=1> before running the program."
26246 #: ../src/guestfs-actions.pod:1707
26247 msgid "guestfs_download"
26251 #: ../src/guestfs-actions.pod:1709
26255 " guestfs_download (guestfs_h *g,\n"
26256 " const char *remotefilename,\n"
26257 " const char *filename);\n"
26262 #: ../src/guestfs-actions.pod:1719
26263 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
26267 #: ../src/guestfs-actions.pod:1730
26268 msgid "guestfs_download_offset"
26272 #: ../src/guestfs-actions.pod:1732
26276 " guestfs_download_offset (guestfs_h *g,\n"
26277 " const char *remotefilename,\n"
26278 " const char *filename,\n"
26279 " int64_t offset,\n"
26280 " int64_t size);\n"
26285 #: ../src/guestfs-actions.pod:1745
26287 "Note that there is no limit on the amount of data that can be downloaded "
26288 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
26289 "full amount unless an error occurs."
26293 #: ../src/guestfs-actions.pod:1750
26294 msgid "See also C<guestfs_download>, C<guestfs_pread>."
26298 #: ../src/guestfs-actions.pod:1759 ../src/guestfs-actions.pod:8015
26299 msgid "(Added in 1.5.17)"
26303 #: ../src/guestfs-actions.pod:1761
26304 msgid "guestfs_drop_caches"
26308 #: ../src/guestfs-actions.pod:1763
26312 " guestfs_drop_caches (guestfs_h *g,\n"
26313 " int whattodrop);\n"
26318 #: ../src/guestfs-actions.pod:1781
26323 #: ../src/guestfs-actions.pod:1783
26327 " guestfs_du (guestfs_h *g,\n"
26328 " const char *path);\n"
26333 #: ../src/guestfs-actions.pod:1806
26334 msgid "guestfs_e2fsck_f"
26338 #: ../src/guestfs-actions.pod:1808
26342 " guestfs_e2fsck_f (guestfs_h *g,\n"
26343 " const char *device);\n"
26348 #: ../src/guestfs-actions.pod:1816
26350 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
26351 "Normally you should use C<guestfs_fsck>."
26355 #: ../src/guestfs-actions.pod:1821
26356 msgid "(Added in 1.0.29)"
26360 #: ../src/guestfs-actions.pod:1823
26361 msgid "guestfs_echo_daemon"
26365 #: ../src/guestfs-actions.pod:1825
26369 " guestfs_echo_daemon (guestfs_h *g,\n"
26370 " char *const *words);\n"
26375 #: ../src/guestfs-actions.pod:1834
26376 msgid "See also C<guestfs_ping_daemon>."
26380 #: ../src/guestfs-actions.pod:1839 ../src/guestfs-actions.pod:2597 ../src/guestfs-actions.pod:7075
26381 msgid "(Added in 1.0.69)"
26385 #: ../src/guestfs-actions.pod:1841
26386 msgid "guestfs_egrep"
26390 #: ../src/guestfs-actions.pod:1843
26394 " guestfs_egrep (guestfs_h *g,\n"
26395 " const char *regex,\n"
26396 " const char *path);\n"
26401 #: ../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:4330 ../src/guestfs-actions.pod:4344 ../src/guestfs-actions.pod:4357 ../src/guestfs-actions.pod:4371 ../src/guestfs-actions.pod:5501 ../src/guestfs-actions.pod:6539 ../src/guestfs-actions.pod:6588 ../src/guestfs-actions.pod:7462 ../src/guestfs-actions.pod:7474 ../src/guestfs-actions.pod:7487 ../src/guestfs-actions.pod:7500 ../src/guestfs-actions.pod:7522 ../src/guestfs-actions.pod:7535 ../src/guestfs-actions.pod:7548 ../src/guestfs-actions.pod:7561 ../src/guestfs-actions.pod:8475 ../src/guestfs-actions.pod:8494 ../src/guestfs-actions.pod:8585 ../src/guestfs-actions.pod:8604 ../src/guestfs-actions.pod:8650 ../src/guestfs-actions.pod:8669
26402 msgid "(Added in 1.0.66)"
26406 #: ../src/guestfs-actions.pod:1860
26407 msgid "guestfs_egrepi"
26411 #: ../src/guestfs-actions.pod:1862
26415 " guestfs_egrepi (guestfs_h *g,\n"
26416 " const char *regex,\n"
26417 " const char *path);\n"
26422 #: ../src/guestfs-actions.pod:1879
26423 msgid "guestfs_equal"
26427 #: ../src/guestfs-actions.pod:1881
26431 " guestfs_equal (guestfs_h *g,\n"
26432 " const char *file1,\n"
26433 " const char *file2);\n"
26438 #: ../src/guestfs-actions.pod:1895
26439 msgid "guestfs_exists"
26443 #: ../src/guestfs-actions.pod:1897
26447 " guestfs_exists (guestfs_h *g,\n"
26448 " const char *path);\n"
26453 #: ../src/guestfs-actions.pod:1904
26454 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
26458 #: ../src/guestfs-actions.pod:1910
26459 msgid "guestfs_fallocate"
26463 #: ../src/guestfs-actions.pod:1912
26467 " guestfs_fallocate (guestfs_h *g,\n"
26468 " const char *path,\n"
26474 #: ../src/guestfs-actions.pod:1917
26476 "I<This function is deprecated.> In new code, use the L</guestfs_fallocate64> "
26481 #: ../src/guestfs-actions.pod:1936
26482 msgid "guestfs_fallocate64"
26486 #: ../src/guestfs-actions.pod:1938
26490 " guestfs_fallocate64 (guestfs_h *g,\n"
26491 " const char *path,\n"
26497 #: ../src/guestfs-actions.pod:1947
26499 "Note that this call allocates disk blocks for the file. To create a sparse "
26500 "file use C<guestfs_truncate_size> instead."
26504 #: ../src/guestfs-actions.pod:1950
26506 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
26507 "oversight it only allowed 30 bit lengths to be specified, effectively "
26508 "limiting the maximum size of files created through that call to 1GB."
26512 #: ../src/guestfs-actions.pod:1961
26513 msgid "(Added in 1.3.17)"
26517 #: ../src/guestfs-actions.pod:1963
26518 msgid "guestfs_fgrep"
26522 #: ../src/guestfs-actions.pod:1965
26526 " guestfs_fgrep (guestfs_h *g,\n"
26527 " const char *pattern,\n"
26528 " const char *path);\n"
26533 #: ../src/guestfs-actions.pod:1982
26534 msgid "guestfs_fgrepi"
26538 #: ../src/guestfs-actions.pod:1984
26542 " guestfs_fgrepi (guestfs_h *g,\n"
26543 " const char *pattern,\n"
26544 " const char *path);\n"
26549 #: ../src/guestfs-actions.pod:2001
26550 msgid "guestfs_file"
26554 #: ../src/guestfs-actions.pod:2003
26558 " guestfs_file (guestfs_h *g,\n"
26559 " const char *path);\n"
26564 #: ../src/guestfs-actions.pod:2021
26566 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
26567 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
26571 #: ../src/guestfs-actions.pod:2029
26572 msgid "guestfs_file_architecture"
26576 #: ../src/guestfs-actions.pod:2031
26580 " guestfs_file_architecture (guestfs_h *g,\n"
26581 " const char *filename);\n"
26586 #: ../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
26587 msgid "(Added in 1.5.3)"
26591 #: ../src/guestfs-actions.pod:2141
26592 msgid "guestfs_filesize"
26596 #: ../src/guestfs-actions.pod:2143
26600 " guestfs_filesize (guestfs_h *g,\n"
26601 " const char *file);\n"
26606 #: ../src/guestfs-actions.pod:2149
26608 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
26609 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
26610 "devices, use C<guestfs_blockdev_getsize64>."
26614 #: ../src/guestfs-actions.pod:2155
26615 msgid "(Added in 1.0.82)"
26619 #: ../src/guestfs-actions.pod:2157
26620 msgid "guestfs_fill"
26624 #: ../src/guestfs-actions.pod:2159
26628 " guestfs_fill (guestfs_h *g,\n"
26631 " const char *path);\n"
26636 #: ../src/guestfs-actions.pod:2169
26638 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
26639 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
26640 "bytes use C<guestfs_fill_pattern>."
26644 #: ../src/guestfs-actions.pod:2181
26645 msgid "(Added in 1.0.79)"
26649 #: ../src/guestfs-actions.pod:2183
26650 msgid "guestfs_fill_pattern"
26654 #: ../src/guestfs-actions.pod:2185
26658 " guestfs_fill_pattern (guestfs_h *g,\n"
26659 " const char *pattern,\n"
26661 " const char *path);\n"
26666 #: ../src/guestfs-actions.pod:2191
26668 "This function is like C<guestfs_fill> except that it creates a new file of "
26669 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
26670 "pattern is truncated if necessary to ensure the length of the file is "
26671 "exactly C<len> bytes."
26675 #: ../src/guestfs-actions.pod:2203
26676 msgid "(Added in 1.3.12)"
26680 #: ../src/guestfs-actions.pod:2205
26681 msgid "guestfs_find"
26685 #: ../src/guestfs-actions.pod:2207
26689 " guestfs_find (guestfs_h *g,\n"
26690 " const char *directory);\n"
26695 #: ../src/guestfs-actions.pod:2223
26696 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
26700 #: ../src/guestfs-actions.pod:2236
26701 msgid "See also C<guestfs_find0>."
26705 #: ../src/guestfs-actions.pod:2245 ../src/guestfs-actions.pod:4768 ../src/guestfs-actions.pod:6623
26706 msgid "(Added in 1.0.27)"
26710 #: ../src/guestfs-actions.pod:2247
26711 msgid "guestfs_find0"
26715 #: ../src/guestfs-actions.pod:2249
26719 " guestfs_find0 (guestfs_h *g,\n"
26720 " const char *directory,\n"
26721 " const char *files);\n"
26726 #: ../src/guestfs-actions.pod:2258
26728 "This command works the same way as C<guestfs_find> with the following "
26733 #: ../src/guestfs-actions.pod:2285
26734 msgid "(Added in 1.0.74)"
26738 #: ../src/guestfs-actions.pod:2287
26739 msgid "guestfs_findfs_label"
26743 #: ../src/guestfs-actions.pod:2289
26747 " guestfs_findfs_label (guestfs_h *g,\n"
26748 " const char *label);\n"
26753 #: ../src/guestfs-actions.pod:2297
26754 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
26758 #: ../src/guestfs-actions.pod:2304
26759 msgid "guestfs_findfs_uuid"
26763 #: ../src/guestfs-actions.pod:2306
26767 " guestfs_findfs_uuid (guestfs_h *g,\n"
26768 " const char *uuid);\n"
26773 #: ../src/guestfs-actions.pod:2314
26774 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
26778 #: ../src/guestfs-actions.pod:2321
26779 msgid "guestfs_fsck"
26783 #: ../src/guestfs-actions.pod:2323
26787 " guestfs_fsck (guestfs_h *g,\n"
26788 " const char *fstype,\n"
26789 " const char *device);\n"
26794 #: ../src/guestfs-actions.pod:2358 ../src/guestfs-actions.pod:8522
26795 msgid "(Added in 1.0.16)"
26799 #: ../src/guestfs-actions.pod:2360
26800 msgid "guestfs_get_append"
26804 #: ../src/guestfs-actions.pod:2362
26808 " guestfs_get_append (guestfs_h *g);\n"
26813 #: ../src/guestfs-actions.pod:2370
26815 "This function returns a string which may be NULL. There is no way to return "
26816 "an error from this function. The string is owned by the guest handle and "
26817 "must I<not> be freed."
26821 #: ../src/guestfs-actions.pod:2374 ../src/guestfs-actions.pod:6301 ../src/guestfs-actions.pod:6780 ../src/guestfs-actions.pod:7229 ../src/guestfs-actions.pod:7248 ../src/guestfs-actions.pod:7264 ../src/guestfs-actions.pod:7288 ../src/guestfs-actions.pod:8162 ../src/guestfs-actions.pod:8177 ../src/guestfs-actions.pod:8566
26822 msgid "(Added in 1.0.26)"
26826 #: ../src/guestfs-actions.pod:2376
26827 msgid "guestfs_get_attach_method"
26831 #: ../src/guestfs-actions.pod:2378
26835 " guestfs_get_attach_method (guestfs_h *g);\n"
26840 #: ../src/guestfs-actions.pod:2381
26841 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
26845 #: ../src/guestfs-actions.pod:2386 ../src/guestfs-actions.pod:6810
26846 msgid "(Added in 1.9.8)"
26850 #: ../src/guestfs-actions.pod:2388
26851 msgid "guestfs_get_autosync"
26855 #: ../src/guestfs-actions.pod:2390
26859 " guestfs_get_autosync (guestfs_h *g);\n"
26864 #: ../src/guestfs-actions.pod:2399
26865 msgid "guestfs_get_direct"
26869 #: ../src/guestfs-actions.pod:2401
26873 " guestfs_get_direct (guestfs_h *g);\n"
26878 #: ../src/guestfs-actions.pod:2408 ../src/guestfs-actions.pod:6851
26879 msgid "(Added in 1.0.72)"
26883 #: ../src/guestfs-actions.pod:2410
26884 msgid "guestfs_get_e2label"
26888 #: ../src/guestfs-actions.pod:2412
26892 " guestfs_get_e2label (guestfs_h *g,\n"
26893 " const char *device);\n"
26898 #: ../src/guestfs-actions.pod:2416
26900 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_label> "
26905 #: ../src/guestfs-actions.pod:2429 ../src/guestfs-actions.pod:2450 ../src/guestfs-actions.pod:6869 ../src/guestfs-actions.pod:6888
26906 msgid "(Added in 1.0.15)"
26910 #: ../src/guestfs-actions.pod:2431
26911 msgid "guestfs_get_e2uuid"
26915 #: ../src/guestfs-actions.pod:2433
26919 " guestfs_get_e2uuid (guestfs_h *g,\n"
26920 " const char *device);\n"
26925 #: ../src/guestfs-actions.pod:2437
26927 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_uuid> "
26932 #: ../src/guestfs-actions.pod:2452
26933 msgid "guestfs_get_memsize"
26937 #: ../src/guestfs-actions.pod:2454
26941 " guestfs_get_memsize (guestfs_h *g);\n"
26946 #: ../src/guestfs-actions.pod:2460
26948 "If C<guestfs_set_memsize> was not called on this handle, and if "
26949 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
26950 "value for memsize."
26954 #: ../src/guestfs-actions.pod:2469 ../src/guestfs-actions.pod:5197 ../src/guestfs-actions.pod:5406 ../src/guestfs-actions.pod:5425 ../src/guestfs-actions.pod:5444 ../src/guestfs-actions.pod:5456 ../src/guestfs-actions.pod:5473 ../src/guestfs-actions.pod:5486 ../src/guestfs-actions.pod:6526 ../src/guestfs-actions.pod:6909 ../src/guestfs-actions.pod:7199 ../src/guestfs-actions.pod:7931
26955 msgid "(Added in 1.0.55)"
26959 #: ../src/guestfs-actions.pod:2471
26960 msgid "guestfs_get_network"
26964 #: ../src/guestfs-actions.pod:2473
26968 " guestfs_get_network (guestfs_h *g);\n"
26973 #: ../src/guestfs-actions.pod:2480 ../src/guestfs-actions.pod:6928
26974 msgid "(Added in 1.5.4)"
26978 #: ../src/guestfs-actions.pod:2482
26979 msgid "guestfs_get_path"
26983 #: ../src/guestfs-actions.pod:2484
26987 " guestfs_get_path (guestfs_h *g);\n"
26992 #: ../src/guestfs-actions.pod:2492 ../src/guestfs-actions.pod:2532
26994 "This function returns a string, or NULL on error. The string is owned by "
26995 "the guest handle and must I<not> be freed."
26999 #: ../src/guestfs-actions.pod:2497
27000 msgid "guestfs_get_pgroup"
27004 #: ../src/guestfs-actions.pod:2499
27008 " guestfs_get_pgroup (guestfs_h *g);\n"
27013 #: ../src/guestfs-actions.pod:2506 ../src/guestfs-actions.pod:6964 ../src/guestfs-actions.pod:8423
27014 msgid "(Added in 1.11.18)"
27018 #: ../src/guestfs-actions.pod:2508
27019 msgid "guestfs_get_pid"
27023 #: ../src/guestfs-actions.pod:2510
27027 " guestfs_get_pid (guestfs_h *g);\n"
27032 #: ../src/guestfs-actions.pod:2520
27033 msgid "(Added in 1.0.56)"
27037 #: ../src/guestfs-actions.pod:2522
27038 msgid "guestfs_get_qemu"
27042 #: ../src/guestfs-actions.pod:2524
27046 " guestfs_get_qemu (guestfs_h *g);\n"
27051 #: ../src/guestfs-actions.pod:2535 ../src/guestfs-actions.pod:6992
27052 msgid "(Added in 1.0.6)"
27056 #: ../src/guestfs-actions.pod:2537
27057 msgid "guestfs_get_recovery_proc"
27061 #: ../src/guestfs-actions.pod:2539
27065 " guestfs_get_recovery_proc (guestfs_h *g);\n"
27070 #: ../src/guestfs-actions.pod:2546 ../src/guestfs-actions.pod:4130 ../src/guestfs-actions.pod:4472 ../src/guestfs-actions.pod:4866 ../src/guestfs-actions.pod:5036 ../src/guestfs-actions.pod:6231 ../src/guestfs-actions.pod:6574 ../src/guestfs-actions.pod:7016 ../src/guestfs-actions.pod:7714 ../src/guestfs-actions.pod:7734 ../src/guestfs-actions.pod:8046
27071 msgid "(Added in 1.0.77)"
27075 #: ../src/guestfs-actions.pod:2548
27076 msgid "guestfs_get_selinux"
27080 #: ../src/guestfs-actions.pod:2550
27084 " guestfs_get_selinux (guestfs_h *g);\n"
27089 #: ../src/guestfs-actions.pod:2553
27091 "This returns the current setting of the selinux flag which is passed to the "
27092 "appliance at boot time. See C<guestfs_set_selinux>."
27096 #: ../src/guestfs-actions.pod:2561 ../src/guestfs-actions.pod:2635 ../src/guestfs-actions.pod:7035 ../src/guestfs-actions.pod:7109
27097 msgid "(Added in 1.0.67)"
27101 #: ../src/guestfs-actions.pod:2563
27102 msgid "guestfs_get_smp"
27106 #: ../src/guestfs-actions.pod:2565
27110 " guestfs_get_smp (guestfs_h *g);\n"
27115 #: ../src/guestfs-actions.pod:2574
27116 msgid "guestfs_get_state"
27120 #: ../src/guestfs-actions.pod:2576
27124 " guestfs_get_state (guestfs_h *g);\n"
27129 #: ../src/guestfs-actions.pod:2588
27130 msgid "guestfs_get_trace"
27134 #: ../src/guestfs-actions.pod:2590
27138 " guestfs_get_trace (guestfs_h *g);\n"
27143 #: ../src/guestfs-actions.pod:2599
27144 msgid "guestfs_get_umask"
27148 #: ../src/guestfs-actions.pod:2601
27152 " guestfs_get_umask (guestfs_h *g);\n"
27157 #: ../src/guestfs-actions.pod:2604
27159 "Return the current umask. By default the umask is C<022> unless it has been "
27160 "set by calling C<guestfs_umask>."
27164 #: ../src/guestfs-actions.pod:2611
27165 msgid "guestfs_get_verbose"
27169 #: ../src/guestfs-actions.pod:2613
27173 " guestfs_get_verbose (guestfs_h *g);\n"
27178 #: ../src/guestfs-actions.pod:2622
27179 msgid "guestfs_getcon"
27183 #: ../src/guestfs-actions.pod:2624
27187 " guestfs_getcon (guestfs_h *g);\n"
27192 #: ../src/guestfs-actions.pod:2629
27193 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
27197 #: ../src/guestfs-actions.pod:2637
27198 msgid "guestfs_getxattr"
27202 #: ../src/guestfs-actions.pod:2639
27206 " guestfs_getxattr (guestfs_h *g,\n"
27207 " const char *path,\n"
27208 " const char *name,\n"
27209 " size_t *size_r);\n"
27214 #: ../src/guestfs-actions.pod:2645
27216 "Get a single extended attribute from file C<path> named C<name>. This call "
27217 "follows symlinks. If you want to lookup an extended attribute for the "
27218 "symlink itself, use C<guestfs_lgetxattr>."
27222 #: ../src/guestfs-actions.pod:2649 ../src/guestfs-actions.pod:4144
27224 "Normally it is better to get all extended attributes from a file in one go "
27225 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
27226 "implementations are buggy and do not provide a way to list out attributes. "
27227 "For these filesystems (notably ntfs-3g) you have to know the names of the "
27228 "extended attributes you want in advance and call this function."
27232 #: ../src/guestfs-actions.pod:2659
27233 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
27237 #: ../src/guestfs-actions.pod:2661 ../src/guestfs-actions.pod:2874 ../src/guestfs-actions.pod:3356 ../src/guestfs-actions.pod:4156 ../src/guestfs-actions.pod:6224 ../src/guestfs-actions.pod:6250 ../src/guestfs-actions.pod:6431
27239 "This function returns a buffer, or NULL on error. The size of the returned "
27240 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
27245 #: ../src/guestfs-actions.pod:2665 ../src/guestfs-actions.pod:4160
27246 msgid "(Added in 1.7.24)"
27250 #: ../src/guestfs-actions.pod:2667
27251 msgid "guestfs_getxattrs"
27255 #: ../src/guestfs-actions.pod:2669
27258 " struct guestfs_xattr_list *\n"
27259 " guestfs_getxattrs (guestfs_h *g,\n"
27260 " const char *path);\n"
27265 #: ../src/guestfs-actions.pod:2679
27266 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
27270 #: ../src/guestfs-actions.pod:2681 ../src/guestfs-actions.pod:4172 ../src/guestfs-actions.pod:4862
27272 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
27273 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
27277 #: ../src/guestfs-actions.pod:2685 ../src/guestfs-actions.pod:4176 ../src/guestfs-actions.pod:4386 ../src/guestfs-actions.pod:4422 ../src/guestfs-actions.pod:6604 ../src/guestfs-actions.pod:7128 ../src/guestfs-actions.pod:8631
27278 msgid "(Added in 1.0.59)"
27282 #: ../src/guestfs-actions.pod:2687
27283 msgid "guestfs_glob_expand"
27287 #: ../src/guestfs-actions.pod:2689
27291 " guestfs_glob_expand (guestfs_h *g,\n"
27292 " const char *pattern);\n"
27297 #: ../src/guestfs-actions.pod:2708 ../src/guestfs-actions.pod:7312 ../src/guestfs-actions.pod:7329
27298 msgid "(Added in 1.0.50)"
27302 #: ../src/guestfs-actions.pod:2710
27303 msgid "guestfs_grep"
27307 #: ../src/guestfs-actions.pod:2712
27311 " guestfs_grep (guestfs_h *g,\n"
27312 " const char *regex,\n"
27313 " const char *path);\n"
27318 #: ../src/guestfs-actions.pod:2729
27319 msgid "guestfs_grepi"
27323 #: ../src/guestfs-actions.pod:2731
27327 " guestfs_grepi (guestfs_h *g,\n"
27328 " const char *regex,\n"
27329 " const char *path);\n"
27334 #: ../src/guestfs-actions.pod:2748
27335 msgid "guestfs_grub_install"
27339 #: ../src/guestfs-actions.pod:2750
27343 " guestfs_grub_install (guestfs_h *g,\n"
27344 " const char *root,\n"
27345 " const char *device);\n"
27350 #: ../src/guestfs-actions.pod:2793
27351 msgid "(Added in 1.0.17)"
27355 #: ../src/guestfs-actions.pod:2795
27356 msgid "guestfs_head"
27360 #: ../src/guestfs-actions.pod:2797
27364 " guestfs_head (guestfs_h *g,\n"
27365 " const char *path);\n"
27370 #: ../src/guestfs-actions.pod:2813
27371 msgid "guestfs_head_n"
27375 #: ../src/guestfs-actions.pod:2815
27379 " guestfs_head_n (guestfs_h *g,\n"
27381 " const char *path);\n"
27386 #: ../src/guestfs-actions.pod:2837
27387 msgid "guestfs_hexdump"
27391 #: ../src/guestfs-actions.pod:2839
27395 " guestfs_hexdump (guestfs_h *g,\n"
27396 " const char *path);\n"
27401 #: ../src/guestfs-actions.pod:2852 ../src/guestfs-actions.pod:7393 ../src/guestfs-actions.pod:7448
27402 msgid "(Added in 1.0.22)"
27406 #: ../src/guestfs-actions.pod:2854
27407 msgid "guestfs_initrd_cat"
27411 #: ../src/guestfs-actions.pod:2856
27415 " guestfs_initrd_cat (guestfs_h *g,\n"
27416 " const char *initrdpath,\n"
27417 " const char *filename,\n"
27418 " size_t *size_r);\n"
27423 #: ../src/guestfs-actions.pod:2872
27424 msgid "See also C<guestfs_initrd_list>."
27428 #: ../src/guestfs-actions.pod:2883
27429 msgid "guestfs_initrd_list"
27433 #: ../src/guestfs-actions.pod:2885
27437 " guestfs_initrd_list (guestfs_h *g,\n"
27438 " const char *path);\n"
27443 #: ../src/guestfs-actions.pod:2905
27444 msgid "guestfs_inotify_add_watch"
27448 #: ../src/guestfs-actions.pod:2907
27452 " guestfs_inotify_add_watch (guestfs_h *g,\n"
27453 " const char *path,\n"
27459 #: ../src/guestfs-actions.pod:2926
27460 msgid "guestfs_inotify_close"
27464 #: ../src/guestfs-actions.pod:2928
27468 " guestfs_inotify_close (guestfs_h *g);\n"
27473 #: ../src/guestfs-actions.pod:2939
27474 msgid "guestfs_inotify_files"
27478 #: ../src/guestfs-actions.pod:2941
27482 " guestfs_inotify_files (guestfs_h *g);\n"
27487 #: ../src/guestfs-actions.pod:2944
27489 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
27490 "returns a list of pathnames of objects that were touched. The returned "
27491 "pathnames are sorted and deduplicated."
27495 #: ../src/guestfs-actions.pod:2954
27496 msgid "guestfs_inotify_init"
27500 #: ../src/guestfs-actions.pod:2956
27504 " guestfs_inotify_init (guestfs_h *g,\n"
27505 " int maxevents);\n"
27510 #: ../src/guestfs-actions.pod:2964
27512 "C<maxevents> is the maximum number of events which will be queued up between "
27513 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
27514 "passed as C<0>, then the kernel (or previously set) default is used. For "
27515 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
27516 "throws away events, but records the fact that it threw them away by setting "
27517 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
27518 "C<guestfs_inotify_read>)."
27522 #: ../src/guestfs-actions.pod:2974
27524 "Before any events are generated, you have to add some watches to the "
27525 "internal watch list. See: C<guestfs_inotify_add_watch>, "
27526 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
27530 #: ../src/guestfs-actions.pod:2980
27532 "Queued up events should be read periodically by calling "
27533 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
27534 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
27535 "often enough then you risk the internal queue overflowing."
27539 #: ../src/guestfs-actions.pod:2987
27541 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
27542 "This also removes any watches automatically."
27546 #: ../src/guestfs-actions.pod:3000
27547 msgid "guestfs_inotify_read"
27551 #: ../src/guestfs-actions.pod:3002
27554 " struct guestfs_inotify_event_list *\n"
27555 " guestfs_inotify_read (guestfs_h *g);\n"
27560 #: ../src/guestfs-actions.pod:3016
27562 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
27563 "there was an error. I<The caller must call "
27564 "C<guestfs_free_inotify_event_list> after use>."
27568 #: ../src/guestfs-actions.pod:3022
27569 msgid "guestfs_inotify_rm_watch"
27573 #: ../src/guestfs-actions.pod:3024
27577 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
27583 #: ../src/guestfs-actions.pod:3028
27585 "Remove a previously defined inotify watch. See "
27586 "C<guestfs_inotify_add_watch>."
27590 #: ../src/guestfs-actions.pod:3035
27591 msgid "guestfs_inspect_get_arch"
27595 #: ../src/guestfs-actions.pod:3037
27599 " guestfs_inspect_get_arch (guestfs_h *g,\n"
27600 " const char *root);\n"
27605 #: ../src/guestfs-actions.pod:3041
27607 "This returns the architecture of the inspected operating system. The "
27608 "possible return values are listed under C<guestfs_file_architecture>."
27612 #: ../src/guestfs-actions.pod:3055
27613 msgid "guestfs_inspect_get_distro"
27617 #: ../src/guestfs-actions.pod:3057
27621 " guestfs_inspect_get_distro (guestfs_h *g,\n"
27622 " const char *root);\n"
27627 #: ../src/guestfs-actions.pod:3157
27628 msgid "guestfs_inspect_get_drive_mappings"
27632 #: ../src/guestfs-actions.pod:3159
27636 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
27637 " const char *root);\n"
27642 #: ../src/guestfs-actions.pod:3188
27644 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27645 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
27649 #: ../src/guestfs-actions.pod:3192 ../src/guestfs-actions.pod:3460 ../src/guestfs-actions.pod:4263 ../src/guestfs-actions.pod:5000 ../src/guestfs-actions.pod:5675 ../src/guestfs-actions.pod:7870
27651 "This function returns a NULL-terminated array of strings, or NULL if there "
27652 "was an error. The array of strings will always have length C<2n+1>, where "
27653 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
27654 "caller must free the strings and the array after use>."
27658 #: ../src/guestfs-actions.pod:3198 ../src/guestfs-actions.pod:3659
27659 msgid "(Added in 1.9.17)"
27663 #: ../src/guestfs-actions.pod:3200
27664 msgid "guestfs_inspect_get_filesystems"
27668 #: ../src/guestfs-actions.pod:3202
27672 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
27673 " const char *root);\n"
27678 #: ../src/guestfs-actions.pod:3214
27680 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27681 "C<guestfs_inspect_get_mountpoints>."
27685 #: ../src/guestfs-actions.pod:3223
27686 msgid "guestfs_inspect_get_format"
27690 #: ../src/guestfs-actions.pod:3225
27694 " guestfs_inspect_get_format (guestfs_h *g,\n"
27695 " const char *root);\n"
27700 #: ../src/guestfs-actions.pod:3259 ../src/guestfs-actions.pod:3695 ../src/guestfs-actions.pod:3711 ../src/guestfs-actions.pod:3729 ../src/guestfs-actions.pod:6642
27701 msgid "(Added in 1.9.4)"
27705 #: ../src/guestfs-actions.pod:3261
27706 msgid "guestfs_inspect_get_hostname"
27710 #: ../src/guestfs-actions.pod:3263
27714 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
27715 " const char *root);\n"
27720 #: ../src/guestfs-actions.pod:3278
27721 msgid "(Added in 1.7.9)"
27725 #: ../src/guestfs-actions.pod:3280
27726 msgid "guestfs_inspect_get_icon"
27730 #: ../src/guestfs-actions.pod:3282
27734 " guestfs_inspect_get_icon (guestfs_h *g,\n"
27735 " const char *root,\n"
27736 " size_t *size_r,\n"
27742 #: ../src/guestfs-actions.pod:3293
27745 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
27746 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
27751 #: ../src/guestfs-actions.pod:3360 ../src/guestfs-actions.pod:4190 ../src/guestfs-actions.pod:5574
27752 msgid "(Added in 1.11.12)"
27756 #: ../src/guestfs-actions.pod:3362
27757 msgid "guestfs_inspect_get_icon_va"
27761 #: ../src/guestfs-actions.pod:3364
27765 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
27766 " const char *root,\n"
27767 " size_t *size_r,\n"
27768 " va_list args);\n"
27773 #: ../src/guestfs-actions.pod:3370
27774 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
27778 #: ../src/guestfs-actions.pod:3374
27779 msgid "guestfs_inspect_get_icon_argv"
27783 #: ../src/guestfs-actions.pod:3376
27787 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
27788 " const char *root,\n"
27789 " size_t *size_r,\n"
27790 " const struct guestfs_inspect_get_icon_argv "
27796 #: ../src/guestfs-actions.pod:3382
27797 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
27801 #: ../src/guestfs-actions.pod:3386
27802 msgid "guestfs_inspect_get_major_version"
27806 #: ../src/guestfs-actions.pod:3388
27810 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
27811 " const char *root);\n"
27816 #: ../src/guestfs-actions.pod:3410
27817 msgid "guestfs_inspect_get_minor_version"
27821 #: ../src/guestfs-actions.pod:3412
27825 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
27826 " const char *root);\n"
27831 #: ../src/guestfs-actions.pod:3421
27833 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27834 "C<guestfs_inspect_get_major_version>."
27838 #: ../src/guestfs-actions.pod:3428
27839 msgid "guestfs_inspect_get_mountpoints"
27843 #: ../src/guestfs-actions.pod:3430
27847 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
27848 " const char *root);\n"
27853 #: ../src/guestfs-actions.pod:3451
27855 "For operating systems like Windows which still use drive letters, this call "
27856 "will only return an entry for the first drive \"mounted on\" C</>. For "
27857 "information about the mapping of drive letters to partitions, see "
27858 "C<guestfs_inspect_get_drive_mappings>."
27862 #: ../src/guestfs-actions.pod:3457
27864 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27865 "C<guestfs_inspect_get_filesystems>."
27869 #: ../src/guestfs-actions.pod:3468
27870 msgid "guestfs_inspect_get_package_format"
27874 #: ../src/guestfs-actions.pod:3470
27878 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
27879 " const char *root);\n"
27884 #: ../src/guestfs-actions.pod:3474
27886 "This function and C<guestfs_inspect_get_package_management> return the "
27887 "package format and package management tool used by the inspected operating "
27888 "system. For example for Fedora these functions would return C<rpm> (package "
27889 "format) and C<yum> (package management)."
27893 #: ../src/guestfs-actions.pod:3493 ../src/guestfs-actions.pod:3521
27894 msgid "(Added in 1.7.5)"
27898 #: ../src/guestfs-actions.pod:3495
27899 msgid "guestfs_inspect_get_package_management"
27903 #: ../src/guestfs-actions.pod:3497
27907 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
27908 " const char *root);\n"
27913 #: ../src/guestfs-actions.pod:3501
27915 "C<guestfs_inspect_get_package_format> and this function return the package "
27916 "format and package management tool used by the inspected operating system. "
27917 "For example for Fedora these functions would return C<rpm> (package format) "
27918 "and C<yum> (package management)."
27922 #: ../src/guestfs-actions.pod:3523
27923 msgid "guestfs_inspect_get_product_name"
27927 #: ../src/guestfs-actions.pod:3525
27931 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
27932 " const char *root);\n"
27937 #: ../src/guestfs-actions.pod:3544
27938 msgid "guestfs_inspect_get_product_variant"
27942 #: ../src/guestfs-actions.pod:3546
27946 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
27947 " const char *root);\n"
27952 #: ../src/guestfs-actions.pod:3569
27954 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27955 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
27959 #: ../src/guestfs-actions.pod:3576
27960 msgid "(Added in 1.9.13)"
27964 #: ../src/guestfs-actions.pod:3578
27965 msgid "guestfs_inspect_get_roots"
27969 #: ../src/guestfs-actions.pod:3580
27973 " guestfs_inspect_get_roots (guestfs_h *g);\n"
27978 #: ../src/guestfs-actions.pod:3583
27980 "This function is a convenient way to get the list of root devices, as "
27981 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
27982 "the whole inspection process."
27986 #: ../src/guestfs-actions.pod:3587
27988 "This returns an empty list if either no root devices were found or the "
27989 "caller has not called C<guestfs_inspect_os>."
27993 #: ../src/guestfs-actions.pod:3596
27994 msgid "(Added in 1.7.3)"
27998 #: ../src/guestfs-actions.pod:3598
27999 msgid "guestfs_inspect_get_type"
28003 #: ../src/guestfs-actions.pod:3600
28007 " guestfs_inspect_get_type (guestfs_h *g,\n"
28008 " const char *root);\n"
28013 #: ../src/guestfs-actions.pod:3641
28014 msgid "guestfs_inspect_get_windows_current_control_set"
28018 #: ../src/guestfs-actions.pod:3643
28022 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
28023 " const char *root);\n"
28028 #: ../src/guestfs-actions.pod:3661
28029 msgid "guestfs_inspect_get_windows_systemroot"
28033 #: ../src/guestfs-actions.pod:3663
28037 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
28038 " const char *root);\n"
28043 #: ../src/guestfs-actions.pod:3679
28044 msgid "(Added in 1.5.25)"
28048 #: ../src/guestfs-actions.pod:3681
28049 msgid "guestfs_inspect_is_live"
28053 #: ../src/guestfs-actions.pod:3683
28057 " guestfs_inspect_is_live (guestfs_h *g,\n"
28058 " const char *root);\n"
28063 #: ../src/guestfs-actions.pod:3687
28065 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28066 "disk), then this returns true if a live image was detected on the disk."
28070 #: ../src/guestfs-actions.pod:3697
28071 msgid "guestfs_inspect_is_multipart"
28075 #: ../src/guestfs-actions.pod:3699
28079 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
28080 " const char *root);\n"
28085 #: ../src/guestfs-actions.pod:3703
28087 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28088 "disk), then this returns true if the disk is part of a set."
28092 #: ../src/guestfs-actions.pod:3713
28093 msgid "guestfs_inspect_is_netinst"
28097 #: ../src/guestfs-actions.pod:3715
28101 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
28102 " const char *root);\n"
28107 #: ../src/guestfs-actions.pod:3719
28109 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28110 "disk), then this returns true if the disk is a network installer, ie. not a "
28111 "self-contained install CD but one which is likely to require network access "
28112 "to complete the install."
28116 #: ../src/guestfs-actions.pod:3731
28117 msgid "guestfs_inspect_list_applications"
28121 #: ../src/guestfs-actions.pod:3733
28124 " struct guestfs_application_list *\n"
28125 " guestfs_inspect_list_applications (guestfs_h *g,\n"
28126 " const char *root);\n"
28131 #: ../src/guestfs-actions.pod:3739
28133 "I<Note:> This call works differently from other parts of the inspection "
28134 "API. You have to call C<guestfs_inspect_os>, then "
28135 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
28136 "this. Listing applications is a significantly more difficult operation "
28137 "which requires access to the full filesystem. Also note that unlike the "
28138 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
28139 "the libguestfs handle, this call actually reads parts of the mounted "
28140 "filesystems during the call."
28144 #: ../src/guestfs-actions.pod:3829
28146 "This function returns a C<struct guestfs_application_list *>, or NULL if "
28147 "there was an error. I<The caller must call C<guestfs_free_application_list> "
28152 #: ../src/guestfs-actions.pod:3833
28153 msgid "(Added in 1.7.8)"
28157 #: ../src/guestfs-actions.pod:3835
28158 msgid "guestfs_inspect_os"
28162 #: ../src/guestfs-actions.pod:3837
28166 " guestfs_inspect_os (guestfs_h *g);\n"
28171 #: ../src/guestfs-actions.pod:3853
28173 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
28174 "functions in order to query further information about each operating system, "
28175 "such as the name and version."
28179 #: ../src/guestfs-actions.pod:3858
28181 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
28182 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
28183 "the contents. This should be called with no disks currently mounted. The "
28184 "function may also use Augeas, so any existing Augeas handle will be closed."
28188 #: ../src/guestfs-actions.pod:3870 ../src/guestfs-actions.pod:4201 ../src/guestfs-actions.pod:4294
28189 msgid "See also C<guestfs_list_filesystems>."
28193 #: ../src/guestfs-actions.pod:3878
28194 msgid "guestfs_is_blockdev"
28198 #: ../src/guestfs-actions.pod:3880
28202 " guestfs_is_blockdev (guestfs_h *g,\n"
28203 " const char *path);\n"
28208 #: ../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
28209 msgid "See also C<guestfs_stat>."
28213 #: ../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
28214 msgid "(Added in 1.5.10)"
28218 #: ../src/guestfs-actions.pod:3893
28219 msgid "guestfs_is_busy"
28223 #: ../src/guestfs-actions.pod:3895
28227 " guestfs_is_busy (guestfs_h *g);\n"
28232 #: ../src/guestfs-actions.pod:3907
28233 msgid "guestfs_is_chardev"
28237 #: ../src/guestfs-actions.pod:3909
28241 " guestfs_is_chardev (guestfs_h *g,\n"
28242 " const char *path);\n"
28247 #: ../src/guestfs-actions.pod:3922
28248 msgid "guestfs_is_config"
28252 #: ../src/guestfs-actions.pod:3924
28256 " guestfs_is_config (guestfs_h *g);\n"
28261 #: ../src/guestfs-actions.pod:3936
28262 msgid "guestfs_is_dir"
28266 #: ../src/guestfs-actions.pod:3938
28270 " guestfs_is_dir (guestfs_h *g,\n"
28271 " const char *path);\n"
28276 #: ../src/guestfs-actions.pod:3952
28277 msgid "guestfs_is_fifo"
28281 #: ../src/guestfs-actions.pod:3954
28285 " guestfs_is_fifo (guestfs_h *g,\n"
28286 " const char *path);\n"
28291 #: ../src/guestfs-actions.pod:3967
28292 msgid "guestfs_is_file"
28296 #: ../src/guestfs-actions.pod:3969
28300 " guestfs_is_file (guestfs_h *g,\n"
28301 " const char *path);\n"
28306 #: ../src/guestfs-actions.pod:3983
28307 msgid "guestfs_is_launching"
28311 #: ../src/guestfs-actions.pod:3985
28315 " guestfs_is_launching (guestfs_h *g);\n"
28320 #: ../src/guestfs-actions.pod:3997
28321 msgid "guestfs_is_lv"
28325 #: ../src/guestfs-actions.pod:3999
28329 " guestfs_is_lv (guestfs_h *g,\n"
28330 " const char *device);\n"
28335 #: ../src/guestfs-actions.pod:4010
28336 msgid "guestfs_is_ready"
28340 #: ../src/guestfs-actions.pod:4012
28344 " guestfs_is_ready (guestfs_h *g);\n"
28349 #: ../src/guestfs-actions.pod:4024
28350 msgid "guestfs_is_socket"
28354 #: ../src/guestfs-actions.pod:4026
28358 " guestfs_is_socket (guestfs_h *g,\n"
28359 " const char *path);\n"
28364 #: ../src/guestfs-actions.pod:4039
28365 msgid "guestfs_is_symlink"
28369 #: ../src/guestfs-actions.pod:4041
28373 " guestfs_is_symlink (guestfs_h *g,\n"
28374 " const char *path);\n"
28379 #: ../src/guestfs-actions.pod:4054
28380 msgid "guestfs_is_zero"
28384 #: ../src/guestfs-actions.pod:4056
28388 " guestfs_is_zero (guestfs_h *g,\n"
28389 " const char *path);\n"
28394 #: ../src/guestfs-actions.pod:4065 ../src/guestfs-actions.pod:4079
28395 msgid "(Added in 1.11.8)"
28399 #: ../src/guestfs-actions.pod:4067
28400 msgid "guestfs_is_zero_device"
28404 #: ../src/guestfs-actions.pod:4069
28408 " guestfs_is_zero_device (guestfs_h *g,\n"
28409 " const char *device);\n"
28414 #: ../src/guestfs-actions.pod:4081
28415 msgid "guestfs_kill_subprocess"
28419 #: ../src/guestfs-actions.pod:4083
28423 " guestfs_kill_subprocess (guestfs_h *g);\n"
28428 #: ../src/guestfs-actions.pod:4092
28429 msgid "guestfs_launch"
28433 #: ../src/guestfs-actions.pod:4094
28437 " guestfs_launch (guestfs_h *g);\n"
28442 #: ../src/guestfs-actions.pod:4112
28443 msgid "guestfs_lchown"
28447 #: ../src/guestfs-actions.pod:4114
28451 " guestfs_lchown (guestfs_h *g,\n"
28454 " const char *path);\n"
28459 #: ../src/guestfs-actions.pod:4120
28461 "Change the file owner to C<owner> and group to C<group>. This is like "
28462 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
28463 "changed, not the target."
28467 #: ../src/guestfs-actions.pod:4132
28468 msgid "guestfs_lgetxattr"
28472 #: ../src/guestfs-actions.pod:4134
28476 " guestfs_lgetxattr (guestfs_h *g,\n"
28477 " const char *path,\n"
28478 " const char *name,\n"
28479 " size_t *size_r);\n"
28484 #: ../src/guestfs-actions.pod:4154
28485 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
28489 #: ../src/guestfs-actions.pod:4162
28490 msgid "guestfs_lgetxattrs"
28494 #: ../src/guestfs-actions.pod:4164
28497 " struct guestfs_xattr_list *\n"
28498 " guestfs_lgetxattrs (guestfs_h *g,\n"
28499 " const char *path);\n"
28504 #: ../src/guestfs-actions.pod:4168
28506 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
28507 "then it returns the extended attributes of the link itself."
28511 #: ../src/guestfs-actions.pod:4178
28512 msgid "guestfs_list_9p"
28516 #: ../src/guestfs-actions.pod:4180
28520 " guestfs_list_9p (guestfs_h *g);\n"
28525 #: ../src/guestfs-actions.pod:4192
28526 msgid "guestfs_list_devices"
28530 #: ../src/guestfs-actions.pod:4194
28534 " guestfs_list_devices (guestfs_h *g);\n"
28539 #: ../src/guestfs-actions.pod:4209
28540 msgid "guestfs_list_dm_devices"
28544 #: ../src/guestfs-actions.pod:4211
28548 " guestfs_list_dm_devices (guestfs_h *g);\n"
28553 #: ../src/guestfs-actions.pod:4216
28555 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
28556 "previous call to C<guestfs_luks_open>."
28560 #: ../src/guestfs-actions.pod:4219
28562 "Device mapper devices which correspond to logical volumes are I<not> "
28563 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
28568 #: ../src/guestfs-actions.pod:4227 ../src/guestfs-actions.pod:5813
28569 msgid "(Added in 1.11.15)"
28573 #: ../src/guestfs-actions.pod:4229
28574 msgid "guestfs_list_filesystems"
28578 #: ../src/guestfs-actions.pod:4231
28582 " guestfs_list_filesystems (guestfs_h *g);\n"
28587 #: ../src/guestfs-actions.pod:4251
28589 "This command runs other libguestfs commands, which might include "
28590 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
28591 "soon after launch and only when nothing is mounted."
28595 #: ../src/guestfs-actions.pod:4255
28597 "Not all of the filesystems returned will be mountable. In particular, swap "
28598 "partitions are returned in the list. Also this command does not check that "
28599 "each filesystem found is valid and mountable, and some filesystems might be "
28600 "mountable but require special options. Filesystems may not all belong to a "
28601 "single logical operating system (use C<guestfs_inspect_os> to look for "
28606 #: ../src/guestfs-actions.pod:4269 ../src/guestfs-actions.pod:6173
28607 msgid "(Added in 1.5.15)"
28611 #: ../src/guestfs-actions.pod:4271
28612 msgid "guestfs_list_md_devices"
28616 #: ../src/guestfs-actions.pod:4273
28620 " guestfs_list_md_devices (guestfs_h *g);\n"
28625 #: ../src/guestfs-actions.pod:4282
28626 msgid "guestfs_list_partitions"
28630 #: ../src/guestfs-actions.pod:4284
28634 " guestfs_list_partitions (guestfs_h *g);\n"
28639 #: ../src/guestfs-actions.pod:4291
28641 "This does not return logical volumes. For that you will need to call "
28646 #: ../src/guestfs-actions.pod:4302
28651 #: ../src/guestfs-actions.pod:4304
28655 " guestfs_ll (guestfs_h *g,\n"
28656 " const char *directory);\n"
28661 #: ../src/guestfs-actions.pod:4319
28666 #: ../src/guestfs-actions.pod:4321
28670 " guestfs_ln (guestfs_h *g,\n"
28671 " const char *target,\n"
28672 " const char *linkname);\n"
28677 #: ../src/guestfs-actions.pod:4332
28678 msgid "guestfs_ln_f"
28682 #: ../src/guestfs-actions.pod:4334
28686 " guestfs_ln_f (guestfs_h *g,\n"
28687 " const char *target,\n"
28688 " const char *linkname);\n"
28693 #: ../src/guestfs-actions.pod:4346
28694 msgid "guestfs_ln_s"
28698 #: ../src/guestfs-actions.pod:4348
28702 " guestfs_ln_s (guestfs_h *g,\n"
28703 " const char *target,\n"
28704 " const char *linkname);\n"
28709 #: ../src/guestfs-actions.pod:4359
28710 msgid "guestfs_ln_sf"
28714 #: ../src/guestfs-actions.pod:4361
28718 " guestfs_ln_sf (guestfs_h *g,\n"
28719 " const char *target,\n"
28720 " const char *linkname);\n"
28725 #: ../src/guestfs-actions.pod:4373
28726 msgid "guestfs_lremovexattr"
28730 #: ../src/guestfs-actions.pod:4375
28734 " guestfs_lremovexattr (guestfs_h *g,\n"
28735 " const char *xattr,\n"
28736 " const char *path);\n"
28741 #: ../src/guestfs-actions.pod:4380
28743 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
28744 "link, then it removes an extended attribute of the link itself."
28748 #: ../src/guestfs-actions.pod:4388
28753 #: ../src/guestfs-actions.pod:4390
28757 " guestfs_ls (guestfs_h *g,\n"
28758 " const char *directory);\n"
28763 #: ../src/guestfs-actions.pod:4398
28765 "This command is mostly useful for interactive sessions. Programs should "
28766 "probably use C<guestfs_readdir> instead."
28770 #: ../src/guestfs-actions.pod:4407
28771 msgid "guestfs_lsetxattr"
28775 #: ../src/guestfs-actions.pod:4409
28779 " guestfs_lsetxattr (guestfs_h *g,\n"
28780 " const char *xattr,\n"
28781 " const char *val,\n"
28783 " const char *path);\n"
28788 #: ../src/guestfs-actions.pod:4416
28790 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
28791 "then it sets an extended attribute of the link itself."
28795 #: ../src/guestfs-actions.pod:4424
28796 msgid "guestfs_lstat"
28800 #: ../src/guestfs-actions.pod:4426
28803 " struct guestfs_stat *\n"
28804 " guestfs_lstat (guestfs_h *g,\n"
28805 " const char *path);\n"
28810 #: ../src/guestfs-actions.pod:4432
28812 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
28813 "link, then the link is stat-ed, not the file it refers to."
28817 #: ../src/guestfs-actions.pod:4438 ../src/guestfs-actions.pod:7353
28819 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
28820 "error. I<The caller must call C<guestfs_free_stat> after use>."
28824 #: ../src/guestfs-actions.pod:4442 ../src/guestfs-actions.pod:7357 ../src/guestfs-actions.pod:7375 ../src/guestfs-actions.pod:7876
28825 msgid "(Added in 0.9.2)"
28829 #: ../src/guestfs-actions.pod:4444
28830 msgid "guestfs_lstatlist"
28834 #: ../src/guestfs-actions.pod:4446
28837 " struct guestfs_stat_list *\n"
28838 " guestfs_lstatlist (guestfs_h *g,\n"
28839 " const char *path,\n"
28840 " char *const *names);\n"
28845 #: ../src/guestfs-actions.pod:4451
28847 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
28848 "files, where all files are in the directory C<path>. C<names> is the list "
28849 "of files from this directory."
28853 #: ../src/guestfs-actions.pod:4460
28855 "This call is intended for programs that want to efficiently list a directory "
28856 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
28857 "for a similarly efficient call for getting extended attributes. Very long "
28858 "directory listings might cause the protocol message size to be exceeded, "
28859 "causing this call to fail. The caller must split up such requests into "
28860 "smaller groups of names."
28864 #: ../src/guestfs-actions.pod:4468
28866 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
28867 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
28871 #: ../src/guestfs-actions.pod:4474
28872 msgid "guestfs_luks_add_key"
28876 #: ../src/guestfs-actions.pod:4476
28880 " guestfs_luks_add_key (guestfs_h *g,\n"
28881 " const char *device,\n"
28882 " const char *key,\n"
28883 " const char *newkey,\n"
28889 #: ../src/guestfs-actions.pod:4488
28891 "Note that if C<keyslot> already contains a key, then this command will "
28892 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
28896 #: ../src/guestfs-actions.pod:4494 ../src/guestfs-actions.pod:4531 ../src/guestfs-actions.pod:4551 ../src/guestfs-actions.pod:4571 ../src/guestfs-actions.pod:4606 ../src/guestfs-actions.pod:4625
28898 "This function takes a key or passphrase parameter which could contain "
28899 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
28904 #: ../src/guestfs-actions.pod:4498 ../src/guestfs-actions.pod:4535 ../src/guestfs-actions.pod:4555 ../src/guestfs-actions.pod:4575
28905 msgid "(Added in 1.5.2)"
28909 #: ../src/guestfs-actions.pod:4500
28910 msgid "guestfs_luks_close"
28914 #: ../src/guestfs-actions.pod:4502
28918 " guestfs_luks_close (guestfs_h *g,\n"
28919 " const char *device);\n"
28924 #: ../src/guestfs-actions.pod:4506
28926 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
28927 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
28928 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
28929 "underlying block device."
28933 #: ../src/guestfs-actions.pod:4514 ../src/guestfs-actions.pod:4610 ../src/guestfs-actions.pod:4629 ../src/guestfs-actions.pod:4679 ../src/guestfs-actions.pod:4724
28934 msgid "(Added in 1.5.1)"
28938 #: ../src/guestfs-actions.pod:4516
28939 msgid "guestfs_luks_format"
28943 #: ../src/guestfs-actions.pod:4518
28947 " guestfs_luks_format (guestfs_h *g,\n"
28948 " const char *device,\n"
28949 " const char *key,\n"
28955 #: ../src/guestfs-actions.pod:4537
28956 msgid "guestfs_luks_format_cipher"
28960 #: ../src/guestfs-actions.pod:4539
28964 " guestfs_luks_format_cipher (guestfs_h *g,\n"
28965 " const char *device,\n"
28966 " const char *key,\n"
28968 " const char *cipher);\n"
28973 #: ../src/guestfs-actions.pod:4546
28975 "This command is the same as C<guestfs_luks_format> but it also allows you to "
28976 "set the C<cipher> used."
28980 #: ../src/guestfs-actions.pod:4557
28981 msgid "guestfs_luks_kill_slot"
28985 #: ../src/guestfs-actions.pod:4559
28989 " guestfs_luks_kill_slot (guestfs_h *g,\n"
28990 " const char *device,\n"
28991 " const char *key,\n"
28997 #: ../src/guestfs-actions.pod:4577
28998 msgid "guestfs_luks_open"
29002 #: ../src/guestfs-actions.pod:4579
29006 " guestfs_luks_open (guestfs_h *g,\n"
29007 " const char *device,\n"
29008 " const char *key,\n"
29009 " const char *mapname);\n"
29014 #: ../src/guestfs-actions.pod:4597
29016 "If this block device contains LVM volume groups, then calling "
29017 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
29022 #: ../src/guestfs-actions.pod:4601
29023 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
29027 #: ../src/guestfs-actions.pod:4612
29028 msgid "guestfs_luks_open_ro"
29032 #: ../src/guestfs-actions.pod:4614
29036 " guestfs_luks_open_ro (guestfs_h *g,\n"
29037 " const char *device,\n"
29038 " const char *key,\n"
29039 " const char *mapname);\n"
29044 #: ../src/guestfs-actions.pod:4620
29046 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
29051 #: ../src/guestfs-actions.pod:4631
29052 msgid "guestfs_lvcreate"
29056 #: ../src/guestfs-actions.pod:4633
29060 " guestfs_lvcreate (guestfs_h *g,\n"
29061 " const char *logvol,\n"
29062 " const char *volgroup,\n"
29068 #: ../src/guestfs-actions.pod:4646
29069 msgid "guestfs_lvm_canonical_lv_name"
29073 #: ../src/guestfs-actions.pod:4648
29077 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
29078 " const char *lvname);\n"
29083 #: ../src/guestfs-actions.pod:4659
29084 msgid "See also C<guestfs_is_lv>."
29088 #: ../src/guestfs-actions.pod:4664
29089 msgid "(Added in 1.5.24)"
29093 #: ../src/guestfs-actions.pod:4666
29094 msgid "guestfs_lvm_clear_filter"
29098 #: ../src/guestfs-actions.pod:4668
29102 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
29107 #: ../src/guestfs-actions.pod:4671
29109 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
29110 "see every block device."
29114 #: ../src/guestfs-actions.pod:4681
29115 msgid "guestfs_lvm_remove_all"
29119 #: ../src/guestfs-actions.pod:4683
29123 " guestfs_lvm_remove_all (guestfs_h *g);\n"
29128 #: ../src/guestfs-actions.pod:4693
29129 msgid "guestfs_lvm_set_filter"
29133 #: ../src/guestfs-actions.pod:4695
29137 " guestfs_lvm_set_filter (guestfs_h *g,\n"
29138 " char *const *devices);\n"
29143 #: ../src/guestfs-actions.pod:4726
29144 msgid "guestfs_lvremove"
29148 #: ../src/guestfs-actions.pod:4728
29152 " guestfs_lvremove (guestfs_h *g,\n"
29153 " const char *device);\n"
29158 #: ../src/guestfs-actions.pod:4740 ../src/guestfs-actions.pod:6288 ../src/guestfs-actions.pod:8246
29159 msgid "(Added in 1.0.13)"
29163 #: ../src/guestfs-actions.pod:4742
29164 msgid "guestfs_lvrename"
29168 #: ../src/guestfs-actions.pod:4744
29172 " guestfs_lvrename (guestfs_h *g,\n"
29173 " const char *logvol,\n"
29174 " const char *newlogvol);\n"
29179 #: ../src/guestfs-actions.pod:4753 ../src/guestfs-actions.pod:8259
29180 msgid "(Added in 1.0.83)"
29184 #: ../src/guestfs-actions.pod:4755
29185 msgid "guestfs_lvresize"
29189 #: ../src/guestfs-actions.pod:4757
29193 " guestfs_lvresize (guestfs_h *g,\n"
29194 " const char *device,\n"
29200 #: ../src/guestfs-actions.pod:4770
29201 msgid "guestfs_lvresize_free"
29205 #: ../src/guestfs-actions.pod:4772
29209 " guestfs_lvresize_free (guestfs_h *g,\n"
29210 " const char *lv,\n"
29216 #: ../src/guestfs-actions.pod:4785
29217 msgid "(Added in 1.3.3)"
29221 #: ../src/guestfs-actions.pod:4787
29222 msgid "guestfs_lvs"
29226 #: ../src/guestfs-actions.pod:4789
29230 " guestfs_lvs (guestfs_h *g);\n"
29235 #: ../src/guestfs-actions.pod:4798
29236 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
29240 #: ../src/guestfs-actions.pod:4806
29241 msgid "guestfs_lvs_full"
29245 #: ../src/guestfs-actions.pod:4808
29248 " struct guestfs_lvm_lv_list *\n"
29249 " guestfs_lvs_full (guestfs_h *g);\n"
29254 #: ../src/guestfs-actions.pod:4814
29256 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
29257 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after "
29262 #: ../src/guestfs-actions.pod:4820
29263 msgid "guestfs_lvuuid"
29267 #: ../src/guestfs-actions.pod:4822
29271 " guestfs_lvuuid (guestfs_h *g,\n"
29272 " const char *device);\n"
29277 #: ../src/guestfs-actions.pod:4833
29278 msgid "guestfs_lxattrlist"
29282 #: ../src/guestfs-actions.pod:4835
29285 " struct guestfs_xattr_list *\n"
29286 " guestfs_lxattrlist (guestfs_h *g,\n"
29287 " const char *path,\n"
29288 " char *const *names);\n"
29293 #: ../src/guestfs-actions.pod:4854
29295 "This call is intended for programs that want to efficiently list a directory "
29296 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
29297 "a similarly efficient call for getting standard stats. Very long directory "
29298 "listings might cause the protocol message size to be exceeded, causing this "
29299 "call to fail. The caller must split up such requests into smaller groups of "
29304 #: ../src/guestfs-actions.pod:4868
29305 msgid "guestfs_mdadm_create"
29309 #: ../src/guestfs-actions.pod:4870
29313 " guestfs_mdadm_create (guestfs_h *g,\n"
29314 " const char *name,\n"
29315 " char *const *devices,\n"
29321 #: ../src/guestfs-actions.pod:4881
29324 " GUESTFS_MDADM_CREATE_MISSINGBITMAP, int64_t missingbitmap,\n"
29325 " GUESTFS_MDADM_CREATE_NRDEVICES, int nrdevices,\n"
29326 " GUESTFS_MDADM_CREATE_SPARE, int spare,\n"
29327 " GUESTFS_MDADM_CREATE_CHUNK, int64_t chunk,\n"
29328 " GUESTFS_MDADM_CREATE_LEVEL, const char *level,\n"
29333 #: ../src/guestfs-actions.pod:4943
29334 msgid "guestfs_mdadm_create_va"
29338 #: ../src/guestfs-actions.pod:4945
29342 " guestfs_mdadm_create_va (guestfs_h *g,\n"
29343 " const char *name,\n"
29344 " char *const *devices,\n"
29345 " va_list args);\n"
29350 #: ../src/guestfs-actions.pod:4951
29351 msgid "This is the \"va_list variant\" of L</guestfs_mdadm_create>."
29355 #: ../src/guestfs-actions.pod:4955
29356 msgid "guestfs_mdadm_create_argv"
29360 #: ../src/guestfs-actions.pod:4957
29364 " guestfs_mdadm_create_argv (guestfs_h *g,\n"
29365 " const char *name,\n"
29366 " char *const *devices,\n"
29367 " const struct guestfs_mdadm_create_argv "
29373 #: ../src/guestfs-actions.pod:4963
29374 msgid "This is the \"argv variant\" of L</guestfs_mdadm_create>."
29378 #: ../src/guestfs-actions.pod:4967
29379 msgid "guestfs_mdadm_detail"
29383 #: ../src/guestfs-actions.pod:4969
29387 " guestfs_mdadm_detail (guestfs_h *g,\n"
29388 " const char *md);\n"
29393 #: ../src/guestfs-actions.pod:5006
29394 msgid "guestfs_mkdir"
29398 #: ../src/guestfs-actions.pod:5008
29402 " guestfs_mkdir (guestfs_h *g,\n"
29403 " const char *path);\n"
29408 #: ../src/guestfs-actions.pod:5018
29409 msgid "guestfs_mkdir_mode"
29413 #: ../src/guestfs-actions.pod:5020
29417 " guestfs_mkdir_mode (guestfs_h *g,\n"
29418 " const char *path,\n"
29424 #: ../src/guestfs-actions.pod:5032
29425 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
29429 #: ../src/guestfs-actions.pod:5038
29430 msgid "guestfs_mkdir_p"
29434 #: ../src/guestfs-actions.pod:5040
29438 " guestfs_mkdir_p (guestfs_h *g,\n"
29439 " const char *path);\n"
29444 #: ../src/guestfs-actions.pod:5051
29445 msgid "guestfs_mkdtemp"
29449 #: ../src/guestfs-actions.pod:5053
29453 " guestfs_mkdtemp (guestfs_h *g,\n"
29454 " const char *template);\n"
29459 #: ../src/guestfs-actions.pod:5081
29460 msgid "guestfs_mke2fs_J"
29464 #: ../src/guestfs-actions.pod:5083
29468 " guestfs_mke2fs_J (guestfs_h *g,\n"
29469 " const char *fstype,\n"
29470 " int blocksize,\n"
29471 " const char *device,\n"
29472 " const char *journal);\n"
29477 #: ../src/guestfs-actions.pod:5096
29478 msgid "See also C<guestfs_mke2journal>."
29482 #: ../src/guestfs-actions.pod:5100 ../src/guestfs-actions.pod:5118 ../src/guestfs-actions.pod:5136 ../src/guestfs-actions.pod:5152 ../src/guestfs-actions.pod:5166 ../src/guestfs-actions.pod:5180 ../src/guestfs-actions.pod:5239 ../src/guestfs-actions.pod:5516
29483 msgid "(Added in 1.0.68)"
29487 #: ../src/guestfs-actions.pod:5102
29488 msgid "guestfs_mke2fs_JL"
29492 #: ../src/guestfs-actions.pod:5104
29496 " guestfs_mke2fs_JL (guestfs_h *g,\n"
29497 " const char *fstype,\n"
29498 " int blocksize,\n"
29499 " const char *device,\n"
29500 " const char *label);\n"
29505 #: ../src/guestfs-actions.pod:5114
29506 msgid "See also C<guestfs_mke2journal_L>."
29510 #: ../src/guestfs-actions.pod:5120
29511 msgid "guestfs_mke2fs_JU"
29515 #: ../src/guestfs-actions.pod:5122
29519 " guestfs_mke2fs_JU (guestfs_h *g,\n"
29520 " const char *fstype,\n"
29521 " int blocksize,\n"
29522 " const char *device,\n"
29523 " const char *uuid);\n"
29528 #: ../src/guestfs-actions.pod:5132
29529 msgid "See also C<guestfs_mke2journal_U>."
29533 #: ../src/guestfs-actions.pod:5138
29534 msgid "guestfs_mke2journal"
29538 #: ../src/guestfs-actions.pod:5140
29542 " guestfs_mke2journal (guestfs_h *g,\n"
29543 " int blocksize,\n"
29544 " const char *device);\n"
29549 #: ../src/guestfs-actions.pod:5154
29550 msgid "guestfs_mke2journal_L"
29554 #: ../src/guestfs-actions.pod:5156
29558 " guestfs_mke2journal_L (guestfs_h *g,\n"
29559 " int blocksize,\n"
29560 " const char *label,\n"
29561 " const char *device);\n"
29566 #: ../src/guestfs-actions.pod:5168
29567 msgid "guestfs_mke2journal_U"
29571 #: ../src/guestfs-actions.pod:5170
29575 " guestfs_mke2journal_U (guestfs_h *g,\n"
29576 " int blocksize,\n"
29577 " const char *uuid,\n"
29578 " const char *device);\n"
29583 #: ../src/guestfs-actions.pod:5182
29584 msgid "guestfs_mkfifo"
29588 #: ../src/guestfs-actions.pod:5184
29592 " guestfs_mkfifo (guestfs_h *g,\n"
29594 " const char *path);\n"
29599 #: ../src/guestfs-actions.pod:5189
29601 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
29602 "is just a convenient wrapper around C<guestfs_mknod>."
29606 #: ../src/guestfs-actions.pod:5199
29607 msgid "guestfs_mkfs"
29611 #: ../src/guestfs-actions.pod:5201
29615 " guestfs_mkfs (guestfs_h *g,\n"
29616 " const char *fstype,\n"
29617 " const char *device);\n"
29622 #: ../src/guestfs-actions.pod:5214
29623 msgid "guestfs_mkfs_b"
29627 #: ../src/guestfs-actions.pod:5216
29631 " guestfs_mkfs_b (guestfs_h *g,\n"
29632 " const char *fstype,\n"
29633 " int blocksize,\n"
29634 " const char *device);\n"
29639 #: ../src/guestfs-actions.pod:5222
29641 "I<This function is deprecated.> In new code, use the L</guestfs_mkfs_opts> "
29646 #: ../src/guestfs-actions.pod:5229
29648 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
29649 "block size of the resulting filesystem. Supported block sizes depend on the "
29650 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
29654 #: ../src/guestfs-actions.pod:5241
29655 msgid "guestfs_mkfs_opts"
29659 #: ../src/guestfs-actions.pod:5243
29663 " guestfs_mkfs_opts (guestfs_h *g,\n"
29664 " const char *fstype,\n"
29665 " const char *device,\n"
29671 #: ../src/guestfs-actions.pod:5254
29674 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
29675 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
29676 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
29677 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
29682 #: ../src/guestfs-actions.pod:5302
29683 msgid "(Added in 1.7.19)"
29687 #: ../src/guestfs-actions.pod:5304
29688 msgid "guestfs_mkfs_opts_va"
29692 #: ../src/guestfs-actions.pod:5306
29696 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
29697 " const char *fstype,\n"
29698 " const char *device,\n"
29699 " va_list args);\n"
29704 #: ../src/guestfs-actions.pod:5312
29705 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
29709 #: ../src/guestfs-actions.pod:5316
29710 msgid "guestfs_mkfs_opts_argv"
29714 #: ../src/guestfs-actions.pod:5318
29718 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
29719 " const char *fstype,\n"
29720 " const char *device,\n"
29721 " const struct guestfs_mkfs_opts_argv *optargs);\n"
29726 #: ../src/guestfs-actions.pod:5324
29727 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
29731 #: ../src/guestfs-actions.pod:5328
29732 msgid "guestfs_mkmountpoint"
29736 #: ../src/guestfs-actions.pod:5330
29740 " guestfs_mkmountpoint (guestfs_h *g,\n"
29741 " const char *exemptpath);\n"
29746 #: ../src/guestfs-actions.pod:5334
29748 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
29749 "that can be used to create extra mountpoints before mounting the first "
29754 #: ../src/guestfs-actions.pod:5358
29756 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
29757 "may get unexpected errors if you try to mix these calls. It is safest to "
29758 "manually unmount filesystems and remove mountpoints after use."
29762 #: ../src/guestfs-actions.pod:5362
29764 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
29765 "first, so for this to work for manual mountpoints, you must ensure that the "
29766 "innermost mountpoints have the longest pathnames, as in the example code "
29771 #: ../src/guestfs-actions.pod:5369
29773 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
29774 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
29775 "can also trigger these issues."
29779 #: ../src/guestfs-actions.pod:5375 ../src/guestfs-actions.pod:5681 ../src/guestfs-actions.pod:6708
29780 msgid "(Added in 1.0.62)"
29784 #: ../src/guestfs-actions.pod:5377
29785 msgid "guestfs_mknod"
29789 #: ../src/guestfs-actions.pod:5379
29793 " guestfs_mknod (guestfs_h *g,\n"
29797 " const char *path);\n"
29802 #: ../src/guestfs-actions.pod:5394
29804 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
29805 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
29806 "regular file). These constants are available in the standard Linux header "
29807 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
29808 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
29809 "the appropriate constant for you."
29813 #: ../src/guestfs-actions.pod:5408
29814 msgid "guestfs_mknod_b"
29818 #: ../src/guestfs-actions.pod:5410
29822 " guestfs_mknod_b (guestfs_h *g,\n"
29826 " const char *path);\n"
29831 #: ../src/guestfs-actions.pod:5417
29833 "This call creates a block device node called C<path> with mode C<mode> and "
29834 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
29835 "wrapper around C<guestfs_mknod>."
29839 #: ../src/guestfs-actions.pod:5427
29840 msgid "guestfs_mknod_c"
29844 #: ../src/guestfs-actions.pod:5429
29848 " guestfs_mknod_c (guestfs_h *g,\n"
29852 " const char *path);\n"
29857 #: ../src/guestfs-actions.pod:5436
29859 "This call creates a char device node called C<path> with mode C<mode> and "
29860 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
29861 "wrapper around C<guestfs_mknod>."
29865 #: ../src/guestfs-actions.pod:5446
29866 msgid "guestfs_mkswap"
29870 #: ../src/guestfs-actions.pod:5448
29874 " guestfs_mkswap (guestfs_h *g,\n"
29875 " const char *device);\n"
29880 #: ../src/guestfs-actions.pod:5458
29881 msgid "guestfs_mkswap_L"
29885 #: ../src/guestfs-actions.pod:5460
29889 " guestfs_mkswap_L (guestfs_h *g,\n"
29890 " const char *label,\n"
29891 " const char *device);\n"
29896 #: ../src/guestfs-actions.pod:5475
29897 msgid "guestfs_mkswap_U"
29901 #: ../src/guestfs-actions.pod:5477
29905 " guestfs_mkswap_U (guestfs_h *g,\n"
29906 " const char *uuid,\n"
29907 " const char *device);\n"
29912 #: ../src/guestfs-actions.pod:5488
29913 msgid "guestfs_mkswap_file"
29917 #: ../src/guestfs-actions.pod:5490
29921 " guestfs_mkswap_file (guestfs_h *g,\n"
29922 " const char *path);\n"
29927 #: ../src/guestfs-actions.pod:5496
29929 "This command just writes a swap file signature to an existing file. To "
29930 "create the file itself, use something like C<guestfs_fallocate>."
29934 #: ../src/guestfs-actions.pod:5503
29935 msgid "guestfs_modprobe"
29939 #: ../src/guestfs-actions.pod:5505
29943 " guestfs_modprobe (guestfs_h *g,\n"
29944 " const char *modulename);\n"
29949 #: ../src/guestfs-actions.pod:5518
29950 msgid "guestfs_mount"
29954 #: ../src/guestfs-actions.pod:5520
29958 " guestfs_mount (guestfs_h *g,\n"
29959 " const char *device,\n"
29960 " const char *mountpoint);\n"
29965 #: ../src/guestfs-actions.pod:5539
29967 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
29968 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
29969 "problems for users. If your program might need to work with older versions "
29970 "of libguestfs, use C<guestfs_mount_options> instead (using an empty string "
29971 "for the first parameter if you don't want any options)."
29975 #: ../src/guestfs-actions.pod:5550
29976 msgid "guestfs_mount_9p"
29980 #: ../src/guestfs-actions.pod:5552
29984 " guestfs_mount_9p (guestfs_h *g,\n"
29985 " const char *mounttag,\n"
29986 " const char *mountpoint,\n"
29992 #: ../src/guestfs-actions.pod:5563
29995 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
30000 #: ../src/guestfs-actions.pod:5576
30001 msgid "guestfs_mount_9p_va"
30005 #: ../src/guestfs-actions.pod:5578
30009 " guestfs_mount_9p_va (guestfs_h *g,\n"
30010 " const char *mounttag,\n"
30011 " const char *mountpoint,\n"
30012 " va_list args);\n"
30017 #: ../src/guestfs-actions.pod:5584
30018 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
30022 #: ../src/guestfs-actions.pod:5588
30023 msgid "guestfs_mount_9p_argv"
30027 #: ../src/guestfs-actions.pod:5590
30031 " guestfs_mount_9p_argv (guestfs_h *g,\n"
30032 " const char *mounttag,\n"
30033 " const char *mountpoint,\n"
30034 " const struct guestfs_mount_9p_argv *optargs);\n"
30039 #: ../src/guestfs-actions.pod:5596
30040 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
30044 #: ../src/guestfs-actions.pod:5600
30045 msgid "guestfs_mount_loop"
30049 #: ../src/guestfs-actions.pod:5602
30053 " guestfs_mount_loop (guestfs_h *g,\n"
30054 " const char *file,\n"
30055 " const char *mountpoint);\n"
30060 #: ../src/guestfs-actions.pod:5615
30061 msgid "guestfs_mount_options"
30065 #: ../src/guestfs-actions.pod:5617
30069 " guestfs_mount_options (guestfs_h *g,\n"
30070 " const char *options,\n"
30071 " const char *device,\n"
30072 " const char *mountpoint);\n"
30077 #: ../src/guestfs-actions.pod:5623
30079 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30080 "the mount options as for the L<mount(8)> I<-o> flag."
30084 #: ../src/guestfs-actions.pod:5633 ../src/guestfs-actions.pod:5647 ../src/guestfs-actions.pod:5664
30085 msgid "(Added in 1.0.10)"
30089 #: ../src/guestfs-actions.pod:5635
30090 msgid "guestfs_mount_ro"
30094 #: ../src/guestfs-actions.pod:5637
30098 " guestfs_mount_ro (guestfs_h *g,\n"
30099 " const char *device,\n"
30100 " const char *mountpoint);\n"
30105 #: ../src/guestfs-actions.pod:5642
30107 "This is the same as the C<guestfs_mount> command, but it mounts the "
30108 "filesystem with the read-only (I<-o ro>) flag."
30112 #: ../src/guestfs-actions.pod:5649
30113 msgid "guestfs_mount_vfs"
30117 #: ../src/guestfs-actions.pod:5651
30121 " guestfs_mount_vfs (guestfs_h *g,\n"
30122 " const char *options,\n"
30123 " const char *vfstype,\n"
30124 " const char *device,\n"
30125 " const char *mountpoint);\n"
30130 #: ../src/guestfs-actions.pod:5658
30132 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30133 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
30138 #: ../src/guestfs-actions.pod:5666
30139 msgid "guestfs_mountpoints"
30143 #: ../src/guestfs-actions.pod:5668
30147 " guestfs_mountpoints (guestfs_h *g);\n"
30152 #: ../src/guestfs-actions.pod:5671
30154 "This call is similar to C<guestfs_mounts>. That call returns a list of "
30155 "devices. This one returns a hash table (map) of device name to directory "
30156 "where the device is mounted."
30160 #: ../src/guestfs-actions.pod:5683
30161 msgid "guestfs_mounts"
30165 #: ../src/guestfs-actions.pod:5685
30169 " guestfs_mounts (guestfs_h *g);\n"
30174 #: ../src/guestfs-actions.pod:5693
30175 msgid "See also: C<guestfs_mountpoints>"
30179 #: ../src/guestfs-actions.pod:5701
30184 #: ../src/guestfs-actions.pod:5703
30188 " guestfs_mv (guestfs_h *g,\n"
30189 " const char *src,\n"
30190 " const char *dest);\n"
30195 #: ../src/guestfs-actions.pod:5715
30196 msgid "guestfs_ntfs_3g_probe"
30200 #: ../src/guestfs-actions.pod:5717
30204 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
30206 " const char *device);\n"
30211 #: ../src/guestfs-actions.pod:5736
30212 msgid "(Added in 1.0.43)"
30216 #: ../src/guestfs-actions.pod:5738
30217 msgid "guestfs_ntfsresize"
30221 #: ../src/guestfs-actions.pod:5740
30225 " guestfs_ntfsresize (guestfs_h *g,\n"
30226 " const char *device);\n"
30231 #: ../src/guestfs-actions.pod:5744 ../src/guestfs-actions.pod:5844
30233 "I<This function is deprecated.> In new code, use the "
30234 "L</guestfs_ntfsresize_opts> call instead."
30238 #: ../src/guestfs-actions.pod:5768
30239 msgid "guestfs_ntfsresize_opts"
30243 #: ../src/guestfs-actions.pod:5770
30247 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
30248 " const char *device,\n"
30254 #: ../src/guestfs-actions.pod:5780
30257 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
30258 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
30263 #: ../src/guestfs-actions.pod:5800
30265 "After the resize operation, the filesystem is always marked as requiring a "
30266 "consistency check (for safety). You have to boot into Windows to perform "
30267 "this check and clear this condition. If you I<don't> set the C<force> "
30268 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
30269 "times on a single filesystem without booting into Windows between each "
30274 #: ../src/guestfs-actions.pod:5815
30275 msgid "guestfs_ntfsresize_opts_va"
30279 #: ../src/guestfs-actions.pod:5817
30283 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
30284 " const char *device,\n"
30285 " va_list args);\n"
30290 #: ../src/guestfs-actions.pod:5822
30291 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
30295 #: ../src/guestfs-actions.pod:5826
30296 msgid "guestfs_ntfsresize_opts_argv"
30300 #: ../src/guestfs-actions.pod:5828
30304 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
30305 " const char *device,\n"
30306 " const struct guestfs_ntfsresize_opts_argv "
30312 #: ../src/guestfs-actions.pod:5833
30313 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
30317 #: ../src/guestfs-actions.pod:5837
30318 msgid "guestfs_ntfsresize_size"
30322 #: ../src/guestfs-actions.pod:5839
30326 " guestfs_ntfsresize_size (guestfs_h *g,\n"
30327 " const char *device,\n"
30328 " int64_t size);\n"
30333 #: ../src/guestfs-actions.pod:5851
30335 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
30336 "to specify the new size (in bytes) explicitly."
30340 #: ../src/guestfs-actions.pod:5856 ../src/guestfs-actions.pod:6315 ../src/guestfs-actions.pod:6388 ../src/guestfs-actions.pod:6656 ../src/guestfs-actions.pod:8403
30341 msgid "(Added in 1.3.14)"
30345 #: ../src/guestfs-actions.pod:5858
30346 msgid "guestfs_part_add"
30350 #: ../src/guestfs-actions.pod:5860
30354 " guestfs_part_add (guestfs_h *g,\n"
30355 " const char *device,\n"
30356 " const char *prlogex,\n"
30357 " int64_t startsect,\n"
30358 " int64_t endsect);\n"
30363 #: ../src/guestfs-actions.pod:5867
30365 "This command adds a partition to C<device>. If there is no partition table "
30366 "on the device, call C<guestfs_part_init> first."
30370 #: ../src/guestfs-actions.pod:5879
30372 "Creating a partition which covers the whole disk is not so easy. Use "
30373 "C<guestfs_part_disk> to do that."
30377 #: ../src/guestfs-actions.pod:5884 ../src/guestfs-actions.pod:5919 ../src/guestfs-actions.pod:5972 ../src/guestfs-actions.pod:6056 ../src/guestfs-actions.pod:6094 ../src/guestfs-actions.pod:6113 ../src/guestfs-actions.pod:6153
30378 msgid "(Added in 1.0.78)"
30382 #: ../src/guestfs-actions.pod:5886
30383 msgid "guestfs_part_del"
30387 #: ../src/guestfs-actions.pod:5888
30391 " guestfs_part_del (guestfs_h *g,\n"
30392 " const char *device,\n"
30398 #: ../src/guestfs-actions.pod:5903
30399 msgid "guestfs_part_disk"
30403 #: ../src/guestfs-actions.pod:5905
30407 " guestfs_part_disk (guestfs_h *g,\n"
30408 " const char *device,\n"
30409 " const char *parttype);\n"
30414 #: ../src/guestfs-actions.pod:5910
30416 "This command is simply a combination of C<guestfs_part_init> followed by "
30417 "C<guestfs_part_add> to create a single primary partition covering the whole "
30422 #: ../src/guestfs-actions.pod:5914
30424 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
30425 "possible values are described in C<guestfs_part_init>."
30429 #: ../src/guestfs-actions.pod:5921
30430 msgid "guestfs_part_get_bootable"
30434 #: ../src/guestfs-actions.pod:5923
30438 " guestfs_part_get_bootable (guestfs_h *g,\n"
30439 " const char *device,\n"
30445 #: ../src/guestfs-actions.pod:5931
30446 msgid "See also C<guestfs_part_set_bootable>."
30450 #: ../src/guestfs-actions.pod:5937
30451 msgid "guestfs_part_get_mbr_id"
30455 #: ../src/guestfs-actions.pod:5939
30459 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
30460 " const char *device,\n"
30466 #: ../src/guestfs-actions.pod:5947 ../src/guestfs-actions.pod:6129
30468 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
30469 "undefined results for other partition table types (see "
30470 "C<guestfs_part_get_parttype>)."
30474 #: ../src/guestfs-actions.pod:5955
30475 msgid "guestfs_part_get_parttype"
30479 #: ../src/guestfs-actions.pod:5957
30483 " guestfs_part_get_parttype (guestfs_h *g,\n"
30484 " const char *device);\n"
30489 #: ../src/guestfs-actions.pod:5964
30491 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
30492 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
30493 "possible, although unusual. See C<guestfs_part_init> for a full list."
30497 #: ../src/guestfs-actions.pod:5974
30498 msgid "guestfs_part_init"
30502 #: ../src/guestfs-actions.pod:5976
30506 " guestfs_part_init (guestfs_h *g,\n"
30507 " const char *device,\n"
30508 " const char *parttype);\n"
30513 #: ../src/guestfs-actions.pod:5985
30515 "Initially there are no partitions. Following this, you should call "
30516 "C<guestfs_part_add> for each partition required."
30520 #: ../src/guestfs-actions.pod:6058
30521 msgid "guestfs_part_list"
30525 #: ../src/guestfs-actions.pod:6060
30528 " struct guestfs_partition_list *\n"
30529 " guestfs_part_list (guestfs_h *g,\n"
30530 " const char *device);\n"
30535 #: ../src/guestfs-actions.pod:6077
30537 "Start of the partition I<in bytes>. To get sectors you have to divide by "
30538 "the device's sector size, see C<guestfs_blockdev_getss>."
30542 #: ../src/guestfs-actions.pod:6090
30544 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
30545 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
30550 #: ../src/guestfs-actions.pod:6096
30551 msgid "guestfs_part_set_bootable"
30555 #: ../src/guestfs-actions.pod:6098
30559 " guestfs_part_set_bootable (guestfs_h *g,\n"
30560 " const char *device,\n"
30562 " int bootable);\n"
30567 #: ../src/guestfs-actions.pod:6115
30568 msgid "guestfs_part_set_mbr_id"
30572 #: ../src/guestfs-actions.pod:6117
30576 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
30577 " const char *device,\n"
30584 #: ../src/guestfs-actions.pod:6137
30585 msgid "guestfs_part_set_name"
30589 #: ../src/guestfs-actions.pod:6139
30593 " guestfs_part_set_name (guestfs_h *g,\n"
30594 " const char *device,\n"
30596 " const char *name);\n"
30601 #: ../src/guestfs-actions.pod:6155
30602 msgid "guestfs_part_to_dev"
30606 #: ../src/guestfs-actions.pod:6157
30610 " guestfs_part_to_dev (guestfs_h *g,\n"
30611 " const char *partition);\n"
30616 #: ../src/guestfs-actions.pod:6165 ../src/guestfs-actions.pod:6184
30618 "The named partition must exist, for example as a string returned from "
30619 "C<guestfs_list_partitions>."
30623 #: ../src/guestfs-actions.pod:6168
30624 msgid "See also C<guestfs_part_to_partnum>."
30628 #: ../src/guestfs-actions.pod:6175
30629 msgid "guestfs_part_to_partnum"
30633 #: ../src/guestfs-actions.pod:6177
30637 " guestfs_part_to_partnum (guestfs_h *g,\n"
30638 " const char *partition);\n"
30643 #: ../src/guestfs-actions.pod:6187
30644 msgid "See also C<guestfs_part_to_dev>."
30648 #: ../src/guestfs-actions.pod:6193
30649 msgid "guestfs_ping_daemon"
30653 #: ../src/guestfs-actions.pod:6195
30657 " guestfs_ping_daemon (guestfs_h *g);\n"
30662 #: ../src/guestfs-actions.pod:6207
30663 msgid "guestfs_pread"
30667 #: ../src/guestfs-actions.pod:6209
30671 " guestfs_pread (guestfs_h *g,\n"
30672 " const char *path,\n"
30674 " int64_t offset,\n"
30675 " size_t *size_r);\n"
30680 #: ../src/guestfs-actions.pod:6222
30681 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
30685 #: ../src/guestfs-actions.pod:6233
30686 msgid "guestfs_pread_device"
30690 #: ../src/guestfs-actions.pod:6235
30694 " guestfs_pread_device (guestfs_h *g,\n"
30695 " const char *device,\n"
30697 " int64_t offset,\n"
30698 " size_t *size_r);\n"
30703 #: ../src/guestfs-actions.pod:6248
30704 msgid "See also C<guestfs_pread>."
30708 #: ../src/guestfs-actions.pod:6257
30709 msgid "(Added in 1.5.21)"
30713 #: ../src/guestfs-actions.pod:6259
30714 msgid "guestfs_pvcreate"
30718 #: ../src/guestfs-actions.pod:6261
30722 " guestfs_pvcreate (guestfs_h *g,\n"
30723 " const char *device);\n"
30728 #: ../src/guestfs-actions.pod:6273
30729 msgid "guestfs_pvremove"
30733 #: ../src/guestfs-actions.pod:6275
30737 " guestfs_pvremove (guestfs_h *g,\n"
30738 " const char *device);\n"
30743 #: ../src/guestfs-actions.pod:6290
30744 msgid "guestfs_pvresize"
30748 #: ../src/guestfs-actions.pod:6292
30752 " guestfs_pvresize (guestfs_h *g,\n"
30753 " const char *device);\n"
30758 #: ../src/guestfs-actions.pod:6303
30759 msgid "guestfs_pvresize_size"
30763 #: ../src/guestfs-actions.pod:6305
30767 " guestfs_pvresize_size (guestfs_h *g,\n"
30768 " const char *device,\n"
30769 " int64_t size);\n"
30774 #: ../src/guestfs-actions.pod:6310
30776 "This command is the same as C<guestfs_pvresize> except that it allows you to "
30777 "specify the new size (in bytes) explicitly."
30781 #: ../src/guestfs-actions.pod:6317
30782 msgid "guestfs_pvs"
30786 #: ../src/guestfs-actions.pod:6319
30790 " guestfs_pvs (guestfs_h *g);\n"
30795 #: ../src/guestfs-actions.pod:6328
30796 msgid "See also C<guestfs_pvs_full>."
30800 #: ../src/guestfs-actions.pod:6336
30801 msgid "guestfs_pvs_full"
30805 #: ../src/guestfs-actions.pod:6338
30808 " struct guestfs_lvm_pv_list *\n"
30809 " guestfs_pvs_full (guestfs_h *g);\n"
30814 #: ../src/guestfs-actions.pod:6344
30816 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
30817 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after "
30822 #: ../src/guestfs-actions.pod:6350
30823 msgid "guestfs_pvuuid"
30827 #: ../src/guestfs-actions.pod:6352
30831 " guestfs_pvuuid (guestfs_h *g,\n"
30832 " const char *device);\n"
30837 #: ../src/guestfs-actions.pod:6363
30838 msgid "guestfs_pwrite"
30842 #: ../src/guestfs-actions.pod:6365
30846 " guestfs_pwrite (guestfs_h *g,\n"
30847 " const char *path,\n"
30848 " const char *content,\n"
30849 " size_t content_size,\n"
30850 " int64_t offset);\n"
30855 #: ../src/guestfs-actions.pod:6381
30856 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
30860 #: ../src/guestfs-actions.pod:6390
30861 msgid "guestfs_pwrite_device"
30865 #: ../src/guestfs-actions.pod:6392
30869 " guestfs_pwrite_device (guestfs_h *g,\n"
30870 " const char *device,\n"
30871 " const char *content,\n"
30872 " size_t content_size,\n"
30873 " int64_t offset);\n"
30878 #: ../src/guestfs-actions.pod:6407
30879 msgid "See also C<guestfs_pwrite>."
30883 #: ../src/guestfs-actions.pod:6414
30884 msgid "(Added in 1.5.20)"
30888 #: ../src/guestfs-actions.pod:6416
30889 msgid "guestfs_read_file"
30893 #: ../src/guestfs-actions.pod:6418
30897 " guestfs_read_file (guestfs_h *g,\n"
30898 " const char *path,\n"
30899 " size_t *size_r);\n"
30904 #: ../src/guestfs-actions.pod:6426
30906 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
30907 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
30908 "function is limited in the total size of file that can be handled."
30912 #: ../src/guestfs-actions.pod:6438
30913 msgid "(Added in 1.0.63)"
30917 #: ../src/guestfs-actions.pod:6440
30918 msgid "guestfs_read_lines"
30922 #: ../src/guestfs-actions.pod:6442
30926 " guestfs_read_lines (guestfs_h *g,\n"
30927 " const char *path);\n"
30932 #: ../src/guestfs-actions.pod:6451
30934 "Note that this function cannot correctly handle binary files (specifically, "
30935 "files containing C<\\0> character which is treated as end of line). For "
30936 "those you need to use the C<guestfs_read_file> function which has a more "
30937 "complex interface."
30941 #: ../src/guestfs-actions.pod:6462
30942 msgid "guestfs_readdir"
30946 #: ../src/guestfs-actions.pod:6464
30949 " struct guestfs_dirent_list *\n"
30950 " guestfs_readdir (guestfs_h *g,\n"
30951 " const char *dir);\n"
30956 #: ../src/guestfs-actions.pod:6518
30958 "This function is primarily intended for use by programs. To get a simple "
30959 "list of names, use C<guestfs_ls>. To get a printable directory for human "
30960 "consumption, use C<guestfs_ll>."
30964 #: ../src/guestfs-actions.pod:6522
30966 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
30967 "was an error. I<The caller must call C<guestfs_free_dirent_list> after "
30972 #: ../src/guestfs-actions.pod:6528
30973 msgid "guestfs_readlink"
30977 #: ../src/guestfs-actions.pod:6530
30981 " guestfs_readlink (guestfs_h *g,\n"
30982 " const char *path);\n"
30987 #: ../src/guestfs-actions.pod:6541
30988 msgid "guestfs_readlinklist"
30992 #: ../src/guestfs-actions.pod:6543
30996 " guestfs_readlinklist (guestfs_h *g,\n"
30997 " const char *path,\n"
30998 " char *const *names);\n"
31003 #: ../src/guestfs-actions.pod:6576
31004 msgid "guestfs_realpath"
31008 #: ../src/guestfs-actions.pod:6578
31012 " guestfs_realpath (guestfs_h *g,\n"
31013 " const char *path);\n"
31018 #: ../src/guestfs-actions.pod:6590
31019 msgid "guestfs_removexattr"
31023 #: ../src/guestfs-actions.pod:6592
31027 " guestfs_removexattr (guestfs_h *g,\n"
31028 " const char *xattr,\n"
31029 " const char *path);\n"
31034 #: ../src/guestfs-actions.pod:6600
31035 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
31039 #: ../src/guestfs-actions.pod:6606
31040 msgid "guestfs_resize2fs"
31044 #: ../src/guestfs-actions.pod:6608
31048 " guestfs_resize2fs (guestfs_h *g,\n"
31049 " const char *device);\n"
31054 #: ../src/guestfs-actions.pod:6615
31056 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
31057 "C<device> before calling this command. For unknown reasons C<resize2fs> "
31058 "sometimes gives an error about this and sometimes not. In any case, it is "
31059 "always safe to call C<guestfs_e2fsck_f> before calling this function."
31063 #: ../src/guestfs-actions.pod:6625
31064 msgid "guestfs_resize2fs_M"
31068 #: ../src/guestfs-actions.pod:6627
31072 " guestfs_resize2fs_M (guestfs_h *g,\n"
31073 " const char *device);\n"
31078 #: ../src/guestfs-actions.pod:6631
31080 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
31081 "resized to its minimum size. This works like the I<-M> option to the "
31082 "C<resize2fs> command."
31086 #: ../src/guestfs-actions.pod:6635
31088 "To get the resulting size of the filesystem you should call "
31089 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
31090 "These two numbers, multiplied together, give the resulting size of the "
31091 "minimal filesystem in bytes."
31095 #: ../src/guestfs-actions.pod:6644
31096 msgid "guestfs_resize2fs_size"
31100 #: ../src/guestfs-actions.pod:6646
31104 " guestfs_resize2fs_size (guestfs_h *g,\n"
31105 " const char *device,\n"
31106 " int64_t size);\n"
31111 #: ../src/guestfs-actions.pod:6651
31113 "This command is the same as C<guestfs_resize2fs> except that it allows you "
31114 "to specify the new size (in bytes) explicitly."
31118 #: ../src/guestfs-actions.pod:6658
31123 #: ../src/guestfs-actions.pod:6660
31127 " guestfs_rm (guestfs_h *g,\n"
31128 " const char *path);\n"
31133 #: ../src/guestfs-actions.pod:6670
31134 msgid "guestfs_rm_rf"
31138 #: ../src/guestfs-actions.pod:6672
31142 " guestfs_rm_rf (guestfs_h *g,\n"
31143 " const char *path);\n"
31148 #: ../src/guestfs-actions.pod:6684
31149 msgid "guestfs_rmdir"
31153 #: ../src/guestfs-actions.pod:6686
31157 " guestfs_rmdir (guestfs_h *g,\n"
31158 " const char *path);\n"
31163 #: ../src/guestfs-actions.pod:6696
31164 msgid "guestfs_rmmountpoint"
31168 #: ../src/guestfs-actions.pod:6698
31172 " guestfs_rmmountpoint (guestfs_h *g,\n"
31173 " const char *exemptpath);\n"
31178 #: ../src/guestfs-actions.pod:6702
31180 "This calls removes a mountpoint that was previously created with "
31181 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
31185 #: ../src/guestfs-actions.pod:6710
31186 msgid "guestfs_scrub_device"
31190 #: ../src/guestfs-actions.pod:6712
31194 " guestfs_scrub_device (guestfs_h *g,\n"
31195 " const char *device);\n"
31200 #: ../src/guestfs-actions.pod:6724 ../src/guestfs-actions.pod:6742 ../src/guestfs-actions.pod:6761
31201 msgid "(Added in 1.0.52)"
31205 #: ../src/guestfs-actions.pod:6726
31206 msgid "guestfs_scrub_file"
31210 #: ../src/guestfs-actions.pod:6728
31214 " guestfs_scrub_file (guestfs_h *g,\n"
31215 " const char *file);\n"
31220 #: ../src/guestfs-actions.pod:6744
31221 msgid "guestfs_scrub_freespace"
31225 #: ../src/guestfs-actions.pod:6746
31229 " guestfs_scrub_freespace (guestfs_h *g,\n"
31230 " const char *dir);\n"
31235 #: ../src/guestfs-actions.pod:6750
31237 "This command creates the directory C<dir> and then fills it with files until "
31238 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
31239 "and deletes them. The intention is to scrub any free space on the partition "
31240 "containing C<dir>."
31244 #: ../src/guestfs-actions.pod:6763
31245 msgid "guestfs_set_append"
31249 #: ../src/guestfs-actions.pod:6765
31253 " guestfs_set_append (guestfs_h *g,\n"
31254 " const char *append);\n"
31259 #: ../src/guestfs-actions.pod:6782
31260 msgid "guestfs_set_attach_method"
31264 #: ../src/guestfs-actions.pod:6784
31268 " guestfs_set_attach_method (guestfs_h *g,\n"
31269 " const char *attachmethod);\n"
31274 #: ../src/guestfs-actions.pod:6812
31275 msgid "guestfs_set_autosync"
31279 #: ../src/guestfs-actions.pod:6814
31283 " guestfs_set_autosync (guestfs_h *g,\n"
31284 " int autosync);\n"
31289 #: ../src/guestfs-actions.pod:6830
31290 msgid "guestfs_set_direct"
31294 #: ../src/guestfs-actions.pod:6832
31298 " guestfs_set_direct (guestfs_h *g,\n"
31304 #: ../src/guestfs-actions.pod:6840
31306 "One consequence of this is that log messages aren't caught by the library "
31307 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
31312 #: ../src/guestfs-actions.pod:6853
31313 msgid "guestfs_set_e2label"
31317 #: ../src/guestfs-actions.pod:6855
31321 " guestfs_set_e2label (guestfs_h *g,\n"
31322 " const char *device,\n"
31323 " const char *label);\n"
31328 #: ../src/guestfs-actions.pod:6864
31330 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
31331 "the existing label on a filesystem."
31335 #: ../src/guestfs-actions.pod:6871
31336 msgid "guestfs_set_e2uuid"
31340 #: ../src/guestfs-actions.pod:6873
31344 " guestfs_set_e2uuid (guestfs_h *g,\n"
31345 " const char *device,\n"
31346 " const char *uuid);\n"
31351 #: ../src/guestfs-actions.pod:6883
31353 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
31354 "the existing UUID of a filesystem."
31358 #: ../src/guestfs-actions.pod:6890
31359 msgid "guestfs_set_memsize"
31363 #: ../src/guestfs-actions.pod:6892
31367 " guestfs_set_memsize (guestfs_h *g,\n"
31373 #: ../src/guestfs-actions.pod:6896
31375 "This sets the memory size in megabytes allocated to the qemu subprocess. "
31376 "This only has any effect if called before C<guestfs_launch>."
31380 #: ../src/guestfs-actions.pod:6911
31381 msgid "guestfs_set_network"
31385 #: ../src/guestfs-actions.pod:6913
31389 " guestfs_set_network (guestfs_h *g,\n"
31395 #: ../src/guestfs-actions.pod:6923
31397 "You must call this before calling C<guestfs_launch>, otherwise it has no "
31402 #: ../src/guestfs-actions.pod:6930
31403 msgid "guestfs_set_path"
31407 #: ../src/guestfs-actions.pod:6932
31411 " guestfs_set_path (guestfs_h *g,\n"
31412 " const char *searchpath);\n"
31417 #: ../src/guestfs-actions.pod:6947
31418 msgid "guestfs_set_pgroup"
31422 #: ../src/guestfs-actions.pod:6949
31426 " guestfs_set_pgroup (guestfs_h *g,\n"
31432 #: ../src/guestfs-actions.pod:6966
31433 msgid "guestfs_set_qemu"
31437 #: ../src/guestfs-actions.pod:6968
31441 " guestfs_set_qemu (guestfs_h *g,\n"
31442 " const char *qemu);\n"
31447 #: ../src/guestfs-actions.pod:6994
31448 msgid "guestfs_set_recovery_proc"
31452 #: ../src/guestfs-actions.pod:6996
31456 " guestfs_set_recovery_proc (guestfs_h *g,\n"
31457 " int recoveryproc);\n"
31462 #: ../src/guestfs-actions.pod:7000
31464 "If this is called with the parameter C<false> then C<guestfs_launch> does "
31465 "not create a recovery process. The purpose of the recovery process is to "
31466 "stop runaway qemu processes in the case where the main program aborts "
31471 #: ../src/guestfs-actions.pod:7005
31473 "This only has any effect if called before C<guestfs_launch>, and the default "
31478 #: ../src/guestfs-actions.pod:7018
31479 msgid "guestfs_set_selinux"
31483 #: ../src/guestfs-actions.pod:7020
31487 " guestfs_set_selinux (guestfs_h *g,\n"
31493 #: ../src/guestfs-actions.pod:7037
31494 msgid "guestfs_set_smp"
31498 #: ../src/guestfs-actions.pod:7039
31502 " guestfs_set_smp (guestfs_h *g,\n"
31508 #: ../src/guestfs-actions.pod:7047
31509 msgid "This function must be called before C<guestfs_launch>."
31513 #: ../src/guestfs-actions.pod:7053
31514 msgid "guestfs_set_trace"
31518 #: ../src/guestfs-actions.pod:7055
31522 " guestfs_set_trace (guestfs_h *g,\n"
31528 #: ../src/guestfs-actions.pod:7069
31530 "Trace messages are normally sent to C<stderr>, unless you register a "
31531 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
31535 #: ../src/guestfs-actions.pod:7077
31536 msgid "guestfs_set_verbose"
31540 #: ../src/guestfs-actions.pod:7079
31544 " guestfs_set_verbose (guestfs_h *g,\n"
31550 #: ../src/guestfs-actions.pod:7088
31552 "Verbose messages are normally sent to C<stderr>, unless you register a "
31553 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
31557 #: ../src/guestfs-actions.pod:7096
31558 msgid "guestfs_setcon"
31562 #: ../src/guestfs-actions.pod:7098
31566 " guestfs_setcon (guestfs_h *g,\n"
31567 " const char *context);\n"
31572 #: ../src/guestfs-actions.pod:7111
31573 msgid "guestfs_setxattr"
31577 #: ../src/guestfs-actions.pod:7113
31581 " guestfs_setxattr (guestfs_h *g,\n"
31582 " const char *xattr,\n"
31583 " const char *val,\n"
31585 " const char *path);\n"
31590 #: ../src/guestfs-actions.pod:7124
31591 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
31595 #: ../src/guestfs-actions.pod:7130
31596 msgid "guestfs_sfdisk"
31600 #: ../src/guestfs-actions.pod:7132
31604 " guestfs_sfdisk (guestfs_h *g,\n"
31605 " const char *device,\n"
31609 " char *const *lines);\n"
31614 #: ../src/guestfs-actions.pod:7140 ../src/guestfs-actions.pod:7181 ../src/guestfs-actions.pod:7212
31616 "I<This function is deprecated.> In new code, use the L</guestfs_part_add> "
31621 #: ../src/guestfs-actions.pod:7167
31622 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
31626 #: ../src/guestfs-actions.pod:7174
31627 msgid "guestfs_sfdiskM"
31631 #: ../src/guestfs-actions.pod:7176
31635 " guestfs_sfdiskM (guestfs_h *g,\n"
31636 " const char *device,\n"
31637 " char *const *lines);\n"
31642 #: ../src/guestfs-actions.pod:7188
31644 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
31645 "partition sizes are specified in megabytes only (rounded to the nearest "
31646 "cylinder) and you don't need to specify the cyls, heads and sectors "
31647 "parameters which were rarely if ever used anyway."
31651 #: ../src/guestfs-actions.pod:7194
31653 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
31654 "C<guestfs_part_disk>"
31658 #: ../src/guestfs-actions.pod:7201
31659 msgid "guestfs_sfdisk_N"
31663 #: ../src/guestfs-actions.pod:7203
31667 " guestfs_sfdisk_N (guestfs_h *g,\n"
31668 " const char *device,\n"
31673 " const char *line);\n"
31678 #: ../src/guestfs-actions.pod:7222
31680 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
31681 "for the cyls/heads/sectors parameters."
31685 #: ../src/guestfs-actions.pod:7225
31686 msgid "See also: C<guestfs_part_add>"
31690 #: ../src/guestfs-actions.pod:7231
31691 msgid "guestfs_sfdisk_disk_geometry"
31695 #: ../src/guestfs-actions.pod:7233
31699 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
31700 " const char *device);\n"
31705 #: ../src/guestfs-actions.pod:7237
31707 "This displays the disk geometry of C<device> read from the partition table. "
31708 "Especially in the case where the underlying block device has been resized, "
31709 "this can be different from the kernel's idea of the geometry (see "
31710 "C<guestfs_sfdisk_kernel_geometry>)."
31714 #: ../src/guestfs-actions.pod:7250
31715 msgid "guestfs_sfdisk_kernel_geometry"
31719 #: ../src/guestfs-actions.pod:7252
31723 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
31724 " const char *device);\n"
31729 #: ../src/guestfs-actions.pod:7266
31730 msgid "guestfs_sfdisk_l"
31734 #: ../src/guestfs-actions.pod:7268
31738 " guestfs_sfdisk_l (guestfs_h *g,\n"
31739 " const char *device);\n"
31744 #: ../src/guestfs-actions.pod:7272
31746 "I<This function is deprecated.> In new code, use the L</guestfs_part_list> "
31751 #: ../src/guestfs-actions.pod:7283
31752 msgid "See also: C<guestfs_part_list>"
31756 #: ../src/guestfs-actions.pod:7290
31761 #: ../src/guestfs-actions.pod:7292
31765 " guestfs_sh (guestfs_h *g,\n"
31766 " const char *command);\n"
31771 #: ../src/guestfs-actions.pod:7299
31772 msgid "This is like C<guestfs_command>, but passes the command to:"
31776 #: ../src/guestfs-actions.pod:7307
31777 msgid "All the provisos about C<guestfs_command> apply to this call."
31781 #: ../src/guestfs-actions.pod:7314
31782 msgid "guestfs_sh_lines"
31786 #: ../src/guestfs-actions.pod:7316
31790 " guestfs_sh_lines (guestfs_h *g,\n"
31791 " const char *command);\n"
31796 #: ../src/guestfs-actions.pod:7320
31798 "This is the same as C<guestfs_sh>, but splits the result into a list of "
31803 #: ../src/guestfs-actions.pod:7323
31804 msgid "See also: C<guestfs_command_lines>"
31808 #: ../src/guestfs-actions.pod:7331
31809 msgid "guestfs_sleep"
31813 #: ../src/guestfs-actions.pod:7333
31817 " guestfs_sleep (guestfs_h *g,\n"
31823 #: ../src/guestfs-actions.pod:7341
31824 msgid "(Added in 1.0.41)"
31828 #: ../src/guestfs-actions.pod:7343 ../src/guestfs-structs.pod:109
31829 msgid "guestfs_stat"
31833 #: ../src/guestfs-actions.pod:7345
31836 " struct guestfs_stat *\n"
31837 " guestfs_stat (guestfs_h *g,\n"
31838 " const char *path);\n"
31843 #: ../src/guestfs-actions.pod:7359 ../src/guestfs-structs.pod:135
31844 msgid "guestfs_statvfs"
31848 #: ../src/guestfs-actions.pod:7361
31851 " struct guestfs_statvfs *\n"
31852 " guestfs_statvfs (guestfs_h *g,\n"
31853 " const char *path);\n"
31858 #: ../src/guestfs-actions.pod:7371
31860 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
31861 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
31865 #: ../src/guestfs-actions.pod:7377
31866 msgid "guestfs_strings"
31870 #: ../src/guestfs-actions.pod:7379
31874 " guestfs_strings (guestfs_h *g,\n"
31875 " const char *path);\n"
31880 #: ../src/guestfs-actions.pod:7395
31881 msgid "guestfs_strings_e"
31885 #: ../src/guestfs-actions.pod:7397
31889 " guestfs_strings_e (guestfs_h *g,\n"
31890 " const char *encoding,\n"
31891 " const char *path);\n"
31896 #: ../src/guestfs-actions.pod:7402
31898 "This is like the C<guestfs_strings> command, but allows you to specify the "
31899 "encoding of strings that are looked for in the source file C<path>."
31903 #: ../src/guestfs-actions.pod:7412
31905 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
31906 "ISO-8859-X (this is what C<guestfs_strings> uses)."
31910 #: ../src/guestfs-actions.pod:7450
31911 msgid "guestfs_swapoff_device"
31915 #: ../src/guestfs-actions.pod:7452
31919 " guestfs_swapoff_device (guestfs_h *g,\n"
31920 " const char *device);\n"
31925 #: ../src/guestfs-actions.pod:7456
31927 "This command disables the libguestfs appliance swap device or partition "
31928 "named C<device>. See C<guestfs_swapon_device>."
31932 #: ../src/guestfs-actions.pod:7464
31933 msgid "guestfs_swapoff_file"
31937 #: ../src/guestfs-actions.pod:7466
31941 " guestfs_swapoff_file (guestfs_h *g,\n"
31942 " const char *file);\n"
31947 #: ../src/guestfs-actions.pod:7476
31948 msgid "guestfs_swapoff_label"
31952 #: ../src/guestfs-actions.pod:7478
31956 " guestfs_swapoff_label (guestfs_h *g,\n"
31957 " const char *label);\n"
31962 #: ../src/guestfs-actions.pod:7489
31963 msgid "guestfs_swapoff_uuid"
31967 #: ../src/guestfs-actions.pod:7491
31971 " guestfs_swapoff_uuid (guestfs_h *g,\n"
31972 " const char *uuid);\n"
31977 #: ../src/guestfs-actions.pod:7502
31978 msgid "guestfs_swapon_device"
31982 #: ../src/guestfs-actions.pod:7504
31986 " guestfs_swapon_device (guestfs_h *g,\n"
31987 " const char *device);\n"
31992 #: ../src/guestfs-actions.pod:7508
31994 "This command enables the libguestfs appliance to use the swap device or "
31995 "partition named C<device>. The increased memory is made available for all "
31996 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
32000 #: ../src/guestfs-actions.pod:7524
32001 msgid "guestfs_swapon_file"
32005 #: ../src/guestfs-actions.pod:7526
32009 " guestfs_swapon_file (guestfs_h *g,\n"
32010 " const char *file);\n"
32015 #: ../src/guestfs-actions.pod:7530
32017 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
32022 #: ../src/guestfs-actions.pod:7537
32023 msgid "guestfs_swapon_label"
32027 #: ../src/guestfs-actions.pod:7539
32031 " guestfs_swapon_label (guestfs_h *g,\n"
32032 " const char *label);\n"
32037 #: ../src/guestfs-actions.pod:7543
32039 "This command enables swap to a labeled swap partition. See "
32040 "C<guestfs_swapon_device> for other notes."
32044 #: ../src/guestfs-actions.pod:7550
32045 msgid "guestfs_swapon_uuid"
32049 #: ../src/guestfs-actions.pod:7552
32053 " guestfs_swapon_uuid (guestfs_h *g,\n"
32054 " const char *uuid);\n"
32059 #: ../src/guestfs-actions.pod:7556
32061 "This command enables swap to a swap partition with the given UUID. See "
32062 "C<guestfs_swapon_device> for other notes."
32066 #: ../src/guestfs-actions.pod:7563
32067 msgid "guestfs_sync"
32071 #: ../src/guestfs-actions.pod:7565
32075 " guestfs_sync (guestfs_h *g);\n"
32080 #: ../src/guestfs-actions.pod:7578
32081 msgid "guestfs_tail"
32085 #: ../src/guestfs-actions.pod:7580
32089 " guestfs_tail (guestfs_h *g,\n"
32090 " const char *path);\n"
32095 #: ../src/guestfs-actions.pod:7596
32096 msgid "guestfs_tail_n"
32100 #: ../src/guestfs-actions.pod:7598
32104 " guestfs_tail_n (guestfs_h *g,\n"
32106 " const char *path);\n"
32111 #: ../src/guestfs-actions.pod:7620
32112 msgid "guestfs_tar_in"
32116 #: ../src/guestfs-actions.pod:7622
32120 " guestfs_tar_in (guestfs_h *g,\n"
32121 " const char *tarfile,\n"
32122 " const char *directory);\n"
32127 #: ../src/guestfs-actions.pod:7630
32128 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
32132 #: ../src/guestfs-actions.pod:7635 ../src/guestfs-actions.pod:7652 ../src/guestfs-actions.pod:7668 ../src/guestfs-actions.pod:7684
32133 msgid "(Added in 1.0.3)"
32137 #: ../src/guestfs-actions.pod:7637
32138 msgid "guestfs_tar_out"
32142 #: ../src/guestfs-actions.pod:7639
32146 " guestfs_tar_out (guestfs_h *g,\n"
32147 " const char *directory,\n"
32148 " const char *tarfile);\n"
32153 #: ../src/guestfs-actions.pod:7647
32155 "To download a compressed tarball, use C<guestfs_tgz_out> or "
32156 "C<guestfs_txz_out>."
32160 #: ../src/guestfs-actions.pod:7654
32161 msgid "guestfs_tgz_in"
32165 #: ../src/guestfs-actions.pod:7656
32169 " guestfs_tgz_in (guestfs_h *g,\n"
32170 " const char *tarball,\n"
32171 " const char *directory);\n"
32176 #: ../src/guestfs-actions.pod:7664
32177 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
32181 #: ../src/guestfs-actions.pod:7670
32182 msgid "guestfs_tgz_out"
32186 #: ../src/guestfs-actions.pod:7672
32190 " guestfs_tgz_out (guestfs_h *g,\n"
32191 " const char *directory,\n"
32192 " const char *tarball);\n"
32197 #: ../src/guestfs-actions.pod:7680
32198 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
32202 #: ../src/guestfs-actions.pod:7686
32203 msgid "guestfs_touch"
32207 #: ../src/guestfs-actions.pod:7688
32211 " guestfs_touch (guestfs_h *g,\n"
32212 " const char *path);\n"
32217 #: ../src/guestfs-actions.pod:7703
32218 msgid "guestfs_truncate"
32222 #: ../src/guestfs-actions.pod:7705
32226 " guestfs_truncate (guestfs_h *g,\n"
32227 " const char *path);\n"
32232 #: ../src/guestfs-actions.pod:7716
32233 msgid "guestfs_truncate_size"
32237 #: ../src/guestfs-actions.pod:7718
32241 " guestfs_truncate_size (guestfs_h *g,\n"
32242 " const char *path,\n"
32243 " int64_t size);\n"
32248 #: ../src/guestfs-actions.pod:7726
32250 "If the current file size is less than C<size> then the file is extended to "
32251 "the required size with zero bytes. This creates a sparse file (ie. disk "
32252 "blocks are not allocated for the file until you write to it). To create a "
32253 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
32257 #: ../src/guestfs-actions.pod:7736
32258 msgid "guestfs_tune2fs"
32262 #: ../src/guestfs-actions.pod:7738
32266 " guestfs_tune2fs (guestfs_h *g,\n"
32267 " const char *device,\n"
32273 #: ../src/guestfs-actions.pod:7748
32276 " GUESTFS_TUNE2FS_FORCE, int force,\n"
32277 " GUESTFS_TUNE2FS_MAXMOUNTCOUNT, int maxmountcount,\n"
32278 " GUESTFS_TUNE2FS_MOUNTCOUNT, int mountcount,\n"
32279 " GUESTFS_TUNE2FS_ERRORBEHAVIOR, const char *errorbehavior,\n"
32280 " GUESTFS_TUNE2FS_GROUP, int64_t group,\n"
32281 " GUESTFS_TUNE2FS_INTERVALBETWEENCHECKS, int intervalbetweenchecks,\n"
32282 " GUESTFS_TUNE2FS_RESERVEDBLOCKSPERCENTAGE, int reservedblockspercentage,\n"
32283 " GUESTFS_TUNE2FS_LASTMOUNTEDDIRECTORY, const char *lastmounteddirectory,\n"
32284 " GUESTFS_TUNE2FS_RESERVEDBLOCKSCOUNT, int64_t reservedblockscount,\n"
32285 " GUESTFS_TUNE2FS_USER, int64_t user,\n"
32290 #: ../src/guestfs-actions.pod:7828
32292 "To get the current values of filesystem parameters, see "
32293 "C<guestfs_tune2fs_l>. For precise details of how tune2fs works, see the "
32294 "L<tune2fs(8)> man page."
32298 #: ../src/guestfs-actions.pod:7834
32299 msgid "guestfs_tune2fs_va"
32303 #: ../src/guestfs-actions.pod:7836
32307 " guestfs_tune2fs_va (guestfs_h *g,\n"
32308 " const char *device,\n"
32309 " va_list args);\n"
32314 #: ../src/guestfs-actions.pod:7841
32315 msgid "This is the \"va_list variant\" of L</guestfs_tune2fs>."
32319 #: ../src/guestfs-actions.pod:7845
32320 msgid "guestfs_tune2fs_argv"
32324 #: ../src/guestfs-actions.pod:7847
32328 " guestfs_tune2fs_argv (guestfs_h *g,\n"
32329 " const char *device,\n"
32330 " const struct guestfs_tune2fs_argv *optargs);\n"
32335 #: ../src/guestfs-actions.pod:7852
32336 msgid "This is the \"argv variant\" of L</guestfs_tune2fs>."
32340 #: ../src/guestfs-actions.pod:7856
32341 msgid "guestfs_tune2fs_l"
32345 #: ../src/guestfs-actions.pod:7858
32349 " guestfs_tune2fs_l (guestfs_h *g,\n"
32350 " const char *device);\n"
32355 #: ../src/guestfs-actions.pod:7878
32356 msgid "guestfs_txz_in"
32360 #: ../src/guestfs-actions.pod:7880
32364 " guestfs_txz_in (guestfs_h *g,\n"
32365 " const char *tarball,\n"
32366 " const char *directory);\n"
32371 #: ../src/guestfs-actions.pod:7892
32372 msgid "guestfs_txz_out"
32376 #: ../src/guestfs-actions.pod:7894
32380 " guestfs_txz_out (guestfs_h *g,\n"
32381 " const char *directory,\n"
32382 " const char *tarball);\n"
32387 #: ../src/guestfs-actions.pod:7906
32388 msgid "guestfs_umask"
32392 #: ../src/guestfs-actions.pod:7908
32396 " guestfs_umask (guestfs_h *g,\n"
32402 #: ../src/guestfs-actions.pod:7924
32404 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
32405 "C<guestfs_mkdir>."
32409 #: ../src/guestfs-actions.pod:7933
32410 msgid "guestfs_umount"
32414 #: ../src/guestfs-actions.pod:7935
32418 " guestfs_umount (guestfs_h *g,\n"
32419 " const char *pathordevice);\n"
32424 #: ../src/guestfs-actions.pod:7947
32425 msgid "guestfs_umount_all"
32429 #: ../src/guestfs-actions.pod:7949
32433 " guestfs_umount_all (guestfs_h *g);\n"
32438 #: ../src/guestfs-actions.pod:7960
32439 msgid "guestfs_upload"
32443 #: ../src/guestfs-actions.pod:7962
32447 " guestfs_upload (guestfs_h *g,\n"
32448 " const char *filename,\n"
32449 " const char *remotefilename);\n"
32454 #: ../src/guestfs-actions.pod:7972
32455 msgid "See also C<guestfs_download>."
32459 #: ../src/guestfs-actions.pod:7983
32460 msgid "guestfs_upload_offset"
32464 #: ../src/guestfs-actions.pod:7985
32468 " guestfs_upload_offset (guestfs_h *g,\n"
32469 " const char *filename,\n"
32470 " const char *remotefilename,\n"
32471 " int64_t offset);\n"
32476 #: ../src/guestfs-actions.pod:8001
32478 "Note that there is no limit on the amount of data that can be uploaded with "
32479 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
32480 "full amount unless an error occurs."
32484 #: ../src/guestfs-actions.pod:8006
32485 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
32489 #: ../src/guestfs-actions.pod:8017
32490 msgid "guestfs_utimens"
32494 #: ../src/guestfs-actions.pod:8019
32498 " guestfs_utimens (guestfs_h *g,\n"
32499 " const char *path,\n"
32500 " int64_t atsecs,\n"
32501 " int64_t atnsecs,\n"
32502 " int64_t mtsecs,\n"
32503 " int64_t mtnsecs);\n"
32508 #: ../src/guestfs-actions.pod:8048 ../src/guestfs-structs.pod:175
32509 msgid "guestfs_version"
32513 #: ../src/guestfs-actions.pod:8050
32516 " struct guestfs_version *\n"
32517 " guestfs_version (guestfs_h *g);\n"
32522 #: ../src/guestfs-actions.pod:8078
32524 "I<Note:> Don't use this call to test for availability of features. In "
32525 "enterprise distributions we backport features from later versions into "
32526 "earlier versions, making this an unreliable way to test for features. Use "
32527 "C<guestfs_available> instead."
32531 #: ../src/guestfs-actions.pod:8084
32533 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
32534 "error. I<The caller must call C<guestfs_free_version> after use>."
32538 #: ../src/guestfs-actions.pod:8088
32539 msgid "(Added in 1.0.58)"
32543 #: ../src/guestfs-actions.pod:8090
32544 msgid "guestfs_vfs_label"
32548 #: ../src/guestfs-actions.pod:8092
32552 " guestfs_vfs_label (guestfs_h *g,\n"
32553 " const char *device);\n"
32558 #: ../src/guestfs-actions.pod:8101
32559 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
32563 #: ../src/guestfs-actions.pod:8106 ../src/guestfs-actions.pod:8143
32564 msgid "(Added in 1.3.18)"
32568 #: ../src/guestfs-actions.pod:8108
32569 msgid "guestfs_vfs_type"
32573 #: ../src/guestfs-actions.pod:8110
32577 " guestfs_vfs_type (guestfs_h *g,\n"
32578 " const char *device);\n"
32583 #: ../src/guestfs-actions.pod:8127
32584 msgid "guestfs_vfs_uuid"
32588 #: ../src/guestfs-actions.pod:8129
32592 " guestfs_vfs_uuid (guestfs_h *g,\n"
32593 " const char *device);\n"
32598 #: ../src/guestfs-actions.pod:8138
32599 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
32603 #: ../src/guestfs-actions.pod:8145
32604 msgid "guestfs_vg_activate"
32608 #: ../src/guestfs-actions.pod:8147
32612 " guestfs_vg_activate (guestfs_h *g,\n"
32614 " char *const *volgroups);\n"
32619 #: ../src/guestfs-actions.pod:8164
32620 msgid "guestfs_vg_activate_all"
32624 #: ../src/guestfs-actions.pod:8166
32628 " guestfs_vg_activate_all (guestfs_h *g,\n"
32629 " int activate);\n"
32634 #: ../src/guestfs-actions.pod:8179
32635 msgid "guestfs_vgcreate"
32639 #: ../src/guestfs-actions.pod:8181
32643 " guestfs_vgcreate (guestfs_h *g,\n"
32644 " const char *volgroup,\n"
32645 " char *const *physvols);\n"
32650 #: ../src/guestfs-actions.pod:8193
32651 msgid "guestfs_vglvuuids"
32655 #: ../src/guestfs-actions.pod:8195
32659 " guestfs_vglvuuids (guestfs_h *g,\n"
32660 " const char *vgname);\n"
32665 #: ../src/guestfs-actions.pod:8202
32667 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
32668 "associate logical volumes and volume groups."
32672 #: ../src/guestfs-actions.pod:8205
32673 msgid "See also C<guestfs_vgpvuuids>."
32677 #: ../src/guestfs-actions.pod:8213
32678 msgid "guestfs_vgpvuuids"
32682 #: ../src/guestfs-actions.pod:8215
32686 " guestfs_vgpvuuids (guestfs_h *g,\n"
32687 " const char *vgname);\n"
32692 #: ../src/guestfs-actions.pod:8222
32694 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
32695 "associate physical volumes and volume groups."
32699 #: ../src/guestfs-actions.pod:8225
32700 msgid "See also C<guestfs_vglvuuids>."
32704 #: ../src/guestfs-actions.pod:8233
32705 msgid "guestfs_vgremove"
32709 #: ../src/guestfs-actions.pod:8235
32713 " guestfs_vgremove (guestfs_h *g,\n"
32714 " const char *vgname);\n"
32719 #: ../src/guestfs-actions.pod:8248
32720 msgid "guestfs_vgrename"
32724 #: ../src/guestfs-actions.pod:8250
32728 " guestfs_vgrename (guestfs_h *g,\n"
32729 " const char *volgroup,\n"
32730 " const char *newvolgroup);\n"
32735 #: ../src/guestfs-actions.pod:8261
32736 msgid "guestfs_vgs"
32740 #: ../src/guestfs-actions.pod:8263
32744 " guestfs_vgs (guestfs_h *g);\n"
32749 #: ../src/guestfs-actions.pod:8272
32750 msgid "See also C<guestfs_vgs_full>."
32754 #: ../src/guestfs-actions.pod:8280
32755 msgid "guestfs_vgs_full"
32759 #: ../src/guestfs-actions.pod:8282
32762 " struct guestfs_lvm_vg_list *\n"
32763 " guestfs_vgs_full (guestfs_h *g);\n"
32768 #: ../src/guestfs-actions.pod:8288
32770 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
32771 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after "
32776 #: ../src/guestfs-actions.pod:8294
32777 msgid "guestfs_vgscan"
32781 #: ../src/guestfs-actions.pod:8296
32785 " guestfs_vgscan (guestfs_h *g);\n"
32790 #: ../src/guestfs-actions.pod:8306
32791 msgid "guestfs_vguuid"
32795 #: ../src/guestfs-actions.pod:8308
32799 " guestfs_vguuid (guestfs_h *g,\n"
32800 " const char *vgname);\n"
32805 #: ../src/guestfs-actions.pod:8319
32806 msgid "guestfs_wait_ready"
32810 #: ../src/guestfs-actions.pod:8321
32814 " guestfs_wait_ready (guestfs_h *g);\n"
32819 #: ../src/guestfs-actions.pod:8324
32821 "I<This function is deprecated.> In new code, use the L</guestfs_launch> call "
32826 #: ../src/guestfs-actions.pod:8331
32827 msgid "This function is a no op."
32831 #: ../src/guestfs-actions.pod:8333
32833 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
32834 "calling C<guestfs_launch> to wait for the launch to complete. However this "
32835 "is no longer necessary because C<guestfs_launch> now does the waiting."
32839 #: ../src/guestfs-actions.pod:8338
32841 "If you see any calls to this function in code then you can just remove them, "
32842 "unless you want to retain compatibility with older versions of the API."
32846 #: ../src/guestfs-actions.pod:8346
32847 msgid "guestfs_wc_c"
32851 #: ../src/guestfs-actions.pod:8348
32855 " guestfs_wc_c (guestfs_h *g,\n"
32856 " const char *path);\n"
32861 #: ../src/guestfs-actions.pod:8359
32862 msgid "guestfs_wc_l"
32866 #: ../src/guestfs-actions.pod:8361
32870 " guestfs_wc_l (guestfs_h *g,\n"
32871 " const char *path);\n"
32876 #: ../src/guestfs-actions.pod:8372
32877 msgid "guestfs_wc_w"
32881 #: ../src/guestfs-actions.pod:8374
32885 " guestfs_wc_w (guestfs_h *g,\n"
32886 " const char *path);\n"
32891 #: ../src/guestfs-actions.pod:8385
32892 msgid "guestfs_write"
32896 #: ../src/guestfs-actions.pod:8387
32900 " guestfs_write (guestfs_h *g,\n"
32901 " const char *path,\n"
32902 " const char *content,\n"
32903 " size_t content_size);\n"
32908 #: ../src/guestfs-actions.pod:8396
32909 msgid "See also C<guestfs_write_append>."
32913 #: ../src/guestfs-actions.pod:8405
32914 msgid "guestfs_write_append"
32918 #: ../src/guestfs-actions.pod:8407
32922 " guestfs_write_append (guestfs_h *g,\n"
32923 " const char *path,\n"
32924 " const char *content,\n"
32925 " size_t content_size);\n"
32930 #: ../src/guestfs-actions.pod:8416
32931 msgid "See also C<guestfs_write>."
32935 #: ../src/guestfs-actions.pod:8425
32936 msgid "guestfs_write_file"
32940 #: ../src/guestfs-actions.pod:8427
32944 " guestfs_write_file (guestfs_h *g,\n"
32945 " const char *path,\n"
32946 " const char *content,\n"
32952 #: ../src/guestfs-actions.pod:8433
32954 "I<This function is deprecated.> In new code, use the L</guestfs_write> call "
32959 #: ../src/guestfs-actions.pod:8458
32960 msgid "guestfs_zegrep"
32964 #: ../src/guestfs-actions.pod:8460
32968 " guestfs_zegrep (guestfs_h *g,\n"
32969 " const char *regex,\n"
32970 " const char *path);\n"
32975 #: ../src/guestfs-actions.pod:8477
32976 msgid "guestfs_zegrepi"
32980 #: ../src/guestfs-actions.pod:8479
32984 " guestfs_zegrepi (guestfs_h *g,\n"
32985 " const char *regex,\n"
32986 " const char *path);\n"
32991 #: ../src/guestfs-actions.pod:8496
32992 msgid "guestfs_zero"
32996 #: ../src/guestfs-actions.pod:8498
33000 " guestfs_zero (guestfs_h *g,\n"
33001 " const char *device);\n"
33006 #: ../src/guestfs-actions.pod:8512
33008 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
33009 "C<guestfs_is_zero_device>"
33013 #: ../src/guestfs-actions.pod:8524
33014 msgid "guestfs_zero_device"
33018 #: ../src/guestfs-actions.pod:8526
33022 " guestfs_zero_device (guestfs_h *g,\n"
33023 " const char *device);\n"
33028 #: ../src/guestfs-actions.pod:8530
33030 "This command writes zeroes over the entire C<device>. Compare with "
33031 "C<guestfs_zero> which just zeroes the first few blocks of a device."
33035 #: ../src/guestfs-actions.pod:8545
33036 msgid "(Added in 1.3.1)"
33040 #: ../src/guestfs-actions.pod:8547
33041 msgid "guestfs_zerofree"
33045 #: ../src/guestfs-actions.pod:8549
33049 " guestfs_zerofree (guestfs_h *g,\n"
33050 " const char *device);\n"
33055 #: ../src/guestfs-actions.pod:8568
33056 msgid "guestfs_zfgrep"
33060 #: ../src/guestfs-actions.pod:8570
33064 " guestfs_zfgrep (guestfs_h *g,\n"
33065 " const char *pattern,\n"
33066 " const char *path);\n"
33071 #: ../src/guestfs-actions.pod:8587
33072 msgid "guestfs_zfgrepi"
33076 #: ../src/guestfs-actions.pod:8589
33080 " guestfs_zfgrepi (guestfs_h *g,\n"
33081 " const char *pattern,\n"
33082 " const char *path);\n"
33087 #: ../src/guestfs-actions.pod:8606
33088 msgid "guestfs_zfile"
33092 #: ../src/guestfs-actions.pod:8608
33096 " guestfs_zfile (guestfs_h *g,\n"
33097 " const char *meth,\n"
33098 " const char *path);\n"
33103 #: ../src/guestfs-actions.pod:8613
33105 "I<This function is deprecated.> In new code, use the L</guestfs_file> call "
33110 #: ../src/guestfs-actions.pod:8625
33112 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
33117 #: ../src/guestfs-actions.pod:8633
33118 msgid "guestfs_zgrep"
33122 #: ../src/guestfs-actions.pod:8635
33126 " guestfs_zgrep (guestfs_h *g,\n"
33127 " const char *regex,\n"
33128 " const char *path);\n"
33133 #: ../src/guestfs-actions.pod:8652
33134 msgid "guestfs_zgrepi"
33138 #: ../src/guestfs-actions.pod:8654
33142 " guestfs_zgrepi (guestfs_h *g,\n"
33143 " const char *regex,\n"
33144 " const char *path);\n"
33149 #: ../src/guestfs-availability.pod:3
33154 #: ../src/guestfs-availability.pod:5
33156 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
33157 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
33158 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
33159 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
33160 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
33164 #: ../src/guestfs-availability.pod:21
33169 #: ../src/guestfs-availability.pod:23
33170 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
33174 #: ../src/guestfs-availability.pod:26
33179 #: ../src/guestfs-availability.pod:28
33180 msgid "The following functions: L</guestfs_grub_install>"
33184 #: ../src/guestfs-availability.pod:31
33189 #: ../src/guestfs-availability.pod:33
33191 "The following functions: L</guestfs_inotify_add_watch> "
33192 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
33193 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
33197 #: ../src/guestfs-availability.pod:41
33198 msgid "B<linuxfsuuid>"
33202 #: ../src/guestfs-availability.pod:43
33204 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
33205 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
33209 #: ../src/guestfs-availability.pod:50
33210 msgid "B<linuxmodules>"
33214 #: ../src/guestfs-availability.pod:52
33215 msgid "The following functions: L</guestfs_modprobe>"
33219 #: ../src/guestfs-availability.pod:55
33220 msgid "B<linuxxattrs>"
33224 #: ../src/guestfs-availability.pod:57
33226 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> "
33227 "L</guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> "
33228 "L</guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> "
33229 "L</guestfs_setxattr>"
33233 #: ../src/guestfs-availability.pod:68
33238 #: ../src/guestfs-availability.pod:70
33240 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
33241 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
33242 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
33246 #: ../src/guestfs-availability.pod:79
33251 #: ../src/guestfs-availability.pod:81
33253 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
33254 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
33255 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
33256 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
33257 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
33258 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
33259 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
33260 "L</guestfs_vgs_full>"
33264 #: ../src/guestfs-availability.pod:104
33269 #: ../src/guestfs-availability.pod:106
33270 msgid "The following functions: L</guestfs_mdadm_create> L</guestfs_mdadm_detail>"
33274 #: ../src/guestfs-availability.pod:110
33279 #: ../src/guestfs-availability.pod:112
33281 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
33282 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
33286 #: ../src/guestfs-availability.pod:118
33291 #: ../src/guestfs-availability.pod:120
33292 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
33296 #: ../src/guestfs-availability.pod:123
33297 msgid "B<ntfsprogs>"
33301 #: ../src/guestfs-availability.pod:125
33303 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
33304 "L</guestfs_ntfsresize_size>"
33308 #: ../src/guestfs-availability.pod:130
33309 msgid "B<realpath>"
33313 #: ../src/guestfs-availability.pod:132
33314 msgid "The following functions: L</guestfs_realpath>"
33318 #: ../src/guestfs-availability.pod:135
33323 #: ../src/guestfs-availability.pod:137
33325 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
33326 "L</guestfs_scrub_freespace>"
33330 #: ../src/guestfs-availability.pod:142
33335 #: ../src/guestfs-availability.pod:144
33336 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
33340 #: ../src/guestfs-availability.pod:148
33345 #: ../src/guestfs-availability.pod:150
33346 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
33350 #: ../src/guestfs-availability.pod:154
33351 msgid "B<zerofree>"
33355 #: ../src/guestfs-availability.pod:156
33356 msgid "The following functions: L</guestfs_zerofree>"
33360 #: ../src/guestfs-structs.pod:1
33361 msgid "guestfs_int_bool"
33365 #: ../src/guestfs-structs.pod:3
33368 " struct guestfs_int_bool {\n"
33376 #: ../src/guestfs-structs.pod:8
33379 " struct guestfs_int_bool_list {\n"
33380 " uint32_t len; /* Number of elements in list. */\n"
33381 " struct guestfs_int_bool *val; /* Elements. */\n"
33387 #: ../src/guestfs-structs.pod:13
33390 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
33391 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
33396 #: ../src/guestfs-structs.pod:16
33397 msgid "guestfs_lvm_pv"
33401 #: ../src/guestfs-structs.pod:18
33404 " struct guestfs_lvm_pv {\n"
33405 " char *pv_name;\n"
33406 " /* The next field is NOT nul-terminated, be careful when printing it: "
33408 " char pv_uuid[32];\n"
33410 " uint64_t pv_size;\n"
33411 " uint64_t dev_size;\n"
33412 " uint64_t pv_free;\n"
33413 " uint64_t pv_used;\n"
33414 " char *pv_attr;\n"
33415 " int64_t pv_pe_count;\n"
33416 " int64_t pv_pe_alloc_count;\n"
33417 " char *pv_tags;\n"
33418 " uint64_t pe_start;\n"
33419 " int64_t pv_mda_count;\n"
33420 " uint64_t pv_mda_free;\n"
33426 #: ../src/guestfs-structs.pod:36
33429 " struct guestfs_lvm_pv_list {\n"
33430 " uint32_t len; /* Number of elements in list. */\n"
33431 " struct guestfs_lvm_pv *val; /* Elements. */\n"
33437 #: ../src/guestfs-structs.pod:41
33440 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
33441 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
33446 #: ../src/guestfs-structs.pod:44
33447 msgid "guestfs_lvm_vg"
33451 #: ../src/guestfs-structs.pod:46
33454 " struct guestfs_lvm_vg {\n"
33455 " char *vg_name;\n"
33456 " /* The next field is NOT nul-terminated, be careful when printing it: "
33458 " char vg_uuid[32];\n"
33460 " char *vg_attr;\n"
33461 " uint64_t vg_size;\n"
33462 " uint64_t vg_free;\n"
33463 " char *vg_sysid;\n"
33464 " uint64_t vg_extent_size;\n"
33465 " int64_t vg_extent_count;\n"
33466 " int64_t vg_free_count;\n"
33467 " int64_t max_lv;\n"
33468 " int64_t max_pv;\n"
33469 " int64_t pv_count;\n"
33470 " int64_t lv_count;\n"
33471 " int64_t snap_count;\n"
33472 " int64_t vg_seqno;\n"
33473 " char *vg_tags;\n"
33474 " int64_t vg_mda_count;\n"
33475 " uint64_t vg_mda_free;\n"
33481 #: ../src/guestfs-structs.pod:69
33484 " struct guestfs_lvm_vg_list {\n"
33485 " uint32_t len; /* Number of elements in list. */\n"
33486 " struct guestfs_lvm_vg *val; /* Elements. */\n"
33492 #: ../src/guestfs-structs.pod:74
33495 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
33496 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
33501 #: ../src/guestfs-structs.pod:77
33502 msgid "guestfs_lvm_lv"
33506 #: ../src/guestfs-structs.pod:79
33509 " struct guestfs_lvm_lv {\n"
33510 " char *lv_name;\n"
33511 " /* The next field is NOT nul-terminated, be careful when printing it: "
33513 " char lv_uuid[32];\n"
33514 " char *lv_attr;\n"
33515 " int64_t lv_major;\n"
33516 " int64_t lv_minor;\n"
33517 " int64_t lv_kernel_major;\n"
33518 " int64_t lv_kernel_minor;\n"
33519 " uint64_t lv_size;\n"
33520 " int64_t seg_count;\n"
33522 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
33523 " float snap_percent;\n"
33524 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
33525 " float copy_percent;\n"
33526 " char *move_pv;\n"
33527 " char *lv_tags;\n"
33528 " char *mirror_log;\n"
33529 " char *modules;\n"
33535 #: ../src/guestfs-structs.pod:101
33538 " struct guestfs_lvm_lv_list {\n"
33539 " uint32_t len; /* Number of elements in list. */\n"
33540 " struct guestfs_lvm_lv *val; /* Elements. */\n"
33546 #: ../src/guestfs-structs.pod:106
33549 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
33550 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
33555 #: ../src/guestfs-structs.pod:111
33558 " struct guestfs_stat {\n"
33562 " int64_t nlink;\n"
33567 " int64_t blksize;\n"
33568 " int64_t blocks;\n"
33569 " int64_t atime;\n"
33570 " int64_t mtime;\n"
33571 " int64_t ctime;\n"
33577 #: ../src/guestfs-structs.pod:127
33580 " struct guestfs_stat_list {\n"
33581 " uint32_t len; /* Number of elements in list. */\n"
33582 " struct guestfs_stat *val; /* Elements. */\n"
33588 #: ../src/guestfs-structs.pod:132
33591 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
33592 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
33597 #: ../src/guestfs-structs.pod:137
33600 " struct guestfs_statvfs {\n"
33601 " int64_t bsize;\n"
33602 " int64_t frsize;\n"
33603 " int64_t blocks;\n"
33604 " int64_t bfree;\n"
33605 " int64_t bavail;\n"
33606 " int64_t files;\n"
33607 " int64_t ffree;\n"
33608 " int64_t favail;\n"
33611 " int64_t namemax;\n"
33617 #: ../src/guestfs-structs.pod:151
33620 " struct guestfs_statvfs_list {\n"
33621 " uint32_t len; /* Number of elements in list. */\n"
33622 " struct guestfs_statvfs *val; /* Elements. */\n"
33628 #: ../src/guestfs-structs.pod:156
33631 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
33632 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
33637 #: ../src/guestfs-structs.pod:159
33638 msgid "guestfs_dirent"
33642 #: ../src/guestfs-structs.pod:161
33645 " struct guestfs_dirent {\n"
33654 #: ../src/guestfs-structs.pod:167
33657 " struct guestfs_dirent_list {\n"
33658 " uint32_t len; /* Number of elements in list. */\n"
33659 " struct guestfs_dirent *val; /* Elements. */\n"
33665 #: ../src/guestfs-structs.pod:172
33668 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
33669 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
33674 #: ../src/guestfs-structs.pod:177
33677 " struct guestfs_version {\n"
33678 " int64_t major;\n"
33679 " int64_t minor;\n"
33680 " int64_t release;\n"
33687 #: ../src/guestfs-structs.pod:184
33690 " struct guestfs_version_list {\n"
33691 " uint32_t len; /* Number of elements in list. */\n"
33692 " struct guestfs_version *val; /* Elements. */\n"
33698 #: ../src/guestfs-structs.pod:189
33701 " void guestfs_free_version (struct guestfs_free_version *);\n"
33702 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
33707 #: ../src/guestfs-structs.pod:192
33708 msgid "guestfs_xattr"
33712 #: ../src/guestfs-structs.pod:194
33715 " struct guestfs_xattr {\n"
33716 " char *attrname;\n"
33717 " /* The next two fields describe a byte array. */\n"
33718 " uint32_t attrval_len;\n"
33719 " char *attrval;\n"
33725 #: ../src/guestfs-structs.pod:201
33728 " struct guestfs_xattr_list {\n"
33729 " uint32_t len; /* Number of elements in list. */\n"
33730 " struct guestfs_xattr *val; /* Elements. */\n"
33736 #: ../src/guestfs-structs.pod:206
33739 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
33740 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
33745 #: ../src/guestfs-structs.pod:209
33746 msgid "guestfs_inotify_event"
33750 #: ../src/guestfs-structs.pod:211
33753 " struct guestfs_inotify_event {\n"
33754 " int64_t in_wd;\n"
33755 " uint32_t in_mask;\n"
33756 " uint32_t in_cookie;\n"
33757 " char *in_name;\n"
33763 #: ../src/guestfs-structs.pod:218
33766 " struct guestfs_inotify_event_list {\n"
33767 " uint32_t len; /* Number of elements in list. */\n"
33768 " struct guestfs_inotify_event *val; /* Elements. */\n"
33774 #: ../src/guestfs-structs.pod:223
33777 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
33778 " void guestfs_free_inotify_event_list (struct "
33779 "guestfs_free_inotify_event_list *);\n"
33784 #: ../src/guestfs-structs.pod:226
33785 msgid "guestfs_partition"
33789 #: ../src/guestfs-structs.pod:228
33792 " struct guestfs_partition {\n"
33793 " int32_t part_num;\n"
33794 " uint64_t part_start;\n"
33795 " uint64_t part_end;\n"
33796 " uint64_t part_size;\n"
33802 #: ../src/guestfs-structs.pod:235
33805 " struct guestfs_partition_list {\n"
33806 " uint32_t len; /* Number of elements in list. */\n"
33807 " struct guestfs_partition *val; /* Elements. */\n"
33813 #: ../src/guestfs-structs.pod:240
33816 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
33817 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
33822 #: ../src/guestfs-structs.pod:243
33823 msgid "guestfs_application"
33827 #: ../src/guestfs-structs.pod:245
33830 " struct guestfs_application {\n"
33831 " char *app_name;\n"
33832 " char *app_display_name;\n"
33833 " int32_t app_epoch;\n"
33834 " char *app_version;\n"
33835 " char *app_release;\n"
33836 " char *app_install_path;\n"
33837 " char *app_trans_path;\n"
33838 " char *app_publisher;\n"
33839 " char *app_url;\n"
33840 " char *app_source_package;\n"
33841 " char *app_summary;\n"
33842 " char *app_description;\n"
33848 #: ../src/guestfs-structs.pod:260
33851 " struct guestfs_application_list {\n"
33852 " uint32_t len; /* Number of elements in list. */\n"
33853 " struct guestfs_application *val; /* Elements. */\n"
33859 #: ../src/guestfs-structs.pod:265
33862 " void guestfs_free_application (struct guestfs_free_application *);\n"
33863 " void guestfs_free_application_list (struct guestfs_free_application_list "
33869 #: ../src/guestfs.pod:5
33870 msgid "guestfs - Library for accessing and modifying virtual machine images"
33874 #: ../src/guestfs.pod:11
33877 " guestfs_h *g = guestfs_create ();\n"
33878 " guestfs_add_drive (g, \"guest.img\");\n"
33879 " guestfs_launch (g);\n"
33880 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
33881 " guestfs_touch (g, \"/hello\");\n"
33882 " guestfs_umount (g, \"/\");\n"
33883 " guestfs_close (g);\n"
33888 #: ../src/guestfs.pod:25
33890 "Libguestfs is a library for accessing and modifying guest disk images. "
33891 "Amongst the things this is good for: making batch configuration changes to "
33892 "guests, getting disk used/free statistics (see also: virt-df), migrating "
33893 "between virtualization systems (see also: virt-p2v), performing partial "
33894 "backups, performing partial guest clones, cloning guests and changing "
33895 "registry/UUID/hostname info, and much else besides."
33899 #: ../src/guestfs.pod:33
33901 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
33902 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
33903 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
33908 #: ../src/guestfs.pod:38
33910 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
33911 "what filesystem is in each LV, etc.). It can also run commands in the "
33912 "context of the guest. Also you can access filesystems over FUSE."
33916 #: ../src/guestfs.pod:43
33918 "Libguestfs is a library that can be linked with C and C++ management "
33919 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
33920 "PHP, Erlang, Haskell or C#). You can also use it from shell scripts or the "
33925 #: ../src/guestfs.pod:48
33927 "You don't need to be root to use libguestfs, although obviously you do need "
33928 "enough permissions to access the disk images."
33932 #: ../src/guestfs.pod:51
33934 "Libguestfs is a large API because it can do many things. For a gentle "
33935 "introduction, please read the L</API OVERVIEW> section next."
33939 #: ../src/guestfs.pod:54
33941 "There are also some example programs in the L<guestfs-examples(3)> manual "
33946 #: ../src/guestfs.pod:57
33947 msgid "API OVERVIEW"
33951 #: ../src/guestfs.pod:59
33953 "This section provides a gentler overview of the libguestfs API. We also try "
33954 "to group API calls together, where that may not be obvious from reading "
33955 "about the individual calls in the main section of this manual."
33959 #: ../src/guestfs.pod:64
33964 #: ../src/guestfs.pod:66
33966 "Before you can use libguestfs calls, you have to create a handle. Then you "
33967 "must add at least one disk image to the handle, followed by launching the "
33968 "handle, then performing whatever operations you want, and finally closing "
33969 "the handle. By convention we use the single letter C<g> for the name of the "
33970 "handle variable, although of course you can use any name you want."
33974 #: ../src/guestfs.pod:73
33975 msgid "The general structure of all libguestfs-using programs looks like this:"
33979 #: ../src/guestfs.pod:76
33982 " guestfs_h *g = guestfs_create ();\n"
33987 #: ../src/guestfs.pod:78
33990 " /* Call guestfs_add_drive additional times if there are\n"
33991 " * multiple disk images.\n"
33993 " guestfs_add_drive (g, \"guest.img\");\n"
33998 #: ../src/guestfs.pod:83
34001 " /* Most manipulation calls won't work until you've launched\n"
34002 " * the handle 'g'. You have to do this _after_ adding drives\n"
34003 " * and _before_ other commands.\n"
34005 " guestfs_launch (g);\n"
34010 #: ../src/guestfs.pod:89
34013 " /* Now you can examine what partitions, LVs etc are available.\n"
34015 " char **partitions = guestfs_list_partitions (g);\n"
34016 " char **logvols = guestfs_lvs (g);\n"
34021 #: ../src/guestfs.pod:94
34024 " /* To access a filesystem in the image, you must mount it.\n"
34026 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34031 #: ../src/guestfs.pod:98
34034 " /* Now you can perform filesystem actions on the guest\n"
34037 " guestfs_touch (g, \"/hello\");\n"
34042 #: ../src/guestfs.pod:103
34045 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
34046 " * it is done automatically when you close the handle. See\n"
34047 " * discussion of autosync in this page.\n"
34049 " guestfs_sync (g);\n"
34054 #: ../src/guestfs.pod:109
34057 " /* Close the handle 'g'. */\n"
34058 " guestfs_close (g);\n"
34063 #: ../src/guestfs.pod:112
34065 "The code above doesn't include any error checking. In real code you should "
34066 "check return values carefully for errors. In general all functions that "
34067 "return integers return C<-1> on error, and all functions that return "
34068 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
34069 "how to handle errors, and consult the documentation for each function call "
34070 "below to see precisely how they return error indications. See "
34071 "L<guestfs-examples(3)> for fully worked examples."
34075 #: ../src/guestfs.pod:121
34076 msgid "DISK IMAGES"
34080 #: ../src/guestfs.pod:123
34082 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
34083 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
34084 "actual block device, or simply an empty file of zeroes that you have created "
34085 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
34090 #: ../src/guestfs.pod:129
34092 "The call you should use in modern code for adding drives is "
34093 "L</guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
34094 "specifying that the format is raw, do:"
34098 #: ../src/guestfs.pod:133
34101 " guestfs_add_drive_opts (g, filename,\n"
34102 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34108 #: ../src/guestfs.pod:137
34109 msgid "You can add a disk read-only using:"
34113 #: ../src/guestfs.pod:139
34116 " guestfs_add_drive_opts (g, filename,\n"
34117 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34118 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
34124 #: ../src/guestfs.pod:144
34126 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
34127 "libguestfs won't modify the file."
34131 #: ../src/guestfs.pod:147
34133 "Be extremely cautious if the disk image is in use, eg. if it is being used "
34134 "by a virtual machine. Adding it read-write will almost certainly cause disk "
34135 "corruption, but adding it read-only is safe."
34139 #: ../src/guestfs.pod:151
34141 "You must add at least one disk image, and you may add multiple disk images. "
34142 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
34143 "first one you added), C</dev/sdb> (for the second one you added), etc."
34147 #: ../src/guestfs.pod:156
34149 "Once L</guestfs_launch> has been called you cannot add any more images. You "
34150 "can call L</guestfs_list_devices> to get a list of the device names, in the "
34151 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
34155 #: ../src/guestfs.pod:161
34160 #: ../src/guestfs.pod:163
34162 "Before you can read or write files, create directories and so on in a disk "
34163 "image that contains filesystems, you have to mount those filesystems using "
34164 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
34165 "a disk image contains (for example) one partition with a filesystem on that "
34166 "partition, then you can mount it directly:"
34170 #: ../src/guestfs.pod:170
34173 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
34178 #: ../src/guestfs.pod:172
34180 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
34181 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
34182 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
34183 "that these are libguestfs virtual devices, and are nothing to do with host "
34188 #: ../src/guestfs.pod:178
34190 "If you are given a disk image and you don't know what it contains then you "
34191 "have to find out. Libguestfs can do that too: use "
34192 "L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions "
34193 "and LVs, and either try mounting each to see what is mountable, or else "
34194 "examine them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
34195 "filesystems, use L</guestfs_list_filesystems>."
34199 #: ../src/guestfs.pod:186
34201 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
34202 "L</INSPECTION> below). But you might find it easier to look at higher level "
34203 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
34207 #: ../src/guestfs.pod:191
34209 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
34210 "several other variations of the C<guestfs_mount_*> call."
34214 #: ../src/guestfs.pod:194
34215 msgid "FILESYSTEM ACCESS AND MODIFICATION"
34219 #: ../src/guestfs.pod:196
34221 "The majority of the libguestfs API consists of fairly low-level calls for "
34222 "accessing and modifying the files, directories, symlinks etc on mounted "
34223 "filesystems. There are over a hundred such calls which you can find listed "
34224 "in detail below in this man page, and we don't even pretend to cover them "
34225 "all in this overview."
34229 #: ../src/guestfs.pod:202
34231 "Specify filenames as full paths, starting with C<\"/\"> and including the "
34236 #: ../src/guestfs.pod:205
34238 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
34239 "the file called C<\"etc/passwd\"> then you could do:"
34243 #: ../src/guestfs.pod:208
34246 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
34251 #: ../src/guestfs.pod:210
34253 "This would return C<data> as a newly allocated buffer containing the full "
34254 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
34255 "or C<NULL> if there was an error."
34259 #: ../src/guestfs.pod:214
34261 "As another example, to create a top-level directory on that filesystem "
34262 "called C<\"var\"> you would do:"
34266 #: ../src/guestfs.pod:217
34269 " guestfs_mkdir (g, \"/var\");\n"
34274 #: ../src/guestfs.pod:219
34275 msgid "To create a symlink you could do:"
34279 #: ../src/guestfs.pod:221
34282 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
34283 " \"/etc/rc3.d/S30portmap\");\n"
34288 #: ../src/guestfs.pod:224
34290 "Libguestfs will reject attempts to use relative paths and there is no "
34291 "concept of a current working directory."
34295 #: ../src/guestfs.pod:227
34297 "Libguestfs can return errors in many situations: for example if the "
34298 "filesystem isn't writable, or if a file or directory that you requested "
34299 "doesn't exist. If you are using the C API (documented here) you have to "
34300 "check for those error conditions after each call. (Other language bindings "
34301 "turn these errors into exceptions)."
34305 #: ../src/guestfs.pod:233
34307 "File writes are affected by the per-handle umask, set by calling "
34308 "L</guestfs_umask> and defaulting to 022. See L</UMASK>."
34312 #: ../src/guestfs.pod:236
34313 msgid "PARTITIONING"
34317 #: ../src/guestfs.pod:238
34319 "Libguestfs contains API calls to read, create and modify partition tables on "
34324 #: ../src/guestfs.pod:241
34326 "In the common case where you want to create a single partition covering the "
34327 "whole disk, you should use the L</guestfs_part_disk> call:"
34331 #: ../src/guestfs.pod:245
34334 " const char *parttype = \"mbr\";\n"
34335 " if (disk_is_larger_than_2TB)\n"
34336 " parttype = \"gpt\";\n"
34337 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
34342 #: ../src/guestfs.pod:250
34344 "Obviously this effectively wipes anything that was on that disk image "
34349 #: ../src/guestfs.pod:253
34354 #: ../src/guestfs.pod:255
34356 "Libguestfs provides access to a large part of the LVM2 API, such as "
34357 "L</guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense "
34358 "unless you familiarize yourself with the concepts of physical volumes, "
34359 "volume groups and logical volumes."
34363 #: ../src/guestfs.pod:260
34365 "This author strongly recommends reading the LVM HOWTO, online at "
34366 "L<http://tldp.org/HOWTO/LVM-HOWTO/>."
34370 #: ../src/guestfs.pod:263
34371 msgid "DOWNLOADING"
34375 #: ../src/guestfs.pod:265
34377 "Use L</guestfs_cat> to download small, text only files. This call is "
34378 "limited to files which are less than 2 MB and which cannot contain any ASCII "
34379 "NUL (C<\\0>) characters. However the API is very simple to use."
34383 #: ../src/guestfs.pod:269
34385 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
34386 "bit data, since it returns a (pointer, size) pair. However it is still "
34387 "limited to \"small\" files, less than 2 MB."
34391 #: ../src/guestfs.pod:273
34393 "L</guestfs_download> can be used to download any file, with no limits on "
34394 "content or size (even files larger than 4 GB)."
34398 #: ../src/guestfs.pod:276
34399 msgid "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
34403 #: ../src/guestfs.pod:279
34408 #: ../src/guestfs.pod:281
34410 "It's often the case that you want to write a file or files to the disk "
34415 #: ../src/guestfs.pod:284
34417 "To write a small file with fixed content, use L</guestfs_write>. To create "
34418 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or "
34419 "L</guestfs_fallocate64> (with all disk blocks allocated). There are a "
34420 "variety of other functions for creating test files, for example "
34421 "L</guestfs_fill> and L</guestfs_fill_pattern>."
34425 #: ../src/guestfs.pod:290
34427 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
34428 "file content or size (even files larger than 4 GB)."
34432 #: ../src/guestfs.pod:293
34433 msgid "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
34437 #: ../src/guestfs.pod:295
34439 "However the fastest way to upload I<large numbers of arbitrary files> is to "
34440 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and "
34441 "L<mkisofs(8)>), then attach this using L</guestfs_add_drive_ro>. If you add "
34442 "the drive in a predictable way (eg. adding it last after all other drives) "
34443 "then you can get the device name from L</guestfs_list_devices> and mount it "
34444 "directly using L</guestfs_mount_ro>. Note that squashfs images are "
34445 "sometimes non-portable between kernel versions, and they don't support "
34446 "labels or UUIDs. If you want to pre-build an image or you need to mount it "
34447 "using a label or UUID, use an ISO image instead."
34451 #: ../src/guestfs.pod:306
34456 #: ../src/guestfs.pod:308
34458 "There are various different commands for copying between files and devices "
34459 "and in and out of the guest filesystem. These are summarised in the table "
34464 #: ../src/guestfs.pod:314
34465 msgid "B<file> to B<file>"
34469 #: ../src/guestfs.pod:316
34471 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
34472 "directories recursively."
34476 #: ../src/guestfs.pod:319
34477 msgid "To copy part of a file (offset and size) use L</guestfs_copy_file_to_file>."
34481 #: ../src/guestfs.pod:322
34482 msgid "B<file> to B<device>"
34486 #: ../src/guestfs.pod:324
34487 msgid "B<device> to B<file>"
34491 #: ../src/guestfs.pod:326
34492 msgid "B<device> to B<device>"
34496 #: ../src/guestfs.pod:328
34498 "Use L</guestfs_copy_file_to_device>, L</guestfs_copy_device_to_file>, or "
34499 "L</guestfs_copy_device_to_device>."
34503 #: ../src/guestfs.pod:331
34504 msgid "Example: duplicate the contents of an LV:"
34508 #: ../src/guestfs.pod:333
34511 " guestfs_copy_device_to_device (g,\n"
34512 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
34513 " /* -1 marks the end of the list of optional parameters */\n"
34519 #: ../src/guestfs.pod:338
34521 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
34522 "(C</dev/VG/Original>). To copy less than the whole source device, use the "
34523 "optional C<size> parameter:"
34527 #: ../src/guestfs.pod:342
34530 " guestfs_copy_device_to_device (g,\n"
34531 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
34532 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, 10000,\n"
34538 #: ../src/guestfs.pod:347
34539 msgid "B<file on the host> to B<file or device>"
34543 #: ../src/guestfs.pod:349
34544 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
34548 #: ../src/guestfs.pod:351
34549 msgid "B<file or device> to B<file on the host>"
34553 #: ../src/guestfs.pod:353
34554 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
34558 #: ../src/guestfs.pod:357
34559 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
34563 #: ../src/guestfs.pod:359
34565 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, "
34566 "L</guestfs_tar_out> etc appear to only take filenames as arguments, so it "
34567 "appears you can only upload and download to files. However many Un*x-like "
34568 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, "
34569 "C</dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, "
34570 "stderr, and arbitrary file descriptor N."
34574 #: ../src/guestfs.pod:367
34575 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
34579 #: ../src/guestfs.pod:370
34582 " guestfs_download (g, filename, \"/dev/stdout\");\n"
34587 #: ../src/guestfs.pod:372
34588 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
34592 #: ../src/guestfs.pod:374
34595 " char devfd[64];\n"
34596 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
34597 " guestfs_tar_out (g, \"/\", devfd);\n"
34602 #: ../src/guestfs.pod:378
34603 msgid "LISTING FILES"
34607 #: ../src/guestfs.pod:380
34609 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
34610 "L<guestfish(1)>-equivalent command C<ll>)."
34614 #: ../src/guestfs.pod:383
34616 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
34617 "programs, as a flat list of strings."
34621 #: ../src/guestfs.pod:386
34623 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
34624 "directory, plus additional information about each one. It is more "
34625 "equivalent to using the L<readdir(3)> call on a local filesystem."
34629 #: ../src/guestfs.pod:390
34631 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list "
34636 #: ../src/guestfs.pod:393
34637 msgid "RUNNING COMMANDS"
34641 #: ../src/guestfs.pod:395
34643 "Although libguestfs is primarily an API for manipulating files inside guest "
34644 "images, we also provide some limited facilities for running commands inside "
34649 #: ../src/guestfs.pod:399
34650 msgid "There are many limitations to this:"
34654 #: ../src/guestfs.pod:405
34656 "The kernel version that the command runs under will be different from what "
34661 #: ../src/guestfs.pod:410
34663 "If the command needs to communicate with daemons, then most likely they "
34664 "won't be running."
34668 #: ../src/guestfs.pod:415
34669 msgid "The command will be running in limited memory."
34673 #: ../src/guestfs.pod:419
34675 "The network may not be available unless you enable it (see "
34676 "L</guestfs_set_network>)."
34680 #: ../src/guestfs.pod:424
34681 msgid "Only supports Linux guests (not Windows, BSD, etc)."
34685 #: ../src/guestfs.pod:428
34686 msgid "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
34690 #: ../src/guestfs.pod:433
34692 "For SELinux guests, you may need to enable SELinux and load policy first. "
34693 "See L</SELINUX> in this manpage."
34697 #: ../src/guestfs.pod:438
34699 "I<Security:> It is not safe to run commands from untrusted, possibly "
34700 "malicious guests. These commands may attempt to exploit your program by "
34701 "sending unexpected output. They could also try to exploit the Linux kernel "
34702 "or qemu provided by the libguestfs appliance. They could use the network "
34703 "provided by the libguestfs appliance to bypass ordinary network partitions "
34704 "and firewalls. They could use the elevated privileges or different SELinux "
34705 "context of your program to their advantage."
34709 #: ../src/guestfs.pod:447
34711 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
34712 "(a script which runs when the guest next boots normally), and to have this "
34713 "script run the commands you want in the normal context of the running guest, "
34714 "network security and so on. For information about other security issues, "
34715 "see L</SECURITY>."
34719 #: ../src/guestfs.pod:455
34721 "The two main API calls to run commands are L</guestfs_command> and "
34722 "L</guestfs_sh> (there are also variations)."
34726 #: ../src/guestfs.pod:458
34728 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
34729 "shell globs, redirections, etc will work."
34733 #: ../src/guestfs.pod:461
34734 msgid "CONFIGURATION FILES"
34738 #: ../src/guestfs.pod:463
34740 "To read and write configuration files in Linux guest filesystems, we "
34741 "strongly recommend using Augeas. For example, Augeas understands how to "
34742 "read and write, say, a Linux shadow password file or X.org configuration "
34743 "file, and so avoids you having to write that code."
34747 #: ../src/guestfs.pod:468
34749 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
34750 "document Augeas itself here because there is excellent documentation on the "
34751 "L<http://augeas.net/> website."
34755 #: ../src/guestfs.pod:472
34757 "If you don't want to use Augeas (you fool!) then try calling "
34758 "L</guestfs_read_lines> to get the file as a list of lines which you can "
34763 #: ../src/guestfs.pod:476
34768 #: ../src/guestfs.pod:478
34770 "We support SELinux guests. To ensure that labeling happens correctly in "
34771 "SELinux guests, you need to enable SELinux and load the guest's policy:"
34775 #: ../src/guestfs.pod:486
34776 msgid "Before launching, do:"
34780 #: ../src/guestfs.pod:488
34783 " guestfs_set_selinux (g, 1);\n"
34788 #: ../src/guestfs.pod:492
34790 "After mounting the guest's filesystem(s), load the policy. This is best "
34791 "done by running the L<load_policy(8)> command in the guest itself:"
34795 #: ../src/guestfs.pod:496
34798 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
34803 #: ../src/guestfs.pod:498
34805 "(Older versions of C<load_policy> require you to specify the name of the "
34810 #: ../src/guestfs.pod:503
34812 "Optionally, set the security context for the API. The correct security "
34813 "context to use can only be known by inspecting the guest. As an example:"
34817 #: ../src/guestfs.pod:507
34820 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
34825 #: ../src/guestfs.pod:511
34826 msgid "This will work for running commands and editing existing files."
34830 #: ../src/guestfs.pod:513
34832 "When new files are created, you may need to label them explicitly, for "
34833 "example by running the external command C<restorecon pathname>."
34837 #: ../src/guestfs.pod:517
34842 #: ../src/guestfs.pod:519
34844 "Certain calls are affected by the current file mode creation mask (the "
34845 "\"umask\"). In particular ones which create files or directories, such as "
34846 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
34847 "either the default mode that the file is created with or modifies the mode "
34852 #: ../src/guestfs.pod:525
34854 "The default umask is C<022>, so files are created with modes such as C<0644> "
34855 "and directories with C<0755>."
34859 #: ../src/guestfs.pod:528
34861 "There are two ways to avoid being affected by umask. Either set umask to 0 "
34862 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
34863 "L</guestfs_chmod> after creating each file or directory."
34867 #: ../src/guestfs.pod:532
34868 msgid "For more information about umask, see L<umask(2)>."
34872 #: ../src/guestfs.pod:536
34874 "Libguestfs allows you to access Linux guests which have been encrypted using "
34875 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
34876 "standard. This includes nearly all whole disk encryption systems used by "
34877 "modern Linux guests."
34881 #: ../src/guestfs.pod:542
34883 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
34884 "returns the string C<crypto_LUKS>)."
34888 #: ../src/guestfs.pod:545
34890 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
34891 "will require the passphrase!"
34895 #: ../src/guestfs.pod:548
34897 "Opening a LUKS device creates a new device mapper device called "
34898 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
34899 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
34900 "decrypted from and encrypted to the underlying block device respectively."
34904 #: ../src/guestfs.pod:554
34906 "LVM volume groups on the device can be made visible by calling "
34907 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
34908 "volume(s) can now be mounted in the usual way."
34912 #: ../src/guestfs.pod:558
34914 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
34915 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
34916 "[\"/dev/VG\"])>. Then close the mapper device by calling "
34917 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
34918 "underlying encrypted block device)."
34922 #: ../src/guestfs.pod:565
34927 #: ../src/guestfs.pod:567
34929 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
34930 "contains operating systems, an install CD or a live CD. (These APIs used to "
34931 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
34932 "version 1.5.3 the most frequently used part of this library has been "
34933 "rewritten in C and moved into the core code)."
34937 #: ../src/guestfs.pod:574
34939 "Add all disks belonging to the unknown virtual machine and call "
34940 "L</guestfs_launch> in the usual way."
34944 #: ../src/guestfs.pod:577
34946 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
34947 "and certain heuristics, and returns a list of operating systems that were "
34948 "found. An empty list means none were found. A single element is the root "
34949 "filesystem of the operating system. For dual- or multi-boot guests, "
34950 "multiple roots can be returned, each one corresponding to a separate "
34951 "operating system. (Multi-boot virtual machines are extremely rare in the "
34952 "world of virtualization, but since this scenario can happen, we have built "
34953 "libguestfs to deal with it.)"
34957 #: ../src/guestfs.pod:586
34959 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
34960 "to get additional details about that operating system. For example, call "
34961 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
34962 "Windows and Linux-based operating systems respectively."
34966 #: ../src/guestfs.pod:592
34968 "Un*x-like and Linux-based operating systems usually consist of several "
34969 "filesystems which are mounted at boot time (for example, a separate boot "
34970 "partition mounted on C</boot>). The inspection rules are able to detect how "
34971 "filesystems correspond to mount points. Call "
34972 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
34973 "hash table like this example:"
34977 #: ../src/guestfs.pod:599
34980 " /boot => /dev/sda1\n"
34981 " / => /dev/vg_guest/lv_root\n"
34982 " /usr => /dev/vg_guest/lv_usr\n"
34987 #: ../src/guestfs.pod:603
34989 "The caller can then make calls to L</guestfs_mount_options> to mount the "
34990 "filesystems as suggested."
34994 #: ../src/guestfs.pod:606
34996 "Be careful to mount filesystems in the right order (eg. C</> before "
34997 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
35002 #: ../src/guestfs.pod:610
35004 "Inspection currently only works for some common operating systems. "
35005 "Contributors are welcome to send patches for other operating systems that we "
35006 "currently cannot detect."
35010 #: ../src/guestfs.pod:614
35012 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
35013 "for more details. The L</guestfs_inspect_os> function just ignores any "
35014 "encrypted devices."
35018 #: ../src/guestfs.pod:618
35020 "A note on the implementation: The call L</guestfs_inspect_os> performs "
35021 "inspection and caches the results in the guest handle. Subsequent calls to "
35022 "C<guestfs_inspect_get_*> return this cached information, but I<do not> "
35023 "re-read the disks. If you change the content of the guest disks, you can "
35024 "redo inspection by calling L</guestfs_inspect_os> again. "
35025 "(L</guestfs_inspect_list_applications> works a little differently from the "
35026 "other calls and does read the disks. See documentation for that function "
35031 #: ../src/guestfs.pod:627
35032 msgid "INSPECTING INSTALL DISKS"
35036 #: ../src/guestfs.pod:629
35038 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
35043 #: ../src/guestfs.pod:632
35045 "Call L</guestfs_inspect_get_format> to return the format of the operating "
35046 "system, which currently can be C<installed> (a regular operating system) or "
35047 "C<installer> (some sort of install disk)."
35051 #: ../src/guestfs.pod:636
35053 "Further information is available about the operating system that can be "
35054 "installed using the regular inspection APIs like "
35055 "L</guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> "
35060 #: ../src/guestfs.pod:641
35062 "Some additional information specific to installer disks is also available "
35063 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and "
35064 "L</guestfs_inspect_is_multipart> calls."
35068 #: ../src/guestfs.pod:646
35069 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
35073 #: ../src/guestfs.pod:648
35075 "Libguestfs can mount NTFS partitions. It does this using the "
35076 "L<http://www.ntfs-3g.org/> driver."
35080 #: ../src/guestfs.pod:651
35081 msgid "DRIVE LETTERS AND PATHS"
35085 #: ../src/guestfs.pod:653
35087 "DOS and Windows still use drive letters, and the filesystems are always "
35088 "treated as case insensitive by Windows itself, and therefore you might find "
35089 "a Windows configuration file referring to a path like "
35090 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
35091 "that directory might be referred to as C</WINDOWS/System32>."
35095 #: ../src/guestfs.pod:659
35097 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
35098 "L</guestfs_inspect_get_drive_mappings>)"
35102 #: ../src/guestfs.pod:662
35104 "Dealing with separator characters (backslash vs forward slash) is outside "
35105 "the scope of libguestfs, but usually a simple character replacement will "
35110 #: ../src/guestfs.pod:666
35112 "To resolve the case insensitivity of paths, call "
35113 "L</guestfs_case_sensitive_path>."
35117 #: ../src/guestfs.pod:669
35118 msgid "ACCESSING THE WINDOWS REGISTRY"
35122 #: ../src/guestfs.pod:671
35124 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
35125 "files, through the library C<hivex> which is part of the libguestfs project "
35126 "although ships as a separate tarball. You have to locate and download the "
35127 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
35128 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
35129 "L<virt-win-reg(1)> for more help on this issue."
35133 #: ../src/guestfs.pod:679
35134 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
35138 #: ../src/guestfs.pod:681
35140 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
35141 "provide something which looks like a Linux symlink. The way it tries to do "
35142 "the rewriting is described here:"
35146 #: ../src/guestfs.pod:685
35147 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-symbolic-links/>"
35151 #: ../src/guestfs.pod:687
35153 "The essential problem is that ntfs-3g simply does not have enough "
35154 "information to do a correct job. NTFS links can contain drive letters and "
35155 "references to external device GUIDs that ntfs-3g has no way of resolving. "
35156 "It is almost certainly the case that libguestfs callers should ignore what "
35157 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
35161 #: ../src/guestfs.pod:694
35163 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use "
35164 "L</guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
35165 "attribute, and read the raw reparse data from that (you can find the format "
35166 "documented in various places around the web)."
35170 #: ../src/guestfs.pod:699
35171 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
35175 #: ../src/guestfs.pod:701
35177 "There are other useful extended attributes that can be read from ntfs-3g "
35178 "filesystems (using L</guestfs_getxattr>). See:"
35182 #: ../src/guestfs.pod:704
35183 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
35187 #: ../src/guestfs.pod:706
35188 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
35192 #: ../src/guestfs.pod:708
35194 "Although we don't want to discourage you from using the C API, we will "
35195 "mention here that the same API is also available in other languages."
35199 #: ../src/guestfs.pod:711
35201 "The API is broadly identical in all supported languages. This means that "
35202 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
35203 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
35204 "OCaml. In other words, a straightforward, predictable isomorphism between "
35209 #: ../src/guestfs.pod:717
35211 "Error messages are automatically transformed into exceptions if the language "
35216 #: ../src/guestfs.pod:720
35218 "We don't try to \"object orientify\" parts of the API in OO languages, "
35219 "although contributors are welcome to write higher level APIs above what we "
35220 "provide in their favourite languages if they wish."
35224 #: ../src/guestfs.pod:726
35229 #: ../src/guestfs.pod:728
35231 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
35232 "identical to the C API. C++ classes and exceptions are not used."
35236 #: ../src/guestfs.pod:732
35241 #: ../src/guestfs.pod:734
35243 "The C# bindings are highly experimental. Please read the warnings at the "
35244 "top of C<csharp/Libguestfs.cs>."
35248 #: ../src/guestfs.pod:737
35253 #: ../src/guestfs.pod:739
35254 msgid "See L<guestfs-erlang(3)>."
35258 #: ../src/guestfs.pod:741
35263 #: ../src/guestfs.pod:743
35265 "This is the only language binding that is working but incomplete. Only "
35266 "calls which return simple integers have been bound in Haskell, and we are "
35267 "looking for help to complete this binding."
35271 #: ../src/guestfs.pod:747
35276 #: ../src/guestfs.pod:749
35278 "Full documentation is contained in the Javadoc which is distributed with "
35279 "libguestfs. For examples, see L<guestfs-java(3)>."
35283 #: ../src/guestfs.pod:752
35288 #: ../src/guestfs.pod:754
35289 msgid "See L<guestfs-ocaml(3)>."
35293 #: ../src/guestfs.pod:756
35298 #: ../src/guestfs.pod:758
35299 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
35303 #: ../src/guestfs.pod:760
35308 #: ../src/guestfs.pod:762
35310 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
35311 "the php-libguestfs package for your distribution."
35315 #: ../src/guestfs.pod:765
35316 msgid "The PHP binding only works correctly on 64 bit machines."
35320 #: ../src/guestfs.pod:767
35325 #: ../src/guestfs.pod:769
35326 msgid "See L<guestfs-python(3)>."
35330 #: ../src/guestfs.pod:771
35335 #: ../src/guestfs.pod:773
35336 msgid "See L<guestfs-ruby(3)>."
35340 #: ../src/guestfs.pod:775
35341 msgid "B<shell scripts>"
35345 #: ../src/guestfs.pod:777
35346 msgid "See L<guestfish(1)>."
35350 #: ../src/guestfs.pod:781
35351 msgid "LIBGUESTFS GOTCHAS"
35355 #: ../src/guestfs.pod:783
35357 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
35358 "system [...] that works in the way it is documented but is counterintuitive "
35359 "and almost invites mistakes.\""
35363 #: ../src/guestfs.pod:787
35365 "Since we developed libguestfs and the associated tools, there are several "
35366 "things we would have designed differently, but are now stuck with for "
35367 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
35368 "release, you can expect these to change. Beware of them."
35372 #: ../src/guestfs.pod:795
35373 msgid "Autosync / forgetting to sync."
35377 #: ../src/guestfs.pod:797
35379 "I<Update:> Autosync is enabled by default for all API users starting from "
35380 "libguestfs 1.5.24. This section only applies to older versions."
35384 #: ../src/guestfs.pod:800
35386 "When modifying a filesystem from C or another language, you B<must> unmount "
35387 "all filesystems and call L</guestfs_sync> explicitly before you close the "
35388 "libguestfs handle. You can also call:"
35392 #: ../src/guestfs.pod:804
35395 " guestfs_set_autosync (g, 1);\n"
35400 #: ../src/guestfs.pod:806
35402 "to have the unmount/sync done automatically for you when the handle 'g' is "
35403 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
35408 #: ../src/guestfs.pod:810
35410 "If you forget to do this, then it is entirely possible that your changes "
35411 "won't be written out, or will be partially written, or (very rarely) that "
35412 "you'll get disk corruption."
35416 #: ../src/guestfs.pod:814
35418 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
35419 "guestfish scripts that forget to sync will work just fine, which can make "
35420 "this very puzzling if you are trying to debug a problem."
35424 #: ../src/guestfs.pod:818
35425 msgid "Mount option C<-o sync> should not be the default."
35429 #: ../src/guestfs.pod:820
35431 "I<Update:> L</guestfs_mount> no longer adds any options starting from "
35432 "libguestfs 1.13.16. This section only applies to older versions."
35436 #: ../src/guestfs.pod:823
35438 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
35439 "However C<-o sync> does not add any reliability benefit, but does have a "
35440 "very large performance impact."
35444 #: ../src/guestfs.pod:827
35446 "The work around is to use L</guestfs_mount_options> and set the mount "
35447 "options that you actually want to use."
35451 #: ../src/guestfs.pod:830
35452 msgid "Read-only should be the default."
35456 #: ../src/guestfs.pod:832
35458 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
35459 "specify I<--rw> if you want to make changes to the image."
35463 #: ../src/guestfs.pod:835
35464 msgid "This would reduce the potential to corrupt live VM images."
35468 #: ../src/guestfs.pod:837
35470 "Note that many filesystems change the disk when you just mount and unmount, "
35471 "even if you didn't perform any writes. You need to use "
35472 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
35476 #: ../src/guestfs.pod:841
35477 msgid "guestfish command line is hard to use."
35481 #: ../src/guestfs.pod:843
35483 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
35484 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
35485 "exist, so it fails. In earlier versions of guestfish the error message was "
35486 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
35487 "we should have used C<guestfish -c command> to run commands."
35491 #: ../src/guestfs.pod:850
35492 msgid "guestfish megabyte modifiers don't work right on all commands"
35496 #: ../src/guestfs.pod:852
35498 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
35499 "other modifiers). What guestfish actually does is to multiply the number "
35500 "part by the modifier part and pass the result to the C API. However this "
35501 "doesn't work for a few APIs which aren't expecting bytes, but are already "
35502 "expecting some other unit (eg. megabytes)."
35506 #: ../src/guestfs.pod:859
35507 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
35511 #: ../src/guestfs.pod:861
35514 " lvcreate LV VG 100M\n"
35519 #: ../src/guestfs.pod:863
35521 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
35522 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
35523 "megabytes * megabytes) logical volume. The error message you get from this "
35524 "is also a little obscure."
35528 #: ../src/guestfs.pod:868
35530 "This could be fixed in the generator by specially marking parameters and "
35531 "return values which take bytes or other units."
35535 #: ../src/guestfs.pod:871
35536 msgid "Ambiguity between devices and paths"
35540 #: ../src/guestfs.pod:873
35542 "There is a subtle ambiguity in the API between a device name "
35543 "(eg. C</dev/sdb2>) and a similar pathname. A file might just happen to be "
35544 "called C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
35548 #: ../src/guestfs.pod:878
35550 "In the current API we usually resolve this ambiguity by having two separate "
35551 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
35552 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
35553 "detecting if the path supplied begins with C</dev/>."
35557 #: ../src/guestfs.pod:884
35559 "To avoid both the ambiguity and the need to duplicate some calls, we could "
35560 "make paths/devices into structured names. One way to do this would be to "
35561 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
35562 "aspect of grub. Another way would be to use a structured type, equivalent "
35563 "to this OCaml type:"
35567 #: ../src/guestfs.pod:890
35570 " type path = Path of string | Device of int | Partition of int * int\n"
35575 #: ../src/guestfs.pod:892
35576 msgid "which would allow you to pass arguments like:"
35580 #: ../src/guestfs.pod:894
35583 " Path \"/foo/bar\"\n"
35584 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
35585 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
35586 " Path \"/dev/sdb2\" (* not a device *)\n"
35591 #: ../src/guestfs.pod:899
35593 "As you can see there are still problems to resolve even with this "
35594 "representation. Also consider how it might work in guestfish."
35598 #: ../src/guestfs.pod:904
35599 msgid "KEYS AND PASSPHRASES"
35603 #: ../src/guestfs.pod:906
35605 "Certain libguestfs calls take a parameter that contains sensitive key "
35606 "material, passed in as a C string."
35610 #: ../src/guestfs.pod:909
35612 "In the future we would hope to change the libguestfs implementation so that "
35613 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
35614 "swap. However this is I<not> done at the moment, because of the complexity "
35615 "of such an implementation."
35619 #: ../src/guestfs.pod:914
35621 "Therefore you should be aware that any key parameter you pass to libguestfs "
35622 "might end up being written out to the swap partition. If this is a concern, "
35623 "scrub the swap partition or don't use libguestfs on encrypted devices."
35627 #: ../src/guestfs.pod:919
35628 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
35632 #: ../src/guestfs.pod:921
35634 "All high-level libguestfs actions are synchronous. If you want to use "
35635 "libguestfs asynchronously then you must create a thread."
35639 #: ../src/guestfs.pod:924
35641 "Only use the handle from a single thread. Either use the handle exclusively "
35642 "from one thread, or provide your own mutex so that two threads cannot issue "
35643 "calls on the same handle at the same time."
35647 #: ../src/guestfs.pod:928
35649 "See the graphical program guestfs-browser for one possible architecture for "
35650 "multithreaded programs using libvirt and libguestfs."
35654 #: ../src/guestfs.pod:931
35659 #: ../src/guestfs.pod:933
35661 "Libguestfs needs a supermin appliance, which it finds by looking along an "
35666 #: ../src/guestfs.pod:936
35668 "By default it looks for these in the directory C<$libdir/guestfs> "
35669 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
35673 #: ../src/guestfs.pod:939
35675 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
35676 "to change the directories that libguestfs will search in. The value is a "
35677 "colon-separated list of paths. The current directory is I<not> searched "
35678 "unless the path contains an empty element or C<.>. For example "
35679 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
35680 "then C</usr/lib/guestfs>."
35684 #: ../src/guestfs.pod:946
35685 msgid "QEMU WRAPPERS"
35689 #: ../src/guestfs.pod:948
35691 "If you want to compile your own qemu, run qemu from a non-standard location, "
35692 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
35697 #: ../src/guestfs.pod:952
35699 "There is one important rule to remember: you I<must C<exec qemu>> as the "
35700 "last command in the shell script (so that qemu replaces the shell and "
35701 "becomes the direct child of the libguestfs-using program). If you don't do "
35702 "this, then the qemu process won't be cleaned up correctly."
35706 #: ../src/guestfs.pod:957
35708 "Here is an example of a wrapper, where I have built my own copy of qemu from "
35713 #: ../src/guestfs.pod:960
35717 " qemudir=/home/rjones/d/qemu\n"
35718 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
35724 #: ../src/guestfs.pod:964
35726 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
35727 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
35732 #: ../src/guestfs.pod:968
35735 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
35740 #: ../src/guestfs.pod:970
35742 "Note that libguestfs also calls qemu with the -help and -version options in "
35743 "order to determine features."
35747 #: ../src/guestfs.pod:973
35749 "Wrappers can also be used to edit the options passed to qemu. In the "
35750 "following example, the C<-machine ...> option (C<-machine> and the following "
35751 "argument) are removed from the command line and replaced with C<-machine "
35752 "pc,accel=tcg>. The while loop iterates over the options until it finds the "
35753 "right one to remove, putting the remaining options into the C<args> array."
35757 #: ../src/guestfs.pod:982
35761 " while [ $# -gt 0 ]; do\n"
35762 " case \"$1\" in\n"
35766 " args[i]=\"$1\"\n"
35775 #: ../src/guestfs.pod:994
35778 " exec qemu-kvm -machine pc,accel=tcg \"${args[@]}\"\n"
35783 #: ../src/guestfs.pod:996
35784 msgid "ATTACHING TO RUNNING DAEMONS"
35788 #: ../src/guestfs.pod:998
35790 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
35791 "babies. Use with caution."
35795 #: ../src/guestfs.pod:1001
35797 "I<Note (2):> This section explains how to attach to a running daemon from a "
35798 "low level perspective. For most users, simply using virt tools such as "
35799 "L<guestfish(1)> with the I<--live> option will \"just work\"."
35803 #: ../src/guestfs.pod:1005
35804 msgid "Using guestfs_set_attach_method"
35808 #: ../src/guestfs.pod:1007
35810 "By calling L</guestfs_set_attach_method> you can change how the library "
35811 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read "
35812 "L</ARCHITECTURE> for some background)."
35816 #: ../src/guestfs.pod:1011
35818 "The normal attach method is C<appliance>, where a small appliance is created "
35819 "containing the daemon, and then the library connects to this."
35823 #: ../src/guestfs.pod:1014
35825 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
35826 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
35827 "daemon over the Unix domain socket."
35831 #: ../src/guestfs.pod:1018
35833 "The normal use for this is to connect to a running virtual machine that "
35834 "contains a C<guestfsd> daemon, and send commands so you can read and write "
35835 "files inside the live virtual machine."
35839 #: ../src/guestfs.pod:1022
35840 msgid "Using guestfs_add_domain with live flag"
35844 #: ../src/guestfs.pod:1024
35846 "L</guestfs_add_domain> provides some help for getting the correct attach "
35847 "method. If you pass the C<live> option to this function, then (if the "
35848 "virtual machine is running) it will examine the libvirt XML looking for a "
35849 "virtio-serial channel to connect to:"
35853 #: ../src/guestfs.pod:1030
35860 " <channel type='unix'>\n"
35861 " <source mode='bind' path='/path/to/socket'/>\n"
35862 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
35871 #: ../src/guestfs.pod:1042
35873 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
35874 "method to C<unix:/path/to/socket>."
35878 #: ../src/guestfs.pod:1045
35880 "Some of the libguestfs tools (including guestfish) support a I<--live> "
35881 "option which is passed through to L</guestfs_add_domain> thus allowing you "
35882 "to attach to and modify live virtual machines."
35886 #: ../src/guestfs.pod:1049
35888 "The virtual machine needs to have been set up beforehand so that it has the "
35889 "virtio-serial channel and so that guestfsd is running inside it."
35893 #: ../src/guestfs.pod:1053
35894 msgid "ABI GUARANTEE"
35898 #: ../src/guestfs.pod:1055
35900 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
35901 "actions as outlined in this section. Although we will deprecate some "
35902 "actions, for example if they get replaced by newer calls, we will keep the "
35903 "old actions forever. This allows you the developer to program in confidence "
35904 "against the libguestfs API."
35908 #: ../src/guestfs.pod:1061
35909 msgid "BLOCK DEVICE NAMING"
35913 #: ../src/guestfs.pod:1063
35915 "In the kernel there is now quite a profusion of schemata for naming block "
35916 "devices (in this context, by I<block device> I mean a physical or virtual "
35917 "hard drive). The original Linux IDE driver used names starting with "
35918 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
35919 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
35920 "replacement for the old IDE driver (particularly for SATA devices) those "
35921 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
35922 "machines with paravirtualized drivers. This has created several different "
35923 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
35928 #: ../src/guestfs.pod:1075
35930 "As discussed above, libguestfs uses a qemu appliance running an embedded "
35931 "Linux kernel to access block devices. We can run a variety of appliances "
35932 "based on a variety of Linux kernels."
35936 #: ../src/guestfs.pod:1079
35938 "This causes a problem for libguestfs because many API calls use device or "
35939 "partition names. Working scripts and the recipe (example) scripts that we "
35940 "make available over the internet could fail if the naming scheme changes."
35944 #: ../src/guestfs.pod:1084
35946 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
35947 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
35948 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
35949 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
35953 #: ../src/guestfs.pod:1090
35955 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
35956 "L</guestfs_list_partitions> and similar calls return the true names of the "
35957 "devices and partitions as known to the appliance."
35961 #: ../src/guestfs.pod:1095
35962 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
35966 #: ../src/guestfs.pod:1097
35968 "Usually this translation is transparent. However in some (very rare) cases "
35969 "you may need to know the exact algorithm. Such cases include where you use "
35970 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
35971 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
35976 #: ../src/guestfs.pod:1103
35978 "The algorithm is applied only to I<parameters> which are known to be either "
35979 "device or partition names. Return values from functions such as "
35980 "L</guestfs_list_devices> are never changed."
35984 #: ../src/guestfs.pod:1111
35985 msgid "Is the string a parameter which is a device or partition name?"
35989 #: ../src/guestfs.pod:1115
35990 msgid "Does the string begin with C</dev/sd>?"
35994 #: ../src/guestfs.pod:1119
35996 "Does the named device exist? If so, we use that device. However if I<not> "
35997 "then we continue with this algorithm."
36001 #: ../src/guestfs.pod:1124
36002 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
36006 #: ../src/guestfs.pod:1126
36007 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
36011 #: ../src/guestfs.pod:1128
36012 msgid "If that named device exists, use it. If not, continue."
36016 #: ../src/guestfs.pod:1132
36017 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
36021 #: ../src/guestfs.pod:1134
36022 msgid "If that named device exists, use it. If not, return an error."
36026 #: ../src/guestfs.pod:1138
36027 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
36031 #: ../src/guestfs.pod:1140
36033 "Although the standard naming scheme and automatic translation is useful for "
36034 "simple programs and guestfish scripts, for larger programs it is best not to "
36035 "rely on this mechanism."
36039 #: ../src/guestfs.pod:1144
36041 "Where possible for maximum future portability programs using libguestfs "
36042 "should use these future-proof techniques:"
36046 #: ../src/guestfs.pod:1151
36048 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
36049 "device names, and then use those names directly."
36053 #: ../src/guestfs.pod:1154
36054 msgid "Since those device names exist by definition, they will never be translated."
36058 #: ../src/guestfs.pod:1159
36060 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
36061 "filesystem labels."
36065 #: ../src/guestfs.pod:1166
36067 "This section discusses security implications of using libguestfs, "
36068 "particularly with untrusted or malicious guests or disk images."
36072 #: ../src/guestfs.pod:1169
36073 msgid "GENERAL SECURITY CONSIDERATIONS"
36077 #: ../src/guestfs.pod:1171
36079 "Be careful with any files or data that you download from a guest (by "
36080 "\"download\" we mean not just the L</guestfs_download> command but any "
36081 "command that reads files, filenames, directories or anything else from a "
36082 "disk image). An attacker could manipulate the data to fool your program "
36083 "into doing the wrong thing. Consider cases such as:"
36087 #: ../src/guestfs.pod:1181
36088 msgid "the data (file etc) not being present"
36092 #: ../src/guestfs.pod:1185
36093 msgid "being present but empty"
36097 #: ../src/guestfs.pod:1189
36098 msgid "being much larger than normal"
36102 #: ../src/guestfs.pod:1193
36103 msgid "containing arbitrary 8 bit data"
36107 #: ../src/guestfs.pod:1197
36108 msgid "being in an unexpected character encoding"
36112 #: ../src/guestfs.pod:1201
36113 msgid "containing homoglyphs."
36117 #: ../src/guestfs.pod:1205
36118 msgid "SECURITY OF MOUNTING FILESYSTEMS"
36122 #: ../src/guestfs.pod:1207
36124 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
36125 "(VFS) module can sometimes be escalated into exploits by deliberately "
36126 "creating a malicious, malformed filesystem. These exploits are very severe "
36127 "for two reasons. Firstly there are very many filesystem drivers in the "
36128 "kernel, and many of them are infrequently used and not much developer "
36129 "attention has been paid to the code. Linux userspace helps potential "
36130 "crackers by detecting the filesystem type and automatically choosing the "
36131 "right VFS driver, even if that filesystem type is obscure or unexpected for "
36132 "the administrator. Secondly, a kernel-level exploit is like a local root "
36133 "exploit (worse in some ways), giving immediate and total access to the "
36134 "system right down to the hardware level."
36138 #: ../src/guestfs.pod:1220
36140 "That explains why you should never mount a filesystem from an untrusted "
36141 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
36142 "inside a qemu virtual machine, usually running as a non-root user. The "
36143 "attacker would need to write a filesystem which first exploited the kernel, "
36144 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
36145 "the libguestfs protocol, and finally to be as serious as the host kernel "
36146 "exploit it would need to escalate its privileges to root. This multi-step "
36147 "escalation, performed by a static piece of data, is thought to be extremely "
36148 "hard to do, although we never say 'never' about security issues."
36152 #: ../src/guestfs.pod:1231
36154 "In any case callers can reduce the attack surface by forcing the filesystem "
36155 "type when mounting (use L</guestfs_mount_vfs>)."
36159 #: ../src/guestfs.pod:1234
36160 msgid "PROTOCOL SECURITY"
36164 #: ../src/guestfs.pod:1236
36166 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
36167 "defined upper message size. However a program that uses libguestfs must "
36168 "also take care - for example you can write a program that downloads a binary "
36169 "from a disk image and executes it locally, and no amount of protocol "
36170 "security will save you from the consequences."
36174 #: ../src/guestfs.pod:1242
36175 msgid "INSPECTION SECURITY"
36179 #: ../src/guestfs.pod:1244
36181 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
36182 "directly from the guest, and these could contain any 8 bit data. Callers "
36183 "should be careful to escape these before printing them to a structured file "
36184 "(for example, use HTML escaping if creating a web page)."
36188 #: ../src/guestfs.pod:1250
36190 "Guest configuration may be altered in unusual ways by the administrator of "
36191 "the virtual machine, and may not reflect reality (particularly for untrusted "
36192 "or actively malicious guests). For example we parse the hostname from "
36193 "configuration files like C</etc/sysconfig/network> that we find in the "
36194 "guest, but the guest administrator can easily manipulate these files to "
36195 "provide the wrong hostname."
36199 #: ../src/guestfs.pod:1258
36201 "The inspection API parses guest configuration using two external libraries: "
36202 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
36203 "designed to be robust in the face of malicious data, although denial of "
36204 "service attacks are still possible, for example with oversized configuration "
36209 #: ../src/guestfs.pod:1264
36210 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
36214 #: ../src/guestfs.pod:1266
36216 "Be very cautious about running commands from the guest. By running a "
36217 "command in the guest, you are giving CPU time to a binary that you do not "
36218 "control, under the same user account as the library, albeit wrapped in qemu "
36219 "virtualization. More information and alternatives can be found in the "
36220 "section L</RUNNING COMMANDS>."
36224 #: ../src/guestfs.pod:1272
36225 msgid "CVE-2010-3851"
36229 #: ../src/guestfs.pod:1274
36230 msgid "https://bugzilla.redhat.com/642934"
36234 #: ../src/guestfs.pod:1276
36236 "This security bug concerns the automatic disk format detection that qemu "
36237 "does on disk images."
36241 #: ../src/guestfs.pod:1279
36243 "A raw disk image is just the raw bytes, there is no header. Other disk "
36244 "images like qcow2 contain a special header. Qemu deals with this by looking "
36245 "for one of the known headers, and if none is found then assuming the disk "
36246 "image must be raw."
36250 #: ../src/guestfs.pod:1284
36252 "This allows a guest which has been given a raw disk image to write some "
36253 "other header. At next boot (or when the disk image is accessed by "
36254 "libguestfs) qemu would do autodetection and think the disk image format was, "
36255 "say, qcow2 based on the header written by the guest."
36259 #: ../src/guestfs.pod:1289
36261 "This in itself would not be a problem, but qcow2 offers many features, one "
36262 "of which is to allow a disk image to refer to another image (called the "
36263 "\"backing disk\"). It does this by placing the path to the backing disk "
36264 "into the qcow2 header. This path is not validated and could point to any "
36265 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
36266 "\"holes\" in the qcow2 disk image, which of course is completely under the "
36267 "control of the attacker."
36271 #: ../src/guestfs.pod:1297
36272 msgid "In libguestfs this is rather hard to exploit except under two circumstances:"
36276 #: ../src/guestfs.pod:1304
36277 msgid "You have enabled the network or have opened the disk in write mode."
36281 #: ../src/guestfs.pod:1308
36283 "You are also running untrusted code from the guest (see L</RUNNING "
36288 #: ../src/guestfs.pod:1313
36290 "The way to avoid this is to specify the expected disk format when adding "
36291 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
36292 "should always do this if the disk is raw format, and it's a good idea for "
36297 #: ../src/guestfs.pod:1318
36299 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
36300 "format is fetched from libvirt and passed through."
36304 #: ../src/guestfs.pod:1321
36306 "For libguestfs tools, use the I<--format> command line parameter as "
36311 #: ../src/guestfs.pod:1324
36312 msgid "CONNECTION MANAGEMENT"
36316 #: ../src/guestfs.pod:1326
36317 msgid "guestfs_h *"
36321 #: ../src/guestfs.pod:1328
36323 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
36324 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
36325 "handle and release all resources used."
36329 #: ../src/guestfs.pod:1332
36331 "For information on using multiple handles and threads, see the section "
36332 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> above."
36336 #: ../src/guestfs.pod:1335
36337 msgid "guestfs_create"
36341 #: ../src/guestfs.pod:1337
36344 " guestfs_h *guestfs_create (void);\n"
36349 #: ../src/guestfs.pod:1339
36350 msgid "Create a connection handle."
36354 #: ../src/guestfs.pod:1341
36356 "On success this returns a non-NULL pointer to a handle. On error it returns "
36361 #: ../src/guestfs.pod:1344
36363 "You have to \"configure\" the handle after creating it. This includes "
36364 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
36365 "handle at least once."
36369 #: ../src/guestfs.pod:1348
36370 msgid "After configuring the handle, you have to call L</guestfs_launch>."
36374 #: ../src/guestfs.pod:1350
36376 "You may also want to configure error handling for the handle. See the "
36377 "L</ERROR HANDLING> section below."
36381 #: ../src/guestfs.pod:1353
36382 msgid "guestfs_close"
36386 #: ../src/guestfs.pod:1355
36389 " void guestfs_close (guestfs_h *g);\n"
36394 #: ../src/guestfs.pod:1357
36395 msgid "This closes the connection handle and frees up all resources used."
36399 #: ../src/guestfs.pod:1359
36401 "If autosync was set on the handle and the handle was launched, then this "
36402 "implicitly calls various functions to unmount filesystems and sync the "
36403 "disk. See L</guestfs_set_autosync> for more details."
36407 #: ../src/guestfs.pod:1363
36408 msgid "If a close callback was set on the handle, then it is called."
36412 #: ../src/guestfs.pod:1365
36413 msgid "ERROR HANDLING"
36417 #: ../src/guestfs.pod:1367
36419 "API functions can return errors. For example, almost all functions that "
36420 "return C<int> will return C<-1> to indicate an error."
36424 #: ../src/guestfs.pod:1370
36426 "Additional information is available for errors: an error message string and "
36427 "optionally an error number (errno) if the thing that failed was a system "
36432 #: ../src/guestfs.pod:1374
36434 "You can get at the additional information about the last error on the handle "
36435 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
36436 "up an error handler with L</guestfs_set_error_handler>."
36440 #: ../src/guestfs.pod:1379
36442 "When the handle is created, a default error handler is installed which "
36443 "prints the error message string to C<stderr>. For small short-running "
36444 "command line programs it is sufficient to do:"
36448 #: ../src/guestfs.pod:1383
36451 " if (guestfs_launch (g) == -1)\n"
36452 " exit (EXIT_FAILURE);\n"
36457 #: ../src/guestfs.pod:1386
36459 "since the default error handler will ensure that an error message has been "
36460 "printed to C<stderr> before the program exits."
36464 #: ../src/guestfs.pod:1389
36466 "For other programs the caller will almost certainly want to install an "
36467 "alternate error handler or do error handling in-line like this:"
36471 #: ../src/guestfs.pod:1392
36474 " /* This disables the default behaviour of printing errors\n"
36476 " guestfs_set_error_handler (g, NULL, NULL);\n"
36481 #: ../src/guestfs.pod:1396
36484 " if (guestfs_launch (g) == -1) {\n"
36485 " /* Examine the error message and print it etc. */\n"
36486 " char *msg = guestfs_last_error (g);\n"
36487 " int errnum = guestfs_last_errno (g);\n"
36488 " fprintf (stderr, \"%s\", msg);\n"
36489 " if (errnum != 0)\n"
36490 " fprintf (stderr, \": %s\", strerror (errnum));\n"
36491 " fprintf (stderr, \"\\n\");\n"
36498 #: ../src/guestfs.pod:1407
36500 "Out of memory errors are handled differently. The default action is to call "
36501 "L<abort(3)>. If this is undesirable, then you can set a handler using "
36502 "L</guestfs_set_out_of_memory_handler>."
36506 #: ../src/guestfs.pod:1411
36508 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
36509 "because there is no handle if this happens there is no way to get additional "
36510 "error information. However L</guestfs_create> is supposed to be a "
36511 "lightweight operation which can only fail because of insufficient memory (it "
36512 "returns NULL in this case)."
36516 #: ../src/guestfs.pod:1417
36517 msgid "guestfs_last_error"
36521 #: ../src/guestfs.pod:1419
36524 " const char *guestfs_last_error (guestfs_h *g);\n"
36529 #: ../src/guestfs.pod:1421
36531 "This returns the last error message that happened on C<g>. If there has not "
36532 "been an error since the handle was created, then this returns C<NULL>."
36536 #: ../src/guestfs.pod:1425
36538 "The lifetime of the returned string is until the next error occurs, or "
36539 "L</guestfs_close> is called."
36543 #: ../src/guestfs.pod:1428
36544 msgid "guestfs_last_errno"
36548 #: ../src/guestfs.pod:1430
36551 " int guestfs_last_errno (guestfs_h *g);\n"
36556 #: ../src/guestfs.pod:1432
36557 msgid "This returns the last error number (errno) that happened on C<g>."
36561 #: ../src/guestfs.pod:1434
36562 msgid "If successful, an errno integer not equal to zero is returned."
36566 #: ../src/guestfs.pod:1436
36567 msgid "If no error, this returns 0. This call can return 0 in three situations:"
36571 #: ../src/guestfs.pod:1443
36572 msgid "There has not been any error on the handle."
36576 #: ../src/guestfs.pod:1447
36578 "There has been an error but the errno was meaningless. This corresponds to "
36579 "the case where the error did not come from a failed system call, but for "
36580 "some other reason."
36584 #: ../src/guestfs.pod:1453
36586 "There was an error from a failed system call, but for some reason the errno "
36587 "was not captured and returned. This usually indicates a bug in libguestfs."
36591 #: ../src/guestfs.pod:1459
36593 "Libguestfs tries to convert the errno from inside the applicance into a "
36594 "corresponding errno for the caller (not entirely trivial: the appliance "
36595 "might be running a completely different operating system from the library "
36596 "and error numbers are not standardized across Un*xen). If this could not be "
36597 "done, then the error is translated to C<EINVAL>. In practice this should "
36598 "only happen in very rare circumstances."
36602 #: ../src/guestfs.pod:1467
36603 msgid "guestfs_set_error_handler"
36607 #: ../src/guestfs.pod:1469
36610 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
36612 " const char *msg);\n"
36613 " void guestfs_set_error_handler (guestfs_h *g,\n"
36614 " guestfs_error_handler_cb cb,\n"
36615 " void *opaque);\n"
36620 #: ../src/guestfs.pod:1476
36622 "The callback C<cb> will be called if there is an error. The parameters "
36623 "passed to the callback are an opaque data pointer and the error message "
36628 #: ../src/guestfs.pod:1480
36630 "C<errno> is not passed to the callback. To get that the callback must call "
36631 "L</guestfs_last_errno>."
36635 #: ../src/guestfs.pod:1483
36637 "Note that the message string C<msg> is freed as soon as the callback "
36638 "function returns, so if you want to stash it somewhere you must make your "
36643 #: ../src/guestfs.pod:1487
36644 msgid "The default handler prints messages on C<stderr>."
36648 #: ../src/guestfs.pod:1489
36649 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
36653 #: ../src/guestfs.pod:1491
36654 msgid "guestfs_get_error_handler"
36658 #: ../src/guestfs.pod:1493
36661 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
36662 " void **opaque_rtn);\n"
36667 #: ../src/guestfs.pod:1496
36668 msgid "Returns the current error handler callback."
36672 #: ../src/guestfs.pod:1498
36673 msgid "guestfs_set_out_of_memory_handler"
36677 #: ../src/guestfs.pod:1500
36680 " typedef void (*guestfs_abort_cb) (void);\n"
36681 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
36682 " guestfs_abort_cb);\n"
36687 #: ../src/guestfs.pod:1504
36689 "The callback C<cb> will be called if there is an out of memory situation. "
36690 "I<Note this callback must not return>."
36694 #: ../src/guestfs.pod:1507
36695 msgid "The default is to call L<abort(3)>."
36699 #: ../src/guestfs.pod:1509
36700 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
36704 #: ../src/guestfs.pod:1512
36705 msgid "guestfs_get_out_of_memory_handler"
36709 #: ../src/guestfs.pod:1514
36712 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
36717 #: ../src/guestfs.pod:1516
36718 msgid "This returns the current out of memory handler."
36722 #: ../src/guestfs.pod:1518
36727 #: ../src/guestfs.pod:1522
36732 #: ../src/guestfs.pod:1524
36737 #: ../src/guestfs.pod:1526
36738 msgid "AVAILABILITY"
36742 #: ../src/guestfs.pod:1528
36743 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
36747 #: ../src/guestfs.pod:1530
36749 "Using L</guestfs_available> you can test availability of the following "
36750 "groups of functions. This test queries the appliance to see if the "
36751 "appliance you are currently using supports the functionality."
36755 #: ../src/guestfs.pod:1535
36756 msgid "@AVAILABILITY@"
36760 #: ../src/guestfs.pod:1537
36761 msgid "GUESTFISH supported COMMAND"
36765 #: ../src/guestfs.pod:1539
36767 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
36768 "prints out the available groups and whether they are supported by this build "
36769 "of libguestfs. Note however that you have to do C<run> first."
36773 #: ../src/guestfs.pod:1544
36774 msgid "SINGLE CALLS AT COMPILE TIME"
36778 #: ../src/guestfs.pod:1546
36780 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
36781 "function, such as:"
36785 #: ../src/guestfs.pod:1549
36788 " #define LIBGUESTFS_HAVE_DD 1\n"
36793 #: ../src/guestfs.pod:1551
36794 msgid "if L</guestfs_dd> is available."
36798 #: ../src/guestfs.pod:1553
36800 "Before version 1.5.8, if you needed to test whether a single libguestfs "
36801 "function is available at compile time, we recommended using build tools such "
36802 "as autoconf or cmake. For example in autotools you could use:"
36806 #: ../src/guestfs.pod:1558
36809 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
36810 " AC_CHECK_FUNCS([guestfs_dd])\n"
36815 #: ../src/guestfs.pod:1561
36817 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
36822 #: ../src/guestfs.pod:1564
36823 msgid "SINGLE CALLS AT RUN TIME"
36827 #: ../src/guestfs.pod:1566
36829 "Testing at compile time doesn't guarantee that a function really exists in "
36830 "the library. The reason is that you might be dynamically linked against a "
36831 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
36832 "This situation unfortunately results in a segmentation fault, which is a "
36833 "shortcoming of the C dynamic linking system itself."
36837 #: ../src/guestfs.pod:1573
36839 "You can use L<dlopen(3)> to test if a function is available at run time, as "
36840 "in this example program (note that you still need the compile time check as "
36845 #: ../src/guestfs.pod:1577
36848 " #include <stdio.h>\n"
36849 " #include <stdlib.h>\n"
36850 " #include <unistd.h>\n"
36851 " #include <dlfcn.h>\n"
36852 " #include <guestfs.h>\n"
36857 #: ../src/guestfs.pod:1583
36862 " #ifdef LIBGUESTFS_HAVE_DD\n"
36864 " int has_function;\n"
36869 #: ../src/guestfs.pod:1589
36872 " /* Test if the function guestfs_dd is really available. */\n"
36873 " dl = dlopen (NULL, RTLD_LAZY);\n"
36875 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
36876 " exit (EXIT_FAILURE);\n"
36878 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
36884 #: ../src/guestfs.pod:1598
36887 " if (!has_function)\n"
36888 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
36890 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
36891 " /* Now it's safe to call\n"
36892 " guestfs_dd (g, \"foo\", \"bar\");\n"
36896 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
36903 #: ../src/guestfs.pod:1611
36905 "You may think the above is an awful lot of hassle, and it is. There are "
36906 "other ways outside of the C linking system to ensure that this kind of "
36907 "incompatibility never arises, such as using package versioning:"
36911 #: ../src/guestfs.pod:1616
36914 " Requires: libguestfs >= 1.0.80\n"
36919 #: ../src/guestfs.pod:1618
36920 msgid "CALLS WITH OPTIONAL ARGUMENTS"
36924 #: ../src/guestfs.pod:1620
36926 "A recent feature of the API is the introduction of calls which take optional "
36927 "arguments. In C these are declared 3 ways. The main way is as a call which "
36928 "takes variable arguments (ie. C<...>), as in this example:"
36932 #: ../src/guestfs.pod:1625
36935 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
36940 #: ../src/guestfs.pod:1627
36942 "Call this with a list of optional arguments, terminated by C<-1>. So to "
36943 "call with no optional arguments specified:"
36947 #: ../src/guestfs.pod:1630
36950 " guestfs_add_drive_opts (g, filename, -1);\n"
36955 #: ../src/guestfs.pod:1632
36956 msgid "With a single optional argument:"
36960 #: ../src/guestfs.pod:1634
36963 " guestfs_add_drive_opts (g, filename,\n"
36964 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
36970 #: ../src/guestfs.pod:1638
36975 #: ../src/guestfs.pod:1640
36978 " guestfs_add_drive_opts (g, filename,\n"
36979 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
36980 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
36986 #: ../src/guestfs.pod:1645
36988 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
36993 #: ../src/guestfs.pod:1648
36994 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
36998 #: ../src/guestfs.pod:1650
37000 "The second variant has the same name with the suffix C<_va>, which works the "
37001 "same way but takes a C<va_list>. See the C manual for details. For the "
37002 "example function, this is declared:"
37006 #: ../src/guestfs.pod:1654
37009 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
37010 " va_list args);\n"
37015 #: ../src/guestfs.pod:1657
37016 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
37020 #: ../src/guestfs.pod:1659
37022 "The third variant is useful where you need to construct these calls. You "
37023 "pass in a structure where you fill in the optional fields. The structure "
37024 "has a bitmask as the first element which you must set to indicate which "
37025 "fields you have filled in. For our example function the structure and call "
37030 #: ../src/guestfs.pod:1665
37033 " struct guestfs_add_drive_opts_argv {\n"
37034 " uint64_t bitmask;\n"
37036 " const char *format;\n"
37039 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
37040 " const struct guestfs_add_drive_opts_argv *optargs);\n"
37045 #: ../src/guestfs.pod:1674
37046 msgid "You could call it like this:"
37050 #: ../src/guestfs.pod:1676
37053 " struct guestfs_add_drive_opts_argv optargs = {\n"
37054 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
37055 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
37056 " .readonly = 1,\n"
37057 " .format = \"qcow2\"\n"
37063 #: ../src/guestfs.pod:1683
37066 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
37071 #: ../src/guestfs.pod:1691
37072 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
37076 #: ../src/guestfs.pod:1696
37077 msgid "You do not need to fill in all fields of the structure."
37081 #: ../src/guestfs.pod:1700
37083 "There must be a one-to-one correspondence between fields of the structure "
37084 "that are filled in, and bits set in the bitmask."
37088 #: ../src/guestfs.pod:1705
37089 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
37093 #: ../src/guestfs.pod:1707
37095 "In other languages, optional arguments are expressed in the way that is "
37096 "natural for that language. We refer you to the language-specific "
37097 "documentation for more details on that."
37101 #: ../src/guestfs.pod:1711
37102 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
37106 #: ../src/guestfs.pod:1713
37107 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
37111 #: ../src/guestfs.pod:1715
37113 "B<Note:> This section documents the generic event mechanism introduced in "
37114 "libguestfs 1.10, which you should use in new code if possible. The old "
37115 "functions C<guestfs_set_log_message_callback>, "
37116 "C<guestfs_set_subprocess_quit_callback>, "
37117 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
37118 "C<guestfs_set_progress_callback> are no longer documented in this manual "
37119 "page. Because of the ABI guarantee, the old functions continue to work."
37123 #: ../src/guestfs.pod:1724
37125 "Handles generate events when certain things happen, such as log messages "
37126 "being generated, progress messages during long-running operations, or the "
37127 "handle being closed. The API calls described below let you register a "
37128 "callback to be called when events happen. You can register multiple "
37129 "callbacks (for the same, different or overlapping sets of events), and "
37130 "individually remove callbacks. If callbacks are not removed, then they "
37131 "remain in force until the handle is closed."
37135 #: ../src/guestfs.pod:1732
37137 "In the current implementation, events are only generated synchronously: that "
37138 "means that events (and hence callbacks) can only happen while you are in the "
37139 "middle of making another libguestfs call. The callback is called in the "
37144 #: ../src/guestfs.pod:1737
37146 "Events may contain a payload, usually nothing (void), an array of 64 bit "
37147 "unsigned integers, or a message buffer. Payloads are discussed later on."
37151 #: ../src/guestfs.pod:1741
37152 msgid "CLASSES OF EVENTS"
37156 #: ../src/guestfs.pod:1745
37157 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
37161 #: ../src/guestfs.pod:1748
37163 "The callback function will be called while the handle is being closed "
37164 "(synchronously from L</guestfs_close>)."
37168 #: ../src/guestfs.pod:1751
37170 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
37171 "handles that are open when the program exits. This means that this callback "
37172 "might be called indirectly from L<exit(3)>, which can cause unexpected "
37173 "problems in higher-level languages (eg. if your HLL interpreter has already "
37174 "been cleaned up by the time this is called, and if your callback then jumps "
37175 "into some HLL function)."
37179 #: ../src/guestfs.pod:1758
37181 "If no callback is registered: the handle is closed without any callback "
37186 #: ../src/guestfs.pod:1761
37187 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
37191 #: ../src/guestfs.pod:1764
37193 "The callback function will be called when the child process quits, either "
37194 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
37195 "corresponds to a transition from any state to the CONFIG state)."
37199 #: ../src/guestfs.pod:1768 ../src/guestfs.pod:1777 ../src/guestfs.pod:1894
37200 msgid "If no callback is registered: the event is ignored."
37204 #: ../src/guestfs.pod:1770
37205 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
37209 #: ../src/guestfs.pod:1773
37211 "The callback function will be called when the child process becomes ready "
37212 "first time after it has been launched. (This corresponds to a transition "
37213 "from LAUNCHING to the READY state)."
37217 #: ../src/guestfs.pod:1779
37218 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
37222 #: ../src/guestfs.pod:1782
37224 "Some long-running operations can generate progress messages. If this "
37225 "callback is registered, then it will be called each time a progress message "
37226 "is generated (usually two seconds after the operation started, and three "
37227 "times per second thereafter until it completes, although the frequency may "
37228 "change in future versions)."
37232 #: ../src/guestfs.pod:1788
37234 "The callback receives in the payload four unsigned 64 bit numbers which are "
37235 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
37239 #: ../src/guestfs.pod:1791
37241 "The units of C<total> are not defined, although for some operations C<total> "
37242 "may relate in some way to the amount of data to be transferred (eg. in bytes "
37243 "or megabytes), and C<position> may be the portion which has been "
37248 #: ../src/guestfs.pod:1796
37249 msgid "The only defined and stable parts of the API are:"
37253 #: ../src/guestfs.pod:1802
37255 "The callback can display to the user some type of progress bar or indicator "
37256 "which shows the ratio of C<position>:C<total>."
37260 #: ../src/guestfs.pod:1807
37261 msgid "0 E<lt>= C<position> E<lt>= C<total>"
37265 #: ../src/guestfs.pod:1811
37267 "If any progress notification is sent during a call, then a final progress "
37268 "notification is always sent when C<position> = C<total> (I<unless> the call "
37269 "fails with an error)."
37273 #: ../src/guestfs.pod:1815
37275 "This is to simplify caller code, so callers can easily set the progress "
37276 "indicator to \"100%\" at the end of the operation, without requiring special "
37277 "code to detect this case."
37281 #: ../src/guestfs.pod:1821
37283 "For some calls we are unable to estimate the progress of the call, but we "
37284 "can still generate progress messages to indicate activity. This is known as "
37285 "\"pulse mode\", and is directly supported by certain progress bar "
37286 "implementations (eg. GtkProgressBar)."
37290 #: ../src/guestfs.pod:1826
37292 "For these calls, zero or more progress messages are generated with "
37293 "C<position = 0> and C<total = 1>, followed by a final message with "
37294 "C<position = total = 1>."
37298 #: ../src/guestfs.pod:1830
37300 "As noted above, if the call fails with an error then the final message may "
37301 "not be generated."
37305 #: ../src/guestfs.pod:1835
37307 "The callback also receives the procedure number (C<proc_nr>) and serial "
37308 "number (C<serial>) of the call. These are only useful for debugging "
37309 "protocol issues, and the callback can normally ignore them. The callback "
37310 "may want to print these numbers in error messages or debugging messages."
37314 #: ../src/guestfs.pod:1841
37315 msgid "If no callback is registered: progress messages are discarded."
37319 #: ../src/guestfs.pod:1843
37320 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
37324 #: ../src/guestfs.pod:1846
37326 "The callback function is called whenever a log message is generated by qemu, "
37327 "the appliance kernel, guestfsd (daemon), or utility programs."
37331 #: ../src/guestfs.pod:1849
37333 "If the verbose flag (L</guestfs_set_verbose>) is set before launch "
37334 "(L</guestfs_launch>) then additional debug messages are generated."
37338 #: ../src/guestfs.pod:1852 ../src/guestfs.pod:1866
37340 "If no callback is registered: the messages are discarded unless the verbose "
37341 "flag is set in which case they are sent to stderr. You can override the "
37342 "printing of verbose messages to stderr by setting up a callback."
37346 #: ../src/guestfs.pod:1857
37347 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
37351 #: ../src/guestfs.pod:1860
37353 "The callback function is called whenever a log message is generated by the "
37354 "library part of libguestfs."
37358 #: ../src/guestfs.pod:1863
37360 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
37361 "messages are generated."
37365 #: ../src/guestfs.pod:1871
37366 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
37370 #: ../src/guestfs.pod:1874
37372 "The callback function is called whenever a trace message is generated. This "
37373 "only applies if the trace flag (L</guestfs_set_trace>) is set."
37377 #: ../src/guestfs.pod:1877
37379 "If no callback is registered: the messages are sent to stderr. You can "
37380 "override the printing of trace messages to stderr by setting up a callback."
37384 #: ../src/guestfs.pod:1881
37385 msgid "GUESTFS_EVENT_ENTER (payload type: function name)"
37389 #: ../src/guestfs.pod:1884
37390 msgid "The callback function is called whenever a libguestfs function is entered."
37394 #: ../src/guestfs.pod:1887
37396 "The payload is a string which contains the name of the function that we are "
37397 "entering (not including C<guestfs_> prefix)."
37401 #: ../src/guestfs.pod:1890
37403 "Note that libguestfs functions can call themselves, so you may see many "
37404 "events from a single call. A few libguestfs functions do not generate this "
37409 #: ../src/guestfs.pod:1898
37410 msgid "guestfs_set_event_callback"
37414 #: ../src/guestfs.pod:1900
37417 " int guestfs_set_event_callback (guestfs_h *g,\n"
37418 " guestfs_event_callback cb,\n"
37419 " uint64_t event_bitmask,\n"
37421 " void *opaque);\n"
37426 #: ../src/guestfs.pod:1906
37428 "This function registers a callback (C<cb>) for all event classes in the "
37429 "C<event_bitmask>."
37433 #: ../src/guestfs.pod:1909
37435 "For example, to register for all log message events, you could call this "
37436 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
37437 "To register a single callback for all possible classes of events, use "
37438 "C<GUESTFS_EVENT_ALL>."
37442 #: ../src/guestfs.pod:1915
37443 msgid "C<flags> should always be passed as 0."
37447 #: ../src/guestfs.pod:1917
37449 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
37450 "it for any purpose."
37454 #: ../src/guestfs.pod:1920
37456 "The return value is the event handle (an integer) which you can use to "
37457 "delete the callback (see below)."
37461 #: ../src/guestfs.pod:1923
37463 "If there is an error, this function returns C<-1>, and sets the error in the "
37464 "handle in the usual way (see L</guestfs_last_error> etc.)"
37468 #: ../src/guestfs.pod:1926
37470 "Callbacks remain in effect until they are deleted, or until the handle is "
37475 #: ../src/guestfs.pod:1929
37477 "In the case where multiple callbacks are registered for a particular event "
37478 "class, all of the callbacks are called. The order in which multiple "
37479 "callbacks are called is not defined."
37483 #: ../src/guestfs.pod:1933
37484 msgid "guestfs_delete_event_callback"
37488 #: ../src/guestfs.pod:1935
37491 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
37496 #: ../src/guestfs.pod:1937
37498 "Delete a callback that was previously registered. C<event_handle> should be "
37499 "the integer that was returned by a previous call to "
37500 "C<guestfs_set_event_callback> on the same handle."
37504 #: ../src/guestfs.pod:1941
37505 msgid "guestfs_event_callback"
37509 #: ../src/guestfs.pod:1943
37512 " typedef void (*guestfs_event_callback) (\n"
37515 " uint64_t event,\n"
37516 " int event_handle,\n"
37518 " const char *buf, size_t buf_len,\n"
37519 " const uint64_t *array, size_t array_len);\n"
37524 #: ../src/guestfs.pod:1952
37525 msgid "This is the type of the event callback function that you have to provide."
37529 #: ../src/guestfs.pod:1955
37531 "The basic parameters are: the handle (C<g>), the opaque user pointer "
37532 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
37533 "handle, and C<flags> which in the current API you should ignore."
37537 #: ../src/guestfs.pod:1959
37539 "The remaining parameters contain the event payload (if any). Each event may "
37540 "contain a payload, which usually relates to the event class, but for future "
37541 "proofing your code should be written to handle any payload for any event "
37546 #: ../src/guestfs.pod:1964
37548 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
37549 "there is no message buffer). Note that this message buffer can contain "
37550 "arbitrary 8 bit data, including NUL bytes."
37554 #: ../src/guestfs.pod:1968
37556 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
37557 "moment this is only used for progress messages."
37561 #: ../src/guestfs.pod:1971
37562 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
37566 #: ../src/guestfs.pod:1973
37568 "One motivation for the generic event API was to allow GUI programs to "
37569 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
37570 "unconditionally to C<stderr>."
37574 #: ../src/guestfs.pod:1977
37576 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
37577 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
37578 "messages are not events; you must capture error messages separately)."
37582 #: ../src/guestfs.pod:1982
37584 "Programs have to set up a callback to capture the classes of events of "
37589 #: ../src/guestfs.pod:1985
37593 " guestfs_set_event_callback\n"
37594 " (g, message_callback,\n"
37595 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
37596 " GUESTFS_EVENT_TRACE,\n"
37597 " 0, NULL) == -1)\n"
37598 " if (eh == -1) {\n"
37599 " // handle error in the usual way\n"
37605 #: ../src/guestfs.pod:1995
37607 "The callback can then direct messages to the appropriate place. In this "
37608 "example, messages are directed to syslog:"
37612 #: ../src/guestfs.pod:1998
37616 " message_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"
37625 " const int priority = LOG_USER|LOG_INFO;\n"
37626 " if (buf_len > 0)\n"
37627 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
37633 #: ../src/guestfs.pod:2013
37634 msgid "CANCELLING LONG TRANSFERS"
37638 #: ../src/guestfs.pod:2015
37640 "Some operations can be cancelled by the caller while they are in progress. "
37641 "Currently only operations that involve uploading or downloading data can be "
37642 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
37643 "parameters in the generator)."
37647 #: ../src/guestfs.pod:2020
37648 msgid "guestfs_user_cancel"
37652 #: ../src/guestfs.pod:2022
37655 " void guestfs_user_cancel (guestfs_h *g);\n"
37660 #: ../src/guestfs.pod:2024
37661 msgid "C<guestfs_user_cancel> cancels the current upload or download operation."
37665 #: ../src/guestfs.pod:2027
37667 "Unlike most other libguestfs calls, this function is signal safe and thread "
37668 "safe. You can call it from a signal handler or from another thread, without "
37669 "needing to do any locking."
37673 #: ../src/guestfs.pod:2031
37675 "The transfer that was in progress (if there is one) will stop shortly "
37676 "afterwards, and will return an error. The errno (see "
37677 "L</guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find "
37678 "out if the operation was cancelled or failed because of another error."
37682 #: ../src/guestfs.pod:2037
37684 "No cleanup is performed: for example, if a file was being uploaded then "
37685 "after cancellation there may be a partially uploaded file. It is the "
37686 "caller's responsibility to clean up if necessary."
37690 #: ../src/guestfs.pod:2041
37691 msgid "There are two common places that you might call C<guestfs_user_cancel>."
37695 #: ../src/guestfs.pod:2043
37697 "In an interactive text-based program, you might call it from a C<SIGINT> "
37698 "signal handler so that pressing C<^C> cancels the current operation. (You "
37699 "also need to call L</guestfs_set_pgroup> so that child processes don't "
37700 "receive the C<^C> signal)."
37704 #: ../src/guestfs.pod:2048
37706 "In a graphical program, when the main thread is displaying a progress bar "
37707 "with a cancel button, wire up the cancel button to call this function."
37711 #: ../src/guestfs.pod:2052
37712 msgid "PRIVATE DATA AREA"
37716 #: ../src/guestfs.pod:2054
37718 "You can attach named pieces of private data to the libguestfs handle, fetch "
37719 "them by name, and walk over them, for the lifetime of the handle. This is "
37720 "called the private data area and is only available from the C API."
37724 #: ../src/guestfs.pod:2059
37725 msgid "To attach a named piece of data, use the following call:"
37729 #: ../src/guestfs.pod:2061
37732 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
37737 #: ../src/guestfs.pod:2063
37739 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
37740 "pointer (which can be C<NULL>). Any previous item with the same key is "
37745 #: ../src/guestfs.pod:2067
37747 "You can use any C<key> you want, but your key should I<not> start with an "
37748 "underscore character. Keys beginning with an underscore character are "
37749 "reserved for internal libguestfs purposes (eg. for implementing language "
37750 "bindings). It is recommended that you prefix the key with some unique "
37751 "string to avoid collisions with other users."
37755 #: ../src/guestfs.pod:2073
37756 msgid "To retrieve the pointer, use:"
37760 #: ../src/guestfs.pod:2075
37763 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
37768 #: ../src/guestfs.pod:2077
37770 "This function returns C<NULL> if either no data is found associated with "
37771 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
37776 #: ../src/guestfs.pod:2081
37778 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
37779 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
37780 "all. In particular, libguestfs does I<not> try to free the data when the "
37781 "handle is closed. If the data must be freed, then the caller must either "
37782 "free it before calling L</guestfs_close> or must set up a close callback to "
37783 "do it (see L</GUESTFS_EVENT_CLOSE>)."
37787 #: ../src/guestfs.pod:2088
37788 msgid "To walk over all entries, use these two functions:"
37792 #: ../src/guestfs.pod:2090
37795 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
37800 #: ../src/guestfs.pod:2092
37803 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
37808 #: ../src/guestfs.pod:2094
37810 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
37811 "not have any particular meaning -- keys are not returned in any defined "
37812 "order). A pointer to the key is returned in C<*key_rtn> and the "
37813 "corresponding data pointer is returned from the function. C<NULL> is "
37814 "returned if there are no keys stored in the handle."
37818 #: ../src/guestfs.pod:2100
37820 "C<guestfs_next_private> returns the next key, pointer pair. The return "
37821 "value of this function is also C<NULL> is there are no further entries to "
37826 #: ../src/guestfs.pod:2104
37827 msgid "Notes about walking over entries:"
37831 #: ../src/guestfs.pod:2110
37832 msgid "You must not call C<guestfs_set_private> while walking over the entries."
37836 #: ../src/guestfs.pod:2115
37838 "The handle maintains an internal iterator which is reset when you call "
37839 "C<guestfs_first_private>. This internal iterator is invalidated when you "
37840 "call C<guestfs_set_private>."
37844 #: ../src/guestfs.pod:2121
37845 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
37849 #: ../src/guestfs.pod:2123
37852 " guestfs_set_private (g, key, NULL);\n"
37857 #: ../src/guestfs.pod:2125
37858 msgid "then that C<key> is not returned when walking."
37862 #: ../src/guestfs.pod:2129
37864 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
37865 "C<guestfs_next_private> or C<guestfs_set_private>."
37869 #: ../src/guestfs.pod:2135
37871 "The following example code shows how to print all keys and data pointers "
37872 "that are associated with the handle C<g>:"
37876 #: ../src/guestfs.pod:2138
37879 " const char *key;\n"
37880 " void *data = guestfs_first_private (g, &key);\n"
37881 " while (data != NULL)\n"
37883 " printf (\"key = %s, data = %p\\n\", key, data);\n"
37884 " data = guestfs_next_private (g, &key);\n"
37890 #: ../src/guestfs.pod:2146
37892 "More commonly you are only interested in keys that begin with an "
37893 "application-specific prefix C<foo_>. Modify the loop like so:"
37897 #: ../src/guestfs.pod:2149
37900 " const char *key;\n"
37901 " void *data = guestfs_first_private (g, &key);\n"
37902 " while (data != NULL)\n"
37904 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
37905 " printf (\"key = %s, data = %p\\n\", key, data);\n"
37906 " data = guestfs_next_private (g, &key);\n"
37912 #: ../src/guestfs.pod:2158
37914 "If you need to modify keys while walking, then you have to jump back to the "
37915 "beginning of the loop. For example, to delete all keys prefixed with "
37920 #: ../src/guestfs.pod:2162
37923 " const char *key;\n"
37926 " data = guestfs_first_private (g, &key);\n"
37927 " while (data != NULL)\n"
37929 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
37931 " guestfs_set_private (g, key, NULL);\n"
37932 " /* note that 'key' pointer is now invalid, and so is\n"
37933 " the internal iterator */\n"
37936 " data = guestfs_next_private (g, &key);\n"
37942 #: ../src/guestfs.pod:2178
37944 "Note that the above loop is guaranteed to terminate because the keys are "
37945 "being deleted, but other manipulations of keys within the loop might not "
37946 "terminate unless you also maintain an indication of which keys have been "
37951 #: ../src/guestfs.pod:2183
37956 #: ../src/guestfs.pod:2185
37958 "The libguestfs C library can be probed using systemtap or DTrace. This is "
37959 "true of any library, not just libguestfs. However libguestfs also contains "
37960 "static markers to help in probing internal operations."
37964 #: ../src/guestfs.pod:2189
37965 msgid "You can list all the static markers by doing:"
37969 #: ../src/guestfs.pod:2191
37972 " stap -l 'process(\"/usr/lib*/libguestfs.so.0\")\n"
37973 " .provider(\"guestfs\").mark(\"*\")'\n"
37978 #: ../src/guestfs.pod:2194
37980 "B<Note:> These static markers are I<not> part of the stable API and may "
37981 "change in future versions."
37985 #: ../src/guestfs.pod:2197
37986 msgid "SYSTEMTAP SCRIPT EXAMPLE"
37990 #: ../src/guestfs.pod:2199
37992 "This script contains examples of displaying both the static markers and some "
37993 "ordinary C entry points:"
37997 #: ../src/guestfs.pod:2202
38005 #: ../src/guestfs.pod:2204
38008 " function display_time () {\n"
38009 " now = gettimeofday_us ();\n"
38012 " delta = now - last;\n"
38018 #: ../src/guestfs.pod:2211
38021 " printf (\"%d (+%d):\", now, delta);\n"
38027 #: ../src/guestfs.pod:2214
38032 " printf (\"ready\\n\");\n"
38038 #: ../src/guestfs.pod:2219
38041 " /* Display all calls to static markers. */\n"
38042 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38043 " .provider(\"guestfs\").mark(\"*\") ? {\n"
38044 " display_time();\n"
38045 " printf (\"\\t%s %s\\n\", $$name, $$parms);\n"
38051 #: ../src/guestfs.pod:2226
38054 " /* Display all calls to guestfs_mkfs* functions. */\n"
38055 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38056 " .function(\"guestfs_mkfs*\") ? {\n"
38057 " display_time();\n"
38058 " printf (\"\\t%s %s\\n\", probefunc(), $$parms);\n"
38064 #: ../src/guestfs.pod:2233
38066 "The script above can be saved to C<test.stap> and run using the L<stap(1)> "
38067 "program. Note that you either have to be root, or you have to add yourself "
38068 "to several special stap groups. Consult the systemtap documentation for "
38069 "more information."
38073 #: ../src/guestfs.pod:2238
38076 " # stap /tmp/test.stap\n"
38082 #: ../src/guestfs.pod:2241
38083 msgid "In another terminal, run a guestfish command such as this:"
38087 #: ../src/guestfs.pod:2245
38088 msgid "In the first terminal, stap trace output similar to this is shown:"
38092 #: ../src/guestfs.pod:2247
38095 " 1318248056692655 (+0):\tlaunch_start\n"
38096 " 1318248056692850 (+195): launch_build_appliance_start\n"
38097 " 1318248056818285 (+125435): launch_build_appliance_end\n"
38098 " 1318248056838059 (+19774): launch_run_qemu\n"
38099 " 1318248061071167 (+4233108): launch_end\n"
38100 " 1318248061280324 (+209157): guestfs_mkfs g=0x1024ab0 fstype=0x46116f "
38101 "device=0x1024e60\n"
38106 #: ../src/guestfs.pod:2254 ../src/guestfs.pod:2259
38111 #: ../src/guestfs.pod:2256
38113 "<!-- old anchor for the next section --> <a "
38114 "name=\"state_machine_and_low_level_event_api\"/>"
38118 #: ../src/guestfs.pod:2261
38119 msgid "ARCHITECTURE"
38123 #: ../src/guestfs.pod:2263
38125 "Internally, libguestfs is implemented by running an appliance (a special "
38126 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
38127 "process of the main program."
38131 #: ../src/guestfs.pod:2267
38134 " ___________________\n"
38136 " | main program |\n"
38138 " | | child process / appliance\n"
38139 " | | __________________________\n"
38141 " +-------------------+ RPC | +-----------------+ |\n"
38142 " | libguestfs <--------------------> guestfsd | |\n"
38143 " | | | +-----------------+ |\n"
38144 " \\___________________/ | | Linux kernel | |\n"
38145 " | +--^--------------+ |\n"
38146 " \\_________|________________/\n"
38148 " _______v______\n"
38151 " | disk image |\n"
38152 " \\______________/\n"
38157 #: ../src/guestfs.pod:2287
38159 "The library, linked to the main program, creates the child process and hence "
38160 "the appliance in the L</guestfs_launch> function."
38164 #: ../src/guestfs.pod:2290
38166 "Inside the appliance is a Linux kernel and a complete stack of userspace "
38167 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
38168 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
38169 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
38170 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
38171 "attached to the qemu process which translates device access by the "
38172 "appliance's Linux kernel into accesses to the image."
38176 #: ../src/guestfs.pod:2299
38178 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
38179 "Although the disk image you are attached to might also be used by some "
38180 "virtual machine, libguestfs doesn't know or care about this. (But you will "
38181 "care if both libguestfs's qemu process and your virtual machine are trying "
38182 "to update the disk image at the same time, since these usually results in "
38183 "massive disk corruption)."
38187 #: ../src/guestfs.pod:2306
38188 msgid "STATE MACHINE"
38192 #: ../src/guestfs.pod:2308
38193 msgid "libguestfs uses a state machine to model the child process:"
38197 #: ../src/guestfs.pod:2310
38201 " guestfs_create\n"
38209 " / | \\ \\ guestfs_launch\n"
38210 " / | _\\__V______\n"
38212 " / | | LAUNCHING |\n"
38213 " / | \\___________/\n"
38215 " / | guestfs_launch\n"
38217 " ______ / __|____V\n"
38218 " / \\ ------> / \\\n"
38219 " | BUSY | | READY |\n"
38220 " \\______/ <------ \\________/\n"
38225 #: ../src/guestfs.pod:2332
38227 "The normal transitions are (1) CONFIG (when the handle is created, but there "
38228 "is no child process), (2) LAUNCHING (when the child process is booting up), "
38229 "(3) alternating between READY and BUSY as commands are issued to, and "
38230 "carried out by, the child process."
38234 #: ../src/guestfs.pod:2337
38236 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
38237 "asynchronously at any time (eg. due to some internal error), and that causes "
38238 "the state to transition back to CONFIG."
38242 #: ../src/guestfs.pod:2341
38244 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
38245 "issued when in the CONFIG state."
38249 #: ../src/guestfs.pod:2344
38251 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
38252 "L</guestfs_launch> blocks until the child process is READY to accept "
38253 "commands (or until some failure or timeout). L</guestfs_launch> internally "
38254 "moves the state from CONFIG to LAUNCHING while it is running."
38258 #: ../src/guestfs.pod:2350
38260 "API actions such as L</guestfs_mount> can only be issued when in the READY "
38261 "state. These API calls block waiting for the command to be carried out "
38262 "(ie. the state to transition to BUSY and then back to READY). There are no "
38263 "non-blocking versions, and no way to issue more than one command per handle "
38264 "at the same time."
38268 #: ../src/guestfs.pod:2356
38270 "Finally, the child process sends asynchronous messages back to the main "
38271 "program, such as kernel log messages. You can register a callback to "
38272 "receive these messages."
38276 #: ../src/guestfs.pod:2360
38281 #: ../src/guestfs.pod:2362
38282 msgid "APPLIANCE BOOT PROCESS"
38286 #: ../src/guestfs.pod:2364
38288 "This process has evolved and continues to evolve. The description here "
38289 "corresponds only to the current version of libguestfs and is provided for "
38290 "information only."
38294 #: ../src/guestfs.pod:2368
38296 "In order to follow the stages involved below, enable libguestfs debugging "
38297 "(set the environment variable C<LIBGUESTFS_DEBUG=1>)."
38301 #: ../src/guestfs.pod:2373
38302 msgid "Create the appliance"
38306 #: ../src/guestfs.pod:2375
38308 "C<febootstrap-supermin-helper> is invoked to create the kernel, a small "
38309 "initrd and the appliance."
38313 #: ../src/guestfs.pod:2378
38315 "The appliance is cached in C</var/tmp/.guestfs-E<lt>UIDE<gt>> (or in another "
38316 "directory if C<TMPDIR> is set)."
38320 #: ../src/guestfs.pod:2381
38322 "For a complete description of how the appliance is created and cached, read "
38323 "the L<febootstrap(8)> and L<febootstrap-supermin-helper(8)> man pages."
38327 #: ../src/guestfs.pod:2385
38328 msgid "Start qemu and boot the kernel"
38332 #: ../src/guestfs.pod:2387
38333 msgid "qemu is invoked to boot the kernel."
38337 #: ../src/guestfs.pod:2389
38338 msgid "Run the initrd"
38342 #: ../src/guestfs.pod:2391
38344 "C<febootstrap-supermin-helper> builds a small initrd. The initrd is not the "
38345 "appliance. The purpose of the initrd is to load enough kernel modules in "
38346 "order that the appliance itself can be mounted and started."
38350 #: ../src/guestfs.pod:2395
38352 "The initrd is a cpio archive called "
38353 "C</var/tmp/.guestfs-E<lt>UIDE<gt>/initrd>."
38357 #: ../src/guestfs.pod:2398
38359 "When the initrd has started you will see messages showing that kernel "
38360 "modules are being loaded, similar to this:"
38364 #: ../src/guestfs.pod:2401
38367 " febootstrap: ext2 mini initrd starting up\n"
38368 " febootstrap: mounting /sys\n"
38369 " febootstrap: internal insmod libcrc32c.ko\n"
38370 " febootstrap: internal insmod crc32c-intel.ko\n"
38375 #: ../src/guestfs.pod:2406
38376 msgid "Find and mount the appliance device"
38380 #: ../src/guestfs.pod:2408
38382 "The appliance is a sparse file containing an ext2 filesystem which contains "
38383 "a familiar (although reduced in size) Linux operating system. It would "
38384 "normally be called C</var/tmp/.guestfs-E<lt>UIDE<gt>/root>."
38388 #: ../src/guestfs.pod:2412
38390 "The regular disks being inspected by libguestfs are the first devices "
38391 "exposed by qemu (eg. as C</dev/vda>)."
38395 #: ../src/guestfs.pod:2415
38397 "The last disk added to qemu is the appliance itself (eg. C</dev/vdb> if "
38398 "there was only one regular disk)."
38402 #: ../src/guestfs.pod:2418
38404 "Thus the final job of the initrd is to locate the appliance disk, mount it, "
38405 "and switch root into the appliance, and run C</init> from the appliance."
38409 #: ../src/guestfs.pod:2422
38410 msgid "If this works successfully you will see messages such as:"
38414 #: ../src/guestfs.pod:2424
38417 " febootstrap: picked /sys/block/vdb/dev as root device\n"
38418 " febootstrap: creating /dev/root as block special 252:16\n"
38419 " febootstrap: mounting new root on /root\n"
38420 " febootstrap: chroot\n"
38421 " Starting /init script ...\n"
38426 #: ../src/guestfs.pod:2430
38428 "Note that C<Starting /init script ...> indicates that the appliance's init "
38429 "script is now running."
38433 #: ../src/guestfs.pod:2433
38434 msgid "Initialize the appliance"
38438 #: ../src/guestfs.pod:2435
38440 "The appliance itself now initializes itself. This involves starting certain "
38441 "processes like C<udev>, possibly printing some debug information, and "
38442 "finally running the daemon (C<guestfsd>)."
38446 #: ../src/guestfs.pod:2439
38451 #: ../src/guestfs.pod:2441
38453 "Finally the daemon (C<guestfsd>) runs inside the appliance. If it runs you "
38458 #: ../src/guestfs.pod:2444
38461 " verbose daemon enabled\n"
38466 #: ../src/guestfs.pod:2446
38468 "The daemon expects to see a named virtio-serial port exposed by qemu and "
38469 "connected on the other end to the library."
38473 #: ../src/guestfs.pod:2449
38475 "The daemon connects to this port (and hence to the library) and sends a four "
38476 "byte message C<GUESTFS_LAUNCH_FLAG>, which initiates the communication "
38477 "protocol (see below)."
38481 #: ../src/guestfs.pod:2455
38482 msgid "COMMUNICATION PROTOCOL"
38486 #: ../src/guestfs.pod:2457
38488 "Don't rely on using this protocol directly. This section documents how it "
38489 "currently works, but it may change at any time."
38493 #: ../src/guestfs.pod:2460
38495 "The protocol used to talk between the library and the daemon running inside "
38496 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
38497 "1014, RFC 1832, RFC 4506)."
38501 #: ../src/guestfs.pod:2464
38503 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
38504 "this file is automatically generated)."
38508 #: ../src/guestfs.pod:2467
38510 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
38511 "and C<FileOut> parameters, which are handled with very simple request/reply "
38512 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
38513 "parameters, which use the same request and reply messages, but they may also "
38514 "be followed by files sent using a chunked encoding."
38518 #: ../src/guestfs.pod:2474
38519 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
38523 #: ../src/guestfs.pod:2476
38524 msgid "For ordinary functions, the request message is:"
38528 #: ../src/guestfs.pod:2478
38531 " total length (header + arguments,\n"
38532 " but not including the length word itself)\n"
38533 " struct guestfs_message_header (encoded as XDR)\n"
38534 " struct guestfs_<foo>_args (encoded as XDR)\n"
38539 #: ../src/guestfs.pod:2483
38541 "The total length field allows the daemon to allocate a fixed size buffer "
38542 "into which it slurps the rest of the message. As a result, the total length "
38543 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
38544 "effective size of any request is limited to somewhere under this size."
38548 #: ../src/guestfs.pod:2489
38550 "Note also that many functions don't take any arguments, in which case the "
38551 "C<guestfs_I<foo>_args> is completely omitted."
38555 #: ../src/guestfs.pod:2492
38557 "The header contains the procedure number (C<guestfs_proc>) which is how the "
38558 "receiver knows what type of args structure to expect, or none at all."
38562 #: ../src/guestfs.pod:2496
38564 "For functions that take optional arguments, the optional arguments are "
38565 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
38566 "arguments. A bitmask in the header indicates which optional arguments are "
38567 "meaningful. The bitmask is also checked to see if it contains bits set "
38568 "which the daemon does not know about (eg. if more optional arguments were "
38569 "added in a later version of the library), and this causes the call to be "
38574 #: ../src/guestfs.pod:2504
38575 msgid "The reply message for ordinary functions is:"
38579 #: ../src/guestfs.pod:2506
38582 " total length (header + ret,\n"
38583 " but not including the length word itself)\n"
38584 " struct guestfs_message_header (encoded as XDR)\n"
38585 " struct guestfs_<foo>_ret (encoded as XDR)\n"
38590 #: ../src/guestfs.pod:2511
38592 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
38593 "functions that return no formal return values."
38597 #: ../src/guestfs.pod:2514
38598 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
38602 #: ../src/guestfs.pod:2517
38604 "In the case of an error, a flag is set in the header, and the reply message "
38605 "is slightly changed:"
38609 #: ../src/guestfs.pod:2520
38612 " total length (header + error,\n"
38613 " but not including the length word itself)\n"
38614 " struct guestfs_message_header (encoded as XDR)\n"
38615 " struct guestfs_message_error (encoded as XDR)\n"
38620 #: ../src/guestfs.pod:2525
38622 "The C<guestfs_message_error> structure contains the error message as a "
38627 #: ../src/guestfs.pod:2528
38628 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
38632 #: ../src/guestfs.pod:2530
38634 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
38635 "The normal request message is sent (see above). However this is followed by "
38636 "a sequence of file chunks."
38640 #: ../src/guestfs.pod:2534
38643 " total length (header + arguments,\n"
38644 " but not including the length word itself,\n"
38645 " and not including the chunks)\n"
38646 " struct guestfs_message_header (encoded as XDR)\n"
38647 " struct guestfs_<foo>_args (encoded as XDR)\n"
38648 " sequence of chunks for FileIn param #0\n"
38649 " sequence of chunks for FileIn param #1 etc.\n"
38654 #: ../src/guestfs.pod:2542
38655 msgid "The \"sequence of chunks\" is:"
38659 #: ../src/guestfs.pod:2544
38662 " length of chunk (not including length word itself)\n"
38663 " struct guestfs_chunk (encoded as XDR)\n"
38664 " length of chunk\n"
38665 " struct guestfs_chunk (encoded as XDR)\n"
38667 " length of chunk\n"
38668 " struct guestfs_chunk (with data.data_len == 0)\n"
38673 #: ../src/guestfs.pod:2552
38675 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
38676 "is set in the final chunk to indicate either successful completion or early "
38681 #: ../src/guestfs.pod:2556
38683 "At time of writing there are no functions that have more than one FileIn "
38684 "parameter. However this is (theoretically) supported, by sending the "
38685 "sequence of chunks for each FileIn parameter one after another (from left to "
38690 #: ../src/guestfs.pod:2561
38692 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
38693 "transfer. The library does this by sending a chunk with a special flag set "
38694 "to indicate cancellation. When the daemon sees this, it cancels the whole "
38695 "RPC, does I<not> send any reply, and goes back to reading the next request."
38699 #: ../src/guestfs.pod:2567
38701 "The daemon may also cancel. It does this by writing a special word "
38702 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
38703 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
38704 "cancel chunk). The special word is chosen so that even if cancellation "
38705 "happens right at the end of the transfer (after the library has finished "
38706 "writing and has started listening for the reply), the \"spurious\" cancel "
38707 "flag will not be confused with the reply message."
38711 #: ../src/guestfs.pod:2576
38713 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
38714 "limit), and also files where the size is not known in advance (eg. from "
38715 "pipes or sockets). However the chunks are rather small "
38716 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
38717 "to keep much in memory."
38721 #: ../src/guestfs.pod:2582
38722 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
38726 #: ../src/guestfs.pod:2584
38728 "The protocol for FileOut parameters is exactly the same as for FileIn "
38729 "parameters, but with the roles of daemon and library reversed."
38733 #: ../src/guestfs.pod:2587
38736 " total length (header + ret,\n"
38737 " but not including the length word itself,\n"
38738 " and not including the chunks)\n"
38739 " struct guestfs_message_header (encoded as XDR)\n"
38740 " struct guestfs_<foo>_ret (encoded as XDR)\n"
38741 " sequence of chunks for FileOut param #0\n"
38742 " sequence of chunks for FileOut param #1 etc.\n"
38747 #: ../src/guestfs.pod:2595
38748 msgid "INITIAL MESSAGE"
38752 #: ../src/guestfs.pod:2597
38754 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
38755 "which indicates that the guest and daemon is alive. This is what "
38756 "L</guestfs_launch> waits for."
38760 #: ../src/guestfs.pod:2601
38761 msgid "PROGRESS NOTIFICATION MESSAGES"
38765 #: ../src/guestfs.pod:2603
38767 "The daemon may send progress notification messages at any time. These are "
38768 "distinguished by the normal length word being replaced by "
38769 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
38773 #: ../src/guestfs.pod:2607
38775 "The library turns them into progress callbacks (see "
38776 "L</GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards "
38781 #: ../src/guestfs.pod:2611
38783 "The daemon self-limits the frequency of progress messages it sends (see "
38784 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
38789 #: ../src/guestfs.pod:2615
38790 msgid "LIBGUESTFS VERSION NUMBERS"
38794 #: ../src/guestfs.pod:2617
38796 "Since April 2010, libguestfs has started to make separate development and "
38797 "stable releases, along with corresponding branches in our git repository. "
38798 "These separate releases can be identified by version number:"
38802 #: ../src/guestfs.pod:2622
38805 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
38806 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
38812 " | `-------- sub-version\n"
38814 " `------ always '1' because we don't change the ABI\n"
38819 #: ../src/guestfs.pod:2633
38820 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
38824 #: ../src/guestfs.pod:2635
38826 "As time passes we cherry pick fixes from the development branch and backport "
38827 "those into the stable branch, the effect being that the stable branch should "
38828 "get more stable and less buggy over time. So the stable releases are ideal "
38829 "for people who don't need new features but would just like the software to "
38834 #: ../src/guestfs.pod:2641
38835 msgid "Our criteria for backporting changes are:"
38839 #: ../src/guestfs.pod:2647
38841 "Documentation changes which don't affect any code are backported unless the "
38842 "documentation refers to a future feature which is not in stable."
38846 #: ../src/guestfs.pod:2653
38848 "Bug fixes which are not controversial, fix obvious problems, and have been "
38849 "well tested are backported."
38853 #: ../src/guestfs.pod:2658
38855 "Simple rearrangements of code which shouldn't affect how it works get "
38856 "backported. This is so that the code in the two branches doesn't get too "
38857 "far out of step, allowing us to backport future fixes more easily."
38861 #: ../src/guestfs.pod:2664
38863 "We I<don't> backport new features, new APIs, new tools etc, except in one "
38864 "exceptional case: the new feature is required in order to implement an "
38865 "important bug fix."
38869 #: ../src/guestfs.pod:2670
38871 "A new stable branch starts when we think the new features in development are "
38872 "substantial and compelling enough over the current stable branch to warrant "
38873 "it. When that happens we create new stable and development versions 1.N.0 "
38874 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
38875 "stable at this point, but by backporting fixes from development, that branch "
38876 "will stabilize over time."
38880 #: ../src/guestfs.pod:2678
38881 msgid "EXTENDING LIBGUESTFS"
38885 #: ../src/guestfs.pod:2680
38886 msgid "ADDING A NEW API ACTION"
38890 #: ../src/guestfs.pod:2682
38892 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
38893 "documentation) are generated, and this makes it easy to extend the "
38898 #: ../src/guestfs.pod:2686
38899 msgid "To add a new API action there are two changes:"
38903 #: ../src/guestfs.pod:2692
38905 "You need to add a description of the call (name, parameters, return type, "
38906 "tests, documentation) to C<generator/generator_actions.ml>."
38910 #: ../src/guestfs.pod:2695
38912 "There are two sorts of API action, depending on whether the call goes "
38913 "through to the daemon in the appliance, or is serviced entirely by the "
38914 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
38915 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
38916 "an example of the latter, since a trace flag is maintained in the handle and "
38917 "all tracing is done on the library side."
38921 #: ../src/guestfs.pod:2703
38923 "Most new actions are of the first type, and get added to the "
38924 "C<daemon_functions> list. Each function has a unique procedure number used "
38925 "in the RPC protocol which is assigned to that action when we publish "
38926 "libguestfs and cannot be reused. Take the latest procedure number and "
38931 #: ../src/guestfs.pod:2709
38933 "For library-only actions of the second type, add to the "
38934 "C<non_daemon_functions> list. Since these functions are serviced by the "
38935 "library and do not travel over the RPC mechanism to the daemon, these "
38936 "functions do not need a procedure number, and so the procedure number is set "
38941 #: ../src/guestfs.pod:2717
38942 msgid "Implement the action (in C):"
38946 #: ../src/guestfs.pod:2719
38948 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
38949 "C<daemon/> directory."
38953 #: ../src/guestfs.pod:2722
38955 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
38956 "(note: double underscore) in the C<src/> directory."
38960 #: ../src/guestfs.pod:2725
38961 msgid "In either case, use another function as an example of what to do."
38965 #: ../src/guestfs.pod:2729
38966 msgid "After making these changes, use C<make> to compile."
38970 #: ../src/guestfs.pod:2731
38972 "Note that you don't need to implement the RPC, language bindings, manual "
38973 "pages or anything else. It's all automatically generated from the OCaml "
38978 #: ../src/guestfs.pod:2735
38979 msgid "ADDING TESTS FOR AN API ACTION"
38983 #: ../src/guestfs.pod:2737
38985 "You can supply zero or as many tests as you want per API call. The tests "
38986 "can either be added as part of the API description "
38987 "(C<generator/generator_actions.ml>), or in some rarer cases you may want to "
38988 "drop a script into C<regressions/>. Note that adding a script to "
38989 "C<regressions/> is slower, so if possible use the first method."
38993 #: ../src/guestfs.pod:2743
38995 "The following describes the test environment used when you add an API test "
38996 "in C<generator_actions.ml>."
39000 #: ../src/guestfs.pod:2746
39001 msgid "The test environment has 4 block devices:"
39005 #: ../src/guestfs.pod:2750
39006 msgid "C</dev/sda> 500MB"
39010 #: ../src/guestfs.pod:2752
39011 msgid "General block device for testing."
39015 #: ../src/guestfs.pod:2754
39016 msgid "C</dev/sdb> 50MB"
39020 #: ../src/guestfs.pod:2756
39022 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
39027 #: ../src/guestfs.pod:2759
39028 msgid "C</dev/sdc> 10MB"
39032 #: ../src/guestfs.pod:2761
39033 msgid "Used in a few tests where two block devices are needed."
39037 #: ../src/guestfs.pod:2763
39038 msgid "C</dev/sdd>"
39042 #: ../src/guestfs.pod:2765
39043 msgid "ISO with fixed content (see C<images/test.iso>)."
39047 #: ../src/guestfs.pod:2769
39049 "To be able to run the tests in a reasonable amount of time, the libguestfs "
39050 "appliance and block devices are reused between tests. So don't try testing "
39051 "L</guestfs_kill_subprocess> :-x"
39055 #: ../src/guestfs.pod:2773
39057 "Each test starts with an initial scenario, selected using one of the "
39058 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
39059 "initialize the disks mentioned above in a particular way as documented in "
39060 "C<generator_types.ml>. You should not assume anything about the previous "
39061 "contents of other disks that are not initialized."
39065 #: ../src/guestfs.pod:2779
39067 "You can add a prerequisite clause to any individual test. This is a "
39068 "run-time check, which, if it fails, causes the test to be skipped. Useful "
39069 "if testing a command which might not work on all variations of libguestfs "
39070 "builds. A test that has prerequisite of C<Always> means to run "
39075 #: ../src/guestfs.pod:2785
39077 "In addition, packagers can skip individual tests by setting environment "
39078 "variables before running C<make check>."
39082 #: ../src/guestfs.pod:2788
39085 " SKIP_TEST_<CMD>_<NUM>=1\n"
39090 #: ../src/guestfs.pod:2790
39091 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
39095 #: ../src/guestfs.pod:2792
39100 #: ../src/guestfs.pod:2794
39103 " SKIP_TEST_<CMD>=1\n"
39108 #: ../src/guestfs.pod:2796
39109 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
39113 #: ../src/guestfs.pod:2798
39114 msgid "Packagers can run only certain tests by setting for example:"
39118 #: ../src/guestfs.pod:2800
39121 " TEST_ONLY=\"vfs_type zerofree\"\n"
39126 #: ../src/guestfs.pod:2802
39128 "See C<capitests/tests.c> for more details of how these environment variables "
39133 #: ../src/guestfs.pod:2805
39134 msgid "DEBUGGING NEW API ACTIONS"
39138 #: ../src/guestfs.pod:2807
39139 msgid "Test new actions work before submitting them."
39143 #: ../src/guestfs.pod:2809
39144 msgid "You can use guestfish to try out new commands."
39148 #: ../src/guestfs.pod:2811
39150 "Debugging the daemon is a problem because it runs inside a minimal "
39151 "environment. However you can fprintf messages in the daemon to stderr, and "
39152 "they will show up if you use C<guestfish -v>."
39156 #: ../src/guestfs.pod:2815
39157 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
39161 #: ../src/guestfs.pod:2817
39163 "Our C source code generally adheres to some basic code-formatting "
39164 "conventions. The existing code base is not totally consistent on this "
39165 "front, but we do prefer that contributed code be formatted similarly. In "
39166 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
39167 "indentation level, and other than that, follow the K&R style."
39171 #: ../src/guestfs.pod:2823
39173 "If you use Emacs, add the following to one of one of your start-up files "
39174 "(e.g., ~/.emacs), to help ensure that you get indentation right:"
39178 #: ../src/guestfs.pod:2826
39181 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
39182 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
39183 " (add-hook 'find-file-hook\n"
39184 " '(lambda () (if (and buffer-file-name\n"
39185 " (string-match \"/libguestfs\\\\>\"\n"
39186 " (buffer-file-name))\n"
39187 " (not (string-equal mode-name \"Change Log\"))\n"
39188 " (not (string-equal mode-name \"Makefile\")))\n"
39189 " (setq indent-tabs-mode nil))))\n"
39194 #: ../src/guestfs.pod:2836
39197 " ;;; When editing C sources in libguestfs, use this style.\n"
39198 " (defun libguestfs-c-mode ()\n"
39199 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
39201 " (c-set-style \"K&R\")\n"
39202 " (setq c-indent-level 2)\n"
39203 " (setq c-basic-offset 2))\n"
39204 " (add-hook 'c-mode-hook\n"
39205 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
39206 " (buffer-file-name))\n"
39207 " (libguestfs-c-mode))))\n"
39212 #: ../src/guestfs.pod:2848
39213 msgid "Enable warnings when compiling (and fix any problems this finds):"
39217 #: ../src/guestfs.pod:2851
39220 " ./configure --enable-gcc-warnings\n"
39225 #: ../src/guestfs.pod:2853
39226 msgid "Useful targets are:"
39230 #: ../src/guestfs.pod:2855
39233 " make syntax-check # checks the syntax of the C code\n"
39234 " make check # runs the test suite\n"
39239 #: ../src/guestfs.pod:2858
39240 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
39244 #: ../src/guestfs.pod:2860
39246 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
39247 "which are used to do shell quoting."
39251 #: ../src/guestfs.pod:2865
39256 #: ../src/guestfs.pod:2867
39258 "Simple shell quoted string. Any spaces or other shell characters are "
39263 #: ../src/guestfs.pod:2870
39268 #: ../src/guestfs.pod:2872
39270 "Same as C<%Q> except the string is treated as a path which is prefixed by "
39275 #: ../src/guestfs.pod:2879
39278 " asprintf (&cmd, \"cat %R\", path);\n"
39283 #: ../src/guestfs.pod:2881
39284 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
39288 #: ../src/guestfs.pod:2883
39290 "I<Note:> Do I<not> use these when you are passing parameters to the "
39291 "C<command{,r,v,rv}()> functions. These parameters do NOT need to be quoted "
39292 "because they are not passed via the shell (instead, straight to exec). You "
39293 "probably want to use the C<sysroot_path()> function however."
39297 #: ../src/guestfs.pod:2889
39298 msgid "SUBMITTING YOUR NEW API ACTIONS"
39302 #: ../src/guestfs.pod:2891
39304 "Submit patches to the mailing list: "
39305 "L<http://www.redhat.com/mailman/listinfo/libguestfs> and CC to "
39306 "L<rjones@redhat.com>."
39310 #: ../src/guestfs.pod:2895
39311 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
39315 #: ../src/guestfs.pod:2897
39316 msgid "We support i18n (gettext anyhow) in the library."
39320 #: ../src/guestfs.pod:2899
39322 "However many messages come from the daemon, and we don't translate those at "
39323 "the moment. One reason is that the appliance generally has all locale files "
39324 "removed from it, because they take up a lot of space. So we'd have to readd "
39325 "some of those, as well as copying our PO files into the appliance."
39329 #: ../src/guestfs.pod:2905
39331 "Debugging messages are never translated, since they are intended for the "
39336 #: ../src/guestfs.pod:2908
39337 msgid "SOURCE CODE SUBDIRECTORIES"
39341 #: ../src/guestfs.pod:2912
39346 #: ../src/guestfs.pod:2914
39347 msgid "L<virt-alignment-scan(1)> command and documentation."
39351 #: ../src/guestfs.pod:2918
39352 msgid "The libguestfs appliance, build scripts and so on."
39356 #: ../src/guestfs.pod:2920
39357 msgid "C<capitests>"
39361 #: ../src/guestfs.pod:2922
39362 msgid "Automated tests of the C API."
39366 #: ../src/guestfs.pod:2924
39371 #: ../src/guestfs.pod:2926
39373 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
39378 #: ../src/guestfs.pod:2929
39383 #: ../src/guestfs.pod:2931
39385 "Safety and liveness tests of components that libguestfs depends upon (not of "
39386 "libguestfs itself). Mainly this is for qemu and the kernel."
39390 #: ../src/guestfs.pod:2934
39395 #: ../src/guestfs.pod:2936
39397 "Tools for cloning virtual machines. Currently contains L<virt-sysprep(1)> "
39398 "command and documentation."
39402 #: ../src/guestfs.pod:2939
39407 #: ../src/guestfs.pod:2941
39408 msgid "Outside contributions, experimental parts."
39412 #: ../src/guestfs.pod:2943
39417 #: ../src/guestfs.pod:2945
39419 "The daemon that runs inside the libguestfs appliance and carries out "
39424 #: ../src/guestfs.pod:2948
39429 #: ../src/guestfs.pod:2950
39430 msgid "L<virt-df(1)> command and documentation."
39434 #: ../src/guestfs.pod:2952
39439 #: ../src/guestfs.pod:2954
39440 msgid "L<virt-edit(1)> command and documentation."
39444 #: ../src/guestfs.pod:2956
39445 msgid "C<examples>"
39449 #: ../src/guestfs.pod:2958
39450 msgid "C API example code."
39454 #: ../src/guestfs.pod:2960
39459 #: ../src/guestfs.pod:2962
39461 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
39462 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
39463 "L<virt-tar-out(1)>."
39467 #: ../src/guestfs.pod:2966
39472 #: ../src/guestfs.pod:2968
39473 msgid "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
39477 #: ../src/guestfs.pod:2970
39478 msgid "C<generator>"
39482 #: ../src/guestfs.pod:2972
39484 "The crucially important generator, used to automatically generate large "
39485 "amounts of boilerplate C code for things like RPC and bindings."
39489 #: ../src/guestfs.pod:2975
39494 #: ../src/guestfs.pod:2977
39495 msgid "Files used by the test suite."
39499 #: ../src/guestfs.pod:2979
39500 msgid "Some \"phony\" guest images which we test against."
39504 #: ../src/guestfs.pod:2981
39505 msgid "C<inspector>"
39509 #: ../src/guestfs.pod:2983
39510 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
39514 #: ../src/guestfs.pod:2985
39519 #: ../src/guestfs.pod:2987
39520 msgid "Logo used on the website. The fish is called Arthur by the way."
39524 #: ../src/guestfs.pod:2989
39529 #: ../src/guestfs.pod:2991
39530 msgid "M4 macros used by autoconf."
39534 #: ../src/guestfs.pod:2993
39539 #: ../src/guestfs.pod:2995
39540 msgid "Translations of simple gettext strings."
39544 #: ../src/guestfs.pod:2997
39549 #: ../src/guestfs.pod:2999
39551 "The build infrastructure and PO files for translations of manpages and POD "
39552 "files. Eventually this will be combined with the C<po> directory, but that "
39553 "is rather complicated."
39557 #: ../src/guestfs.pod:3003
39558 msgid "C<regressions>"
39562 #: ../src/guestfs.pod:3005
39563 msgid "Regression tests."
39567 #: ../src/guestfs.pod:3007
39572 #: ../src/guestfs.pod:3009
39573 msgid "L<virt-rescue(1)> command and documentation."
39577 #: ../src/guestfs.pod:3011
39582 #: ../src/guestfs.pod:3013
39583 msgid "L<virt-resize(1)> command and documentation."
39587 #: ../src/guestfs.pod:3015
39588 msgid "C<sparsify>"
39592 #: ../src/guestfs.pod:3017
39593 msgid "L<virt-sparsify(1)> command and documentation."
39597 #: ../src/guestfs.pod:3019
39602 #: ../src/guestfs.pod:3021
39603 msgid "Source code to the C library."
39607 #: ../src/guestfs.pod:3023
39612 #: ../src/guestfs.pod:3025
39613 msgid "Command line tools written in Perl (L<virt-win-reg(1)> and many others)."
39617 #: ../src/guestfs.pod:3027
39618 msgid "C<test-tool>"
39622 #: ../src/guestfs.pod:3029
39624 "Test tool for end users to test if their qemu/kernel combination will work "
39629 #: ../src/guestfs.pod:3032
39634 #: ../src/guestfs.pod:3034
39639 #: ../src/guestfs.pod:3036
39644 #: ../src/guestfs.pod:3038
39649 #: ../src/guestfs.pod:3040
39654 #: ../src/guestfs.pod:3042
39659 #: ../src/guestfs.pod:3044
39664 #: ../src/guestfs.pod:3046
39669 #: ../src/guestfs.pod:3048
39674 #: ../src/guestfs.pod:3050
39675 msgid "Language bindings."
39679 #: ../src/guestfs.pod:3054
39680 msgid "MAKING A STABLE RELEASE"
39684 #: ../src/guestfs.pod:3056
39686 "When we make a stable release, there are several steps documented here. See "
39687 "L</LIBGUESTFS VERSION NUMBERS> for general information about the stable "
39692 #: ../src/guestfs.pod:3064
39693 msgid "Check C<make && make check> works on at least Fedora, Debian and Ubuntu."
39697 #: ../src/guestfs.pod:3069
39698 msgid "Finalize RELEASE-NOTES."
39702 #: ../src/guestfs.pod:3073
39703 msgid "Update ROADMAP."
39707 #: ../src/guestfs.pod:3077
39708 msgid "Run C<src/api-support/update-from-tarballs.sh>."
39712 #: ../src/guestfs.pod:3081
39713 msgid "Push and pull from Transifex."
39717 #: ../src/guestfs.pod:3083
39722 #: ../src/guestfs.pod:3085
39730 #: ../src/guestfs.pod:3087
39731 msgid "to push the latest POT files to Transifex. Then run:"
39735 #: ../src/guestfs.pod:3089
39743 #: ../src/guestfs.pod:3091
39744 msgid "which is a wrapper to pull the latest translated C<*.po> files."
39748 #: ../src/guestfs.pod:3095
39750 "Create new stable and development directories under "
39751 "L<http://libguestfs.org/download>."
39755 #: ../src/guestfs.pod:3100
39756 msgid "Create the branch in git:"
39760 #: ../src/guestfs.pod:3102
39763 " git tag -a 1.XX.0 -m \"Version 1.XX.0 (stable)\"\n"
39764 " git tag -a 1.YY.0 -m \"Version 1.YY.0 (development)\"\n"
39765 " git branch stable-1.XX\n"
39766 " git push origin tag 1.XX.0 1.YY.0 stable-1.XX\n"
39771 #: ../src/guestfs.pod:3109
39776 #: ../src/guestfs.pod:3111
39777 msgid "PROTOCOL LIMITS"
39781 #: ../src/guestfs.pod:3113
39783 "Internally libguestfs uses a message-based protocol to pass API calls and "
39784 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
39785 "plenty more detail about this). The maximum message size used by the "
39786 "protocol is slightly less than 4 MB. For some API calls you may need to be "
39787 "aware of this limit. The API calls which may be affected are individually "
39788 "documented, with a link back to this section of the documentation."
39792 #: ../src/guestfs.pod:3121
39794 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
39795 "a simple string. Because this string is at some point internally encoded as "
39796 "a message, the maximum size that it can return is slightly under 4 MB. If "
39797 "the requested file is larger than this then you will get an error."
39801 #: ../src/guestfs.pod:3127
39803 "In order to transfer large files into and out of the guest filesystem, you "
39804 "need to use particular calls that support this. The sections L</UPLOADING> "
39805 "and L</DOWNLOADING> document how to do this."
39809 #: ../src/guestfs.pod:3131
39811 "You might also consider mounting the disk image using our FUSE filesystem "
39812 "support (L<guestmount(1)>)."
39816 #: ../src/guestfs.pod:3134
39817 msgid "MAXIMUM NUMBER OF DISKS"
39821 #: ../src/guestfs.pod:3136
39822 msgid "When using virtio disks (the default) the current limit is B<25> disks."
39826 #: ../src/guestfs.pod:3139
39828 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
39829 "slots. However febootstrap only understands disks with names C</dev/vda> "
39830 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
39835 #: ../src/guestfs.pod:3144
39837 "We are working to substantially raise this limit in future versions but it "
39838 "requires complex changes to qemu."
39842 #: ../src/guestfs.pod:3147
39844 "In future versions of libguestfs it should also be possible to \"hot plug\" "
39845 "disks (add and remove disks after calling L</guestfs_launch>). This also "
39846 "requires changes to qemu."
39850 #: ../src/guestfs.pod:3151
39851 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
39855 #: ../src/guestfs.pod:3153
39856 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
39860 #: ../src/guestfs.pod:3155
39862 "This is because it reserves 4 bits for the minor device number (thus "
39863 "C</dev/vda>, and C</dev/vda1> through C</dev/vda15>)."
39867 #: ../src/guestfs.pod:3158
39869 "If you attach a disk with more than 15 partitions, the extra partitions are "
39870 "ignored by libguestfs."
39874 #: ../src/guestfs.pod:3161
39875 msgid "MAXIMUM SIZE OF A DISK"
39879 #: ../src/guestfs.pod:3163
39880 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
39884 #: ../src/guestfs.pod:3165
39886 "We have tested block devices up to 1 exabyte (2**60 or "
39887 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
39892 #: ../src/guestfs.pod:3169
39894 "Although libguestfs probably does not impose any limit, the underlying host "
39895 "storage will. If you store disk images on a host ext4 filesystem, then the "
39896 "maximum size will be limited by the maximum ext4 file size (currently 16 "
39897 "TB). If you store disk images as host logical volumes then you are limited "
39898 "by the maximum size of an LV."
39902 #: ../src/guestfs.pod:3175
39904 "For the hugest disk image files, we recommend using XFS on the host for "
39909 #: ../src/guestfs.pod:3178
39910 msgid "MAXIMUM SIZE OF A PARTITION"
39914 #: ../src/guestfs.pod:3180
39916 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
39917 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
39918 "address a partition located beyond 2 TB on the disk."
39922 #: ../src/guestfs.pod:3184
39924 "It is recommended that you use GPT partitions on disks which are larger than "
39925 "this size. GPT uses 64 bit sector numbers and so can address partitions "
39926 "which are theoretically larger than the largest disk we could support."
39930 #: ../src/guestfs.pod:3189
39931 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
39935 #: ../src/guestfs.pod:3191
39937 "This depends on the filesystem type. libguestfs itself does not impose any "
39938 "known limit. Consult Wikipedia or the filesystem documentation to find out "
39939 "what these limits are."
39943 #: ../src/guestfs.pod:3195
39944 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
39948 #: ../src/guestfs.pod:3197
39950 "The API functions L</guestfs_upload>, L</guestfs_download>, "
39951 "L</guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
39952 "uploads and downloads."
39956 #: ../src/guestfs.pod:3201
39957 msgid "INSPECTION LIMITS"
39961 #: ../src/guestfs.pod:3203
39963 "The inspection code has several arbitrary limits on things like the size of "
39964 "Windows Registry hive it will read, and the length of product name. These "
39965 "are intended to stop a malicious guest from consuming arbitrary amounts of "
39966 "memory and disk space on the host, and should not be reached in practice. "
39967 "See the source code for more information."
39971 #: ../src/guestfs.pod:3229
39973 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
39974 "effect as calling C<guestfs_set_verbose (g, 1)>."
39978 #: ../src/guestfs.pod:3241
39980 "Set the path that libguestfs uses to search for a supermin appliance. See "
39981 "the discussion of paths in section L</PATH> above."
39985 #: ../src/guestfs.pod:3250
39986 msgid "See also L</QEMU WRAPPERS> above."
39990 #: ../src/guestfs.pod:3254
39992 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
39993 "effect as calling C<guestfs_set_trace (g, 1)>."
39997 #: ../src/guestfs.pod:3272
39999 "L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, "
40000 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
40001 "L<guestfs-ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, "
40002 "L<virt-alignment-scan(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
40003 "L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)>, "
40004 "L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
40005 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
40006 "L<virt-rescue(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, "
40007 "L<virt-sysprep(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, "
40008 "L<virt-win-reg(1)>, L<qemu(1)>, L<febootstrap(1)>, "
40009 "L<febootstrap-supermin-helper(8)>, L<hivex(3)>, L<stap(1)>, "
40010 "L<http://libguestfs.org/>."
40014 #: ../src/guestfs.pod:3308
40016 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
40017 "L<lvm(8)>, L<disktype(1)>."
40021 #: ../src/guestfs.pod:3315 ../tools/virt-make-fs.pl:571 ../tools/virt-win-reg.pl:772
40026 #: ../src/guestfs.pod:3317
40027 msgid "To get a list of bugs against libguestfs use this link:"
40031 #: ../src/guestfs.pod:3319
40032 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
40036 #: ../src/guestfs.pod:3321
40037 msgid "To report a new bug against libguestfs use this link:"
40041 #: ../src/guestfs.pod:3323
40042 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
40046 #: ../src/guestfs.pod:3325
40047 msgid "When reporting a bug, please check:"
40051 #: ../src/guestfs.pod:3331
40052 msgid "That the bug hasn't been reported already."
40056 #: ../src/guestfs.pod:3335
40057 msgid "That you are testing a recent version."
40061 #: ../src/guestfs.pod:3339
40062 msgid "Describe the bug accurately, and give a way to reproduce it."
40066 #: ../src/guestfs.pod:3343
40068 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
40073 #: ../test-tool/libguestfs-test-tool.pod:5
40074 msgid "libguestfs-test-tool - Diagnostics for libguestfs"
40078 #: ../test-tool/libguestfs-test-tool.pod:9
40081 " libguestfs-test-tool [--options]\n"
40086 #: ../test-tool/libguestfs-test-tool.pod:13
40088 "libguestfs-test-tool is a test program shipped with libguestfs to allow you "
40089 "to check basic libguestfs functionality is working. This is needed because "
40090 "libguestfs occasionally breaks for reasons beyond our control: usually "
40091 "because of changes in the underlying qemu or kernel packages, or the host "
40096 #: ../test-tool/libguestfs-test-tool.pod:19
40097 msgid "If you suspect a problem in libguestfs, then just run:"
40101 #: ../test-tool/libguestfs-test-tool.pod:21
40104 " libguestfs-test-tool\n"
40109 #: ../test-tool/libguestfs-test-tool.pod:23
40110 msgid "It will print lots of diagnostic messages."
40114 #: ../test-tool/libguestfs-test-tool.pod:25
40115 msgid "If it runs to completion successfully, you will see this near the end:"
40119 #: ../test-tool/libguestfs-test-tool.pod:27
40122 " ===== TEST FINISHED OK =====\n"
40127 #: ../test-tool/libguestfs-test-tool.pod:29
40128 msgid "and the test tool will exit with code 0."
40132 #: ../test-tool/libguestfs-test-tool.pod:31
40134 "If it fails (and/or exits with non-zero error code), please paste the "
40135 "I<complete, unedited> output of the test tool into a bug report. More "
40136 "information about reporting bugs can be found on the "
40137 "L<http://libguestfs.org/> website."
40141 #: ../test-tool/libguestfs-test-tool.pod:42
40142 msgid "Display short usage information and exit."
40146 #: ../test-tool/libguestfs-test-tool.pod:44
40147 msgid "B<--qemu qemu_binary>"
40151 #: ../test-tool/libguestfs-test-tool.pod:46
40153 "If you have downloaded another qemu binary, point this option at the full "
40154 "path of the binary to try it."
40158 #: ../test-tool/libguestfs-test-tool.pod:49
40159 msgid "B<--qemudir qemu_source_dir>"
40163 #: ../test-tool/libguestfs-test-tool.pod:51
40165 "If you have compiled qemu from source, point this option at the source "
40166 "directory to try it."
40170 #: ../test-tool/libguestfs-test-tool.pod:54
40175 #: ../test-tool/libguestfs-test-tool.pod:56
40176 msgid "B<--timeout N>"
40180 #: ../test-tool/libguestfs-test-tool.pod:58
40182 "Set the launch timeout to C<N> seconds. The default is 600 seconds (10 "
40183 "minutes) which does not usually need to be adjusted."
40187 #: ../test-tool/libguestfs-test-tool.pod:63
40188 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
40192 #: ../test-tool/libguestfs-test-tool.pod:65
40194 "If you have compiled another version of qemu from source and would like to "
40195 "try that, then you can use the I<--qemudir> option to point to the qemu "
40196 "source directory."
40200 #: ../test-tool/libguestfs-test-tool.pod:69
40202 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
40203 "option to point to the binary."
40207 #: ../test-tool/libguestfs-test-tool.pod:72
40209 "Note when using these options, you can ignore the business of qemu wrapper "
40210 "scripts (L<guestfs(3)/QEMU WRAPPERS>), since libguestfs-test-tool writes a "
40211 "wrapper script for you if one is needed."
40215 #: ../test-tool/libguestfs-test-tool.pod:76
40216 msgid "TRYING OUT A DIFFERENT KERNEL"
40220 #: ../test-tool/libguestfs-test-tool.pod:78
40222 "If you are using febootstrap E<ge> 3.8 then you can select which kernel "
40223 "libguestfs tries. You do this by setting the environment variables "
40224 "C<FEBOOTSTRAP_KERNEL> and/or C<FEBOOTSTRAP_MODULES>."
40228 #: ../test-tool/libguestfs-test-tool.pod:82
40230 "Refer to L<febootstrap-supermin-helper(8)/ENVIRONMENT VARIABLES> for further "
40235 #: ../test-tool/libguestfs-test-tool.pod:85
40236 msgid "SELF-DIAGNOSIS"
40240 #: ../test-tool/libguestfs-test-tool.pod:87
40242 "Refer to L<guestfs(3)/APPLIANCE BOOT PROCESS> to understand the messages "
40243 "produced by libguestfs-test-tool and/or possible errors."
40247 #: ../test-tool/libguestfs-test-tool.pod:92
40249 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
40250 "I<1> if there was an error."
40254 #: ../test-tool/libguestfs-test-tool.pod:97
40256 "For the full list of environment variables which may affect libguestfs, "
40257 "please see the L<guestfs(3)> manual page."
40261 #: ../test-tool/libguestfs-test-tool.pod:102
40262 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
40266 #: ../tools/virt-list-filesystems.pl:32
40267 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
40271 #: ../tools/virt-list-filesystems.pl:36
40274 " virt-list-filesystems [--options] domname\n"
40279 #: ../tools/virt-list-filesystems.pl:38
40282 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
40287 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
40289 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
40294 #: ../tools/virt-list-filesystems.pl:45
40296 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
40297 "are contained in a virtual machine or disk image."
40301 #: ../tools/virt-list-filesystems.pl:49
40303 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
40304 "functionality. For more complex cases you should look at the "
40305 "L<guestfish(1)> tool."
40309 #: ../tools/virt-list-filesystems.pl:112
40311 "With this option, C<virt-list-filesystems> displays the type of each "
40312 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
40316 #: ../tools/virt-list-filesystems.pl:119
40321 #: ../tools/virt-list-filesystems.pl:123
40323 "Normally we only show mountable filesystems. If this option is given then "
40324 "swap devices are shown too."
40328 #: ../tools/virt-list-filesystems.pl:197
40330 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
40331 "L<virt-filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, "
40332 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
40336 #: ../tools/virt-list-filesystems.pl:214 ../tools/virt-tar.pl:317
40337 msgid "Copyright (C) 2009 Red Hat Inc."
40341 #: ../tools/virt-list-partitions.pl:32
40342 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
40346 #: ../tools/virt-list-partitions.pl:36
40349 " virt-list-partitions [--options] domname\n"
40354 #: ../tools/virt-list-partitions.pl:38
40357 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
40362 #: ../tools/virt-list-partitions.pl:45
40364 "C<virt-list-partitions> is a command line tool to list the partitions that "
40365 "are contained in a virtual machine or disk image. It is mainly useful as a "
40366 "first step to using L<virt-resize(1)>."
40370 #: ../tools/virt-list-partitions.pl:50
40372 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
40373 "functionality. For more complex cases you should look at the "
40374 "L<guestfish(1)> tool."
40378 #: ../tools/virt-list-partitions.pl:113
40379 msgid "Show sizes in human-readable form (eg. \"1G\")."
40383 #: ../tools/virt-list-partitions.pl:123
40385 "With this option, C<virt-list-partitions> displays the type and size of each "
40386 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
40390 #: ../tools/virt-list-partitions.pl:130
40395 #: ../tools/virt-list-partitions.pl:132
40400 #: ../tools/virt-list-partitions.pl:134
40401 msgid "Display the total size of each block device (as a separate row or rows)."
40405 #: ../tools/virt-list-partitions.pl:267
40407 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
40408 "L<virt-list-filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, "
40409 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
40413 #: ../tools/virt-list-partitions.pl:283
40414 msgid "Copyright (C) 2009-2010 Red Hat Inc."
40418 #: ../tools/virt-make-fs.pl:37
40419 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
40423 #: ../tools/virt-make-fs.pl:41
40426 " virt-make-fs [--options] input.tar output.img\n"
40431 #: ../tools/virt-make-fs.pl:43
40434 " virt-make-fs [--options] input.tar.gz output.img\n"
40439 #: ../tools/virt-make-fs.pl:45
40442 " virt-make-fs [--options] directory output.img\n"
40447 #: ../tools/virt-make-fs.pl:49
40449 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
40450 "archive or some files in a directory. It is similar to tools like "
40451 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
40452 "it can create common filesystem types like ext2/3 or NTFS, which can be "
40453 "useful if you want to attach these filesystems to existing virtual machines "
40454 "(eg. to import large amounts of read-only data to a VM)."
40458 #: ../tools/virt-make-fs.pl:57
40459 msgid "Basic usage is:"
40463 #: ../tools/virt-make-fs.pl:59
40466 " virt-make-fs input output.img\n"
40471 #: ../tools/virt-make-fs.pl:61
40473 "where C<input> is either a directory containing files that you want to add, "
40474 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
40475 "C<output.img> is a disk image. The input type is detected automatically. "
40476 "The output disk image defaults to a raw ext2 sparse image unless you specify "
40477 "extra flags (see L</OPTIONS> below)."
40481 #: ../tools/virt-make-fs.pl:67
40482 msgid "FILESYSTEM TYPE"
40486 #: ../tools/virt-make-fs.pl:69
40488 "The default filesystem type is C<ext2>. Just about any filesystem type that "
40489 "libguestfs supports can be used (but I<not> read-only formats like "
40490 "ISO9660). Here are some of the more common choices:"
40494 #: ../tools/virt-make-fs.pl:75
40499 #: ../tools/virt-make-fs.pl:77
40501 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
40502 "you are not going to use the filesystem in a way that requires the journal, "
40503 "then this is just wasted overhead."
40507 #: ../tools/virt-make-fs.pl:81
40508 msgid "I<ntfs> or I<vfat>"
40512 #: ../tools/virt-make-fs.pl:83
40513 msgid "Useful if exporting data to a Windows guest."
40517 #: ../tools/virt-make-fs.pl:85
40519 "I<Note for vfat>: The tar archive or local directory must only contain files "
40520 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
40521 "program running within libguestfs is unable to change the ownership of "
40522 "non-root files, since vfat itself does not support this."
40526 #: ../tools/virt-make-fs.pl:90
40531 #: ../tools/virt-make-fs.pl:92
40533 "Lower overhead than C<ext2>, but certain limitations on filename length and "
40534 "total filesystem size."
40538 #: ../tools/virt-make-fs.pl:97 ../tools/virt-make-fs.pl:116 ../tools/virt-make-fs.pl:149
40543 #: ../tools/virt-make-fs.pl:99
40546 " virt-make-fs --type=minix input minixfs.img\n"
40551 #: ../tools/virt-make-fs.pl:101
40552 msgid "TO PARTITION OR NOT TO PARTITION"
40556 #: ../tools/virt-make-fs.pl:103
40557 msgid "Optionally virt-make-fs can add a partition table to the output disk."
40561 #: ../tools/virt-make-fs.pl:105
40563 "Adding a partition can make the disk image more compatible with certain "
40564 "virtualized operating systems which don't expect to see a filesystem "
40565 "directly located on a block device (Linux doesn't care and will happily "
40566 "handle both types)."
40570 #: ../tools/virt-make-fs.pl:110
40572 "On the other hand, if you have a partition table then the output image is no "
40573 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
40574 "directly on a partitioned disk image. (However libguestfs tools such as "
40575 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
40579 #: ../tools/virt-make-fs.pl:118
40580 msgid "Add an MBR partition:"
40584 #: ../tools/virt-make-fs.pl:120
40587 " virt-make-fs --partition -- input disk.img\n"
40592 #: ../tools/virt-make-fs.pl:122
40594 "If the output disk image could be terabyte-sized or larger, it's better to "
40595 "use an EFI/GPT-compatible partition table:"
40599 #: ../tools/virt-make-fs.pl:125
40602 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
40607 #: ../tools/virt-make-fs.pl:127
40608 msgid "EXTRA SPACE"
40612 #: ../tools/virt-make-fs.pl:129
40614 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
40615 "the files that it contains, but might have extra space. Depending on how "
40616 "you are going to use the output, you might think this extra space is wasted "
40617 "and want to minimize it, or you might want to leave space so that more files "
40618 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
40619 "but you can use the I<--size> flag to leave space in the filesystem if you "
40624 #: ../tools/virt-make-fs.pl:137
40626 "An alternative way to leave extra space but not make the output image any "
40627 "bigger is to use an alternative disk image format (instead of the default "
40628 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
40629 "image format (check your hypervisor supports this before using it). This "
40630 "allows you to choose a large I<--size> but the extra space won't actually be "
40631 "allocated in the image until you try to store something in it."
40635 #: ../tools/virt-make-fs.pl:145
40637 "Don't forget that you can also use local commands including L<resize2fs(8)> "
40638 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
40639 "to build another image from scratch."
40643 #: ../tools/virt-make-fs.pl:151
40646 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
40651 #: ../tools/virt-make-fs.pl:179
40652 msgid "Enable debugging information."
40656 #: ../tools/virt-make-fs.pl:185
40657 msgid "B<--size=E<lt>NE<gt>>"
40661 #: ../tools/virt-make-fs.pl:187
40662 msgid "B<--size=+E<lt>NE<gt>>"
40666 #: ../tools/virt-make-fs.pl:189
40667 msgid "B<-s E<lt>NE<gt>>"
40671 #: ../tools/virt-make-fs.pl:191
40672 msgid "B<-s +E<lt>NE<gt>>"
40676 #: ../tools/virt-make-fs.pl:193
40677 msgid "Use the I<--size> (or I<-s>) option to choose the size of the output image."
40681 #: ../tools/virt-make-fs.pl:196
40683 "If this option is I<not> given, then the output image will be just large "
40684 "enough to contain all the files, with not much wasted space."
40688 #: ../tools/virt-make-fs.pl:199
40690 "To choose a fixed size output disk, specify an absolute number followed by "
40691 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
40692 "Petabytes or Exabytes. This must be large enough to contain all the input "
40693 "files, else you will get an error."
40697 #: ../tools/virt-make-fs.pl:204
40699 "To leave extra space, specify C<+> (plus sign) and a number followed by "
40700 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
40701 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
40702 "the input files, and (approximately) an extra 200 MB free space."
40706 #: ../tools/virt-make-fs.pl:210
40708 "Note that virt-make-fs estimates free space, and therefore will not produce "
40709 "filesystems containing precisely the free space requested. (It is much more "
40710 "expensive and time-consuming to produce a filesystem which has precisely the "
40711 "desired free space)."
40715 #: ../tools/virt-make-fs.pl:219
40716 msgid "B<--format=E<lt>fmtE<gt>>"
40720 #: ../tools/virt-make-fs.pl:221
40721 msgid "B<-F E<lt>fmtE<gt>>"
40725 #: ../tools/virt-make-fs.pl:223
40726 msgid "Choose the output disk image format."
40730 #: ../tools/virt-make-fs.pl:225
40731 msgid "The default is C<raw> (raw sparse disk image)."
40735 #: ../tools/virt-make-fs.pl:227
40737 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
40738 "that would really make sense here is C<qcow2>."
40742 #: ../tools/virt-make-fs.pl:234
40743 msgid "B<--type=E<lt>fsE<gt>>"
40747 #: ../tools/virt-make-fs.pl:236
40748 msgid "B<-t E<lt>fsE<gt>>"
40752 #: ../tools/virt-make-fs.pl:238
40753 msgid "Choose the output filesystem type."
40757 #: ../tools/virt-make-fs.pl:240
40758 msgid "The default is C<ext2>."
40762 #: ../tools/virt-make-fs.pl:242
40763 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
40767 #: ../tools/virt-make-fs.pl:249
40768 msgid "B<--partition>"
40772 #: ../tools/virt-make-fs.pl:251
40773 msgid "B<--partition=E<lt>parttypeE<gt>>"
40777 #: ../tools/virt-make-fs.pl:253
40779 "If specified, this flag adds an MBR partition table to the output disk "
40784 #: ../tools/virt-make-fs.pl:256
40786 "You can change the partition table type, eg. I<--partition=gpt> for large "
40791 #: ../tools/virt-make-fs.pl:259
40793 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
40794 "might consider the next parameter to be the partition type. For example:"
40798 #: ../tools/virt-make-fs.pl:263
40801 " virt-make-fs --partition input.tar output.img\n"
40806 #: ../tools/virt-make-fs.pl:265
40808 "would cause virt-make-fs to think you wanted to use a partition type of "
40809 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
40810 "dash) between options and the input and output arguments:"
40814 #: ../tools/virt-make-fs.pl:269
40817 " virt-make-fs --partition -- input.tar output.img\n"
40822 #: ../tools/virt-make-fs.pl:271
40823 msgid "For MBR, virt-make-fs sets the partition type byte automatically."
40827 #: ../tools/virt-make-fs.pl:559
40829 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
40830 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
40831 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
40835 #: ../tools/virt-make-fs.pl:573 ../tools/virt-win-reg.pl:774
40837 "When reporting bugs, please enable debugging and capture the I<complete> "
40842 #: ../tools/virt-make-fs.pl:576
40845 " export LIBGUESTFS_DEBUG=1\n"
40846 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
40851 #: ../tools/virt-make-fs.pl:579
40853 "Attach /tmp/virt-make-fs.log to a new bug report at "
40854 "L<https://bugzilla.redhat.com/>"
40858 #: ../tools/virt-tar.pl:33
40859 msgid "virt-tar - Extract or upload files to a virtual machine"
40863 #: ../tools/virt-tar.pl:37
40866 " virt-tar [--options] -x domname directory tarball\n"
40871 #: ../tools/virt-tar.pl:39
40874 " virt-tar [--options] -u domname tarball directory\n"
40879 #: ../tools/virt-tar.pl:41
40882 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
40887 #: ../tools/virt-tar.pl:43
40890 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
40895 #: ../tools/virt-tar.pl:45 ../tools/virt-win-reg.pl:88
40900 #: ../tools/virt-tar.pl:47
40902 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
40903 "L<virt-tar-in(1)>, L<virt-tar-out(1)> as replacements."
40907 #: ../tools/virt-tar.pl:52
40908 msgid "Download C</home> from the VM into a local tarball:"
40912 #: ../tools/virt-tar.pl:54
40915 " virt-tar -x domname /home home.tar\n"
40920 #: ../tools/virt-tar.pl:56
40923 " virt-tar -zx domname /home home.tar.gz\n"
40928 #: ../tools/virt-tar.pl:58
40929 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
40933 #: ../tools/virt-tar.pl:60
40936 " virt-tar -u domname uploadstuff.tar /tmp\n"
40941 #: ../tools/virt-tar.pl:62
40944 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
40949 #: ../tools/virt-tar.pl:66
40951 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
40952 "virtual machines. If you do this, you risk disk corruption in the VM. "
40953 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
40957 #: ../tools/virt-tar.pl:71
40959 "You can use I<-x> (extract) on live virtual machines, but you might get "
40960 "inconsistent results or errors if there is filesystem activity inside the "
40961 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
40962 "work, but the only way to guarantee consistent results is if the virtual "
40963 "machine is shut down."
40967 #: ../tools/virt-tar.pl:79
40969 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
40970 "parts of a guest filesystem. There are many possibilities: making backups, "
40971 "uploading data files, snooping on guest activity, fixing or customizing "
40976 #: ../tools/virt-tar.pl:84
40978 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
40979 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
40980 "should look at the L<guestfish(1)> tool."
40984 #: ../tools/virt-tar.pl:88
40986 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
40987 "its contents (recursively) from the virtual machine into a local tarball. "
40988 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
40989 "virtual machine. You cannot use these two options together."
40993 #: ../tools/virt-tar.pl:94
40995 "In addition, you may need to use the I<-z> (gZip) option to enable "
40996 "compression. When uploading, you have to specify I<-z> if the upload file "
40997 "is compressed because virt-tar won't detect this on its own."
41001 #: ../tools/virt-tar.pl:98
41003 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
41004 "example it cannot do PKZip files or bzip2 compression. If you want that "
41005 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
41006 "the L<libguestfs(3)> API)."
41010 #: ../tools/virt-tar.pl:160
41011 msgid "B<--extract>"
41015 #: ../tools/virt-tar.pl:162
41016 msgid "B<--download>"
41020 #: ../tools/virt-tar.pl:164
41025 #: ../tools/virt-tar.pl:166
41026 msgid "B<--upload>"
41030 #: ../tools/virt-tar.pl:168
41032 "Use I<-x> to extract (download) a directory from a virtual machine to a "
41037 #: ../tools/virt-tar.pl:171
41039 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
41040 "Please read the L</WARNING> section above before using this option."
41044 #: ../tools/virt-tar.pl:175
41045 msgid "You must specify exactly one of these options."
41049 #: ../tools/virt-tar.pl:181
41054 #: ../tools/virt-tar.pl:183
41059 #: ../tools/virt-tar.pl:185
41060 msgid "Specify that the input or output tarball is gzip-compressed."
41064 #: ../tools/virt-tar.pl:298
41066 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
41067 "L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
41068 "L<virt-tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
41069 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41073 #: ../tools/virt-win-reg.pl:37
41075 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
41080 #: ../tools/virt-win-reg.pl:41
41083 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
41088 #: ../tools/virt-win-reg.pl:43
41091 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
41096 #: ../tools/virt-win-reg.pl:45
41099 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
41104 #: ../tools/virt-win-reg.pl:47
41107 " virt-win-reg --merge domname [input.reg ...]\n"
41112 #: ../tools/virt-win-reg.pl:49
41115 " virt-win-reg [--options] disk.img ... # instead of domname\n"
41120 #: ../tools/virt-win-reg.pl:53
41122 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
41123 "virtual machines. If you do this, you I<will> get irreversible disk "
41124 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
41125 "but doesn't catch all cases."
41129 #: ../tools/virt-win-reg.pl:58
41131 "Modifying the Windows Registry is an inherently risky operation. The format "
41132 "is deliberately obscure and undocumented, and Registry changes can leave the "
41133 "system unbootable. Therefore when using the I<--merge> option, make sure "
41134 "you have a reliable backup first."
41138 #: ../tools/virt-win-reg.pl:65
41140 "This program can export and merge Windows Registry entries from a Windows "
41145 #: ../tools/virt-win-reg.pl:68
41147 "The first parameter is the libvirt guest name or the raw disk image of a "
41152 #: ../tools/virt-win-reg.pl:71
41154 "If I<--merge> is I<not> specified, then the chosen registry key is "
41155 "displayed/exported (recursively). For example:"
41159 #: ../tools/virt-win-reg.pl:74
41162 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
41167 #: ../tools/virt-win-reg.pl:76
41168 msgid "You can also display single values from within registry keys, for example:"
41172 #: ../tools/virt-win-reg.pl:79
41175 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
41176 " $ virt-win-reg Windows7 $cvkey ProductName\n"
41177 " Windows 7 Enterprise\n"
41182 #: ../tools/virt-win-reg.pl:83
41184 "With I<--merge>, you can merge a textual regedit file into the Windows "
41189 #: ../tools/virt-win-reg.pl:86
41192 " $ virt-win-reg --merge Windows7 changes.reg\n"
41197 #: ../tools/virt-win-reg.pl:90
41199 "This program is only meant for simple access to the registry. If you want "
41200 "to do complicated things with the registry, we suggest you download the "
41201 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
41202 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
41203 "L<hivexregedit(1)>."
41207 #: ../tools/virt-win-reg.pl:159
41212 #: ../tools/virt-win-reg.pl:161
41214 "In merge mode, this merges a textual regedit file into the Windows Registry "
41215 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
41216 "displays or exports Registry entries instead."
41220 #: ../tools/virt-win-reg.pl:165
41222 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
41223 "result in disk corruption. However exporting (without this flag) is always "
41228 #: ../tools/virt-win-reg.pl:173
41229 msgid "B<--encoding> UTF-16LE|ASCII"
41233 #: ../tools/virt-win-reg.pl:175
41235 "When merging (only), you may need to specify the encoding for strings to be "
41236 "used in the hive file. This is explained in detail in "
41237 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
41241 #: ../tools/virt-win-reg.pl:179
41243 "The default is to use UTF-16LE, which should work with recent versions of "
41248 #: ../tools/virt-win-reg.pl:186
41249 msgid "B<--unsafe-printable-strings>"
41253 #: ../tools/virt-win-reg.pl:188
41255 "When exporting (only), assume strings are UTF-16LE and print them as strings "
41256 "instead of hex sequences. Remove the final zero codepoint from strings if "
41261 #: ../tools/virt-win-reg.pl:192
41263 "This is unsafe and does not preserve the fidelity of strings in the original "
41264 "Registry for various reasons:"
41268 #: ../tools/virt-win-reg.pl:199
41270 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
41271 "other encodings will be corrupted by this transformation."
41275 #: ../tools/virt-win-reg.pl:204
41277 "Assumes that everything which has type 1 or 2 is really a string and that "
41278 "everything else is not a string, but the type field in real Registries is "
41283 #: ../tools/virt-win-reg.pl:210
41285 "Loses information about whether a zero codepoint followed the string in the "
41290 #: ../tools/virt-win-reg.pl:215
41292 "This all happens because the Registry itself contains no information about "
41293 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
41297 #: ../tools/virt-win-reg.pl:219
41299 "You should only use this option for quick hacking and debugging of the "
41300 "Registry contents, and I<never> use it if the output is going to be passed "
41301 "into another program or stored in another Registry."
41305 #: ../tools/virt-win-reg.pl:556
41306 msgid "SUPPORTED SYSTEMS"
41310 #: ../tools/virt-win-reg.pl:558
41312 "The program currently supports Windows NT-derived guests starting with "
41313 "Windows XP through to at least Windows 7."
41317 #: ../tools/virt-win-reg.pl:561
41318 msgid "The following Registry keys are supported:"
41322 #: ../tools/virt-win-reg.pl:565
41323 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
41327 #: ../tools/virt-win-reg.pl:567
41328 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
41332 #: ../tools/virt-win-reg.pl:569
41333 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
41337 #: ../tools/virt-win-reg.pl:571
41338 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
41342 #: ../tools/virt-win-reg.pl:573
41343 msgid "C<HKEY_USERS\\.DEFAULT>"
41347 #: ../tools/virt-win-reg.pl:575
41348 msgid "C<HKEY_USERS\\I<SID>>"
41352 #: ../tools/virt-win-reg.pl:577
41353 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
41357 #: ../tools/virt-win-reg.pl:579
41358 msgid "C<HKEY_USERS\\I<username>>"
41362 #: ../tools/virt-win-reg.pl:581
41363 msgid "where I<username> is a local user name (this is a libguestfs extension)."
41367 #: ../tools/virt-win-reg.pl:585
41369 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
41374 #: ../tools/virt-win-reg.pl:588
41376 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
41377 "supported (there is no \"current user\")."
41381 #: ../tools/virt-win-reg.pl:591
41386 #: ../tools/virt-win-reg.pl:593
41388 "C<virt-win-reg> expects that regedit files have already been reencoded in "
41389 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
41390 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
41391 "with Windows-style line endings, you may need to reencode the whole file "
41392 "before or after processing."
41396 #: ../tools/virt-win-reg.pl:599
41398 "To reencode a file from Windows format to Linux (before processing it with "
41399 "the I<--merge> option), you would do something like this:"
41403 #: ../tools/virt-win-reg.pl:602
41406 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
41411 #: ../tools/virt-win-reg.pl:604
41413 "To go in the opposite direction, after exporting and before sending the file "
41414 "to a Windows user, do something like this:"
41418 #: ../tools/virt-win-reg.pl:607
41421 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
41426 #: ../tools/virt-win-reg.pl:609
41427 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
41431 #: ../tools/virt-win-reg.pl:611
41433 "If you are unsure about the current encoding, use the L<file(1)> command. "
41434 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
41435 "Windows-style (CRLF) line endings, like this:"
41439 #: ../tools/virt-win-reg.pl:615
41442 " $ file software.reg\n"
41443 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
41444 " with CRLF line terminators\n"
41449 #: ../tools/virt-win-reg.pl:619
41450 msgid "This file would need conversion before you could I<--merge> it."
41454 #: ../tools/virt-win-reg.pl:621
41455 msgid "CurrentControlSet etc."
41459 #: ../tools/virt-win-reg.pl:623
41461 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
41462 "Registry at the level of the hive file, and therefore you cannot modify "
41467 #: ../tools/virt-win-reg.pl:627
41469 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
41470 "circumstances it might refer to another control set. The way to find out is "
41471 "to look at the C<HKLM\\SYSTEM\\Select> key:"
41475 #: ../tools/virt-win-reg.pl:631
41478 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
41479 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
41480 " \"Current\"=dword:00000001\n"
41481 " \"Default\"=dword:00000001\n"
41482 " \"Failed\"=dword:00000000\n"
41483 " \"LastKnownGood\"=dword:00000002\n"
41488 #: ../tools/virt-win-reg.pl:638
41489 msgid "\"Current\" is the one which Windows will choose when it boots."
41493 #: ../tools/virt-win-reg.pl:640
41494 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
41498 #: ../tools/virt-win-reg.pl:643
41499 msgid "DELETING REGISTRY KEYS AND VALUES"
41503 #: ../tools/virt-win-reg.pl:645
41504 msgid "To delete a whole registry key, use the syntax:"
41508 #: ../tools/virt-win-reg.pl:647
41511 " [-HKEY_LOCAL_MACHINE\\Foo]\n"
41516 #: ../tools/virt-win-reg.pl:649
41517 msgid "To delete a single value within a key, use the syntax:"
41521 #: ../tools/virt-win-reg.pl:651
41524 " [HKEY_LOCAL_MACHINE\\Foo]\n"
41530 #: ../tools/virt-win-reg.pl:654
41531 msgid "WINDOWS TIPS"
41535 #: ../tools/virt-win-reg.pl:656
41537 "Note that some of these tips modify the guest disk image. The guest I<must> "
41538 "be shut off, else you will get disk corruption."
41542 #: ../tools/virt-win-reg.pl:659
41543 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
41547 #: ../tools/virt-win-reg.pl:661
41549 "Prepare a DOS batch script, VBScript or executable. Upload this using "
41550 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
41551 "is uploaded into C<C:\\>:"
41555 #: ../tools/virt-win-reg.pl:665
41558 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
41563 #: ../tools/virt-win-reg.pl:667
41564 msgid "Prepare a regedit file containing the registry change:"
41568 #: ../tools/virt-win-reg.pl:669
41571 " cat > test.reg <<'EOF'\n"
41572 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
41573 " \"Test\"=\"c:\\\\test.bat\"\n"
41579 #: ../tools/virt-win-reg.pl:674
41581 "In this example we use the key C<RunOnce> which means that the script will "
41582 "run precisely once when the first user logs in. If you want it to run every "
41583 "time a user logs in, replace C<RunOnce> with C<Run>."
41587 #: ../tools/virt-win-reg.pl:678
41588 msgid "Now update the registry:"
41592 #: ../tools/virt-win-reg.pl:680
41595 " virt-win-reg --merge WindowsGuest test.reg\n"
41600 #: ../tools/virt-win-reg.pl:682
41601 msgid "INSTALLING A SERVICE"
41605 #: ../tools/virt-win-reg.pl:684
41607 "This section assumes you are familiar with Windows services, and you either "
41608 "have a program which handles the Windows Service Control Protocol directly "
41609 "or you want to run any program using a service wrapper like SrvAny or the "
41614 #: ../tools/virt-win-reg.pl:689
41616 "First upload the program and optionally the service wrapper. In this case "
41617 "the test program is called C<test.exe> and we are using the RHSrvAny "
41622 #: ../tools/virt-win-reg.pl:693
41625 " guestfish -i -d WindowsGuest <<EOF\n"
41626 " upload rhsrvany.exe /rhsrvany.exe\n"
41627 " upload test.exe /test.exe\n"
41633 #: ../tools/virt-win-reg.pl:698
41635 "Prepare a regedit file containing the registry changes. In this example, "
41636 "the first registry change is needed for the service itself or the service "
41637 "wrapper (if used). The second registry change is only needed because I am "
41638 "using the RHSrvAny service wrapper."
41642 #: ../tools/virt-win-reg.pl:703
41645 " cat > service.reg <<'EOF'\n"
41646 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
41647 " \"Type\"=dword:00000010\n"
41648 " \"Start\"=dword:00000002\n"
41649 " \"ErrorControl\"=dword:00000001\n"
41650 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
41651 " \"DisplayName\"=\"RHSrvAny\"\n"
41652 " \"ObjectName\"=\"NetworkService\"\n"
41657 #: ../tools/virt-win-reg.pl:712
41660 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
41661 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
41662 " \"PWD\"=\"c:\\\\Temp\"\n"
41668 #: ../tools/virt-win-reg.pl:723
41670 "For use of C<ControlSet001> see the section above in this manual page. You "
41671 "may need to adjust this according to the control set that is in use by the "
41676 #: ../tools/virt-win-reg.pl:729
41678 "C<\"ObjectName\"> controls the privileges that the service will have. An "
41679 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
41680 "privileged account."
41684 #: ../tools/virt-win-reg.pl:735
41686 "For the meaning of the magic numbers, see this Microsoft KB article: "
41687 "L<http://support.microsoft.com/kb/103000>."
41691 #: ../tools/virt-win-reg.pl:740
41692 msgid "Update the registry:"
41696 #: ../tools/virt-win-reg.pl:742
41699 " virt-win-reg --merge WindowsGuest service.reg\n"
41704 #: ../tools/virt-win-reg.pl:746
41706 "Be careful when passing parameters containing C<\\> (backslash) in the "
41707 "shell. Usually you will have to use 'single quotes' or double backslashes "
41708 "(but not both) to protect them from the shell."
41712 #: ../tools/virt-win-reg.pl:750
41713 msgid "Paths and value names are case-insensitive."
41717 #: ../tools/virt-win-reg.pl:759
41719 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
41720 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
41721 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
41722 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41726 #: ../tools/virt-win-reg.pl:777
41729 " export LIBGUESTFS_DEBUG=1\n"
41730 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
41735 #: ../tools/virt-win-reg.pl:780
41737 "Attach /tmp/virt-win-reg.log to a new bug report at "
41738 "L<https://bugzilla.redhat.com/>"