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.5\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2011-11-21 13:23+0000\n"
12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 "Language-Team: LANGUAGE <LL@li.org>\n"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
21 #: ../align/virt-alignment-scan.pod:3 ../cat/virt-cat.pod:3 ../cat/virt-filesystems.pod:3 ../cat/virt-ls.pod:3 ../clone/virt-sysprep.pod:3 ../df/virt-df.pod:3 ../edit/virt-edit.pod:3 ../erlang/examples/guestfs-erlang.pod:3 ../examples/guestfs-examples.pod:3 ../examples/guestfs-recipes.pod:14 ../examples/guestfs-testing.pod:3 ../fish/guestfish.pod:3 ../fish/virt-copy-in.pod:3 ../fish/virt-copy-out.pod:3 ../fish/virt-tar-in.pod:3 ../fish/virt-tar-out.pod:3 ../fuse/guestmount.pod:3 ../inspector/virt-inspector.pod:3 ../java/examples/guestfs-java.pod:3 ../ocaml/examples/guestfs-ocaml.pod:3 ../perl/examples/guestfs-perl.pod:3 ../python/examples/guestfs-python.pod:3 ../rescue/virt-rescue.pod:3 ../resize/virt-resize.pod:3 ../ruby/examples/guestfs-ruby.pod:3 ../sparsify/virt-sparsify.pod:3 ../src/guestfs.pod:3 ../test-tool/libguestfs-test-tool.pod:3 ../tools/virt-list-filesystems.pl:30 ../tools/virt-list-partitions.pl:30 ../tools/virt-make-fs.pl:35 ../tools/virt-tar.pl:31 ../tools/virt-win-reg.pl:35
26 #: ../align/virt-alignment-scan.pod:5
27 msgid "virt-alignment-scan - Check alignment of virtual machine partitions"
31 #: ../align/virt-alignment-scan.pod:7 ../cat/virt-cat.pod:7 ../cat/virt-filesystems.pod:7 ../cat/virt-ls.pod:7 ../clone/virt-sysprep.pod:7 ../df/virt-df.pod:7 ../edit/virt-edit.pod:7 ../erlang/examples/guestfs-erlang.pod:7 ../examples/guestfs-examples.pod:7 ../fish/guestfish.pod:7 ../fish/virt-copy-in.pod:7 ../fish/virt-copy-out.pod:7 ../fish/virt-tar-in.pod:7 ../fish/virt-tar-out.pod:7 ../fuse/guestmount.pod:7 ../inspector/virt-inspector.pod:7 ../java/examples/guestfs-java.pod:7 ../ocaml/examples/guestfs-ocaml.pod:7 ../perl/examples/guestfs-perl.pod:7 ../python/examples/guestfs-python.pod:7 ../rescue/virt-rescue.pod:7 ../resize/virt-resize.pod:7 ../ruby/examples/guestfs-ruby.pod:7 ../sparsify/virt-sparsify.pod:7 ../src/guestfs.pod:7 ../test-tool/libguestfs-test-tool.pod:7 ../tools/virt-list-filesystems.pl:34 ../tools/virt-list-partitions.pl:34 ../tools/virt-make-fs.pl:39 ../tools/virt-tar.pl:35 ../tools/virt-win-reg.pl:39
36 #: ../align/virt-alignment-scan.pod:9
39 " virt-alignment-scan [--options] -d domname\n"
44 #: ../align/virt-alignment-scan.pod:11
47 " virt-alignment-scan [--options] -a disk.img [-a disk.img ...]\n"
52 #: ../align/virt-alignment-scan.pod:13 ../cat/virt-cat.pod:19 ../cat/virt-filesystems.pod:13 ../cat/virt-ls.pod:19 ../clone/virt-sysprep.pod:13 ../df/virt-df.pod:21 ../edit/virt-edit.pod:27 ../erlang/examples/guestfs-erlang.pod:16 ../examples/guestfs-examples.pod:19 ../examples/guestfs-recipes.pod:18 ../examples/guestfs-testing.pod:7 ../fish/guestfish.pod:30 ../fish/virt-copy-in.pod:19 ../fish/virt-copy-out.pod:13 ../fish/virt-tar-in.pod:21 ../fish/virt-tar-out.pod:15 ../fuse/guestmount.pod:20 ../inspector/virt-inspector.pod:19 ../java/examples/guestfs-java.pod:15 ../ocaml/examples/guestfs-ocaml.pod:25 ../perl/examples/guestfs-perl.pod:18 ../python/examples/guestfs-python.pod:14 ../rescue/virt-rescue.pod:31 ../resize/virt-resize.pod:13 ../ruby/examples/guestfs-ruby.pod:15 ../sparsify/virt-sparsify.pod:11 ../src/guestfs.pod:23 ../test-tool/libguestfs-test-tool.pod:11 ../tools/virt-list-filesystems.pl:40 ../tools/virt-list-partitions.pl:40 ../tools/virt-make-fs.pl:47 ../tools/virt-tar.pl:77 ../tools/virt-win-reg.pl:63
57 #: ../align/virt-alignment-scan.pod:15
59 "When older operating systems install themselves, the partitioning tools "
60 "place partitions at a sector misaligned with the underlying storage "
61 "(commonly the first partition starts on sector C<63>). Misaligned "
62 "partitions can result in an operating system issuing more I/O than should be "
67 #: ../align/virt-alignment-scan.pod:21
69 "The virt-alignment-scan tool checks the alignment of partitions in virtual "
70 "machines and disk images and warns you if there are alignment problems."
74 #: ../align/virt-alignment-scan.pod:25
76 "Currently there is no virt tool for fixing alignment problems. You can only "
77 "reinstall the guest operating system. The following NetApp document "
78 "summarises the problem and possible solutions: "
79 "L<http://media.netapp.com/documents/tr-3747.pdf>"
83 #: ../align/virt-alignment-scan.pod:30
88 #: ../align/virt-alignment-scan.pod:32
89 msgid "To run this tool on a disk image directly, use the I<-a> option:"
93 #: ../align/virt-alignment-scan.pod:34
96 " $ virt-alignment-scan -a winxp.img\n"
97 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
102 #: ../align/virt-alignment-scan.pod:37
105 " $ virt-alignment-scan -a fedora16.img\n"
106 " /dev/sda1 1048576 1024K ok\n"
107 " /dev/sda2 2097152 2048K ok\n"
108 " /dev/sda3 526385152 2048K ok\n"
113 #: ../align/virt-alignment-scan.pod:42
115 "To run the tool on a guest known to libvirt, use the I<-d> option and "
116 "possibly the I<-c> option:"
120 #: ../align/virt-alignment-scan.pod:45
123 " # virt-alignment-scan -d RHEL5\n"
124 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
125 " /dev/sda2 106928640 512 bad (alignment < 4K)\n"
130 #: ../align/virt-alignment-scan.pod:49
133 " $ virt-alignment-scan -c qemu:///system -d Win7TwoDisks\n"
134 " /dev/sda1 1048576 1024K ok\n"
135 " /dev/sda2 105906176 1024K ok\n"
136 " /dev/sdb1 65536 64K ok\n"
141 #: ../align/virt-alignment-scan.pod:54
143 "The output consists of 4 or more whitespace-separated columns. Only the "
144 "first 4 columns are signficant if you want to parse this from a program. "
149 #: ../align/virt-alignment-scan.pod:60
154 #: ../align/virt-alignment-scan.pod:62
156 "the device and partition name (eg. C</dev/sda1> meaning the first partition "
157 "on the first block device)"
161 #: ../align/virt-alignment-scan.pod:65
166 #: ../align/virt-alignment-scan.pod:67
167 msgid "the start of the partition in bytes"
171 #: ../align/virt-alignment-scan.pod:69
176 #: ../align/virt-alignment-scan.pod:71
177 msgid "the alignment in bytes or Kbytes (eg. C<512> or C<4K>)"
181 #: ../align/virt-alignment-scan.pod:73
186 #: ../align/virt-alignment-scan.pod:75
188 "C<ok> if the alignment is best for performance, or C<bad> if the alignment "
189 "can cause performance problems"
193 #: ../align/virt-alignment-scan.pod:78
198 #: ../align/virt-alignment-scan.pod:80
199 msgid "optional free-text explanation."
203 #: ../align/virt-alignment-scan.pod:84
205 "The exit code from the program changes depending on whether poorly aligned "
206 "partitions were found. See L</EXIT STATUS> below."
210 #: ../align/virt-alignment-scan.pod:87
211 msgid "If you just want the exit code with no output, use the I<-q> option."
215 #: ../align/virt-alignment-scan.pod:89 ../cat/virt-cat.pod:62 ../cat/virt-filesystems.pod:91 ../cat/virt-ls.pod:261 ../clone/virt-sysprep.pod:42 ../df/virt-df.pod:59 ../edit/virt-edit.pod:62 ../fish/guestfish.pod:148 ../fish/virt-copy-in.pod:45 ../fish/virt-copy-out.pod:34 ../fish/virt-tar-in.pod:42 ../fish/virt-tar-out.pod:36 ../fuse/guestmount.pod:92 ../inspector/virt-inspector.pod:55 ../rescue/virt-rescue.pod:112 ../resize/virt-resize.pod:262 ../sparsify/virt-sparsify.pod:99 ../test-tool/libguestfs-test-tool.pod:36 ../tools/virt-list-filesystems.pl:53 ../tools/virt-list-partitions.pl:54 ../tools/virt-make-fs.pl:153 ../tools/virt-tar.pl:103 ../tools/virt-win-reg.pl:96
220 #: ../align/virt-alignment-scan.pod:93 ../cat/virt-cat.pod:66 ../cat/virt-filesystems.pod:95 ../cat/virt-ls.pod:265 ../clone/virt-sysprep.pod:46 ../df/virt-df.pod:63 ../edit/virt-edit.pod:66 ../fish/guestfish.pod:152 ../fuse/guestmount.pod:160 ../inspector/virt-inspector.pod:59 ../rescue/virt-rescue.pod:116 ../resize/virt-resize.pod:266 ../sparsify/virt-sparsify.pod:103 ../test-tool/libguestfs-test-tool.pod:40 ../tools/virt-list-filesystems.pl:61 ../tools/virt-list-partitions.pl:62 ../tools/virt-make-fs.pl:161 ../tools/virt-tar.pl:111 ../tools/virt-win-reg.pl:104
225 #: ../align/virt-alignment-scan.pod:95 ../cat/virt-cat.pod:68 ../cat/virt-filesystems.pod:97 ../cat/virt-ls.pod:267 ../clone/virt-sysprep.pod:48 ../df/virt-df.pod:65 ../edit/virt-edit.pod:68 ../inspector/virt-inspector.pod:61 ../rescue/virt-rescue.pod:118 ../tools/virt-list-filesystems.pl:63 ../tools/virt-list-partitions.pl:64 ../tools/virt-make-fs.pl:163 ../tools/virt-tar.pl:113 ../tools/virt-win-reg.pl:106
226 msgid "Display brief help."
230 #: ../align/virt-alignment-scan.pod:97 ../cat/virt-cat.pod:70 ../cat/virt-filesystems.pod:99 ../cat/virt-ls.pod:269 ../clone/virt-sysprep.pod:50 ../df/virt-df.pod:67 ../edit/virt-edit.pod:70 ../inspector/virt-inspector.pod:63 ../rescue/virt-rescue.pod:120
235 #: ../align/virt-alignment-scan.pod:99 ../cat/virt-cat.pod:72 ../cat/virt-filesystems.pod:101 ../cat/virt-ls.pod:271 ../clone/virt-sysprep.pod:52 ../df/virt-df.pod:69 ../edit/virt-edit.pod:72 ../inspector/virt-inspector.pod:65 ../rescue/virt-rescue.pod:122
236 msgid "B<--add> file"
240 #: ../align/virt-alignment-scan.pod:101 ../clone/virt-sysprep.pod:54
241 msgid "Add I<file> which should be a disk image from a virtual machine."
245 #: ../align/virt-alignment-scan.pod:103 ../cat/virt-cat.pod:78 ../cat/virt-filesystems.pod:107 ../cat/virt-ls.pod:277 ../clone/virt-sysprep.pod:56 ../df/virt-df.pod:75 ../edit/virt-edit.pod:78 ../fish/guestfish.pod:174 ../fuse/guestmount.pod:102 ../inspector/virt-inspector.pod:71 ../rescue/virt-rescue.pod:128
247 "The format of the disk image is auto-detected. To override this and force a "
248 "particular format use the I<--format=..> option."
252 #: ../align/virt-alignment-scan.pod:106 ../cat/virt-cat.pod:81 ../cat/virt-filesystems.pod:125 ../cat/virt-ls.pod:291 ../clone/virt-sysprep.pod:59 ../df/virt-df.pod:78 ../rescue/virt-rescue.pod:135
257 #: ../align/virt-alignment-scan.pod:108 ../cat/virt-cat.pod:83 ../cat/virt-filesystems.pod:127 ../cat/virt-ls.pod:293 ../clone/virt-sysprep.pod:61 ../df/virt-df.pod:80 ../rescue/virt-rescue.pod:137
258 msgid "B<--connect> URI"
262 #: ../align/virt-alignment-scan.pod:110 ../cat/virt-cat.pod:85 ../cat/virt-filesystems.pod:129 ../cat/virt-ls.pod:295 ../clone/virt-sysprep.pod:63 ../df/virt-df.pod:82 ../edit/virt-edit.pod:99 ../inspector/virt-inspector.pod:78 ../rescue/virt-rescue.pod:139 ../tools/virt-list-filesystems.pl:81 ../tools/virt-list-partitions.pl:82 ../tools/virt-tar.pl:131 ../tools/virt-win-reg.pl:132
264 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
265 "to the default libvirt hypervisor."
269 #: ../align/virt-alignment-scan.pod:113 ../cat/virt-cat.pod:88 ../cat/virt-filesystems.pod:132 ../cat/virt-ls.pod:298 ../clone/virt-sysprep.pod:66 ../df/virt-df.pod:85 ../rescue/virt-rescue.pod:142
271 "If you specify guest block devices directly (I<-a>), then libvirt is not "
276 #: ../align/virt-alignment-scan.pod:116 ../cat/virt-cat.pod:91 ../cat/virt-filesystems.pod:141 ../cat/virt-ls.pod:307 ../clone/virt-sysprep.pod:69 ../df/virt-df.pod:94 ../edit/virt-edit.pod:105 ../inspector/virt-inspector.pod:85 ../rescue/virt-rescue.pod:145
281 #: ../align/virt-alignment-scan.pod:118 ../cat/virt-cat.pod:93 ../cat/virt-filesystems.pod:143 ../cat/virt-ls.pod:309 ../clone/virt-sysprep.pod:71 ../df/virt-df.pod:96 ../edit/virt-edit.pod:107 ../inspector/virt-inspector.pod:87 ../rescue/virt-rescue.pod:147
282 msgid "B<--domain> guest"
286 #: ../align/virt-alignment-scan.pod:120 ../cat/virt-cat.pod:95 ../cat/virt-filesystems.pod:145 ../cat/virt-ls.pod:311 ../clone/virt-sysprep.pod:73 ../df/virt-df.pod:98 ../edit/virt-edit.pod:109 ../inspector/virt-inspector.pod:89 ../rescue/virt-rescue.pod:149
288 "Add all the disks from the named libvirt guest. Domain UUIDs can be used "
293 #: ../align/virt-alignment-scan.pod:123 ../cat/virt-cat.pod:105 ../cat/virt-filesystems.pod:170 ../cat/virt-ls.pod:328 ../clone/virt-sysprep.pod:95 ../df/virt-df.pod:101 ../fish/guestfish.pod:233 ../fuse/guestmount.pod:142 ../inspector/virt-inspector.pod:99 ../rescue/virt-rescue.pod:152
294 msgid "B<--format=raw|qcow2|..>"
298 #: ../align/virt-alignment-scan.pod:125 ../cat/virt-cat.pod:107 ../cat/virt-filesystems.pod:172 ../cat/virt-ls.pod:330 ../clone/virt-sysprep.pod:97 ../df/virt-df.pod:103 ../edit/virt-edit.pod:134 ../fish/guestfish.pod:235 ../fuse/guestmount.pod:144 ../inspector/virt-inspector.pod:101 ../rescue/virt-rescue.pod:154
303 #: ../align/virt-alignment-scan.pod:127 ../cat/virt-cat.pod:109 ../cat/virt-filesystems.pod:174 ../cat/virt-ls.pod:332 ../clone/virt-sysprep.pod:99 ../df/virt-df.pod:105 ../edit/virt-edit.pod:136 ../fish/guestfish.pod:237 ../fuse/guestmount.pod:146 ../rescue/virt-rescue.pod:156
305 "The default for the I<-a> option is to auto-detect the format of the disk "
306 "image. Using this forces the disk format for I<-a> options which follow on "
307 "the command line. Using I<--format> with no argument switches back to "
308 "auto-detection for subsequent I<-a> options."
312 #: ../align/virt-alignment-scan.pod:132 ../cat/virt-cat.pod:114 ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337 ../clone/virt-sysprep.pod:104 ../df/virt-df.pod:110 ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242 ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:351 ../rescue/virt-rescue.pod:161 ../src/guestfs.pod:2877
317 #: ../align/virt-alignment-scan.pod:134
320 " virt-alignment-scan --format=raw -a disk.img\n"
325 #: ../align/virt-alignment-scan.pod:136 ../cat/virt-cat.pod:118 ../cat/virt-filesystems.pod:183 ../cat/virt-ls.pod:341 ../clone/virt-sysprep.pod:108 ../df/virt-df.pod:114 ../edit/virt-edit.pod:145 ../fish/guestfish.pod:246 ../rescue/virt-rescue.pod:165
326 msgid "forces raw format (no auto-detection) for C<disk.img>."
330 #: ../align/virt-alignment-scan.pod:138
333 " virt-alignment-scan --format=raw -a disk.img --format -a another.img\n"
338 #: ../align/virt-alignment-scan.pod:140 ../cat/virt-cat.pod:122 ../cat/virt-filesystems.pod:187 ../cat/virt-ls.pod:345 ../clone/virt-sysprep.pod:112 ../df/virt-df.pod:118 ../edit/virt-edit.pod:149 ../fish/guestfish.pod:250 ../rescue/virt-rescue.pod:169
340 "forces raw format (no auto-detection) for C<disk.img> and reverts to "
341 "auto-detection for C<another.img>."
345 #: ../align/virt-alignment-scan.pod:143 ../cat/virt-cat.pod:125 ../cat/virt-filesystems.pod:190 ../cat/virt-ls.pod:348 ../clone/virt-sysprep.pod:115 ../df/virt-df.pod:121 ../edit/virt-edit.pod:152 ../rescue/virt-rescue.pod:172
347 "If you have untrusted raw-format guest disk images, you should use this "
348 "option to specify the disk format. This avoids a possible security problem "
349 "with malicious guests (CVE-2010-3851)."
353 #: ../align/virt-alignment-scan.pod:147 ../resize/virt-resize.pod:491 ../sparsify/virt-sparsify.pod: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:3330 ../src/guestfs.pod:3334 ../src/guestfs.pod:3338 ../src/guestfs.pod:3342 ../tools/virt-win-reg.pl:197 ../tools/virt-win-reg.pl:202 ../tools/virt-win-reg.pl:208 ../tools/virt-win-reg.pl:721 ../tools/virt-win-reg.pl:727 ../tools/virt-win-reg.pl:733
705 #: ../align/virt-alignment-scan.pod:326
710 #: ../align/virt-alignment-scan.pod:328
711 msgid "successful exit, all partitions are aligned E<ge> 64K for best performance"
715 #: ../align/virt-alignment-scan.pod:332
720 #: ../align/virt-alignment-scan.pod:334
721 msgid "an error scanning the disk image or guest"
725 #: ../align/virt-alignment-scan.pod:338
730 #: ../align/virt-alignment-scan.pod:340
732 "successful exit, some partitions have alignment E<lt> 64K which can result "
733 "in poor performance on high end network storage"
737 #: ../align/virt-alignment-scan.pod:345
742 #: ../align/virt-alignment-scan.pod:347
744 "successful exit, some partitions have alignment E<lt> 4K which can result in "
745 "poor performance on most hypervisors"
749 #: ../align/virt-alignment-scan.pod:352 ../cat/virt-cat.pod:243 ../cat/virt-filesystems.pod:385 ../cat/virt-ls.pod:495 ../clone/virt-sysprep.pod:486 ../df/virt-df.pod:227 ../edit/virt-edit.pod:354 ../erlang/examples/guestfs-erlang.pod:97 ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384 ../examples/guestfs-testing.pod:269 ../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 ../examples/guestfs-testing.pod:280 ../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:3353 ../test-tool/libguestfs-test-tool.pod:110 ../tools/virt-list-filesystems.pl:212 ../tools/virt-list-partitions.pl:281 ../tools/virt-make-fs.pl:586 ../tools/virt-tar.pl:315 ../tools/virt-win-reg.pl:787
776 #: ../align/virt-alignment-scan.pod:367 ../clone/virt-sysprep.pod:507 ../sparsify/virt-sparsify.pod: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 ../examples/guestfs-testing.pod:160
1921 msgid "List all setuid or setgid programs in a Linux virtual machine:"
1925 #: ../cat/virt-ls.pod:43
1928 " virt-ls -lR -d guest / | grep '^- [42]'\n"
1933 #: ../cat/virt-ls.pod:45 ../examples/guestfs-testing.pod:164
1934 msgid "List all public-writable directories in a Linux virtual machine:"
1938 #: ../cat/virt-ls.pod:47
1941 " virt-ls -lR -d guest / | grep '^d ...7'\n"
1946 #: ../cat/virt-ls.pod:49 ../examples/guestfs-testing.pod:168
1947 msgid "List all Unix domain sockets in a Linux virtual machine:"
1951 #: ../cat/virt-ls.pod:51
1954 " virt-ls -lR -d guest / | grep '^s'\n"
1959 #: ../cat/virt-ls.pod:53 ../examples/guestfs-testing.pod:172
1960 msgid "List all regular files with filenames ending in '.png':"
1964 #: ../cat/virt-ls.pod:55
1967 " virt-ls -lR -d guest / | grep -i '^-.*\\.png$'\n"
1972 #: ../cat/virt-ls.pod:57
1973 msgid "To display files larger than 10MB in home directories:"
1977 #: ../cat/virt-ls.pod:59
1980 " virt-ls -lR -d guest /home | awk '$3 > 10*1024*1024'\n"
1985 #: ../cat/virt-ls.pod:61 ../examples/guestfs-testing.pod:180
1986 msgid "Find everything modified in the last 7 days:"
1990 #: ../cat/virt-ls.pod:63
1993 " virt-ls -lR -d guest --time-days / | awk '$6 <= 7'\n"
1998 #: ../cat/virt-ls.pod:65 ../examples/guestfs-testing.pod:184
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 ../examples/guestfs-testing.pod:276 ../fish/guestfish.pod:1296 ../fish/virt-copy-in.pod:60 ../fish/virt-copy-out.pod:49 ../fish/virt-tar-in.pod:58 ../fish/virt-tar-out.pod:51 ../fuse/guestmount.pod:328 ../inspector/virt-inspector.pod:404 ../java/examples/guestfs-java.pod:58 ../ocaml/examples/guestfs-ocaml.pod:91 ../perl/examples/guestfs-perl.pod:52 ../python/examples/guestfs-python.pod:54 ../ruby/examples/guestfs-ruby.pod:48 ../src/guestfs.pod:3349 ../test-tool/libguestfs-test-tool.pod:106
4351 #: ../erlang/examples/guestfs-erlang.pod:112 ../examples/guestfs-examples.pod:47 ../examples/guestfs-recipes.pod:399 ../examples/guestfs-testing.pod:278 ../fish/guestfish.pod:1298 ../fish/virt-copy-in.pod:62 ../fish/virt-copy-out.pod:51 ../fish/virt-tar-in.pod:60 ../fish/virt-tar-out.pod:53 ../fuse/guestmount.pod:330 ../java/examples/guestfs-java.pod:60 ../ocaml/examples/guestfs-ocaml.pod:93 ../perl/examples/guestfs-perl.pod:54 ../python/examples/guestfs-python.pod:56 ../ruby/examples/guestfs-ruby.pod:50 ../src/guestfs.pod:3351 ../test-tool/libguestfs-test-tool.pod:108
4352 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
4356 #: ../erlang/examples/guestfs-erlang.pod:116 ../examples/guestfs-testing.pod:282 ../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 ../examples/guestfs-testing.pod:284 ../java/examples/guestfs-java.pod:69 ../ocaml/examples/guestfs-ocaml.pod:102 ../perl/examples/guestfs-perl.pod:63 ../python/examples/guestfs-python.pod:65 ../ruby/examples/guestfs-ruby.pod:59 ../src/guestfs.pod:3358
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 ../examples/guestfs-testing.pod:289 ../java/examples/guestfs-java.pod:74 ../ocaml/examples/guestfs-ocaml.pod:107 ../perl/examples/guestfs-perl.pod:68 ../python/examples/guestfs-python.pod:70 ../ruby/examples/guestfs-ruby.pod:64 ../src/guestfs.pod:3363
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 ../examples/guestfs-testing.pod:294 ../java/examples/guestfs-java.pod:79 ../ocaml/examples/guestfs-ocaml.pod:112 ../perl/examples/guestfs-perl.pod:73 ../python/examples/guestfs-python.pod:75 ../ruby/examples/guestfs-ruby.pod:69 ../src/guestfs.pod:3368
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 ../examples/guestfs-testing.pod:93
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 #: ../examples/guestfs-testing.pod:5
5261 msgid "guestfs-testing - manual testing of libguestfs, you can help!"
5265 #: ../examples/guestfs-testing.pod:9
5267 "This page has manual tests you can try on libguestfs. Everyone has a "
5268 "slightly different combination of platform, hardware and guests, so this "
5269 "testing is very valuable. Thanks for helping out!"
5273 #: ../examples/guestfs-testing.pod:13
5274 msgid "These tests require libguestfs E<ge> 1.14."
5278 #: ../examples/guestfs-testing.pod:15
5280 "Tests marked with a B<*> (asterisk) can B<destroy data> if you're not "
5281 "careful. The others are safe and won't modify anything."
5285 #: ../examples/guestfs-testing.pod:18
5286 msgid "You can report bugs you find through this link:"
5290 #: ../examples/guestfs-testing.pod:20
5291 msgid "https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools"
5295 #: ../examples/guestfs-testing.pod:22
5297 "or post on the mailing list (registration is B<not> required, but if you're "
5298 "not registered then you'll have to wait for a moderator to manually approve "
5303 #: ../examples/guestfs-testing.pod:26
5304 msgid "https://www.redhat.com/mailman/listinfo/libguestfs"
5308 #: ../examples/guestfs-testing.pod:28
5313 #: ../examples/guestfs-testing.pod:30
5314 msgid "Check KVM acceleration is being used."
5318 #: ../examples/guestfs-testing.pod:32
5320 "If your host has hardware virt acceleration, then with a hot cache "
5321 "libguestfs should be able to start up in a few seconds. Run the following "
5322 "command a few times:"
5326 #: ../examples/guestfs-testing.pod:36
5329 " time guestfish -a /dev/null run\n"
5334 #: ../examples/guestfs-testing.pod:38
5336 "After a few runs, the time should settle down to a few seconds (under 5 "
5337 "seconds on fast 64 bit hardware)."
5341 #: ../examples/guestfs-testing.pod:41
5342 msgid "How to check for hardware virt:"
5346 #: ../examples/guestfs-testing.pod:43
5347 msgid "http://virt-tools.org/learning/check-hardware-virt/"
5351 #: ../examples/guestfs-testing.pod:45
5352 msgid "If the command above does not work at all, use L<libguestfs-test-tool(1)>."
5356 #: ../examples/guestfs-testing.pod:48
5357 msgid "Run virt-alignment-scan on all your guests."
5361 #: ../examples/guestfs-testing.pod:50
5362 msgid "Run L<virt-alignment-scan(1)> on guests or disk images:"
5366 #: ../examples/guestfs-testing.pod:52
5369 " virt-alignment-scan -a /path/to/disk.img\n"
5374 #: ../examples/guestfs-testing.pod:54 ../examples/guestfs-testing.pod:139 ../examples/guestfs-testing.pod:152 ../examples/guestfs-testing.pod:212 ../src/guestfs.pod:2792
5379 #: ../examples/guestfs-testing.pod:56
5382 " virt-alignment-scan -d Guest\n"
5387 #: ../examples/guestfs-testing.pod:58
5388 msgid "Does the alignment report match how the guest partitions are aligned?"
5392 #: ../examples/guestfs-testing.pod:60
5393 msgid "Run virt-cat on some files in guests."
5397 #: ../examples/guestfs-testing.pod:62
5398 msgid "L<virt-cat(1)> can display files from guests. For a Linux guest, try:"
5402 #: ../examples/guestfs-testing.pod:64
5405 " virt-cat LinuxGuest /etc/passwd\n"
5410 #: ../examples/guestfs-testing.pod:66
5411 msgid "A recent feature is support for Windows paths, for example:"
5415 #: ../examples/guestfs-testing.pod:68
5418 " virt-cat WindowsGuest 'c:\\windows\\win.ini'\n"
5423 #: ../examples/guestfs-testing.pod:70
5425 "An even better test is if you have a Windows guest with multiple drives. Do "
5426 "C<D:>, C<E:> etc paths work correctly?"
5430 #: ../examples/guestfs-testing.pod:73
5431 msgid "B<*> Copy some files into a B<shut off> guest."
5435 #: ../examples/guestfs-testing.pod:75
5437 "L<virt-copy-in(1)> can recursively copy files and directories into a guest "
5442 #: ../examples/guestfs-testing.pod:78
5445 " virt-copy-in -d Guest /etc /tmp\n"
5450 #: ../examples/guestfs-testing.pod:80
5452 "This should copy local directory C</etc> to C</tmp/etc> in the guest "
5453 "(recursively). If you boot the guest, can you see all of the copied files "
5458 #: ../examples/guestfs-testing.pod:84
5459 msgid "Shut the guest down and try copying multiple files and directories:"
5463 #: ../examples/guestfs-testing.pod:86
5466 " virt-copy-in -d Guest /home /etc/issue /tmp\n"
5471 #: ../examples/guestfs-testing.pod:88
5472 msgid "Copy some files out of a guest."
5476 #: ../examples/guestfs-testing.pod:90
5478 "L<virt-copy-out(1)> can recursively copy files and directories out of a "
5479 "guest or disk image."
5483 #: ../examples/guestfs-testing.pod:95
5484 msgid "Note the final space and period in the command is not a typo."
5488 #: ../examples/guestfs-testing.pod:97
5489 msgid "This should copy C</home> from the guest into the current directory."
5493 #: ../examples/guestfs-testing.pod:99
5494 msgid "Run virt-df."
5498 #: ../examples/guestfs-testing.pod:101
5499 msgid "L<virt-df(1)> lists disk space. Run:"
5503 #: ../examples/guestfs-testing.pod:103
5511 #: ../examples/guestfs-testing.pod:105
5512 msgid "Do the results match what's reported inside the guests?"
5516 #: ../examples/guestfs-testing.pod:107
5517 msgid "Try importing virt-df CSV output into a spreadsheet or database."
5521 #: ../examples/guestfs-testing.pod:109 ../src/guestfs.pod:3083
5526 #: ../examples/guestfs-testing.pod:111
5529 " virt-df --csv > /tmp/report.csv\n"
5534 #: ../examples/guestfs-testing.pod:113
5536 "Now try to load this into your favorite spreadsheet or database. Are the "
5537 "results reproduced faithfully in the spreadsheet/database?"
5541 #: ../examples/guestfs-testing.pod:116
5543 "http://www.postgresql.org/docs/8.1/static/sql-copy.html "
5544 "http://dev.mysql.com/doc/refman/5.1/en/load-data.html"
5548 #: ../examples/guestfs-testing.pod:119
5549 msgid "B<*> Edit a file in a B<shut off> guest."
5553 #: ../examples/guestfs-testing.pod:121
5555 "L<virt-edit(1)> can edit files in guests. Try this command on a RHEL or "
5560 #: ../examples/guestfs-testing.pod:124
5563 " virt-edit LinuxGuest /etc/sysconfig/network\n"
5568 #: ../examples/guestfs-testing.pod:126
5569 msgid "On other Linux guests try editing other files such as:"
5573 #: ../examples/guestfs-testing.pod:128
5576 " virt-edit LinuxGuest /etc/motd\n"
5581 #: ../examples/guestfs-testing.pod:130
5582 msgid "Are the changes seen inside the guest when it is booted?"
5586 #: ../examples/guestfs-testing.pod:132
5587 msgid "Display the filesystems / partitions / LVs in a guest."
5591 #: ../examples/guestfs-testing.pod:134
5593 "L<virt-filesystems(1)> can be used to display filesystems in a guest. Try "
5594 "this command on any disk image or guest:"
5598 #: ../examples/guestfs-testing.pod:137
5601 " virt-filesystems -a /path/to/disk.img --all --long -h\n"
5606 #: ../examples/guestfs-testing.pod:141
5609 " virt-filesystems -d Guest --all --long -h\n"
5614 #: ../examples/guestfs-testing.pod:143
5615 msgid "Do the results match what is seen in the guest?"
5619 #: ../examples/guestfs-testing.pod:145
5620 msgid "Run virt-inspector on all your guests."
5624 #: ../examples/guestfs-testing.pod:147
5626 "Use L<virt-inspector(1)> to get a report on all of your guests or disk "
5631 #: ../examples/guestfs-testing.pod:150
5634 " virt-inspector -a /path/to/disk.img | less\n"
5639 #: ../examples/guestfs-testing.pod:154
5642 " virt-inspector -d Guest | less\n"
5647 #: ../examples/guestfs-testing.pod:156
5648 msgid "Do the results match what is actually in the guest?"
5652 #: ../examples/guestfs-testing.pod:158
5653 msgid "Try the auditing features of virt-ls on all your guests."
5657 #: ../examples/guestfs-testing.pod:162
5660 " virt-ls -lR -d Guest / | grep '^- [42]'\n"
5665 #: ../examples/guestfs-testing.pod:166
5668 " virt-ls -lR -d Guest / | grep '^d ...7'\n"
5673 #: ../examples/guestfs-testing.pod:170
5676 " virt-ls -lR -d Guest / | grep '^s'\n"
5681 #: ../examples/guestfs-testing.pod:174
5684 " virt-ls -lR -d Guest / | grep -i '^-.*\\.png$'\n"
5689 #: ../examples/guestfs-testing.pod:176
5690 msgid "Display files larger than 10MB in home directories:"
5694 #: ../examples/guestfs-testing.pod:178
5697 " virt-ls -lR -d Guest /home | awk '$3 > 10*1024*1024'\n"
5702 #: ../examples/guestfs-testing.pod:182
5705 " virt-ls -lR -d Guest --time-days / | awk '$6 <= 7'\n"
5710 #: ../examples/guestfs-testing.pod:186
5713 " virt-ls -lR -d Guest --time-days / | grep '^-' | awk '$6 < 1'\n"
5718 #: ../examples/guestfs-testing.pod:188
5719 msgid "Do the results match what is in the guest?"
5723 #: ../examples/guestfs-testing.pod:190
5724 msgid "Create a disk image from a tarball."
5728 #: ../examples/guestfs-testing.pod:192
5730 "Use L<virt-make-fs(1)> to create a disk image from any tarball that you "
5735 #: ../examples/guestfs-testing.pod:195
5738 " virt-make-fs --partition=mbr --type=vfat /any/tarball.tar.gz output.img\n"
5743 #: ../examples/guestfs-testing.pod:197
5745 "Add 'output.img' as a raw disk to an existing guest. Check the guest can "
5746 "see the files. This test is particularly useful if you try it with a "
5751 #: ../examples/guestfs-testing.pod:201
5752 msgid "Try other partitioning schemes, eg. I<--partition=gpt>."
5756 #: ../examples/guestfs-testing.pod:203
5757 msgid "Try other filesystem formats, eg. I<--type=ntfs>, I<--type=ext2>."
5761 #: ../examples/guestfs-testing.pod:205
5762 msgid "B<*> Run virt-rescue on a B<shut off> disk image or guest."
5766 #: ../examples/guestfs-testing.pod:207
5768 "Use L<virt-rescue(1)> to examine, rescue or repair a B<shut off> guest or "
5773 #: ../examples/guestfs-testing.pod:210
5776 " virt-rescue -a /path/to/disk.img\n"
5781 #: ../examples/guestfs-testing.pod:214
5784 " virt-rescue -d Guest\n"
5789 #: ../examples/guestfs-testing.pod:216
5790 msgid "Can you use ordinary shell commands to examine the guest?"
5794 #: ../examples/guestfs-testing.pod:218
5795 msgid "B<*> Resize your guests."
5799 #: ../examples/guestfs-testing.pod:220
5801 "Use L<virt-resize(1)> to give a guest some more disk space. For example, if "
5802 "you have a disk image that is smaller than 30G, increase it to 30G by doing:"
5806 #: ../examples/guestfs-testing.pod:224
5809 " truncate -s 30G newdisk.img\n"
5810 " virt-filesystems -a /path/to/olddisk.img --all --long -h\n"
5811 " virt-resize /path/to/olddisk.img newdisk.img --expand /dev/sda1\n"
5812 " qemu-kvm -m 1024 -hda newdisk.img\n"
5817 #: ../examples/guestfs-testing.pod:229
5818 msgid "Does the guest still boot? Try expanding other partitions."
5822 #: ../examples/guestfs-testing.pod:231
5823 msgid "B<*> Sparsify a guest disk."
5827 #: ../examples/guestfs-testing.pod:233
5828 msgid "Using L<virt-sparsify(1)>, make a disk image more sparse:"
5832 #: ../examples/guestfs-testing.pod:235
5835 " virt-sparsify /path/to/olddisk.img newdisk.img\n"
5840 #: ../examples/guestfs-testing.pod:237
5842 "Is C<newdisk.img> still bootable after sparsifying? Is the resulting disk "
5843 "image smaller (use C<du> to check)?"
5847 #: ../examples/guestfs-testing.pod:240
5848 msgid "B<*> \"sysprep\" a B<shut off> Linux guest."
5852 #: ../examples/guestfs-testing.pod:242
5854 "Note that this really will mess up an existing guest, so it's better to "
5855 "clone the guest before trying this."
5859 #: ../examples/guestfs-testing.pod:245
5862 " virt-sysprep --hostname newhost.example.com -a /path/to/disk.img\n"
5867 #: ../examples/guestfs-testing.pod:247
5869 "Was the sysprep successful? After booting, what changes were made and were "
5874 #: ../examples/guestfs-testing.pod:250
5875 msgid "Dump the Windows Registry from your Windows guests."
5879 #: ../examples/guestfs-testing.pod:252
5881 "Use L<virt-win-reg(1)> to dump out the Windows Registry from any Windows "
5882 "guests that you have."
5886 #: ../examples/guestfs-testing.pod:255
5889 " virt-win-reg --unsafe-printable-strings WindowsGuest 'HKLM\\Software' |\n"
5895 #: ../examples/guestfs-testing.pod:258
5898 " virt-win-reg --unsafe-printable-strings WindowsGuest 'HKLM\\System' |\n"
5904 #: ../examples/guestfs-testing.pod:261
5905 msgid "Does the output match running C<regedit> inside the guest?"
5909 #: ../examples/guestfs-testing.pod:263
5911 "A recent feature is the ability to dump user registries, so try this, "
5912 "replacing I<username> with the name of a local user in the guest:"
5916 #: ../examples/guestfs-testing.pod:266
5919 " virt-win-reg --unsafe-printable-strings WindowsGuest 'HKEY_USERS\\username' "
5926 #: ../examples/guestfs-testing.pod:271
5928 "L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>, "
5929 "L<http://libguestfs.org/>."
5933 #: ../fish/guestfish-actions.pod:1
5938 #: ../fish/guestfish-actions.pod:3
5941 " add-cdrom filename\n"
5946 #: ../fish/guestfish-actions.pod:5 ../src/guestfs-actions.pod:14
5947 msgid "This function adds a virtual CD-ROM disk image to the guest."
5951 #: ../fish/guestfish-actions.pod:7 ../src/guestfs-actions.pod:16
5952 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
5956 #: ../fish/guestfish-actions.pod:15
5958 "This call checks for the existence of C<filename>. This stops you from "
5959 "specifying other types of drive which are supported by qemu such as C<nbd:> "
5960 "and C<http:> URLs. To specify those, use the general L</config> call "
5965 #: ../fish/guestfish-actions.pod:22
5967 "If you just want to add an ISO file (often you use this as an efficient way "
5968 "to transfer large files into the guest), then you should probably use "
5969 "L</add-drive-ro> instead."
5973 #: ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:214 ../fish/guestfish-actions.pod:228
5975 "I<This function is deprecated.> In new code, use the L</add_drive_opts> call "
5980 #: ../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
5982 "Deprecated functions will not be removed from the API, but the fact that "
5983 "they are deprecated indicates that there are problems with correct use of "
5988 #: ../fish/guestfish-actions.pod:35
5993 #: ../fish/guestfish-actions.pod:37
5998 #: ../fish/guestfish-actions.pod:39
6001 " add-domain dom [libvirturi:..] [readonly:true|false] [iface:..] "
6002 "[live:true|false] [allowuuid:true|false] [readonlydisk:..]\n"
6007 #: ../fish/guestfish-actions.pod:41
6009 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
6010 "It works by connecting to libvirt, requesting the domain and domain XML from "
6011 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
6015 #: ../fish/guestfish-actions.pod:46 ../src/guestfs-actions.pod:65
6017 "The number of disks added is returned. This operation is atomic: if an "
6018 "error is returned, then no disks are added."
6022 #: ../fish/guestfish-actions.pod:49 ../src/guestfs-actions.pod:68
6024 "This function does some minimal checks to make sure the libvirt domain is "
6025 "not running (unless C<readonly> is true). In a future version we will try "
6026 "to acquire the libvirt lock on each disk."
6030 #: ../fish/guestfish-actions.pod:53 ../src/guestfs-actions.pod:72
6032 "Disks must be accessible locally. This often means that adding disks from a "
6033 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
6034 "unless those disks are accessible via the same device path locally too."
6038 #: ../fish/guestfish-actions.pod:58 ../src/guestfs-actions.pod:77
6040 "The optional C<libvirturi> parameter sets the libvirt URI (see "
6041 "L<http://libvirt.org/uri.html>). If this is not set then we connect to the "
6042 "default libvirt URI (or one set through an environment variable, see the "
6043 "libvirt documentation for full details)."
6047 #: ../fish/guestfish-actions.pod:64 ../src/guestfs-actions.pod:83
6049 "The optional C<live> flag controls whether this call will try to connect to "
6050 "a running virtual machine C<guestfsd> process if it sees a suitable "
6051 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
6052 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
6053 "DAEMONS> for more information."
6057 #: ../fish/guestfish-actions.pod:71 ../src/guestfs-actions.pod:90
6059 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
6060 "passed instead of the domain name. The C<dom> string is treated as a UUID "
6061 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
6066 #: ../fish/guestfish-actions.pod:76 ../src/guestfs-actions.pod:95
6068 "The optional C<readonlydisk> parameter controls what we do for disks which "
6069 "are marked E<lt>readonly/E<gt> in the libvirt XML. Possible values are:"
6073 #: ../fish/guestfish-actions.pod:82 ../src/guestfs-actions.pod:101
6074 msgid "readonlydisk = \"error\""
6078 #: ../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
6079 msgid "If C<readonly> is false:"
6083 #: ../fish/guestfish-actions.pod:86 ../src/guestfs-actions.pod:105
6085 "The whole call is aborted with an error if any disk with the "
6086 "E<lt>readonly/E<gt> flag is found."
6090 #: ../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
6091 msgid "If C<readonly> is true:"
6095 #: ../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
6096 msgid "Disks with the E<lt>readonly/E<gt> flag are added read-only."
6100 #: ../fish/guestfish-actions.pod:93 ../src/guestfs-actions.pod:112
6101 msgid "readonlydisk = \"read\""
6105 #: ../fish/guestfish-actions.pod:97 ../src/guestfs-actions.pod:116
6107 "Disks with the E<lt>readonly/E<gt> flag are added read-only. Other disks "
6108 "are added read/write."
6112 #: ../fish/guestfish-actions.pod:104 ../src/guestfs-actions.pod:123
6113 msgid "readonlydisk = \"write\" (default)"
6117 #: ../fish/guestfish-actions.pod:108 ../src/guestfs-actions.pod:127
6118 msgid "Disks with the E<lt>readonly/E<gt> flag are added read/write."
6122 #: ../fish/guestfish-actions.pod:114 ../src/guestfs-actions.pod:133
6123 msgid "readonlydisk = \"ignore\""
6127 #: ../fish/guestfish-actions.pod:116 ../src/guestfs-actions.pod:135
6128 msgid "If C<readonly> is true or false:"
6132 #: ../fish/guestfish-actions.pod:118 ../src/guestfs-actions.pod:137
6133 msgid "Disks with the E<lt>readonly/E<gt> flag are skipped."
6137 #: ../fish/guestfish-actions.pod:122
6139 "The other optional parameters are passed directly through to "
6140 "L</add-drive-opts>."
6144 #: ../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
6146 "This command has one or more optional arguments. See L</OPTIONAL "
6151 #: ../fish/guestfish-actions.pod:127
6156 #: ../fish/guestfish-actions.pod:129
6159 " add-drive filename\n"
6164 #: ../fish/guestfish-actions.pod:131
6166 "This function is the equivalent of calling L</add-drive-opts> with no "
6167 "optional parameters, so the disk is added writable, with the format being "
6168 "detected automatically."
6172 #: ../fish/guestfish-actions.pod:135
6174 "Automatic detection of the format opens you up to a potential security hole "
6175 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6176 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
6177 "you should think about replacing calls to this function with calls to "
6178 "L</add-drive-opts>, and specifying the format."
6182 #: ../fish/guestfish-actions.pod:142
6183 msgid "add-drive-opts"
6187 #: ../fish/guestfish-actions.pod:144
6192 #: ../fish/guestfish-actions.pod:146
6195 " add-drive-opts filename [readonly:true|false] [format:..] [iface:..] "
6201 #: ../fish/guestfish-actions.pod:148 ../src/guestfs-actions.pod:208
6203 "This function adds a virtual machine disk image C<filename> to libguestfs. "
6204 "The first time you call this function, the disk appears as C</dev/sda>, the "
6205 "second time as C</dev/sdb>, and so on."
6209 #: ../fish/guestfish-actions.pod:153 ../src/guestfs-actions.pod:213
6211 "You don't necessarily need to be root when using libguestfs. However you "
6212 "obviously do need sufficient permissions to access the filename for whatever "
6213 "operations you want to perform (ie. read access if you just want to read the "
6214 "image or write access if you want to modify the image)."
6218 #: ../fish/guestfish-actions.pod:159 ../src/guestfs-actions.pod:219
6219 msgid "This call checks that C<filename> exists."
6223 #: ../fish/guestfish-actions.pod:161 ../fish/guestfish-actions.pod:3392 ../src/guestfs-actions.pod:221 ../src/guestfs-actions.pod:5262
6224 msgid "The optional arguments are:"
6228 #: ../fish/guestfish-actions.pod:165 ../src/guestfs-actions.pod:225
6233 #: ../fish/guestfish-actions.pod:167 ../src/guestfs-actions.pod:227
6235 "If true then the image is treated as read-only. Writes are still allowed, "
6236 "but they are stored in a temporary snapshot overlay which is discarded at "
6237 "the end. The disk that you add is not modified."
6241 #: ../fish/guestfish-actions.pod:171 ../src/guestfs-actions.pod:231
6246 #: ../fish/guestfish-actions.pod:173
6248 "This forces the image format. If you omit this (or use L</add-drive> or "
6249 "L</add-drive-ro>) then the format is automatically detected. Possible "
6250 "formats include C<raw> and C<qcow2>."
6254 #: ../fish/guestfish-actions.pod:177 ../src/guestfs-actions.pod:237
6256 "Automatic detection of the format opens you up to a potential security hole "
6257 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6258 "RHBZ#642934. Specifying the format closes this security hole."
6262 #: ../fish/guestfish-actions.pod:182 ../src/guestfs-actions.pod:242
6267 #: ../fish/guestfish-actions.pod:184
6269 "This rarely-used option lets you emulate the behaviour of the deprecated "
6270 "L</add-drive-with-if> call (q.v.)"
6274 #: ../fish/guestfish-actions.pod:187 ../fish/guestfish-actions.pod:3242 ../src/guestfs-actions.pod:247 ../src/guestfs-actions.pod:4994
6279 #: ../fish/guestfish-actions.pod:189 ../src/guestfs-actions.pod:249
6281 "The name the drive had in the original guest, e.g. /dev/sdb. This is used as "
6282 "a hint to the guest inspection process if it is available."
6286 #: ../fish/guestfish-actions.pod:196
6287 msgid "add-drive-ro"
6291 #: ../fish/guestfish-actions.pod:198
6296 #: ../fish/guestfish-actions.pod:200
6299 " add-drive-ro filename\n"
6304 #: ../fish/guestfish-actions.pod:202
6306 "This function is the equivalent of calling L</add-drive-opts> with the "
6307 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
6308 "is added read-only, with the format being detected automatically."
6312 #: ../fish/guestfish-actions.pod:207
6313 msgid "add-drive-ro-with-if"
6317 #: ../fish/guestfish-actions.pod:209
6320 " add-drive-ro-with-if filename iface\n"
6325 #: ../fish/guestfish-actions.pod:211
6327 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
6328 "interface emulation to use at run time."
6332 #: ../fish/guestfish-actions.pod:221
6333 msgid "add-drive-with-if"
6337 #: ../fish/guestfish-actions.pod:223
6340 " add-drive-with-if filename iface\n"
6345 #: ../fish/guestfish-actions.pod:225
6347 "This is the same as L</add-drive> but it allows you to specify the QEMU "
6348 "interface emulation to use at run time."
6352 #: ../fish/guestfish-actions.pod:235
6357 #: ../fish/guestfish-actions.pod:237
6360 " aug-clear augpath\n"
6365 #: ../fish/guestfish-actions.pod:239 ../src/guestfs-actions.pod:343
6367 "Set the value associated with C<path> to C<NULL>. This is the same as the "
6368 "L<augtool(1)> C<clear> command."
6372 #: ../fish/guestfish-actions.pod:242
6377 #: ../fish/guestfish-actions.pod:244
6385 #: ../fish/guestfish-actions.pod:246
6387 "Close the current Augeas handle and free up any resources used by it. After "
6388 "calling this, you have to call L</aug-init> again before you can use any "
6389 "other Augeas functions."
6393 #: ../fish/guestfish-actions.pod:251
6398 #: ../fish/guestfish-actions.pod:253
6401 " aug-defnode name expr val\n"
6406 #: ../fish/guestfish-actions.pod:255 ../src/guestfs-actions.pod:372
6407 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
6411 #: ../fish/guestfish-actions.pod:258
6413 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
6414 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
6415 "containing that single node."
6419 #: ../fish/guestfish-actions.pod:262 ../src/guestfs-actions.pod:379
6421 "On success this returns a pair containing the number of nodes in the "
6422 "nodeset, and a boolean flag if a node was created."
6426 #: ../fish/guestfish-actions.pod:266
6431 #: ../fish/guestfish-actions.pod:268
6434 " aug-defvar name expr\n"
6439 #: ../fish/guestfish-actions.pod:270 ../src/guestfs-actions.pod:396
6441 "Defines an Augeas variable C<name> whose value is the result of evaluating "
6442 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
6446 #: ../fish/guestfish-actions.pod:274 ../src/guestfs-actions.pod:400
6448 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
6449 "evaluates to something which is not a nodeset."
6453 #: ../fish/guestfish-actions.pod:277
6458 #: ../fish/guestfish-actions.pod:279
6461 " aug-get augpath\n"
6466 #: ../fish/guestfish-actions.pod:281 ../src/guestfs-actions.pod:413
6468 "Look up the value associated with C<path>. If C<path> matches exactly one "
6469 "node, the C<value> is returned."
6473 #: ../fish/guestfish-actions.pod:284
6478 #: ../fish/guestfish-actions.pod:286
6481 " aug-init root flags\n"
6486 #: ../fish/guestfish-actions.pod:288 ../src/guestfs-actions.pod:428
6488 "Create a new Augeas handle for editing configuration files. If there was "
6489 "any previous Augeas handle associated with this guestfs session, then it is "
6494 #: ../fish/guestfish-actions.pod:292
6495 msgid "You must call this before using any other L</aug-*> commands."
6499 #: ../fish/guestfish-actions.pod:295 ../src/guestfs-actions.pod:435
6500 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
6504 #: ../fish/guestfish-actions.pod:298 ../src/guestfs-actions.pod:438
6506 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
6507 "logical I<or> of the following integers:"
6511 #: ../fish/guestfish-actions.pod:304 ../src/guestfs-actions.pod:444
6512 msgid "C<AUG_SAVE_BACKUP> = 1"
6516 #: ../fish/guestfish-actions.pod:306 ../src/guestfs-actions.pod:446
6517 msgid "Keep the original file with a C<.augsave> extension."
6521 #: ../fish/guestfish-actions.pod:308 ../src/guestfs-actions.pod:448
6522 msgid "C<AUG_SAVE_NEWFILE> = 2"
6526 #: ../fish/guestfish-actions.pod:310 ../src/guestfs-actions.pod:450
6528 "Save changes into a file with extension C<.augnew>, and do not overwrite "
6529 "original. Overrides C<AUG_SAVE_BACKUP>."
6533 #: ../fish/guestfish-actions.pod:313 ../src/guestfs-actions.pod:453
6534 msgid "C<AUG_TYPE_CHECK> = 4"
6538 #: ../fish/guestfish-actions.pod:315 ../src/guestfs-actions.pod:455
6539 msgid "Typecheck lenses."
6543 #: ../fish/guestfish-actions.pod:317
6545 "This option is only useful when debugging Augeas lenses. Use of this option "
6546 "may require additional memory for the libguestfs appliance. You may need to "
6547 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call L</set-memsize>."
6551 #: ../fish/guestfish-actions.pod:322 ../src/guestfs-actions.pod:462
6552 msgid "C<AUG_NO_STDINC> = 8"
6556 #: ../fish/guestfish-actions.pod:324 ../src/guestfs-actions.pod:464
6557 msgid "Do not use standard load path for modules."
6561 #: ../fish/guestfish-actions.pod:326 ../src/guestfs-actions.pod:466
6562 msgid "C<AUG_SAVE_NOOP> = 16"
6566 #: ../fish/guestfish-actions.pod:328 ../src/guestfs-actions.pod:468
6567 msgid "Make save a no-op, just record what would have been changed."
6571 #: ../fish/guestfish-actions.pod:330 ../src/guestfs-actions.pod:470
6572 msgid "C<AUG_NO_LOAD> = 32"
6576 #: ../fish/guestfish-actions.pod:332
6577 msgid "Do not load the tree in L</aug-init>."
6581 #: ../fish/guestfish-actions.pod:336
6582 msgid "To close the handle, you can call L</aug-close>."
6586 #: ../fish/guestfish-actions.pod:338 ../src/guestfs-actions.pod:478
6587 msgid "To find out more about Augeas, see L<http://augeas.net/>."
6591 #: ../fish/guestfish-actions.pod:340
6596 #: ../fish/guestfish-actions.pod:342
6599 " aug-insert augpath label true|false\n"
6604 #: ../fish/guestfish-actions.pod:344 ../src/guestfs-actions.pod:492
6606 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
6607 "or after C<path> (depending on the boolean flag C<before>)."
6611 #: ../fish/guestfish-actions.pod:348 ../src/guestfs-actions.pod:496
6613 "C<path> must match exactly one existing node in the tree, and C<label> must "
6614 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
6618 #: ../fish/guestfish-actions.pod:352
6623 #: ../fish/guestfish-actions.pod:354
6631 #: ../fish/guestfish-actions.pod:356 ../src/guestfs-actions.pod:509
6632 msgid "Load files into the tree."
6636 #: ../fish/guestfish-actions.pod:358 ../src/guestfs-actions.pod:511
6637 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
6641 #: ../fish/guestfish-actions.pod:361
6646 #: ../fish/guestfish-actions.pod:363
6654 #: ../fish/guestfish-actions.pod:365
6656 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
6657 "resulting nodes into alphabetical order."
6661 #: ../fish/guestfish-actions.pod:368
6666 #: ../fish/guestfish-actions.pod:370
6669 " aug-match augpath\n"
6674 #: ../fish/guestfish-actions.pod:372 ../src/guestfs-actions.pod:539
6676 "Returns a list of paths which match the path expression C<path>. The "
6677 "returned paths are sufficiently qualified so that they match exactly one "
6678 "node in the current tree."
6682 #: ../fish/guestfish-actions.pod:376
6687 #: ../fish/guestfish-actions.pod:378
6690 " aug-mv src dest\n"
6695 #: ../fish/guestfish-actions.pod:380 ../src/guestfs-actions.pod:556
6697 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
6698 "C<dest> is overwritten if it exists."
6702 #: ../fish/guestfish-actions.pod:383
6707 #: ../fish/guestfish-actions.pod:385
6715 #: ../fish/guestfish-actions.pod:387 ../src/guestfs-actions.pod:569
6716 msgid "Remove C<path> and all of its children."
6720 #: ../fish/guestfish-actions.pod:389 ../src/guestfs-actions.pod:571
6721 msgid "On success this returns the number of entries which were removed."
6725 #: ../fish/guestfish-actions.pod:391
6730 #: ../fish/guestfish-actions.pod:393
6738 #: ../fish/guestfish-actions.pod:395 ../src/guestfs-actions.pod:582
6739 msgid "This writes all pending changes to disk."
6743 #: ../fish/guestfish-actions.pod:397
6745 "The flags which were passed to L</aug-init> affect exactly how files are "
6750 #: ../fish/guestfish-actions.pod:400
6755 #: ../fish/guestfish-actions.pod:402
6758 " aug-set augpath val\n"
6763 #: ../fish/guestfish-actions.pod:404 ../src/guestfs-actions.pod:598
6764 msgid "Set the value associated with C<path> to C<val>."
6768 #: ../fish/guestfish-actions.pod:406
6770 "In the Augeas API, it is possible to clear a node by setting the value to "
6771 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
6772 "this call. Instead you must use the L</aug-clear> call."
6776 #: ../fish/guestfish-actions.pod:411
6781 #: ../fish/guestfish-actions.pod:413
6784 " available 'groups ...'\n"
6789 #: ../fish/guestfish-actions.pod:415 ../src/guestfs-actions.pod:615
6791 "This command is used to check the availability of some groups of "
6792 "functionality in the appliance, which not all builds of the libguestfs "
6793 "appliance will be able to provide."
6797 #: ../fish/guestfish-actions.pod:419
6799 "The libguestfs groups, and the functions that those groups correspond to, "
6800 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
6801 "runtime by calling L</available-all-groups>."
6805 #: ../fish/guestfish-actions.pod:424 ../src/guestfs-actions.pod:624
6807 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
6808 "\"augeas\"]> would check for the availability of the Linux inotify functions "
6809 "and Augeas (configuration file editing) functions."
6813 #: ../fish/guestfish-actions.pod:429 ../src/guestfs-actions.pod:629
6814 msgid "The command returns no error if I<all> requested groups are available."
6818 #: ../fish/guestfish-actions.pod:431 ../src/guestfs-actions.pod:631
6820 "It fails with an error if one or more of the requested groups is unavailable "
6825 #: ../fish/guestfish-actions.pod:434 ../src/guestfs-actions.pod:634
6827 "If an unknown group name is included in the list of groups then an error is "
6832 #: ../fish/guestfish-actions.pod:437 ../src/guestfs-actions.pod:637
6837 #: ../fish/guestfish-actions.pod:443
6838 msgid "You must call L</launch> before calling this function."
6842 #: ../fish/guestfish-actions.pod:445 ../src/guestfs-actions.pod:645
6844 "The reason is because we don't know what groups are supported by the "
6845 "appliance/daemon until it is running and can be queried."
6849 #: ../fish/guestfish-actions.pod:451 ../src/guestfs-actions.pod:651
6851 "If a group of functions is available, this does not necessarily mean that "
6852 "they will work. You still have to check for errors when calling individual "
6853 "API functions even if they are available."
6857 #: ../fish/guestfish-actions.pod:458 ../src/guestfs-actions.pod:658
6859 "It is usually the job of distro packagers to build complete functionality "
6860 "into the libguestfs appliance. Upstream libguestfs, if built from source "
6861 "with all requirements satisfied, will support everything."
6865 #: ../fish/guestfish-actions.pod:465
6867 "This call was added in version C<1.0.80>. In previous versions of "
6868 "libguestfs all you could do would be to speculatively execute a command to "
6869 "find out if the daemon implemented it. See also L</version>."
6873 #: ../fish/guestfish-actions.pod:472
6874 msgid "available-all-groups"
6878 #: ../fish/guestfish-actions.pod:474
6881 " available-all-groups\n"
6886 #: ../fish/guestfish-actions.pod:476
6888 "This command returns a list of all optional groups that this daemon knows "
6889 "about. Note this returns both supported and unsupported groups. To find "
6890 "out which ones the daemon can actually support you have to call "
6891 "L</available> on each member of the returned list."
6895 #: ../fish/guestfish-actions.pod:482
6896 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
6900 #: ../fish/guestfish-actions.pod:484
6905 #: ../fish/guestfish-actions.pod:486
6908 " base64-in (base64file|-) filename\n"
6913 #: ../fish/guestfish-actions.pod:488 ../src/guestfs-actions.pod:702
6914 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
6918 #: ../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
6919 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
6923 #: ../fish/guestfish-actions.pod:493
6928 #: ../fish/guestfish-actions.pod:495
6931 " base64-out filename (base64file|-)\n"
6936 #: ../fish/guestfish-actions.pod:497 ../src/guestfs-actions.pod:716
6938 "This command downloads the contents of C<filename>, writing it out to local "
6939 "file C<base64file> encoded as base64."
6943 #: ../fish/guestfish-actions.pod:502
6944 msgid "blockdev-flushbufs"
6948 #: ../fish/guestfish-actions.pod:504
6951 " blockdev-flushbufs device\n"
6956 #: ../fish/guestfish-actions.pod:506 ../src/guestfs-actions.pod:729
6957 msgid "This tells the kernel to flush internal buffers associated with C<device>."
6961 #: ../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
6962 msgid "This uses the L<blockdev(8)> command."
6966 #: ../fish/guestfish-actions.pod:511
6967 msgid "blockdev-getbsz"
6971 #: ../fish/guestfish-actions.pod:513
6974 " blockdev-getbsz device\n"
6979 #: ../fish/guestfish-actions.pod:515 ../src/guestfs-actions.pod:744
6980 msgid "This returns the block size of a device."
6984 #: ../fish/guestfish-actions.pod:517 ../fish/guestfish-actions.pod:580 ../src/guestfs-actions.pod:746 ../src/guestfs-actions.pod:846
6986 "(Note this is different from both I<size in blocks> and I<filesystem block "
6991 #: ../fish/guestfish-actions.pod:522
6992 msgid "blockdev-getro"
6996 #: ../fish/guestfish-actions.pod:524
6999 " blockdev-getro device\n"
7004 #: ../fish/guestfish-actions.pod:526 ../src/guestfs-actions.pod:761
7006 "Returns a boolean indicating if the block device is read-only (true if "
7007 "read-only, false if not)."
7011 #: ../fish/guestfish-actions.pod:531
7012 msgid "blockdev-getsize64"
7016 #: ../fish/guestfish-actions.pod:533
7019 " blockdev-getsize64 device\n"
7024 #: ../fish/guestfish-actions.pod:535 ../src/guestfs-actions.pod:776
7025 msgid "This returns the size of the device in bytes."
7029 #: ../fish/guestfish-actions.pod:537
7030 msgid "See also L</blockdev-getsz>."
7034 #: ../fish/guestfish-actions.pod:541
7035 msgid "blockdev-getss"
7039 #: ../fish/guestfish-actions.pod:543
7042 " blockdev-getss device\n"
7047 #: ../fish/guestfish-actions.pod:545 ../src/guestfs-actions.pod:792
7049 "This returns the size of sectors on a block device. Usually 512, but can be "
7050 "larger for modern devices."
7054 #: ../fish/guestfish-actions.pod:548
7055 msgid "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
7059 #: ../fish/guestfish-actions.pod:553
7060 msgid "blockdev-getsz"
7064 #: ../fish/guestfish-actions.pod:555
7067 " blockdev-getsz device\n"
7072 #: ../fish/guestfish-actions.pod:557 ../src/guestfs-actions.pod:810
7074 "This returns the size of the device in units of 512-byte sectors (even if "
7075 "the sectorsize isn't 512 bytes ... weird)."
7079 #: ../fish/guestfish-actions.pod:560
7081 "See also L</blockdev-getss> for the real sector size of the device, and "
7082 "L</blockdev-getsize64> for the more useful I<size in bytes>."
7086 #: ../fish/guestfish-actions.pod:566
7087 msgid "blockdev-rereadpt"
7091 #: ../fish/guestfish-actions.pod:568
7094 " blockdev-rereadpt device\n"
7099 #: ../fish/guestfish-actions.pod:570 ../src/guestfs-actions.pod:829
7100 msgid "Reread the partition table on C<device>."
7104 #: ../fish/guestfish-actions.pod:574
7105 msgid "blockdev-setbsz"
7109 #: ../fish/guestfish-actions.pod:576
7112 " blockdev-setbsz device blocksize\n"
7117 #: ../fish/guestfish-actions.pod:578 ../src/guestfs-actions.pod:844
7118 msgid "This sets the block size of a device."
7122 #: ../fish/guestfish-actions.pod:585
7123 msgid "blockdev-setro"
7127 #: ../fish/guestfish-actions.pod:587
7130 " blockdev-setro device\n"
7135 #: ../fish/guestfish-actions.pod:589 ../src/guestfs-actions.pod:861
7136 msgid "Sets the block device named C<device> to read-only."
7140 #: ../fish/guestfish-actions.pod:593
7141 msgid "blockdev-setrw"
7145 #: ../fish/guestfish-actions.pod:595
7148 " blockdev-setrw device\n"
7153 #: ../fish/guestfish-actions.pod:597 ../src/guestfs-actions.pod:875
7154 msgid "Sets the block device named C<device> to read-write."
7158 #: ../fish/guestfish-actions.pod:601
7159 msgid "btrfs-filesystem-resize"
7163 #: ../fish/guestfish-actions.pod:603
7166 " btrfs-filesystem-resize mountpoint [size:N]\n"
7171 #: ../fish/guestfish-actions.pod:605 ../src/guestfs-actions.pod:897
7172 msgid "This command resizes a btrfs filesystem."
7176 #: ../fish/guestfish-actions.pod:607 ../src/guestfs-actions.pod:899
7178 "Note that unlike other resize calls, the filesystem has to be mounted and "
7179 "the parameter is the mountpoint not the device (this is a requirement of "
7184 #: ../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
7185 msgid "The optional parameters are:"
7189 #: ../fish/guestfish-actions.pod:615 ../fish/guestfish-actions.pod:3707 ../src/guestfs-actions.pod:907 ../src/guestfs-actions.pod:5790
7194 #: ../fish/guestfish-actions.pod:617 ../src/guestfs-actions.pod:909
7196 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
7197 "resized to the maximum size."
7201 #: ../fish/guestfish-actions.pod:622 ../src/guestfs-actions.pod:914
7202 msgid "See also L<btrfs(8)>."
7206 #: ../fish/guestfish-actions.pod:626
7207 msgid "case-sensitive-path"
7211 #: ../fish/guestfish-actions.pod:628
7214 " case-sensitive-path path\n"
7219 #: ../fish/guestfish-actions.pod:630 ../src/guestfs-actions.pod:948
7221 "This can be used to resolve case insensitive paths on a filesystem which is "
7222 "case sensitive. The use case is to resolve paths which you have read from "
7223 "Windows configuration files or the Windows Registry, to the true path."
7227 #: ../fish/guestfish-actions.pod:635 ../src/guestfs-actions.pod:953
7229 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
7230 "(and probably others), which is that although the underlying filesystem is "
7231 "case-insensitive, the driver exports the filesystem to Linux as "
7236 #: ../fish/guestfish-actions.pod:640 ../src/guestfs-actions.pod:958
7238 "One consequence of this is that special directories such as C<c:\\windows> "
7239 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
7240 "precise details of how they were created. In Windows itself this would not "
7245 #: ../fish/guestfish-actions.pod:646 ../src/guestfs-actions.pod:964
7247 "Bug or feature? You decide: "
7248 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
7252 #: ../fish/guestfish-actions.pod:649 ../src/guestfs-actions.pod:967
7254 "This function resolves the true case of each element in the path and returns "
7255 "the case-sensitive path."
7259 #: ../fish/guestfish-actions.pod:652
7261 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return "
7262 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
7263 "how the directories were originally created under Windows)."
7267 #: ../fish/guestfish-actions.pod:657 ../src/guestfs-actions.pod:975
7268 msgid "I<Note>: This function does not handle drive names, backslashes etc."
7272 #: ../fish/guestfish-actions.pod:660
7273 msgid "See also L</realpath>."
7277 #: ../fish/guestfish-actions.pod:662
7282 #: ../fish/guestfish-actions.pod:664
7290 #: ../fish/guestfish-actions.pod:666 ../fish/guestfish-actions.pod:4134 ../src/guestfs-actions.pod:991 ../src/guestfs-actions.pod:6446
7291 msgid "Return the contents of the file named C<path>."
7295 #: ../fish/guestfish-actions.pod:668
7297 "Note that this function cannot correctly handle binary files (specifically, "
7298 "files containing C<\\0> character which is treated as end of string). For "
7299 "those you need to use the L</read-file> or L</download> functions which have "
7300 "a more complex interface."
7304 #: ../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
7306 "Because of the message protocol, there is a transfer limit of somewhere "
7307 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
7311 #: ../fish/guestfish-actions.pod:676
7316 #: ../fish/guestfish-actions.pod:678
7319 " checksum csumtype path\n"
7324 #: ../fish/guestfish-actions.pod:680 ../src/guestfs-actions.pod:1013
7325 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
7329 #: ../fish/guestfish-actions.pod:683 ../src/guestfs-actions.pod:1016
7331 "The type of checksum to compute is given by the C<csumtype> parameter which "
7332 "must have one of the following values:"
7336 #: ../fish/guestfish-actions.pod:688 ../src/guestfs-actions.pod:1021
7341 #: ../fish/guestfish-actions.pod:690 ../src/guestfs-actions.pod:1023
7343 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
7348 #: ../fish/guestfish-actions.pod:693 ../src/guestfs-actions.pod:1026
7353 #: ../fish/guestfish-actions.pod:695 ../src/guestfs-actions.pod:1028
7354 msgid "Compute the MD5 hash (using the C<md5sum> program)."
7358 #: ../fish/guestfish-actions.pod:697 ../src/guestfs-actions.pod:1030
7363 #: ../fish/guestfish-actions.pod:699 ../src/guestfs-actions.pod:1032
7364 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
7368 #: ../fish/guestfish-actions.pod:701 ../src/guestfs-actions.pod:1034
7373 #: ../fish/guestfish-actions.pod:703 ../src/guestfs-actions.pod:1036
7374 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
7378 #: ../fish/guestfish-actions.pod:705 ../src/guestfs-actions.pod:1038
7383 #: ../fish/guestfish-actions.pod:707 ../src/guestfs-actions.pod:1040
7384 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
7388 #: ../fish/guestfish-actions.pod:709 ../src/guestfs-actions.pod:1042
7393 #: ../fish/guestfish-actions.pod:711 ../src/guestfs-actions.pod:1044
7394 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
7398 #: ../fish/guestfish-actions.pod:713 ../src/guestfs-actions.pod:1046
7403 #: ../fish/guestfish-actions.pod:715 ../src/guestfs-actions.pod:1048
7404 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
7408 #: ../fish/guestfish-actions.pod:719 ../src/guestfs-actions.pod:1052
7409 msgid "The checksum is returned as a printable string."
7413 #: ../fish/guestfish-actions.pod:721
7414 msgid "To get the checksum for a device, use L</checksum-device>."
7418 #: ../fish/guestfish-actions.pod:723
7419 msgid "To get the checksums for many files, use L</checksums-out>."
7423 #: ../fish/guestfish-actions.pod:725
7424 msgid "checksum-device"
7428 #: ../fish/guestfish-actions.pod:727
7431 " checksum-device csumtype device\n"
7436 #: ../fish/guestfish-actions.pod:729
7438 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
7439 "device named C<device>. For the types of checksums supported see the "
7440 "L</checksum> command."
7444 #: ../fish/guestfish-actions.pod:733
7445 msgid "checksums-out"
7449 #: ../fish/guestfish-actions.pod:735
7452 " checksums-out csumtype directory (sumsfile|-)\n"
7457 #: ../fish/guestfish-actions.pod:737 ../src/guestfs-actions.pod:1087
7459 "This command computes the checksums of all regular files in C<directory> and "
7460 "then emits a list of those checksums to the local output file C<sumsfile>."
7464 #: ../fish/guestfish-actions.pod:741 ../src/guestfs-actions.pod:1091
7466 "This can be used for verifying the integrity of a virtual machine. However "
7467 "to be properly secure you should pay attention to the output of the checksum "
7468 "command (it uses the ones from GNU coreutils). In particular when the "
7469 "filename is not printable, coreutils uses a special backslash syntax. For "
7470 "more information, see the GNU coreutils info file."
7474 #: ../fish/guestfish-actions.pod:751
7479 #: ../fish/guestfish-actions.pod:753
7482 " chmod mode path\n"
7487 #: ../fish/guestfish-actions.pod:755 ../src/guestfs-actions.pod:1110
7489 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
7494 #: ../fish/guestfish-actions.pod:758 ../src/guestfs-actions.pod:1113
7496 "I<Note>: When using this command from guestfish, C<mode> by default would be "
7497 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
7502 #: ../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
7503 msgid "The mode actually set is affected by the umask."
7507 #: ../fish/guestfish-actions.pod:764
7512 #: ../fish/guestfish-actions.pod:766
7515 " chown owner group path\n"
7520 #: ../fish/guestfish-actions.pod:768 ../src/guestfs-actions.pod:1131
7521 msgid "Change the file owner to C<owner> and group to C<group>."
7525 #: ../fish/guestfish-actions.pod:770 ../fish/guestfish-actions.pod:2703 ../src/guestfs-actions.pod:1133 ../src/guestfs-actions.pod:4124
7527 "Only numeric uid and gid are supported. If you want to use names, you will "
7528 "need to locate and parse the password file yourself (Augeas support makes "
7529 "this relatively easy)."
7533 #: ../fish/guestfish-actions.pod:774
7538 #: ../fish/guestfish-actions.pod:776
7541 " command 'arguments ...'\n"
7546 #: ../fish/guestfish-actions.pod:778 ../src/guestfs-actions.pod:1147
7548 "This call runs a command from the guest filesystem. The filesystem must be "
7549 "mounted, and must contain a compatible operating system (ie. something "
7550 "Linux, with the same or compatible processor architecture)."
7554 #: ../fish/guestfish-actions.pod:783
7556 "The single parameter is an argv-style list of arguments. The first element "
7557 "is the name of the program to run. Subsequent elements are parameters. The "
7558 "list must be non-empty (ie. must contain a program name). Note that the "
7559 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
7563 #: ../fish/guestfish-actions.pod:790 ../src/guestfs-actions.pod:1159
7564 msgid "The return value is anything printed to I<stdout> by the command."
7568 #: ../fish/guestfish-actions.pod:793 ../src/guestfs-actions.pod:1162
7570 "If the command returns a non-zero exit status, then this function returns an "
7571 "error message. The error message string is the content of I<stderr> from "
7576 #: ../fish/guestfish-actions.pod:797 ../src/guestfs-actions.pod:1166
7578 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
7579 "C</bin>. If you require a program from another location, you should provide "
7580 "the full path in the first parameter."
7584 #: ../fish/guestfish-actions.pod:802 ../src/guestfs-actions.pod:1171
7586 "Shared libraries and data files required by the program must be available on "
7587 "filesystems which are mounted in the correct places. It is the caller's "
7588 "responsibility to ensure all filesystems that are needed are mounted at the "
7593 #: ../fish/guestfish-actions.pod:811
7594 msgid "command-lines"
7598 #: ../fish/guestfish-actions.pod:813
7601 " command-lines 'arguments ...'\n"
7606 #: ../fish/guestfish-actions.pod:815
7607 msgid "This is the same as L</command>, but splits the result into a list of lines."
7611 #: ../fish/guestfish-actions.pod:818
7612 msgid "See also: L</sh-lines>"
7616 #: ../fish/guestfish-actions.pod:823
7617 msgid "compress-device-out"
7621 #: ../fish/guestfish-actions.pod:825
7624 " compress-device-out ctype device (zdevice|-) [level:N]\n"
7629 #: ../fish/guestfish-actions.pod:827 ../src/guestfs-actions.pod:1221
7631 "This command compresses C<device> and writes it out to the local file "
7636 #: ../fish/guestfish-actions.pod:830
7638 "The C<ctype> and optional C<level> parameters have the same meaning as in "
7643 #: ../fish/guestfish-actions.pod:837
7644 msgid "compress-out"
7648 #: ../fish/guestfish-actions.pod:839
7651 " compress-out ctype file (zfile|-) [level:N]\n"
7656 #: ../fish/guestfish-actions.pod:841 ../src/guestfs-actions.pod:1273
7658 "This command compresses C<file> and writes it out to the local file "
7663 #: ../fish/guestfish-actions.pod:844 ../src/guestfs-actions.pod:1276
7665 "The compression program used is controlled by the C<ctype> parameter. "
7666 "Currently this includes: C<compress>, C<gzip>, C<bzip2>, C<xz> or C<lzop>. "
7667 "Some compression types may not be supported by particular builds of "
7668 "libguestfs, in which case you will get an error containing the substring "
7669 "\"not supported\"."
7673 #: ../fish/guestfish-actions.pod:850 ../src/guestfs-actions.pod:1282
7675 "The optional C<level> parameter controls compression level. The meaning and "
7676 "default for this parameter depends on the compression program being used."
7680 #: ../fish/guestfish-actions.pod:858
7685 #: ../fish/guestfish-actions.pod:860
7688 " config qemuparam qemuvalue\n"
7693 #: ../fish/guestfish-actions.pod:862 ../src/guestfs-actions.pod:1323
7695 "This can be used to add arbitrary qemu command line parameters of the form "
7696 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
7697 "setting some parameters which would interfere with parameters that we use."
7701 #: ../fish/guestfish-actions.pod:867 ../src/guestfs-actions.pod:1328
7702 msgid "The first character of C<param> string must be a C<-> (dash)."
7706 #: ../fish/guestfish-actions.pod:869 ../src/guestfs-actions.pod:1330
7707 msgid "C<value> can be NULL."
7711 #: ../fish/guestfish-actions.pod:871
7712 msgid "copy-device-to-device"
7716 #: ../fish/guestfish-actions.pod:873
7719 " copy-device-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7724 #: ../fish/guestfish-actions.pod:875
7726 "The four calls L</copy-device-to-device>, L</copy-device-to-file>, "
7727 "L</copy-file-to-device>, and L</copy-file-to-file> let you copy from a "
7728 "source (device|file) to a destination (device|file)."
7732 #: ../fish/guestfish-actions.pod:882 ../src/guestfs-actions.pod:1360
7734 "Partial copies can be made since you can specify optionally the source "
7735 "offset, destination offset and size to copy. These values are all specified "
7736 "in bytes. If not given, the offsets both default to zero, and the size "
7737 "defaults to copying as much as possible until we hit the end of the source."
7741 #: ../fish/guestfish-actions.pod:888 ../src/guestfs-actions.pod:1366
7743 "The source and destination may be the same object. However overlapping "
7744 "regions may not be copied correctly."
7748 #: ../fish/guestfish-actions.pod:891 ../src/guestfs-actions.pod:1369
7750 "If the destination is a file, it is created if required. If the destination "
7751 "file is not large enough, it is extended."
7755 #: ../fish/guestfish-actions.pod:896
7756 msgid "copy-device-to-file"
7760 #: ../fish/guestfish-actions.pod:898
7763 " copy-device-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7768 #: ../fish/guestfish-actions.pod:900 ../fish/guestfish-actions.pod:909 ../fish/guestfish-actions.pod:918
7769 msgid "See L</copy-device-to-device> for a general overview of this call."
7773 #: ../fish/guestfish-actions.pod:905
7774 msgid "copy-file-to-device"
7778 #: ../fish/guestfish-actions.pod:907
7781 " copy-file-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7786 #: ../fish/guestfish-actions.pod:914
7787 msgid "copy-file-to-file"
7791 #: ../fish/guestfish-actions.pod:916
7794 " copy-file-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7799 #: ../fish/guestfish-actions.pod:921
7801 "This is B<not> the function you want for copying files. This is for copying "
7802 "blocks within existing files. See L</cp>, L</cp-a> and L</mv> for general "
7803 "file copying and moving functions."
7807 #: ../fish/guestfish-actions.pod:928
7812 #: ../fish/guestfish-actions.pod:930
7815 " copy-size src dest size\n"
7820 #: ../fish/guestfish-actions.pod:932 ../src/guestfs-actions.pod:1584
7822 "This command copies exactly C<size> bytes from one source device or file "
7823 "C<src> to another destination device or file C<dest>."
7827 #: ../fish/guestfish-actions.pod:935 ../src/guestfs-actions.pod:1587
7829 "Note this will fail if the source is too short or if the destination is not "
7834 #: ../fish/guestfish-actions.pod:938 ../fish/guestfish-actions.pod:973
7836 "I<This function is deprecated.> In new code, use the "
7837 "L</copy_device_to_device> call instead."
7841 #: ../fish/guestfish-actions.pod:945
7846 #: ../fish/guestfish-actions.pod:947
7854 #: ../fish/guestfish-actions.pod:949 ../src/guestfs-actions.pod:1606
7856 "This copies a file from C<src> to C<dest> where C<dest> is either a "
7857 "destination filename or destination directory."
7861 #: ../fish/guestfish-actions.pod:952
7866 #: ../fish/guestfish-actions.pod:954
7874 #: ../fish/guestfish-actions.pod:956 ../src/guestfs-actions.pod:1620
7876 "This copies a file or directory from C<src> to C<dest> recursively using the "
7881 #: ../fish/guestfish-actions.pod:959
7886 #: ../fish/guestfish-actions.pod:961
7894 #: ../fish/guestfish-actions.pod:963 ../src/guestfs-actions.pod:1641
7896 "This command copies from one source device or file C<src> to another "
7897 "destination device or file C<dest>. Normally you would use this to copy to "
7898 "or from a device or partition, for example to duplicate a filesystem."
7902 #: ../fish/guestfish-actions.pod:968
7904 "If the destination is a device, it must be as large or larger than the "
7905 "source file or device, otherwise the copy will fail. This command cannot do "
7906 "partial copies (see L</copy-device-to-device>)."
7910 #: ../fish/guestfish-actions.pod:980
7915 #: ../fish/guestfish-actions.pod:982
7923 #: ../fish/guestfish-actions.pod:984 ../src/guestfs-actions.pod:1660
7924 msgid "This command runs the C<df> command to report disk space used."
7928 #: ../fish/guestfish-actions.pod:986 ../fish/guestfish-actions.pod:997
7930 "This command is mostly useful for interactive sessions. It is I<not> "
7931 "intended that you try to parse the output string. Use L</statvfs> from "
7936 #: ../fish/guestfish-actions.pod:990
7941 #: ../fish/guestfish-actions.pod:992
7949 #: ../fish/guestfish-actions.pod:994 ../src/guestfs-actions.pod:1676
7951 "This command runs the C<df -h> command to report disk space used in "
7952 "human-readable format."
7956 #: ../fish/guestfish-actions.pod:1001
7961 #: ../fish/guestfish-actions.pod:1003
7969 #: ../fish/guestfish-actions.pod:1005 ../src/guestfs-actions.pod:1693
7971 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
7972 "This is sometimes useful for extended debugging of problems."
7976 #: ../fish/guestfish-actions.pod:1009
7978 "Another way to get the same information is to enable verbose messages with "
7979 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
7980 "before running the program."
7984 #: ../fish/guestfish-actions.pod:1014
7989 #: ../fish/guestfish-actions.pod:1016
7992 " download remotefilename (filename|-)\n"
7997 #: ../fish/guestfish-actions.pod:1018 ../fish/guestfish-actions.pod:1031 ../src/guestfs-actions.pod:1714 ../src/guestfs-actions.pod:1739
7999 "Download file C<remotefilename> and save it as C<filename> on the local "
8004 #: ../fish/guestfish-actions.pod:1021 ../fish/guestfish-actions.pod:5179 ../src/guestfs-actions.pod:1717 ../src/guestfs-actions.pod:7970
8005 msgid "C<filename> can also be a named pipe."
8009 #: ../fish/guestfish-actions.pod:1023
8010 msgid "See also L</upload>, L</cat>."
8014 #: ../fish/guestfish-actions.pod:1027
8015 msgid "download-offset"
8019 #: ../fish/guestfish-actions.pod:1029
8022 " download-offset remotefilename (filename|-) offset size\n"
8027 #: ../fish/guestfish-actions.pod:1034 ../src/guestfs-actions.pod:1742
8029 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
8030 "region must be within the file or device)."
8034 #: ../fish/guestfish-actions.pod:1037
8036 "Note that there is no limit on the amount of data that can be downloaded "
8037 "with this call, unlike with L</pread>, and this call always reads the full "
8038 "amount unless an error occurs."
8042 #: ../fish/guestfish-actions.pod:1042
8043 msgid "See also L</download>, L</pread>."
8047 #: ../fish/guestfish-actions.pod:1046
8052 #: ../fish/guestfish-actions.pod:1048
8055 " drop-caches whattodrop\n"
8060 #: ../fish/guestfish-actions.pod:1050 ../src/guestfs-actions.pod:1767
8062 "This instructs the guest kernel to drop its page cache, and/or dentries and "
8063 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
8064 "to drop, see L<http://linux-mm.org/Drop_Caches>"
8068 #: ../fish/guestfish-actions.pod:1055 ../src/guestfs-actions.pod:1772
8069 msgid "Setting C<whattodrop> to 3 should drop everything."
8073 #: ../fish/guestfish-actions.pod:1057 ../src/guestfs-actions.pod:1774
8075 "This automatically calls L<sync(2)> before the operation, so that the "
8076 "maximum guest memory is freed."
8080 #: ../fish/guestfish-actions.pod:1060
8085 #: ../fish/guestfish-actions.pod:1062
8093 #: ../fish/guestfish-actions.pod:1064 ../src/guestfs-actions.pod:1787
8095 "This command runs the C<du -s> command to estimate file space usage for "
8100 #: ../fish/guestfish-actions.pod:1067 ../src/guestfs-actions.pod:1790
8102 "C<path> can be a file or a directory. If C<path> is a directory then the "
8103 "estimate includes the contents of the directory and all subdirectories "
8108 #: ../fish/guestfish-actions.pod:1071 ../src/guestfs-actions.pod:1794
8109 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
8113 #: ../fish/guestfish-actions.pod:1074
8118 #: ../fish/guestfish-actions.pod:1076
8121 " e2fsck-f device\n"
8126 #: ../fish/guestfish-actions.pod:1078 ../src/guestfs-actions.pod:1812
8128 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
8129 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
8134 #: ../fish/guestfish-actions.pod:1082
8136 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
8137 "should use L</fsck>."
8141 #: ../fish/guestfish-actions.pod:1085
8146 #: ../fish/guestfish-actions.pod:1087
8149 " echo-daemon 'words ...'\n"
8154 #: ../fish/guestfish-actions.pod:1089 ../src/guestfs-actions.pod:1829
8156 "This command concatenates the list of C<words> passed with single spaces "
8157 "between them and returns the resulting string."
8161 #: ../fish/guestfish-actions.pod:1092 ../src/guestfs-actions.pod:1832
8162 msgid "You can use this command to test the connection through to the daemon."
8166 #: ../fish/guestfish-actions.pod:1094
8167 msgid "See also L</ping-daemon>."
8171 #: ../fish/guestfish-actions.pod:1096
8176 #: ../fish/guestfish-actions.pod:1098
8179 " egrep regex path\n"
8184 #: ../fish/guestfish-actions.pod:1100 ../src/guestfs-actions.pod:1848
8185 msgid "This calls the external C<egrep> program and returns the matching lines."
8189 #: ../fish/guestfish-actions.pod:1106
8194 #: ../fish/guestfish-actions.pod:1108
8197 " egrepi regex path\n"
8202 #: ../fish/guestfish-actions.pod:1110 ../src/guestfs-actions.pod:1867
8203 msgid "This calls the external C<egrep -i> program and returns the matching lines."
8207 #: ../fish/guestfish-actions.pod:1116
8212 #: ../fish/guestfish-actions.pod:1118
8215 " equal file1 file2\n"
8220 #: ../fish/guestfish-actions.pod:1120 ../src/guestfs-actions.pod:1886
8222 "This compares the two files C<file1> and C<file2> and returns true if their "
8223 "content is exactly equal, or false otherwise."
8227 #: ../fish/guestfish-actions.pod:1123 ../src/guestfs-actions.pod:1889
8228 msgid "The external L<cmp(1)> program is used for the comparison."
8232 #: ../fish/guestfish-actions.pod:1125
8237 #: ../fish/guestfish-actions.pod:1127
8245 #: ../fish/guestfish-actions.pod:1129 ../src/guestfs-actions.pod:1901
8247 "This returns C<true> if and only if there is a file, directory (or anything) "
8248 "with the given C<path> name."
8252 #: ../fish/guestfish-actions.pod:1132
8253 msgid "See also L</is-file>, L</is-dir>, L</stat>."
8257 #: ../fish/guestfish-actions.pod:1134
8262 #: ../fish/guestfish-actions.pod:1136
8265 " fallocate path len\n"
8270 #: ../fish/guestfish-actions.pod:1138 ../fish/guestfish-actions.pod:1157 ../src/guestfs-actions.pod:1924 ../src/guestfs-actions.pod:1943
8272 "This command preallocates a file (containing zero bytes) named C<path> of "
8273 "size C<len> bytes. If the file exists already, it is overwritten."
8277 #: ../fish/guestfish-actions.pod:1142 ../src/guestfs-actions.pod:1928
8279 "Do not confuse this with the guestfish-specific C<alloc> command which "
8280 "allocates a file in the host and attaches it as a device."
8284 #: ../fish/guestfish-actions.pod:1146
8286 "I<This function is deprecated.> In new code, use the L</fallocate64> call "
8291 #: ../fish/guestfish-actions.pod:1153
8296 #: ../fish/guestfish-actions.pod:1155
8299 " fallocate64 path len\n"
8304 #: ../fish/guestfish-actions.pod:1161
8306 "Note that this call allocates disk blocks for the file. To create a sparse "
8307 "file use L</truncate-size> instead."
8311 #: ../fish/guestfish-actions.pod:1164
8313 "The deprecated call L</fallocate> does the same, but owing to an oversight "
8314 "it only allowed 30 bit lengths to be specified, effectively limiting the "
8315 "maximum size of files created through that call to 1GB."
8319 #: ../fish/guestfish-actions.pod:1169 ../src/guestfs-actions.pod:1955
8321 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
8322 "commands which create a file in the host and attach it as a device."
8326 #: ../fish/guestfish-actions.pod:1173
8331 #: ../fish/guestfish-actions.pod:1175
8334 " fgrep pattern path\n"
8339 #: ../fish/guestfish-actions.pod:1177 ../src/guestfs-actions.pod:1970
8340 msgid "This calls the external C<fgrep> program and returns the matching lines."
8344 #: ../fish/guestfish-actions.pod:1183
8349 #: ../fish/guestfish-actions.pod:1185
8352 " fgrepi pattern path\n"
8357 #: ../fish/guestfish-actions.pod:1187 ../src/guestfs-actions.pod:1989
8358 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
8362 #: ../fish/guestfish-actions.pod:1193
8367 #: ../fish/guestfish-actions.pod:1195
8375 #: ../fish/guestfish-actions.pod:1197 ../src/guestfs-actions.pod:2007
8377 "This call uses the standard L<file(1)> command to determine the type or "
8378 "contents of the file."
8382 #: ../fish/guestfish-actions.pod:1200 ../src/guestfs-actions.pod:2010
8384 "This call will also transparently look inside various types of compressed "
8389 #: ../fish/guestfish-actions.pod:1203 ../src/guestfs-actions.pod:2013
8391 "The exact command which runs is C<file -zb path>. Note in particular that "
8392 "the filename is not prepended to the output (the I<-b> option)."
8396 #: ../fish/guestfish-actions.pod:1207 ../src/guestfs-actions.pod:2017
8398 "The output depends on the output of the underlying L<file(1)> command and it "
8399 "can change in future in ways beyond our control. In other words, the output "
8400 "is not guaranteed by the ABI."
8404 #: ../fish/guestfish-actions.pod:1211
8406 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
8407 "(etc), L</is-zero>."
8411 #: ../fish/guestfish-actions.pod:1214
8412 msgid "file-architecture"
8416 #: ../fish/guestfish-actions.pod:1216
8419 " file-architecture filename\n"
8424 #: ../fish/guestfish-actions.pod:1218 ../src/guestfs-actions.pod:2035
8426 "This detects the architecture of the binary C<filename>, and returns it if "
8431 #: ../fish/guestfish-actions.pod:1221 ../src/guestfs-actions.pod:2038
8432 msgid "Currently defined architectures are:"
8436 #: ../fish/guestfish-actions.pod:1225 ../src/guestfs-actions.pod:2042
8441 #: ../fish/guestfish-actions.pod:1227 ../src/guestfs-actions.pod:2044
8443 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
8444 "irrespective of the precise processor requirements of the binary."
8448 #: ../fish/guestfish-actions.pod:1230 ../src/guestfs-actions.pod:2047
8453 #: ../fish/guestfish-actions.pod:1232 ../src/guestfs-actions.pod:2049
8454 msgid "64 bit x86-64."
8458 #: ../fish/guestfish-actions.pod:1234 ../src/guestfs-actions.pod:2051
8463 #: ../fish/guestfish-actions.pod:1236 ../src/guestfs-actions.pod:2053
8464 msgid "32 bit SPARC."
8468 #: ../fish/guestfish-actions.pod:1238 ../src/guestfs-actions.pod:2055
8473 #: ../fish/guestfish-actions.pod:1240 ../src/guestfs-actions.pod:2057
8474 msgid "64 bit SPARC V9 and above."
8478 #: ../fish/guestfish-actions.pod:1242 ../src/guestfs-actions.pod:2059
8483 #: ../fish/guestfish-actions.pod:1244 ../src/guestfs-actions.pod:2061
8484 msgid "Intel Itanium."
8488 #: ../fish/guestfish-actions.pod:1246 ../src/guestfs-actions.pod:2063
8493 #: ../fish/guestfish-actions.pod:1248 ../src/guestfs-actions.pod:2065
8494 msgid "32 bit Power PC."
8498 #: ../fish/guestfish-actions.pod:1250 ../src/guestfs-actions.pod:2067
8503 #: ../fish/guestfish-actions.pod:1252 ../src/guestfs-actions.pod:2069
8504 msgid "64 bit Power PC."
8508 #: ../fish/guestfish-actions.pod:1256 ../src/guestfs-actions.pod:2073
8509 msgid "Libguestfs may return other architecture strings in future."
8513 #: ../fish/guestfish-actions.pod:1258 ../src/guestfs-actions.pod:2075
8514 msgid "The function works on at least the following types of files:"
8518 #: ../fish/guestfish-actions.pod:1264 ../src/guestfs-actions.pod:2081
8519 msgid "many types of Un*x and Linux binary"
8523 #: ../fish/guestfish-actions.pod:1268 ../src/guestfs-actions.pod:2085
8524 msgid "many types of Un*x and Linux shared library"
8528 #: ../fish/guestfish-actions.pod:1272 ../src/guestfs-actions.pod:2089
8529 msgid "Windows Win32 and Win64 binaries"
8533 #: ../fish/guestfish-actions.pod:1276 ../src/guestfs-actions.pod:2093
8534 msgid "Windows Win32 and Win64 DLLs"
8538 #: ../fish/guestfish-actions.pod:1278 ../src/guestfs-actions.pod:2095
8539 msgid "Win32 binaries and DLLs return C<i386>."
8543 #: ../fish/guestfish-actions.pod:1280 ../src/guestfs-actions.pod:2097
8544 msgid "Win64 binaries and DLLs return C<x86_64>."
8548 #: ../fish/guestfish-actions.pod:1284 ../src/guestfs-actions.pod:2101
8549 msgid "Linux kernel modules"
8553 #: ../fish/guestfish-actions.pod:1288 ../src/guestfs-actions.pod:2105
8554 msgid "Linux new-style initrd images"
8558 #: ../fish/guestfish-actions.pod:1292 ../src/guestfs-actions.pod:2109
8559 msgid "some non-x86 Linux vmlinuz kernels"
8563 #: ../fish/guestfish-actions.pod:1296 ../src/guestfs-actions.pod:2113
8564 msgid "What it can't do currently:"
8568 #: ../fish/guestfish-actions.pod:1302 ../src/guestfs-actions.pod:2119
8569 msgid "static libraries (libfoo.a)"
8573 #: ../fish/guestfish-actions.pod:1306 ../src/guestfs-actions.pod:2123
8574 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
8578 #: ../fish/guestfish-actions.pod:1310 ../src/guestfs-actions.pod:2127
8579 msgid "x86 Linux vmlinuz kernels"
8583 #: ../fish/guestfish-actions.pod:1312 ../src/guestfs-actions.pod:2129
8585 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
8586 "compressed code, and are horribly hard to unpack. If you want to find the "
8587 "architecture of a kernel, use the architecture of the associated initrd or "
8588 "kernel module(s) instead."
8592 #: ../fish/guestfish-actions.pod:1319
8597 #: ../fish/guestfish-actions.pod:1321
8605 #: ../fish/guestfish-actions.pod:1323 ../src/guestfs-actions.pod:2147
8606 msgid "This command returns the size of C<file> in bytes."
8610 #: ../fish/guestfish-actions.pod:1325
8612 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, "
8613 "L</is-file> etc. To get the size of block devices, use "
8614 "L</blockdev-getsize64>."
8618 #: ../fish/guestfish-actions.pod:1329
8623 #: ../fish/guestfish-actions.pod:1331
8626 " fill c len path\n"
8631 #: ../fish/guestfish-actions.pod:1333 ../src/guestfs-actions.pod:2165
8633 "This command creates a new file called C<path>. The initial content of the "
8634 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
8639 #: ../fish/guestfish-actions.pod:1337
8641 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
8642 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
8647 #: ../fish/guestfish-actions.pod:1342
8648 msgid "fill-pattern"
8652 #: ../fish/guestfish-actions.pod:1344
8655 " fill-pattern pattern len path\n"
8660 #: ../fish/guestfish-actions.pod:1346
8662 "This function is like L</fill> except that it creates a new file of length "
8663 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
8664 "is truncated if necessary to ensure the length of the file is exactly C<len> "
8669 #: ../fish/guestfish-actions.pod:1351
8674 #: ../fish/guestfish-actions.pod:1353
8682 #: ../fish/guestfish-actions.pod:1355 ../src/guestfs-actions.pod:2211
8684 "This command lists out all files and directories, recursively, starting at "
8685 "C<directory>. It is essentially equivalent to running the shell command "
8686 "C<find directory -print> but some post-processing happens on the output, "
8691 #: ../fish/guestfish-actions.pod:1360 ../src/guestfs-actions.pod:2216
8693 "This returns a list of strings I<without any prefix>. Thus if the directory "
8698 #: ../fish/guestfish-actions.pod:1363 ../src/guestfs-actions.pod:2219
8708 #: ../fish/guestfish-actions.pod:1367
8709 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
8713 #: ../fish/guestfish-actions.pod:1370 ../src/guestfs-actions.pod:2226
8724 #: ../fish/guestfish-actions.pod:1375 ../src/guestfs-actions.pod:2231
8725 msgid "If C<directory> is not a directory, then this command returns an error."
8729 #: ../fish/guestfish-actions.pod:1378 ../src/guestfs-actions.pod:2234
8730 msgid "The returned list is sorted."
8734 #: ../fish/guestfish-actions.pod:1380
8735 msgid "See also L</find0>."
8739 #: ../fish/guestfish-actions.pod:1385
8744 #: ../fish/guestfish-actions.pod:1387
8747 " find0 directory (files|-)\n"
8752 #: ../fish/guestfish-actions.pod:1389 ../src/guestfs-actions.pod:2254
8754 "This command lists out all files and directories, recursively, starting at "
8755 "C<directory>, placing the resulting list in the external file called "
8760 #: ../fish/guestfish-actions.pod:1393
8761 msgid "This command works the same way as L</find> with the following exceptions:"
8765 #: ../fish/guestfish-actions.pod:1400 ../src/guestfs-actions.pod:2265
8766 msgid "The resulting list is written to an external file."
8770 #: ../fish/guestfish-actions.pod:1404 ../src/guestfs-actions.pod:2269
8772 "Items (filenames) in the result are separated by C<\\0> characters. See "
8773 "L<find(1)> option I<-print0>."
8777 #: ../fish/guestfish-actions.pod:1409 ../src/guestfs-actions.pod:2274
8778 msgid "This command is not limited in the number of names that it can return."
8782 #: ../fish/guestfish-actions.pod:1414 ../src/guestfs-actions.pod:2279
8783 msgid "The result list is not sorted."
8787 #: ../fish/guestfish-actions.pod:1420
8788 msgid "findfs-label"
8792 #: ../fish/guestfish-actions.pod:1422
8795 " findfs-label label\n"
8800 #: ../fish/guestfish-actions.pod:1424 ../src/guestfs-actions.pod:2293
8802 "This command searches the filesystems and returns the one which has the "
8803 "given label. An error is returned if no such filesystem can be found."
8807 #: ../fish/guestfish-actions.pod:1428
8808 msgid "To find the label of a filesystem, use L</vfs-label>."
8812 #: ../fish/guestfish-actions.pod:1430
8817 #: ../fish/guestfish-actions.pod:1432
8820 " findfs-uuid uuid\n"
8825 #: ../fish/guestfish-actions.pod:1434 ../src/guestfs-actions.pod:2310
8827 "This command searches the filesystems and returns the one which has the "
8828 "given UUID. An error is returned if no such filesystem can be found."
8832 #: ../fish/guestfish-actions.pod:1438
8833 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
8837 #: ../fish/guestfish-actions.pod:1440
8842 #: ../fish/guestfish-actions.pod:1442
8845 " fsck fstype device\n"
8850 #: ../fish/guestfish-actions.pod:1444 ../src/guestfs-actions.pod:2328
8852 "This runs the filesystem checker (fsck) on C<device> which should have "
8853 "filesystem type C<fstype>."
8857 #: ../fish/guestfish-actions.pod:1447 ../src/guestfs-actions.pod:2331
8859 "The returned integer is the status. See L<fsck(8)> for the list of status "
8860 "codes from C<fsck>."
8864 #: ../fish/guestfish-actions.pod:1456 ../src/guestfs-actions.pod:2340
8865 msgid "Multiple status codes can be summed together."
8869 #: ../fish/guestfish-actions.pod:1460 ../src/guestfs-actions.pod:2344
8871 "A non-zero return code can mean \"success\", for example if errors have been "
8872 "corrected on the filesystem."
8876 #: ../fish/guestfish-actions.pod:1465 ../src/guestfs-actions.pod:2349
8877 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
8881 #: ../fish/guestfish-actions.pod:1470 ../src/guestfs-actions.pod:2354
8882 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
8886 #: ../fish/guestfish-actions.pod:1472
8891 #: ../fish/guestfish-actions.pod:1474
8899 #: ../fish/guestfish-actions.pod:1476 ../src/guestfs-actions.pod:2365
8901 "Return the additional kernel options which are added to the guest kernel "
8906 #: ../fish/guestfish-actions.pod:1479 ../src/guestfs-actions.pod:2368
8907 msgid "If C<NULL> then no options are added."
8911 #: ../fish/guestfish-actions.pod:1481
8912 msgid "get-attach-method"
8916 #: ../fish/guestfish-actions.pod:1483
8919 " get-attach-method\n"
8924 #: ../fish/guestfish-actions.pod:1485
8925 msgid "Return the current attach method. See L</set-attach-method>."
8929 #: ../fish/guestfish-actions.pod:1487
8930 msgid "get-autosync"
8934 #: ../fish/guestfish-actions.pod:1489
8942 #: ../fish/guestfish-actions.pod:1491 ../src/guestfs-actions.pod:2393
8943 msgid "Get the autosync flag."
8947 #: ../fish/guestfish-actions.pod:1493
8952 #: ../fish/guestfish-actions.pod:1495
8960 #: ../fish/guestfish-actions.pod:1497 ../src/guestfs-actions.pod:2404
8961 msgid "Return the direct appliance mode flag."
8965 #: ../fish/guestfish-actions.pod:1499
8970 #: ../fish/guestfish-actions.pod:1501
8973 " get-e2label device\n"
8978 #: ../fish/guestfish-actions.pod:1503 ../src/guestfs-actions.pod:2423
8979 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
8983 #: ../fish/guestfish-actions.pod:1506
8985 "I<This function is deprecated.> In new code, use the L</vfs_label> call "
8990 #: ../fish/guestfish-actions.pod:1513
8995 #: ../fish/guestfish-actions.pod:1515
8998 " get-e2uuid device\n"
9003 #: ../fish/guestfish-actions.pod:1517 ../src/guestfs-actions.pod:2444
9004 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
9008 #: ../fish/guestfish-actions.pod:1520
9010 "I<This function is deprecated.> In new code, use the L</vfs_uuid> call "
9015 #: ../fish/guestfish-actions.pod:1527
9020 #: ../fish/guestfish-actions.pod:1529
9028 #: ../fish/guestfish-actions.pod:1531 ../src/guestfs-actions.pod:2457
9029 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
9033 #: ../fish/guestfish-actions.pod:1534
9035 "If L</set-memsize> was not called on this handle, and if "
9036 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
9037 "value for memsize."
9041 #: ../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
9042 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
9046 #: ../fish/guestfish-actions.pod:1541
9051 #: ../fish/guestfish-actions.pod:1543
9059 #: ../fish/guestfish-actions.pod:1545 ../src/guestfs-actions.pod:2476
9060 msgid "This returns the enable network flag."
9064 #: ../fish/guestfish-actions.pod:1547
9069 #: ../fish/guestfish-actions.pod:1549
9077 #: ../fish/guestfish-actions.pod:1551 ../src/guestfs-actions.pod:2487
9078 msgid "Return the current search path."
9082 #: ../fish/guestfish-actions.pod:1553 ../src/guestfs-actions.pod:2489
9084 "This is always non-NULL. If it wasn't set already, then this will return "
9089 #: ../fish/guestfish-actions.pod:1556
9094 #: ../fish/guestfish-actions.pod:1558
9102 #: ../fish/guestfish-actions.pod:1560 ../src/guestfs-actions.pod:2502
9103 msgid "This returns the process group flag."
9107 #: ../fish/guestfish-actions.pod:1562
9112 #: ../fish/guestfish-actions.pod:1564
9117 #: ../fish/guestfish-actions.pod:1566
9125 #: ../fish/guestfish-actions.pod:1568 ../src/guestfs-actions.pod:2513
9127 "Return the process ID of the qemu subprocess. If there is no qemu "
9128 "subprocess, then this will return an error."
9132 #: ../fish/guestfish-actions.pod:1571 ../src/guestfs-actions.pod:2516
9133 msgid "This is an internal call used for debugging and testing."
9137 #: ../fish/guestfish-actions.pod:1573
9142 #: ../fish/guestfish-actions.pod:1575
9150 #: ../fish/guestfish-actions.pod:1577 ../src/guestfs-actions.pod:2527
9151 msgid "Return the current qemu binary."
9155 #: ../fish/guestfish-actions.pod:1579 ../src/guestfs-actions.pod:2529
9157 "This is always non-NULL. If it wasn't set already, then this will return "
9158 "the default qemu binary name."
9162 #: ../fish/guestfish-actions.pod:1582
9163 msgid "get-recovery-proc"
9167 #: ../fish/guestfish-actions.pod:1584
9170 " get-recovery-proc\n"
9175 #: ../fish/guestfish-actions.pod:1586 ../src/guestfs-actions.pod:2542
9176 msgid "Return the recovery process enabled flag."
9180 #: ../fish/guestfish-actions.pod:1588
9185 #: ../fish/guestfish-actions.pod:1590
9193 #: ../fish/guestfish-actions.pod:1592
9195 "This returns the current setting of the selinux flag which is passed to the "
9196 "appliance at boot time. See L</set-selinux>."
9200 #: ../fish/guestfish-actions.pod:1598
9205 #: ../fish/guestfish-actions.pod:1600
9213 #: ../fish/guestfish-actions.pod:1602 ../src/guestfs-actions.pod:2568
9214 msgid "This returns the number of virtual CPUs assigned to the appliance."
9218 #: ../fish/guestfish-actions.pod:1604
9223 #: ../fish/guestfish-actions.pod:1606
9231 #: ../fish/guestfish-actions.pod:1608 ../src/guestfs-actions.pod:2579
9233 "This returns the current state as an opaque integer. This is only useful "
9234 "for printing debug and internal error messages."
9238 #: ../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
9239 msgid "For more information on states, see L<guestfs(3)>."
9243 #: ../fish/guestfish-actions.pod:1613
9248 #: ../fish/guestfish-actions.pod:1615
9256 #: ../fish/guestfish-actions.pod:1617 ../src/guestfs-actions.pod:2593
9257 msgid "Return the command trace flag."
9261 #: ../fish/guestfish-actions.pod:1619
9266 #: ../fish/guestfish-actions.pod:1621
9274 #: ../fish/guestfish-actions.pod:1623
9276 "Return the current umask. By default the umask is C<022> unless it has been "
9277 "set by calling L</umask>."
9281 #: ../fish/guestfish-actions.pod:1626
9286 #: ../fish/guestfish-actions.pod:1628
9294 #: ../fish/guestfish-actions.pod:1630 ../src/guestfs-actions.pod:2616
9295 msgid "This returns the verbose messages flag."
9299 #: ../fish/guestfish-actions.pod:1632
9304 #: ../fish/guestfish-actions.pod:1634
9312 #: ../fish/guestfish-actions.pod:1636 ../src/guestfs-actions.pod:2627
9313 msgid "This gets the SELinux security context of the daemon."
9317 #: ../fish/guestfish-actions.pod:1638
9318 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
9322 #: ../fish/guestfish-actions.pod:1641
9327 #: ../fish/guestfish-actions.pod:1643
9330 " getxattr path name\n"
9335 #: ../fish/guestfish-actions.pod:1645
9337 "Get a single extended attribute from file C<path> named C<name>. This call "
9338 "follows symlinks. If you want to lookup an extended attribute for the "
9339 "symlink itself, use L</lgetxattr>."
9343 #: ../fish/guestfish-actions.pod:1649 ../fish/guestfish-actions.pod:2715
9345 "Normally it is better to get all extended attributes from a file in one go "
9346 "by calling L</getxattrs>. However some Linux filesystem implementations are "
9347 "buggy and do not provide a way to list out attributes. For these "
9348 "filesystems (notably ntfs-3g) you have to know the names of the extended "
9349 "attributes you want in advance and call this function."
9353 #: ../fish/guestfish-actions.pod:1656 ../fish/guestfish-actions.pod:2722 ../src/guestfs-actions.pod:2656 ../src/guestfs-actions.pod:4151
9355 "Extended attribute values are blobs of binary data. If there is no extended "
9356 "attribute named C<name>, this returns an error."
9360 #: ../fish/guestfish-actions.pod:1659
9361 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
9365 #: ../fish/guestfish-actions.pod:1661
9370 #: ../fish/guestfish-actions.pod:1663
9378 #: ../fish/guestfish-actions.pod:1665 ../src/guestfs-actions.pod:2673
9379 msgid "This call lists the extended attributes of the file or directory C<path>."
9383 #: ../fish/guestfish-actions.pod:1668 ../src/guestfs-actions.pod:2676
9385 "At the system call level, this is a combination of the L<listxattr(2)> and "
9386 "L<getxattr(2)> calls."
9390 #: ../fish/guestfish-actions.pod:1671
9391 msgid "See also: L</lgetxattrs>, L<attr(5)>."
9395 #: ../fish/guestfish-actions.pod:1673
9400 #: ../fish/guestfish-actions.pod:1675
9403 " glob-expand pattern\n"
9408 #: ../fish/guestfish-actions.pod:1677 ../src/guestfs-actions.pod:2693
9410 "This command searches for all the pathnames matching C<pattern> according to "
9411 "the wildcard expansion rules used by the shell."
9415 #: ../fish/guestfish-actions.pod:1681 ../src/guestfs-actions.pod:2697
9416 msgid "If no paths match, then this returns an empty list (note: not an error)."
9420 #: ../fish/guestfish-actions.pod:1684 ../src/guestfs-actions.pod:2700
9422 "It is just a wrapper around the C L<glob(3)> function with flags "
9423 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
9427 #: ../fish/guestfish-actions.pod:1688
9432 #: ../fish/guestfish-actions.pod:1690
9435 " grep regex path\n"
9440 #: ../fish/guestfish-actions.pod:1692 ../src/guestfs-actions.pod:2717
9441 msgid "This calls the external C<grep> program and returns the matching lines."
9445 #: ../fish/guestfish-actions.pod:1698
9450 #: ../fish/guestfish-actions.pod:1700
9453 " grepi regex path\n"
9458 #: ../fish/guestfish-actions.pod:1702 ../src/guestfs-actions.pod:2736
9459 msgid "This calls the external C<grep -i> program and returns the matching lines."
9463 #: ../fish/guestfish-actions.pod:1708
9464 msgid "grub-install"
9468 #: ../fish/guestfish-actions.pod:1710
9471 " grub-install root device\n"
9476 #: ../fish/guestfish-actions.pod:1712 ../src/guestfs-actions.pod:2755
9478 "This command installs GRUB 1 (the Grand Unified Bootloader) on C<device>, "
9479 "with the root directory being C<root>."
9483 #: ../fish/guestfish-actions.pod:1721 ../src/guestfs-actions.pod:2764
9485 "There is currently no way in the API to install grub2, which is used by most "
9486 "modern Linux guests. It is possible to run the grub2 command from the "
9487 "guest, although see the caveats in L<guestfs(3)/RUNNING COMMANDS>."
9491 #: ../fish/guestfish-actions.pod:1728 ../src/guestfs-actions.pod:2771
9493 "This uses C<grub-install> from the host. Unfortunately grub is not always "
9494 "compatible with itself, so this only works in rather narrow circumstances. "
9495 "Careful testing with each guest version is advisable."
9499 #: ../fish/guestfish-actions.pod:1735 ../src/guestfs-actions.pod:2778
9501 "If grub-install reports the error \"No suitable drive was found in the "
9502 "generated device map.\" it may be that you need to create a "
9503 "C</boot/grub/device.map> file first that contains the mapping between grub "
9504 "device names and Linux device names. It is usually sufficient to create a "
9509 #: ../fish/guestfish-actions.pod:1742 ../src/guestfs-actions.pod:2785
9517 #: ../fish/guestfish-actions.pod:1744 ../src/guestfs-actions.pod:2787
9518 msgid "replacing C</dev/vda> with the name of the installation device."
9522 #: ../fish/guestfish-actions.pod:1748
9527 #: ../fish/guestfish-actions.pod:1750
9535 #: ../fish/guestfish-actions.pod:1752 ../src/guestfs-actions.pod:2801
9537 "This command returns up to the first 10 lines of a file as a list of "
9542 #: ../fish/guestfish-actions.pod:1758
9547 #: ../fish/guestfish-actions.pod:1760
9550 " head-n nrlines path\n"
9555 #: ../fish/guestfish-actions.pod:1762 ../src/guestfs-actions.pod:2820
9557 "If the parameter C<nrlines> is a positive number, this returns the first "
9558 "C<nrlines> lines of the file C<path>."
9562 #: ../fish/guestfish-actions.pod:1765 ../src/guestfs-actions.pod:2823
9564 "If the parameter C<nrlines> is a negative number, this returns lines from "
9565 "the file C<path>, excluding the last C<nrlines> lines."
9569 #: ../fish/guestfish-actions.pod:1768 ../fish/guestfish-actions.pod:4940 ../src/guestfs-actions.pod:2826 ../src/guestfs-actions.pod:7609
9570 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
9574 #: ../fish/guestfish-actions.pod:1773
9579 #: ../fish/guestfish-actions.pod:1775
9587 #: ../fish/guestfish-actions.pod:1777 ../src/guestfs-actions.pod:2843
9589 "This runs C<hexdump -C> on the given C<path>. The result is the "
9590 "human-readable, canonical hex dump of the file."
9594 #: ../fish/guestfish-actions.pod:1783
9599 #: ../fish/guestfish-actions.pod:1785
9602 " initrd-cat initrdpath filename\n"
9607 #: ../fish/guestfish-actions.pod:1787 ../src/guestfs-actions.pod:2862
9609 "This command unpacks the file C<filename> from the initrd file called "
9610 "C<initrdpath>. The filename must be given I<without> the initial C</> "
9615 #: ../fish/guestfish-actions.pod:1791 ../src/guestfs-actions.pod:2866
9617 "For example, in guestfish you could use the following command to examine the "
9618 "boot script (usually called C</init>) contained in a Linux initrd or "
9623 #: ../fish/guestfish-actions.pod:1795 ../src/guestfs-actions.pod:2870
9626 " initrd-cat /boot/initrd-<version>.img init\n"
9631 #: ../fish/guestfish-actions.pod:1797
9632 msgid "See also L</initrd-list>."
9636 #: ../fish/guestfish-actions.pod:1802
9641 #: ../fish/guestfish-actions.pod:1804
9644 " initrd-list path\n"
9649 #: ../fish/guestfish-actions.pod:1806 ../src/guestfs-actions.pod:2889
9650 msgid "This command lists out files contained in an initrd."
9654 #: ../fish/guestfish-actions.pod:1808 ../src/guestfs-actions.pod:2891
9656 "The files are listed without any initial C</> character. The files are "
9657 "listed in the order they appear (not necessarily alphabetical). Directory "
9658 "names are listed as separate items."
9662 #: ../fish/guestfish-actions.pod:1812 ../src/guestfs-actions.pod:2895
9664 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
9665 "initrd. We I<only> support the newer initramfs format (compressed cpio "
9670 #: ../fish/guestfish-actions.pod:1816
9671 msgid "inotify-add-watch"
9675 #: ../fish/guestfish-actions.pod:1818
9678 " inotify-add-watch path mask\n"
9683 #: ../fish/guestfish-actions.pod:1820 ../src/guestfs-actions.pod:2912
9684 msgid "Watch C<path> for the events listed in C<mask>."
9688 #: ../fish/guestfish-actions.pod:1822 ../src/guestfs-actions.pod:2914
9690 "Note that if C<path> is a directory then events within that directory are "
9691 "watched, but this does I<not> happen recursively (in subdirectories)."
9695 #: ../fish/guestfish-actions.pod:1826 ../src/guestfs-actions.pod:2918
9697 "Note for non-C or non-Linux callers: the inotify events are defined by the "
9698 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
9702 #: ../fish/guestfish-actions.pod:1830
9703 msgid "inotify-close"
9707 #: ../fish/guestfish-actions.pod:1832
9715 #: ../fish/guestfish-actions.pod:1834 ../src/guestfs-actions.pod:2931
9717 "This closes the inotify handle which was previously opened by inotify_init. "
9718 "It removes all watches, throws away any pending events, and deallocates all "
9723 #: ../fish/guestfish-actions.pod:1838
9724 msgid "inotify-files"
9728 #: ../fish/guestfish-actions.pod:1840
9736 #: ../fish/guestfish-actions.pod:1842
9738 "This function is a helpful wrapper around L</inotify-read> which just "
9739 "returns a list of pathnames of objects that were touched. The returned "
9740 "pathnames are sorted and deduplicated."
9744 #: ../fish/guestfish-actions.pod:1846
9745 msgid "inotify-init"
9749 #: ../fish/guestfish-actions.pod:1848
9752 " inotify-init maxevents\n"
9757 #: ../fish/guestfish-actions.pod:1850 ../src/guestfs-actions.pod:2960
9759 "This command creates a new inotify handle. The inotify subsystem can be "
9760 "used to notify events which happen to objects in the guest filesystem."
9764 #: ../fish/guestfish-actions.pod:1854
9766 "C<maxevents> is the maximum number of events which will be queued up between "
9767 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
9768 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
9769 "default was 16384 events. Beyond this limit, the kernel throws away events, "
9770 "but records the fact that it threw them away by setting a flag "
9771 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
9775 #: ../fish/guestfish-actions.pod:1864
9777 "Before any events are generated, you have to add some watches to the "
9778 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
9779 "L</inotify-watch-all>."
9783 #: ../fish/guestfish-actions.pod:1870
9785 "Queued up events should be read periodically by calling L</inotify-read> (or "
9786 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
9787 "If you don't read the events out often enough then you risk the internal "
9788 "queue overflowing."
9792 #: ../fish/guestfish-actions.pod:1877
9794 "The handle should be closed after use by calling L</inotify-close>. This "
9795 "also removes any watches automatically."
9799 #: ../fish/guestfish-actions.pod:1881 ../src/guestfs-actions.pod:2991
9801 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
9802 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
9803 "that there is one global inotify handle per libguestfs instance."
9807 #: ../fish/guestfish-actions.pod:1886
9808 msgid "inotify-read"
9812 #: ../fish/guestfish-actions.pod:1888
9820 #: ../fish/guestfish-actions.pod:1890 ../src/guestfs-actions.pod:3005
9822 "Return the complete queue of events that have happened since the previous "
9827 #: ../fish/guestfish-actions.pod:1893 ../src/guestfs-actions.pod:3008
9828 msgid "If no events have happened, this returns an empty list."
9832 #: ../fish/guestfish-actions.pod:1895 ../src/guestfs-actions.pod:3010
9834 "I<Note>: In order to make sure that all events have been read, you must call "
9835 "this function repeatedly until it returns an empty list. The reason is that "
9836 "the call will read events up to the maximum appliance-to-host message size "
9837 "and leave remaining events in the queue."
9841 #: ../fish/guestfish-actions.pod:1901
9842 msgid "inotify-rm-watch"
9846 #: ../fish/guestfish-actions.pod:1903
9849 " inotify-rm-watch wd\n"
9854 #: ../fish/guestfish-actions.pod:1905
9855 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
9859 #: ../fish/guestfish-actions.pod:1908
9860 msgid "inspect-get-arch"
9864 #: ../fish/guestfish-actions.pod:1910
9867 " inspect-get-arch root\n"
9872 #: ../fish/guestfish-actions.pod:1912
9874 "This returns the architecture of the inspected operating system. The "
9875 "possible return values are listed under L</file-architecture>."
9879 #: ../fish/guestfish-actions.pod:1916 ../src/guestfs-actions.pod:3045
9881 "If the architecture could not be determined, then the string C<unknown> is "
9886 #: ../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
9887 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
9891 #: ../fish/guestfish-actions.pod:1921
9892 msgid "inspect-get-distro"
9896 #: ../fish/guestfish-actions.pod:1923
9899 " inspect-get-distro root\n"
9904 #: ../fish/guestfish-actions.pod:1925 ../src/guestfs-actions.pod:3061
9905 msgid "This returns the distro (distribution) of the inspected operating system."
9909 #: ../fish/guestfish-actions.pod:1928 ../src/guestfs-actions.pod:3064
9910 msgid "Currently defined distros are:"
9914 #: ../fish/guestfish-actions.pod:1932 ../src/guestfs-actions.pod:3068
9915 msgid "\"archlinux\""
9919 #: ../fish/guestfish-actions.pod:1934 ../src/guestfs-actions.pod:3070
9924 #: ../fish/guestfish-actions.pod:1936 ../src/guestfs-actions.pod:3072
9929 #: ../fish/guestfish-actions.pod:1938 ../src/guestfs-actions.pod:3074
9934 #: ../fish/guestfish-actions.pod:1940 ../src/guestfs-actions.pod:3076
9939 #: ../fish/guestfish-actions.pod:1942 ../src/guestfs-actions.pod:3078
9944 #: ../fish/guestfish-actions.pod:1944 ../src/guestfs-actions.pod:3080
9949 #: ../fish/guestfish-actions.pod:1946 ../src/guestfs-actions.pod:3082
9954 #: ../fish/guestfish-actions.pod:1948 ../src/guestfs-actions.pod:3084
9959 #: ../fish/guestfish-actions.pod:1950 ../src/guestfs-actions.pod:3086
9964 #: ../fish/guestfish-actions.pod:1952 ../src/guestfs-actions.pod:3088
9965 msgid "\"linuxmint\""
9969 #: ../fish/guestfish-actions.pod:1954 ../src/guestfs-actions.pod:3090
9974 #: ../fish/guestfish-actions.pod:1956 ../src/guestfs-actions.pod:3092
9979 #: ../fish/guestfish-actions.pod:1958 ../src/guestfs-actions.pod:3094
9984 #: ../fish/guestfish-actions.pod:1960 ../src/guestfs-actions.pod:3096
9985 msgid "\"mandriva\""
9989 #: ../fish/guestfish-actions.pod:1962 ../src/guestfs-actions.pod:3098
9994 #: ../fish/guestfish-actions.pod:1964 ../src/guestfs-actions.pod:3100
9999 #: ../fish/guestfish-actions.pod:1966 ../src/guestfs-actions.pod:3102
10004 #: ../fish/guestfish-actions.pod:1968 ../src/guestfs-actions.pod:3104
10005 msgid "\"opensuse\""
10009 #: ../fish/guestfish-actions.pod:1970 ../src/guestfs-actions.pod:3106
10014 #: ../fish/guestfish-actions.pod:1972 ../src/guestfs-actions.pod:3108
10019 #: ../fish/guestfish-actions.pod:1974 ../src/guestfs-actions.pod:3110
10024 #: ../fish/guestfish-actions.pod:1976 ../src/guestfs-actions.pod:3112
10025 msgid "\"redhat-based\""
10029 #: ../fish/guestfish-actions.pod:1978 ../src/guestfs-actions.pod:3114
10030 msgid "Some Red Hat-derived distro."
10034 #: ../fish/guestfish-actions.pod:1980 ../src/guestfs-actions.pod:3116
10039 #: ../fish/guestfish-actions.pod:1982 ../src/guestfs-actions.pod:3118
10040 msgid "Red Hat Enterprise Linux."
10044 #: ../fish/guestfish-actions.pod:1984 ../src/guestfs-actions.pod:3120
10045 msgid "\"scientificlinux\""
10049 #: ../fish/guestfish-actions.pod:1986 ../src/guestfs-actions.pod:3122
10050 msgid "Scientific Linux."
10054 #: ../fish/guestfish-actions.pod:1988 ../src/guestfs-actions.pod:3124
10055 msgid "\"slackware\""
10059 #: ../fish/guestfish-actions.pod:1990 ../src/guestfs-actions.pod:3126
10064 #: ../fish/guestfish-actions.pod:1992 ../src/guestfs-actions.pod:3128
10065 msgid "\"ttylinux\""
10069 #: ../fish/guestfish-actions.pod:1994 ../src/guestfs-actions.pod:3130
10074 #: ../fish/guestfish-actions.pod:1996 ../src/guestfs-actions.pod:3132
10079 #: ../fish/guestfish-actions.pod:1998 ../src/guestfs-actions.pod:3134
10084 #: ../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
10085 msgid "\"unknown\""
10089 #: ../fish/guestfish-actions.pod:2002 ../src/guestfs-actions.pod:3138
10090 msgid "The distro could not be determined."
10094 #: ../fish/guestfish-actions.pod:2004 ../fish/guestfish-actions.pod:2341 ../src/guestfs-actions.pod:3140 ../src/guestfs-actions.pod:3613
10095 msgid "\"windows\""
10099 #: ../fish/guestfish-actions.pod:2006 ../src/guestfs-actions.pod:3142
10101 "Windows does not have distributions. This string is returned if the OS type "
10106 #: ../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
10108 "Future versions of libguestfs may return other strings here. The caller "
10109 "should be prepared to handle any string."
10113 #: ../fish/guestfish-actions.pod:2016
10114 msgid "inspect-get-drive-mappings"
10118 #: ../fish/guestfish-actions.pod:2018
10121 " inspect-get-drive-mappings root\n"
10126 #: ../fish/guestfish-actions.pod:2020 ../src/guestfs-actions.pod:3163
10128 "This call is useful for Windows which uses a primitive system of assigning "
10129 "drive letters (like \"C:\") to partitions. This inspection API examines the "
10130 "Windows Registry to find out how disks/partitions are mapped to drive "
10131 "letters, and returns a hash table as in the example below:"
10135 #: ../fish/guestfish-actions.pod:2026 ../src/guestfs-actions.pod:3169
10138 " C => /dev/vda2\n"
10139 " E => /dev/vdb1\n"
10140 " F => /dev/vdc1\n"
10145 #: ../fish/guestfish-actions.pod:2030 ../src/guestfs-actions.pod:3173
10147 "Note that keys are drive letters. For Windows, the key is case insensitive "
10148 "and just contains the drive letter, without the customary colon separator "
10153 #: ../fish/guestfish-actions.pod:2034 ../src/guestfs-actions.pod:3177
10155 "In future we may support other operating systems that also used drive "
10156 "letters, but the keys for those might not be case insensitive and might be "
10157 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
10162 #: ../fish/guestfish-actions.pod:2039 ../src/guestfs-actions.pod:3182
10164 "For Windows guests, currently only hard drive mappings are returned. "
10165 "Removable disks (eg. DVD-ROMs) are ignored."
10169 #: ../fish/guestfish-actions.pod:2042 ../src/guestfs-actions.pod:3185
10171 "For guests that do not use drive mappings, or if the drive mappings could "
10172 "not be determined, this returns an empty hash table."
10176 #: ../fish/guestfish-actions.pod:2045
10178 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10179 "L</inspect-get-mountpoints>, L</inspect-get-filesystems>."
10183 #: ../fish/guestfish-actions.pod:2049
10184 msgid "inspect-get-filesystems"
10188 #: ../fish/guestfish-actions.pod:2051
10191 " inspect-get-filesystems root\n"
10196 #: ../fish/guestfish-actions.pod:2053 ../src/guestfs-actions.pod:3206
10198 "This returns a list of all the filesystems that we think are associated with "
10199 "this operating system. This includes the root filesystem, other ordinary "
10200 "filesystems, and non-mounted devices like swap partitions."
10204 #: ../fish/guestfish-actions.pod:2058 ../src/guestfs-actions.pod:3211
10206 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
10207 "to be shared between operating systems."
10211 #: ../fish/guestfish-actions.pod:2061
10213 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10214 "L</inspect-get-mountpoints>."
10218 #: ../fish/guestfish-actions.pod:2064
10219 msgid "inspect-get-format"
10223 #: ../fish/guestfish-actions.pod:2066
10226 " inspect-get-format root\n"
10231 #: ../fish/guestfish-actions.pod:2068 ../src/guestfs-actions.pod:3229
10233 "This returns the format of the inspected operating system. You can use it "
10234 "to detect install images, live CDs and similar."
10238 #: ../fish/guestfish-actions.pod:2071 ../src/guestfs-actions.pod:3232
10239 msgid "Currently defined formats are:"
10243 #: ../fish/guestfish-actions.pod:2075 ../src/guestfs-actions.pod:3236
10244 msgid "\"installed\""
10248 #: ../fish/guestfish-actions.pod:2077 ../src/guestfs-actions.pod:3238
10249 msgid "This is an installed operating system."
10253 #: ../fish/guestfish-actions.pod:2079 ../src/guestfs-actions.pod:3240
10254 msgid "\"installer\""
10258 #: ../fish/guestfish-actions.pod:2081 ../src/guestfs-actions.pod:3242
10260 "The disk image being inspected is not an installed operating system, but a "
10261 "I<bootable> install disk, live CD, or similar."
10265 #: ../fish/guestfish-actions.pod:2086 ../src/guestfs-actions.pod:3247
10266 msgid "The format of this disk image is not known."
10270 #: ../fish/guestfish-actions.pod:2095
10271 msgid "inspect-get-hostname"
10275 #: ../fish/guestfish-actions.pod:2097
10278 " inspect-get-hostname root\n"
10283 #: ../fish/guestfish-actions.pod:2099 ../src/guestfs-actions.pod:3267
10285 "This function returns the hostname of the operating system as found by "
10286 "inspection of the guest's configuration files."
10290 #: ../fish/guestfish-actions.pod:2102 ../src/guestfs-actions.pod:3270
10292 "If the hostname could not be determined, then the string C<unknown> is "
10297 #: ../fish/guestfish-actions.pod:2107
10298 msgid "inspect-get-icon"
10302 #: ../fish/guestfish-actions.pod:2109
10305 " inspect-get-icon root [favicon:true|false] [highquality:true|false]\n"
10310 #: ../fish/guestfish-actions.pod:2111 ../src/guestfs-actions.pod:3296
10312 "This function returns an icon corresponding to the inspected operating "
10313 "system. The icon is returned as a buffer containing a PNG image (re-encoded "
10314 "to PNG if necessary)."
10318 #: ../fish/guestfish-actions.pod:2115 ../src/guestfs-actions.pod:3300
10320 "If it was not possible to get an icon this function returns a zero-length "
10321 "(non-NULL) buffer. I<Callers must check for this case>."
10325 #: ../fish/guestfish-actions.pod:2118 ../src/guestfs-actions.pod:3303
10327 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
10328 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
10329 "this file will be returned. You can disable favicons by passing the "
10330 "optional C<favicon> boolean as false (default is true)."
10334 #: ../fish/guestfish-actions.pod:2124 ../src/guestfs-actions.pod:3309
10336 "If finding the favicon fails, then we look in other places in the guest for "
10341 #: ../fish/guestfish-actions.pod:2127 ../src/guestfs-actions.pod:3312
10343 "If the optional C<highquality> boolean is true then only high quality icons "
10344 "are returned, which means only icons of high resolution with an alpha "
10345 "channel. The default (false) is to return any icon we can, even if it is of "
10346 "substandard quality."
10350 #: ../fish/guestfish-actions.pod:2138 ../src/guestfs-actions.pod:3323
10352 "Unlike most other inspection API calls, the guest's disks must be mounted up "
10353 "before you call this, since it needs to read information from the guest "
10354 "filesystem during the call."
10358 #: ../fish/guestfish-actions.pod:2144 ../src/guestfs-actions.pod:3329
10360 "B<Security:> The icon data comes from the untrusted guest, and should be "
10361 "treated with caution. PNG files have been known to contain exploits. "
10362 "Ensure that libpng (or other relevant libraries) are fully up to date before "
10363 "trying to process or display the icon."
10367 #: ../fish/guestfish-actions.pod:2152 ../src/guestfs-actions.pod:3337
10369 "The PNG image returned can be any size. It might not be square. Libguestfs "
10370 "tries to return the largest, highest quality icon available. The "
10371 "application must scale the icon to the required size."
10375 #: ../fish/guestfish-actions.pod:2159 ../src/guestfs-actions.pod:3344
10377 "Extracting icons from Windows guests requires the external C<wrestool> "
10378 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
10379 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
10380 "installed separately."
10384 #: ../fish/guestfish-actions.pod:2166 ../src/guestfs-actions.pod:3351
10386 "Operating system icons are usually trademarks. Seek legal advice before "
10387 "using trademarks in applications."
10391 #: ../fish/guestfish-actions.pod:2173
10392 msgid "inspect-get-major-version"
10396 #: ../fish/guestfish-actions.pod:2175
10399 " inspect-get-major-version root\n"
10404 #: ../fish/guestfish-actions.pod:2177 ../src/guestfs-actions.pod:3392
10405 msgid "This returns the major version number of the inspected operating system."
10409 #: ../fish/guestfish-actions.pod:2180 ../src/guestfs-actions.pod:3395
10411 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
10412 "popular public names used by the operating system. Notably the operating "
10413 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
10414 "1). You can find out the real versions corresponding to releases of Windows "
10415 "by consulting Wikipedia or MSDN."
10419 #: ../fish/guestfish-actions.pod:2187 ../fish/guestfish-actions.pod:2198 ../src/guestfs-actions.pod:3402 ../src/guestfs-actions.pod:3419
10420 msgid "If the version could not be determined, then C<0> is returned."
10424 #: ../fish/guestfish-actions.pod:2191
10425 msgid "inspect-get-minor-version"
10429 #: ../fish/guestfish-actions.pod:2193
10432 " inspect-get-minor-version root\n"
10437 #: ../fish/guestfish-actions.pod:2195 ../src/guestfs-actions.pod:3416
10438 msgid "This returns the minor version number of the inspected operating system."
10442 #: ../fish/guestfish-actions.pod:2200
10444 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10445 "L</inspect-get-major-version>."
10449 #: ../fish/guestfish-actions.pod:2203
10450 msgid "inspect-get-mountpoints"
10454 #: ../fish/guestfish-actions.pod:2205
10457 " inspect-get-mountpoints root\n"
10462 #: ../fish/guestfish-actions.pod:2207 ../src/guestfs-actions.pod:3434
10464 "This returns a hash of where we think the filesystems associated with this "
10465 "operating system should be mounted. Callers should note that this is at "
10466 "best an educated guess made by reading configuration files such as "
10467 "C</etc/fstab>. I<In particular note> that this may return filesystems which "
10468 "are non-existent or not mountable and callers should be prepared to handle "
10469 "or ignore failures if they try to mount them."
10473 #: ../fish/guestfish-actions.pod:2216 ../src/guestfs-actions.pod:3443
10475 "Each element in the returned hashtable has a key which is the path of the "
10476 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
10477 "mounted there (eg. C</dev/sda1>)."
10481 #: ../fish/guestfish-actions.pod:2221 ../src/guestfs-actions.pod:3448
10482 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
10486 #: ../fish/guestfish-actions.pod:2224
10488 "For operating systems like Windows which still use drive letters, this call "
10489 "will only return an entry for the first drive \"mounted on\" C</>. For "
10490 "information about the mapping of drive letters to partitions, see "
10491 "L</inspect-get-drive-mappings>."
10495 #: ../fish/guestfish-actions.pod:2230
10497 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10498 "L</inspect-get-filesystems>."
10502 #: ../fish/guestfish-actions.pod:2233
10503 msgid "inspect-get-package-format"
10507 #: ../fish/guestfish-actions.pod:2235
10510 " inspect-get-package-format root\n"
10515 #: ../fish/guestfish-actions.pod:2237
10517 "This function and L</inspect-get-package-management> return the package "
10518 "format and package management tool used by the inspected operating system. "
10519 "For example for Fedora these functions would return C<rpm> (package format) "
10520 "and C<yum> (package management)."
10524 #: ../fish/guestfish-actions.pod:2243 ../src/guestfs-actions.pod:3480
10526 "This returns the string C<unknown> if we could not determine the package "
10527 "format I<or> if the operating system does not have a real packaging system "
10532 #: ../fish/guestfish-actions.pod:2247 ../src/guestfs-actions.pod:3484
10534 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>, "
10535 "C<pkgsrc>. Future versions of libguestfs may return other strings."
10539 #: ../fish/guestfish-actions.pod:2253
10540 msgid "inspect-get-package-management"
10544 #: ../fish/guestfish-actions.pod:2255
10547 " inspect-get-package-management root\n"
10552 #: ../fish/guestfish-actions.pod:2257
10554 "L</inspect-get-package-format> and this function return the package format "
10555 "and package management tool used by the inspected operating system. For "
10556 "example for Fedora these functions would return C<rpm> (package format) and "
10557 "C<yum> (package management)."
10561 #: ../fish/guestfish-actions.pod:2263 ../src/guestfs-actions.pod:3507
10563 "This returns the string C<unknown> if we could not determine the package "
10564 "management tool I<or> if the operating system does not have a real packaging "
10565 "system (eg. Windows)."
10569 #: ../fish/guestfish-actions.pod:2267 ../src/guestfs-actions.pod:3511
10571 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
10572 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>, C<zypper>. Future "
10573 "versions of libguestfs may return other strings."
10577 #: ../fish/guestfish-actions.pod:2274
10578 msgid "inspect-get-product-name"
10582 #: ../fish/guestfish-actions.pod:2276
10585 " inspect-get-product-name root\n"
10590 #: ../fish/guestfish-actions.pod:2278 ../src/guestfs-actions.pod:3529
10592 "This returns the product name of the inspected operating system. The "
10593 "product name is generally some freeform string which can be displayed to the "
10594 "user, but should not be parsed by programs."
10598 #: ../fish/guestfish-actions.pod:2283 ../src/guestfs-actions.pod:3534
10600 "If the product name could not be determined, then the string C<unknown> is "
10605 #: ../fish/guestfish-actions.pod:2288
10606 msgid "inspect-get-product-variant"
10610 #: ../fish/guestfish-actions.pod:2290
10613 " inspect-get-product-variant root\n"
10618 #: ../fish/guestfish-actions.pod:2292 ../src/guestfs-actions.pod:3550
10619 msgid "This returns the product variant of the inspected operating system."
10623 #: ../fish/guestfish-actions.pod:2295 ../src/guestfs-actions.pod:3553
10625 "For Windows guests, this returns the contents of the Registry key "
10626 "C<HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> "
10627 "which is usually a string such as C<Client> or C<Server> (other values are "
10628 "possible). This can be used to distinguish consumer and enterprise versions "
10629 "of Windows that have the same version number (for example, Windows 7 and "
10630 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
10631 "the latter is C<Server>)."
10635 #: ../fish/guestfish-actions.pod:2304 ../src/guestfs-actions.pod:3562
10637 "For enterprise Linux guests, in future we intend this to return the product "
10638 "variant such as C<Desktop>, C<Server> and so on. But this is not "
10639 "implemented at present."
10643 #: ../fish/guestfish-actions.pod:2308 ../src/guestfs-actions.pod:3566
10645 "If the product variant could not be determined, then the string C<unknown> "
10650 #: ../fish/guestfish-actions.pod:2311
10652 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10653 "L</inspect-get-product-name>, L</inspect-get-major-version>."
10657 #: ../fish/guestfish-actions.pod:2315
10658 msgid "inspect-get-roots"
10662 #: ../fish/guestfish-actions.pod:2317
10665 " inspect-get-roots\n"
10670 #: ../fish/guestfish-actions.pod:2319
10672 "This function is a convenient way to get the list of root devices, as "
10673 "returned from a previous call to L</inspect-os>, but without redoing the "
10674 "whole inspection process."
10678 #: ../fish/guestfish-actions.pod:2323
10680 "This returns an empty list if either no root devices were found or the "
10681 "caller has not called L</inspect-os>."
10685 #: ../fish/guestfish-actions.pod:2328
10686 msgid "inspect-get-type"
10690 #: ../fish/guestfish-actions.pod:2330
10693 " inspect-get-type root\n"
10698 #: ../fish/guestfish-actions.pod:2332 ../src/guestfs-actions.pod:3604
10700 "This returns the type of the inspected operating system. Currently defined "
10705 #: ../fish/guestfish-actions.pod:2337 ../src/guestfs-actions.pod:3609
10710 #: ../fish/guestfish-actions.pod:2339 ../src/guestfs-actions.pod:3611
10711 msgid "Any Linux-based operating system."
10715 #: ../fish/guestfish-actions.pod:2343 ../src/guestfs-actions.pod:3615
10716 msgid "Any Microsoft Windows operating system."
10720 #: ../fish/guestfish-actions.pod:2345 ../src/guestfs-actions.pod:3617
10721 msgid "\"freebsd\""
10725 #: ../fish/guestfish-actions.pod:2347 ../src/guestfs-actions.pod:3619
10730 #: ../fish/guestfish-actions.pod:2349 ../src/guestfs-actions.pod:3621
10735 #: ../fish/guestfish-actions.pod:2351 ../src/guestfs-actions.pod:3623
10740 #: ../fish/guestfish-actions.pod:2355 ../src/guestfs-actions.pod:3627
10741 msgid "The operating system type could not be determined."
10745 #: ../fish/guestfish-actions.pod:2364
10746 msgid "inspect-get-windows-current-control-set"
10750 #: ../fish/guestfish-actions.pod:2366
10753 " inspect-get-windows-current-control-set root\n"
10758 #: ../fish/guestfish-actions.pod:2368 ../src/guestfs-actions.pod:3647
10760 "This returns the Windows CurrentControlSet of the inspected guest. The "
10761 "CurrentControlSet is a registry key name such as C<ControlSet001>."
10765 #: ../fish/guestfish-actions.pod:2371 ../src/guestfs-actions.pod:3650
10767 "This call assumes that the guest is Windows and that the Registry could be "
10768 "examined by inspection. If this is not the case then an error is returned."
10772 #: ../fish/guestfish-actions.pod:2377
10773 msgid "inspect-get-windows-systemroot"
10777 #: ../fish/guestfish-actions.pod:2379
10780 " inspect-get-windows-systemroot root\n"
10785 #: ../fish/guestfish-actions.pod:2381 ../src/guestfs-actions.pod:3667
10787 "This returns the Windows systemroot of the inspected guest. The systemroot "
10788 "is a directory path such as C</WINDOWS>."
10792 #: ../fish/guestfish-actions.pod:2384 ../src/guestfs-actions.pod:3670
10794 "This call assumes that the guest is Windows and that the systemroot could be "
10795 "determined by inspection. If this is not the case then an error is "
10800 #: ../fish/guestfish-actions.pod:2390
10801 msgid "inspect-is-live"
10805 #: ../fish/guestfish-actions.pod:2392
10808 " inspect-is-live root\n"
10813 #: ../fish/guestfish-actions.pod:2394
10815 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10816 "then this returns true if a live image was detected on the disk."
10820 #: ../fish/guestfish-actions.pod:2400
10821 msgid "inspect-is-multipart"
10825 #: ../fish/guestfish-actions.pod:2402
10828 " inspect-is-multipart root\n"
10833 #: ../fish/guestfish-actions.pod:2404
10835 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10836 "then this returns true if the disk is part of a set."
10840 #: ../fish/guestfish-actions.pod:2410
10841 msgid "inspect-is-netinst"
10845 #: ../fish/guestfish-actions.pod:2412
10848 " inspect-is-netinst root\n"
10853 #: ../fish/guestfish-actions.pod:2414
10855 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10856 "then this returns true if the disk is a network installer, ie. not a "
10857 "self-contained install CD but one which is likely to require network access "
10858 "to complete the install."
10862 #: ../fish/guestfish-actions.pod:2422
10863 msgid "inspect-list-applications"
10867 #: ../fish/guestfish-actions.pod:2424
10870 " inspect-list-applications root\n"
10875 #: ../fish/guestfish-actions.pod:2426 ../src/guestfs-actions.pod:3737
10876 msgid "Return the list of applications installed in the operating system."
10880 #: ../fish/guestfish-actions.pod:2428
10882 "I<Note:> This call works differently from other parts of the inspection "
10883 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
10884 "then mount up the disks, before calling this. Listing applications is a "
10885 "significantly more difficult operation which requires access to the full "
10886 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
10887 "are just returning data cached in the libguestfs handle, this call actually "
10888 "reads parts of the mounted filesystems during the call."
10892 #: ../fish/guestfish-actions.pod:2438 ../src/guestfs-actions.pod:3749
10894 "This returns an empty list if the inspection code was not able to determine "
10895 "the list of applications."
10899 #: ../fish/guestfish-actions.pod:2441 ../src/guestfs-actions.pod:3752
10900 msgid "The application structure contains the following fields:"
10904 #: ../fish/guestfish-actions.pod:2445 ../src/guestfs-actions.pod:3756
10905 msgid "C<app_name>"
10909 #: ../fish/guestfish-actions.pod:2447 ../src/guestfs-actions.pod:3758
10911 "The name of the application. For Red Hat-derived and Debian-derived Linux "
10912 "guests, this is the package name."
10916 #: ../fish/guestfish-actions.pod:2450 ../src/guestfs-actions.pod:3761
10917 msgid "C<app_display_name>"
10921 #: ../fish/guestfish-actions.pod:2452 ../src/guestfs-actions.pod:3763
10923 "The display name of the application, sometimes localized to the install "
10924 "language of the guest operating system."
10928 #: ../fish/guestfish-actions.pod:2455 ../src/guestfs-actions.pod:3766
10930 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
10931 "to display something can use C<app_name> instead."
10935 #: ../fish/guestfish-actions.pod:2458 ../src/guestfs-actions.pod:3769
10936 msgid "C<app_epoch>"
10940 #: ../fish/guestfish-actions.pod:2460 ../src/guestfs-actions.pod:3771
10942 "For package managers which use epochs, this contains the epoch of the "
10943 "package (an integer). If unavailable, this is returned as C<0>."
10947 #: ../fish/guestfish-actions.pod:2463 ../src/guestfs-actions.pod:3774
10948 msgid "C<app_version>"
10952 #: ../fish/guestfish-actions.pod:2465 ../src/guestfs-actions.pod:3776
10954 "The version string of the application or package. If unavailable this is "
10955 "returned as an empty string C<\"\">."
10959 #: ../fish/guestfish-actions.pod:2468 ../src/guestfs-actions.pod:3779
10960 msgid "C<app_release>"
10964 #: ../fish/guestfish-actions.pod:2470 ../src/guestfs-actions.pod:3781
10966 "The release string of the application or package, for package managers that "
10967 "use this. If unavailable this is returned as an empty string C<\"\">."
10971 #: ../fish/guestfish-actions.pod:2474 ../src/guestfs-actions.pod:3785
10972 msgid "C<app_install_path>"
10976 #: ../fish/guestfish-actions.pod:2476 ../src/guestfs-actions.pod:3787
10978 "The installation path of the application (on operating systems such as "
10979 "Windows which use installation paths). This path is in the format used by "
10980 "the guest operating system, it is not a libguestfs path."
10984 #: ../fish/guestfish-actions.pod:2481 ../src/guestfs-actions.pod:3792
10985 msgid "If unavailable this is returned as an empty string C<\"\">."
10989 #: ../fish/guestfish-actions.pod:2483 ../src/guestfs-actions.pod:3794
10990 msgid "C<app_trans_path>"
10994 #: ../fish/guestfish-actions.pod:2485 ../src/guestfs-actions.pod:3796
10996 "The install path translated into a libguestfs path. If unavailable this is "
10997 "returned as an empty string C<\"\">."
11001 #: ../fish/guestfish-actions.pod:2488 ../src/guestfs-actions.pod:3799
11002 msgid "C<app_publisher>"
11006 #: ../fish/guestfish-actions.pod:2490 ../src/guestfs-actions.pod:3801
11008 "The name of the publisher of the application, for package managers that use "
11009 "this. If unavailable this is returned as an empty string C<\"\">."
11013 #: ../fish/guestfish-actions.pod:2494 ../src/guestfs-actions.pod:3805
11018 #: ../fish/guestfish-actions.pod:2496 ../src/guestfs-actions.pod:3807
11020 "The URL (eg. upstream URL) of the application. If unavailable this is "
11021 "returned as an empty string C<\"\">."
11025 #: ../fish/guestfish-actions.pod:2499 ../src/guestfs-actions.pod:3810
11026 msgid "C<app_source_package>"
11030 #: ../fish/guestfish-actions.pod:2501 ../src/guestfs-actions.pod:3812
11032 "For packaging systems which support this, the name of the source package. "
11033 "If unavailable this is returned as an empty string C<\"\">."
11037 #: ../fish/guestfish-actions.pod:2504 ../src/guestfs-actions.pod:3815
11038 msgid "C<app_summary>"
11042 #: ../fish/guestfish-actions.pod:2506 ../src/guestfs-actions.pod:3817
11044 "A short (usually one line) description of the application or package. If "
11045 "unavailable this is returned as an empty string C<\"\">."
11049 #: ../fish/guestfish-actions.pod:2509 ../src/guestfs-actions.pod:3820
11050 msgid "C<app_description>"
11054 #: ../fish/guestfish-actions.pod:2511 ../src/guestfs-actions.pod:3822
11056 "A longer description of the application or package. If unavailable this is "
11057 "returned as an empty string C<\"\">."
11061 #: ../fish/guestfish-actions.pod:2518
11066 #: ../fish/guestfish-actions.pod:2520
11074 #: ../fish/guestfish-actions.pod:2522 ../src/guestfs-actions.pod:3840
11076 "This function uses other libguestfs functions and certain heuristics to "
11077 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
11078 "for operating systems."
11082 #: ../fish/guestfish-actions.pod:2526 ../src/guestfs-actions.pod:3844
11083 msgid "The list returned is empty if no operating systems were found."
11087 #: ../fish/guestfish-actions.pod:2528 ../src/guestfs-actions.pod:3846
11089 "If one operating system was found, then this returns a list with a single "
11090 "element, which is the name of the root filesystem of this operating system. "
11091 "It is also possible for this function to return a list containing more than "
11092 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
11093 "element being the root filesystem of one of the operating systems."
11097 #: ../fish/guestfish-actions.pod:2535
11099 "You can pass the root string(s) returned to other L</inspect-get-*> "
11100 "functions in order to query further information about each operating system, "
11101 "such as the name and version."
11105 #: ../fish/guestfish-actions.pod:2540
11107 "This function uses other libguestfs features such as L</mount-ro> and "
11108 "L</umount-all> in order to mount and unmount filesystems and look at the "
11109 "contents. This should be called with no disks currently mounted. The "
11110 "function may also use Augeas, so any existing Augeas handle will be closed."
11114 #: ../fish/guestfish-actions.pod:2546 ../src/guestfs-actions.pod:3864
11116 "This function cannot decrypt encrypted disks. The caller must do that first "
11117 "(supplying the necessary keys) if the disk is encrypted."
11121 #: ../fish/guestfish-actions.pod:2552 ../fish/guestfish-actions.pod:2750 ../fish/guestfish-actions.pod:2815
11122 msgid "See also L</list-filesystems>."
11126 #: ../fish/guestfish-actions.pod:2554
11127 msgid "is-blockdev"
11131 #: ../fish/guestfish-actions.pod:2556
11134 " is-blockdev path\n"
11139 #: ../fish/guestfish-actions.pod:2558 ../src/guestfs-actions.pod:3884
11141 "This returns C<true> if and only if there is a block device with the given "
11146 #: ../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
11147 msgid "See also L</stat>."
11151 #: ../fish/guestfish-actions.pod:2563
11156 #: ../fish/guestfish-actions.pod:2565
11164 #: ../fish/guestfish-actions.pod:2567 ../src/guestfs-actions.pod:3898
11166 "This returns true iff this handle is busy processing a command (in the "
11171 #: ../fish/guestfish-actions.pod:2572
11176 #: ../fish/guestfish-actions.pod:2574
11179 " is-chardev path\n"
11184 #: ../fish/guestfish-actions.pod:2576 ../src/guestfs-actions.pod:3913
11186 "This returns C<true> if and only if there is a character device with the "
11187 "given C<path> name."
11191 #: ../fish/guestfish-actions.pod:2581
11196 #: ../fish/guestfish-actions.pod:2583
11204 #: ../fish/guestfish-actions.pod:2585 ../src/guestfs-actions.pod:3927
11206 "This returns true iff this handle is being configured (in the C<CONFIG> "
11211 #: ../fish/guestfish-actions.pod:2590
11216 #: ../fish/guestfish-actions.pod:2592
11224 #: ../fish/guestfish-actions.pod:2594 ../src/guestfs-actions.pod:3942
11226 "This returns C<true> if and only if there is a directory with the given "
11227 "C<path> name. Note that it returns false for other objects like files."
11231 #: ../fish/guestfish-actions.pod:2600
11236 #: ../fish/guestfish-actions.pod:2602
11244 #: ../fish/guestfish-actions.pod:2604 ../src/guestfs-actions.pod:3958
11246 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
11247 "given C<path> name."
11251 #: ../fish/guestfish-actions.pod:2609
11256 #: ../fish/guestfish-actions.pod:2611
11264 #: ../fish/guestfish-actions.pod:2613 ../src/guestfs-actions.pod:3973
11266 "This returns C<true> if and only if there is a regular file with the given "
11267 "C<path> name. Note that it returns false for other objects like "
11272 #: ../fish/guestfish-actions.pod:2619
11273 msgid "is-launching"
11277 #: ../fish/guestfish-actions.pod:2621
11285 #: ../fish/guestfish-actions.pod:2623 ../src/guestfs-actions.pod:3988
11287 "This returns true iff this handle is launching the subprocess (in the "
11288 "C<LAUNCHING> state)."
11292 #: ../fish/guestfish-actions.pod:2628
11297 #: ../fish/guestfish-actions.pod:2630
11305 #: ../fish/guestfish-actions.pod:2632 ../src/guestfs-actions.pod:4003
11307 "This command tests whether C<device> is a logical volume, and returns true "
11308 "iff this is the case."
11312 #: ../fish/guestfish-actions.pod:2635
11317 #: ../fish/guestfish-actions.pod:2637
11325 #: ../fish/guestfish-actions.pod:2639 ../src/guestfs-actions.pod:4015
11327 "This returns true iff this handle is ready to accept commands (in the "
11332 #: ../fish/guestfish-actions.pod:2644
11337 #: ../fish/guestfish-actions.pod:2646
11340 " is-socket path\n"
11345 #: ../fish/guestfish-actions.pod:2648 ../src/guestfs-actions.pod:4030
11347 "This returns C<true> if and only if there is a Unix domain socket with the "
11348 "given C<path> name."
11352 #: ../fish/guestfish-actions.pod:2653
11357 #: ../fish/guestfish-actions.pod:2655
11360 " is-symlink path\n"
11365 #: ../fish/guestfish-actions.pod:2657 ../src/guestfs-actions.pod:4045
11367 "This returns C<true> if and only if there is a symbolic link with the given "
11372 #: ../fish/guestfish-actions.pod:2662
11377 #: ../fish/guestfish-actions.pod:2664
11385 #: ../fish/guestfish-actions.pod:2666 ../src/guestfs-actions.pod:4060
11387 "This returns true iff the file exists and the file is empty or it contains "
11392 #: ../fish/guestfish-actions.pod:2669
11393 msgid "is-zero-device"
11397 #: ../fish/guestfish-actions.pod:2671
11400 " is-zero-device device\n"
11405 #: ../fish/guestfish-actions.pod:2673 ../src/guestfs-actions.pod:4073
11406 msgid "This returns true iff the device exists and contains all zero bytes."
11410 #: ../fish/guestfish-actions.pod:2675 ../src/guestfs-actions.pod:4075
11411 msgid "Note that for large devices this can take a long time to run."
11415 #: ../fish/guestfish-actions.pod:2677
11416 msgid "kill-subprocess"
11420 #: ../fish/guestfish-actions.pod:2679
11423 " kill-subprocess\n"
11428 #: ../fish/guestfish-actions.pod:2681 ../src/guestfs-actions.pod:4086
11429 msgid "This kills the qemu subprocess. You should never need to call this."
11433 #: ../fish/guestfish-actions.pod:2683
11438 #: ../fish/guestfish-actions.pod:2685
11443 #: ../fish/guestfish-actions.pod:2687
11451 #: ../fish/guestfish-actions.pod:2689 ../src/guestfs-actions.pod:4097
11453 "Internally libguestfs is implemented by running a virtual machine using "
11458 #: ../fish/guestfish-actions.pod:2692 ../src/guestfs-actions.pod:4100
11460 "You should call this after configuring the handle (eg. adding drives) but "
11461 "before performing any actions."
11465 #: ../fish/guestfish-actions.pod:2695
11470 #: ../fish/guestfish-actions.pod:2697
11473 " lchown owner group path\n"
11478 #: ../fish/guestfish-actions.pod:2699
11480 "Change the file owner to C<owner> and group to C<group>. This is like "
11481 "L</chown> but if C<path> is a symlink then the link itself is changed, not "
11486 #: ../fish/guestfish-actions.pod:2707
11491 #: ../fish/guestfish-actions.pod:2709
11494 " lgetxattr path name\n"
11499 #: ../fish/guestfish-actions.pod:2711 ../src/guestfs-actions.pod:4140
11501 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
11502 "is a symlink, then this call returns an extended attribute from the symlink."
11506 #: ../fish/guestfish-actions.pod:2725
11507 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
11511 #: ../fish/guestfish-actions.pod:2727
11516 #: ../fish/guestfish-actions.pod:2729
11519 " lgetxattrs path\n"
11524 #: ../fish/guestfish-actions.pod:2731
11526 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
11527 "it returns the extended attributes of the link itself."
11531 #: ../fish/guestfish-actions.pod:2735
11536 #: ../fish/guestfish-actions.pod:2737
11544 #: ../fish/guestfish-actions.pod:2739 ../src/guestfs-actions.pod:4183
11546 "List all 9p filesystems attached to the guest. A list of mount tags is "
11551 #: ../fish/guestfish-actions.pod:2742
11552 msgid "list-devices"
11556 #: ../fish/guestfish-actions.pod:2744
11564 #: ../fish/guestfish-actions.pod:2746 ../src/guestfs-actions.pod:4197
11565 msgid "List all the block devices."
11569 #: ../fish/guestfish-actions.pod:2748 ../src/guestfs-actions.pod:4199
11570 msgid "The full block device names are returned, eg. C</dev/sda>."
11574 #: ../fish/guestfish-actions.pod:2752
11575 msgid "list-dm-devices"
11579 #: ../fish/guestfish-actions.pod:2754
11582 " list-dm-devices\n"
11587 #: ../fish/guestfish-actions.pod:2756 ../src/guestfs-actions.pod:4214
11588 msgid "List all device mapper devices."
11592 #: ../fish/guestfish-actions.pod:2758
11594 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
11595 "previous call to L</luks-open>."
11599 #: ../fish/guestfish-actions.pod:2761
11601 "Device mapper devices which correspond to logical volumes are I<not> "
11602 "returned in this list. Call L</lvs> if you want to list logical volumes."
11606 #: ../fish/guestfish-actions.pod:2765
11607 msgid "list-filesystems"
11611 #: ../fish/guestfish-actions.pod:2767
11614 " list-filesystems\n"
11619 #: ../fish/guestfish-actions.pod:2769 ../src/guestfs-actions.pod:4234
11621 "This inspection command looks for filesystems on partitions, block devices "
11622 "and logical volumes, returning a list of devices containing filesystems and "
11627 #: ../fish/guestfish-actions.pod:2773 ../src/guestfs-actions.pod:4238
11629 "The return value is a hash, where the keys are the devices containing "
11630 "filesystems, and the values are the filesystem types. For example:"
11634 #: ../fish/guestfish-actions.pod:2777 ../src/guestfs-actions.pod:4242
11637 " \"/dev/sda1\" => \"ntfs\"\n"
11638 " \"/dev/sda2\" => \"ext2\"\n"
11639 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
11640 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
11645 #: ../fish/guestfish-actions.pod:2782 ../src/guestfs-actions.pod:4247
11647 "The value can have the special value \"unknown\", meaning the content of the "
11648 "device is undetermined or empty. \"swap\" means a Linux swap partition."
11652 #: ../fish/guestfish-actions.pod:2786
11654 "This command runs other libguestfs commands, which might include L</mount> "
11655 "and L</umount>, and therefore you should use this soon after launch and only "
11656 "when nothing is mounted."
11660 #: ../fish/guestfish-actions.pod:2790
11662 "Not all of the filesystems returned will be mountable. In particular, swap "
11663 "partitions are returned in the list. Also this command does not check that "
11664 "each filesystem found is valid and mountable, and some filesystems might be "
11665 "mountable but require special options. Filesystems may not all belong to a "
11666 "single logical operating system (use L</inspect-os> to look for OSes)."
11670 #: ../fish/guestfish-actions.pod:2798
11671 msgid "list-md-devices"
11675 #: ../fish/guestfish-actions.pod:2800
11678 " list-md-devices\n"
11683 #: ../fish/guestfish-actions.pod:2802 ../src/guestfs-actions.pod:4276
11684 msgid "List all Linux md devices."
11688 #: ../fish/guestfish-actions.pod:2804
11689 msgid "list-partitions"
11693 #: ../fish/guestfish-actions.pod:2806
11696 " list-partitions\n"
11701 #: ../fish/guestfish-actions.pod:2808 ../src/guestfs-actions.pod:4287
11702 msgid "List all the partitions detected on all block devices."
11706 #: ../fish/guestfish-actions.pod:2810 ../src/guestfs-actions.pod:4289
11707 msgid "The full partition device names are returned, eg. C</dev/sda1>"
11711 #: ../fish/guestfish-actions.pod:2812
11713 "This does not return logical volumes. For that you will need to call "
11718 #: ../fish/guestfish-actions.pod:2817
11723 #: ../fish/guestfish-actions.pod:2819
11731 #: ../fish/guestfish-actions.pod:2821 ../src/guestfs-actions.pod:4308
11733 "List the files in C<directory> (relative to the root directory, there is no "
11734 "cwd) in the format of 'ls -la'."
11738 #: ../fish/guestfish-actions.pod:2824 ../src/guestfs-actions.pod:4311
11740 "This command is mostly useful for interactive sessions. It is I<not> "
11741 "intended that you try to parse the output string."
11745 #: ../fish/guestfish-actions.pod:2827
11750 #: ../fish/guestfish-actions.pod:2829
11753 " ln target linkname\n"
11758 #: ../fish/guestfish-actions.pod:2831 ../src/guestfs-actions.pod:4326
11759 msgid "This command creates a hard link using the C<ln> command."
11763 #: ../fish/guestfish-actions.pod:2833
11768 #: ../fish/guestfish-actions.pod:2835
11771 " ln-f target linkname\n"
11776 #: ../fish/guestfish-actions.pod:2837 ../src/guestfs-actions.pod:4339
11778 "This command creates a hard link using the C<ln -f> command. The I<-f> "
11779 "option removes the link (C<linkname>) if it exists already."
11783 #: ../fish/guestfish-actions.pod:2840
11788 #: ../fish/guestfish-actions.pod:2842
11791 " ln-s target linkname\n"
11796 #: ../fish/guestfish-actions.pod:2844 ../src/guestfs-actions.pod:4353
11797 msgid "This command creates a symbolic link using the C<ln -s> command."
11801 #: ../fish/guestfish-actions.pod:2846
11806 #: ../fish/guestfish-actions.pod:2848
11809 " ln-sf target linkname\n"
11814 #: ../fish/guestfish-actions.pod:2850 ../src/guestfs-actions.pod:4366
11816 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
11817 "option removes the link (C<linkname>) if it exists already."
11821 #: ../fish/guestfish-actions.pod:2853
11822 msgid "lremovexattr"
11826 #: ../fish/guestfish-actions.pod:2855
11829 " lremovexattr xattr path\n"
11834 #: ../fish/guestfish-actions.pod:2857
11836 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
11837 "it removes an extended attribute of the link itself."
11841 #: ../fish/guestfish-actions.pod:2861
11846 #: ../fish/guestfish-actions.pod:2863
11854 #: ../fish/guestfish-actions.pod:2865 ../src/guestfs-actions.pod:4394
11856 "List the files in C<directory> (relative to the root directory, there is no "
11857 "cwd). The '.' and '..' entries are not returned, but hidden files are "
11862 #: ../fish/guestfish-actions.pod:2869
11864 "This command is mostly useful for interactive sessions. Programs should "
11865 "probably use L</readdir> instead."
11869 #: ../fish/guestfish-actions.pod:2872
11874 #: ../fish/guestfish-actions.pod:2874
11877 " lsetxattr xattr val vallen path\n"
11882 #: ../fish/guestfish-actions.pod:2876
11884 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
11885 "sets an extended attribute of the link itself."
11889 #: ../fish/guestfish-actions.pod:2880
11894 #: ../fish/guestfish-actions.pod:2882
11902 #: ../fish/guestfish-actions.pod:2884 ../fish/guestfish-actions.pod:4775 ../src/guestfs-actions.pod:4430 ../src/guestfs-actions.pod:7349
11903 msgid "Returns file information for the given C<path>."
11907 #: ../fish/guestfish-actions.pod:2886
11909 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
11910 "the link is stat-ed, not the file it refers to."
11914 #: ../fish/guestfish-actions.pod:2890 ../src/guestfs-actions.pod:4436
11915 msgid "This is the same as the C<lstat(2)> system call."
11919 #: ../fish/guestfish-actions.pod:2892
11924 #: ../fish/guestfish-actions.pod:2894
11927 " lstatlist path 'names ...'\n"
11932 #: ../fish/guestfish-actions.pod:2896
11934 "This call allows you to perform the L</lstat> operation on multiple files, "
11935 "where all files are in the directory C<path>. C<names> is the list of files "
11936 "from this directory."
11940 #: ../fish/guestfish-actions.pod:2900 ../src/guestfs-actions.pod:4455
11942 "On return you get a list of stat structs, with a one-to-one correspondence "
11943 "to the C<names> list. If any name did not exist or could not be lstat'd, "
11944 "then the C<ino> field of that structure is set to C<-1>."
11948 #: ../fish/guestfish-actions.pod:2905
11950 "This call is intended for programs that want to efficiently list a directory "
11951 "contents without making many round-trips. See also L</lxattrlist> for a "
11952 "similarly efficient call for getting extended attributes. Very long "
11953 "directory listings might cause the protocol message size to be exceeded, "
11954 "causing this call to fail. The caller must split up such requests into "
11955 "smaller groups of names."
11959 #: ../fish/guestfish-actions.pod:2913
11960 msgid "luks-add-key"
11964 #: ../fish/guestfish-actions.pod:2915
11967 " luks-add-key device keyslot\n"
11972 #: ../fish/guestfish-actions.pod:2917 ../src/guestfs-actions.pod:4483
11974 "This command adds a new key on LUKS device C<device>. C<key> is any "
11975 "existing key, and is used to access the device. C<newkey> is the new key to "
11976 "add. C<keyslot> is the key slot that will be replaced."
11980 #: ../fish/guestfish-actions.pod:2922
11982 "Note that if C<keyslot> already contains a key, then this command will "
11983 "fail. You have to use L</luks-kill-slot> first to remove that key."
11987 #: ../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
11989 "This command has one or more key or passphrase parameters. Guestfish will "
11990 "prompt for these separately."
11994 #: ../fish/guestfish-actions.pod:2929
11999 #: ../fish/guestfish-actions.pod:2931
12002 " luks-close device\n"
12007 #: ../fish/guestfish-actions.pod:2933
12009 "This closes a LUKS device that was created earlier by L</luks-open> or "
12010 "L</luks-open-ro>. The C<device> parameter must be the name of the LUKS "
12011 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
12012 "underlying block device."
12016 #: ../fish/guestfish-actions.pod:2939
12017 msgid "luks-format"
12021 #: ../fish/guestfish-actions.pod:2941
12024 " luks-format device keyslot\n"
12029 #: ../fish/guestfish-actions.pod:2943 ../src/guestfs-actions.pod:4524
12031 "This command erases existing data on C<device> and formats the device as a "
12032 "LUKS encrypted device. C<key> is the initial key, which is added to key "
12033 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
12037 #: ../fish/guestfish-actions.pod:2951
12038 msgid "luks-format-cipher"
12042 #: ../fish/guestfish-actions.pod:2953
12045 " luks-format-cipher device keyslot cipher\n"
12050 #: ../fish/guestfish-actions.pod:2955
12052 "This command is the same as L</luks-format> but it also allows you to set "
12053 "the C<cipher> used."
12057 #: ../fish/guestfish-actions.pod:2961
12058 msgid "luks-kill-slot"
12062 #: ../fish/guestfish-actions.pod:2963
12065 " luks-kill-slot device keyslot\n"
12070 #: ../fish/guestfish-actions.pod:2965 ../src/guestfs-actions.pod:4565
12072 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
12073 "device C<device>. C<key> must be one of the I<other> keys."
12077 #: ../fish/guestfish-actions.pod:2972
12082 #: ../fish/guestfish-actions.pod:2974
12085 " luks-open device mapname\n"
12090 #: ../fish/guestfish-actions.pod:2976 ../src/guestfs-actions.pod:4585
12092 "This command opens a block device which has been encrypted according to the "
12093 "Linux Unified Key Setup (LUKS) standard."
12097 #: ../fish/guestfish-actions.pod:2979 ../src/guestfs-actions.pod:4588
12098 msgid "C<device> is the encrypted block device or partition."
12102 #: ../fish/guestfish-actions.pod:2981 ../src/guestfs-actions.pod:4590
12104 "The caller must supply one of the keys associated with the LUKS block "
12105 "device, in the C<key> parameter."
12109 #: ../fish/guestfish-actions.pod:2984 ../src/guestfs-actions.pod:4593
12111 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
12112 "writes to this block device are decrypted from and encrypted to the "
12113 "underlying C<device> respectively."
12117 #: ../fish/guestfish-actions.pod:2988
12119 "If this block device contains LVM volume groups, then calling L</vgscan> "
12120 "followed by L</vg-activate-all> will make them visible."
12124 #: ../fish/guestfish-actions.pod:2992
12125 msgid "Use L</list-dm-devices> to list all device mapper devices."
12129 #: ../fish/guestfish-actions.pod:2998
12130 msgid "luks-open-ro"
12134 #: ../fish/guestfish-actions.pod:3000
12137 " luks-open-ro device mapname\n"
12142 #: ../fish/guestfish-actions.pod:3002
12144 "This is the same as L</luks-open> except that a read-only mapping is "
12149 #: ../fish/guestfish-actions.pod:3008
12154 #: ../fish/guestfish-actions.pod:3010
12157 " lvcreate logvol volgroup mbytes\n"
12162 #: ../fish/guestfish-actions.pod:3012 ../src/guestfs-actions.pod:4639
12164 "This creates an LVM logical volume called C<logvol> on the volume group "
12165 "C<volgroup>, with C<size> megabytes."
12169 #: ../fish/guestfish-actions.pod:3015
12170 msgid "lvm-canonical-lv-name"
12174 #: ../fish/guestfish-actions.pod:3017
12177 " lvm-canonical-lv-name lvname\n"
12182 #: ../fish/guestfish-actions.pod:3019 ../src/guestfs-actions.pod:4652
12184 "This converts alternative naming schemes for LVs that you might find to the "
12185 "canonical name. For example, C</dev/mapper/VG-LV> is converted to "
12190 #: ../fish/guestfish-actions.pod:3023 ../src/guestfs-actions.pod:4656
12192 "This command returns an error if the C<lvname> parameter does not refer to a "
12197 #: ../fish/guestfish-actions.pod:3026
12198 msgid "See also L</is-lv>."
12202 #: ../fish/guestfish-actions.pod:3028
12203 msgid "lvm-clear-filter"
12207 #: ../fish/guestfish-actions.pod:3030
12210 " lvm-clear-filter\n"
12215 #: ../fish/guestfish-actions.pod:3032
12217 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
12222 #: ../fish/guestfish-actions.pod:3035 ../fish/guestfish-actions.pod:3063 ../src/guestfs-actions.pod:4674 ../src/guestfs-actions.pod:4713
12223 msgid "This command also clears the LVM cache and performs a volume group scan."
12227 #: ../fish/guestfish-actions.pod:3038
12228 msgid "lvm-remove-all"
12232 #: ../fish/guestfish-actions.pod:3040
12235 " lvm-remove-all\n"
12240 #: ../fish/guestfish-actions.pod:3042 ../src/guestfs-actions.pod:4686
12242 "This command removes all LVM logical volumes, volume groups and physical "
12247 #: ../fish/guestfish-actions.pod:3045
12248 msgid "lvm-set-filter"
12252 #: ../fish/guestfish-actions.pod:3047
12255 " lvm-set-filter 'devices ...'\n"
12260 #: ../fish/guestfish-actions.pod:3049 ../src/guestfs-actions.pod:4699
12262 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
12263 "block devices in the list C<devices>, and will ignore all other attached "
12268 #: ../fish/guestfish-actions.pod:3053 ../src/guestfs-actions.pod:4703
12270 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
12271 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
12272 "there are two types of duplication possible: either cloned PVs/VGs which "
12273 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
12274 "same name. In normal operation you cannot create this situation, but you "
12275 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
12276 "inside the LVM metadata."
12280 #: ../fish/guestfish-actions.pod:3066 ../src/guestfs-actions.pod:4716
12281 msgid "You can filter whole block devices or individual partitions."
12285 #: ../fish/guestfish-actions.pod:3068 ../src/guestfs-actions.pod:4718
12287 "You cannot use this if any VG is currently in use (eg. contains a mounted "
12288 "filesystem), even if you are not filtering out that VG."
12292 #: ../fish/guestfish-actions.pod:3072
12297 #: ../fish/guestfish-actions.pod:3074
12300 " lvremove device\n"
12305 #: ../fish/guestfish-actions.pod:3076 ../src/guestfs-actions.pod:4732
12307 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
12308 "LV, such as C</dev/VG/LV>."
12312 #: ../fish/guestfish-actions.pod:3079 ../src/guestfs-actions.pod:4735
12314 "You can also remove all LVs in a volume group by specifying the VG name, "
12319 #: ../fish/guestfish-actions.pod:3082
12324 #: ../fish/guestfish-actions.pod:3084
12327 " lvrename logvol newlogvol\n"
12332 #: ../fish/guestfish-actions.pod:3086 ../src/guestfs-actions.pod:4749
12333 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
12337 #: ../fish/guestfish-actions.pod:3088
12342 #: ../fish/guestfish-actions.pod:3090
12345 " lvresize device mbytes\n"
12350 #: ../fish/guestfish-actions.pod:3092 ../src/guestfs-actions.pod:4762
12352 "This resizes (expands or shrinks) an existing LVM logical volume to "
12353 "C<mbytes>. When reducing, data in the reduced part is lost."
12357 #: ../fish/guestfish-actions.pod:3096
12358 msgid "lvresize-free"
12362 #: ../fish/guestfish-actions.pod:3098
12365 " lvresize-free lv percent\n"
12370 #: ../fish/guestfish-actions.pod:3100 ../src/guestfs-actions.pod:4777
12372 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
12373 "remaining free space in the volume group. Commonly you would call this with "
12374 "pc = 100 which expands the logical volume as much as possible, using all "
12375 "remaining free space in the volume group."
12379 #: ../fish/guestfish-actions.pod:3106
12384 #: ../fish/guestfish-actions.pod:3108
12392 #: ../fish/guestfish-actions.pod:3110 ../src/guestfs-actions.pod:4792
12394 "List all the logical volumes detected. This is the equivalent of the "
12395 "L<lvs(8)> command."
12399 #: ../fish/guestfish-actions.pod:3113 ../src/guestfs-actions.pod:4795
12401 "This returns a list of the logical volume device names "
12402 "(eg. C</dev/VolGroup00/LogVol00>)."
12406 #: ../fish/guestfish-actions.pod:3116
12407 msgid "See also L</lvs-full>, L</list-filesystems>."
12411 #: ../fish/guestfish-actions.pod:3118
12416 #: ../fish/guestfish-actions.pod:3120
12424 #: ../fish/guestfish-actions.pod:3122 ../src/guestfs-actions.pod:4811
12426 "List all the logical volumes detected. This is the equivalent of the "
12427 "L<lvs(8)> command. The \"full\" version includes all fields."
12431 #: ../fish/guestfish-actions.pod:3125
12436 #: ../fish/guestfish-actions.pod:3127
12444 #: ../fish/guestfish-actions.pod:3129 ../src/guestfs-actions.pod:4826
12445 msgid "This command returns the UUID of the LVM LV C<device>."
12449 #: ../fish/guestfish-actions.pod:3131
12454 #: ../fish/guestfish-actions.pod:3133
12457 " lxattrlist path 'names ...'\n"
12462 #: ../fish/guestfish-actions.pod:3135 ../src/guestfs-actions.pod:4840
12464 "This call allows you to get the extended attributes of multiple files, where "
12465 "all files are in the directory C<path>. C<names> is the list of files from "
12470 #: ../fish/guestfish-actions.pod:3139 ../src/guestfs-actions.pod:4844
12472 "On return you get a flat list of xattr structs which must be interpreted "
12473 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
12474 "C<attrval> in this struct is zero-length to indicate there was an error "
12475 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
12476 "number (the number of following attributes for this file, which could be "
12477 "C<\"0\">). Then after the first xattr struct are the zero or more "
12478 "attributes for the first named file. This repeats for the second and "
12479 "subsequent files."
12483 #: ../fish/guestfish-actions.pod:3149
12485 "This call is intended for programs that want to efficiently list a directory "
12486 "contents without making many round-trips. See also L</lstatlist> for a "
12487 "similarly efficient call for getting standard stats. Very long directory "
12488 "listings might cause the protocol message size to be exceeded, causing this "
12489 "call to fail. The caller must split up such requests into smaller groups of "
12494 #: ../fish/guestfish-actions.pod:3157
12495 msgid "mdadm-create"
12499 #: ../fish/guestfish-actions.pod:3159
12502 " mdadm-create name 'devices ...' [missingbitmap:N] [nrdevices:N] [spare:N] "
12503 "[chunk:N] [level:..]\n"
12508 #: ../fish/guestfish-actions.pod:3161 ../src/guestfs-actions.pod:4887
12510 "Create a Linux md (RAID) device named C<name> on the devices in the list "
12515 #: ../fish/guestfish-actions.pod:3168 ../src/guestfs-actions.pod:4894
12516 msgid "C<missingbitmap>"
12520 #: ../fish/guestfish-actions.pod:3170 ../src/guestfs-actions.pod:4896
12522 "A bitmap of missing devices. If a bit is set it means that a missing device "
12523 "is added to the array. The least significant bit corresponds to the first "
12524 "device in the array."
12528 #: ../fish/guestfish-actions.pod:3174 ../src/guestfs-actions.pod:4900
12529 msgid "As examples:"
12533 #: ../fish/guestfish-actions.pod:3176 ../src/guestfs-actions.pod:4902
12535 "If C<devices = [\"/dev/sda\"]> and C<missingbitmap = 0x1> then the resulting "
12536 "array would be C<[E<lt>missingE<gt>, \"/dev/sda\"]>."
12540 #: ../fish/guestfish-actions.pod:3179 ../src/guestfs-actions.pod:4905
12542 "If C<devices = [\"/dev/sda\"]> and C<missingbitmap = 0x2> then the resulting "
12543 "array would be C<[\"/dev/sda\", E<lt>missingE<gt>]>."
12547 #: ../fish/guestfish-actions.pod:3182 ../src/guestfs-actions.pod:4908
12548 msgid "This defaults to C<0> (no missing devices)."
12552 #: ../fish/guestfish-actions.pod:3184 ../src/guestfs-actions.pod:4910
12554 "The length of C<devices> + the number of bits set in C<missingbitmap> must "
12555 "equal C<nrdevices> + C<spare>."
12559 #: ../fish/guestfish-actions.pod:3187 ../src/guestfs-actions.pod:4913
12560 msgid "C<nrdevices>"
12564 #: ../fish/guestfish-actions.pod:3189 ../src/guestfs-actions.pod:4915
12565 msgid "The number of active RAID devices."
12569 #: ../fish/guestfish-actions.pod:3191 ../src/guestfs-actions.pod:4917
12571 "If not set, this defaults to the length of C<devices> plus the number of "
12572 "bits set in C<missingbitmap>."
12576 #: ../fish/guestfish-actions.pod:3194 ../src/guestfs-actions.pod:4920
12581 #: ../fish/guestfish-actions.pod:3196 ../src/guestfs-actions.pod:4922
12582 msgid "The number of spare devices."
12586 #: ../fish/guestfish-actions.pod:3198 ../src/guestfs-actions.pod:4924
12587 msgid "If not set, this defaults to C<0>."
12591 #: ../fish/guestfish-actions.pod:3200 ../src/guestfs-actions.pod:4926
12596 #: ../fish/guestfish-actions.pod:3202 ../src/guestfs-actions.pod:4928
12597 msgid "The chunk size in bytes."
12601 #: ../fish/guestfish-actions.pod:3204 ../fish/guestfish-actions.pod:3226 ../src/guestfs-actions.pod:4930 ../src/guestfs-actions.pod:4978
12606 #: ../fish/guestfish-actions.pod:3206 ../src/guestfs-actions.pod:4932
12608 "The RAID level, which can be one of: I<linear>, I<raid0>, I<0>, I<stripe>, "
12609 "I<raid1>, I<1>, I<mirror>, I<raid4>, I<4>, I<raid5>, I<5>, I<raid6>, I<6>, "
12610 "I<raid10>, I<10>. Some of these are synonymous, and more levels may be "
12615 #: ../fish/guestfish-actions.pod:3211 ../src/guestfs-actions.pod:4937
12616 msgid "If not set, this defaults to C<raid1>."
12620 #: ../fish/guestfish-actions.pod:3217
12621 msgid "mdadm-detail"
12625 #: ../fish/guestfish-actions.pod:3219
12628 " mdadm-detail md\n"
12633 #: ../fish/guestfish-actions.pod:3221 ../src/guestfs-actions.pod:4973
12635 "This command exposes the output of 'mdadm -DY <md>'. The following fields "
12636 "are usually present in the returned hash. Other fields may also be present."
12640 #: ../fish/guestfish-actions.pod:3228 ../src/guestfs-actions.pod:4980
12641 msgid "The raid level of the MD device."
12645 #: ../fish/guestfish-actions.pod:3230 ../src/guestfs-actions.pod:4982
12650 #: ../fish/guestfish-actions.pod:3232 ../src/guestfs-actions.pod:4984
12651 msgid "The number of underlying devices in the MD device."
12655 #: ../fish/guestfish-actions.pod:3234 ../src/guestfs-actions.pod:4986
12656 msgid "C<metadata>"
12660 #: ../fish/guestfish-actions.pod:3236 ../src/guestfs-actions.pod:4988
12661 msgid "The metadata version used."
12665 #: ../fish/guestfish-actions.pod:3238 ../src/guestfs-actions.pod:4990
12670 #: ../fish/guestfish-actions.pod:3240 ../src/guestfs-actions.pod:4992
12671 msgid "The UUID of the MD device."
12675 #: ../fish/guestfish-actions.pod:3244 ../src/guestfs-actions.pod:4996
12676 msgid "The name of the MD device."
12680 #: ../fish/guestfish-actions.pod:3248
12685 #: ../fish/guestfish-actions.pod:3250
12693 #: ../fish/guestfish-actions.pod:3252 ../src/guestfs-actions.pod:5012
12694 msgid "Create a directory named C<path>."
12698 #: ../fish/guestfish-actions.pod:3254
12703 #: ../fish/guestfish-actions.pod:3256
12706 " mkdir-mode path mode\n"
12711 #: ../fish/guestfish-actions.pod:3258 ../src/guestfs-actions.pod:5025
12713 "This command creates a directory, setting the initial permissions of the "
12714 "directory to C<mode>."
12718 #: ../fish/guestfish-actions.pod:3261 ../src/guestfs-actions.pod:5028
12720 "For common Linux filesystems, the actual mode which is set will be C<mode & "
12721 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
12726 #: ../fish/guestfish-actions.pod:3265
12727 msgid "See also L</mkdir>, L</umask>"
12731 #: ../fish/guestfish-actions.pod:3267
12736 #: ../fish/guestfish-actions.pod:3269
12744 #: ../fish/guestfish-actions.pod:3271 ../src/guestfs-actions.pod:5044
12746 "Create a directory named C<path>, creating any parent directories as "
12747 "necessary. This is like the C<mkdir -p> shell command."
12751 #: ../fish/guestfish-actions.pod:3274
12756 #: ../fish/guestfish-actions.pod:3276
12759 " mkdtemp template\n"
12764 #: ../fish/guestfish-actions.pod:3278 ../src/guestfs-actions.pod:5057
12766 "This command creates a temporary directory. The C<template> parameter "
12767 "should be a full pathname for the temporary directory name with the final "
12768 "six characters being \"XXXXXX\"."
12772 #: ../fish/guestfish-actions.pod:3283 ../src/guestfs-actions.pod:5062
12774 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
12775 "being suitable for Windows filesystems."
12779 #: ../fish/guestfish-actions.pod:3286 ../src/guestfs-actions.pod:5065
12780 msgid "The name of the temporary directory that was created is returned."
12784 #: ../fish/guestfish-actions.pod:3289 ../src/guestfs-actions.pod:5068
12785 msgid "The temporary directory is created with mode 0700 and is owned by root."
12789 #: ../fish/guestfish-actions.pod:3292 ../src/guestfs-actions.pod:5071
12791 "The caller is responsible for deleting the temporary directory and its "
12792 "contents after use."
12796 #: ../fish/guestfish-actions.pod:3295 ../src/guestfs-actions.pod:5074
12797 msgid "See also: L<mkdtemp(3)>"
12801 #: ../fish/guestfish-actions.pod:3297
12806 #: ../fish/guestfish-actions.pod:3299
12809 " mke2fs-J fstype blocksize device journal\n"
12814 #: ../fish/guestfish-actions.pod:3301 ../src/guestfs-actions.pod:5090
12816 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12817 "C<journal>. It is equivalent to the command:"
12821 #: ../fish/guestfish-actions.pod:3305 ../src/guestfs-actions.pod:5094
12824 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
12829 #: ../fish/guestfish-actions.pod:3307
12830 msgid "See also L</mke2journal>."
12834 #: ../fish/guestfish-actions.pod:3309
12839 #: ../fish/guestfish-actions.pod:3311
12842 " mke2fs-JL fstype blocksize device label\n"
12847 #: ../fish/guestfish-actions.pod:3313 ../src/guestfs-actions.pod:5111
12849 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12850 "the journal labeled C<label>."
12854 #: ../fish/guestfish-actions.pod:3316
12855 msgid "See also L</mke2journal-L>."
12859 #: ../fish/guestfish-actions.pod:3318
12864 #: ../fish/guestfish-actions.pod:3320
12867 " mke2fs-JU fstype blocksize device uuid\n"
12872 #: ../fish/guestfish-actions.pod:3322 ../src/guestfs-actions.pod:5129
12874 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12875 "the journal with UUID C<uuid>."
12879 #: ../fish/guestfish-actions.pod:3325
12880 msgid "See also L</mke2journal-U>."
12884 #: ../fish/guestfish-actions.pod:3327
12885 msgid "mke2journal"
12889 #: ../fish/guestfish-actions.pod:3329
12892 " mke2journal blocksize device\n"
12897 #: ../fish/guestfish-actions.pod:3331 ../src/guestfs-actions.pod:5145
12899 "This creates an ext2 external journal on C<device>. It is equivalent to the "
12904 #: ../fish/guestfish-actions.pod:3334 ../src/guestfs-actions.pod:5148
12907 " mke2fs -O journal_dev -b blocksize device\n"
12912 #: ../fish/guestfish-actions.pod:3336
12913 msgid "mke2journal-L"
12917 #: ../fish/guestfish-actions.pod:3338
12920 " mke2journal-L blocksize label device\n"
12925 #: ../fish/guestfish-actions.pod:3340 ../src/guestfs-actions.pod:5162
12926 msgid "This creates an ext2 external journal on C<device> with label C<label>."
12930 #: ../fish/guestfish-actions.pod:3342
12931 msgid "mke2journal-U"
12935 #: ../fish/guestfish-actions.pod:3344
12938 " mke2journal-U blocksize uuid device\n"
12943 #: ../fish/guestfish-actions.pod:3346 ../src/guestfs-actions.pod:5176
12944 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
12948 #: ../fish/guestfish-actions.pod:3348
12953 #: ../fish/guestfish-actions.pod:3350
12956 " mkfifo mode path\n"
12961 #: ../fish/guestfish-actions.pod:3352
12963 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
12964 "is just a convenient wrapper around L</mknod>."
12968 #: ../fish/guestfish-actions.pod:3358
12973 #: ../fish/guestfish-actions.pod:3360
12976 " mkfs fstype device\n"
12981 #: ../fish/guestfish-actions.pod:3362 ../src/guestfs-actions.pod:5206
12983 "This creates a filesystem on C<device> (usually a partition or LVM logical "
12984 "volume). The filesystem type is C<fstype>, for example C<ext3>."
12988 #: ../fish/guestfish-actions.pod:3366
12993 #: ../fish/guestfish-actions.pod:3368
12996 " mkfs-b fstype blocksize device\n"
13001 #: ../fish/guestfish-actions.pod:3370
13003 "This call is similar to L</mkfs>, but it allows you to control the block "
13004 "size of the resulting filesystem. Supported block sizes depend on the "
13005 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
13009 #: ../fish/guestfish-actions.pod:3375 ../fish/guestfish-actions.pod:3402 ../src/guestfs-actions.pod:5234 ../src/guestfs-actions.pod:5272
13011 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
13016 #: ../fish/guestfish-actions.pod:3378
13018 "I<This function is deprecated.> In new code, use the L</mkfs_opts> call "
13023 #: ../fish/guestfish-actions.pod:3385
13028 #: ../fish/guestfish-actions.pod:3387
13031 " mkfs-opts fstype device [blocksize:N] [features:..] [inode:N] "
13037 #: ../fish/guestfish-actions.pod:3389 ../src/guestfs-actions.pod:5259
13039 "This function creates a filesystem on C<device>. The filesystem type is "
13040 "C<fstype>, for example C<ext3>."
13044 #: ../fish/guestfish-actions.pod:3396 ../src/guestfs-actions.pod:5266
13045 msgid "C<blocksize>"
13049 #: ../fish/guestfish-actions.pod:3398 ../src/guestfs-actions.pod:5268
13051 "The filesystem block size. Supported block sizes depend on the filesystem "
13052 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
13057 #: ../fish/guestfish-actions.pod:3405 ../src/guestfs-actions.pod:5275
13058 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
13062 #: ../fish/guestfish-actions.pod:3407 ../src/guestfs-actions.pod:5277
13063 msgid "C<features>"
13067 #: ../fish/guestfish-actions.pod:3409 ../src/guestfs-actions.pod:5279
13068 msgid "This passes the I<-O> parameter to the external mkfs program."
13072 #: ../fish/guestfish-actions.pod:3411 ../src/guestfs-actions.pod:5281
13074 "For certain filesystem types, this allows extra filesystem features to be "
13075 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
13079 #: ../fish/guestfish-actions.pod:3415 ../src/guestfs-actions.pod:5285
13081 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
13086 #: ../fish/guestfish-actions.pod:3418 ../src/guestfs-actions.pod:5288
13091 #: ../fish/guestfish-actions.pod:3420 ../src/guestfs-actions.pod:5290
13093 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
13094 "sets the inode size (only for ext2/3/4 filesystems at present)."
13098 #: ../fish/guestfish-actions.pod:3423 ../src/guestfs-actions.pod:5293
13099 msgid "C<sectorsize>"
13103 #: ../fish/guestfish-actions.pod:3425 ../src/guestfs-actions.pod:5295
13105 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
13106 "sets sector size for ufs filesystem."
13110 #: ../fish/guestfish-actions.pod:3432
13111 msgid "mkmountpoint"
13115 #: ../fish/guestfish-actions.pod:3434
13118 " mkmountpoint exemptpath\n"
13123 #: ../fish/guestfish-actions.pod:3436
13125 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
13126 "to create extra mountpoints before mounting the first filesystem."
13130 #: ../fish/guestfish-actions.pod:3440 ../src/guestfs-actions.pod:5338
13132 "These calls are I<only> necessary in some very limited circumstances, mainly "
13133 "the case where you want to mount a mix of unrelated and/or read-only "
13134 "filesystems together."
13138 #: ../fish/guestfish-actions.pod:3444 ../src/guestfs-actions.pod:5342
13140 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
13141 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
13142 "inside that. You can unpack this as follows in guestfish:"
13146 #: ../fish/guestfish-actions.pod:3449 ../src/guestfs-actions.pod:5347
13149 " add-ro Fedora-11-i686-Live.iso\n"
13151 " mkmountpoint /cd\n"
13152 " mkmountpoint /sqsh\n"
13153 " mkmountpoint /ext3fs\n"
13154 " mount /dev/sda /cd\n"
13155 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
13156 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
13161 #: ../fish/guestfish-actions.pod:3458 ../src/guestfs-actions.pod:5356
13162 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
13166 #: ../fish/guestfish-actions.pod:3460
13168 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
13169 "unexpected errors if you try to mix these calls. It is safest to manually "
13170 "unmount filesystems and remove mountpoints after use."
13174 #: ../fish/guestfish-actions.pod:3464
13176 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
13177 "for this to work for manual mountpoints, you must ensure that the innermost "
13178 "mountpoints have the longest pathnames, as in the example code above."
13182 #: ../fish/guestfish-actions.pod:3469 ../src/guestfs-actions.pod:5367
13183 msgid "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
13187 #: ../fish/guestfish-actions.pod:3471
13189 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
13190 "L</umount-all> to be called when the handle is closed which can also trigger "
13195 #: ../fish/guestfish-actions.pod:3475
13200 #: ../fish/guestfish-actions.pod:3477
13203 " mknod mode devmajor devminor path\n"
13208 #: ../fish/guestfish-actions.pod:3479 ../src/guestfs-actions.pod:5386
13210 "This call creates block or character special devices, or named pipes "
13215 #: ../fish/guestfish-actions.pod:3482 ../src/guestfs-actions.pod:5389
13217 "The C<mode> parameter should be the mode, using the standard constants. "
13218 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
13219 "used when creating block and character special devices."
13223 #: ../fish/guestfish-actions.pod:3487
13225 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
13226 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
13227 "regular file). These constants are available in the standard Linux header "
13228 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
13229 "wrappers around this command which bitwise OR in the appropriate constant "
13234 #: ../fish/guestfish-actions.pod:3497
13239 #: ../fish/guestfish-actions.pod:3499
13242 " mknod-b mode devmajor devminor path\n"
13247 #: ../fish/guestfish-actions.pod:3501
13249 "This call creates a block device node called C<path> with mode C<mode> and "
13250 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13251 "wrapper around L</mknod>."
13255 #: ../fish/guestfish-actions.pod:3507
13260 #: ../fish/guestfish-actions.pod:3509
13263 " mknod-c mode devmajor devminor path\n"
13268 #: ../fish/guestfish-actions.pod:3511
13270 "This call creates a char device node called C<path> with mode C<mode> and "
13271 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13272 "wrapper around L</mknod>."
13276 #: ../fish/guestfish-actions.pod:3517
13281 #: ../fish/guestfish-actions.pod:3519
13289 #: ../fish/guestfish-actions.pod:3521 ../src/guestfs-actions.pod:5452
13290 msgid "Create a swap partition on C<device>."
13294 #: ../fish/guestfish-actions.pod:3523
13299 #: ../fish/guestfish-actions.pod:3525
13302 " mkswap-L label device\n"
13307 #: ../fish/guestfish-actions.pod:3527 ../src/guestfs-actions.pod:5465
13308 msgid "Create a swap partition on C<device> with label C<label>."
13312 #: ../fish/guestfish-actions.pod:3529 ../src/guestfs-actions.pod:5467
13314 "Note that you cannot attach a swap label to a block device "
13315 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
13316 "the kernel or swap tools."
13320 #: ../fish/guestfish-actions.pod:3533
13325 #: ../fish/guestfish-actions.pod:3535
13328 " mkswap-U uuid device\n"
13333 #: ../fish/guestfish-actions.pod:3537 ../src/guestfs-actions.pod:5482
13334 msgid "Create a swap partition on C<device> with UUID C<uuid>."
13338 #: ../fish/guestfish-actions.pod:3539
13339 msgid "mkswap-file"
13343 #: ../fish/guestfish-actions.pod:3541
13346 " mkswap-file path\n"
13351 #: ../fish/guestfish-actions.pod:3543 ../src/guestfs-actions.pod:5494
13352 msgid "Create a swap file."
13356 #: ../fish/guestfish-actions.pod:3545
13358 "This command just writes a swap file signature to an existing file. To "
13359 "create the file itself, use something like L</fallocate>."
13363 #: ../fish/guestfish-actions.pod:3548
13368 #: ../fish/guestfish-actions.pod:3550
13371 " modprobe modulename\n"
13376 #: ../fish/guestfish-actions.pod:3552 ../src/guestfs-actions.pod:5509
13377 msgid "This loads a kernel module in the appliance."
13381 #: ../fish/guestfish-actions.pod:3554 ../src/guestfs-actions.pod:5511
13383 "The kernel module must have been whitelisted when libguestfs was built (see "
13384 "C<appliance/kmod.whitelist.in> in the source)."
13388 #: ../fish/guestfish-actions.pod:3557
13393 #: ../fish/guestfish-actions.pod:3559
13396 " mount device mountpoint\n"
13401 #: ../fish/guestfish-actions.pod:3561 ../src/guestfs-actions.pod:5525
13403 "Mount a guest disk at a position in the filesystem. Block devices are named "
13404 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
13405 "those block devices contain partitions, they will have the usual names "
13406 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
13410 #: ../fish/guestfish-actions.pod:3567 ../src/guestfs-actions.pod:5531
13412 "The rules are the same as for L<mount(2)>: A filesystem must first be "
13413 "mounted on C</> before others can be mounted. Other filesystems can only be "
13414 "mounted on directories which already exist."
13418 #: ../fish/guestfish-actions.pod:3572 ../src/guestfs-actions.pod:5536
13420 "The mounted filesystem is writable, if we have sufficient permissions on the "
13421 "underlying device."
13425 #: ../fish/guestfish-actions.pod:3575
13427 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
13428 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
13429 "problems for users. If your program might need to work with older versions "
13430 "of libguestfs, use L</mount-options> instead (using an empty string for the "
13431 "first parameter if you don't want any options)."
13435 #: ../fish/guestfish-actions.pod:3582
13440 #: ../fish/guestfish-actions.pod:3584
13443 " mount-9p mounttag mountpoint [options:..]\n"
13448 #: ../fish/guestfish-actions.pod:3586 ../src/guestfs-actions.pod:5565
13450 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
13455 #: ../fish/guestfish-actions.pod:3589 ../src/guestfs-actions.pod:5568
13457 "If required, C<trans=virtio> will be automatically added to the options. "
13458 "Any other options required can be passed in the optional C<options> "
13463 #: ../fish/guestfish-actions.pod:3595
13468 #: ../fish/guestfish-actions.pod:3597
13471 " mount-loop file mountpoint\n"
13476 #: ../fish/guestfish-actions.pod:3599 ../src/guestfs-actions.pod:5607
13478 "This command lets you mount C<file> (a filesystem image in a file) on a "
13479 "mount point. It is entirely equivalent to the command C<mount -o loop file "
13484 #: ../fish/guestfish-actions.pod:3603
13485 msgid "mount-options"
13489 #: ../fish/guestfish-actions.pod:3605
13492 " mount-options options device mountpoint\n"
13497 #: ../fish/guestfish-actions.pod:3607
13499 "This is the same as the L</mount> command, but it allows you to set the "
13500 "mount options as for the L<mount(8)> I<-o> flag."
13504 #: ../fish/guestfish-actions.pod:3611 ../src/guestfs-actions.pod:5627
13506 "If the C<options> parameter is an empty string, then no options are passed "
13507 "(all options default to whatever the filesystem uses)."
13511 #: ../fish/guestfish-actions.pod:3615
13516 #: ../fish/guestfish-actions.pod:3617
13519 " mount-ro device mountpoint\n"
13524 #: ../fish/guestfish-actions.pod:3619
13526 "This is the same as the L</mount> command, but it mounts the filesystem with "
13527 "the read-only (I<-o ro>) flag."
13531 #: ../fish/guestfish-actions.pod:3622
13536 #: ../fish/guestfish-actions.pod:3624
13539 " mount-vfs options vfstype device mountpoint\n"
13544 #: ../fish/guestfish-actions.pod:3626
13546 "This is the same as the L</mount> command, but it allows you to set both the "
13547 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
13551 #: ../fish/guestfish-actions.pod:3630
13552 msgid "mountpoints"
13556 #: ../fish/guestfish-actions.pod:3632
13564 #: ../fish/guestfish-actions.pod:3634
13566 "This call is similar to L</mounts>. That call returns a list of devices. "
13567 "This one returns a hash table (map) of device name to directory where the "
13568 "device is mounted."
13572 #: ../fish/guestfish-actions.pod:3638
13577 #: ../fish/guestfish-actions.pod:3640
13585 #: ../fish/guestfish-actions.pod:3642 ../src/guestfs-actions.pod:5688
13587 "This returns the list of currently mounted filesystems. It returns the list "
13588 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
13592 #: ../fish/guestfish-actions.pod:3645 ../src/guestfs-actions.pod:5691
13593 msgid "Some internal mounts are not shown."
13597 #: ../fish/guestfish-actions.pod:3647
13598 msgid "See also: L</mountpoints>"
13602 #: ../fish/guestfish-actions.pod:3649
13607 #: ../fish/guestfish-actions.pod:3651
13615 #: ../fish/guestfish-actions.pod:3653 ../src/guestfs-actions.pod:5708
13617 "This moves a file from C<src> to C<dest> where C<dest> is either a "
13618 "destination filename or destination directory."
13622 #: ../fish/guestfish-actions.pod:3656
13623 msgid "ntfs-3g-probe"
13627 #: ../fish/guestfish-actions.pod:3658
13630 " ntfs-3g-probe true|false device\n"
13635 #: ../fish/guestfish-actions.pod:3660 ../src/guestfs-actions.pod:5722
13637 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
13638 "C<device> for mountability. (Not all NTFS volumes can be mounted "
13639 "read-write, and some cannot be mounted at all)."
13643 #: ../fish/guestfish-actions.pod:3664 ../src/guestfs-actions.pod:5726
13645 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
13646 "can be mounted read-write. Set it to false if you want to test if the "
13647 "volume can be mounted read-only."
13651 #: ../fish/guestfish-actions.pod:3668 ../src/guestfs-actions.pod:5730
13653 "The return value is an integer which C<0> if the operation would succeed, or "
13654 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
13658 #: ../fish/guestfish-actions.pod:3672
13663 #: ../fish/guestfish-actions.pod:3674
13666 " ntfsresize device\n"
13671 #: ../fish/guestfish-actions.pod:3676 ../fish/guestfish-actions.pod:3700 ../src/guestfs-actions.pod:5751 ../src/guestfs-actions.pod:5783
13673 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
13674 "size of the underlying device."
13678 #: ../fish/guestfish-actions.pod:3679 ../src/guestfs-actions.pod:5754
13680 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
13681 "consistency check (for safety). You have to boot into Windows to perform "
13682 "this check and clear this condition. Furthermore, ntfsresize refuses to "
13683 "resize filesystems which have been marked in this way. So in effect it is "
13684 "not possible to call ntfsresize multiple times on a single filesystem "
13685 "without booting into Windows between each resize."
13689 #: ../fish/guestfish-actions.pod:3687 ../fish/guestfish-actions.pod:3726 ../src/guestfs-actions.pod:5762 ../src/guestfs-actions.pod:5809
13690 msgid "See also L<ntfsresize(8)>."
13694 #: ../fish/guestfish-actions.pod:3689 ../fish/guestfish-actions.pod:3737
13696 "I<This function is deprecated.> In new code, use the L</ntfsresize_opts> "
13701 #: ../fish/guestfish-actions.pod:3696
13702 msgid "ntfsresize-opts"
13706 #: ../fish/guestfish-actions.pod:3698
13709 " ntfsresize-opts device [size:N] [force:true|false]\n"
13714 #: ../fish/guestfish-actions.pod:3709 ../src/guestfs-actions.pod:5792
13716 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
13717 "resized to fit the container (eg. partition)."
13721 #: ../fish/guestfish-actions.pod:3712 ../fish/guestfish-actions.pod:5033 ../src/guestfs-actions.pod:5795 ../src/guestfs-actions.pod:7766
13726 #: ../fish/guestfish-actions.pod:3714 ../src/guestfs-actions.pod:5797
13728 "If this option is true, then force the resize of the filesystem even if the "
13729 "filesystem is marked as requiring a consistency check."
13733 #: ../fish/guestfish-actions.pod:3717
13735 "After the resize operation, the filesystem is always marked as requiring a "
13736 "consistency check (for safety). You have to boot into Windows to perform "
13737 "this check and clear this condition. If you I<don't> set the C<force> "
13738 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
13739 "a single filesystem without booting into Windows between each resize."
13743 #: ../fish/guestfish-actions.pod:3730
13744 msgid "ntfsresize-size"
13748 #: ../fish/guestfish-actions.pod:3732
13751 " ntfsresize-size device size\n"
13756 #: ../fish/guestfish-actions.pod:3734
13758 "This command is the same as L</ntfsresize> except that it allows you to "
13759 "specify the new size (in bytes) explicitly."
13763 #: ../fish/guestfish-actions.pod:3744
13768 #: ../fish/guestfish-actions.pod:3746
13771 " part-add device prlogex startsect endsect\n"
13776 #: ../fish/guestfish-actions.pod:3748
13778 "This command adds a partition to C<device>. If there is no partition table "
13779 "on the device, call L</part-init> first."
13783 #: ../fish/guestfish-actions.pod:3751 ../src/guestfs-actions.pod:5870
13785 "The C<prlogex> parameter is the type of partition. Normally you should pass "
13786 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
13787 "C<logical>) and C<e> (or C<extended>) partition types."
13791 #: ../fish/guestfish-actions.pod:3756 ../src/guestfs-actions.pod:5875
13793 "C<startsect> and C<endsect> are the start and end of the partition in "
13794 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
13795 "from the end of the disk (C<-1> is the last sector)."
13799 #: ../fish/guestfish-actions.pod:3760
13801 "Creating a partition which covers the whole disk is not so easy. Use "
13802 "L</part-disk> to do that."
13806 #: ../fish/guestfish-actions.pod:3763
13811 #: ../fish/guestfish-actions.pod:3765
13814 " part-del device partnum\n"
13819 #: ../fish/guestfish-actions.pod:3767 ../src/guestfs-actions.pod:5893
13820 msgid "This command deletes the partition numbered C<partnum> on C<device>."
13824 #: ../fish/guestfish-actions.pod:3769 ../src/guestfs-actions.pod:5895
13826 "Note that in the case of MBR partitioning, deleting an extended partition "
13827 "also deletes any logical partitions it contains."
13831 #: ../fish/guestfish-actions.pod:3773
13836 #: ../fish/guestfish-actions.pod:3775
13839 " part-disk device parttype\n"
13844 #: ../fish/guestfish-actions.pod:3777
13846 "This command is simply a combination of L</part-init> followed by "
13847 "L</part-add> to create a single primary partition covering the whole disk."
13851 #: ../fish/guestfish-actions.pod:3781
13853 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
13854 "possible values are described in L</part-init>."
13858 #: ../fish/guestfish-actions.pod:3784
13859 msgid "part-get-bootable"
13863 #: ../fish/guestfish-actions.pod:3786
13866 " part-get-bootable device partnum\n"
13871 #: ../fish/guestfish-actions.pod:3788 ../src/guestfs-actions.pod:5928
13873 "This command returns true if the partition C<partnum> on C<device> has the "
13874 "bootable flag set."
13878 #: ../fish/guestfish-actions.pod:3791
13879 msgid "See also L</part-set-bootable>."
13883 #: ../fish/guestfish-actions.pod:3793
13884 msgid "part-get-mbr-id"
13888 #: ../fish/guestfish-actions.pod:3795
13891 " part-get-mbr-id device partnum\n"
13896 #: ../fish/guestfish-actions.pod:3797 ../src/guestfs-actions.pod:5944
13898 "Returns the MBR type byte (also known as the ID byte) from the numbered "
13899 "partition C<partnum>."
13903 #: ../fish/guestfish-actions.pod:3800 ../fish/guestfish-actions.pod:3944
13905 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
13906 "undefined results for other partition table types (see "
13907 "L</part-get-parttype>)."
13911 #: ../fish/guestfish-actions.pod:3804
13912 msgid "part-get-parttype"
13916 #: ../fish/guestfish-actions.pod:3806
13919 " part-get-parttype device\n"
13924 #: ../fish/guestfish-actions.pod:3808 ../src/guestfs-actions.pod:5961
13926 "This command examines the partition table on C<device> and returns the "
13927 "partition table type (format) being used."
13931 #: ../fish/guestfish-actions.pod:3811
13933 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
13934 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
13935 "possible, although unusual. See L</part-init> for a full list."
13939 #: ../fish/guestfish-actions.pod:3816
13944 #: ../fish/guestfish-actions.pod:3818
13947 " part-init device parttype\n"
13952 #: ../fish/guestfish-actions.pod:3820 ../src/guestfs-actions.pod:5981
13954 "This creates an empty partition table on C<device> of one of the partition "
13955 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
13956 "(for large disks)."
13960 #: ../fish/guestfish-actions.pod:3824
13962 "Initially there are no partitions. Following this, you should call "
13963 "L</part-add> for each partition required."
13967 #: ../fish/guestfish-actions.pod:3827 ../src/guestfs-actions.pod:5988
13968 msgid "Possible values for C<parttype> are:"
13972 #: ../fish/guestfish-actions.pod:3831 ../src/guestfs-actions.pod:5992
13977 #: ../fish/guestfish-actions.pod:3833 ../src/guestfs-actions.pod:5994
13982 #: ../fish/guestfish-actions.pod:3835 ../src/guestfs-actions.pod:5996
13983 msgid "Intel EFI / GPT partition table."
13987 #: ../fish/guestfish-actions.pod:3837 ../src/guestfs-actions.pod:5998
13989 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
13990 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
13991 "the C<mbr> format."
13995 #: ../fish/guestfish-actions.pod:3841 ../src/guestfs-actions.pod:6002
14000 #: ../fish/guestfish-actions.pod:3843 ../src/guestfs-actions.pod:6004
14005 #: ../fish/guestfish-actions.pod:3845 ../src/guestfs-actions.pod:6006
14007 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
14008 "Windows. This partition type will B<only> work for device sizes up to 2 "
14009 "TB. For large disks we recommend using C<gpt>."
14013 #: ../fish/guestfish-actions.pod:3852 ../src/guestfs-actions.pod:6013
14014 msgid "Other partition table types that may work but are not supported include:"
14018 #: ../fish/guestfish-actions.pod:3857 ../src/guestfs-actions.pod:6018
14023 #: ../fish/guestfish-actions.pod:3859 ../src/guestfs-actions.pod:6020
14024 msgid "AIX disk labels."
14028 #: ../fish/guestfish-actions.pod:3861 ../src/guestfs-actions.pod:6022
14033 #: ../fish/guestfish-actions.pod:3863 ../src/guestfs-actions.pod:6024
14038 #: ../fish/guestfish-actions.pod:3865 ../src/guestfs-actions.pod:6026
14039 msgid "Amiga \"Rigid Disk Block\" format."
14043 #: ../fish/guestfish-actions.pod:3867 ../src/guestfs-actions.pod:6028
14048 #: ../fish/guestfish-actions.pod:3869 ../src/guestfs-actions.pod:6030
14049 msgid "BSD disk labels."
14053 #: ../fish/guestfish-actions.pod:3871 ../src/guestfs-actions.pod:6032
14058 #: ../fish/guestfish-actions.pod:3873 ../src/guestfs-actions.pod:6034
14059 msgid "DASD, used on IBM mainframes."
14063 #: ../fish/guestfish-actions.pod:3875 ../src/guestfs-actions.pod:6036
14068 #: ../fish/guestfish-actions.pod:3877 ../src/guestfs-actions.pod:6038
14069 msgid "MIPS/SGI volumes."
14073 #: ../fish/guestfish-actions.pod:3879 ../src/guestfs-actions.pod:6040
14078 #: ../fish/guestfish-actions.pod:3881 ../src/guestfs-actions.pod:6042
14079 msgid "Old Mac partition format. Modern Macs use C<gpt>."
14083 #: ../fish/guestfish-actions.pod:3883 ../src/guestfs-actions.pod:6044
14088 #: ../fish/guestfish-actions.pod:3885 ../src/guestfs-actions.pod:6046
14089 msgid "NEC PC-98 format, common in Japan apparently."
14093 #: ../fish/guestfish-actions.pod:3887 ../src/guestfs-actions.pod:6048
14098 #: ../fish/guestfish-actions.pod:3889 ../src/guestfs-actions.pod:6050
14099 msgid "Sun disk labels."
14103 #: ../fish/guestfish-actions.pod:3893
14108 #: ../fish/guestfish-actions.pod:3895
14111 " part-list device\n"
14116 #: ../fish/guestfish-actions.pod:3897 ../src/guestfs-actions.pod:6064
14118 "This command parses the partition table on C<device> and returns the list of "
14119 "partitions found."
14123 #: ../fish/guestfish-actions.pod:3900 ../src/guestfs-actions.pod:6067
14124 msgid "The fields in the returned structure are:"
14128 #: ../fish/guestfish-actions.pod:3904 ../src/guestfs-actions.pod:6071
14129 msgid "B<part_num>"
14133 #: ../fish/guestfish-actions.pod:3906 ../src/guestfs-actions.pod:6073
14134 msgid "Partition number, counting from 1."
14138 #: ../fish/guestfish-actions.pod:3908 ../src/guestfs-actions.pod:6075
14139 msgid "B<part_start>"
14143 #: ../fish/guestfish-actions.pod:3910
14145 "Start of the partition I<in bytes>. To get sectors you have to divide by "
14146 "the device's sector size, see L</blockdev-getss>."
14150 #: ../fish/guestfish-actions.pod:3913 ../src/guestfs-actions.pod:6080
14151 msgid "B<part_end>"
14155 #: ../fish/guestfish-actions.pod:3915 ../src/guestfs-actions.pod:6082
14156 msgid "End of the partition in bytes."
14160 #: ../fish/guestfish-actions.pod:3917 ../src/guestfs-actions.pod:6084
14161 msgid "B<part_size>"
14165 #: ../fish/guestfish-actions.pod:3919 ../src/guestfs-actions.pod:6086
14166 msgid "Size of the partition in bytes."
14170 #: ../fish/guestfish-actions.pod:3923
14171 msgid "part-set-bootable"
14175 #: ../fish/guestfish-actions.pod:3925
14178 " part-set-bootable device partnum true|false\n"
14183 #: ../fish/guestfish-actions.pod:3927 ../src/guestfs-actions.pod:6104
14185 "This sets the bootable flag on partition numbered C<partnum> on device "
14186 "C<device>. Note that partitions are numbered from 1."
14190 #: ../fish/guestfish-actions.pod:3930 ../src/guestfs-actions.pod:6107
14192 "The bootable flag is used by some operating systems (notably Windows) to "
14193 "determine which partition to boot from. It is by no means universally "
14198 #: ../fish/guestfish-actions.pod:3934
14199 msgid "part-set-mbr-id"
14203 #: ../fish/guestfish-actions.pod:3936
14206 " part-set-mbr-id device partnum idbyte\n"
14211 #: ../fish/guestfish-actions.pod:3938 ../src/guestfs-actions.pod:6123
14213 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
14214 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
14215 "documentation are in fact hexadecimal numbers, but usually documented "
14216 "without any leading \"0x\" which might be confusing."
14220 #: ../fish/guestfish-actions.pod:3948
14221 msgid "part-set-name"
14225 #: ../fish/guestfish-actions.pod:3950
14228 " part-set-name device partnum name\n"
14233 #: ../fish/guestfish-actions.pod:3952 ../src/guestfs-actions.pod:6145
14235 "This sets the partition name on partition numbered C<partnum> on device "
14236 "C<device>. Note that partitions are numbered from 1."
14240 #: ../fish/guestfish-actions.pod:3955 ../src/guestfs-actions.pod:6148
14242 "The partition name can only be set on certain types of partition table. "
14243 "This works on C<gpt> but not on C<mbr> partitions."
14247 #: ../fish/guestfish-actions.pod:3958
14248 msgid "part-to-dev"
14252 #: ../fish/guestfish-actions.pod:3960
14255 " part-to-dev partition\n"
14260 #: ../fish/guestfish-actions.pod:3962 ../src/guestfs-actions.pod:6161
14262 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
14263 "partition number, returning the device name (eg. \"/dev/sdb\")."
14267 #: ../fish/guestfish-actions.pod:3966 ../fish/guestfish-actions.pod:3978
14269 "The named partition must exist, for example as a string returned from "
14270 "L</list-partitions>."
14274 #: ../fish/guestfish-actions.pod:3969
14275 msgid "See also L</part-to-partnum>."
14279 #: ../fish/guestfish-actions.pod:3971
14280 msgid "part-to-partnum"
14284 #: ../fish/guestfish-actions.pod:3973
14287 " part-to-partnum partition\n"
14292 #: ../fish/guestfish-actions.pod:3975 ../src/guestfs-actions.pod:6181
14294 "This function takes a partition name (eg. \"/dev/sdb1\") and returns the "
14295 "partition number (eg. C<1>)."
14299 #: ../fish/guestfish-actions.pod:3981
14300 msgid "See also L</part-to-dev>."
14304 #: ../fish/guestfish-actions.pod:3983
14305 msgid "ping-daemon"
14309 #: ../fish/guestfish-actions.pod:3985
14317 #: ../fish/guestfish-actions.pod:3987 ../src/guestfs-actions.pod:6198
14319 "This is a test probe into the guestfs daemon running inside the qemu "
14320 "subprocess. Calling this function checks that the daemon responds to the "
14321 "ping message, without affecting the daemon or attached block device(s) in "
14326 #: ../fish/guestfish-actions.pod:3992
14331 #: ../fish/guestfish-actions.pod:3994
14334 " pread path count offset\n"
14339 #: ../fish/guestfish-actions.pod:3996 ../src/guestfs-actions.pod:6216
14341 "This command lets you read part of a file. It reads C<count> bytes of the "
14342 "file, starting at C<offset>, from file C<path>."
14346 #: ../fish/guestfish-actions.pod:3999 ../fish/guestfish-actions.pod:4014 ../src/guestfs-actions.pod:6219 ../src/guestfs-actions.pod:6245
14348 "This may read fewer bytes than requested. For further details see the "
14349 "L<pread(2)> system call."
14353 #: ../fish/guestfish-actions.pod:4002
14354 msgid "See also L</pwrite>, L</pread-device>."
14358 #: ../fish/guestfish-actions.pod:4007
14359 msgid "pread-device"
14363 #: ../fish/guestfish-actions.pod:4009
14366 " pread-device device count offset\n"
14371 #: ../fish/guestfish-actions.pod:4011 ../src/guestfs-actions.pod:6242
14373 "This command lets you read part of a file. It reads C<count> bytes of "
14374 "C<device>, starting at C<offset>."
14378 #: ../fish/guestfish-actions.pod:4017
14379 msgid "See also L</pread>."
14383 #: ../fish/guestfish-actions.pod:4022
14388 #: ../fish/guestfish-actions.pod:4024
14391 " pvcreate device\n"
14396 #: ../fish/guestfish-actions.pod:4026 ../src/guestfs-actions.pod:6265
14398 "This creates an LVM physical volume on the named C<device>, where C<device> "
14399 "should usually be a partition name such as C</dev/sda1>."
14403 #: ../fish/guestfish-actions.pod:4030
14408 #: ../fish/guestfish-actions.pod:4032
14411 " pvremove device\n"
14416 #: ../fish/guestfish-actions.pod:4034 ../src/guestfs-actions.pod:6279
14418 "This wipes a physical volume C<device> so that LVM will no longer recognise "
14423 #: ../fish/guestfish-actions.pod:4037 ../src/guestfs-actions.pod:6282
14425 "The implementation uses the C<pvremove> command which refuses to wipe "
14426 "physical volumes that contain any volume groups, so you have to remove those "
14431 #: ../fish/guestfish-actions.pod:4041
14436 #: ../fish/guestfish-actions.pod:4043
14439 " pvresize device\n"
14444 #: ../fish/guestfish-actions.pod:4045 ../src/guestfs-actions.pod:6296
14446 "This resizes (expands or shrinks) an existing LVM physical volume to match "
14447 "the new size of the underlying device."
14451 #: ../fish/guestfish-actions.pod:4048
14452 msgid "pvresize-size"
14456 #: ../fish/guestfish-actions.pod:4050
14459 " pvresize-size device size\n"
14464 #: ../fish/guestfish-actions.pod:4052
14466 "This command is the same as L</pvresize> except that it allows you to "
14467 "specify the new size (in bytes) explicitly."
14471 #: ../fish/guestfish-actions.pod:4055
14476 #: ../fish/guestfish-actions.pod:4057
14484 #: ../fish/guestfish-actions.pod:4059 ../src/guestfs-actions.pod:6322
14486 "List all the physical volumes detected. This is the equivalent of the "
14487 "L<pvs(8)> command."
14491 #: ../fish/guestfish-actions.pod:4062 ../src/guestfs-actions.pod:6325
14493 "This returns a list of just the device names that contain PVs "
14494 "(eg. C</dev/sda2>)."
14498 #: ../fish/guestfish-actions.pod:4065
14499 msgid "See also L</pvs-full>."
14503 #: ../fish/guestfish-actions.pod:4067
14508 #: ../fish/guestfish-actions.pod:4069
14516 #: ../fish/guestfish-actions.pod:4071 ../src/guestfs-actions.pod:6341
14518 "List all the physical volumes detected. This is the equivalent of the "
14519 "L<pvs(8)> command. The \"full\" version includes all fields."
14523 #: ../fish/guestfish-actions.pod:4074
14528 #: ../fish/guestfish-actions.pod:4076
14536 #: ../fish/guestfish-actions.pod:4078 ../src/guestfs-actions.pod:6356
14537 msgid "This command returns the UUID of the LVM PV C<device>."
14541 #: ../fish/guestfish-actions.pod:4080
14546 #: ../fish/guestfish-actions.pod:4082
14549 " pwrite path content offset\n"
14554 #: ../fish/guestfish-actions.pod:4084 ../src/guestfs-actions.pod:6372
14556 "This command writes to part of a file. It writes the data buffer C<content> "
14557 "to the file C<path> starting at offset C<offset>."
14561 #: ../fish/guestfish-actions.pod:4087 ../src/guestfs-actions.pod:6375
14563 "This command implements the L<pwrite(2)> system call, and like that system "
14564 "call it may not write the full data requested. The return value is the "
14565 "number of bytes that were actually written to the file. This could even be "
14566 "0, although short writes are unlikely for regular files in ordinary "
14571 #: ../fish/guestfish-actions.pod:4093
14572 msgid "See also L</pread>, L</pwrite-device>."
14576 #: ../fish/guestfish-actions.pod:4098
14577 msgid "pwrite-device"
14581 #: ../fish/guestfish-actions.pod:4100
14584 " pwrite-device device content offset\n"
14589 #: ../fish/guestfish-actions.pod:4102 ../src/guestfs-actions.pod:6399
14591 "This command writes to part of a device. It writes the data buffer "
14592 "C<content> to C<device> starting at offset C<offset>."
14596 #: ../fish/guestfish-actions.pod:4105 ../src/guestfs-actions.pod:6402
14598 "This command implements the L<pwrite(2)> system call, and like that system "
14599 "call it may not write the full data requested (although short writes to disk "
14600 "devices and partitions are probably impossible with standard Linux kernels)."
14604 #: ../fish/guestfish-actions.pod:4110
14605 msgid "See also L</pwrite>."
14609 #: ../fish/guestfish-actions.pod:4115
14614 #: ../fish/guestfish-actions.pod:4117
14617 " read-file path\n"
14622 #: ../fish/guestfish-actions.pod:4119 ../src/guestfs-actions.pod:6423
14623 msgid "This calls returns the contents of the file C<path> as a buffer."
14627 #: ../fish/guestfish-actions.pod:4122
14629 "Unlike L</cat>, this function can correctly handle files that contain "
14630 "embedded ASCII NUL characters. However unlike L</download>, this function "
14631 "is limited in the total size of file that can be handled."
14635 #: ../fish/guestfish-actions.pod:4130
14640 #: ../fish/guestfish-actions.pod:4132
14643 " read-lines path\n"
14648 #: ../fish/guestfish-actions.pod:4136 ../src/guestfs-actions.pod:6448
14650 "The file contents are returned as a list of lines. Trailing C<LF> and "
14651 "C<CRLF> character sequences are I<not> returned."
14655 #: ../fish/guestfish-actions.pod:4139
14657 "Note that this function cannot correctly handle binary files (specifically, "
14658 "files containing C<\\0> character which is treated as end of line). For "
14659 "those you need to use the L</read-file> function which has a more complex "
14664 #: ../fish/guestfish-actions.pod:4144
14669 #: ../fish/guestfish-actions.pod:4146
14677 #: ../fish/guestfish-actions.pod:4148 ../src/guestfs-actions.pod:6468
14678 msgid "This returns the list of directory entries in directory C<dir>."
14682 #: ../fish/guestfish-actions.pod:4150 ../src/guestfs-actions.pod:6470
14684 "All entries in the directory are returned, including C<.> and C<..>. The "
14685 "entries are I<not> sorted, but returned in the same order as the underlying "
14690 #: ../fish/guestfish-actions.pod:4154 ../src/guestfs-actions.pod:6474
14692 "Also this call returns basic file type information about each file. The "
14693 "C<ftyp> field will contain one of the following characters:"
14697 #: ../fish/guestfish-actions.pod:4159 ../src/guestfs-actions.pod:6479
14702 #: ../fish/guestfish-actions.pod:4161 ../src/guestfs-actions.pod:6481
14703 msgid "Block special"
14707 #: ../fish/guestfish-actions.pod:4163 ../src/guestfs-actions.pod:6483
14712 #: ../fish/guestfish-actions.pod:4165 ../src/guestfs-actions.pod:6485
14713 msgid "Char special"
14717 #: ../fish/guestfish-actions.pod:4167 ../src/guestfs-actions.pod:6487
14722 #: ../fish/guestfish-actions.pod:4169 ../src/guestfs-actions.pod:6489
14727 #: ../fish/guestfish-actions.pod:4171 ../src/guestfs-actions.pod:6491
14732 #: ../fish/guestfish-actions.pod:4173 ../src/guestfs-actions.pod:6493
14733 msgid "FIFO (named pipe)"
14737 #: ../fish/guestfish-actions.pod:4175 ../src/guestfs-actions.pod:6495
14742 #: ../fish/guestfish-actions.pod:4177 ../src/guestfs-actions.pod:6497
14743 msgid "Symbolic link"
14747 #: ../fish/guestfish-actions.pod:4179 ../src/guestfs-actions.pod:6499
14752 #: ../fish/guestfish-actions.pod:4181 ../src/guestfs-actions.pod:6501
14753 msgid "Regular file"
14757 #: ../fish/guestfish-actions.pod:4183 ../src/guestfs-actions.pod:6503
14762 #: ../fish/guestfish-actions.pod:4185 ../src/guestfs-actions.pod:6505
14767 #: ../fish/guestfish-actions.pod:4187 ../src/guestfs-actions.pod:6507
14772 #: ../fish/guestfish-actions.pod:4189 ../src/guestfs-actions.pod:6509
14773 msgid "Unknown file type"
14777 #: ../fish/guestfish-actions.pod:4191 ../src/guestfs-actions.pod:6511
14782 #: ../fish/guestfish-actions.pod:4193 ../src/guestfs-actions.pod:6513
14783 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
14787 #: ../fish/guestfish-actions.pod:4198
14789 "This function is primarily intended for use by programs. To get a simple "
14790 "list of names, use L</ls>. To get a printable directory for human "
14791 "consumption, use L</ll>."
14795 #: ../fish/guestfish-actions.pod:4202
14800 #: ../fish/guestfish-actions.pod:4204
14808 #: ../fish/guestfish-actions.pod:4206 ../src/guestfs-actions.pod:6534
14809 msgid "This command reads the target of a symbolic link."
14813 #: ../fish/guestfish-actions.pod:4208
14814 msgid "readlinklist"
14818 #: ../fish/guestfish-actions.pod:4210
14821 " readlinklist path 'names ...'\n"
14826 #: ../fish/guestfish-actions.pod:4212 ../src/guestfs-actions.pod:6548
14828 "This call allows you to do a C<readlink> operation on multiple files, where "
14829 "all files are in the directory C<path>. C<names> is the list of files from "
14834 #: ../fish/guestfish-actions.pod:4216 ../src/guestfs-actions.pod:6552
14836 "On return you get a list of strings, with a one-to-one correspondence to the "
14837 "C<names> list. Each string is the value of the symbolic link."
14841 #: ../fish/guestfish-actions.pod:4220 ../src/guestfs-actions.pod:6556
14843 "If the C<readlink(2)> operation fails on any name, then the corresponding "
14844 "result string is the empty string C<\"\">. However the whole operation is "
14845 "completed even if there were C<readlink(2)> errors, and so you can call this "
14846 "function with names where you don't know if they are symbolic links already "
14847 "(albeit slightly less efficient)."
14851 #: ../fish/guestfish-actions.pod:4227 ../src/guestfs-actions.pod:6563
14853 "This call is intended for programs that want to efficiently list a directory "
14854 "contents without making many round-trips. Very long directory listings "
14855 "might cause the protocol message size to be exceeded, causing this call to "
14856 "fail. The caller must split up such requests into smaller groups of names."
14860 #: ../fish/guestfish-actions.pod:4234
14865 #: ../fish/guestfish-actions.pod:4236
14873 #: ../fish/guestfish-actions.pod:4238 ../src/guestfs-actions.pod:6582
14875 "Return the canonicalized absolute pathname of C<path>. The returned path "
14876 "has no C<.>, C<..> or symbolic link path elements."
14880 #: ../fish/guestfish-actions.pod:4241
14881 msgid "removexattr"
14885 #: ../fish/guestfish-actions.pod:4243
14888 " removexattr xattr path\n"
14893 #: ../fish/guestfish-actions.pod:4245 ../src/guestfs-actions.pod:6597
14894 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
14898 #: ../fish/guestfish-actions.pod:4248
14899 msgid "See also: L</lremovexattr>, L<attr(5)>."
14903 #: ../fish/guestfish-actions.pod:4250
14908 #: ../fish/guestfish-actions.pod:4252
14911 " resize2fs device\n"
14916 #: ../fish/guestfish-actions.pod:4254 ../src/guestfs-actions.pod:6612
14918 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
14919 "underlying device."
14923 #: ../fish/guestfish-actions.pod:4257
14925 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
14926 "before calling this command. For unknown reasons C<resize2fs> sometimes "
14927 "gives an error about this and sometimes not. In any case, it is always safe "
14928 "to call L</e2fsck-f> before calling this function."
14932 #: ../fish/guestfish-actions.pod:4263
14933 msgid "resize2fs-M"
14937 #: ../fish/guestfish-actions.pod:4265
14940 " resize2fs-M device\n"
14945 #: ../fish/guestfish-actions.pod:4267
14947 "This command is the same as L</resize2fs>, but the filesystem is resized to "
14948 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
14953 #: ../fish/guestfish-actions.pod:4271
14955 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
14956 "and read the C<Block size> and C<Block count> values. These two numbers, "
14957 "multiplied together, give the resulting size of the minimal filesystem in "
14962 #: ../fish/guestfish-actions.pod:4276
14963 msgid "resize2fs-size"
14967 #: ../fish/guestfish-actions.pod:4278
14970 " resize2fs-size device size\n"
14975 #: ../fish/guestfish-actions.pod:4280
14977 "This command is the same as L</resize2fs> except that it allows you to "
14978 "specify the new size (in bytes) explicitly."
14982 #: ../fish/guestfish-actions.pod:4283
14987 #: ../fish/guestfish-actions.pod:4285
14995 #: ../fish/guestfish-actions.pod:4287 ../src/guestfs-actions.pod:6664
14996 msgid "Remove the single file C<path>."
15000 #: ../fish/guestfish-actions.pod:4289
15005 #: ../fish/guestfish-actions.pod:4291
15013 #: ../fish/guestfish-actions.pod:4293 ../src/guestfs-actions.pod:6676
15015 "Remove the file or directory C<path>, recursively removing the contents if "
15016 "its a directory. This is like the C<rm -rf> shell command."
15020 #: ../fish/guestfish-actions.pod:4297
15025 #: ../fish/guestfish-actions.pod:4299
15033 #: ../fish/guestfish-actions.pod:4301 ../src/guestfs-actions.pod:6690
15034 msgid "Remove the single directory C<path>."
15038 #: ../fish/guestfish-actions.pod:4303
15039 msgid "rmmountpoint"
15043 #: ../fish/guestfish-actions.pod:4305
15046 " rmmountpoint exemptpath\n"
15051 #: ../fish/guestfish-actions.pod:4307
15053 "This calls removes a mountpoint that was previously created with "
15054 "L</mkmountpoint>. See L</mkmountpoint> for full details."
15058 #: ../fish/guestfish-actions.pod:4311
15059 msgid "scrub-device"
15063 #: ../fish/guestfish-actions.pod:4313
15066 " scrub-device device\n"
15071 #: ../fish/guestfish-actions.pod:4315 ../src/guestfs-actions.pod:6716
15073 "This command writes patterns over C<device> to make data retrieval more "
15078 #: ../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
15080 "It is an interface to the L<scrub(1)> program. See that manual page for "
15085 #: ../fish/guestfish-actions.pod:4321
15090 #: ../fish/guestfish-actions.pod:4323
15093 " scrub-file file\n"
15098 #: ../fish/guestfish-actions.pod:4325 ../src/guestfs-actions.pod:6732
15100 "This command writes patterns over a file to make data retrieval more "
15105 #: ../fish/guestfish-actions.pod:4328 ../src/guestfs-actions.pod:6735
15106 msgid "The file is I<removed> after scrubbing."
15110 #: ../fish/guestfish-actions.pod:4333
15111 msgid "scrub-freespace"
15115 #: ../fish/guestfish-actions.pod:4335
15118 " scrub-freespace dir\n"
15123 #: ../fish/guestfish-actions.pod:4337
15125 "This command creates the directory C<dir> and then fills it with files until "
15126 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
15127 "deletes them. The intention is to scrub any free space on the partition "
15128 "containing C<dir>."
15132 #: ../fish/guestfish-actions.pod:4346
15137 #: ../fish/guestfish-actions.pod:4348
15142 #: ../fish/guestfish-actions.pod:4350
15145 " set-append append\n"
15150 #: ../fish/guestfish-actions.pod:4352 ../src/guestfs-actions.pod:6769
15152 "This function is used to add additional options to the guest kernel command "
15157 #: ../fish/guestfish-actions.pod:4355 ../src/guestfs-actions.pod:6772
15159 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
15160 "environment variable."
15164 #: ../fish/guestfish-actions.pod:4358 ../src/guestfs-actions.pod:6775
15166 "Setting C<append> to C<NULL> means I<no> additional options are passed "
15167 "(libguestfs always adds a few of its own)."
15171 #: ../fish/guestfish-actions.pod:4361
15172 msgid "set-attach-method"
15176 #: ../fish/guestfish-actions.pod:4363
15177 msgid "attach-method"
15181 #: ../fish/guestfish-actions.pod:4365
15184 " set-attach-method attachmethod\n"
15189 #: ../fish/guestfish-actions.pod:4367 ../src/guestfs-actions.pod:6788
15191 "Set the method that libguestfs uses to connect to the back end guestfsd "
15192 "daemon. Possible methods are:"
15196 #: ../fish/guestfish-actions.pod:4372 ../src/guestfs-actions.pod:6793 ../src/guestfs.pod:2916
15197 msgid "C<appliance>"
15201 #: ../fish/guestfish-actions.pod:4374 ../src/guestfs-actions.pod:6795
15203 "Launch an appliance and connect to it. This is the ordinary method and the "
15208 #: ../fish/guestfish-actions.pod:4377 ../src/guestfs-actions.pod:6798
15209 msgid "C<unix:I<path>>"
15213 #: ../fish/guestfish-actions.pod:4379 ../src/guestfs-actions.pod:6800
15214 msgid "Connect to the Unix domain socket I<path>."
15218 #: ../fish/guestfish-actions.pod:4381 ../src/guestfs-actions.pod:6802
15220 "This method lets you connect to an existing daemon or (using virtio-serial) "
15221 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
15222 "RUNNING DAEMONS>."
15226 #: ../fish/guestfish-actions.pod:4387
15227 msgid "set-autosync"
15231 #: ../fish/guestfish-actions.pod:4389
15236 #: ../fish/guestfish-actions.pod:4391
15239 " set-autosync true|false\n"
15244 #: ../fish/guestfish-actions.pod:4393 ../src/guestfs-actions.pod:6818
15246 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
15247 "effort attempt to make filesystems consistent and synchronized when the "
15248 "handle is closed (also if the program exits without closing handles)."
15252 #: ../fish/guestfish-actions.pod:4398 ../src/guestfs-actions.pod:6823
15254 "This is enabled by default (since libguestfs 1.5.24, previously it was "
15255 "disabled by default)."
15259 #: ../fish/guestfish-actions.pod:4401
15264 #: ../fish/guestfish-actions.pod:4403
15269 #: ../fish/guestfish-actions.pod:4405
15272 " set-direct true|false\n"
15277 #: ../fish/guestfish-actions.pod:4407 ../src/guestfs-actions.pod:6836
15279 "If the direct appliance mode flag is enabled, then stdin and stdout are "
15280 "passed directly through to the appliance once it is launched."
15284 #: ../fish/guestfish-actions.pod:4411
15286 "One consequence of this is that log messages aren't caught by the library "
15287 "and handled by L</set-log-message-callback>, but go straight to stdout."
15291 #: ../fish/guestfish-actions.pod:4415 ../src/guestfs-actions.pod:6844
15292 msgid "You probably don't want to use this unless you know what you are doing."
15296 #: ../fish/guestfish-actions.pod:4418 ../src/guestfs-actions.pod:6847
15297 msgid "The default is disabled."
15301 #: ../fish/guestfish-actions.pod:4420
15302 msgid "set-e2label"
15306 #: ../fish/guestfish-actions.pod:4422
15309 " set-e2label device label\n"
15314 #: ../fish/guestfish-actions.pod:4424 ../src/guestfs-actions.pod:6860
15316 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
15317 "C<label>. Filesystem labels are limited to 16 characters."
15321 #: ../fish/guestfish-actions.pod:4428
15323 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
15324 "label on a filesystem."
15328 #: ../fish/guestfish-actions.pod:4431
15333 #: ../fish/guestfish-actions.pod:4433
15336 " set-e2uuid device uuid\n"
15341 #: ../fish/guestfish-actions.pod:4435 ../src/guestfs-actions.pod:6878
15343 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
15344 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
15345 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
15349 #: ../fish/guestfish-actions.pod:4440
15351 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
15352 "UUID of a filesystem."
15356 #: ../fish/guestfish-actions.pod:4443
15357 msgid "set-memsize"
15361 #: ../fish/guestfish-actions.pod:4445
15366 #: ../fish/guestfish-actions.pod:4447
15369 " set-memsize memsize\n"
15374 #: ../fish/guestfish-actions.pod:4449
15376 "This sets the memory size in megabytes allocated to the qemu subprocess. "
15377 "This only has any effect if called before L</launch>."
15381 #: ../fish/guestfish-actions.pod:4453 ../src/guestfs-actions.pod:6900
15383 "You can also change this by setting the environment variable "
15384 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
15388 #: ../fish/guestfish-actions.pod:4460
15389 msgid "set-network"
15393 #: ../fish/guestfish-actions.pod:4462
15398 #: ../fish/guestfish-actions.pod:4464
15401 " set-network true|false\n"
15406 #: ../fish/guestfish-actions.pod:4466 ../src/guestfs-actions.pod:6917
15408 "If C<network> is true, then the network is enabled in the libguestfs "
15409 "appliance. The default is false."
15413 #: ../fish/guestfish-actions.pod:4469 ../src/guestfs-actions.pod:6920
15415 "This affects whether commands are able to access the network (see "
15416 "L<guestfs(3)/RUNNING COMMANDS>)."
15420 #: ../fish/guestfish-actions.pod:4472
15421 msgid "You must call this before calling L</launch>, otherwise it has no effect."
15425 #: ../fish/guestfish-actions.pod:4475
15430 #: ../fish/guestfish-actions.pod:4479
15433 " set-path searchpath\n"
15438 #: ../fish/guestfish-actions.pod:4481 ../src/guestfs-actions.pod:6936
15439 msgid "Set the path that libguestfs searches for kernel and initrd.img."
15443 #: ../fish/guestfish-actions.pod:4483 ../src/guestfs-actions.pod:6938
15445 "The default is C<$libdir/guestfs> unless overridden by setting "
15446 "C<LIBGUESTFS_PATH> environment variable."
15450 #: ../fish/guestfish-actions.pod:4486 ../src/guestfs-actions.pod:6941
15451 msgid "Setting C<path> to C<NULL> restores the default path."
15455 #: ../fish/guestfish-actions.pod:4488
15460 #: ../fish/guestfish-actions.pod:4490
15465 #: ../fish/guestfish-actions.pod:4492
15468 " set-pgroup true|false\n"
15473 #: ../fish/guestfish-actions.pod:4494 ../src/guestfs-actions.pod:6953
15475 "If C<pgroup> is true, child processes are placed into their own process "
15480 #: ../fish/guestfish-actions.pod:4497 ../src/guestfs-actions.pod:6956
15482 "The practical upshot of this is that signals like C<SIGINT> (from users "
15483 "pressing C<^C>) won't be received by the child process."
15487 #: ../fish/guestfish-actions.pod:4500 ../src/guestfs-actions.pod:6959
15489 "The default for this flag is false, because usually you want C<^C> to kill "
15494 #: ../fish/guestfish-actions.pod:4503
15499 #: ../fish/guestfish-actions.pod:4505
15504 #: ../fish/guestfish-actions.pod:4507
15512 #: ../fish/guestfish-actions.pod:4509 ../src/guestfs-actions.pod:6972
15513 msgid "Set the qemu binary that we will use."
15517 #: ../fish/guestfish-actions.pod:4511 ../src/guestfs-actions.pod:6974
15518 msgid "The default is chosen when the library was compiled by the configure script."
15522 #: ../fish/guestfish-actions.pod:4514 ../src/guestfs-actions.pod:6977
15524 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
15529 #: ../fish/guestfish-actions.pod:4517 ../src/guestfs-actions.pod:6980
15530 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
15534 #: ../fish/guestfish-actions.pod:4519 ../src/guestfs-actions.pod:6982
15536 "Note that you should call this function as early as possible after creating "
15537 "the handle. This is because some pre-launch operations depend on testing "
15538 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
15539 "don't retest features, and so you might see inconsistent results. Using the "
15540 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
15541 "the qemu binary at the same time as the handle is created."
15545 #: ../fish/guestfish-actions.pod:4527
15546 msgid "set-recovery-proc"
15550 #: ../fish/guestfish-actions.pod:4529
15551 msgid "recovery-proc"
15555 #: ../fish/guestfish-actions.pod:4531
15558 " set-recovery-proc true|false\n"
15563 #: ../fish/guestfish-actions.pod:4533
15565 "If this is called with the parameter C<false> then L</launch> does not "
15566 "create a recovery process. The purpose of the recovery process is to stop "
15567 "runaway qemu processes in the case where the main program aborts abruptly."
15571 #: ../fish/guestfish-actions.pod:4538
15573 "This only has any effect if called before L</launch>, and the default is "
15578 #: ../fish/guestfish-actions.pod:4541 ../src/guestfs-actions.pod:7008
15580 "About the only time when you would want to disable this is if the main "
15581 "process will fork itself into the background (\"daemonize\" itself). In "
15582 "this case the recovery process thinks that the main program has disappeared "
15583 "and so kills qemu, which is not very helpful."
15587 #: ../fish/guestfish-actions.pod:4547
15588 msgid "set-selinux"
15592 #: ../fish/guestfish-actions.pod:4549
15597 #: ../fish/guestfish-actions.pod:4551
15600 " set-selinux true|false\n"
15605 #: ../fish/guestfish-actions.pod:4553 ../src/guestfs-actions.pod:7024
15607 "This sets the selinux flag that is passed to the appliance at boot time. "
15608 "The default is C<selinux=0> (disabled)."
15612 #: ../fish/guestfish-actions.pod:4556 ../src/guestfs-actions.pod:7027
15614 "Note that if SELinux is enabled, it is always in Permissive mode "
15615 "(C<enforcing=0>)."
15619 #: ../fish/guestfish-actions.pod:4562
15624 #: ../fish/guestfish-actions.pod:4564
15629 #: ../fish/guestfish-actions.pod:4566
15637 #: ../fish/guestfish-actions.pod:4568 ../src/guestfs-actions.pod:7043
15639 "Change the number of virtual CPUs assigned to the appliance. The default is "
15640 "C<1>. Increasing this may improve performance, though often it has no "
15645 #: ../fish/guestfish-actions.pod:4572
15646 msgid "This function must be called before L</launch>."
15650 #: ../fish/guestfish-actions.pod:4574
15655 #: ../fish/guestfish-actions.pod:4576
15660 #: ../fish/guestfish-actions.pod:4578
15663 " set-trace true|false\n"
15668 #: ../fish/guestfish-actions.pod:4580 ../src/guestfs-actions.pod:7059
15670 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
15671 "return values are traced."
15675 #: ../fish/guestfish-actions.pod:4583 ../src/guestfs-actions.pod:7062
15677 "If you want to trace C API calls into libguestfs (and other libraries) then "
15678 "possibly a better way is to use the external ltrace(1) command."
15682 #: ../fish/guestfish-actions.pod:4587 ../src/guestfs-actions.pod:7066
15684 "Command traces are disabled unless the environment variable "
15685 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
15689 #: ../fish/guestfish-actions.pod:4590
15691 "Trace messages are normally sent to C<stderr>, unless you register a "
15692 "callback to send them somewhere else (see L</set-event-callback>)."
15696 #: ../fish/guestfish-actions.pod:4594
15697 msgid "set-verbose"
15701 #: ../fish/guestfish-actions.pod:4596
15706 #: ../fish/guestfish-actions.pod:4598
15709 " set-verbose true|false\n"
15714 #: ../fish/guestfish-actions.pod:4600 ../src/guestfs-actions.pod:7083
15715 msgid "If C<verbose> is true, this turns on verbose messages."
15719 #: ../fish/guestfish-actions.pod:4602 ../src/guestfs-actions.pod:7085
15721 "Verbose messages are disabled unless the environment variable "
15722 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
15726 #: ../fish/guestfish-actions.pod:4605
15728 "Verbose messages are normally sent to C<stderr>, unless you register a "
15729 "callback to send them somewhere else (see L</set-event-callback>)."
15733 #: ../fish/guestfish-actions.pod:4609
15738 #: ../fish/guestfish-actions.pod:4611
15741 " setcon context\n"
15746 #: ../fish/guestfish-actions.pod:4613 ../src/guestfs-actions.pod:7102
15748 "This sets the SELinux security context of the daemon to the string "
15753 #: ../fish/guestfish-actions.pod:4616 ../src/guestfs-actions.pod:7105
15754 msgid "See the documentation about SELINUX in L<guestfs(3)>."
15758 #: ../fish/guestfish-actions.pod:4618
15763 #: ../fish/guestfish-actions.pod:4620
15766 " setxattr xattr val vallen path\n"
15771 #: ../fish/guestfish-actions.pod:4622 ../src/guestfs-actions.pod:7120
15773 "This call sets the extended attribute named C<xattr> of the file C<path> to "
15774 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
15778 #: ../fish/guestfish-actions.pod:4626
15779 msgid "See also: L</lsetxattr>, L<attr(5)>."
15783 #: ../fish/guestfish-actions.pod:4628
15788 #: ../fish/guestfish-actions.pod:4630
15791 " sfdisk device cyls heads sectors 'lines ...'\n"
15796 #: ../fish/guestfish-actions.pod:4632 ../src/guestfs-actions.pod:7147
15798 "This is a direct interface to the L<sfdisk(8)> program for creating "
15799 "partitions on block devices."
15803 #: ../fish/guestfish-actions.pod:4635 ../src/guestfs-actions.pod:7150
15804 msgid "C<device> should be a block device, for example C</dev/sda>."
15808 #: ../fish/guestfish-actions.pod:4637 ../src/guestfs-actions.pod:7152
15810 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
15811 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
15812 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
15813 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
15814 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
15815 "the kernel) cannot work out the right geometry and you will need to tell it."
15819 #: ../fish/guestfish-actions.pod:4645 ../src/guestfs-actions.pod:7160
15821 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
15822 "refer to the L<sfdisk(8)> manpage."
15826 #: ../fish/guestfish-actions.pod:4648 ../src/guestfs-actions.pod:7163
15828 "To create a single partition occupying the whole disk, you would pass "
15829 "C<lines> as a single element list, when the single element being the string "
15834 #: ../fish/guestfish-actions.pod:4652
15835 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
15839 #: ../fish/guestfish-actions.pod:4655 ../fish/guestfish-actions.pod:4675 ../fish/guestfish-actions.pod:4694
15841 "I<This function is deprecated.> In new code, use the L</part_add> call "
15846 #: ../fish/guestfish-actions.pod:4662
15851 #: ../fish/guestfish-actions.pod:4664
15854 " sfdiskM device 'lines ...'\n"
15859 #: ../fish/guestfish-actions.pod:4666
15861 "This is a simplified interface to the L</sfdisk> command, where partition "
15862 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
15863 "you don't need to specify the cyls, heads and sectors parameters which were "
15864 "rarely if ever used anyway."
15868 #: ../fish/guestfish-actions.pod:4672
15869 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
15873 #: ../fish/guestfish-actions.pod:4682
15878 #: ../fish/guestfish-actions.pod:4684
15881 " sfdisk-N device partnum cyls heads sectors line\n"
15886 #: ../fish/guestfish-actions.pod:4686 ../src/guestfs-actions.pod:7219
15888 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
15889 "(note: C<n> counts from 1)."
15893 #: ../fish/guestfish-actions.pod:4689
15895 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
15896 "cyls/heads/sectors parameters."
15900 #: ../fish/guestfish-actions.pod:4692
15901 msgid "See also: L</part-add>"
15905 #: ../fish/guestfish-actions.pod:4701
15906 msgid "sfdisk-disk-geometry"
15910 #: ../fish/guestfish-actions.pod:4703
15913 " sfdisk-disk-geometry device\n"
15918 #: ../fish/guestfish-actions.pod:4705
15920 "This displays the disk geometry of C<device> read from the partition table. "
15921 "Especially in the case where the underlying block device has been resized, "
15922 "this can be different from the kernel's idea of the geometry (see "
15923 "L</sfdisk-kernel-geometry>)."
15927 #: ../fish/guestfish-actions.pod:4710 ../fish/guestfish-actions.pod:4719 ../src/guestfs-actions.pod:7242 ../src/guestfs-actions.pod:7258
15928 msgid "The result is in human-readable format, and not designed to be parsed."
15932 #: ../fish/guestfish-actions.pod:4713
15933 msgid "sfdisk-kernel-geometry"
15937 #: ../fish/guestfish-actions.pod:4715
15940 " sfdisk-kernel-geometry device\n"
15945 #: ../fish/guestfish-actions.pod:4717 ../src/guestfs-actions.pod:7256
15946 msgid "This displays the kernel's idea of the geometry of C<device>."
15950 #: ../fish/guestfish-actions.pod:4722
15955 #: ../fish/guestfish-actions.pod:4724
15958 " sfdisk-l device\n"
15963 #: ../fish/guestfish-actions.pod:4726 ../src/guestfs-actions.pod:7279
15965 "This displays the partition table on C<device>, in the human-readable output "
15966 "of the L<sfdisk(8)> command. It is not intended to be parsed."
15970 #: ../fish/guestfish-actions.pod:4730
15971 msgid "See also: L</part-list>"
15975 #: ../fish/guestfish-actions.pod:4732
15977 "I<This function is deprecated.> In new code, use the L</part_list> call "
15982 #: ../fish/guestfish-actions.pod:4739
15987 #: ../fish/guestfish-actions.pod:4741
15995 #: ../fish/guestfish-actions.pod:4743 ../src/guestfs-actions.pod:7296
15997 "This call runs a command from the guest filesystem via the guest's "
16002 #: ../fish/guestfish-actions.pod:4746
16003 msgid "This is like L</command>, but passes the command to:"
16007 #: ../fish/guestfish-actions.pod:4748 ../src/guestfs-actions.pod:7301
16010 " /bin/sh -c \"command\"\n"
16015 #: ../fish/guestfish-actions.pod:4750 ../src/guestfs-actions.pod:7303
16017 "Depending on the guest's shell, this usually results in wildcards being "
16018 "expanded, shell expressions being interpolated and so on."
16022 #: ../fish/guestfish-actions.pod:4754
16023 msgid "All the provisos about L</command> apply to this call."
16027 #: ../fish/guestfish-actions.pod:4756
16032 #: ../fish/guestfish-actions.pod:4758
16035 " sh-lines command\n"
16040 #: ../fish/guestfish-actions.pod:4760
16041 msgid "This is the same as L</sh>, but splits the result into a list of lines."
16045 #: ../fish/guestfish-actions.pod:4763
16046 msgid "See also: L</command-lines>"
16050 #: ../fish/guestfish-actions.pod:4765
16055 #: ../fish/guestfish-actions.pod:4767
16063 #: ../fish/guestfish-actions.pod:4769 ../src/guestfs-actions.pod:7337
16064 msgid "Sleep for C<secs> seconds."
16068 #: ../fish/guestfish-actions.pod:4771
16073 #: ../fish/guestfish-actions.pod:4773
16081 #: ../fish/guestfish-actions.pod:4777 ../src/guestfs-actions.pod:7351
16082 msgid "This is the same as the C<stat(2)> system call."
16086 #: ../fish/guestfish-actions.pod:4779
16091 #: ../fish/guestfish-actions.pod:4781
16099 #: ../fish/guestfish-actions.pod:4783 ../src/guestfs-actions.pod:7365
16101 "Returns file system statistics for any mounted file system. C<path> should "
16102 "be a file or directory in the mounted file system (typically it is the mount "
16103 "point itself, but it doesn't need to be)."
16107 #: ../fish/guestfish-actions.pod:4787 ../src/guestfs-actions.pod:7369
16108 msgid "This is the same as the C<statvfs(2)> system call."
16112 #: ../fish/guestfish-actions.pod:4789
16117 #: ../fish/guestfish-actions.pod:4791
16125 #: ../fish/guestfish-actions.pod:4793 ../src/guestfs-actions.pod:7383
16127 "This runs the L<strings(1)> command on a file and returns the list of "
16128 "printable strings found."
16132 #: ../fish/guestfish-actions.pod:4799
16137 #: ../fish/guestfish-actions.pod:4801
16140 " strings-e encoding path\n"
16145 #: ../fish/guestfish-actions.pod:4803
16147 "This is like the L</strings> command, but allows you to specify the encoding "
16148 "of strings that are looked for in the source file C<path>."
16152 #: ../fish/guestfish-actions.pod:4807 ../src/guestfs-actions.pod:7406
16153 msgid "Allowed encodings are:"
16157 #: ../fish/guestfish-actions.pod:4811 ../src/guestfs-actions.pod:7410
16162 #: ../fish/guestfish-actions.pod:4813
16164 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
16165 "ISO-8859-X (this is what L</strings> uses)."
16169 #: ../fish/guestfish-actions.pod:4816 ../src/guestfs-actions.pod:7415
16174 #: ../fish/guestfish-actions.pod:4818 ../src/guestfs-actions.pod:7417
16175 msgid "Single 8-bit-byte characters."
16179 #: ../fish/guestfish-actions.pod:4820 ../src/guestfs-actions.pod:7419
16184 #: ../fish/guestfish-actions.pod:4822 ../src/guestfs-actions.pod:7421
16185 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
16189 #: ../fish/guestfish-actions.pod:4825 ../src/guestfs-actions.pod:7424
16190 msgid "l (lower case letter L)"
16194 #: ../fish/guestfish-actions.pod:4827 ../src/guestfs-actions.pod:7426
16196 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
16197 "examining binaries in Windows guests."
16201 #: ../fish/guestfish-actions.pod:4830 ../src/guestfs-actions.pod:7429
16206 #: ../fish/guestfish-actions.pod:4832 ../src/guestfs-actions.pod:7431
16207 msgid "32-bit big endian such as UCS-4BE."
16211 #: ../fish/guestfish-actions.pod:4834 ../src/guestfs-actions.pod:7433
16216 #: ../fish/guestfish-actions.pod:4836 ../src/guestfs-actions.pod:7435
16217 msgid "32-bit little endian such as UCS-4LE."
16221 #: ../fish/guestfish-actions.pod:4840 ../src/guestfs-actions.pod:7439
16222 msgid "The returned strings are transcoded to UTF-8."
16226 #: ../fish/guestfish-actions.pod:4845
16227 msgid "swapoff-device"
16231 #: ../fish/guestfish-actions.pod:4847
16234 " swapoff-device device\n"
16239 #: ../fish/guestfish-actions.pod:4849
16241 "This command disables the libguestfs appliance swap device or partition "
16242 "named C<device>. See L</swapon-device>."
16246 #: ../fish/guestfish-actions.pod:4853
16247 msgid "swapoff-file"
16251 #: ../fish/guestfish-actions.pod:4855
16254 " swapoff-file file\n"
16259 #: ../fish/guestfish-actions.pod:4857 ../src/guestfs-actions.pod:7470
16260 msgid "This command disables the libguestfs appliance swap on file."
16264 #: ../fish/guestfish-actions.pod:4859
16265 msgid "swapoff-label"
16269 #: ../fish/guestfish-actions.pod:4861
16272 " swapoff-label label\n"
16277 #: ../fish/guestfish-actions.pod:4863 ../src/guestfs-actions.pod:7482
16279 "This command disables the libguestfs appliance swap on labeled swap "
16284 #: ../fish/guestfish-actions.pod:4866
16285 msgid "swapoff-uuid"
16289 #: ../fish/guestfish-actions.pod:4868
16292 " swapoff-uuid uuid\n"
16297 #: ../fish/guestfish-actions.pod:4870 ../src/guestfs-actions.pod:7495
16299 "This command disables the libguestfs appliance swap partition with the given "
16304 #: ../fish/guestfish-actions.pod:4873
16305 msgid "swapon-device"
16309 #: ../fish/guestfish-actions.pod:4875
16312 " swapon-device device\n"
16317 #: ../fish/guestfish-actions.pod:4877
16319 "This command enables the libguestfs appliance to use the swap device or "
16320 "partition named C<device>. The increased memory is made available for all "
16321 "commands, for example those run using L</command> or L</sh>."
16325 #: ../fish/guestfish-actions.pod:4882 ../src/guestfs-actions.pod:7513
16327 "Note that you should not swap to existing guest swap partitions unless you "
16328 "know what you are doing. They may contain hibernation information, or other "
16329 "information that the guest doesn't want you to trash. You also risk leaking "
16330 "information about the host to the guest this way. Instead, attach a new "
16331 "host device to the guest and swap on that."
16335 #: ../fish/guestfish-actions.pod:4889
16336 msgid "swapon-file"
16340 #: ../fish/guestfish-actions.pod:4891
16343 " swapon-file file\n"
16348 #: ../fish/guestfish-actions.pod:4893
16349 msgid "This command enables swap to a file. See L</swapon-device> for other notes."
16353 #: ../fish/guestfish-actions.pod:4896
16354 msgid "swapon-label"
16358 #: ../fish/guestfish-actions.pod:4898
16361 " swapon-label label\n"
16366 #: ../fish/guestfish-actions.pod:4900
16368 "This command enables swap to a labeled swap partition. See "
16369 "L</swapon-device> for other notes."
16373 #: ../fish/guestfish-actions.pod:4903
16374 msgid "swapon-uuid"
16378 #: ../fish/guestfish-actions.pod:4905
16381 " swapon-uuid uuid\n"
16386 #: ../fish/guestfish-actions.pod:4907
16388 "This command enables swap to a swap partition with the given UUID. See "
16389 "L</swapon-device> for other notes."
16393 #: ../fish/guestfish-actions.pod:4910
16398 #: ../fish/guestfish-actions.pod:4912
16406 #: ../fish/guestfish-actions.pod:4914 ../src/guestfs-actions.pod:7568
16408 "This syncs the disk, so that any writes are flushed through to the "
16409 "underlying disk image."
16413 #: ../fish/guestfish-actions.pod:4917 ../src/guestfs-actions.pod:7571
16415 "You should always call this if you have modified a disk image, before "
16416 "closing the handle."
16420 #: ../fish/guestfish-actions.pod:4920
16425 #: ../fish/guestfish-actions.pod:4922
16433 #: ../fish/guestfish-actions.pod:4924 ../src/guestfs-actions.pod:7584
16434 msgid "This command returns up to the last 10 lines of a file as a list of strings."
16438 #: ../fish/guestfish-actions.pod:4930
16443 #: ../fish/guestfish-actions.pod:4932
16446 " tail-n nrlines path\n"
16451 #: ../fish/guestfish-actions.pod:4934 ../src/guestfs-actions.pod:7603
16453 "If the parameter C<nrlines> is a positive number, this returns the last "
16454 "C<nrlines> lines of the file C<path>."
16458 #: ../fish/guestfish-actions.pod:4937 ../src/guestfs-actions.pod:7606
16460 "If the parameter C<nrlines> is a negative number, this returns lines from "
16461 "the file C<path>, starting with the C<-nrlines>th line."
16465 #: ../fish/guestfish-actions.pod:4945
16470 #: ../fish/guestfish-actions.pod:4947
16473 " tar-in (tarfile|-) directory\n"
16478 #: ../fish/guestfish-actions.pod:4949 ../src/guestfs-actions.pod:7627
16480 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
16481 "tar file) into C<directory>."
16485 #: ../fish/guestfish-actions.pod:4952
16486 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
16490 #: ../fish/guestfish-actions.pod:4957
16495 #: ../fish/guestfish-actions.pod:4959
16498 " tar-out directory (tarfile|-)\n"
16503 #: ../fish/guestfish-actions.pod:4961 ../src/guestfs-actions.pod:7644
16505 "This command packs the contents of C<directory> and downloads it to local "
16510 #: ../fish/guestfish-actions.pod:4964
16511 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
16515 #: ../fish/guestfish-actions.pod:4969
16520 #: ../fish/guestfish-actions.pod:4971
16523 " tgz-in (tarball|-) directory\n"
16528 #: ../fish/guestfish-actions.pod:4973 ../src/guestfs-actions.pod:7661
16530 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
16531 "tar file) into C<directory>."
16535 #: ../fish/guestfish-actions.pod:4976
16536 msgid "To upload an uncompressed tarball, use L</tar-in>."
16540 #: ../fish/guestfish-actions.pod:4980
16545 #: ../fish/guestfish-actions.pod:4982
16548 " tgz-out directory (tarball|-)\n"
16553 #: ../fish/guestfish-actions.pod:4984 ../src/guestfs-actions.pod:7677
16555 "This command packs the contents of C<directory> and downloads it to local "
16560 #: ../fish/guestfish-actions.pod:4987
16561 msgid "To download an uncompressed tarball, use L</tar-out>."
16565 #: ../fish/guestfish-actions.pod:4991
16570 #: ../fish/guestfish-actions.pod:4993
16578 #: ../fish/guestfish-actions.pod:4995 ../src/guestfs-actions.pod:7692
16580 "Touch acts like the L<touch(1)> command. It can be used to update the "
16581 "timestamps on a file, or, if the file does not exist, to create a new "
16582 "zero-length file."
16586 #: ../fish/guestfish-actions.pod:4999 ../src/guestfs-actions.pod:7696
16588 "This command only works on regular files, and will fail on other file types "
16589 "such as directories, symbolic links, block special etc."
16593 #: ../fish/guestfish-actions.pod:5002
16598 #: ../fish/guestfish-actions.pod:5004
16606 #: ../fish/guestfish-actions.pod:5006 ../src/guestfs-actions.pod:7709
16608 "This command truncates C<path> to a zero-length file. The file must exist "
16613 #: ../fish/guestfish-actions.pod:5009
16614 msgid "truncate-size"
16618 #: ../fish/guestfish-actions.pod:5011
16621 " truncate-size path size\n"
16626 #: ../fish/guestfish-actions.pod:5013 ../src/guestfs-actions.pod:7723
16628 "This command truncates C<path> to size C<size> bytes. The file must exist "
16633 #: ../fish/guestfish-actions.pod:5016
16635 "If the current file size is less than C<size> then the file is extended to "
16636 "the required size with zero bytes. This creates a sparse file (ie. disk "
16637 "blocks are not allocated for the file until you write to it). To create a "
16638 "non-sparse file of zeroes, use L</fallocate64> instead."
16642 #: ../fish/guestfish-actions.pod:5022
16647 #: ../fish/guestfish-actions.pod:5024
16650 " tune2fs device [force:true|false] [maxmountcount:N] [mountcount:N] "
16651 "[errorbehavior:..] [group:N] [intervalbetweenchecks:N] "
16652 "[reservedblockspercentage:N] [lastmounteddirectory:..] "
16653 "[reservedblockscount:N] [user:N]\n"
16658 #: ../fish/guestfish-actions.pod:5026 ../src/guestfs-actions.pod:7759
16660 "This call allows you to adjust various filesystem parameters of an "
16661 "ext2/ext3/ext4 filesystem called C<device>."
16665 #: ../fish/guestfish-actions.pod:5035 ../src/guestfs-actions.pod:7768
16667 "Force tune2fs to complete the operation even in the face of errors. This is "
16668 "the same as the tune2fs C<-f> option."
16672 #: ../fish/guestfish-actions.pod:5038 ../src/guestfs-actions.pod:7771
16673 msgid "C<maxmountcount>"
16677 #: ../fish/guestfish-actions.pod:5040 ../src/guestfs-actions.pod:7773
16679 "Set the number of mounts after which the filesystem is checked by "
16680 "L<e2fsck(8)>. If this is C<0> then the number of mounts is disregarded. "
16681 "This is the same as the tune2fs C<-c> option."
16685 #: ../fish/guestfish-actions.pod:5044 ../src/guestfs-actions.pod:7777
16686 msgid "C<mountcount>"
16690 #: ../fish/guestfish-actions.pod:5046 ../src/guestfs-actions.pod:7779
16692 "Set the number of times the filesystem has been mounted. This is the same "
16693 "as the tune2fs C<-C> option."
16697 #: ../fish/guestfish-actions.pod:5049 ../src/guestfs-actions.pod:7782
16698 msgid "C<errorbehavior>"
16702 #: ../fish/guestfish-actions.pod:5051 ../src/guestfs-actions.pod:7784
16704 "Change the behavior of the kernel code when errors are detected. Possible "
16705 "values currently are: C<continue>, C<remount-ro>, C<panic>. In practice "
16706 "these options don't really make any difference, particularly for write "
16711 #: ../fish/guestfish-actions.pod:5056 ../src/guestfs-actions.pod:7789
16712 msgid "This is the same as the tune2fs C<-e> option."
16716 #: ../fish/guestfish-actions.pod:5058 ../src/guestfs-actions.pod:7791
16721 #: ../fish/guestfish-actions.pod:5060 ../src/guestfs-actions.pod:7793
16723 "Set the group which can use reserved filesystem blocks. This is the same as "
16724 "the tune2fs C<-g> option except that it can only be specified as a number."
16728 #: ../fish/guestfish-actions.pod:5064 ../src/guestfs-actions.pod:7797
16729 msgid "C<intervalbetweenchecks>"
16733 #: ../fish/guestfish-actions.pod:5066 ../src/guestfs-actions.pod:7799
16735 "Adjust the maximal time between two filesystem checks (in seconds). If the "
16736 "option is passed as C<0> then time-dependent checking is disabled."
16740 #: ../fish/guestfish-actions.pod:5070 ../src/guestfs-actions.pod:7803
16741 msgid "This is the same as the tune2fs C<-i> option."
16745 #: ../fish/guestfish-actions.pod:5072 ../src/guestfs-actions.pod:7805
16746 msgid "C<reservedblockspercentage>"
16750 #: ../fish/guestfish-actions.pod:5074 ../src/guestfs-actions.pod:7807
16752 "Set the percentage of the filesystem which may only be allocated by "
16753 "privileged processes. This is the same as the tune2fs C<-m> option."
16757 #: ../fish/guestfish-actions.pod:5078 ../src/guestfs-actions.pod:7811
16758 msgid "C<lastmounteddirectory>"
16762 #: ../fish/guestfish-actions.pod:5080 ../src/guestfs-actions.pod:7813
16764 "Set the last mounted directory. This is the same as the tune2fs C<-M> "
16769 #: ../fish/guestfish-actions.pod:5083 ../src/guestfs-actions.pod:7816
16771 "C<reservedblockscount> Set the number of reserved filesystem blocks. This "
16772 "is the same as the tune2fs C<-r> option."
16776 #: ../fish/guestfish-actions.pod:5087 ../src/guestfs-actions.pod:7820
16781 #: ../fish/guestfish-actions.pod:5089 ../src/guestfs-actions.pod:7822
16783 "Set the user who can use the reserved filesystem blocks. This is the same "
16784 "as the tune2fs C<-u> option except that it can only be specified as a "
16789 #: ../fish/guestfish-actions.pod:5095
16791 "To get the current values of filesystem parameters, see L</tune2fs-l>. For "
16792 "precise details of how tune2fs works, see the L<tune2fs(8)> man page."
16796 #: ../fish/guestfish-actions.pod:5101
16801 #: ../fish/guestfish-actions.pod:5103
16804 " tune2fs-l device\n"
16809 #: ../fish/guestfish-actions.pod:5105 ../src/guestfs-actions.pod:7862
16811 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
16816 #: ../fish/guestfish-actions.pod:5108 ../src/guestfs-actions.pod:7865
16818 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
16819 "for more details. The list of fields returned isn't clearly defined, and "
16820 "depends on both the version of C<tune2fs> that libguestfs was built against, "
16821 "and the filesystem itself."
16825 #: ../fish/guestfish-actions.pod:5113
16830 #: ../fish/guestfish-actions.pod:5115
16833 " txz-in (tarball|-) directory\n"
16838 #: ../fish/guestfish-actions.pod:5117 ../src/guestfs-actions.pod:7885
16840 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
16841 "tar file) into C<directory>."
16845 #: ../fish/guestfish-actions.pod:5122
16850 #: ../fish/guestfish-actions.pod:5124
16853 " txz-out directory (tarball|-)\n"
16858 #: ../fish/guestfish-actions.pod:5126 ../src/guestfs-actions.pod:7899
16860 "This command packs the contents of C<directory> and downloads it to local "
16861 "file C<tarball> (as an xz compressed tar archive)."
16865 #: ../fish/guestfish-actions.pod:5131
16870 #: ../fish/guestfish-actions.pod:5133
16878 #: ../fish/guestfish-actions.pod:5135 ../src/guestfs-actions.pod:7912
16880 "This function sets the mask used for creating new files and device nodes to "
16885 #: ../fish/guestfish-actions.pod:5138 ../src/guestfs-actions.pod:7915
16887 "Typical umask values would be C<022> which creates new files with "
16888 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
16889 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
16893 #: ../fish/guestfish-actions.pod:5143 ../src/guestfs-actions.pod:7920
16895 "The default umask is C<022>. This is important because it means that "
16896 "directories and device nodes will be created with C<0644> or C<0755> mode "
16897 "even if you specify C<0777>."
16901 #: ../fish/guestfish-actions.pod:5147
16902 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
16906 #: ../fish/guestfish-actions.pod:5150 ../src/guestfs-actions.pod:7927
16907 msgid "This call returns the previous umask."
16911 #: ../fish/guestfish-actions.pod:5152
16916 #: ../fish/guestfish-actions.pod:5154
16921 #: ../fish/guestfish-actions.pod:5156
16924 " umount pathordevice\n"
16929 #: ../fish/guestfish-actions.pod:5158 ../src/guestfs-actions.pod:7939
16931 "This unmounts the given filesystem. The filesystem may be specified either "
16932 "by its mountpoint (path) or the device which contains the filesystem."
16936 #: ../fish/guestfish-actions.pod:5162
16941 #: ../fish/guestfish-actions.pod:5164
16942 msgid "unmount-all"
16946 #: ../fish/guestfish-actions.pod:5166
16954 #: ../fish/guestfish-actions.pod:5168 ../src/guestfs-actions.pod:7952
16955 msgid "This unmounts all mounted filesystems."
16959 #: ../fish/guestfish-actions.pod:5170 ../src/guestfs-actions.pod:7954
16960 msgid "Some internal mounts are not unmounted by this call."
16964 #: ../fish/guestfish-actions.pod:5172
16969 #: ../fish/guestfish-actions.pod:5174
16972 " upload (filename|-) remotefilename\n"
16977 #: ../fish/guestfish-actions.pod:5176 ../fish/guestfish-actions.pod:5189 ../src/guestfs-actions.pod:7967 ../src/guestfs-actions.pod:7991
16978 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
16982 #: ../fish/guestfish-actions.pod:5181
16983 msgid "See also L</download>."
16987 #: ../fish/guestfish-actions.pod:5185
16988 msgid "upload-offset"
16992 #: ../fish/guestfish-actions.pod:5187
16995 " upload-offset (filename|-) remotefilename offset\n"
17000 #: ../fish/guestfish-actions.pod:5192 ../src/guestfs-actions.pod:7994
17002 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
17003 "The intention is to overwrite parts of existing files or devices, although "
17004 "if a non-existant file is specified then it is created with a \"hole\" "
17005 "before C<offset>. The size of the data written is implicit in the size of "
17006 "the source C<filename>."
17010 #: ../fish/guestfish-actions.pod:5199
17012 "Note that there is no limit on the amount of data that can be uploaded with "
17013 "this call, unlike with L</pwrite>, and this call always writes the full "
17014 "amount unless an error occurs."
17018 #: ../fish/guestfish-actions.pod:5204
17019 msgid "See also L</upload>, L</pwrite>."
17023 #: ../fish/guestfish-actions.pod:5208
17028 #: ../fish/guestfish-actions.pod:5210
17031 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
17036 #: ../fish/guestfish-actions.pod:5212 ../src/guestfs-actions.pod:8027
17037 msgid "This command sets the timestamps of a file with nanosecond precision."
17041 #: ../fish/guestfish-actions.pod:5215 ../src/guestfs-actions.pod:8030
17043 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
17048 #: ../fish/guestfish-actions.pod:5218 ../src/guestfs-actions.pod:8033
17050 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
17051 "nanoseconds from the epoch."
17055 #: ../fish/guestfish-actions.pod:5221 ../src/guestfs-actions.pod:8036
17057 "If the C<*nsecs> field contains the special value C<-1> then the "
17058 "corresponding timestamp is set to the current time. (The C<*secs> field is "
17059 "ignored in this case)."
17063 #: ../fish/guestfish-actions.pod:5225 ../src/guestfs-actions.pod:8040
17065 "If the C<*nsecs> field contains the special value C<-2> then the "
17066 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
17071 #: ../fish/guestfish-actions.pod:5229
17076 #: ../fish/guestfish-actions.pod:5231
17084 #: ../fish/guestfish-actions.pod:5233 ../src/guestfs-actions.pod:8053
17085 msgid "Return the libguestfs version number that the program is linked against."
17089 #: ../fish/guestfish-actions.pod:5236 ../src/guestfs-actions.pod:8056
17091 "Note that because of dynamic linking this is not necessarily the version of "
17092 "libguestfs that you compiled against. You can compile the program, and then "
17093 "at runtime dynamically link against a completely different C<libguestfs.so> "
17098 #: ../fish/guestfish-actions.pod:5241 ../src/guestfs-actions.pod:8061
17100 "This call was added in version C<1.0.58>. In previous versions of "
17101 "libguestfs there was no way to get the version number. From C code you can "
17102 "use dynamic linker functions to find out if this symbol exists (if it "
17103 "doesn't, then it's an earlier version)."
17107 #: ../fish/guestfish-actions.pod:5247 ../src/guestfs-actions.pod:8067
17109 "The call returns a structure with four elements. The first three (C<major>, "
17110 "C<minor> and C<release>) are numbers and correspond to the usual version "
17111 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
17112 "but may be used for distro-specific information."
17116 #: ../fish/guestfish-actions.pod:5253 ../src/guestfs-actions.pod:8073
17117 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
17121 #: ../fish/guestfish-actions.pod:5256 ../src/guestfs-actions.pod:8076
17122 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
17126 #: ../fish/guestfish-actions.pod:5258
17128 "I<Note:> Don't use this call to test for availability of features. In "
17129 "enterprise distributions we backport features from later versions into "
17130 "earlier versions, making this an unreliable way to test for features. Use "
17131 "L</available> instead."
17135 #: ../fish/guestfish-actions.pod:5264
17140 #: ../fish/guestfish-actions.pod:5266
17143 " vfs-label device\n"
17148 #: ../fish/guestfish-actions.pod:5268 ../src/guestfs-actions.pod:8096
17149 msgid "This returns the filesystem label of the filesystem on C<device>."
17153 #: ../fish/guestfish-actions.pod:5271 ../src/guestfs-actions.pod:8099
17154 msgid "If the filesystem is unlabeled, this returns the empty string."
17158 #: ../fish/guestfish-actions.pod:5273
17159 msgid "To find a filesystem from the label, use L</findfs-label>."
17163 #: ../fish/guestfish-actions.pod:5275
17168 #: ../fish/guestfish-actions.pod:5277
17171 " vfs-type device\n"
17176 #: ../fish/guestfish-actions.pod:5279 ../src/guestfs-actions.pod:8114
17178 "This command gets the filesystem type corresponding to the filesystem on "
17183 #: ../fish/guestfish-actions.pod:5282 ../src/guestfs-actions.pod:8117
17185 "For most filesystems, the result is the name of the Linux VFS module which "
17186 "would be used to mount this filesystem if you mounted it without specifying "
17187 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
17191 #: ../fish/guestfish-actions.pod:5287
17196 #: ../fish/guestfish-actions.pod:5289
17199 " vfs-uuid device\n"
17204 #: ../fish/guestfish-actions.pod:5291 ../src/guestfs-actions.pod:8133
17205 msgid "This returns the filesystem UUID of the filesystem on C<device>."
17209 #: ../fish/guestfish-actions.pod:5294 ../src/guestfs-actions.pod:8136
17210 msgid "If the filesystem does not have a UUID, this returns the empty string."
17214 #: ../fish/guestfish-actions.pod:5296
17215 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
17219 #: ../fish/guestfish-actions.pod:5298
17220 msgid "vg-activate"
17224 #: ../fish/guestfish-actions.pod:5300
17227 " vg-activate true|false 'volgroups ...'\n"
17232 #: ../fish/guestfish-actions.pod:5302 ../src/guestfs-actions.pod:8152
17234 "This command activates or (if C<activate> is false) deactivates all logical "
17235 "volumes in the listed volume groups C<volgroups>."
17239 #: ../fish/guestfish-actions.pod:5305 ../src/guestfs-actions.pod:8155
17240 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
17244 #: ../fish/guestfish-actions.pod:5307 ../src/guestfs-actions.pod:8157
17246 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
17247 "activated or deactivated."
17251 #: ../fish/guestfish-actions.pod:5310
17252 msgid "vg-activate-all"
17256 #: ../fish/guestfish-actions.pod:5312
17259 " vg-activate-all true|false\n"
17264 #: ../fish/guestfish-actions.pod:5314 ../src/guestfs-actions.pod:8170
17266 "This command activates or (if C<activate> is false) deactivates all logical "
17267 "volumes in all volume groups."
17271 #: ../fish/guestfish-actions.pod:5317 ../src/guestfs-actions.pod:8173
17272 msgid "This command is the same as running C<vgchange -a y|n>"
17276 #: ../fish/guestfish-actions.pod:5319
17281 #: ../fish/guestfish-actions.pod:5321
17284 " vgcreate volgroup 'physvols ...'\n"
17289 #: ../fish/guestfish-actions.pod:5323 ../src/guestfs-actions.pod:8186
17291 "This creates an LVM volume group called C<volgroup> from the non-empty list "
17292 "of physical volumes C<physvols>."
17296 #: ../fish/guestfish-actions.pod:5326
17301 #: ../fish/guestfish-actions.pod:5328
17304 " vglvuuids vgname\n"
17309 #: ../fish/guestfish-actions.pod:5330 ../src/guestfs-actions.pod:8199
17311 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
17312 "volumes created in this volume group."
17316 #: ../fish/guestfish-actions.pod:5333
17318 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
17319 "logical volumes and volume groups."
17323 #: ../fish/guestfish-actions.pod:5336
17324 msgid "See also L</vgpvuuids>."
17328 #: ../fish/guestfish-actions.pod:5338
17333 #: ../fish/guestfish-actions.pod:5340
17336 " vgpvuuids vgname\n"
17341 #: ../fish/guestfish-actions.pod:5342 ../src/guestfs-actions.pod:8219
17343 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
17344 "volumes that this volume group resides on."
17348 #: ../fish/guestfish-actions.pod:5345
17350 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
17351 "physical volumes and volume groups."
17355 #: ../fish/guestfish-actions.pod:5348
17356 msgid "See also L</vglvuuids>."
17360 #: ../fish/guestfish-actions.pod:5350
17365 #: ../fish/guestfish-actions.pod:5352
17368 " vgremove vgname\n"
17373 #: ../fish/guestfish-actions.pod:5354 ../src/guestfs-actions.pod:8239
17374 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
17378 #: ../fish/guestfish-actions.pod:5356 ../src/guestfs-actions.pod:8241
17379 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
17383 #: ../fish/guestfish-actions.pod:5359
17388 #: ../fish/guestfish-actions.pod:5361
17391 " vgrename volgroup newvolgroup\n"
17396 #: ../fish/guestfish-actions.pod:5363 ../src/guestfs-actions.pod:8255
17397 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
17401 #: ../fish/guestfish-actions.pod:5365
17406 #: ../fish/guestfish-actions.pod:5367
17414 #: ../fish/guestfish-actions.pod:5369 ../src/guestfs-actions.pod:8266
17416 "List all the volumes groups detected. This is the equivalent of the "
17417 "L<vgs(8)> command."
17421 #: ../fish/guestfish-actions.pod:5372 ../src/guestfs-actions.pod:8269
17423 "This returns a list of just the volume group names that were detected "
17424 "(eg. C<VolGroup00>)."
17428 #: ../fish/guestfish-actions.pod:5375
17429 msgid "See also L</vgs-full>."
17433 #: ../fish/guestfish-actions.pod:5377
17438 #: ../fish/guestfish-actions.pod:5379
17446 #: ../fish/guestfish-actions.pod:5381 ../src/guestfs-actions.pod:8285
17448 "List all the volumes groups detected. This is the equivalent of the "
17449 "L<vgs(8)> command. The \"full\" version includes all fields."
17453 #: ../fish/guestfish-actions.pod:5384
17458 #: ../fish/guestfish-actions.pod:5386
17466 #: ../fish/guestfish-actions.pod:5388 ../src/guestfs-actions.pod:8299
17468 "This rescans all block devices and rebuilds the list of LVM physical "
17469 "volumes, volume groups and logical volumes."
17473 #: ../fish/guestfish-actions.pod:5391
17478 #: ../fish/guestfish-actions.pod:5393
17486 #: ../fish/guestfish-actions.pod:5395 ../src/guestfs-actions.pod:8312
17487 msgid "This command returns the UUID of the LVM VG named C<vgname>."
17491 #: ../fish/guestfish-actions.pod:5397
17496 #: ../fish/guestfish-actions.pod:5399
17504 #: ../fish/guestfish-actions.pod:5401 ../src/guestfs-actions.pod:8352
17506 "This command counts the characters in a file, using the C<wc -c> external "
17511 #: ../fish/guestfish-actions.pod:5404
17516 #: ../fish/guestfish-actions.pod:5406
17524 #: ../fish/guestfish-actions.pod:5408 ../src/guestfs-actions.pod:8365
17526 "This command counts the lines in a file, using the C<wc -l> external "
17531 #: ../fish/guestfish-actions.pod:5411
17536 #: ../fish/guestfish-actions.pod:5413
17544 #: ../fish/guestfish-actions.pod:5415 ../src/guestfs-actions.pod:8378
17546 "This command counts the words in a file, using the C<wc -w> external "
17551 #: ../fish/guestfish-actions.pod:5418
17556 #: ../fish/guestfish-actions.pod:5420
17559 " write path content\n"
17564 #: ../fish/guestfish-actions.pod:5422 ../src/guestfs-actions.pod:8393
17566 "This call creates a file called C<path>. The content of the file is the "
17567 "string C<content> (which can contain any 8 bit data)."
17571 #: ../fish/guestfish-actions.pod:5425
17572 msgid "See also L</write-append>."
17576 #: ../fish/guestfish-actions.pod:5430
17577 msgid "write-append"
17581 #: ../fish/guestfish-actions.pod:5432
17584 " write-append path content\n"
17589 #: ../fish/guestfish-actions.pod:5434 ../src/guestfs-actions.pod:8413
17591 "This call appends C<content> to the end of file C<path>. If C<path> does "
17592 "not exist, then a new file is created."
17596 #: ../fish/guestfish-actions.pod:5437
17597 msgid "See also L</write>."
17601 #: ../fish/guestfish-actions.pod:5442
17606 #: ../fish/guestfish-actions.pod:5444
17609 " write-file path content size\n"
17614 #: ../fish/guestfish-actions.pod:5446 ../src/guestfs-actions.pod:8440
17616 "This call creates a file called C<path>. The contents of the file is the "
17617 "string C<content> (which can contain any 8 bit data), with length C<size>."
17621 #: ../fish/guestfish-actions.pod:5450 ../src/guestfs-actions.pod:8444
17623 "As a special case, if C<size> is C<0> then the length is calculated using "
17624 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
17628 #: ../fish/guestfish-actions.pod:5454 ../src/guestfs-actions.pod:8448
17630 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
17631 "I<not> work, even if the length is specified."
17635 #: ../fish/guestfish-actions.pod:5460
17636 msgid "I<This function is deprecated.> In new code, use the L</write> call instead."
17640 #: ../fish/guestfish-actions.pod:5467
17645 #: ../fish/guestfish-actions.pod:5469
17648 " zegrep regex path\n"
17653 #: ../fish/guestfish-actions.pod:5471 ../src/guestfs-actions.pod:8465
17654 msgid "This calls the external C<zegrep> program and returns the matching lines."
17658 #: ../fish/guestfish-actions.pod:5477
17663 #: ../fish/guestfish-actions.pod:5479
17666 " zegrepi regex path\n"
17671 #: ../fish/guestfish-actions.pod:5481 ../src/guestfs-actions.pod:8484
17672 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
17676 #: ../fish/guestfish-actions.pod:5487
17681 #: ../fish/guestfish-actions.pod:5489
17689 #: ../fish/guestfish-actions.pod:5491 ../src/guestfs-actions.pod:8502
17690 msgid "This command writes zeroes over the first few blocks of C<device>."
17694 #: ../fish/guestfish-actions.pod:5493 ../src/guestfs-actions.pod:8504
17696 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
17697 "securely wipe the device). It should be sufficient to remove any partition "
17698 "tables, filesystem superblocks and so on."
17702 #: ../fish/guestfish-actions.pod:5497 ../fish/guestfish-actions.pod:5512 ../src/guestfs-actions.pod:8508 ../src/guestfs-actions.pod:8534
17704 "If blocks are already zero, then this command avoids writing zeroes. This "
17705 "prevents the underlying device from becoming non-sparse or growing "
17710 #: ../fish/guestfish-actions.pod:5501
17711 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
17715 #: ../fish/guestfish-actions.pod:5504
17716 msgid "zero-device"
17720 #: ../fish/guestfish-actions.pod:5506
17723 " zero-device device\n"
17728 #: ../fish/guestfish-actions.pod:5508
17730 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
17731 "which just zeroes the first few blocks of a device."
17735 #: ../fish/guestfish-actions.pod:5516
17740 #: ../fish/guestfish-actions.pod:5518
17743 " zerofree device\n"
17748 #: ../fish/guestfish-actions.pod:5520 ../src/guestfs-actions.pod:8553
17750 "This runs the I<zerofree> program on C<device>. This program claims to zero "
17751 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
17752 "possible to compress the filesystem more effectively."
17756 #: ../fish/guestfish-actions.pod:5525 ../src/guestfs-actions.pod:8558
17757 msgid "You should B<not> run this program if the filesystem is mounted."
17761 #: ../fish/guestfish-actions.pod:5528 ../src/guestfs-actions.pod:8561
17763 "It is possible that using this program can damage the filesystem or data on "
17768 #: ../fish/guestfish-actions.pod:5531
17773 #: ../fish/guestfish-actions.pod:5533
17776 " zfgrep pattern path\n"
17781 #: ../fish/guestfish-actions.pod:5535 ../src/guestfs-actions.pod:8575
17782 msgid "This calls the external C<zfgrep> program and returns the matching lines."
17786 #: ../fish/guestfish-actions.pod:5541
17791 #: ../fish/guestfish-actions.pod:5543
17794 " zfgrepi pattern path\n"
17799 #: ../fish/guestfish-actions.pod:5545 ../src/guestfs-actions.pod:8594
17800 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
17804 #: ../fish/guestfish-actions.pod:5551
17809 #: ../fish/guestfish-actions.pod:5553
17812 " zfile meth path\n"
17817 #: ../fish/guestfish-actions.pod:5555 ../src/guestfs-actions.pod:8620
17818 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
17822 #: ../fish/guestfish-actions.pod:5558 ../src/guestfs-actions.pod:8623
17823 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
17827 #: ../fish/guestfish-actions.pod:5560
17828 msgid "Since 1.0.63, use L</file> instead which can now process compressed files."
17832 #: ../fish/guestfish-actions.pod:5563
17833 msgid "I<This function is deprecated.> In new code, use the L</file> call instead."
17837 #: ../fish/guestfish-actions.pod:5570
17842 #: ../fish/guestfish-actions.pod:5572
17845 " zgrep regex path\n"
17850 #: ../fish/guestfish-actions.pod:5574 ../src/guestfs-actions.pod:8640
17851 msgid "This calls the external C<zgrep> program and returns the matching lines."
17855 #: ../fish/guestfish-actions.pod:5580
17860 #: ../fish/guestfish-actions.pod:5582
17863 " zgrepi regex path\n"
17868 #: ../fish/guestfish-actions.pod:5584 ../src/guestfs-actions.pod:8659
17869 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
17873 #: ../fish/guestfish-commands.pod:1
17878 #: ../fish/guestfish-commands.pod:3
17883 #: ../fish/guestfish-commands.pod:5
17886 " alloc filename size\n"
17891 #: ../fish/guestfish-commands.pod:7
17893 "This creates an empty (zeroed) file of the given size, and then adds so it "
17894 "can be further examined."
17898 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:193
17899 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
17903 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:195
17904 msgid "Size can be specified using standard suffixes, eg. C<1M>."
17908 #: ../fish/guestfish-commands.pod:14
17910 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
17911 "image, see L</PREPARED DISK IMAGES>."
17915 #: ../fish/guestfish-commands.pod:17
17920 #: ../fish/guestfish-commands.pod:19
17923 " copy-in local [local ...] /remotedir\n"
17928 #: ../fish/guestfish-commands.pod:21
17930 "C<copy-in> copies local files or directories recursively into the disk "
17931 "image, placing them in the directory called C</remotedir> (which must "
17932 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
17933 "other commands as necessary."
17937 #: ../fish/guestfish-commands.pod:26
17939 "Multiple local files and directories can be specified, but the last "
17940 "parameter must always be a remote directory. Wildcards cannot be used."
17944 #: ../fish/guestfish-commands.pod:30
17949 #: ../fish/guestfish-commands.pod:32
17952 " copy-out remote [remote ...] localdir\n"
17957 #: ../fish/guestfish-commands.pod:34
17959 "C<copy-out> copies remote files or directories recursively out of the disk "
17960 "image, placing them on the host disk in a local directory called C<localdir> "
17961 "(which must exist). This guestfish meta-command turns into a sequence of "
17962 "L</download>, L</tar-out> and other commands as necessary."
17966 #: ../fish/guestfish-commands.pod:40
17968 "Multiple remote files and directories can be specified, but the last "
17969 "parameter must always be a local directory. To download to the current "
17970 "directory, use C<.> as in:"
17974 #: ../fish/guestfish-commands.pod:44
17977 " copy-out /home .\n"
17982 #: ../fish/guestfish-commands.pod:46
17984 "Wildcards cannot be used in the ordinary command, but you can use them with "
17985 "the help of L</glob> like this:"
17989 #: ../fish/guestfish-commands.pod:49
17992 " glob copy-out /home/* .\n"
17997 #: ../fish/guestfish-commands.pod:51
18002 #: ../fish/guestfish-commands.pod:53
18005 " display filename\n"
18010 #: ../fish/guestfish-commands.pod:55
18012 "Use C<display> (a graphical display program) to display an image file. It "
18013 "downloads the file, and runs C<display> on it."
18017 #: ../fish/guestfish-commands.pod:58
18019 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
18020 "environment variable. For example to use the GNOME display program:"
18024 #: ../fish/guestfish-commands.pod:61
18027 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
18032 #: ../fish/guestfish-commands.pod:63
18033 msgid "See also L<display(1)>."
18037 #: ../fish/guestfish-commands.pod:65
18042 #: ../fish/guestfish-commands.pod:67
18045 " echo [params ...]\n"
18050 #: ../fish/guestfish-commands.pod:69
18051 msgid "This echos the parameters to the terminal."
18055 #: ../fish/guestfish-commands.pod:71
18060 #: ../fish/guestfish-commands.pod:73
18065 #: ../fish/guestfish-commands.pod:75
18070 #: ../fish/guestfish-commands.pod:77
18078 #: ../fish/guestfish-commands.pod:79
18080 "This is used to edit a file. It downloads the file, edits it locally using "
18081 "your editor, then uploads the result."
18085 #: ../fish/guestfish-commands.pod:82
18087 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
18088 "or C<emacs> you will get those corresponding editors."
18092 #: ../fish/guestfish-commands.pod:86
18097 #: ../fish/guestfish-commands.pod:88
18100 " glob command args...\n"
18105 #: ../fish/guestfish-commands.pod:90
18107 "Expand wildcards in any paths in the args list, and run C<command> "
18108 "repeatedly on each matching path."
18112 #: ../fish/guestfish-commands.pod:93
18113 msgid "See L</WILDCARDS AND GLOBBING>."
18117 #: ../fish/guestfish-commands.pod:95
18122 #: ../fish/guestfish-commands.pod:97
18125 " hexedit <filename|device>\n"
18126 " hexedit <filename|device> <max>\n"
18127 " hexedit <filename|device> <start> <max>\n"
18132 #: ../fish/guestfish-commands.pod:101
18134 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
18139 #: ../fish/guestfish-commands.pod:104
18141 "This command works by downloading potentially the whole file or device, "
18142 "editing it locally, then uploading it. If the file or device is large, you "
18143 "have to specify which part you wish to edit by using C<max> and/or C<start> "
18144 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
18145 "usual modifiers allowed such as C<1M> (1 megabyte)."
18149 #: ../fish/guestfish-commands.pod:111
18150 msgid "For example to edit the first few sectors of a disk you might do:"
18154 #: ../fish/guestfish-commands.pod:114
18157 " hexedit /dev/sda 1M\n"
18162 #: ../fish/guestfish-commands.pod:116
18164 "which would allow you to edit anywhere within the first megabyte of the "
18169 #: ../fish/guestfish-commands.pod:119
18170 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
18174 #: ../fish/guestfish-commands.pod:121
18177 " hexedit /dev/sda1 0x400 0x400\n"
18182 #: ../fish/guestfish-commands.pod:123
18183 msgid "(assuming the superblock is in the standard location)."
18187 #: ../fish/guestfish-commands.pod:125
18189 "This command requires the external L<hexedit(1)> program. You can specify "
18190 "another program to use by setting the C<HEXEDITOR> environment variable."
18194 #: ../fish/guestfish-commands.pod:129
18195 msgid "See also L</hexdump>."
18199 #: ../fish/guestfish-commands.pod:131
18204 #: ../fish/guestfish-commands.pod:133
18212 #: ../fish/guestfish-commands.pod:135
18213 msgid "Change the local directory, ie. the current directory of guestfish itself."
18217 #: ../fish/guestfish-commands.pod:138
18218 msgid "Note that C<!cd> won't do what you might expect."
18222 #: ../fish/guestfish-commands.pod:140
18227 #: ../fish/guestfish-commands.pod:142
18232 #: ../fish/guestfish-commands.pod:144
18240 #: ../fish/guestfish-commands.pod:146
18241 msgid "Opens the manual page for guestfish."
18245 #: ../fish/guestfish-commands.pod:148
18250 #: ../fish/guestfish-commands.pod:150
18255 #: ../fish/guestfish-commands.pod:152
18263 #: ../fish/guestfish-commands.pod:154
18271 #: ../fish/guestfish-commands.pod:156
18272 msgid "This is used to view a file."
18276 #: ../fish/guestfish-commands.pod:158
18278 "The default viewer is C<$PAGER>. However if you use the alternate command "
18279 "C<less> you will get the C<less> command specifically."
18283 #: ../fish/guestfish-commands.pod:161
18288 #: ../fish/guestfish-commands.pod:163
18296 #: ../fish/guestfish-commands.pod:165
18298 "Close and reopen the libguestfs handle. It is not necessary to use this "
18299 "normally, because the handle is closed properly when guestfish exits. "
18300 "However this is occasionally useful for testing."
18304 #: ../fish/guestfish-commands.pod:169
18309 #: ../fish/guestfish-commands.pod:171
18312 " setenv VAR value\n"
18317 #: ../fish/guestfish-commands.pod:173
18318 msgid "Set the environment variable C<VAR> to the string C<value>."
18322 #: ../fish/guestfish-commands.pod:175
18323 msgid "To print the value of an environment variable use a shell command such as:"
18327 #: ../fish/guestfish-commands.pod:178
18335 #: ../fish/guestfish-commands.pod:180
18340 #: ../fish/guestfish-commands.pod:182
18343 " sparse filename size\n"
18348 #: ../fish/guestfish-commands.pod:184
18350 "This creates an empty sparse file of the given size, and then adds so it can "
18351 "be further examined."
18355 #: ../fish/guestfish-commands.pod:187
18357 "In all respects it works the same as the L</alloc> command, except that the "
18358 "image file is allocated sparsely, which means that disk blocks are not "
18359 "assigned to the file until they are needed. Sparse disk files only use "
18360 "space when written to, but they are slower and there is a danger you could "
18361 "run out of real disk space during a write operation."
18365 #: ../fish/guestfish-commands.pod:197
18370 #: ../fish/guestfish-commands.pod:199
18378 #: ../fish/guestfish-commands.pod:201
18380 "This command returns a list of the optional groups known to the daemon, and "
18381 "indicates which ones are supported by this build of the libguestfs "
18386 #: ../fish/guestfish-commands.pod:205
18387 msgid "See also L<guestfs(3)/AVAILABILITY>."
18391 #: ../fish/guestfish-commands.pod:207
18396 #: ../fish/guestfish-commands.pod:209
18399 " time command args...\n"
18404 #: ../fish/guestfish-commands.pod:211
18406 "Run the command as usual, but print the elapsed time afterwards. This can "
18407 "be useful for benchmarking operations."
18411 #: ../fish/guestfish-commands.pod:214
18416 #: ../fish/guestfish-commands.pod:216
18424 #: ../fish/guestfish-commands.pod:218
18425 msgid "Remove C<VAR> from the environment."
18429 #: ../fish/guestfish.pod:5
18430 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
18434 #: ../fish/guestfish.pod:9
18437 " guestfish [--options] [commands]\n"
18442 #: ../fish/guestfish.pod:11
18450 #: ../fish/guestfish.pod:13
18453 " guestfish [--ro|--rw] -a disk.img\n"
18458 #: ../fish/guestfish.pod:15
18461 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
18466 #: ../fish/guestfish.pod:17
18469 " guestfish -d libvirt-domain\n"
18474 #: ../fish/guestfish.pod:19
18477 " guestfish [--ro|--rw] -a disk.img -i\n"
18482 #: ../fish/guestfish.pod:21
18485 " guestfish -d libvirt-domain -i\n"
18490 #: ../fish/guestfish.pod:25
18492 "Using guestfish in read/write mode on live virtual machines can be "
18493 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
18494 "option to use guestfish safely if the disk image or virtual machine might be "
18499 #: ../fish/guestfish.pod:32
18501 "Guestfish is a shell and command-line tool for examining and modifying "
18502 "virtual machine filesystems. It uses libguestfs and exposes all of the "
18503 "functionality of the guestfs API, see L<guestfs(3)>."
18507 #: ../fish/guestfish.pod:36
18509 "Guestfish gives you structured access to the libguestfs API, from shell "
18510 "scripts or the command line or interactively. If you want to rescue a "
18511 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
18516 #: ../fish/guestfish.pod:43
18517 msgid "As an interactive shell"
18521 #: ../fish/guestfish.pod:45
18529 #: ../fish/guestfish.pod:47
18532 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
18533 " editing virtual machine filesystems.\n"
18538 #: ../fish/guestfish.pod:50
18541 " Type: 'help' for a list of commands\n"
18542 " 'man' to read the manual\n"
18543 " 'quit' to quit the shell\n"
18548 #: ../fish/guestfish.pod:54
18551 " ><fs> add-ro disk.img\n"
18553 " ><fs> list-filesystems\n"
18554 " /dev/sda1: ext4\n"
18555 " /dev/vg_guest/lv_root: ext4\n"
18556 " /dev/vg_guest/lv_swap: swap\n"
18557 " ><fs> mount /dev/vg_guest/lv_root /\n"
18558 " ><fs> cat /etc/fstab\n"
18560 " # Created by anaconda\n"
18567 #: ../fish/guestfish.pod:67
18568 msgid "From shell scripts"
18572 #: ../fish/guestfish.pod:69
18573 msgid "Create a new C</etc/motd> file in a guest or disk image:"
18577 #: ../fish/guestfish.pod:71
18580 " guestfish <<_EOF_\n"
18583 " mount /dev/vg_guest/lv_root /\n"
18584 " write /etc/motd \"Welcome, new users\"\n"
18590 #: ../fish/guestfish.pod:78
18591 msgid "List the LVM logical volumes in a disk image:"
18595 #: ../fish/guestfish.pod:80
18598 " guestfish -a disk.img --ro <<_EOF_\n"
18606 #: ../fish/guestfish.pod:85
18607 msgid "List all the filesystems in a disk image:"
18611 #: ../fish/guestfish.pod:87
18614 " guestfish -a disk.img --ro <<_EOF_\n"
18616 " list-filesystems\n"
18622 #: ../fish/guestfish.pod:92
18623 msgid "On one command line"
18627 #: ../fish/guestfish.pod:94 ../fish/virt-copy-in.pod:31
18628 msgid "Update C</etc/resolv.conf> in a guest:"
18632 #: ../fish/guestfish.pod:96
18636 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
18637 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
18642 #: ../fish/guestfish.pod:100
18643 msgid "Edit C</boot/grub/grub.conf> interactively:"
18647 #: ../fish/guestfish.pod:102
18650 " guestfish --rw --add disk.img \\\n"
18651 " --mount /dev/vg_guest/lv_root \\\n"
18652 " --mount /dev/sda1:/boot \\\n"
18653 " edit /boot/grub/grub.conf\n"
18658 #: ../fish/guestfish.pod:107
18659 msgid "Mount disks automatically"
18663 #: ../fish/guestfish.pod:109
18665 "Use the I<-i> option to automatically mount the disks from a virtual "
18670 #: ../fish/guestfish.pod:112
18673 " guestfish --ro -a disk.img -i cat /etc/group\n"
18678 #: ../fish/guestfish.pod:114
18681 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
18686 #: ../fish/guestfish.pod:116
18687 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
18691 #: ../fish/guestfish.pod:118
18694 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
18699 #: ../fish/guestfish.pod:120
18700 msgid "As a script interpreter"
18704 #: ../fish/guestfish.pod:122
18705 msgid "Create a 100MB disk containing an ext2-formatted partition:"
18709 #: ../fish/guestfish.pod:124
18712 " #!/usr/bin/guestfish -f\n"
18713 " sparse test1.img 100M\n"
18715 " part-disk /dev/sda mbr\n"
18716 " mkfs ext2 /dev/sda1\n"
18721 #: ../fish/guestfish.pod:130
18722 msgid "Start with a prepared disk"
18726 #: ../fish/guestfish.pod:132
18728 "An alternate way to create a 100MB disk called C<test1.img> containing a "
18729 "single ext2-formatted partition:"
18733 #: ../fish/guestfish.pod:135 ../src/guestfs.pod:2243
18736 " guestfish -N fs\n"
18741 #: ../fish/guestfish.pod:137
18742 msgid "To list what is available do:"
18746 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:1042
18749 " guestfish -N help | less\n"
18754 #: ../fish/guestfish.pod:141
18755 msgid "Remote control"
18759 #: ../fish/guestfish.pod:143
18762 " eval \"`guestfish --listen`\"\n"
18763 " guestfish --remote add-ro disk.img\n"
18764 " guestfish --remote run\n"
18765 " guestfish --remote lvs\n"
18770 #: ../fish/guestfish.pod:154
18771 msgid "Displays general help on options."
18775 #: ../fish/guestfish.pod:158
18776 msgid "B<--cmd-help>"
18780 #: ../fish/guestfish.pod:160
18781 msgid "Lists all available guestfish commands."
18785 #: ../fish/guestfish.pod:162
18790 #: ../fish/guestfish.pod:164
18791 msgid "B<--cmd-help cmd>"
18795 #: ../fish/guestfish.pod:166
18796 msgid "Displays detailed help on a single command C<cmd>."
18800 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:96
18801 msgid "B<-a image>"
18805 #: ../fish/guestfish.pod:170 ../fuse/guestmount.pod:98
18806 msgid "B<--add image>"
18810 #: ../fish/guestfish.pod:172
18811 msgid "Add a block device or virtual machine image to the shell."
18815 #: ../fish/guestfish.pod:177
18817 "Using this flag is mostly equivalent to using the C<add> command, with "
18818 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
18819 "the I<--format=...> flag was given."
18823 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:109
18825 "When used in conjunction with the I<-d> option, this specifies the libvirt "
18826 "URI to use. The default is to use the default libvirt connection."
18830 #: ../fish/guestfish.pod:189
18835 #: ../fish/guestfish.pod:191
18837 "If using the I<--listen> option and a csh-like shell, use this option. See "
18838 "section L</REMOTE CONTROL AND CSH> below."
18842 #: ../fish/guestfish.pod:194 ../fuse/guestmount.pod:113
18843 msgid "B<-d libvirt-domain>"
18847 #: ../fish/guestfish.pod:196 ../fuse/guestmount.pod:115
18848 msgid "B<--domain libvirt-domain>"
18852 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:117
18854 "Add disks from the named libvirt domain. If the I<--ro> option is also "
18855 "used, then any libvirt domain can be used. However in write mode, only "
18856 "libvirt domains which are shut down can be named here."
18860 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:121
18861 msgid "Domain UUIDs can be used instead of names."
18865 #: ../fish/guestfish.pod:204
18867 "Using this flag is mostly equivalent to using the C<add-domain> command, "
18868 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
18869 "if the I<--format:...> flag was given."
18873 #: ../fish/guestfish.pod:208
18878 #: ../fish/guestfish.pod:210
18879 msgid "B<--no-dest-paths>"
18883 #: ../fish/guestfish.pod:212
18885 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
18886 "to hit the tab key to complete paths on the guest filesystem, but this "
18887 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
18888 "allow this feature to be disabled."
18892 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:137
18894 "When prompting for keys and passphrases, guestfish normally turns echoing "
18895 "off so you cannot see what you are typing. If you are not worried about "
18896 "Tempest attacks and there is no one else in the room you can specify this "
18897 "flag to see what you are typing."
18901 #: ../fish/guestfish.pod:224
18906 #: ../fish/guestfish.pod:226
18907 msgid "B<--file file>"
18911 #: ../fish/guestfish.pod:228
18912 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
18916 #: ../fish/guestfish.pod:231
18919 " #!/usr/bin/guestfish -f\n"
18924 #: ../fish/guestfish.pod:244
18927 " guestfish --format=raw -a disk.img\n"
18932 #: ../fish/guestfish.pod:248
18935 " guestfish --format=raw -a disk.img --format -a another.img\n"
18940 #: ../fish/guestfish.pod:253
18942 "If you have untrusted raw-format guest disk images, you should use this "
18943 "option to specify the disk format. This avoids a possible security problem "
18944 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
18948 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:166
18949 msgid "B<--inspector>"
18953 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:168
18955 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
18956 "system and mount filesystems as they would be mounted on the real virtual "
18961 #: ../fish/guestfish.pod:266
18962 msgid "Typical usage is either:"
18966 #: ../fish/guestfish.pod:268
18969 " guestfish -d myguest -i\n"
18974 #: ../fish/guestfish.pod:270
18975 msgid "(for an inactive libvirt domain called I<myguest>), or:"
18979 #: ../fish/guestfish.pod:272
18982 " guestfish --ro -d myguest -i\n"
18987 #: ../fish/guestfish.pod:274
18988 msgid "(for active domains, readonly), or specify the block device directly:"
18992 #: ../fish/guestfish.pod:276
18995 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
19000 #: ../fish/guestfish.pod:278
19002 "Note that the command line syntax changed slightly over older versions of "
19003 "guestfish. You can still use the old syntax:"
19007 #: ../fish/guestfish.pod:281
19010 " guestfish [--ro] -i disk.img\n"
19015 #: ../fish/guestfish.pod:283
19018 " guestfish [--ro] -i libvirt-domain\n"
19023 #: ../fish/guestfish.pod:285
19025 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
19026 "then using other commands to mount the filesystems that were found."
19030 #: ../fish/guestfish.pod:294
19031 msgid "B<--listen>"
19035 #: ../fish/guestfish.pod:296
19037 "Fork into the background and listen for remote commands. See section "
19038 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
19042 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:177
19047 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:179
19049 "Connect to a live virtual machine. (Experimental, see "
19050 "L<guestfs(3)/ATTACHING TO RUNNING DAEMONS>)."
19054 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:182
19055 msgid "B<-m dev[:mountpoint[:options]]>"
19059 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:184
19060 msgid "B<--mount dev[:mountpoint[:options]]>"
19064 #: ../fish/guestfish.pod:308
19065 msgid "Mount the named partition or logical volume on the given mountpoint."
19069 #: ../fish/guestfish.pod:310
19070 msgid "If the mountpoint is omitted, it defaults to C</>."
19074 #: ../fish/guestfish.pod:312
19075 msgid "You have to mount something on C</> before most commands will work."
19079 #: ../fish/guestfish.pod:314
19081 "If any I<-m> or I<--mount> options are given, the guest is automatically "
19086 #: ../fish/guestfish.pod:317
19088 "If you don't know what filesystems a disk image contains, you can either run "
19089 "guestfish without this option, then list the partitions, filesystems and LVs "
19090 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
19091 "commands), or you can use the L<virt-filesystems(1)> program."
19095 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:192
19097 "The third (and rarely used) part of the mount parameter is the list of mount "
19098 "options used to mount the underlying filesystem. If this is not given, then "
19099 "the mount options are either the empty string or C<ro> (the latter if the "
19100 "I<--ro> flag is used). By specifying the mount options, you override this "
19101 "default choice. Probably the only time you would use this is to enable ACLs "
19102 "and/or extended attributes if the filesystem can support them:"
19106 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:200
19109 " -m /dev/sda1:/:acl,user_xattr\n"
19114 #: ../fish/guestfish.pod:333
19115 msgid "Using this flag is equivalent to using the C<mount-options> command."
19119 #: ../fish/guestfish.pod:335 ../fuse/guestmount.pod:202 ../resize/virt-resize.pod:435
19124 #: ../fish/guestfish.pod:337 ../fuse/guestmount.pod:204
19125 msgid "B<--no-sync>"
19129 #: ../fish/guestfish.pod:339
19131 "Disable autosync. This is enabled by default. See the discussion of "
19132 "autosync in the L<guestfs(3)> manpage."
19136 #: ../fish/guestfish.pod:342
19141 #: ../fish/guestfish.pod:344
19142 msgid "B<--new type>"
19146 #: ../fish/guestfish.pod:346
19151 #: ../fish/guestfish.pod:348
19153 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
19154 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
19155 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
19160 #: ../fish/guestfish.pod:353
19161 msgid "B<--progress-bars>"
19165 #: ../fish/guestfish.pod:355
19166 msgid "Enable progress bars, even when guestfish is used non-interactively."
19170 #: ../fish/guestfish.pod:357
19172 "Progress bars are enabled by default when guestfish is used as an "
19173 "interactive shell."
19177 #: ../fish/guestfish.pod:360
19178 msgid "B<--no-progress-bars>"
19182 #: ../fish/guestfish.pod:362
19183 msgid "Disable progress bars."
19187 #: ../fish/guestfish.pod:364
19188 msgid "B<--remote[=pid]>"
19192 #: ../fish/guestfish.pod:366
19194 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
19195 "CONTROL GUESTFISH OVER A SOCKET> below."
19199 #: ../fish/guestfish.pod:369 ../fuse/guestmount.pod:248 ../rescue/virt-rescue.pod:189
19204 #: ../fish/guestfish.pod:371 ../fuse/guestmount.pod:250 ../rescue/virt-rescue.pod:191
19209 #: ../fish/guestfish.pod:373
19211 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
19212 "mounts are done read-only."
19216 #: ../fish/guestfish.pod:376 ../rescue/virt-rescue.pod:195
19218 "The option must always be used if the disk image or virtual machine might be "
19219 "running, and is generally recommended in cases where you don't need write "
19220 "access to the disk."
19224 #: ../fish/guestfish.pod:380
19226 "Note that prepared disk images created with I<-N> are not affected by this "
19227 "option. Also commands like C<add> are not affected - you have to specify "
19228 "the C<readonly:true> option explicitly if you need it."
19232 #: ../fish/guestfish.pod:384
19233 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
19237 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:262 ../rescue/virt-rescue.pod:201
19238 msgid "B<--selinux>"
19242 #: ../fish/guestfish.pod:388
19243 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
19247 #: ../fish/guestfish.pod:394
19249 "Enable very verbose messages. This is particularly useful if you find a "
19254 #: ../fish/guestfish.pod:401
19255 msgid "Display the guestfish / libguestfs version number and exit."
19259 #: ../fish/guestfish.pod:403 ../fuse/guestmount.pod:278 ../rescue/virt-rescue.pod:231
19264 #: ../fish/guestfish.pod:405 ../fuse/guestmount.pod:280 ../rescue/virt-rescue.pod:233
19269 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:282
19271 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
19272 "mounts are done read-write."
19276 #: ../fish/guestfish.pod:410
19277 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
19281 #: ../fish/guestfish.pod:414
19282 msgid "Echo each command before executing it."
19286 #: ../fish/guestfish.pod:418
19287 msgid "COMMANDS ON COMMAND LINE"
19291 #: ../fish/guestfish.pod:420
19292 msgid "Any additional (non-option) arguments are treated as commands to execute."
19296 #: ../fish/guestfish.pod:423
19298 "Commands to execute should be separated by a colon (C<:>), where the colon "
19299 "is a separate parameter. Thus:"
19303 #: ../fish/guestfish.pod:426
19306 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
19311 #: ../fish/guestfish.pod:428
19313 "If there are no additional arguments, then we enter a shell, either an "
19314 "interactive shell with a prompt (if the input is a terminal) or a "
19315 "non-interactive shell."
19319 #: ../fish/guestfish.pod:432
19321 "In either command line mode or non-interactive shell, the first command that "
19322 "gives an error causes the whole shell to exit. In interactive mode (with a "
19323 "prompt) if a command fails, you can continue to enter commands."
19327 #: ../fish/guestfish.pod:437
19328 msgid "USING launch (OR run)"
19332 #: ../fish/guestfish.pod:439
19334 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
19335 "then launch it, then mount any disks you need, and finally issue "
19336 "actions/commands. So the general order of the day is:"
19340 #: ../fish/guestfish.pod:447
19341 msgid "add or -a/--add"
19345 #: ../fish/guestfish.pod:451
19346 msgid "launch (aka run)"
19350 #: ../fish/guestfish.pod:455
19351 msgid "mount or -m/--mount"
19355 #: ../fish/guestfish.pod:459
19356 msgid "any other commands"
19360 #: ../fish/guestfish.pod:463
19362 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
19363 "guest before mounting or performing any other commands."
19367 #: ../fish/guestfish.pod:466
19369 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
19370 "I<--new> options were given then C<run> is done automatically, simply "
19371 "because guestfish can't perform the action you asked for without doing this."
19375 #: ../fish/guestfish.pod:471
19376 msgid "OPENING DISKS FOR READ AND WRITE"
19380 #: ../fish/guestfish.pod:473
19382 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
19383 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
19384 "I<-i> and I<-m> open disk images read-only or for writing."
19388 #: ../fish/guestfish.pod:478
19390 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
19391 "opening disk images supplied on the command line for write. To open a disk "
19392 "image read-only you have to do I<-a image --ro>."
19396 #: ../fish/guestfish.pod:482
19398 "This matters: If you accidentally open a live VM disk image writable then "
19399 "you will cause irreversible disk corruption."
19403 #: ../fish/guestfish.pod:485
19405 "In a future libguestfs we intend to change the default the other way. Disk "
19406 "images will be opened read-only. You will have to either specify "
19407 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
19408 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
19409 "access for disk images specified by those other command line options."
19413 #: ../fish/guestfish.pod:492
19415 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
19416 "which does nothing (it is already the default). However it is highly "
19417 "recommended that you use this option to indicate that you need write access, "
19418 "and prepare your scripts for the day when this option will be required for "
19423 #: ../fish/guestfish.pod:498
19425 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
19426 "other libguestfs program apart from guestfish and guestmount."
19430 #: ../fish/guestfish.pod:501
19435 #: ../fish/guestfish.pod:503
19437 "You can quote ordinary parameters using either single or double quotes. For "
19442 #: ../fish/guestfish.pod:506
19445 " add \"file with a space.img\"\n"
19450 #: ../fish/guestfish.pod:508
19453 " rm '/file name'\n"
19458 #: ../fish/guestfish.pod:510
19466 #: ../fish/guestfish.pod:512
19468 "A few commands require a list of strings to be passed. For these, use a "
19469 "whitespace-separated list, enclosed in quotes. Strings containing "
19470 "whitespace to be passed through must be enclosed in single quotes. A "
19471 "literal single quote must be escaped with a backslash."
19475 #: ../fish/guestfish.pod:517
19478 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
19479 " command \"/bin/echo 'foo bar'\"\n"
19480 " command \"/bin/echo \\'foo\\'\"\n"
19485 #: ../fish/guestfish.pod:521
19486 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
19490 #: ../fish/guestfish.pod:523
19492 "In double-quoted arguments (only) use backslash to insert special "
19497 #: ../fish/guestfish.pod:528
19502 #: ../fish/guestfish.pod:530
19503 msgid "Alert (bell) character."
19507 #: ../fish/guestfish.pod:532
19512 #: ../fish/guestfish.pod:534
19513 msgid "Backspace character."
19517 #: ../fish/guestfish.pod:536
19522 #: ../fish/guestfish.pod:538
19523 msgid "Form feed character."
19527 #: ../fish/guestfish.pod:540
19532 #: ../fish/guestfish.pod:542
19533 msgid "Newline character."
19537 #: ../fish/guestfish.pod:544
19542 #: ../fish/guestfish.pod:546
19543 msgid "Carriage return character."
19547 #: ../fish/guestfish.pod:548
19552 #: ../fish/guestfish.pod:550
19553 msgid "Horizontal tab character."
19557 #: ../fish/guestfish.pod:552
19562 #: ../fish/guestfish.pod:554
19563 msgid "Vertical tab character."
19567 #: ../fish/guestfish.pod:556
19572 #: ../fish/guestfish.pod:558
19573 msgid "A literal double quote character."
19577 #: ../fish/guestfish.pod:560
19582 #: ../fish/guestfish.pod:562
19584 "A character with octal value I<ooo>. There must be precisely 3 octal digits "
19589 #: ../fish/guestfish.pod:565
19594 #: ../fish/guestfish.pod:567
19595 msgid "A character with hex value I<hh>. There must be precisely 2 hex digits."
19599 #: ../fish/guestfish.pod:570
19601 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
19606 #: ../fish/guestfish.pod:573
19611 #: ../fish/guestfish.pod:575
19612 msgid "A literal backslash character."
19616 #: ../fish/guestfish.pod:579
19617 msgid "OPTIONAL ARGUMENTS"
19621 #: ../fish/guestfish.pod:581
19623 "Some commands take optional arguments. These arguments appear in this "
19624 "documentation as C<[argname:..]>. You can use them as in these examples:"
19628 #: ../fish/guestfish.pod:585
19631 " add-drive-opts filename\n"
19636 #: ../fish/guestfish.pod:587
19639 " add-drive-opts filename readonly:true\n"
19644 #: ../fish/guestfish.pod:589
19647 " add-drive-opts filename format:qcow2 readonly:false\n"
19652 #: ../fish/guestfish.pod:591
19654 "Each optional argument can appear at most once. All optional arguments must "
19655 "appear after the required ones."
19659 #: ../fish/guestfish.pod:594
19664 #: ../fish/guestfish.pod:596
19665 msgid "This section applies to all commands which can take integers as parameters."
19669 #: ../fish/guestfish.pod:599
19670 msgid "SIZE SUFFIX"
19674 #: ../fish/guestfish.pod:601
19676 "When the command takes a parameter measured in bytes, you can use one of the "
19677 "following suffixes to specify kilobytes, megabytes and larger sizes:"
19681 #: ../fish/guestfish.pod:607
19682 msgid "B<k> or B<K> or B<KiB>"
19686 #: ../fish/guestfish.pod:609
19687 msgid "The size in kilobytes (multiplied by 1024)."
19691 #: ../fish/guestfish.pod:611
19696 #: ../fish/guestfish.pod:613
19697 msgid "The size in SI 1000 byte units."
19701 #: ../fish/guestfish.pod:615
19702 msgid "B<M> or B<MiB>"
19706 #: ../fish/guestfish.pod:617
19707 msgid "The size in megabytes (multiplied by 1048576)."
19711 #: ../fish/guestfish.pod:619
19716 #: ../fish/guestfish.pod:621
19717 msgid "The size in SI 1000000 byte units."
19721 #: ../fish/guestfish.pod:623
19722 msgid "B<G> or B<GiB>"
19726 #: ../fish/guestfish.pod:625
19727 msgid "The size in gigabytes (multiplied by 2**30)."
19731 #: ../fish/guestfish.pod:627
19736 #: ../fish/guestfish.pod:629
19737 msgid "The size in SI 10**9 byte units."
19741 #: ../fish/guestfish.pod:631
19742 msgid "B<T> or B<TiB>"
19746 #: ../fish/guestfish.pod:633
19747 msgid "The size in terabytes (multiplied by 2**40)."
19751 #: ../fish/guestfish.pod:635
19756 #: ../fish/guestfish.pod:637
19757 msgid "The size in SI 10**12 byte units."
19761 #: ../fish/guestfish.pod:639
19762 msgid "B<P> or B<PiB>"
19766 #: ../fish/guestfish.pod:641
19767 msgid "The size in petabytes (multiplied by 2**50)."
19771 #: ../fish/guestfish.pod:643
19776 #: ../fish/guestfish.pod:645
19777 msgid "The size in SI 10**15 byte units."
19781 #: ../fish/guestfish.pod:647
19782 msgid "B<E> or B<EiB>"
19786 #: ../fish/guestfish.pod:649
19787 msgid "The size in exabytes (multiplied by 2**60)."
19791 #: ../fish/guestfish.pod:651
19796 #: ../fish/guestfish.pod:653
19797 msgid "The size in SI 10**18 byte units."
19801 #: ../fish/guestfish.pod:655
19802 msgid "B<Z> or B<ZiB>"
19806 #: ../fish/guestfish.pod:657
19807 msgid "The size in zettabytes (multiplied by 2**70)."
19811 #: ../fish/guestfish.pod:659
19816 #: ../fish/guestfish.pod:661
19817 msgid "The size in SI 10**21 byte units."
19821 #: ../fish/guestfish.pod:663
19822 msgid "B<Y> or B<YiB>"
19826 #: ../fish/guestfish.pod:665
19827 msgid "The size in yottabytes (multiplied by 2**80)."
19831 #: ../fish/guestfish.pod:667
19836 #: ../fish/guestfish.pod:669
19837 msgid "The size in SI 10**24 byte units."
19841 #: ../fish/guestfish.pod:675
19844 " truncate-size /file 1G\n"
19849 #: ../fish/guestfish.pod:677
19850 msgid "would truncate the file to 1 gigabyte."
19854 #: ../fish/guestfish.pod:679
19856 "Be careful because a few commands take sizes in kilobytes or megabytes "
19857 "(eg. the parameter to L</memsize> is specified in megabytes already). "
19858 "Adding a suffix will probably not do what you expect."
19862 #: ../fish/guestfish.pod:683
19863 msgid "OCTAL AND HEXADECIMAL NUMBERS"
19867 #: ../fish/guestfish.pod:685
19869 "For specifying the radix (base) use the C convention: C<0> to prefix an "
19870 "octal number or C<0x> to prefix a hexadecimal number. For example:"
19874 #: ../fish/guestfish.pod:688
19877 " 1234 decimal number 1234\n"
19878 " 02322 octal number, equivalent to decimal 1234\n"
19879 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
19884 #: ../fish/guestfish.pod:692
19886 "When using the C<chmod> command, you almost always want to specify an octal "
19887 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
19888 "L<chmod(1)> program):"
19892 #: ../fish/guestfish.pod:696
19895 " chmod 0777 /public # OK\n"
19896 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
19901 #: ../fish/guestfish.pod:699
19903 "Commands that return numbers usually print them in decimal, but some "
19904 "commands print numbers in other radices (eg. C<umask> prints the mode in "
19905 "octal, preceeded by C<0>)."
19909 #: ../fish/guestfish.pod:703
19910 msgid "WILDCARDS AND GLOBBING"
19914 #: ../fish/guestfish.pod:705
19916 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
19917 "(globbing) by default. So for example the following will not do what you "
19922 #: ../fish/guestfish.pod:709
19930 #: ../fish/guestfish.pod:711
19932 "Assuming you don't have a directory called literally C</home/*> then the "
19933 "above command will return an error."
19937 #: ../fish/guestfish.pod:714
19938 msgid "To perform wildcard expansion, use the C<glob> command."
19942 #: ../fish/guestfish.pod:716
19945 " glob rm-rf /home/*\n"
19950 #: ../fish/guestfish.pod:718
19952 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
19953 "many times), equivalent to:"
19957 #: ../fish/guestfish.pod:721
19960 " rm-rf /home/jim\n"
19961 " rm-rf /home/joe\n"
19962 " rm-rf /home/mary\n"
19967 #: ../fish/guestfish.pod:725
19968 msgid "C<glob> only works on simple guest paths and not on device names."
19972 #: ../fish/guestfish.pod:727
19974 "If you have several parameters, each containing a wildcard, then glob will "
19975 "perform a Cartesian product."
19979 #: ../fish/guestfish.pod:730
19984 #: ../fish/guestfish.pod:732
19986 "Any line which starts with a I<#> character is treated as a comment and "
19987 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
19988 "a command. For example:"
19992 #: ../fish/guestfish.pod:736
19995 " # this is a comment\n"
19996 " # this is a comment\n"
19997 " foo # NOT a comment\n"
20002 #: ../fish/guestfish.pod:740
20003 msgid "Blank lines are also ignored."
20007 #: ../fish/guestfish.pod:742
20008 msgid "RUNNING COMMANDS LOCALLY"
20012 #: ../fish/guestfish.pod:744
20014 "Any line which starts with a I<!> character is treated as a command sent to "
20015 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
20019 #: ../fish/guestfish.pod:748
20023 " tgz-out /remote local/remote-data.tar.gz\n"
20028 #: ../fish/guestfish.pod:751
20030 "will create a directory C<local> on the host, and then export the contents "
20031 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
20032 "(See C<tgz-out>)."
20036 #: ../fish/guestfish.pod:755
20038 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
20039 "effect, due to the way that subprocesses work in Unix."
20043 #: ../fish/guestfish.pod:758
20044 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
20048 #: ../fish/guestfish.pod:760
20050 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
20051 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
20052 "and executed as guestfish commands."
20056 #: ../fish/guestfish.pod:764
20058 "Thus you can use shell script to construct arbitrary guestfish commands "
20059 "which are then parsed by guestfish."
20063 #: ../fish/guestfish.pod:767
20065 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
20066 "through C</foo.100>) using guestfish commands alone. However this is simple "
20067 "if we use a shell script to create the guestfish commands for us:"
20071 #: ../fish/guestfish.pod:772
20074 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
20079 #: ../fish/guestfish.pod:774
20080 msgid "or with names like C</foo.001>:"
20084 #: ../fish/guestfish.pod:776
20087 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
20092 #: ../fish/guestfish.pod:778
20094 "When using guestfish interactively it can be helpful to just run the shell "
20095 "script first (ie. remove the initial C<E<lt>> character so it is just an "
20096 "ordinary I<!> local command), see what guestfish commands it would run, and "
20097 "when you are happy with those prepend the C<E<lt>> character to run the "
20098 "guestfish commands for real."
20102 #: ../fish/guestfish.pod:784
20107 #: ../fish/guestfish.pod:786
20109 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
20110 "command (a guestfish command) to the second command (any host command). For "
20115 #: ../fish/guestfish.pod:790
20118 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
20123 #: ../fish/guestfish.pod:792
20125 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
20126 "program). The above command would list all accounts in the guest filesystem "
20127 "which have UID 0, ie. root accounts including backdoors. Other examples:"
20131 #: ../fish/guestfish.pod:797
20134 " hexdump /bin/ls | head\n"
20135 " list-devices | tail -1\n"
20136 " tgz-out / - | tar ztf -\n"
20141 #: ../fish/guestfish.pod:801
20143 "The space before the pipe symbol is required, any space after the pipe "
20144 "symbol is optional. Everything after the pipe symbol is just passed "
20145 "straight to the host shell, so it can contain redirections, globs and "
20146 "anything else that makes sense on the host side."
20150 #: ../fish/guestfish.pod:806
20152 "To use a literal argument which begins with a pipe symbol, you have to quote "
20157 #: ../fish/guestfish.pod:809
20165 #: ../fish/guestfish.pod:811
20166 msgid "HOME DIRECTORIES"
20170 #: ../fish/guestfish.pod:813
20172 "If a parameter starts with the character C<~> then the tilde may be expanded "
20173 "as a home directory path (either C<~> for the current user's home directory, "
20174 "or C<~user> for another user)."
20178 #: ../fish/guestfish.pod:817
20180 "Note that home directory expansion happens for users known I<on the host>, "
20181 "not in the guest filesystem."
20185 #: ../fish/guestfish.pod:820
20187 "To use a literal argument which begins with a tilde, you have to quote it, "
20192 #: ../fish/guestfish.pod:823
20200 #: ../fish/guestfish.pod:825 ../src/guestfs.pod:534
20201 msgid "ENCRYPTED DISKS"
20205 #: ../fish/guestfish.pod:827
20207 "Libguestfs has some support for Linux guests encrypted according to the "
20208 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
20209 "disk encryption systems used by modern Linux guests. Currently only "
20210 "LVM-on-LUKS is supported."
20214 #: ../fish/guestfish.pod:832
20215 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
20219 #: ../fish/guestfish.pod:834
20222 " ><fs> vfs-type /dev/sda2\n"
20228 #: ../fish/guestfish.pod:837
20230 "Then open those devices using L</luks-open>. This creates a device-mapper "
20231 "device called C</dev/mapper/luksdev>."
20235 #: ../fish/guestfish.pod:840
20238 " ><fs> luks-open /dev/sda2 luksdev\n"
20239 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
20244 #: ../fish/guestfish.pod:843
20246 "Finally you have to tell LVM to scan for volume groups on the newly created "
20251 #: ../fish/guestfish.pod:846
20255 " vg-activate-all true\n"
20260 #: ../fish/guestfish.pod:849
20261 msgid "The logical volume(s) can now be mounted in the usual way."
20265 #: ../fish/guestfish.pod:851
20267 "Before closing a LUKS device you must unmount any logical volumes on it and "
20268 "deactivate the volume groups by calling C<vg-activate false VG> on each "
20269 "one. Then you can close the mapper device:"
20273 #: ../fish/guestfish.pod:855
20276 " vg-activate false /dev/VG\n"
20277 " luks-close /dev/mapper/luksdev\n"
20282 #: ../fish/guestfish.pod:860
20284 "If a path is prefixed with C<win:> then you can use Windows-style drive "
20285 "letters and paths (with some limitations). The following commands are "
20290 #: ../fish/guestfish.pod:864
20293 " file /WINDOWS/system32/config/system.LOG\n"
20298 #: ../fish/guestfish.pod:866
20301 " file win:\\windows\\system32\\config\\system.log\n"
20306 #: ../fish/guestfish.pod:868
20309 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
20314 #: ../fish/guestfish.pod:870
20316 "The parameter is rewritten \"behind the scenes\" by looking up the position "
20317 "where the drive is mounted, prepending that to the path, changing all "
20318 "backslash characters to forward slash, then resolving the result using "
20319 "L</case-sensitive-path>. For example if the E: drive was mounted on C</e> "
20320 "then the parameter might be rewritten like this:"
20324 #: ../fish/guestfish.pod:876
20327 " win:e:\\foo\\bar => /e/FOO/bar\n"
20332 #: ../fish/guestfish.pod:878
20333 msgid "This only works in argument positions that expect a path."
20337 #: ../fish/guestfish.pod:880
20338 msgid "UPLOADING AND DOWNLOADING FILES"
20342 #: ../fish/guestfish.pod:882
20344 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
20345 "others which upload from or download to a local file, you can use the "
20346 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
20350 #: ../fish/guestfish.pod:886
20358 #: ../fish/guestfish.pod:888
20359 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
20363 #: ../fish/guestfish.pod:891
20366 " tar-out /etc - | tar tf -\n"
20371 #: ../fish/guestfish.pod:893
20373 "writes the tarball to stdout and then pipes that into the external \"tar\" "
20374 "command (see L</PIPES>)."
20378 #: ../fish/guestfish.pod:896
20380 "When using C<-> to read from stdin, the input is read up to the end of "
20381 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
20382 "some arbitrary end marker:"
20386 #: ../fish/guestfish.pod:900
20389 " upload -<<END /foo\n"
20398 #: ../fish/guestfish.pod:906
20400 "Any string of characters can be used instead of C<END>. The end marker must "
20401 "appear on a line of its own, without any preceeding or following characters "
20402 "(not even spaces)."
20406 #: ../fish/guestfish.pod:910
20408 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
20409 "upload local files (so-called \"FileIn\" parameters in the generator)."
20413 #: ../fish/guestfish.pod:913
20414 msgid "EXIT ON ERROR BEHAVIOUR"
20418 #: ../fish/guestfish.pod:915
20420 "By default, guestfish will ignore any errors when in interactive mode "
20421 "(ie. taking commands from a human over a tty), and will exit on the first "
20422 "error in non-interactive mode (scripts, commands given on the command line)."
20426 #: ../fish/guestfish.pod:920
20428 "If you prefix a command with a I<-> character, then that command will not "
20429 "cause guestfish to exit, even if that (one) command returns an error."
20433 #: ../fish/guestfish.pod:924
20434 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
20438 #: ../fish/guestfish.pod:926
20440 "Guestfish can be remote-controlled over a socket. This is useful "
20441 "particularly in shell scripts where you want to make several different "
20442 "changes to a filesystem, but you don't want the overhead of starting up a "
20443 "guestfish process each time."
20447 #: ../fish/guestfish.pod:931
20448 msgid "Start a guestfish server process using:"
20452 #: ../fish/guestfish.pod:933
20455 " eval \"`guestfish --listen`\"\n"
20460 #: ../fish/guestfish.pod:935
20461 msgid "and then send it commands by doing:"
20465 #: ../fish/guestfish.pod:937
20468 " guestfish --remote cmd [...]\n"
20473 #: ../fish/guestfish.pod:939
20474 msgid "To cause the server to exit, send it the exit command:"
20478 #: ../fish/guestfish.pod:943
20480 "Note that the server will normally exit if there is an error in a command. "
20481 "You can change this in the usual way. See section L</EXIT ON ERROR "
20486 #: ../fish/guestfish.pod:947
20487 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
20491 #: ../fish/guestfish.pod:949
20493 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
20494 "is how the I<--remote> option knows where to send the commands. You can "
20495 "have several guestfish listener processes running using:"
20499 #: ../fish/guestfish.pod:953
20502 " eval \"`guestfish --listen`\"\n"
20503 " pid1=$GUESTFISH_PID\n"
20504 " eval \"`guestfish --listen`\"\n"
20505 " pid2=$GUESTFISH_PID\n"
20507 " guestfish --remote=$pid1 cmd\n"
20508 " guestfish --remote=$pid2 cmd\n"
20513 #: ../fish/guestfish.pod:961
20514 msgid "REMOTE CONTROL AND CSH"
20518 #: ../fish/guestfish.pod:963
20520 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
20525 #: ../fish/guestfish.pod:966
20528 " eval \"`guestfish --listen --csh`\"\n"
20533 #: ../fish/guestfish.pod:968
20534 msgid "REMOTE CONTROL DETAILS"
20538 #: ../fish/guestfish.pod:970
20540 "Remote control happens over a Unix domain socket called "
20541 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
20542 "of the process, and C<$PID> is the process ID of the server."
20546 #: ../fish/guestfish.pod:974
20547 msgid "Guestfish client and server versions must match exactly."
20551 #: ../fish/guestfish.pod:976
20552 msgid "USING REMOTE CONTROL ROBUSTLY FROM SHELL SCRIPTS"
20556 #: ../fish/guestfish.pod:978
20558 "From Bash, you can use the following code which creates a guestfish "
20559 "instance, correctly quotes the command line, handles failure to start, and "
20560 "cleans up guestfish when the script exits:"
20564 #: ../fish/guestfish.pod:982 ../src/guestfs.pod:980
20572 #: ../fish/guestfish.pod:986
20575 " guestfish[0]=\"guestfish\"\n"
20576 " guestfish[1]=\"--listen\"\n"
20577 " guestfish[2]=\"--ro\"\n"
20578 " guestfish[3]=\"-a\"\n"
20579 " guestfish[4]=\"disk.img\"\n"
20584 #: ../fish/guestfish.pod:992
20587 " GUESTFISH_PID=\n"
20588 " eval $(\"${guestfish[@]}\")\n"
20589 " if [ -z \"$GUESTFISH_PID\" ]; then\n"
20590 " echo \"error: guestfish didn't start up, see error messages above\"\n"
20597 #: ../fish/guestfish.pod:999
20600 " cleanup_guestfish ()\n"
20602 " guestfish --remote -- exit >/dev/null 2>&1 ||:\n"
20604 " trap cleanup_guestfish EXIT ERR\n"
20609 #: ../fish/guestfish.pod:1005
20612 " guestfish --remote -- run\n"
20617 #: ../fish/guestfish.pod:1007
20625 #: ../fish/guestfish.pod:1009
20626 msgid "REMOTE CONTROL RUN COMMAND HANGING"
20630 #: ../fish/guestfish.pod:1011
20632 "Using the C<run> (or C<launch>) command remotely in a command substitution "
20633 "context hangs, ie. don't do (note the backquotes):"
20637 #: ../fish/guestfish.pod:1014
20640 " a=`guestfish --remote run`\n"
20645 #: ../fish/guestfish.pod:1016
20647 "Since the C<run> command produces no output on stdout, this is not useful "
20648 "anyway. For further information see "
20649 "L<https://bugzilla.redhat.com/show_bug.cgi?id=592910>."
20653 #: ../fish/guestfish.pod:1020
20654 msgid "PREPARED DISK IMAGES"
20658 #: ../fish/guestfish.pod:1022
20660 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
20661 "preformatted disk images that guestfish can make for you to save typing. "
20662 "This is particularly useful for testing purposes. This option is used "
20663 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
20664 "can be mixed with I<-a>)."
20668 #: ../fish/guestfish.pod:1028
20670 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
20671 "the second and so on. Existing files in the current directory are "
20676 #: ../fish/guestfish.pod:1032
20678 "The type briefly describes how the disk should be sized, partitioned, how "
20679 "filesystem(s) should be created, and how content should be added. "
20680 "Optionally the type can be followed by extra parameters, separated by C<:> "
20681 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
20682 "sparsely-allocated disk, containing a single partition, with the partition "
20683 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
20684 "on a 1GB disk instead."
20688 #: ../fish/guestfish.pod:1040
20689 msgid "To list the available types and any extra parameters they take, run:"
20693 #: ../fish/guestfish.pod:1044
20695 "Note that the prepared filesystem is not mounted. You would usually have to "
20696 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
20700 #: ../fish/guestfish.pod:1048
20702 "If any I<-N> or I<--new> options are given, the guest is automatically "
20707 #: ../fish/guestfish.pod:1053
20708 msgid "Create a 100MB disk with an ext4-formatted partition:"
20712 #: ../fish/guestfish.pod:1055
20715 " guestfish -N fs:ext4\n"
20720 #: ../fish/guestfish.pod:1057
20721 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
20725 #: ../fish/guestfish.pod:1059
20728 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
20733 #: ../fish/guestfish.pod:1061
20734 msgid "Create a blank 200MB disk:"
20738 #: ../fish/guestfish.pod:1063
20741 " guestfish -N disk:200M\n"
20746 #: ../fish/guestfish.pod:1065
20747 msgid "PROGRESS BARS"
20751 #: ../fish/guestfish.pod:1067
20753 "Some (not all) long-running commands send progress notification messages as "
20754 "they are running. Guestfish turns these messages into progress bars."
20758 #: ../fish/guestfish.pod:1071
20760 "When a command that supports progress bars takes longer than two seconds to "
20761 "run, and if progress bars are enabled, then you will see one appearing below "
20766 #: ../fish/guestfish.pod:1075
20769 " ><fs> copy-size /large-file /another-file 2048M\n"
20770 " / 10% [#####-----------------------------------------] 00:30\n"
20775 #: ../fish/guestfish.pod:1078
20777 "The spinner on the left hand side moves round once for every progress "
20778 "notification received from the backend. This is a (reasonably) golden "
20779 "assurance that the command is \"doing something\" even if the progress bar "
20780 "is not moving, because the command is able to send the progress "
20781 "notifications. When the bar reaches 100% and the command finishes, the "
20782 "spinner disappears."
20786 #: ../fish/guestfish.pod:1085
20788 "Progress bars are enabled by default when guestfish is used interactively. "
20789 "You can enable them even for non-interactive modes using I<--progress-bars>, "
20790 "and you can disable them completely using I<--no-progress-bars>."
20794 #: ../fish/guestfish.pod:1090
20795 msgid "GUESTFISH COMMANDS"
20799 #: ../fish/guestfish.pod:1092
20801 "The commands in this section are guestfish convenience commands, in other "
20802 "words, they are not part of the L<guestfs(3)> API."
20806 #: ../fish/guestfish.pod:1095
20811 #: ../fish/guestfish.pod:1097
20820 #: ../fish/guestfish.pod:1100
20821 msgid "Without any parameter, this provides general help."
20825 #: ../fish/guestfish.pod:1102
20826 msgid "With a C<cmd> parameter, this displays detailed help for that command."
20830 #: ../fish/guestfish.pod:1104
20831 msgid "quit | exit"
20835 #: ../fish/guestfish.pod:1106
20836 msgid "This exits guestfish. You can also use C<^D> key."
20840 #: ../fish/guestfish.pod:1108
20841 msgid "@FISH_COMMANDS@"
20845 #: ../fish/guestfish.pod:1110
20850 #: ../fish/guestfish.pod:1112 ../src/guestfs.pod:1520
20855 #: ../fish/guestfish.pod:1116
20857 "guestfish returns 0 if the commands completed without error, or 1 if there "
20862 #: ../fish/guestfish.pod:1123
20867 #: ../fish/guestfish.pod:1125
20869 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
20874 #: ../fish/guestfish.pod:1128 ../src/guestfs.pod:3213
20875 msgid "FEBOOTSTRAP_KERNEL"
20879 #: ../fish/guestfish.pod:1130 ../src/guestfs.pod:3215
20880 msgid "FEBOOTSTRAP_MODULES"
20884 #: ../fish/guestfish.pod:1132 ../src/guestfs.pod:3217
20886 "These two environment variables allow the kernel that libguestfs uses in the "
20887 "appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not set, then the "
20888 "most recent host kernel is chosen. For more information about kernel "
20889 "selection, see L<febootstrap-supermin-helper(8)>. This feature is only "
20890 "available in febootstrap E<ge> 3.8."
20894 #: ../fish/guestfish.pod:1138
20895 msgid "GUESTFISH_DISPLAY_IMAGE"
20899 #: ../fish/guestfish.pod:1140
20901 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
20902 "If not set, it uses L<display(1)>."
20906 #: ../fish/guestfish.pod:1143
20907 msgid "GUESTFISH_PID"
20911 #: ../fish/guestfish.pod:1145
20913 "Used with the I<--remote> option to specify the remote guestfish process to "
20914 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
20918 #: ../fish/guestfish.pod:1149
20923 #: ../fish/guestfish.pod:1151
20925 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
20926 "not specified, the external L<hexedit(1)> program is used."
20930 #: ../fish/guestfish.pod:1155
20935 #: ../fish/guestfish.pod:1157
20937 "If compiled with GNU readline support, various files in the home directory "
20938 "can be used. See L</FILES>."
20942 #: ../fish/guestfish.pod:1160 ../src/guestfs.pod:3223
20943 msgid "LIBGUESTFS_APPEND"
20947 #: ../fish/guestfish.pod:1162 ../src/guestfs.pod:3225
20948 msgid "Pass additional options to the guest kernel."
20952 #: ../fish/guestfish.pod:1164 ../src/guestfs.pod:3227
20953 msgid "LIBGUESTFS_DEBUG"
20957 #: ../fish/guestfish.pod:1166
20959 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
20960 "effect as using the B<-v> option."
20964 #: ../fish/guestfish.pod:1169 ../src/guestfs.pod:3232
20965 msgid "LIBGUESTFS_MEMSIZE"
20969 #: ../fish/guestfish.pod:1171 ../src/guestfs.pod:3234
20970 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
20974 #: ../fish/guestfish.pod:1174 ../src/guestfs.pod:3237
20977 " LIBGUESTFS_MEMSIZE=700\n"
20982 #: ../fish/guestfish.pod:1176 ../src/guestfs.pod:3239
20983 msgid "LIBGUESTFS_PATH"
20987 #: ../fish/guestfish.pod:1178
20989 "Set the path that guestfish uses to search for kernel and initrd.img. See "
20990 "the discussion of paths in L<guestfs(3)>."
20994 #: ../fish/guestfish.pod:1181 ../src/guestfs.pod:3244
20995 msgid "LIBGUESTFS_QEMU"
20999 #: ../fish/guestfish.pod:1183 ../src/guestfs.pod:3246
21001 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
21002 "which was found at compile time by the configure script is used."
21006 #: ../fish/guestfish.pod:1187 ../src/guestfs.pod:3252
21007 msgid "LIBGUESTFS_TRACE"
21011 #: ../fish/guestfish.pod:1189
21012 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
21016 #: ../fish/guestfish.pod:1191
21021 #: ../fish/guestfish.pod:1193
21023 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
21028 #: ../fish/guestfish.pod:1196 ../sparsify/virt-sparsify.pod:236 ../src/guestfs.pod:3257
21033 #: ../fish/guestfish.pod:1198 ../src/guestfs.pod:3259
21035 "Location of temporary directory, defaults to C</tmp> except for the cached "
21036 "supermin appliance which defaults to C</var/tmp>."
21040 #: ../fish/guestfish.pod:1201 ../src/guestfs.pod:3262
21042 "If libguestfs was compiled to use the supermin appliance then the real "
21043 "appliance is cached in this directory, shared between all handles belonging "
21044 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
21045 "use in case C</var/tmp> is not large enough."
21049 #: ../fish/guestfish.pod:1209 ../fuse/guestmount.pod:297 ../rescue/virt-rescue.pod:310
21054 #: ../fish/guestfish.pod:1213 ../fuse/guestmount.pod:301 ../rescue/virt-rescue.pod:314
21055 msgid "$HOME/.libguestfs-tools.rc"
21059 #: ../fish/guestfish.pod:1215 ../fuse/guestmount.pod:303 ../rescue/virt-rescue.pod:316
21060 msgid "/etc/libguestfs-tools.conf"
21064 #: ../fish/guestfish.pod:1217 ../fuse/guestmount.pod:305 ../rescue/virt-rescue.pod:318
21066 "This configuration file controls the default read-only or read-write mode "
21067 "(I<--ro> or I<--rw>)."
21071 #: ../fish/guestfish.pod:1220
21072 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
21076 #: ../fish/guestfish.pod:1222
21077 msgid "$HOME/.guestfish"
21081 #: ../fish/guestfish.pod:1224
21083 "If compiled with GNU readline support, then the command history is saved in "
21088 #: ../fish/guestfish.pod:1227
21089 msgid "$HOME/.inputrc"
21093 #: ../fish/guestfish.pod:1229
21094 msgid "/etc/inputrc"
21098 #: ../fish/guestfish.pod:1231
21100 "If compiled with GNU readline support, then these files can be used to "
21101 "configure readline. For further information, please see "
21102 "L<readline(3)/INITIALIZATION FILE>."
21106 #: ../fish/guestfish.pod:1235
21107 msgid "To write rules which only apply to guestfish, use:"
21111 #: ../fish/guestfish.pod:1237
21121 #: ../fish/guestfish.pod:1241
21123 "Variables that you can set in inputrc that change the behaviour of guestfish "
21124 "in useful ways include:"
21128 #: ../fish/guestfish.pod:1246
21129 msgid "completion-ignore-case (default: on)"
21133 #: ../fish/guestfish.pod:1248
21135 "By default, guestfish will ignore case when tab-completing paths on the "
21140 #: ../fish/guestfish.pod:1251
21143 " set completion-ignore-case off\n"
21148 #: ../fish/guestfish.pod:1253
21149 msgid "to make guestfish case sensitive."
21153 #: ../fish/guestfish.pod:1257
21158 #: ../fish/guestfish.pod:1259
21159 msgid "test2.img (etc)"
21163 #: ../fish/guestfish.pod:1261
21165 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
21166 "will be created in the file C<test1.img> in the current directory. The "
21167 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
21168 "the same name will be overwritten."
21172 #: ../fish/guestfish.pod:1270
21174 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-alignment-scan(1)>, "
21175 "L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, "
21176 "L<virt-edit(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, "
21177 "L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, "
21178 "L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
21179 "L<virt-sparsify(1)>, L<virt-sysprep(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, "
21180 "L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<display(1)>, L<hexedit(1)>, "
21181 "L<febootstrap-supermin-helper(8)>."
21185 #: ../fish/guestfish.pod:1302 ../src/guestfs.pod:3355 ../test-tool/libguestfs-test-tool.pod:112
21186 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
21190 #: ../fish/virt-copy-in.pod:5
21191 msgid "virt-copy-in - Copy files and directories into a virtual machine disk image."
21195 #: ../fish/virt-copy-in.pod:9
21198 " virt-copy-in -a disk.img file|dir [file|dir ...] /destination\n"
21203 #: ../fish/virt-copy-in.pod:11
21206 " virt-copy-in -d domain file|dir [file|dir ...] /destination\n"
21211 #: ../fish/virt-copy-in.pod:15
21213 "Using C<virt-copy-in> on live virtual machines can be dangerous, potentially "
21214 "causing disk corruption. The virtual machine must be shut down before you "
21215 "use this command."
21219 #: ../fish/virt-copy-in.pod:21
21221 "C<virt-copy-in> copies files and directories from the local disk into a "
21222 "virtual machine disk image or named libvirt domain."
21226 #: ../fish/virt-copy-in.pod:24
21228 "You can give one of more filenames and directories on the command line. "
21229 "Directories are copied in recursively. The final parameter must be the "
21230 "destination directory in the disk image which must be an absolute path "
21231 "starting with a C</> character."
21235 #: ../fish/virt-copy-in.pod:33
21238 " virt-copy-in -d MyGuest resolv.conf /etc\n"
21243 #: ../fish/virt-copy-in.pod:35 ../fish/virt-tar-in.pod:32
21244 msgid "Upload a home directory to a guest:"
21248 #: ../fish/virt-copy-in.pod:37
21251 " virt-copy-in -d MyGuest skel /home\n"
21256 #: ../fish/virt-copy-in.pod:39 ../fish/virt-copy-out.pod:28 ../fish/virt-tar-in.pod:36 ../fish/virt-tar-out.pod:30
21257 msgid "JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH"
21261 #: ../fish/virt-copy-in.pod:41
21263 "This command is just a simple shell script wrapper around the "
21264 "L<guestfish(1)> C<copy-in> command. For anything more complex than a "
21265 "trivial copy, you are probably better off using guestfish directly."
21269 #: ../fish/virt-copy-in.pod:47 ../fish/virt-copy-out.pod:36 ../fish/virt-tar-in.pod:44 ../fish/virt-tar-out.pod:38
21271 "Since the shell script just passes options straight to guestfish, read "
21272 "L<guestfish(1)> to see the full list of options."
21276 #: ../fish/virt-copy-in.pod:52
21278 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
21279 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
21283 #: ../fish/virt-copy-in.pod:66 ../fish/virt-copy-out.pod:55 ../fish/virt-tar-in.pod:64 ../fish/virt-tar-out.pod:57
21284 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
21288 #: ../fish/virt-copy-out.pod:5
21290 "virt-copy-out - Copy files and directories out of a virtual machine disk "
21295 #: ../fish/virt-copy-out.pod:9
21298 " virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir\n"
21303 #: ../fish/virt-copy-out.pod:11
21306 " virt-copy-out -d domain /file|dir [/file|dir ...] localdir\n"
21311 #: ../fish/virt-copy-out.pod:15
21313 "C<virt-copy-out> copies files and directories out of a virtual machine disk "
21314 "image or named libvirt domain."
21318 #: ../fish/virt-copy-out.pod:18
21320 "You can give one of more filenames and directories on the command line. "
21321 "Directories are copied out recursively."
21325 #: ../fish/virt-copy-out.pod:23
21326 msgid "Download the home directories from a virtual machine:"
21330 #: ../fish/virt-copy-out.pod:25
21334 " virt-copy-out -d MyGuest /home homes\n"
21339 #: ../fish/virt-copy-out.pod:30
21341 "This command is just a simple shell script wrapper around the "
21342 "L<guestfish(1)> C<copy-out> command. For anything more complex than a "
21343 "trivial copy, you are probably better off using guestfish directly."
21347 #: ../fish/virt-copy-out.pod:41
21349 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-edit(1)>, "
21350 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
21354 #: ../fish/virt-tar-in.pod:5
21355 msgid "virt-tar-in - Unpack a tarball into a virtual machine disk image."
21359 #: ../fish/virt-tar-in.pod:9
21362 " virt-tar-in -a disk.img data.tar /destination\n"
21367 #: ../fish/virt-tar-in.pod:11
21370 " virt-tar-in -d domain data.tar /destination\n"
21375 #: ../fish/virt-tar-in.pod:13
21378 " zcat data.tar.gz | virt-tar-in -d domain - /destination\n"
21383 #: ../fish/virt-tar-in.pod:17
21385 "Using C<virt-tar-in> on live virtual machines can be dangerous, potentially "
21386 "causing disk corruption. The virtual machine must be shut down before you "
21387 "use this command."
21391 #: ../fish/virt-tar-in.pod:23
21393 "C<virt-tar-in> unpacks an uncompressed tarball into a virtual machine disk "
21394 "image or named libvirt domain."
21398 #: ../fish/virt-tar-in.pod:26
21400 "The first parameter is the tar file. Use C<-> to read the tar file from "
21401 "standard input. The second parameter is the absolute target directory to "
21406 #: ../fish/virt-tar-in.pod:34
21409 " virt-tar-in -d MyGuest homes.tar /home\n"
21414 #: ../fish/virt-tar-in.pod:38
21416 "This command is just a simple shell script wrapper around the "
21417 "L<guestfish(1)> C<tar-in> command. For anything more complex than a trivial "
21418 "copy, you are probably better off using guestfish directly."
21422 #: ../fish/virt-tar-in.pod:49
21424 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
21425 "L<virt-edit(1)>, L<virt-make-fs(1)>, L<virt-tar-out(1)>, "
21426 "L<http://libguestfs.org/>."
21430 #: ../fish/virt-tar-out.pod:5
21431 msgid "virt-tar-out - Pack a virtual machine disk image directory into a tarball."
21435 #: ../fish/virt-tar-out.pod:9
21438 " virt-tar-out -a disk.img /dir files.tar\n"
21443 #: ../fish/virt-tar-out.pod:11
21446 " virt-tar-out -d domain /dir files.tar\n"
21451 #: ../fish/virt-tar-out.pod:13
21454 " virt-tar-out -d domain /dir - | gzip --best > files.tar.gz\n"
21459 #: ../fish/virt-tar-out.pod:17
21460 msgid "C<virt-tar-out> packs a virtual machine disk image directory into a tarball."
21464 #: ../fish/virt-tar-out.pod:20
21466 "The first parameter is the absolute path of the virtual machine directory. "
21467 "The second parameter is the tar file to write. Use C<-> to write to "
21472 #: ../fish/virt-tar-out.pod:26
21473 msgid "Download the home directories from a guest:"
21477 #: ../fish/virt-tar-out.pod:28
21480 " virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz\n"
21485 #: ../fish/virt-tar-out.pod:32
21487 "This command is just a simple shell script wrapper around the "
21488 "L<guestfish(1)> C<tar-out> command. For anything more complex than a "
21489 "trivial copy, you are probably better off using guestfish directly."
21493 #: ../fish/virt-tar-out.pod:43
21495 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
21496 "L<virt-edit(1)>, L<virt-tar-in(1)>, L<http://libguestfs.org/>."
21500 #: ../fuse/guestmount.pod:5
21501 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
21505 #: ../fuse/guestmount.pod:9
21508 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
21513 #: ../fuse/guestmount.pod:11
21516 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
21521 #: ../fuse/guestmount.pod:13
21524 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
21529 #: ../fuse/guestmount.pod:17
21531 "You must I<not> use C<guestmount> in read-write mode on live virtual "
21532 "machines. If you do this, you risk disk corruption in the VM."
21536 #: ../fuse/guestmount.pod:22
21538 "The guestmount program can be used to mount virtual machine filesystems and "
21539 "other disk images on the host. It uses libguestfs for access to the guest "
21540 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
21541 "a mountable device."
21545 #: ../fuse/guestmount.pod:27
21547 "Along with other options, you have to give at least one device (I<-a> "
21548 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
21549 "option) or use the I<-i> inspection option or the I<--live> option. How "
21550 "this works is better explained in the L<guestfish(1)> manual page, or by "
21551 "looking at the examples below."
21555 #: ../fuse/guestmount.pod:33
21557 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
21558 "by you, and the filesystem will not be visible to any other users unless you "
21559 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
21560 "the filesystem, use the C<fusermount -u> command."
21564 #: ../fuse/guestmount.pod:41
21566 "For a typical Windows guest which has its main filesystem on the first "
21571 #: ../fuse/guestmount.pod:44
21574 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
21579 #: ../fuse/guestmount.pod:46
21581 "For a typical Linux guest which has a /boot filesystem on the first "
21582 "partition, and the root filesystem on a logical volume:"
21586 #: ../fuse/guestmount.pod:49
21589 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
21594 #: ../fuse/guestmount.pod:51
21595 msgid "To get libguestfs to detect guest mountpoints for you:"
21599 #: ../fuse/guestmount.pod:53
21602 " guestmount -a guest.img -i --ro /mnt\n"
21607 #: ../fuse/guestmount.pod:55
21608 msgid "For a libvirt guest called \"Guest\" you could do:"
21612 #: ../fuse/guestmount.pod:57
21615 " guestmount -d Guest -i --ro /mnt\n"
21620 #: ../fuse/guestmount.pod:59
21622 "If you don't know what filesystems are contained in a guest or disk image, "
21623 "use L<virt-filesystems(1)> first:"
21627 #: ../fuse/guestmount.pod:62
21630 " virt-filesystems MyGuest\n"
21635 #: ../fuse/guestmount.pod:64
21637 "If you want to trace the libguestfs calls but without excessive debugging "
21638 "information, we recommend:"
21642 #: ../fuse/guestmount.pod:67
21645 " guestmount [...] --trace /mnt\n"
21650 #: ../fuse/guestmount.pod:69
21651 msgid "If you want to debug the program, we recommend:"
21655 #: ../fuse/guestmount.pod:71
21658 " guestmount [...] --trace --verbose /mnt\n"
21663 #: ../fuse/guestmount.pod:73 ../rescue/virt-rescue.pod:96 ../resize/virt-resize.pod:621
21668 #: ../fuse/guestmount.pod:75
21669 msgid "Other users cannot see the filesystem by default"
21673 #: ../fuse/guestmount.pod:77
21675 "If you mount a filesystem as one user (eg. root), then other users will not "
21676 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
21677 "option when mounting:"
21681 #: ../fuse/guestmount.pod:81
21684 " sudo guestmount [...] -o allow_other /mnt\n"
21689 #: ../fuse/guestmount.pod:83
21690 msgid "Enabling FUSE"
21694 #: ../fuse/guestmount.pod:85
21696 "On some distros, you may need to add yourself to a special group "
21697 "(eg. C<fuse>) before you can use any FUSE filesystem. This is necessary on "
21698 "Debian and derivatives."
21702 #: ../fuse/guestmount.pod:89
21704 "On other distros, no special group is required. It is not necessary on "
21705 "Fedora or Red Hat Enterprise Linux."
21709 #: ../fuse/guestmount.pod:100
21710 msgid "Add a block device or virtual machine image."
21714 #: ../fuse/guestmount.pod:123
21715 msgid "B<--dir-cache-timeout N>"
21719 #: ../fuse/guestmount.pod:125
21721 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
21722 "seconds. The readdir cache [actually, there are several semi-independent "
21723 "caches] is populated after a readdir(2) call with the stat and extended "
21724 "attributes of the files in the directory, in anticipation that they will be "
21725 "requested soon after."
21729 #: ../fuse/guestmount.pod:131
21731 "There is also a different attribute cache implemented by FUSE (see the FUSE "
21732 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
21733 "requests, only cache existing ones."
21737 #: ../fuse/guestmount.pod:151
21739 "If you have untrusted raw-format guest disk images, you should use this "
21740 "option to specify the disk format. This avoids a possible security problem "
21741 "with malicious guests (CVE-2010-3851). See also "
21742 "L<guestfs(3)/guestfs_add_drive_opts>."
21746 #: ../fuse/guestmount.pod:156
21747 msgid "B<--fuse-help>"
21751 #: ../fuse/guestmount.pod:158
21752 msgid "Display help on special FUSE options (see I<-o> below)."
21756 #: ../fuse/guestmount.pod:162
21757 msgid "Display brief help and exit."
21761 #: ../fuse/guestmount.pod:186
21763 "Mount the named partition or logical volume on the given mountpoint B<in the "
21764 "guest> (this has nothing to do with mountpoints in the host)."
21768 #: ../fuse/guestmount.pod:189
21770 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
21771 "something on C</>."
21775 #: ../fuse/guestmount.pod:206
21777 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
21778 "unmounted. If you specify this option, then we don't attempt to sync the "
21779 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
21783 #: ../fuse/guestmount.pod:211
21784 msgid "B<-o option>"
21788 #: ../fuse/guestmount.pod:213
21789 msgid "B<--option option>"
21793 #: ../fuse/guestmount.pod:215
21794 msgid "Pass extra options to FUSE."
21798 #: ../fuse/guestmount.pod:217
21800 "To get a list of all the extra options supported by FUSE, use the command "
21801 "below. Note that only the FUSE I<-o> options can be passed, and only some "
21802 "of them are a good idea."
21806 #: ../fuse/guestmount.pod:221
21809 " guestmount --fuse-help\n"
21814 #: ../fuse/guestmount.pod:223
21815 msgid "Some potentially useful FUSE options:"
21819 #: ../fuse/guestmount.pod:227
21820 msgid "B<-o allow_other>"
21824 #: ../fuse/guestmount.pod:229
21825 msgid "Allow other users to see the filesystem."
21829 #: ../fuse/guestmount.pod:231
21830 msgid "B<-o attr_timeout=N>"
21834 #: ../fuse/guestmount.pod:233
21835 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
21839 #: ../fuse/guestmount.pod:235
21840 msgid "B<-o kernel_cache>"
21844 #: ../fuse/guestmount.pod:237
21846 "Allow the kernel to cache files (reduces the number of reads that have to go "
21847 "through the L<guestfs(3)> API). This is generally a good idea if you can "
21848 "afford the extra memory usage."
21852 #: ../fuse/guestmount.pod:241
21853 msgid "B<-o uid=N> B<-o gid=N>"
21857 #: ../fuse/guestmount.pod:243
21859 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
21860 "the chosen values."
21864 #: ../fuse/guestmount.pod:252
21866 "Add devices and mount everything read-only. Also disallow writes and make "
21867 "the disk appear read-only to FUSE."
21871 #: ../fuse/guestmount.pod:255
21873 "This is highly recommended if you are not going to edit the guest disk. If "
21874 "the guest is running and this option is I<not> supplied, then there is a "
21875 "strong risk of disk corruption in the guest. We try to prevent this from "
21876 "happening, but it is not always possible."
21880 #: ../fuse/guestmount.pod:260 ../rescue/virt-rescue.pod:199
21881 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21885 #: ../fuse/guestmount.pod:264
21886 msgid "Enable SELinux support for the guest."
21890 #: ../fuse/guestmount.pod:270
21891 msgid "Enable verbose messages from underlying libguestfs."
21895 #: ../fuse/guestmount.pod:276
21896 msgid "Display the program version and exit."
21900 #: ../fuse/guestmount.pod:285 ../fuse/guestmount.pod:308 ../rescue/virt-rescue.pod:238 ../rescue/virt-rescue.pod:321
21901 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21905 #: ../fuse/guestmount.pod:289
21910 #: ../fuse/guestmount.pod:291
21911 msgid "Trace libguestfs calls and entry into each FUSE function."
21915 #: ../fuse/guestmount.pod:293
21916 msgid "This also stops the daemon from forking into the background."
21920 #: ../fuse/guestmount.pod:319
21922 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
21923 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
21924 "L<http://fuse.sf.net/>."
21928 #: ../fuse/guestmount.pod:334
21929 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
21933 #: ../inspector/virt-inspector.pod:5
21935 "virt-inspector - Display operating system version and other information "
21936 "about a virtual machine"
21940 #: ../inspector/virt-inspector.pod:9
21943 " virt-inspector [--options] -d domname\n"
21948 #: ../inspector/virt-inspector.pod:11
21951 " virt-inspector [--options] -a disk.img [-a disk.img ...]\n"
21956 #: ../inspector/virt-inspector.pod:15
21959 " virt-inspector domname\n"
21964 #: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:148
21967 " virt-inspector disk.img [disk.img ...]\n"
21972 #: ../inspector/virt-inspector.pod:21
21974 "B<virt-inspector> examines a virtual machine or disk image and tries to "
21975 "determine the version of the operating system and other information about "
21976 "the virtual machine."
21980 #: ../inspector/virt-inspector.pod:25
21981 msgid "Virt-inspector produces XML output for feeding into other programs."
21985 #: ../inspector/virt-inspector.pod:27
21987 "In the normal usage, use C<virt-inspector -d domname> where C<domname> is "
21988 "the libvirt domain (see: C<virsh list --all>)."
21992 #: ../inspector/virt-inspector.pod:30
21994 "You can also run virt-inspector directly on disk images from a single "
21995 "virtual machine. Use C<virt-inspector -a disk.img>. In rare cases a domain "
21996 "has several block devices, in which case you should list several I<-a> "
21997 "options one after another, with the first corresponding to the guest's "
21998 "C</dev/sda>, the second to the guest's C</dev/sdb> and so on."
22002 #: ../inspector/virt-inspector.pod:37
22004 "You can also run virt-inspector on install disks, live CDs, bootable USB "
22005 "keys and similar."
22009 #: ../inspector/virt-inspector.pod:40
22011 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
22012 "inspect several virtual machines, you have to run virt-inspector several "
22013 "times (for example, from a shell script for-loop)."
22017 #: ../inspector/virt-inspector.pod:45
22019 "Because virt-inspector needs direct access to guest images, it won't "
22020 "normally work over remote libvirt connections."
22024 #: ../inspector/virt-inspector.pod:48
22026 "All of the information available from virt-inspector is also available "
22027 "through the core libguestfs inspection API (see L<guestfs(3)/INSPECTION>). "
22028 "The same information can also be fetched using guestfish or via libguestfs "
22029 "bindings in many programming languages (see L<guestfs(3)/USING LIBGUESTFS "
22030 "WITH OTHER PROGRAMMING LANGUAGES>)."
22034 #: ../inspector/virt-inspector.pod:81
22036 "Libvirt is only used if you specify a C<domname> on the command line. If "
22037 "you specify guest block devices directly (I<-a>), then libvirt is not used "
22042 #: ../inspector/virt-inspector.pod:94
22044 "When prompting for keys and passphrases, virt-inspector normally turns "
22045 "echoing off so you cannot see what you are typing. If you are not worried "
22046 "about Tempest attacks and there is no one else in the room you can specify "
22047 "this flag to see what you are typing."
22051 #: ../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
22053 "Specify the format of disk images given on the command line. If this is "
22054 "omitted then the format is autodetected from the content of the disk image."
22058 #: ../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
22060 "If disk images are requested from libvirt, then this program asks libvirt "
22061 "for this information. In this case, the value of the format parameter is "
22066 #: ../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
22068 "If working with untrusted raw-format guest disk images, you should ensure "
22069 "the format is always specified."
22073 #: ../inspector/virt-inspector.pod:135
22074 msgid "B<--xpath> query"
22078 #: ../inspector/virt-inspector.pod:137
22080 "Perform an XPath query on the XML on stdin, and print the result on stdout. "
22081 "In this mode virt-inspector simply runs an XPath query; all other inspection "
22082 "functions are disabled. See L</XPATH QUERIES> below for some examples."
22086 #: ../inspector/virt-inspector.pod:146
22087 msgid "Previous versions of virt-inspector allowed you to write either:"
22091 #: ../inspector/virt-inspector.pod:152
22094 " virt-inspector guestname\n"
22099 #: ../inspector/virt-inspector.pod:160
22104 #: ../inspector/virt-inspector.pod:162
22106 "The virt-inspector XML is described precisely in a RELAX NG schema file "
22107 "C<virt-inspector.rng> which is supplied with libguestfs. This section is "
22108 "just an overview."
22112 #: ../inspector/virt-inspector.pod:166
22114 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
22115 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
22116 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
22117 "which is vanishingly rare in real world VMs."
22121 #: ../inspector/virt-inspector.pod:171
22122 msgid "E<lt>operatingsystemE<gt>"
22126 #: ../inspector/virt-inspector.pod:173
22128 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
22129 "describe the operating system, its architecture, the descriptive \"product "
22130 "name\" string, the type of OS and so on, as in this example:"
22134 #: ../inspector/virt-inspector.pod:177
22137 " <operatingsystems>\n"
22138 " <operatingsystem>\n"
22139 " <root>/dev/sda2</root>\n"
22140 " <name>windows</name>\n"
22141 " <arch>i386</arch>\n"
22142 " <distro>windows</distro>\n"
22143 " <product_name>Windows 7 Enterprise</product_name>\n"
22144 " <product_variant>Client</product_variant>\n"
22145 " <major_version>6</major_version>\n"
22146 " <minor_version>1</minor_version>\n"
22147 " <windows_systemroot>/Windows</windows_systemroot>\n"
22148 " <format>installed</format>\n"
22153 #: ../inspector/virt-inspector.pod:190
22155 "In brief, E<lt>nameE<gt> is the class of operating system (something like "
22156 "C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
22157 "but many other distros are recognized) and E<lt>archE<gt> is the guest "
22158 "architecture. The other fields are fairly self-explanatory, but because "
22159 "these fields are taken directly from the libguestfs inspection API you can "
22160 "find precise information from L<guestfs(3)/INSPECTION>."
22164 #: ../inspector/virt-inspector.pod:198
22166 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
22167 "of view of libguestfs (block devices may have completely different names "
22168 "inside the VM itself)."
22172 #: ../inspector/virt-inspector.pod:202
22173 msgid "E<lt>mountpointsE<gt>"
22177 #: ../inspector/virt-inspector.pod:204
22179 "Un*x-like guests typically have multiple filesystems which are mounted at "
22180 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
22181 "element which looks like this:"
22185 #: ../inspector/virt-inspector.pod:208
22188 " <operatingsystems>\n"
22189 " <operatingsystem>\n"
22192 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
22193 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
22194 " </mountpoints>\n"
22199 #: ../inspector/virt-inspector.pod:216
22201 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
22202 "and may have completely different names inside the guest. Only mountable "
22203 "filesystems appear in this list, not things like swap devices."
22207 #: ../inspector/virt-inspector.pod:221
22208 msgid "E<lt>filesystemsE<gt>"
22212 #: ../inspector/virt-inspector.pod:223
22214 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
22215 "filesystems belonging to the guest, including swap and empty partitions. "
22216 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
22217 "this OS or shared with this OS and other OSes)."
22221 #: ../inspector/virt-inspector.pod:229
22222 msgid "You might see something like this:"
22226 #: ../inspector/virt-inspector.pod:231
22229 " <operatingsystems>\n"
22230 " <operatingsystem>\n"
22233 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
22234 " <type>ext4</type>\n"
22235 " <label>Fedora-13-x86_64</label>\n"
22236 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
22242 #: ../inspector/virt-inspector.pod:241
22244 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
22245 "the label, and the UUID."
22249 #: ../inspector/virt-inspector.pod:244
22250 msgid "E<lt>applicationsE<gt>"
22254 #: ../inspector/virt-inspector.pod:246
22256 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
22257 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
22262 #: ../inspector/virt-inspector.pod:250
22264 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
22265 "Typical values would be C<rpm> and C<deb>."
22269 #: ../inspector/virt-inspector.pod:253
22271 "E<lt>package_managementE<gt>, if present, describes the package manager. "
22272 "Typical values include C<yum>, C<up2date> and C<apt>"
22276 #: ../inspector/virt-inspector.pod:256
22277 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
22281 #: ../inspector/virt-inspector.pod:259
22284 " <operatingsystems>\n"
22285 " <operatingsystem>\n"
22287 " <applications>\n"
22289 " <name>coreutils</name>\n"
22290 " <version>8.5</version>\n"
22291 " <release>1</release>\n"
22292 " </application>\n"
22297 #: ../inspector/virt-inspector.pod:269
22299 "The version and release fields may not be available for some types guests. "
22300 "Other fields are possible, see "
22301 "L<guestfs(3)/guestfs_inspect_list_applications>."
22305 #: ../inspector/virt-inspector.pod:273
22306 msgid "E<lt>drive_mappingsE<gt>"
22310 #: ../inspector/virt-inspector.pod:275
22312 "For operating systems like Windows which use drive letters, virt-inspector "
22313 "is able to find out how drive letters map to filesystems."
22317 #: ../inspector/virt-inspector.pod:279
22320 " <operatingsystems>\n"
22321 " <operatingsystem>\n"
22323 " <drive_mappings>\n"
22324 " <drive_mapping name=\"C\">/dev/sda2</drive_mapping>\n"
22325 " <drive_mapping name=\"E\">/dev/sdb1</drive_mapping>\n"
22326 " </drive_mappings>\n"
22331 #: ../inspector/virt-inspector.pod:287
22333 "In the example above, drive C maps to the filesystem on the second partition "
22334 "on the first disk, and drive E maps to the filesystem on the first partition "
22335 "on the second disk."
22339 #: ../inspector/virt-inspector.pod:291
22341 "Note that this only covers permanent local filesystem mappings, not things "
22342 "like network shares. Furthermore NTFS volume mount points may not be listed "
22347 #: ../inspector/virt-inspector.pod:295
22348 msgid "E<lt>iconE<gt>"
22352 #: ../inspector/virt-inspector.pod:297
22354 "Virt-inspector is sometimes able to extract an icon or logo for the guest. "
22355 "The icon is returned as base64-encoded PNG data. Note that the icon can be "
22356 "very large and high quality."
22360 #: ../inspector/virt-inspector.pod:301
22363 " <operatingsystems>\n"
22364 " <operatingsystem>\n"
22367 " iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]\n"
22368 " [... many lines of base64 data ...]\n"
22374 #: ../inspector/virt-inspector.pod:309
22376 "To display the icon, you have to extract it and convert the base64 data back "
22377 "to a binary file. Use an XPath query or simply an editor to extract the "
22378 "data, then use the coreutils L<base64(1)> program to do the conversion back "
22383 #: ../inspector/virt-inspector.pod:314
22386 " base64 -i -d < icon.data > icon.png\n"
22391 #: ../inspector/virt-inspector.pod:316
22392 msgid "INSPECTING INSTALL DISKS, LIVE CDs"
22396 #: ../inspector/virt-inspector.pod:318
22398 "Virt-inspector can detect some operating system installers on install disks, "
22399 "live CDs, bootable USB keys and more."
22403 #: ../inspector/virt-inspector.pod:321
22405 "In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
22406 "fields may be present to indicate a live CD, network installer, or one part "
22407 "of a multipart CD. For example:"
22411 #: ../inspector/virt-inspector.pod:325
22414 " <operatingsystems>\n"
22415 " <operatingsystem>\n"
22416 " <root>/dev/sda</root>\n"
22417 " <name>linux</name>\n"
22418 " <arch>i386</arch>\n"
22419 " <distro>ubuntu</distro>\n"
22420 " <product_name>Ubuntu 10.10 "Maverick "
22421 "Meerkat"</product_name>\n"
22422 " <major_version>10</major_version>\n"
22423 " <minor_version>10</minor_version>\n"
22424 " <format>installer</format>\n"
22430 #: ../inspector/virt-inspector.pod:337
22431 msgid "XPATH QUERIES"
22435 #: ../inspector/virt-inspector.pod:339
22437 "Virt-inspector includes built in support for running XPath queries. The "
22438 "reason for including XPath support directly in virt-inspector is simply that "
22439 "there are no good and widely available command line programs that can do "
22440 "XPath queries. The only good one is L<xmlstarlet(1)> and that is not "
22441 "available on Red Hat Enterprise Linux."
22445 #: ../inspector/virt-inspector.pod:346
22447 "To perform an XPath query, use the I<--xpath> option. Note that in this "
22448 "mode, virt-inspector simply reads XML from stdin and outputs the query "
22449 "result on stdout. All other inspection features are disabled in this mode."
22453 #: ../inspector/virt-inspector.pod:353
22456 " $ virt-inspector -d Guest | virt-inspector --xpath '//filesystems'\n"
22458 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
22459 " <type>ext4</type>\n"
22465 #: ../inspector/virt-inspector.pod:359
22468 " $ virt-inspector -d Guest | \\\n"
22469 " virt-inspector --xpath "
22470 "\"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
22476 #: ../inspector/virt-inspector.pod:363
22479 " $ virt-inspector -d Guest | \\\n"
22480 " virt-inspector --xpath 'string(//icon)' | base64 -i -d | display -\n"
22481 " [displays the guest icon, if there is one]\n"
22486 #: ../inspector/virt-inspector.pod:374
22487 msgid "OLD VERSIONS OF VIRT-INSPECTOR"
22491 #: ../inspector/virt-inspector.pod:376
22493 "Early versions of libguestfs shipped with a different virt-inspector program "
22494 "written in Perl (the current version is written in C). The XML output of "
22495 "the Perl virt-inspector was different and it could also output in other "
22496 "formats like text."
22500 #: ../inspector/virt-inspector.pod:381
22501 msgid "The old virt-inspector is no longer supported or shipped with libguestfs."
22505 #: ../inspector/virt-inspector.pod:384
22507 "To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
22508 "versions of virt-inspector with different names:"
22512 #: ../inspector/virt-inspector.pod:387
22515 " virt-inspector Old Perl version.\n"
22516 " virt-inspector2 New C version.\n"
22521 #: ../inspector/virt-inspector.pod:397
22523 "L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, "
22524 "L<base64(1)>, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
22528 #: ../inspector/virt-inspector.pod:414
22529 msgid "Matthew Booth L<mbooth@redhat.com>"
22533 #: ../java/examples/guestfs-java.pod:5
22534 msgid "guestfs-java - How to use libguestfs from Java"
22538 #: ../java/examples/guestfs-java.pod:9
22541 " import com.redhat.et.libguestfs.*;\n"
22546 #: ../java/examples/guestfs-java.pod:11
22549 " GuestFS g = new GuestFS ();\n"
22550 " g.add_drive_opts (\"disk.img\", null);\n"
22556 #: ../java/examples/guestfs-java.pod:17
22558 "This manual page documents how to call libguestfs from the Java programming "
22559 "language. This page just documents the differences from the C API and gives "
22560 "some examples. If you are not familiar with using libguestfs, you also need "
22561 "to read L<guestfs(3)>."
22565 #: ../java/examples/guestfs-java.pod:22 ../ocaml/examples/guestfs-ocaml.pod:53
22566 msgid "CLOSING THE HANDLE"
22570 #: ../java/examples/guestfs-java.pod:24
22572 "The handle is closed when it is reaped by the garbage collector. Because "
22573 "libguestfs handles include a lot of state, it is also possible to close (and "
22574 "hence free) them explicitly by calling the C<close> method."
22578 #: ../java/examples/guestfs-java.pod:29 ../ocaml/examples/guestfs-ocaml.pod:60 ../python/examples/guestfs-python.pod:21 ../ruby/examples/guestfs-ruby.pod:22
22583 #: ../java/examples/guestfs-java.pod:31
22585 "Errors from libguestfs functions are mapped into the C<LibGuestFSException> "
22586 "exception. This has a single parameter which is the error message (a "
22591 #: ../java/examples/guestfs-java.pod:35
22592 msgid "Calling any method on a closed handle raises the same exception."
22596 #: ../java/examples/guestfs-java.pod:47
22598 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22599 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
22600 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>, "
22601 "L<http://caml.inria.fr/>."
22605 #: ../ocaml/examples/guestfs-ocaml.pod:5
22606 msgid "guestfs-ocaml - How to use libguestfs from OCaml"
22610 #: ../ocaml/examples/guestfs-ocaml.pod:9
22611 msgid "Module style:"
22615 #: ../ocaml/examples/guestfs-ocaml.pod:11
22618 " let g = Guestfs.create () in\n"
22619 " Guestfs.add_drive_opts g ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22620 " Guestfs.launch g;\n"
22625 #: ../ocaml/examples/guestfs-ocaml.pod:15
22626 msgid "Object-oriented style:"
22630 #: ../ocaml/examples/guestfs-ocaml.pod:17
22633 " let g = new Guestfs.guestfs () in\n"
22634 " g#add_drive_opts ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22640 #: ../ocaml/examples/guestfs-ocaml.pod:21
22643 " ocamlfind opt prog.ml -package guestfs -linkpkg -o prog\n"
22645 " ocamlopt -I +guestfs mlguestfs.cmxa prog.ml -o prog\n"
22650 #: ../ocaml/examples/guestfs-ocaml.pod:27
22652 "This manual page documents how to call libguestfs from the OCaml programming "
22653 "language. This page just documents the differences from the C API and gives "
22654 "some examples. If you are not familiar with using libguestfs, you also need "
22655 "to read L<guestfs(3)>."
22659 #: ../ocaml/examples/guestfs-ocaml.pod:32
22660 msgid "PROGRAMMING STYLES"
22664 #: ../ocaml/examples/guestfs-ocaml.pod:34
22666 "There are two different programming styles supported by the OCaml bindings. "
22667 "You can use a module style, with each C function mapped to an OCaml "
22672 #: ../ocaml/examples/guestfs-ocaml.pod:38
22675 " int guestfs_set_verbose (guestfs_h *g, int flag);\n"
22680 #: ../ocaml/examples/guestfs-ocaml.pod:40
22685 #: ../ocaml/examples/guestfs-ocaml.pod:42
22688 " val Guestfs.set_verbose : Guestfs.t -> bool -> unit\n"
22693 #: ../ocaml/examples/guestfs-ocaml.pod:44
22695 "Alternately you can use an object-oriented style, calling methods on the "
22696 "class C<Guestfs.guestfs>:"
22700 #: ../ocaml/examples/guestfs-ocaml.pod:47
22703 " method set_verbose : bool -> unit\n"
22708 #: ../ocaml/examples/guestfs-ocaml.pod:49
22710 "The object-oriented style is usually briefer, and the minor performance "
22711 "penalty isn't noticable in the general overhead of performing libguestfs "
22716 #: ../ocaml/examples/guestfs-ocaml.pod:55
22718 "The handle is closed when it is reaped by the garbage collector. Because "
22719 "libguestfs handles include a lot of state, it is also possible to close (and "
22720 "hence free) them explicitly by calling C<Guestfs.close> or the C<#close> "
22725 #: ../ocaml/examples/guestfs-ocaml.pod:62
22727 "Errors from libguestfs functions are mapped into the C<Guestfs.Error> "
22728 "exception. This has a single parameter which is the error message (a "
22733 #: ../ocaml/examples/guestfs-ocaml.pod:66
22735 "Calling any function/method on a closed handle raises "
22736 "C<Guestfs.Handle_closed>. The single parameter is the name of the function "
22741 #: ../ocaml/examples/guestfs-ocaml.pod:80
22743 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22744 "L<guestfs-java(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
22745 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>, "
22746 "L<http://caml.inria.fr/>."
22750 #: ../perl/examples/guestfs-perl.pod:5
22751 msgid "guestfs-perl - How to use libguestfs from Perl"
22755 #: ../perl/examples/guestfs-perl.pod:9
22758 " use Sys::Guestfs;\n"
22763 #: ../perl/examples/guestfs-perl.pod:11
22766 " my $h = Sys::Guestfs->new ();\n"
22767 " $h->add_drive_opts ('guest.img', format => 'raw');\n"
22768 " $h->launch ();\n"
22769 " $h->mount_options ('', '/dev/sda1', '/');\n"
22770 " $h->touch ('/hello');\n"
22776 #: ../perl/examples/guestfs-perl.pod:20
22778 "This manual page documents how to call libguestfs from the Perl programming "
22779 "language. This page just documents the differences from the C API and gives "
22780 "some examples. If you are not familiar with using libguestfs, you also need "
22781 "to read L<guestfs(3)>. To read the full Perl API, see L<Sys::Guestfs(3)>."
22785 #: ../perl/examples/guestfs-perl.pod:26
22790 #: ../perl/examples/guestfs-perl.pod:28
22792 "Errors from libguestfs functions turn into calls to C<croak> (see "
22797 #: ../perl/examples/guestfs-perl.pod:41
22799 "L<Sys::Guestfs(3)>, L<guestfs(3)>, L<guestfs-examples(3)>, "
22800 "L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, "
22801 "L<guestfs-python(3)>, L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, "
22802 "L<http://libguestfs.org/>."
22806 #: ../python/examples/guestfs-python.pod:5
22807 msgid "guestfs-python - How to use libguestfs from Python"
22811 #: ../python/examples/guestfs-python.pod:9
22814 " import guestfs\n"
22815 " g = guestfs.GuestFS ()\n"
22816 " g.add_drive_opts (\"disk.img\", format=\"raw\", readonly=1)\n"
22822 #: ../python/examples/guestfs-python.pod:16
22824 "This manual page documents how to call libguestfs from the Python "
22825 "programming language. This page just documents the differences from the C "
22826 "API and gives some examples. If you are not familiar with using libguestfs, "
22827 "you also need to read L<guestfs(3)>."
22831 #: ../python/examples/guestfs-python.pod:23
22833 "Errors from libguestfs functions are mapped into C<RuntimeException> with a "
22834 "single string argument which is the error message."
22838 #: ../python/examples/guestfs-python.pod:26
22839 msgid "MORE DOCUMENTATION"
22843 #: ../python/examples/guestfs-python.pod:28
22848 #: ../python/examples/guestfs-python.pod:30
22852 " >>> import guestfs\n"
22853 " >>> help (guestfs)\n"
22858 #: ../python/examples/guestfs-python.pod:44
22860 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22861 "L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, "
22862 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
22866 #: ../rescue/virt-rescue.pod:5
22867 msgid "virt-rescue - Run a rescue shell on a virtual machine"
22871 #: ../rescue/virt-rescue.pod:9
22874 " virt-rescue [--options] -d domname\n"
22879 #: ../rescue/virt-rescue.pod:11
22882 " virt-rescue [--options] -a disk.img [-a disk.img ...]\n"
22887 #: ../rescue/virt-rescue.pod:13
22890 " virt-rescue --suggest (-d domname | -a disk.img ...)\n"
22895 #: ../rescue/virt-rescue.pod:17
22898 " virt-rescue [--options] domname\n"
22903 #: ../rescue/virt-rescue.pod:19
22906 " virt-rescue [--options] disk.img [disk.img ...]\n"
22911 #: ../rescue/virt-rescue.pod:23
22913 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
22914 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
22915 "you from doing this, but doesn't catch all cases."
22919 #: ../rescue/virt-rescue.pod:27
22921 "However if you use the I<--ro> (read only) option, then you can attach a "
22922 "shell to a live virtual machine. The results might be strange or "
22923 "inconsistent at times but you won't get disk corruption."
22927 #: ../rescue/virt-rescue.pod:33
22929 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
22930 "need for a CD. virt-rescue gives you a rescue shell and some simple "
22931 "recovery tools which you can use to examine or rescue a virtual machine or "
22936 #: ../rescue/virt-rescue.pod:38
22938 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
22939 "on disk image(s):"
22943 #: ../rescue/virt-rescue.pod:41
22946 " virt-rescue -d GuestName\n"
22951 #: ../rescue/virt-rescue.pod:43
22954 " virt-rescue --ro -a /path/to/disk.img\n"
22959 #: ../rescue/virt-rescue.pod:45
22962 " virt-rescue -a /dev/sdc\n"
22967 #: ../rescue/virt-rescue.pod:47
22968 msgid "For live VMs you I<must> use the --ro option."
22972 #: ../rescue/virt-rescue.pod:49
22974 "When you run virt-rescue on a virtual machine or disk image, you are placed "
22975 "in an interactive bash shell where you can use many ordinary Linux "
22976 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
22977 "appliance. You must mount the virtual machine's filesystems by hand. There "
22978 "is an empty directory called C</sysroot> where you can mount filesystems."
22982 #: ../rescue/virt-rescue.pod:56
22984 "You can get virt-rescue to suggest mount commands for you by using the "
22985 "I<--suggest> option (in another terminal):"
22989 #: ../rescue/virt-rescue.pod:59
22992 " $ virt-rescue --suggest -d Fedora15\n"
22993 " Inspecting the virtual machine or disk image ...\n"
22998 #: ../rescue/virt-rescue.pod:62
23001 " This disk contains one or more operating systems. You can use these\n"
23002 " mount commands in virt-rescue (at the ><rescue> prompt) to mount the\n"
23008 #: ../rescue/virt-rescue.pod:66
23011 " # /dev/vg_f15x32/lv_root is the root of a linux operating system\n"
23012 " # type: linux, distro: fedora, version: 15.0\n"
23013 " # Fedora release 15 (Lovelock)\n"
23018 #: ../rescue/virt-rescue.pod:70
23021 " mount /dev/vg_f15x32/lv_root /sysroot/\n"
23022 " mount /dev/vda1 /sysroot/boot\n"
23023 " mount --bind /dev /sysroot/dev\n"
23024 " mount --bind /dev/pts /sysroot/dev/pts\n"
23025 " mount --bind /proc /sysroot/proc\n"
23026 " mount --bind /sys /sysroot/sys\n"
23031 #: ../rescue/virt-rescue.pod:77
23033 "Another way is to list the logical volumes (with L<lvs(8)>) and partitions "
23034 "(with L<parted(8)>) and mount them by hand:"
23038 #: ../rescue/virt-rescue.pod:80
23042 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
23043 " lv_root vg_f15x32 -wi-a- 8.83G\n"
23044 " lv_swap vg_f15x32 -wi-a- 992.00M\n"
23045 " ><rescue> mount /dev/vg_f15x32/lv_root /sysroot\n"
23046 " ><rescue> mount /dev/vda1 /sysroot/boot\n"
23047 " ><rescue> ls /sysroot\n"
23052 #: ../rescue/virt-rescue.pod:88
23053 msgid "Another command to list available filesystems is L<virt-filesystems(1)>."
23057 #: ../rescue/virt-rescue.pod:91
23059 "To run commands in a Linux guest (for example, grub), you should chroot into "
23060 "the /sysroot directory first:"
23064 #: ../rescue/virt-rescue.pod:94
23067 " ><rescue> chroot /sysroot\n"
23072 #: ../rescue/virt-rescue.pod:98
23074 "Virt-rescue can be used on I<any> disk image file or device, not just a "
23075 "virtual machine. For example you can use it on a blank file if you want to "
23076 "partition that file (although we would recommend using L<guestfish(1)> "
23077 "instead as it is more suitable for this purpose). You can even use "
23078 "virt-rescue on things like SD cards."
23082 #: ../rescue/virt-rescue.pod:104
23084 "Virt-rescue does not require root. You only need to run it as root if you "
23085 "need root to open the disk image."
23089 #: ../rescue/virt-rescue.pod:107
23091 "This tool is just designed for quick interactive hacking on a virtual "
23092 "machine. For more structured access to a virtual machine disk image, you "
23093 "should use L<guestfs(3)>. To get a structured shell that you can use to "
23094 "make scripted changes to guests, use L<guestfish(1)>."
23098 #: ../rescue/virt-rescue.pod:131
23099 msgid "B<--append kernelopts>"
23103 #: ../rescue/virt-rescue.pod:133
23104 msgid "Pass additional options to the rescue kernel."
23108 #: ../rescue/virt-rescue.pod:163
23111 " virt-rescue --format=raw -a disk.img\n"
23116 #: ../rescue/virt-rescue.pod:167
23119 " virt-rescue --format=raw -a disk.img --format -a another.img\n"
23124 #: ../rescue/virt-rescue.pod:176
23129 #: ../rescue/virt-rescue.pod:178
23130 msgid "B<--memsize MB>"
23134 #: ../rescue/virt-rescue.pod:180
23136 "Change the amount of memory allocated to the rescue system. The default is "
23137 "set by libguestfs and is small but adequate for running system tools. The "
23138 "occasional program might need more memory. The parameter is specified in "
23143 #: ../rescue/virt-rescue.pod:185
23144 msgid "B<--network>"
23148 #: ../rescue/virt-rescue.pod:187
23149 msgid "Enable QEMU user networking in the guest. See L</NETWORK>."
23153 #: ../rescue/virt-rescue.pod:193
23154 msgid "Open the image read-only."
23158 #: ../rescue/virt-rescue.pod:203
23160 "Enable SELinux in the rescue appliance. You should read "
23161 "L<guestfs(3)/SELINUX> before using this option."
23165 #: ../rescue/virt-rescue.pod:206
23170 #: ../rescue/virt-rescue.pod:208
23171 msgid "Enable N E<ge> 2 virtual CPUs in the rescue appliance."
23175 #: ../rescue/virt-rescue.pod:210
23176 msgid "B<--suggest>"
23180 #: ../rescue/virt-rescue.pod:212
23182 "Inspect the disk image and suggest what mount commands should be used to "
23183 "mount the disks. You should use the I<--suggest> option in a second "
23184 "terminal, then paste the commands into another virt-rescue."
23188 #: ../rescue/virt-rescue.pod:216
23190 "This option implies I<--ro> and is safe to use even if the guest is up or if "
23191 "another virt-rescue is running."
23195 #: ../rescue/virt-rescue.pod:235
23197 "This changes the I<-a> and I<-d> options so that disks are added and mounts "
23198 "are done read-write."
23202 #: ../rescue/virt-rescue.pod:248
23203 msgid "Previous versions of virt-rescue allowed you to write either:"
23207 #: ../rescue/virt-rescue.pod:250
23210 " virt-rescue disk.img [disk.img ...]\n"
23215 #: ../rescue/virt-rescue.pod:254
23218 " virt-rescue guestname\n"
23223 #: ../rescue/virt-rescue.pod:262
23228 #: ../rescue/virt-rescue.pod:264
23230 "Adding the I<--network> option enables QEMU user networking in the rescue "
23231 "appliance. There are some differences between user networking and ordinary "
23236 #: ../rescue/virt-rescue.pod:270
23237 msgid "ping does not work"
23241 #: ../rescue/virt-rescue.pod:272
23243 "Because the ICMP ECHO_REQUEST protocol generally requires root in order to "
23244 "send the ping packets, and because virt-rescue must be able to run as "
23245 "non-root, QEMU user networking is not able to emulate the L<ping(8)> "
23246 "command. The ping command will appear to resolve addresses but will not be "
23247 "able to send or receive any packets. This does not mean that the network is "
23252 #: ../rescue/virt-rescue.pod:279
23253 msgid "cannot receive connections"
23257 #: ../rescue/virt-rescue.pod:281
23258 msgid "QEMU user networking cannot receive incoming connections."
23262 #: ../rescue/virt-rescue.pod:283
23263 msgid "making TCP connections"
23267 #: ../rescue/virt-rescue.pod:285
23269 "The virt-rescue appliance needs to be small and so does not include many "
23270 "network tools. In particular there is no L<telnet(1)> command. You can "
23271 "make TCP connections from the shell using the magical "
23272 "C</dev/tcp/E<lt>hostnameE<gt>/E<lt>portE<gt>> syntax:"
23276 #: ../rescue/virt-rescue.pod:290
23279 " exec 3<>/dev/tcp/redhat.com/80\n"
23280 " echo \"GET /\" >&3\n"
23286 #: ../rescue/virt-rescue.pod:294
23287 msgid "See L<bash(1)> for more details."
23291 #: ../rescue/virt-rescue.pod:300
23293 "Several environment variables affect virt-rescue. See "
23294 "L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list."
23298 #: ../rescue/virt-rescue.pod:327
23300 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
23301 "L<virt-filesystems(1)>, L<http://libguestfs.org/>."
23305 #: ../resize/virt-resize.pod:5
23306 msgid "virt-resize - Resize a virtual machine disk"
23310 #: ../resize/virt-resize.pod:9
23313 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
23314 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
23315 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
23320 #: ../resize/virt-resize.pod:15
23322 "Virt-resize is a tool which can resize a virtual machine disk, making it "
23323 "larger or smaller overall, and resizing or deleting any partitions contained "
23328 #: ../resize/virt-resize.pod:19
23330 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
23331 "not> be used on live virtual machines - for consistent results, shut the "
23332 "virtual machine down before resizing it."
23336 #: ../resize/virt-resize.pod:23
23338 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
23339 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
23343 #: ../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
23348 #: ../resize/virt-resize.pod:33
23350 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
23351 "fill the extra 5GB of space."
23355 #: ../resize/virt-resize.pod:36
23358 " virt-filesystems --long -h --all -a olddisk\n"
23363 #: ../resize/virt-resize.pod:38
23366 " truncate -r olddisk newdisk\n"
23367 " truncate -s +5G newdisk\n"
23372 #: ../resize/virt-resize.pod:41
23375 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
23376 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
23381 #: ../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
23386 #: ../resize/virt-resize.pod:46
23388 "As above, but make the /boot partition 200MB bigger, while giving the "
23389 "remaining space to /dev/sda2:"
23393 #: ../resize/virt-resize.pod:49
23396 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
23397 " olddisk newdisk\n"
23402 #: ../resize/virt-resize.pod:52 ../resize/virt-resize.pod:610 ../sparsify/virt-sparsify.pod:216 ../src/guestfs.pod:501 ../src/guestfs.pod:1451
23407 #: ../resize/virt-resize.pod:54
23409 "As in the first example, but expand a logical volume as the final step. "
23410 "This is what you would typically use for Linux guests that use LVM:"
23414 #: ../resize/virt-resize.pod:58
23417 " virt-resize --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root \\\n"
23418 " olddisk newdisk\n"
23423 #: ../resize/virt-resize.pod:61
23428 #: ../resize/virt-resize.pod:63
23430 "As in the first example, but the output format will be qcow2 instead of a "
23435 #: ../resize/virt-resize.pod:66
23438 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
23439 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
23444 #: ../resize/virt-resize.pod:71
23445 msgid "DETAILED USAGE"
23449 #: ../resize/virt-resize.pod:73
23450 msgid "EXPANDING A VIRTUAL MACHINE DISK"
23454 #: ../resize/virt-resize.pod:77
23455 msgid "1. Shut down the virtual machine"
23459 #: ../resize/virt-resize.pod:79
23460 msgid "2. Locate input disk image"
23464 #: ../resize/virt-resize.pod:81
23466 "Locate the input disk image (ie. the file or device on the host containing "
23467 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
23468 "dumpxml> like this to find the disk image name:"
23472 #: ../resize/virt-resize.pod:85
23475 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
23476 " Found 1 nodes:\n"
23478 " <source dev=\"/dev/vg/lv_guest\" />\n"
23483 #: ../resize/virt-resize.pod:90
23484 msgid "3. Look at current sizing"
23488 #: ../resize/virt-resize.pod:92
23489 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
23493 #: ../resize/virt-resize.pod:95
23496 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
23497 " Name Type Size Parent\n"
23498 " /dev/sda1 partition 101M /dev/sda\n"
23499 " /dev/sda2 partition 7.9G /dev/sda\n"
23500 " /dev/sda device 8.0G -\n"
23505 #: ../resize/virt-resize.pod:101
23507 "(This example is a virtual machine with an 8 GB disk which we would like to "
23508 "expand up to 10 GB)."
23512 #: ../resize/virt-resize.pod:104
23513 msgid "4. Create output disk"
23517 #: ../resize/virt-resize.pod:106
23519 "Virt-resize cannot do in-place disk modifications. You have to have space "
23520 "to store the resized output disk."
23524 #: ../resize/virt-resize.pod:109
23525 msgid "To store the resized disk image in a file, create a file of a suitable size:"
23529 #: ../resize/virt-resize.pod:112
23532 " # rm -f outdisk\n"
23533 " # truncate -s 10G outdisk\n"
23538 #: ../resize/virt-resize.pod:115
23539 msgid "Or use L<lvcreate(1)> to create a logical volume:"
23543 #: ../resize/virt-resize.pod:117
23546 " # lvcreate -L 10G -n lv_name vg_name\n"
23551 #: ../resize/virt-resize.pod:119
23552 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
23556 #: ../resize/virt-resize.pod:121
23559 " # virsh pool-list\n"
23560 " # virsh vol-create-as poolname newvol 10G\n"
23565 #: ../resize/virt-resize.pod:124
23570 #: ../resize/virt-resize.pod:126
23572 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
23573 "file) and the output disk. The output disk is the one created in the "
23578 #: ../resize/virt-resize.pod:130
23581 " # virt-resize indisk outdisk\n"
23586 #: ../resize/virt-resize.pod:132
23588 "This command just copies disk image C<indisk> to disk image C<outdisk> "
23589 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
23590 "larger, then an extra, empty partition is created at the end of the disk "
23591 "covering the extra space. If C<outdisk> is smaller, then it will give an "
23596 #: ../resize/virt-resize.pod:138
23598 "More realistically you'd want to expand existing partitions in the disk "
23599 "image by passing extra options (for the full list see the L</OPTIONS> "
23604 #: ../resize/virt-resize.pod:142
23606 "L</--expand> is the most useful option. It expands the named partition "
23607 "within the disk to fill any extra space:"
23611 #: ../resize/virt-resize.pod:145
23614 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
23619 #: ../resize/virt-resize.pod:147
23621 "(In this case, an extra partition is I<not> created at the end of the disk, "
23622 "because there will be no unused space)."
23626 #: ../resize/virt-resize.pod:150
23628 "L</--resize> is the other commonly used option. The following would "
23629 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
23630 "rest of the available space:"
23634 #: ../resize/virt-resize.pod:154
23637 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
23638 " indisk outdisk\n"
23643 #: ../resize/virt-resize.pod:157
23645 "If the expanded partition in the image contains a filesystem or LVM PV, then "
23646 "if virt-resize knows how, it will resize the contents, the equivalent of "
23647 "calling a command such as L<pvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)> "
23648 "or L<btrfs(8)>. However virt-resize does not know how to resize some "
23649 "filesystems, so you would have to online resize them after booting the "
23654 #: ../resize/virt-resize.pod:164
23655 msgid "Other options are covered below."
23659 #: ../resize/virt-resize.pod:166
23664 #: ../resize/virt-resize.pod:168
23665 msgid "Thoroughly test the new disk image I<before> discarding the old one."
23669 #: ../resize/virt-resize.pod:170
23670 msgid "If you are using libvirt, edit the XML to point at the new disk:"
23674 #: ../resize/virt-resize.pod:172
23677 " # virsh edit guestname\n"
23682 #: ../resize/virt-resize.pod:174
23684 "Change E<lt>source ...E<gt>, see "
23685 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
23689 #: ../resize/virt-resize.pod:177
23690 msgid "Then start up the domain with the new, resized disk:"
23694 #: ../resize/virt-resize.pod:179
23697 " # virsh start guestname\n"
23702 #: ../resize/virt-resize.pod:181
23704 "and check that it still works. See also the L</NOTES> section below for "
23705 "additional information."
23709 #: ../resize/virt-resize.pod:184
23710 msgid "7. Resize LVs etc inside the guest"
23714 #: ../resize/virt-resize.pod:186
23715 msgid "(This can also be done offline using L<guestfish(1)>)"
23719 #: ../resize/virt-resize.pod:188
23721 "Once the guest has booted you should see the new space available, at least "
23722 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
23723 "may need to resize LVs inside PVs, and also resize filesystem types that "
23724 "virt-resize does not know how to expand."
23728 #: ../resize/virt-resize.pod:195
23729 msgid "SHRINKING A VIRTUAL MACHINE DISK"
23733 #: ../resize/virt-resize.pod:197
23735 "Shrinking is somewhat more complex than expanding, and only an overview is "
23740 #: ../resize/virt-resize.pod:200
23742 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
23743 "filesystems). The user has to shrink content before passing the disk image "
23744 "to virt-resize, and virt-resize will check that the content has been shrunk "
23749 #: ../resize/virt-resize.pod:205
23750 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
23754 #: ../resize/virt-resize.pod:207
23756 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
23757 "steps 3 and 4 above to allocate a new disk image."
23761 #: ../resize/virt-resize.pod:210
23762 msgid "Then run virt-resize with any of the I<--shrink> and/or I<--resize> options."
23766 #: ../resize/virt-resize.pod:213
23767 msgid "IGNORING OR DELETING PARTITIONS"
23771 #: ../resize/virt-resize.pod:215
23773 "virt-resize also gives a convenient way to ignore or delete partitions when "
23774 "copying from the input disk to the output disk. Ignoring a partition speeds "
23775 "up the copy where you don't care about the existing contents of a "
23776 "partition. Deleting a partition removes it completely, but note that it "
23777 "also renumbers any partitions after the one which is deleted, which can "
23778 "leave some guests unbootable."
23782 #: ../resize/virt-resize.pod:222
23783 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
23787 #: ../resize/virt-resize.pod:224
23789 "If the input disk is in qcow2 format, then you may prefer that the output is "
23790 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
23791 "the fly. The output format is simply determined by the format of the empty "
23792 "output container that you provide. Thus to create qcow2 output, use:"
23796 #: ../resize/virt-resize.pod:230
23799 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
23804 #: ../resize/virt-resize.pod:232
23805 msgid "instead of the truncate command (use I<-c> for a compressed disk)."
23809 #: ../resize/virt-resize.pod:234
23810 msgid "Similarly, to get non-sparse raw output use:"
23814 #: ../resize/virt-resize.pod:236
23817 " fallocate -l size outdisk\n"
23822 #: ../resize/virt-resize.pod:238
23824 "(on older systems that don't have the L<fallocate(1)> command use C<dd "
23825 "if=/dev/zero of=outdisk bs=1M count=..>)"
23829 #: ../resize/virt-resize.pod:241
23830 msgid "LOGICAL PARTITIONS"
23834 #: ../resize/virt-resize.pod:243
23836 "Logical partitions (a.k.a. C</dev/sda5+> on disks using DOS partition "
23837 "tables) cannot be resized."
23841 #: ../resize/virt-resize.pod:246
23843 "To understand what is going on, firstly one of the four partitions "
23844 "C</dev/sda1-4> will have MBR partition type C<05> or C<0f>. This is called "
23845 "the B<extended partition>. Use L<virt-filesystems(1)> to see the MBR "
23850 #: ../resize/virt-resize.pod:251
23851 msgid "Logical partitions live inside the extended partition."
23855 #: ../resize/virt-resize.pod:253
23857 "The extended partition can be expanded, but not shrunk (unless you force it, "
23858 "which is not advisable). When the extended partition is copied across, all "
23859 "the logical partitions contained inside are copied over implicitly. "
23860 "Virt-resize does not look inside the extended partition, so it copies the "
23861 "logical partitions blindly."
23865 #: ../resize/virt-resize.pod:259
23867 "You cannot specify a logical partition (C</dev/sda5+>) at all on the command "
23868 "line. Doing so will give an error."
23872 #: ../resize/virt-resize.pod:268 ../sparsify/virt-sparsify.pod:105
23873 msgid "Display help."
23877 #: ../resize/virt-resize.pod:270
23878 msgid "B<--align-first auto>"
23882 #: ../resize/virt-resize.pod:272
23883 msgid "B<--align-first never>"
23887 #: ../resize/virt-resize.pod:274
23888 msgid "B<--align-first always>"
23892 #: ../resize/virt-resize.pod:276
23894 "Align the first partition for improved performance (see also the "
23895 "I<--alignment> option)."
23899 #: ../resize/virt-resize.pod:279
23901 "The default is I<--align-first auto> which only aligns the first partition "
23902 "if it is safe to do so. That is, only when we know how to fix the "
23903 "bootloader automatically, and at the moment that can only be done for "
23908 #: ../resize/virt-resize.pod:284
23910 "I<--align-first never> means we never move the first partition. This is the "
23911 "safest option. Try this if the guest does not boot after resizing."
23915 #: ../resize/virt-resize.pod:288
23917 "I<--align-first always> means we always align the first partition (if it "
23918 "needs to be aligned). For some guests this will break the bootloader, "
23919 "making the guest unbootable."
23923 #: ../resize/virt-resize.pod:292
23924 msgid "B<--alignment N>"
23928 #: ../resize/virt-resize.pod:294
23930 "Set the alignment of partitions to C<N> sectors. The default in virt-resize "
23931 "E<lt> 1.13.19 was 64 sectors, and after that is 128 sectors."
23935 #: ../resize/virt-resize.pod:298
23937 "Assuming 512 byte sector size inside the guest, here are some suitable "
23942 #: ../resize/virt-resize.pod:303
23943 msgid "I<--alignment 1> (512 bytes)"
23947 #: ../resize/virt-resize.pod:305
23949 "The partitions would be packed together as closely as possible, but would be "
23950 "completely unaligned. In some cases this can cause very poor performance. "
23951 "See L<virt-alignment-scan(1)> for further details."
23955 #: ../resize/virt-resize.pod:309
23956 msgid "I<--alignment 8> (4K)"
23960 #: ../resize/virt-resize.pod:311
23962 "This would be the minimum acceptable alignment for reasonable performance on "
23967 #: ../resize/virt-resize.pod:314
23968 msgid "I<--alignment 128> (64K)"
23972 #: ../resize/virt-resize.pod:316
23974 "This alignment provides good performance when the host is using high end "
23979 #: ../resize/virt-resize.pod:319
23980 msgid "I<--alignment 2048> (1M)"
23984 #: ../resize/virt-resize.pod:321
23986 "This is the standard alignment used by all newly installed guests since "
23991 #: ../resize/virt-resize.pod:326
23996 #: ../resize/virt-resize.pod:328 ../tools/virt-make-fs.pl:177 ../tools/virt-win-reg.pl:120
24001 #: ../resize/virt-resize.pod:330 ../tools/virt-win-reg.pl:122
24002 msgid "Enable debugging messages."
24006 #: ../resize/virt-resize.pod:332
24007 msgid "B<--delete part>"
24011 #: ../resize/virt-resize.pod:334
24013 "Delete the named partition. It would be more accurate to describe this as "
24014 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
24015 "the original disk image is left intact."
24019 #: ../resize/virt-resize.pod:338
24021 "Note that when you delete a partition, then anything contained in the "
24022 "partition is also deleted. Furthermore, this causes any partitions that "
24023 "come after to be I<renumbered>, which can easily make your guest unbootable."
24027 #: ../resize/virt-resize.pod:343 ../resize/virt-resize.pod:404 ../resize/virt-resize.pod:531 ../sparsify/virt-sparsify.pod:145
24028 msgid "You can give this option multiple times."
24032 #: ../resize/virt-resize.pod:345
24033 msgid "B<--expand part>"
24037 #: ../resize/virt-resize.pod:347
24039 "Expand the named partition so it uses up all extra space (space left over "
24040 "after any other resize changes that you request have been done)."
24044 #: ../resize/virt-resize.pod:350
24046 "If virt-resize knows how, it will expand the direct content of the "
24047 "partition. For example, if the partition is an LVM PV, it will expand the "
24048 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
24049 "content it doesn't know about alone."
24053 #: ../resize/virt-resize.pod:355
24054 msgid "Currently virt-resize can resize:"
24058 #: ../resize/virt-resize.pod:361
24059 msgid "ext2, ext3 and ext4 filesystems."
24063 #: ../resize/virt-resize.pod:365
24064 msgid "NTFS filesystems, if libguestfs was compiled with support for NTFS."
24068 #: ../resize/virt-resize.pod:367
24070 "The filesystem must have been shut down consistently last time it was used. "
24071 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
24072 "consistency check, so at the first boot after resizing Windows will check "
24077 #: ../resize/virt-resize.pod:374
24079 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
24080 "inside the PV, but see the I<--LV-expand> option. The user could also "
24081 "resize LVs as desired after boot."
24085 #: ../resize/virt-resize.pod:380
24086 msgid "Btrfs filesystems, if libguestfs was compiled with support for btrfs."
24090 #: ../resize/virt-resize.pod:384 ../resize/virt-resize.pod:559
24091 msgid "Note that you cannot use I<--expand> and I<--shrink> together."
24095 #: ../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
24096 msgid "B<--format> raw"
24100 #: ../resize/virt-resize.pod:388 ../sparsify/virt-sparsify.pod:129
24102 "Specify the format of the input disk image. If this flag is not given then "
24103 "it is auto-detected from the image itself."
24107 #: ../resize/virt-resize.pod:394
24109 "Note that this option I<does not> affect the output format. See L</QCOW2 "
24110 "AND NON-SPARSE RAW FORMATS>."
24114 #: ../resize/virt-resize.pod:397
24115 msgid "B<--ignore part>"
24119 #: ../resize/virt-resize.pod:399
24121 "Ignore the named partition. Effectively this means the partition is "
24122 "allocated on the destination disk, but the content is not copied across from "
24123 "the source disk. The content of the partition will be blank (all zero "
24128 #: ../resize/virt-resize.pod:406
24129 msgid "B<--LV-expand logvol>"
24133 #: ../resize/virt-resize.pod:408
24135 "This takes the logical volume and, as a final step, expands it to fill all "
24136 "the space available in its volume group. A typical usage, assuming a Linux "
24137 "guest with a single PV C</dev/sda2> and a root device called "
24138 "C</dev/vg_guest/lv_root> would be:"
24142 #: ../resize/virt-resize.pod:413
24145 " virt-resize indisk outdisk \\\n"
24146 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
24151 #: ../resize/virt-resize.pod:416
24153 "This would first expand the partition (and PV), and then expand the root "
24154 "device to fill the extra space in the PV."
24158 #: ../resize/virt-resize.pod:419
24160 "The contents of the LV are also resized if virt-resize knows how to do "
24161 "that. You can stop virt-resize from trying to expand the content by using "
24162 "the option I<--no-expand-content>."
24166 #: ../resize/virt-resize.pod:423
24167 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
24171 #: ../resize/virt-resize.pod:425
24173 "You can give this option multiple times, I<but> it doesn't make sense to do "
24174 "this unless the logical volumes you specify are all in different volume "
24179 #: ../resize/virt-resize.pod:429 ../sparsify/virt-sparsify.pod:147
24180 msgid "B<--machine-readable>"
24184 #: ../resize/virt-resize.pod:431 ../sparsify/virt-sparsify.pod:149
24186 "This option is used to make the output more machine friendly when being "
24187 "parsed by other programs. See L</MACHINE READABLE OUTPUT> below."
24191 #: ../resize/virt-resize.pod:437
24192 msgid "B<--dryrun>"
24196 #: ../resize/virt-resize.pod:439
24197 msgid "Print a summary of what would be done, but don't do anything."
24201 #: ../resize/virt-resize.pod:441
24202 msgid "B<--no-copy-boot-loader>"
24206 #: ../resize/virt-resize.pod:443
24208 "By default, virt-resize copies over some sectors at the start of the disk "
24209 "(up to the beginning of the first partition). Commonly these sectors "
24210 "contain the Master Boot Record (MBR) and the boot loader, and are required "
24211 "in order for the guest to boot correctly."
24215 #: ../resize/virt-resize.pod:448
24217 "If you specify this flag, then this initial copy is not done. You may need "
24218 "to reinstall the boot loader in this case."
24222 #: ../resize/virt-resize.pod:451
24223 msgid "B<--no-extra-partition>"
24227 #: ../resize/virt-resize.pod:453
24229 "By default, virt-resize creates an extra partition if there is any extra, "
24230 "unused space after all resizing has happened. Use this option to prevent "
24231 "the extra partition from being created. If you do this then the extra space "
24232 "will be inaccessible until you run fdisk, parted, or some other partitioning "
24233 "tool in the guest."
24237 #: ../resize/virt-resize.pod:459
24239 "Note that if the surplus space is smaller than 10 MB, no extra partition "
24244 #: ../resize/virt-resize.pod:462
24245 msgid "B<--no-expand-content>"
24249 #: ../resize/virt-resize.pod:464
24251 "By default, virt-resize will try to expand the direct contents of "
24252 "partitions, if it knows how (see I<--expand> option above)."
24256 #: ../resize/virt-resize.pod:467
24258 "If you give the I<--no-expand-content> option then virt-resize will not "
24263 #: ../resize/virt-resize.pod:470
24264 msgid "B<--ntfsresize-force>"
24268 #: ../resize/virt-resize.pod:472
24270 "Pass the I<--force> option to L<ntfsresize(8)>, allowing resizing even if "
24271 "the NTFS disk is marked as needing a consistency check. You have to use "
24272 "this option if you want to resize a Windows guest multiple times without "
24273 "booting into Windows between each resize."
24277 #: ../resize/virt-resize.pod:478
24278 msgid "B<--output-format> raw"
24282 #: ../resize/virt-resize.pod:480
24284 "Specify the format of the output disk image. If this flag is not given then "
24285 "it is auto-detected from the image itself."
24289 #: ../resize/virt-resize.pod:486
24291 "Note that this option I<does not create> the output format. This option "
24292 "just tells libguestfs what it is so it doesn't try to guess it. You still "
24293 "need to create the output disk with the right format. See L</QCOW2 AND "
24294 "NON-SPARSE RAW FORMATS>."
24298 #: ../resize/virt-resize.pod:495
24299 msgid "Don't print the summary."
24303 #: ../resize/virt-resize.pod:497
24304 msgid "B<--resize part=size>"
24308 #: ../resize/virt-resize.pod:499
24310 "Resize the named partition (expanding or shrinking it) so that it has the "
24315 #: ../resize/virt-resize.pod:502
24317 "C<size> can be expressed as an absolute number followed by b/K/M/G to mean "
24318 "bytes, Kilobytes, Megabytes, or Gigabytes; or as a percentage of the current "
24319 "size; or as a relative number or percentage. For example:"
24323 #: ../resize/virt-resize.pod:508
24326 " --resize /dev/sda2=10G\n"
24331 #: ../resize/virt-resize.pod:510
24334 " --resize /dev/sda4=90%\n"
24339 #: ../resize/virt-resize.pod:512
24342 " --resize /dev/sda2=+1G\n"
24347 #: ../resize/virt-resize.pod:514
24350 " --resize /dev/sda2=-200M\n"
24355 #: ../resize/virt-resize.pod:516
24358 " --resize /dev/sda1=+128K\n"
24363 #: ../resize/virt-resize.pod:518
24366 " --resize /dev/sda1=+10%\n"
24371 #: ../resize/virt-resize.pod:520
24374 " --resize /dev/sda1=-10%\n"
24379 #: ../resize/virt-resize.pod:522
24381 "You can increase the size of any partition. Virt-resize will expand the "
24382 "direct content of the partition if it knows how (see I<--expand> below)."
24386 #: ../resize/virt-resize.pod:526
24388 "You can only I<decrease> the size of partitions that contain filesystems or "
24389 "PVs which have already been shrunk. Virt-resize will check this has been "
24390 "done before proceeding, or else will print an error (see also "
24391 "I<--resize-force>)."
24395 #: ../resize/virt-resize.pod:533
24396 msgid "B<--resize-force part=size>"
24400 #: ../resize/virt-resize.pod:535
24402 "This is the same as I<--resize> except that it will let you decrease the "
24403 "size of any partition. Generally this means you will lose any data which "
24404 "was at the end of the partition you shrink, but you may not care about that "
24405 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
24406 "as a swap partition)."
24410 #: ../resize/virt-resize.pod:541
24411 msgid "See also the I<--ignore> option."
24415 #: ../resize/virt-resize.pod:543
24416 msgid "B<--shrink part>"
24420 #: ../resize/virt-resize.pod:545
24422 "Shrink the named partition until the overall disk image fits in the "
24423 "destination. The named partition B<must> contain a filesystem or PV which "
24424 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
24425 "online tools). Virt-resize will check this and give an error if it has not "
24430 #: ../resize/virt-resize.pod:551
24432 "The amount by which the overall disk must be shrunk (after carrying out all "
24433 "other operations requested by the user) is called the \"deficit\". For "
24434 "example, a straight copy (assume no other operations) from a 5GB disk image "
24435 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
24436 "would give an error unless the user specified a partition to shrink and that "
24437 "partition had more than a gigabyte of free space."
24441 #: ../resize/virt-resize.pod:569 ../sparsify/virt-sparsify.pod:177
24442 msgid "MACHINE READABLE OUTPUT"
24446 #: ../resize/virt-resize.pod:571
24448 "The I<--machine-readable> option can be used to make the output more machine "
24449 "friendly, which is useful when calling virt-resize from other programs, GUIs "
24454 #: ../resize/virt-resize.pod:575 ../sparsify/virt-sparsify.pod:183
24455 msgid "There are two ways to use this option."
24459 #: ../resize/virt-resize.pod:577
24461 "Firstly use the option on its own to query the capabilities of the "
24462 "virt-resize binary. Typical output looks like this:"
24466 #: ../resize/virt-resize.pod:580
24469 " $ virt-resize --machine-readable\n"
24471 " ntfsresize-force\n"
24479 #: ../resize/virt-resize.pod:587 ../sparsify/virt-sparsify.pod:193
24481 "A list of features is printed, one per line, and the program exits with "
24486 #: ../resize/virt-resize.pod:590 ../sparsify/virt-sparsify.pod:196
24488 "Secondly use the option in conjunction with other options to make the "
24489 "regular program output more machine friendly."
24493 #: ../resize/virt-resize.pod:593 ../sparsify/virt-sparsify.pod:199
24494 msgid "At the moment this means:"
24498 #: ../resize/virt-resize.pod:599 ../sparsify/virt-sparsify.pod:205
24500 "Progress bar messages can be parsed from stdout by looking for this regular "
24505 #: ../resize/virt-resize.pod:602 ../sparsify/virt-sparsify.pod:208
24508 " ^[0-9]+/[0-9]+$\n"
24513 #: ../resize/virt-resize.pod:606 ../sparsify/virt-sparsify.pod:212
24515 "The calling program should treat messages sent to stdout (except for "
24516 "progress bar messages) as status messages. They can be logged and/or "
24517 "displayed to the user."
24521 #: ../resize/virt-resize.pod:612
24523 "The calling program should treat messages sent to stderr as error messages. "
24524 "In addition, virt-resize exits with a non-zero status code if there was a "
24529 #: ../resize/virt-resize.pod:618
24531 "Versions of the program prior to 1.13.9 did not support the "
24532 "I<--machine-readable> option and will return an error."
24536 #: ../resize/virt-resize.pod:623
24537 msgid "\"Partition 1 does not end on cylinder boundary.\""
24541 #: ../resize/virt-resize.pod:625
24543 "Virt-resize aligns partitions to multiples of 128 sectors (see the "
24544 "I<--alignment> parameter). Usually this means the partitions will not be "
24545 "aligned to the ancient CHS geometry. However CHS geometry is meaningless "
24546 "for disks manufactured since the early 1990s, and doubly so for virtual hard "
24547 "drives. Alignment of partitions to cylinders is not required by any modern "
24548 "operating system."
24552 #: ../resize/virt-resize.pod:632
24553 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
24557 #: ../resize/virt-resize.pod:634
24559 "In Windows Vista and later versions, Microsoft switched to using a separate "
24560 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
24561 "and C</dev/sda2> is the main (C:) drive. Resizing the first (boot) "
24562 "partition causes the bootloader to fail with C<0xC0000225> error. Resizing "
24563 "the second partition (ie. C: drive) should work."
24567 #: ../resize/virt-resize.pod:641
24569 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
24570 "NTFS partitions have been expanded. This is just a safety check and (unless "
24571 "it find errors) is nothing to worry about."
24575 #: ../resize/virt-resize.pod:645
24576 msgid "GUEST BOOT STUCK AT \"GRUB\""
24580 #: ../resize/virt-resize.pod:647
24582 "If a Linux guest does not boot after resizing, and the boot is stuck after "
24583 "printing C<GRUB> on the console, try reinstalling grub."
24587 #: ../resize/virt-resize.pod:650
24590 " guestfish -i -a newdisk\n"
24591 " ><fs> cat /boot/grub/device.map\n"
24592 " # check the contents of this file are sensible or\n"
24593 " # edit the file if necessary\n"
24594 " ><fs> grub-install / /dev/vda\n"
24600 #: ../resize/virt-resize.pod:657
24602 "For more flexible guest reconfiguration, including if you need to specify "
24603 "other parameters to grub-install, use L<virt-rescue(1)>."
24607 #: ../resize/virt-resize.pod:660
24608 msgid "ALTERNATIVE TOOLS"
24612 #: ../resize/virt-resize.pod:662
24614 "There are several proprietary tools for resizing partitions. We won't "
24615 "mention any here."
24619 #: ../resize/virt-resize.pod:665
24621 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
24622 "operations on disk images. They can resize and move partitions, but I don't "
24623 "think they can do anything with the contents, and they certainly don't "
24628 #: ../resize/virt-resize.pod:670
24630 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
24631 "but at a much lower level. You will probably end up hand-calculating sector "
24632 "offsets, which is something that virt-resize was designed to avoid. If you "
24633 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
24638 #: ../resize/virt-resize.pod:690
24640 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, "
24641 "L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, "
24642 "L<ntfsresize(8)>, L<btrfs(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, "
24643 "L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, "
24644 "L<virt-sparsify(1)>, L<virt-alignment-scan(1)>, L<http://libguestfs.org/>."
24648 #: ../ruby/examples/guestfs-ruby.pod:5
24649 msgid "guestfs-ruby - How to use libguestfs from Ruby"
24653 #: ../ruby/examples/guestfs-ruby.pod:9
24656 " require 'guestfs'\n"
24657 " g = Guestfs::Guestfs.new()\n"
24658 " g.add_drive_opts(\"disk.img\",\n"
24659 " :readonly => 1, :format => \"raw\")\n"
24665 #: ../ruby/examples/guestfs-ruby.pod:17
24667 "This manual page documents how to call libguestfs from the Ruby programming "
24668 "language. This page just documents the differences from the C API and gives "
24669 "some examples. If you are not familiar with using libguestfs, you also need "
24670 "to read L<guestfs(3)>."
24674 #: ../ruby/examples/guestfs-ruby.pod:24
24676 "Errors from libguestfs functions are mapped into the C<Error> exception. "
24677 "This has a single parameter which is the error message (a string)."
24681 #: ../ruby/examples/guestfs-ruby.pod:38
24683 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
24684 "L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, "
24685 "L<guestfs-python(3)>, L<guestfs-recipes(1)>, L<http://libguestfs.org/>."
24689 #: ../sparsify/virt-sparsify.pod:5
24690 msgid "virt-sparsify - Make a virtual machine disk sparse"
24694 #: ../sparsify/virt-sparsify.pod:9
24697 " virt-sparsify [--options] indisk outdisk\n"
24702 #: ../sparsify/virt-sparsify.pod:13
24704 "Virt-sparsify is a tool which can make a virtual machine disk (or any disk "
24705 "image) sparse a.k.a. thin-provisioned. This means that free space within "
24706 "the disk image can be converted back to free space on the host."
24710 #: ../sparsify/virt-sparsify.pod:18
24712 "Virt-sparsify can locate and sparsify free space in most filesystems "
24713 "(eg. ext2/3/4, btrfs, NTFS, etc.), and also in LVM physical volumes."
24717 #: ../sparsify/virt-sparsify.pod:21
24719 "Virt-sparsify can also convert between some disk formats, for example "
24720 "converting a raw disk image to a thin-provisioned qcow2 image."
24724 #: ../sparsify/virt-sparsify.pod:24
24726 "Virt-sparsify can operate on any disk image, not just ones from virtual "
24727 "machines. If a virtual machine has more than one attached disk, you must "
24728 "sparsify each one separately."
24732 #: ../sparsify/virt-sparsify.pod:28
24733 msgid "IMPORTANT LIMITATIONS"
24737 #: ../sparsify/virt-sparsify.pod:34
24739 "Virt-sparsify does not do in-place modifications. It copies from a source "
24740 "image to a destination image, leaving the source unchanged. I<Check that "
24741 "the sparsification was successful before deleting the source image>."
24745 #: ../sparsify/virt-sparsify.pod:41
24746 msgid "The virtual machine I<must be shut down> before using this tool."
24750 #: ../sparsify/virt-sparsify.pod:45
24752 "Virt-sparsify may require up to 2x the virtual size of the source disk image "
24753 "(1 temporary copy + 1 destination image). This is in the worst case and "
24754 "usually much less space is required."
24758 #: ../sparsify/virt-sparsify.pod:51
24759 msgid "Virt-sparsify cannot resize disk images. To do that, use L<virt-resize(1)>."
24763 #: ../sparsify/virt-sparsify.pod:56
24764 msgid "Virt-sparsify cannot handle encrypted disks."
24768 #: ../sparsify/virt-sparsify.pod:60
24770 "Virt-sparsify cannot yet sparsify the space between partitions. Note that "
24771 "this space is often used for critical items like bootloaders so it's not "
24776 #: ../sparsify/virt-sparsify.pod:66
24778 "Virt-sparsify does not yet know how to sparsify swapspace. It is not safe "
24779 "to do this unless we can be sure there is no hibernation data, so at the "
24780 "moment swap partitions are ignored."
24784 #: ../sparsify/virt-sparsify.pod:72
24786 "You may also want to read the manual pages for the associated tools "
24787 "L<virt-filesystems(1)> and L<virt-df(1)> before starting."
24791 #: ../sparsify/virt-sparsify.pod:77
24792 msgid "Typical usage is:"
24796 #: ../sparsify/virt-sparsify.pod:79
24799 " virt-sparsify indisk outdisk\n"
24804 #: ../sparsify/virt-sparsify.pod:81
24806 "which copies C<indisk> to C<outdisk>, making the output sparse. C<outdisk> "
24807 "is created, or overwritten if it already exists. The format of the input "
24808 "disk is detected (eg. qcow2) and the same format is used for the output "
24813 #: ../sparsify/virt-sparsify.pod:86
24814 msgid "To convert between formats, use the I<--convert> option:"
24818 #: ../sparsify/virt-sparsify.pod:88
24821 " virt-sparsify disk.raw --convert qcow2 disk.qcow2\n"
24826 #: ../sparsify/virt-sparsify.pod:90
24828 "Virt-sparsify tries to zero and sparsify free space on every filesystem it "
24829 "can find within the source disk image. You can get it to ignore (don't zero "
24830 "free space on) certain filesystems by doing:"
24834 #: ../sparsify/virt-sparsify.pod:94
24837 " virt-sparsify --ignore /dev/sda1 indisk outdisk\n"
24842 #: ../sparsify/virt-sparsify.pod:96
24843 msgid "See L<virt-filesystems(1)> to get a list of filesystems within a disk image."
24847 #: ../sparsify/virt-sparsify.pod:107
24848 msgid "B<--convert> raw"
24852 #: ../sparsify/virt-sparsify.pod:109
24853 msgid "B<--convert> qcow2"
24857 #: ../sparsify/virt-sparsify.pod:111
24858 msgid "B<--convert> [other formats]"
24862 #: ../sparsify/virt-sparsify.pod:113
24864 "Use C<output-format> as the format for the destination image. If this is "
24865 "not specified, then the input format is used."
24869 #: ../sparsify/virt-sparsify.pod:116
24870 msgid "Supported and known-working output formats are: C<raw>, C<qcow2>."
24874 #: ../sparsify/virt-sparsify.pod:118
24876 "You can also use any format supported by the L<qemu-img(1)> program, "
24877 "eg. C<vdi> or C<vmdk>, but support for other formats is reliant on qemu."
24881 #: ../sparsify/virt-sparsify.pod:122
24883 "Specifying the I<--convert> option is usually a good idea, because then "
24884 "virt-sparsify doesn't need to try to guess the input format."
24888 #: ../sparsify/virt-sparsify.pod:127
24889 msgid "B<--format> qcow2"
24893 #: ../sparsify/virt-sparsify.pod:135
24894 msgid "B<--ignore> filesystem"
24898 #: ../sparsify/virt-sparsify.pod:137
24899 msgid "B<--ignore> volgroup"
24903 #: ../sparsify/virt-sparsify.pod:139
24905 "Ignore the named filesystem. Free space on the filesystem will not be "
24906 "zeroed, but existing blocks of zeroes will still be sparsified."
24910 #: ../sparsify/virt-sparsify.pod:142
24912 "In the second form, this ignores the named volume group. Use the volume "
24913 "group name without the C</dev/> prefix, eg. I<--ignore vg_foo>"
24917 #: ../sparsify/virt-sparsify.pod:157
24918 msgid "This disables progress bars and other unnecessary output."
24922 #: ../sparsify/virt-sparsify.pod:179
24924 "The I<--machine-readable> option can be used to make the output more machine "
24925 "friendly, which is useful when calling virt-sparsify from other programs, "
24930 #: ../sparsify/virt-sparsify.pod:185
24932 "Firstly use the option on its own to query the capabilities of the "
24933 "virt-sparsify binary. Typical output looks like this:"
24937 #: ../sparsify/virt-sparsify.pod:188
24940 " $ virt-sparsify --machine-readable\n"
24948 #: ../sparsify/virt-sparsify.pod:218
24950 "The calling program should treat messages sent to stderr as error messages. "
24951 "In addition, virt-sparsify exits with a non-zero status code if there was a "
24956 #: ../sparsify/virt-sparsify.pod:224
24958 "All versions of virt-sparsify have supported the I<--machine-readable> "
24963 #: ../sparsify/virt-sparsify.pod:238
24965 "Location of the temporary directory used for the potentially large temporary "
24970 #: ../sparsify/virt-sparsify.pod:241
24972 "You should ensure there is enough free space in the worst case for a full "
24973 "copy of the source disk (I<virtual> size), or else set C<$TMPDIR> to point "
24974 "to another directory that has enough space."
24978 #: ../sparsify/virt-sparsify.pod:245
24979 msgid "This defaults to C</tmp>."
24983 #: ../sparsify/virt-sparsify.pod:249
24984 msgid "For other environment variables, see L<guestfs(3)/ENVIRONMENT VARIABLES>."
24988 #: ../sparsify/virt-sparsify.pod:253
24990 "L<virt-filesystems(1)>, L<virt-df(1)>, L<virt-resize(1)>, L<virt-rescue(1)>, "
24991 "L<guestfs(3)>, L<guestfish(1)>, L<truncate(1)>, L<fallocate(1)>, "
24992 "L<qemu-img(1)>, L<http://libguestfs.org/>."
24996 #: ../src/guestfs-actions.pod:1
24997 msgid "guestfs_add_cdrom"
25001 #: ../src/guestfs-actions.pod:3
25005 " guestfs_add_cdrom (guestfs_h *g,\n"
25006 " const char *filename);\n"
25011 #: ../src/guestfs-actions.pod:7 ../src/guestfs-actions.pod:302 ../src/guestfs-actions.pod:323
25013 "I<This function is deprecated.> In new code, use the "
25014 "L</guestfs_add_drive_opts> call instead."
25018 #: ../src/guestfs-actions.pod:24
25020 "This call checks for the existence of C<filename>. This stops you from "
25021 "specifying other types of drive which are supported by qemu such as C<nbd:> "
25022 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
25027 #: ../src/guestfs-actions.pod:31
25029 "If you just want to add an ISO file (often you use this as an efficient way "
25030 "to transfer large files into the guest), then you should probably use "
25031 "C<guestfs_add_drive_ro> instead."
25035 #: ../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
25036 msgid "This function returns 0 on success or -1 on error."
25040 #: ../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
25041 msgid "(Added in 0.3)"
25045 #: ../src/guestfs-actions.pod:41
25046 msgid "guestfs_add_domain"
25050 #: ../src/guestfs-actions.pod:43
25054 " guestfs_add_domain (guestfs_h *g,\n"
25055 " const char *dom,\n"
25061 #: ../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
25063 "You may supply a list of optional arguments to this call. Use zero or more "
25064 "of the following pairs of parameters, and terminate the list with C<-1> on "
25065 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
25069 #: ../src/guestfs-actions.pod:53
25072 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
25073 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
25074 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
25075 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
25076 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
25077 " GUESTFS_ADD_DOMAIN_READONLYDISK, const char *readonlydisk,\n"
25082 #: ../src/guestfs-actions.pod:60
25084 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
25085 "It works by connecting to libvirt, requesting the domain and domain XML from "
25086 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
25091 #: ../src/guestfs-actions.pod:141
25093 "The other optional parameters are passed directly through to "
25094 "C<guestfs_add_drive_opts>."
25098 #: ../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
25099 msgid "On error this function returns -1."
25103 #: ../src/guestfs-actions.pod:146
25104 msgid "(Added in 1.7.4)"
25108 #: ../src/guestfs-actions.pod:148
25109 msgid "guestfs_add_domain_va"
25113 #: ../src/guestfs-actions.pod:150
25117 " guestfs_add_domain_va (guestfs_h *g,\n"
25118 " const char *dom,\n"
25119 " va_list args);\n"
25124 #: ../src/guestfs-actions.pod:155
25125 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
25129 #: ../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
25130 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
25134 #: ../src/guestfs-actions.pod:159
25135 msgid "guestfs_add_domain_argv"
25139 #: ../src/guestfs-actions.pod:161
25143 " guestfs_add_domain_argv (guestfs_h *g,\n"
25144 " const char *dom,\n"
25145 " const struct guestfs_add_domain_argv *optargs);\n"
25150 #: ../src/guestfs-actions.pod:166
25151 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
25155 #: ../src/guestfs-actions.pod:170
25156 msgid "guestfs_add_drive"
25160 #: ../src/guestfs-actions.pod:172
25164 " guestfs_add_drive (guestfs_h *g,\n"
25165 " const char *filename);\n"
25170 #: ../src/guestfs-actions.pod:176
25172 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
25173 "optional parameters, so the disk is added writable, with the format being "
25174 "detected automatically."
25178 #: ../src/guestfs-actions.pod:180
25180 "Automatic detection of the format opens you up to a potential security hole "
25181 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
25182 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
25183 "you should think about replacing calls to this function with calls to "
25184 "C<guestfs_add_drive_opts>, and specifying the format."
25188 #: ../src/guestfs-actions.pod:191
25189 msgid "guestfs_add_drive_opts"
25193 #: ../src/guestfs-actions.pod:193
25197 " guestfs_add_drive_opts (guestfs_h *g,\n"
25198 " const char *filename,\n"
25204 #: ../src/guestfs-actions.pod:203
25207 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
25208 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
25209 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
25210 " GUESTFS_ADD_DRIVE_OPTS_NAME, const char *name,\n"
25215 #: ../src/guestfs-actions.pod:233
25217 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
25218 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
25219 "Possible formats include C<raw> and C<qcow2>."
25223 #: ../src/guestfs-actions.pod:244
25225 "This rarely-used option lets you emulate the behaviour of the deprecated "
25226 "C<guestfs_add_drive_with_if> call (q.v.)"
25230 #: ../src/guestfs-actions.pod:256
25231 msgid "(Added in 1.5.23)"
25235 #: ../src/guestfs-actions.pod:258
25236 msgid "guestfs_add_drive_opts_va"
25240 #: ../src/guestfs-actions.pod:260
25244 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
25245 " const char *filename,\n"
25246 " va_list args);\n"
25251 #: ../src/guestfs-actions.pod:265
25252 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
25256 #: ../src/guestfs-actions.pod:269
25257 msgid "guestfs_add_drive_opts_argv"
25261 #: ../src/guestfs-actions.pod:271
25265 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
25266 " const char *filename,\n"
25267 " const struct guestfs_add_drive_opts_argv "
25273 #: ../src/guestfs-actions.pod:276
25274 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
25278 #: ../src/guestfs-actions.pod:280
25279 msgid "guestfs_add_drive_ro"
25283 #: ../src/guestfs-actions.pod:282
25287 " guestfs_add_drive_ro (guestfs_h *g,\n"
25288 " const char *filename);\n"
25293 #: ../src/guestfs-actions.pod:286
25295 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
25296 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
25297 "disk is added read-only, with the format being detected automatically."
25301 #: ../src/guestfs-actions.pod:293
25302 msgid "(Added in 1.0.38)"
25306 #: ../src/guestfs-actions.pod:295
25307 msgid "guestfs_add_drive_ro_with_if"
25311 #: ../src/guestfs-actions.pod:297
25315 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
25316 " const char *filename,\n"
25317 " const char *iface);\n"
25322 #: ../src/guestfs-actions.pod:309
25324 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
25325 "QEMU interface emulation to use at run time."
25329 #: ../src/guestfs-actions.pod:314 ../src/guestfs-actions.pod:335 ../src/guestfs-actions.pod:2881
25330 msgid "(Added in 1.0.84)"
25334 #: ../src/guestfs-actions.pod:316
25335 msgid "guestfs_add_drive_with_if"
25339 #: ../src/guestfs-actions.pod:318
25343 " guestfs_add_drive_with_if (guestfs_h *g,\n"
25344 " const char *filename,\n"
25345 " const char *iface);\n"
25350 #: ../src/guestfs-actions.pod:330
25352 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
25353 "QEMU interface emulation to use at run time."
25357 #: ../src/guestfs-actions.pod:337
25358 msgid "guestfs_aug_clear"
25362 #: ../src/guestfs-actions.pod:339
25366 " guestfs_aug_clear (guestfs_h *g,\n"
25367 " const char *augpath);\n"
25372 #: ../src/guestfs-actions.pod:348 ../src/guestfs-actions.pod:2609
25373 msgid "(Added in 1.3.4)"
25377 #: ../src/guestfs-actions.pod:350
25378 msgid "guestfs_aug_close"
25382 #: ../src/guestfs-actions.pod:352
25386 " guestfs_aug_close (guestfs_h *g);\n"
25391 #: ../src/guestfs-actions.pod:355
25393 "Close the current Augeas handle and free up any resources used by it. After "
25394 "calling this, you have to call C<guestfs_aug_init> again before you can use "
25395 "any other Augeas functions."
25399 #: ../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
25400 msgid "(Added in 0.7)"
25404 #: ../src/guestfs-actions.pod:364
25405 msgid "guestfs_aug_defnode"
25409 #: ../src/guestfs-actions.pod:366
25412 " struct guestfs_int_bool *\n"
25413 " guestfs_aug_defnode (guestfs_h *g,\n"
25414 " const char *name,\n"
25415 " const char *expr,\n"
25416 " const char *val);\n"
25421 #: ../src/guestfs-actions.pod:375
25423 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
25424 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
25425 "containing that single node."
25429 #: ../src/guestfs-actions.pod:383
25431 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
25432 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
25436 #: ../src/guestfs-actions.pod:389
25437 msgid "guestfs_aug_defvar"
25441 #: ../src/guestfs-actions.pod:391
25445 " guestfs_aug_defvar (guestfs_h *g,\n"
25446 " const char *name,\n"
25447 " const char *expr);\n"
25452 #: ../src/guestfs-actions.pod:407
25453 msgid "guestfs_aug_get"
25457 #: ../src/guestfs-actions.pod:409
25461 " guestfs_aug_get (guestfs_h *g,\n"
25462 " const char *augpath);\n"
25467 #: ../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
25469 "This function returns a string, or NULL on error. I<The caller must free "
25470 "the returned string after use>."
25474 #: ../src/guestfs-actions.pod:421
25475 msgid "guestfs_aug_init"
25479 #: ../src/guestfs-actions.pod:423
25483 " guestfs_aug_init (guestfs_h *g,\n"
25484 " const char *root,\n"
25490 #: ../src/guestfs-actions.pod:432
25491 msgid "You must call this before using any other C<guestfs_aug_*> commands."
25495 #: ../src/guestfs-actions.pod:457
25497 "This option is only useful when debugging Augeas lenses. Use of this option "
25498 "may require additional memory for the libguestfs appliance. You may need to "
25499 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
25500 "C<guestfs_set_memsize>."
25504 #: ../src/guestfs-actions.pod:472
25505 msgid "Do not load the tree in C<guestfs_aug_init>."
25509 #: ../src/guestfs-actions.pod:476
25510 msgid "To close the handle, you can call C<guestfs_aug_close>."
25514 #: ../src/guestfs-actions.pod:484
25515 msgid "guestfs_aug_insert"
25519 #: ../src/guestfs-actions.pod:486
25523 " guestfs_aug_insert (guestfs_h *g,\n"
25524 " const char *augpath,\n"
25525 " const char *label,\n"
25531 #: ../src/guestfs-actions.pod:504
25532 msgid "guestfs_aug_load"
25536 #: ../src/guestfs-actions.pod:506
25540 " guestfs_aug_load (guestfs_h *g);\n"
25545 #: ../src/guestfs-actions.pod:518
25546 msgid "guestfs_aug_ls"
25550 #: ../src/guestfs-actions.pod:520
25554 " guestfs_aug_ls (guestfs_h *g,\n"
25555 " const char *augpath);\n"
25560 #: ../src/guestfs-actions.pod:524
25562 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
25563 "sorting the resulting nodes into alphabetical order."
25567 #: ../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
25569 "This function returns a NULL-terminated array of strings (like "
25570 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
25571 "strings and the array after use>."
25575 #: ../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
25576 msgid "(Added in 0.8)"
25580 #: ../src/guestfs-actions.pod:533
25581 msgid "guestfs_aug_match"
25585 #: ../src/guestfs-actions.pod:535
25589 " guestfs_aug_match (guestfs_h *g,\n"
25590 " const char *augpath);\n"
25595 #: ../src/guestfs-actions.pod:549
25596 msgid "guestfs_aug_mv"
25600 #: ../src/guestfs-actions.pod:551
25604 " guestfs_aug_mv (guestfs_h *g,\n"
25605 " const char *src,\n"
25606 " const char *dest);\n"
25611 #: ../src/guestfs-actions.pod:563
25612 msgid "guestfs_aug_rm"
25616 #: ../src/guestfs-actions.pod:565
25620 " guestfs_aug_rm (guestfs_h *g,\n"
25621 " const char *augpath);\n"
25626 #: ../src/guestfs-actions.pod:577
25627 msgid "guestfs_aug_save"
25631 #: ../src/guestfs-actions.pod:579
25635 " guestfs_aug_save (guestfs_h *g);\n"
25640 #: ../src/guestfs-actions.pod:584
25642 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
25647 #: ../src/guestfs-actions.pod:591
25648 msgid "guestfs_aug_set"
25652 #: ../src/guestfs-actions.pod:593
25656 " guestfs_aug_set (guestfs_h *g,\n"
25657 " const char *augpath,\n"
25658 " const char *val);\n"
25663 #: ../src/guestfs-actions.pod:600
25665 "In the Augeas API, it is possible to clear a node by setting the value to "
25666 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
25667 "this call. Instead you must use the C<guestfs_aug_clear> call."
25671 #: ../src/guestfs-actions.pod:609
25672 msgid "guestfs_available"
25676 #: ../src/guestfs-actions.pod:611
25680 " guestfs_available (guestfs_h *g,\n"
25681 " char *const *groups);\n"
25686 #: ../src/guestfs-actions.pod:619
25688 "The libguestfs groups, and the functions that those groups correspond to, "
25689 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
25690 "runtime by calling C<guestfs_available_all_groups>."
25694 #: ../src/guestfs-actions.pod:643
25695 msgid "You must call C<guestfs_launch> before calling this function."
25699 #: ../src/guestfs-actions.pod:665
25701 "This call was added in version C<1.0.80>. In previous versions of "
25702 "libguestfs all you could do would be to speculatively execute a command to "
25703 "find out if the daemon implemented it. See also C<guestfs_version>."
25707 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:1653
25708 msgid "(Added in 1.0.80)"
25712 #: ../src/guestfs-actions.pod:676
25713 msgid "guestfs_available_all_groups"
25717 #: ../src/guestfs-actions.pod:678
25721 " guestfs_available_all_groups (guestfs_h *g);\n"
25726 #: ../src/guestfs-actions.pod:681
25728 "This command returns a list of all optional groups that this daemon knows "
25729 "about. Note this returns both supported and unsupported groups. To find "
25730 "out which ones the daemon can actually support you have to call "
25731 "C<guestfs_available> on each member of the returned list."
25735 #: ../src/guestfs-actions.pod:687
25736 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
25740 #: ../src/guestfs-actions.pod:693
25741 msgid "(Added in 1.3.15)"
25745 #: ../src/guestfs-actions.pod:695
25746 msgid "guestfs_base64_in"
25750 #: ../src/guestfs-actions.pod:697
25754 " guestfs_base64_in (guestfs_h *g,\n"
25755 " const char *base64file,\n"
25756 " const char *filename);\n"
25761 #: ../src/guestfs-actions.pod:707 ../src/guestfs-actions.pod:721
25762 msgid "(Added in 1.3.5)"
25766 #: ../src/guestfs-actions.pod:709
25767 msgid "guestfs_base64_out"
25771 #: ../src/guestfs-actions.pod:711
25775 " guestfs_base64_out (guestfs_h *g,\n"
25776 " const char *filename,\n"
25777 " const char *base64file);\n"
25782 #: ../src/guestfs-actions.pod:723
25783 msgid "guestfs_blockdev_flushbufs"
25787 #: ../src/guestfs-actions.pod:725
25791 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
25792 " const char *device);\n"
25797 #: ../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
25798 msgid "(Added in 0.9.3)"
25802 #: ../src/guestfs-actions.pod:738
25803 msgid "guestfs_blockdev_getbsz"
25807 #: ../src/guestfs-actions.pod:740
25811 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
25812 " const char *device);\n"
25817 #: ../src/guestfs-actions.pod:755
25818 msgid "guestfs_blockdev_getro"
25822 #: ../src/guestfs-actions.pod:757
25826 " guestfs_blockdev_getro (guestfs_h *g,\n"
25827 " const char *device);\n"
25832 #: ../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
25833 msgid "This function returns a C truth value on success or -1 on error."
25837 #: ../src/guestfs-actions.pod:770
25838 msgid "guestfs_blockdev_getsize64"
25842 #: ../src/guestfs-actions.pod:772
25846 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
25847 " const char *device);\n"
25852 #: ../src/guestfs-actions.pod:778
25853 msgid "See also C<guestfs_blockdev_getsz>."
25857 #: ../src/guestfs-actions.pod:786
25858 msgid "guestfs_blockdev_getss"
25862 #: ../src/guestfs-actions.pod:788
25866 " guestfs_blockdev_getss (guestfs_h *g,\n"
25867 " const char *device);\n"
25872 #: ../src/guestfs-actions.pod:795
25874 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
25879 #: ../src/guestfs-actions.pod:804
25880 msgid "guestfs_blockdev_getsz"
25884 #: ../src/guestfs-actions.pod:806
25888 " guestfs_blockdev_getsz (guestfs_h *g,\n"
25889 " const char *device);\n"
25894 #: ../src/guestfs-actions.pod:813
25896 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
25897 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
25901 #: ../src/guestfs-actions.pod:823
25902 msgid "guestfs_blockdev_rereadpt"
25906 #: ../src/guestfs-actions.pod:825
25910 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
25911 " const char *device);\n"
25916 #: ../src/guestfs-actions.pod:837
25917 msgid "guestfs_blockdev_setbsz"
25921 #: ../src/guestfs-actions.pod:839
25925 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
25926 " const char *device,\n"
25927 " int blocksize);\n"
25932 #: ../src/guestfs-actions.pod:855
25933 msgid "guestfs_blockdev_setro"
25937 #: ../src/guestfs-actions.pod:857
25941 " guestfs_blockdev_setro (guestfs_h *g,\n"
25942 " const char *device);\n"
25947 #: ../src/guestfs-actions.pod:869
25948 msgid "guestfs_blockdev_setrw"
25952 #: ../src/guestfs-actions.pod:871
25956 " guestfs_blockdev_setrw (guestfs_h *g,\n"
25957 " const char *device);\n"
25962 #: ../src/guestfs-actions.pod:883
25963 msgid "guestfs_btrfs_filesystem_resize"
25967 #: ../src/guestfs-actions.pod:885
25971 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
25972 " const char *mountpoint,\n"
25978 #: ../src/guestfs-actions.pod:895
25981 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
25986 #: ../src/guestfs-actions.pod:918
25987 msgid "(Added in 1.11.17)"
25991 #: ../src/guestfs-actions.pod:920
25992 msgid "guestfs_btrfs_filesystem_resize_va"
25996 #: ../src/guestfs-actions.pod:922
26000 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
26001 " const char *mountpoint,\n"
26002 " va_list args);\n"
26007 #: ../src/guestfs-actions.pod:927
26008 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
26012 #: ../src/guestfs-actions.pod:931
26013 msgid "guestfs_btrfs_filesystem_resize_argv"
26017 #: ../src/guestfs-actions.pod:933
26021 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
26022 " const char *mountpoint,\n"
26024 "guestfs_btrfs_filesystem_resize_argv *optargs);\n"
26029 #: ../src/guestfs-actions.pod:938
26030 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
26034 #: ../src/guestfs-actions.pod:942
26035 msgid "guestfs_case_sensitive_path"
26039 #: ../src/guestfs-actions.pod:944
26043 " guestfs_case_sensitive_path (guestfs_h *g,\n"
26044 " const char *path);\n"
26049 #: ../src/guestfs-actions.pod:970
26051 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
26052 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
26053 "how the directories were originally created under Windows)."
26057 #: ../src/guestfs-actions.pod:978
26058 msgid "See also C<guestfs_realpath>."
26062 #: ../src/guestfs-actions.pod:983 ../src/guestfs-actions.pod:8125
26063 msgid "(Added in 1.0.75)"
26067 #: ../src/guestfs-actions.pod:985
26068 msgid "guestfs_cat"
26072 #: ../src/guestfs-actions.pod:987
26076 " guestfs_cat (guestfs_h *g,\n"
26077 " const char *path);\n"
26082 #: ../src/guestfs-actions.pod:993
26084 "Note that this function cannot correctly handle binary files (specifically, "
26085 "files containing C<\\0> character which is treated as end of string). For "
26086 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
26087 "functions which have a more complex interface."
26091 #: ../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
26092 msgid "(Added in 0.4)"
26096 #: ../src/guestfs-actions.pod:1006
26097 msgid "guestfs_checksum"
26101 #: ../src/guestfs-actions.pod:1008
26105 " guestfs_checksum (guestfs_h *g,\n"
26106 " const char *csumtype,\n"
26107 " const char *path);\n"
26112 #: ../src/guestfs-actions.pod:1054
26113 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
26117 #: ../src/guestfs-actions.pod:1056
26118 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
26122 #: ../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
26123 msgid "(Added in 1.0.2)"
26127 #: ../src/guestfs-actions.pod:1063
26128 msgid "guestfs_checksum_device"
26132 #: ../src/guestfs-actions.pod:1065
26136 " guestfs_checksum_device (guestfs_h *g,\n"
26137 " const char *csumtype,\n"
26138 " const char *device);\n"
26143 #: ../src/guestfs-actions.pod:1070
26145 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
26146 "device named C<device>. For the types of checksums supported see the "
26147 "C<guestfs_checksum> command."
26151 #: ../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
26152 msgid "(Added in 1.3.2)"
26156 #: ../src/guestfs-actions.pod:1079
26157 msgid "guestfs_checksums_out"
26161 #: ../src/guestfs-actions.pod:1081
26165 " guestfs_checksums_out (guestfs_h *g,\n"
26166 " const char *csumtype,\n"
26167 " const char *directory,\n"
26168 " const char *sumsfile);\n"
26173 #: ../src/guestfs-actions.pod:1101
26174 msgid "(Added in 1.3.7)"
26178 #: ../src/guestfs-actions.pod:1103
26179 msgid "guestfs_chmod"
26183 #: ../src/guestfs-actions.pod:1105
26187 " guestfs_chmod (guestfs_h *g,\n"
26189 " const char *path);\n"
26194 #: ../src/guestfs-actions.pod:1123
26195 msgid "guestfs_chown"
26199 #: ../src/guestfs-actions.pod:1125
26203 " guestfs_chown (guestfs_h *g,\n"
26206 " const char *path);\n"
26211 #: ../src/guestfs-actions.pod:1141
26212 msgid "guestfs_command"
26216 #: ../src/guestfs-actions.pod:1143
26220 " guestfs_command (guestfs_h *g,\n"
26221 " char *const *arguments);\n"
26226 #: ../src/guestfs-actions.pod:1152
26228 "The single parameter is an argv-style list of arguments. The first element "
26229 "is the name of the program to run. Subsequent elements are parameters. The "
26230 "list must be non-empty (ie. must contain a program name). Note that the "
26231 "command runs directly, and is I<not> invoked via the shell (see "
26236 #: ../src/guestfs-actions.pod:1183 ../src/guestfs-actions.pod:1203 ../src/guestfs-actions.pod:2027
26237 msgid "(Added in 0.9.1)"
26241 #: ../src/guestfs-actions.pod:1185
26242 msgid "guestfs_command_lines"
26246 #: ../src/guestfs-actions.pod:1187
26250 " guestfs_command_lines (guestfs_h *g,\n"
26251 " char *const *arguments);\n"
26256 #: ../src/guestfs-actions.pod:1191
26258 "This is the same as C<guestfs_command>, but splits the result into a list of "
26263 #: ../src/guestfs-actions.pod:1194
26264 msgid "See also: C<guestfs_sh_lines>"
26268 #: ../src/guestfs-actions.pod:1205
26269 msgid "guestfs_compress_device_out"
26273 #: ../src/guestfs-actions.pod:1207
26277 " guestfs_compress_device_out (guestfs_h *g,\n"
26278 " const char *ctype,\n"
26279 " const char *device,\n"
26280 " const char *zdevice,\n"
26286 #: ../src/guestfs-actions.pod:1219
26289 " GUESTFS_COMPRESS_DEVICE_OUT_LEVEL, int level,\n"
26294 #: ../src/guestfs-actions.pod:1224
26296 "The C<ctype> and optional C<level> parameters have the same meaning as in "
26297 "C<guestfs_compress_out>."
26301 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:1288 ../src/guestfs-actions.pod:2572 ../src/guestfs-actions.pod:7051
26302 msgid "(Added in 1.13.15)"
26306 #: ../src/guestfs-actions.pod:1231
26307 msgid "guestfs_compress_device_out_va"
26311 #: ../src/guestfs-actions.pod:1233
26315 " guestfs_compress_device_out_va (guestfs_h *g,\n"
26316 " const char *ctype,\n"
26317 " const char *device,\n"
26318 " const char *zdevice,\n"
26319 " va_list args);\n"
26324 #: ../src/guestfs-actions.pod:1240
26325 msgid "This is the \"va_list variant\" of L</guestfs_compress_device_out>."
26329 #: ../src/guestfs-actions.pod:1244
26330 msgid "guestfs_compress_device_out_argv"
26334 #: ../src/guestfs-actions.pod:1246
26338 " guestfs_compress_device_out_argv (guestfs_h *g,\n"
26339 " const char *ctype,\n"
26340 " const char *device,\n"
26341 " const char *zdevice,\n"
26343 "guestfs_compress_device_out_argv *optargs);\n"
26348 #: ../src/guestfs-actions.pod:1253
26349 msgid "This is the \"argv variant\" of L</guestfs_compress_device_out>."
26353 #: ../src/guestfs-actions.pod:1257
26354 msgid "guestfs_compress_out"
26358 #: ../src/guestfs-actions.pod:1259
26362 " guestfs_compress_out (guestfs_h *g,\n"
26363 " const char *ctype,\n"
26364 " const char *file,\n"
26365 " const char *zfile,\n"
26371 #: ../src/guestfs-actions.pod:1271
26374 " GUESTFS_COMPRESS_OUT_LEVEL, int level,\n"
26379 #: ../src/guestfs-actions.pod:1290
26380 msgid "guestfs_compress_out_va"
26384 #: ../src/guestfs-actions.pod:1292
26388 " guestfs_compress_out_va (guestfs_h *g,\n"
26389 " const char *ctype,\n"
26390 " const char *file,\n"
26391 " const char *zfile,\n"
26392 " va_list args);\n"
26397 #: ../src/guestfs-actions.pod:1299
26398 msgid "This is the \"va_list variant\" of L</guestfs_compress_out>."
26402 #: ../src/guestfs-actions.pod:1303
26403 msgid "guestfs_compress_out_argv"
26407 #: ../src/guestfs-actions.pod:1305
26411 " guestfs_compress_out_argv (guestfs_h *g,\n"
26412 " const char *ctype,\n"
26413 " const char *file,\n"
26414 " const char *zfile,\n"
26415 " const struct guestfs_compress_out_argv "
26421 #: ../src/guestfs-actions.pod:1312
26422 msgid "This is the \"argv variant\" of L</guestfs_compress_out>."
26426 #: ../src/guestfs-actions.pod:1316
26427 msgid "guestfs_config"
26431 #: ../src/guestfs-actions.pod:1318
26435 " guestfs_config (guestfs_h *g,\n"
26436 " const char *qemuparam,\n"
26437 " const char *qemuvalue);\n"
26442 #: ../src/guestfs-actions.pod:1336
26443 msgid "guestfs_copy_device_to_device"
26447 #: ../src/guestfs-actions.pod:1338
26451 " guestfs_copy_device_to_device (guestfs_h *g,\n"
26452 " const char *src,\n"
26453 " const char *dest,\n"
26459 #: ../src/guestfs-actions.pod:1349
26462 " GUESTFS_COPY_DEVICE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26463 " GUESTFS_COPY_DEVICE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26464 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, int64_t size,\n"
26469 #: ../src/guestfs-actions.pod:1353
26471 "The four calls C<guestfs_copy_device_to_device>, "
26472 "C<guestfs_copy_device_to_file>, C<guestfs_copy_file_to_device>, and "
26473 "C<guestfs_copy_file_to_file> let you copy from a source (device|file) to a "
26474 "destination (device|file)."
26478 #: ../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
26480 "This long-running command can generate progress notification messages so "
26481 "that the caller can display a progress bar or indicator. To receive these "
26482 "messages, the caller must register a progress event callback. See "
26483 "L<guestfs(3)/GUESTFS_EVENT_PROGRESS>."
26487 #: ../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
26488 msgid "(Added in 1.13.25)"
26492 #: ../src/guestfs-actions.pod:1381
26493 msgid "guestfs_copy_device_to_device_va"
26497 #: ../src/guestfs-actions.pod:1383
26501 " guestfs_copy_device_to_device_va (guestfs_h *g,\n"
26502 " const char *src,\n"
26503 " const char *dest,\n"
26504 " va_list args);\n"
26509 #: ../src/guestfs-actions.pod:1389
26510 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_device>."
26514 #: ../src/guestfs-actions.pod:1393
26515 msgid "guestfs_copy_device_to_device_argv"
26519 #: ../src/guestfs-actions.pod:1395
26523 " guestfs_copy_device_to_device_argv (guestfs_h *g,\n"
26524 " const char *src,\n"
26525 " const char *dest,\n"
26527 "guestfs_copy_device_to_device_argv *optargs);\n"
26532 #: ../src/guestfs-actions.pod:1401
26533 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_device>."
26537 #: ../src/guestfs-actions.pod:1405
26538 msgid "guestfs_copy_device_to_file"
26542 #: ../src/guestfs-actions.pod:1407
26546 " guestfs_copy_device_to_file (guestfs_h *g,\n"
26547 " const char *src,\n"
26548 " const char *dest,\n"
26554 #: ../src/guestfs-actions.pod:1418
26557 " GUESTFS_COPY_DEVICE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26558 " GUESTFS_COPY_DEVICE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26559 " GUESTFS_COPY_DEVICE_TO_FILE_SIZE, int64_t size,\n"
26564 #: ../src/guestfs-actions.pod:1422 ../src/guestfs-actions.pod:1475 ../src/guestfs-actions.pod:1528
26565 msgid "See C<guestfs_copy_device_to_device> for a general overview of this call."
26569 #: ../src/guestfs-actions.pod:1434
26570 msgid "guestfs_copy_device_to_file_va"
26574 #: ../src/guestfs-actions.pod:1436
26578 " guestfs_copy_device_to_file_va (guestfs_h *g,\n"
26579 " const char *src,\n"
26580 " const char *dest,\n"
26581 " va_list args);\n"
26586 #: ../src/guestfs-actions.pod:1442
26587 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_file>."
26591 #: ../src/guestfs-actions.pod:1446
26592 msgid "guestfs_copy_device_to_file_argv"
26596 #: ../src/guestfs-actions.pod:1448
26600 " guestfs_copy_device_to_file_argv (guestfs_h *g,\n"
26601 " const char *src,\n"
26602 " const char *dest,\n"
26604 "guestfs_copy_device_to_file_argv *optargs);\n"
26609 #: ../src/guestfs-actions.pod:1454
26610 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_file>."
26614 #: ../src/guestfs-actions.pod:1458
26615 msgid "guestfs_copy_file_to_device"
26619 #: ../src/guestfs-actions.pod:1460
26623 " guestfs_copy_file_to_device (guestfs_h *g,\n"
26624 " const char *src,\n"
26625 " const char *dest,\n"
26631 #: ../src/guestfs-actions.pod:1471
26634 " GUESTFS_COPY_FILE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26635 " GUESTFS_COPY_FILE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26636 " GUESTFS_COPY_FILE_TO_DEVICE_SIZE, int64_t size,\n"
26641 #: ../src/guestfs-actions.pod:1487
26642 msgid "guestfs_copy_file_to_device_va"
26646 #: ../src/guestfs-actions.pod:1489
26650 " guestfs_copy_file_to_device_va (guestfs_h *g,\n"
26651 " const char *src,\n"
26652 " const char *dest,\n"
26653 " va_list args);\n"
26658 #: ../src/guestfs-actions.pod:1495
26659 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_device>."
26663 #: ../src/guestfs-actions.pod:1499
26664 msgid "guestfs_copy_file_to_device_argv"
26668 #: ../src/guestfs-actions.pod:1501
26672 " guestfs_copy_file_to_device_argv (guestfs_h *g,\n"
26673 " const char *src,\n"
26674 " const char *dest,\n"
26676 "guestfs_copy_file_to_device_argv *optargs);\n"
26681 #: ../src/guestfs-actions.pod:1507
26682 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_device>."
26686 #: ../src/guestfs-actions.pod:1511
26687 msgid "guestfs_copy_file_to_file"
26691 #: ../src/guestfs-actions.pod:1513
26695 " guestfs_copy_file_to_file (guestfs_h *g,\n"
26696 " const char *src,\n"
26697 " const char *dest,\n"
26703 #: ../src/guestfs-actions.pod:1524
26706 " GUESTFS_COPY_FILE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26707 " GUESTFS_COPY_FILE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26708 " GUESTFS_COPY_FILE_TO_FILE_SIZE, int64_t size,\n"
26713 #: ../src/guestfs-actions.pod:1531
26715 "This is B<not> the function you want for copying files. This is for copying "
26716 "blocks within existing files. See C<guestfs_cp>, C<guestfs_cp_a> and "
26717 "C<guestfs_mv> for general file copying and moving functions."
26721 #: ../src/guestfs-actions.pod:1545
26722 msgid "guestfs_copy_file_to_file_va"
26726 #: ../src/guestfs-actions.pod:1547
26730 " guestfs_copy_file_to_file_va (guestfs_h *g,\n"
26731 " const char *src,\n"
26732 " const char *dest,\n"
26733 " va_list args);\n"
26738 #: ../src/guestfs-actions.pod:1553
26739 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_file>."
26743 #: ../src/guestfs-actions.pod:1557
26744 msgid "guestfs_copy_file_to_file_argv"
26748 #: ../src/guestfs-actions.pod:1559
26752 " guestfs_copy_file_to_file_argv (guestfs_h *g,\n"
26753 " const char *src,\n"
26754 " const char *dest,\n"
26755 " const struct guestfs_copy_file_to_file_argv "
26761 #: ../src/guestfs-actions.pod:1565
26762 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_file>."
26766 #: ../src/guestfs-actions.pod:1569
26767 msgid "guestfs_copy_size"
26771 #: ../src/guestfs-actions.pod:1571
26775 " guestfs_copy_size (guestfs_h *g,\n"
26776 " const char *src,\n"
26777 " const char *dest,\n"
26778 " int64_t size);\n"
26783 #: ../src/guestfs-actions.pod:1577 ../src/guestfs-actions.pod:1634
26785 "I<This function is deprecated.> In new code, use the "
26786 "L</guestfs_copy_device_to_device> call instead."
26790 #: ../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
26791 msgid "(Added in 1.0.87)"
26795 #: ../src/guestfs-actions.pod:1599
26800 #: ../src/guestfs-actions.pod:1601
26804 " guestfs_cp (guestfs_h *g,\n"
26805 " const char *src,\n"
26806 " const char *dest);\n"
26811 #: ../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
26812 msgid "(Added in 1.0.18)"
26816 #: ../src/guestfs-actions.pod:1613
26817 msgid "guestfs_cp_a"
26821 #: ../src/guestfs-actions.pod:1615
26825 " guestfs_cp_a (guestfs_h *g,\n"
26826 " const char *src,\n"
26827 " const char *dest);\n"
26832 #: ../src/guestfs-actions.pod:1627
26837 #: ../src/guestfs-actions.pod:1629
26841 " guestfs_dd (guestfs_h *g,\n"
26842 " const char *src,\n"
26843 " const char *dest);\n"
26848 #: ../src/guestfs-actions.pod:1646
26850 "If the destination is a device, it must be as large or larger than the "
26851 "source file or device, otherwise the copy will fail. This command cannot do "
26852 "partial copies (see C<guestfs_copy_device_to_device>)."
26856 #: ../src/guestfs-actions.pod:1655
26861 #: ../src/guestfs-actions.pod:1657
26865 " guestfs_df (guestfs_h *g);\n"
26870 #: ../src/guestfs-actions.pod:1662 ../src/guestfs-actions.pod:1679
26872 "This command is mostly useful for interactive sessions. It is I<not> "
26873 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
26878 #: ../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
26879 msgid "(Added in 1.0.54)"
26883 #: ../src/guestfs-actions.pod:1671
26884 msgid "guestfs_df_h"
26888 #: ../src/guestfs-actions.pod:1673
26892 " guestfs_df_h (guestfs_h *g);\n"
26897 #: ../src/guestfs-actions.pod:1688
26898 msgid "guestfs_dmesg"
26902 #: ../src/guestfs-actions.pod:1690
26906 " guestfs_dmesg (guestfs_h *g);\n"
26911 #: ../src/guestfs-actions.pod:1697
26913 "Another way to get the same information is to enable verbose messages with "
26914 "C<guestfs_set_verbose> or by setting the environment variable "
26915 "C<LIBGUESTFS_DEBUG=1> before running the program."
26919 #: ../src/guestfs-actions.pod:1707
26920 msgid "guestfs_download"
26924 #: ../src/guestfs-actions.pod:1709
26928 " guestfs_download (guestfs_h *g,\n"
26929 " const char *remotefilename,\n"
26930 " const char *filename);\n"
26935 #: ../src/guestfs-actions.pod:1719
26936 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
26940 #: ../src/guestfs-actions.pod:1730
26941 msgid "guestfs_download_offset"
26945 #: ../src/guestfs-actions.pod:1732
26949 " guestfs_download_offset (guestfs_h *g,\n"
26950 " const char *remotefilename,\n"
26951 " const char *filename,\n"
26952 " int64_t offset,\n"
26953 " int64_t size);\n"
26958 #: ../src/guestfs-actions.pod:1745
26960 "Note that there is no limit on the amount of data that can be downloaded "
26961 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
26962 "full amount unless an error occurs."
26966 #: ../src/guestfs-actions.pod:1750
26967 msgid "See also C<guestfs_download>, C<guestfs_pread>."
26971 #: ../src/guestfs-actions.pod:1759 ../src/guestfs-actions.pod:8015
26972 msgid "(Added in 1.5.17)"
26976 #: ../src/guestfs-actions.pod:1761
26977 msgid "guestfs_drop_caches"
26981 #: ../src/guestfs-actions.pod:1763
26985 " guestfs_drop_caches (guestfs_h *g,\n"
26986 " int whattodrop);\n"
26991 #: ../src/guestfs-actions.pod:1781
26996 #: ../src/guestfs-actions.pod:1783
27000 " guestfs_du (guestfs_h *g,\n"
27001 " const char *path);\n"
27006 #: ../src/guestfs-actions.pod:1806
27007 msgid "guestfs_e2fsck_f"
27011 #: ../src/guestfs-actions.pod:1808
27015 " guestfs_e2fsck_f (guestfs_h *g,\n"
27016 " const char *device);\n"
27021 #: ../src/guestfs-actions.pod:1816
27023 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
27024 "Normally you should use C<guestfs_fsck>."
27028 #: ../src/guestfs-actions.pod:1821
27029 msgid "(Added in 1.0.29)"
27033 #: ../src/guestfs-actions.pod:1823
27034 msgid "guestfs_echo_daemon"
27038 #: ../src/guestfs-actions.pod:1825
27042 " guestfs_echo_daemon (guestfs_h *g,\n"
27043 " char *const *words);\n"
27048 #: ../src/guestfs-actions.pod:1834
27049 msgid "See also C<guestfs_ping_daemon>."
27053 #: ../src/guestfs-actions.pod:1839 ../src/guestfs-actions.pod:2597 ../src/guestfs-actions.pod:7075
27054 msgid "(Added in 1.0.69)"
27058 #: ../src/guestfs-actions.pod:1841
27059 msgid "guestfs_egrep"
27063 #: ../src/guestfs-actions.pod:1843
27067 " guestfs_egrep (guestfs_h *g,\n"
27068 " const char *regex,\n"
27069 " const char *path);\n"
27074 #: ../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
27075 msgid "(Added in 1.0.66)"
27079 #: ../src/guestfs-actions.pod:1860
27080 msgid "guestfs_egrepi"
27084 #: ../src/guestfs-actions.pod:1862
27088 " guestfs_egrepi (guestfs_h *g,\n"
27089 " const char *regex,\n"
27090 " const char *path);\n"
27095 #: ../src/guestfs-actions.pod:1879
27096 msgid "guestfs_equal"
27100 #: ../src/guestfs-actions.pod:1881
27104 " guestfs_equal (guestfs_h *g,\n"
27105 " const char *file1,\n"
27106 " const char *file2);\n"
27111 #: ../src/guestfs-actions.pod:1895
27112 msgid "guestfs_exists"
27116 #: ../src/guestfs-actions.pod:1897
27120 " guestfs_exists (guestfs_h *g,\n"
27121 " const char *path);\n"
27126 #: ../src/guestfs-actions.pod:1904
27127 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
27131 #: ../src/guestfs-actions.pod:1910
27132 msgid "guestfs_fallocate"
27136 #: ../src/guestfs-actions.pod:1912
27140 " guestfs_fallocate (guestfs_h *g,\n"
27141 " const char *path,\n"
27147 #: ../src/guestfs-actions.pod:1917
27149 "I<This function is deprecated.> In new code, use the L</guestfs_fallocate64> "
27154 #: ../src/guestfs-actions.pod:1936
27155 msgid "guestfs_fallocate64"
27159 #: ../src/guestfs-actions.pod:1938
27163 " guestfs_fallocate64 (guestfs_h *g,\n"
27164 " const char *path,\n"
27170 #: ../src/guestfs-actions.pod:1947
27172 "Note that this call allocates disk blocks for the file. To create a sparse "
27173 "file use C<guestfs_truncate_size> instead."
27177 #: ../src/guestfs-actions.pod:1950
27179 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
27180 "oversight it only allowed 30 bit lengths to be specified, effectively "
27181 "limiting the maximum size of files created through that call to 1GB."
27185 #: ../src/guestfs-actions.pod:1961
27186 msgid "(Added in 1.3.17)"
27190 #: ../src/guestfs-actions.pod:1963
27191 msgid "guestfs_fgrep"
27195 #: ../src/guestfs-actions.pod:1965
27199 " guestfs_fgrep (guestfs_h *g,\n"
27200 " const char *pattern,\n"
27201 " const char *path);\n"
27206 #: ../src/guestfs-actions.pod:1982
27207 msgid "guestfs_fgrepi"
27211 #: ../src/guestfs-actions.pod:1984
27215 " guestfs_fgrepi (guestfs_h *g,\n"
27216 " const char *pattern,\n"
27217 " const char *path);\n"
27222 #: ../src/guestfs-actions.pod:2001
27223 msgid "guestfs_file"
27227 #: ../src/guestfs-actions.pod:2003
27231 " guestfs_file (guestfs_h *g,\n"
27232 " const char *path);\n"
27237 #: ../src/guestfs-actions.pod:2021
27239 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
27240 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
27244 #: ../src/guestfs-actions.pod:2029
27245 msgid "guestfs_file_architecture"
27249 #: ../src/guestfs-actions.pod:2031
27253 " guestfs_file_architecture (guestfs_h *g,\n"
27254 " const char *filename);\n"
27259 #: ../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
27260 msgid "(Added in 1.5.3)"
27264 #: ../src/guestfs-actions.pod:2141
27265 msgid "guestfs_filesize"
27269 #: ../src/guestfs-actions.pod:2143
27273 " guestfs_filesize (guestfs_h *g,\n"
27274 " const char *file);\n"
27279 #: ../src/guestfs-actions.pod:2149
27281 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
27282 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
27283 "devices, use C<guestfs_blockdev_getsize64>."
27287 #: ../src/guestfs-actions.pod:2155
27288 msgid "(Added in 1.0.82)"
27292 #: ../src/guestfs-actions.pod:2157
27293 msgid "guestfs_fill"
27297 #: ../src/guestfs-actions.pod:2159
27301 " guestfs_fill (guestfs_h *g,\n"
27304 " const char *path);\n"
27309 #: ../src/guestfs-actions.pod:2169
27311 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
27312 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
27313 "bytes use C<guestfs_fill_pattern>."
27317 #: ../src/guestfs-actions.pod:2181
27318 msgid "(Added in 1.0.79)"
27322 #: ../src/guestfs-actions.pod:2183
27323 msgid "guestfs_fill_pattern"
27327 #: ../src/guestfs-actions.pod:2185
27331 " guestfs_fill_pattern (guestfs_h *g,\n"
27332 " const char *pattern,\n"
27334 " const char *path);\n"
27339 #: ../src/guestfs-actions.pod:2191
27341 "This function is like C<guestfs_fill> except that it creates a new file of "
27342 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
27343 "pattern is truncated if necessary to ensure the length of the file is "
27344 "exactly C<len> bytes."
27348 #: ../src/guestfs-actions.pod:2203
27349 msgid "(Added in 1.3.12)"
27353 #: ../src/guestfs-actions.pod:2205
27354 msgid "guestfs_find"
27358 #: ../src/guestfs-actions.pod:2207
27362 " guestfs_find (guestfs_h *g,\n"
27363 " const char *directory);\n"
27368 #: ../src/guestfs-actions.pod:2223
27369 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
27373 #: ../src/guestfs-actions.pod:2236
27374 msgid "See also C<guestfs_find0>."
27378 #: ../src/guestfs-actions.pod:2245 ../src/guestfs-actions.pod:4768 ../src/guestfs-actions.pod:6623
27379 msgid "(Added in 1.0.27)"
27383 #: ../src/guestfs-actions.pod:2247
27384 msgid "guestfs_find0"
27388 #: ../src/guestfs-actions.pod:2249
27392 " guestfs_find0 (guestfs_h *g,\n"
27393 " const char *directory,\n"
27394 " const char *files);\n"
27399 #: ../src/guestfs-actions.pod:2258
27401 "This command works the same way as C<guestfs_find> with the following "
27406 #: ../src/guestfs-actions.pod:2285
27407 msgid "(Added in 1.0.74)"
27411 #: ../src/guestfs-actions.pod:2287
27412 msgid "guestfs_findfs_label"
27416 #: ../src/guestfs-actions.pod:2289
27420 " guestfs_findfs_label (guestfs_h *g,\n"
27421 " const char *label);\n"
27426 #: ../src/guestfs-actions.pod:2297
27427 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
27431 #: ../src/guestfs-actions.pod:2304
27432 msgid "guestfs_findfs_uuid"
27436 #: ../src/guestfs-actions.pod:2306
27440 " guestfs_findfs_uuid (guestfs_h *g,\n"
27441 " const char *uuid);\n"
27446 #: ../src/guestfs-actions.pod:2314
27447 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
27451 #: ../src/guestfs-actions.pod:2321
27452 msgid "guestfs_fsck"
27456 #: ../src/guestfs-actions.pod:2323
27460 " guestfs_fsck (guestfs_h *g,\n"
27461 " const char *fstype,\n"
27462 " const char *device);\n"
27467 #: ../src/guestfs-actions.pod:2358 ../src/guestfs-actions.pod:8522
27468 msgid "(Added in 1.0.16)"
27472 #: ../src/guestfs-actions.pod:2360
27473 msgid "guestfs_get_append"
27477 #: ../src/guestfs-actions.pod:2362
27481 " guestfs_get_append (guestfs_h *g);\n"
27486 #: ../src/guestfs-actions.pod:2370
27488 "This function returns a string which may be NULL. There is no way to return "
27489 "an error from this function. The string is owned by the guest handle and "
27490 "must I<not> be freed."
27494 #: ../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
27495 msgid "(Added in 1.0.26)"
27499 #: ../src/guestfs-actions.pod:2376
27500 msgid "guestfs_get_attach_method"
27504 #: ../src/guestfs-actions.pod:2378
27508 " guestfs_get_attach_method (guestfs_h *g);\n"
27513 #: ../src/guestfs-actions.pod:2381
27514 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
27518 #: ../src/guestfs-actions.pod:2386 ../src/guestfs-actions.pod:6810
27519 msgid "(Added in 1.9.8)"
27523 #: ../src/guestfs-actions.pod:2388
27524 msgid "guestfs_get_autosync"
27528 #: ../src/guestfs-actions.pod:2390
27532 " guestfs_get_autosync (guestfs_h *g);\n"
27537 #: ../src/guestfs-actions.pod:2399
27538 msgid "guestfs_get_direct"
27542 #: ../src/guestfs-actions.pod:2401
27546 " guestfs_get_direct (guestfs_h *g);\n"
27551 #: ../src/guestfs-actions.pod:2408 ../src/guestfs-actions.pod:6851
27552 msgid "(Added in 1.0.72)"
27556 #: ../src/guestfs-actions.pod:2410
27557 msgid "guestfs_get_e2label"
27561 #: ../src/guestfs-actions.pod:2412
27565 " guestfs_get_e2label (guestfs_h *g,\n"
27566 " const char *device);\n"
27571 #: ../src/guestfs-actions.pod:2416
27573 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_label> "
27578 #: ../src/guestfs-actions.pod:2429 ../src/guestfs-actions.pod:2450 ../src/guestfs-actions.pod:6869 ../src/guestfs-actions.pod:6888
27579 msgid "(Added in 1.0.15)"
27583 #: ../src/guestfs-actions.pod:2431
27584 msgid "guestfs_get_e2uuid"
27588 #: ../src/guestfs-actions.pod:2433
27592 " guestfs_get_e2uuid (guestfs_h *g,\n"
27593 " const char *device);\n"
27598 #: ../src/guestfs-actions.pod:2437
27600 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_uuid> "
27605 #: ../src/guestfs-actions.pod:2452
27606 msgid "guestfs_get_memsize"
27610 #: ../src/guestfs-actions.pod:2454
27614 " guestfs_get_memsize (guestfs_h *g);\n"
27619 #: ../src/guestfs-actions.pod:2460
27621 "If C<guestfs_set_memsize> was not called on this handle, and if "
27622 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
27623 "value for memsize."
27627 #: ../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
27628 msgid "(Added in 1.0.55)"
27632 #: ../src/guestfs-actions.pod:2471
27633 msgid "guestfs_get_network"
27637 #: ../src/guestfs-actions.pod:2473
27641 " guestfs_get_network (guestfs_h *g);\n"
27646 #: ../src/guestfs-actions.pod:2480 ../src/guestfs-actions.pod:6928
27647 msgid "(Added in 1.5.4)"
27651 #: ../src/guestfs-actions.pod:2482
27652 msgid "guestfs_get_path"
27656 #: ../src/guestfs-actions.pod:2484
27660 " guestfs_get_path (guestfs_h *g);\n"
27665 #: ../src/guestfs-actions.pod:2492 ../src/guestfs-actions.pod:2532
27667 "This function returns a string, or NULL on error. The string is owned by "
27668 "the guest handle and must I<not> be freed."
27672 #: ../src/guestfs-actions.pod:2497
27673 msgid "guestfs_get_pgroup"
27677 #: ../src/guestfs-actions.pod:2499
27681 " guestfs_get_pgroup (guestfs_h *g);\n"
27686 #: ../src/guestfs-actions.pod:2506 ../src/guestfs-actions.pod:6964 ../src/guestfs-actions.pod:8423
27687 msgid "(Added in 1.11.18)"
27691 #: ../src/guestfs-actions.pod:2508
27692 msgid "guestfs_get_pid"
27696 #: ../src/guestfs-actions.pod:2510
27700 " guestfs_get_pid (guestfs_h *g);\n"
27705 #: ../src/guestfs-actions.pod:2520
27706 msgid "(Added in 1.0.56)"
27710 #: ../src/guestfs-actions.pod:2522
27711 msgid "guestfs_get_qemu"
27715 #: ../src/guestfs-actions.pod:2524
27719 " guestfs_get_qemu (guestfs_h *g);\n"
27724 #: ../src/guestfs-actions.pod:2535 ../src/guestfs-actions.pod:6992
27725 msgid "(Added in 1.0.6)"
27729 #: ../src/guestfs-actions.pod:2537
27730 msgid "guestfs_get_recovery_proc"
27734 #: ../src/guestfs-actions.pod:2539
27738 " guestfs_get_recovery_proc (guestfs_h *g);\n"
27743 #: ../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
27744 msgid "(Added in 1.0.77)"
27748 #: ../src/guestfs-actions.pod:2548
27749 msgid "guestfs_get_selinux"
27753 #: ../src/guestfs-actions.pod:2550
27757 " guestfs_get_selinux (guestfs_h *g);\n"
27762 #: ../src/guestfs-actions.pod:2553
27764 "This returns the current setting of the selinux flag which is passed to the "
27765 "appliance at boot time. See C<guestfs_set_selinux>."
27769 #: ../src/guestfs-actions.pod:2561 ../src/guestfs-actions.pod:2635 ../src/guestfs-actions.pod:7035 ../src/guestfs-actions.pod:7109
27770 msgid "(Added in 1.0.67)"
27774 #: ../src/guestfs-actions.pod:2563
27775 msgid "guestfs_get_smp"
27779 #: ../src/guestfs-actions.pod:2565
27783 " guestfs_get_smp (guestfs_h *g);\n"
27788 #: ../src/guestfs-actions.pod:2574
27789 msgid "guestfs_get_state"
27793 #: ../src/guestfs-actions.pod:2576
27797 " guestfs_get_state (guestfs_h *g);\n"
27802 #: ../src/guestfs-actions.pod:2588
27803 msgid "guestfs_get_trace"
27807 #: ../src/guestfs-actions.pod:2590
27811 " guestfs_get_trace (guestfs_h *g);\n"
27816 #: ../src/guestfs-actions.pod:2599
27817 msgid "guestfs_get_umask"
27821 #: ../src/guestfs-actions.pod:2601
27825 " guestfs_get_umask (guestfs_h *g);\n"
27830 #: ../src/guestfs-actions.pod:2604
27832 "Return the current umask. By default the umask is C<022> unless it has been "
27833 "set by calling C<guestfs_umask>."
27837 #: ../src/guestfs-actions.pod:2611
27838 msgid "guestfs_get_verbose"
27842 #: ../src/guestfs-actions.pod:2613
27846 " guestfs_get_verbose (guestfs_h *g);\n"
27851 #: ../src/guestfs-actions.pod:2622
27852 msgid "guestfs_getcon"
27856 #: ../src/guestfs-actions.pod:2624
27860 " guestfs_getcon (guestfs_h *g);\n"
27865 #: ../src/guestfs-actions.pod:2629
27866 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
27870 #: ../src/guestfs-actions.pod:2637
27871 msgid "guestfs_getxattr"
27875 #: ../src/guestfs-actions.pod:2639
27879 " guestfs_getxattr (guestfs_h *g,\n"
27880 " const char *path,\n"
27881 " const char *name,\n"
27882 " size_t *size_r);\n"
27887 #: ../src/guestfs-actions.pod:2645
27889 "Get a single extended attribute from file C<path> named C<name>. This call "
27890 "follows symlinks. If you want to lookup an extended attribute for the "
27891 "symlink itself, use C<guestfs_lgetxattr>."
27895 #: ../src/guestfs-actions.pod:2649 ../src/guestfs-actions.pod:4144
27897 "Normally it is better to get all extended attributes from a file in one go "
27898 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
27899 "implementations are buggy and do not provide a way to list out attributes. "
27900 "For these filesystems (notably ntfs-3g) you have to know the names of the "
27901 "extended attributes you want in advance and call this function."
27905 #: ../src/guestfs-actions.pod:2659
27906 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
27910 #: ../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
27912 "This function returns a buffer, or NULL on error. The size of the returned "
27913 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
27918 #: ../src/guestfs-actions.pod:2665 ../src/guestfs-actions.pod:4160
27919 msgid "(Added in 1.7.24)"
27923 #: ../src/guestfs-actions.pod:2667
27924 msgid "guestfs_getxattrs"
27928 #: ../src/guestfs-actions.pod:2669
27931 " struct guestfs_xattr_list *\n"
27932 " guestfs_getxattrs (guestfs_h *g,\n"
27933 " const char *path);\n"
27938 #: ../src/guestfs-actions.pod:2679
27939 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
27943 #: ../src/guestfs-actions.pod:2681 ../src/guestfs-actions.pod:4172 ../src/guestfs-actions.pod:4862
27945 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
27946 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
27950 #: ../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
27951 msgid "(Added in 1.0.59)"
27955 #: ../src/guestfs-actions.pod:2687
27956 msgid "guestfs_glob_expand"
27960 #: ../src/guestfs-actions.pod:2689
27964 " guestfs_glob_expand (guestfs_h *g,\n"
27965 " const char *pattern);\n"
27970 #: ../src/guestfs-actions.pod:2708 ../src/guestfs-actions.pod:7312 ../src/guestfs-actions.pod:7329
27971 msgid "(Added in 1.0.50)"
27975 #: ../src/guestfs-actions.pod:2710
27976 msgid "guestfs_grep"
27980 #: ../src/guestfs-actions.pod:2712
27984 " guestfs_grep (guestfs_h *g,\n"
27985 " const char *regex,\n"
27986 " const char *path);\n"
27991 #: ../src/guestfs-actions.pod:2729
27992 msgid "guestfs_grepi"
27996 #: ../src/guestfs-actions.pod:2731
28000 " guestfs_grepi (guestfs_h *g,\n"
28001 " const char *regex,\n"
28002 " const char *path);\n"
28007 #: ../src/guestfs-actions.pod:2748
28008 msgid "guestfs_grub_install"
28012 #: ../src/guestfs-actions.pod:2750
28016 " guestfs_grub_install (guestfs_h *g,\n"
28017 " const char *root,\n"
28018 " const char *device);\n"
28023 #: ../src/guestfs-actions.pod:2793
28024 msgid "(Added in 1.0.17)"
28028 #: ../src/guestfs-actions.pod:2795
28029 msgid "guestfs_head"
28033 #: ../src/guestfs-actions.pod:2797
28037 " guestfs_head (guestfs_h *g,\n"
28038 " const char *path);\n"
28043 #: ../src/guestfs-actions.pod:2813
28044 msgid "guestfs_head_n"
28048 #: ../src/guestfs-actions.pod:2815
28052 " guestfs_head_n (guestfs_h *g,\n"
28054 " const char *path);\n"
28059 #: ../src/guestfs-actions.pod:2837
28060 msgid "guestfs_hexdump"
28064 #: ../src/guestfs-actions.pod:2839
28068 " guestfs_hexdump (guestfs_h *g,\n"
28069 " const char *path);\n"
28074 #: ../src/guestfs-actions.pod:2852 ../src/guestfs-actions.pod:7393 ../src/guestfs-actions.pod:7448
28075 msgid "(Added in 1.0.22)"
28079 #: ../src/guestfs-actions.pod:2854
28080 msgid "guestfs_initrd_cat"
28084 #: ../src/guestfs-actions.pod:2856
28088 " guestfs_initrd_cat (guestfs_h *g,\n"
28089 " const char *initrdpath,\n"
28090 " const char *filename,\n"
28091 " size_t *size_r);\n"
28096 #: ../src/guestfs-actions.pod:2872
28097 msgid "See also C<guestfs_initrd_list>."
28101 #: ../src/guestfs-actions.pod:2883
28102 msgid "guestfs_initrd_list"
28106 #: ../src/guestfs-actions.pod:2885
28110 " guestfs_initrd_list (guestfs_h *g,\n"
28111 " const char *path);\n"
28116 #: ../src/guestfs-actions.pod:2905
28117 msgid "guestfs_inotify_add_watch"
28121 #: ../src/guestfs-actions.pod:2907
28125 " guestfs_inotify_add_watch (guestfs_h *g,\n"
28126 " const char *path,\n"
28132 #: ../src/guestfs-actions.pod:2926
28133 msgid "guestfs_inotify_close"
28137 #: ../src/guestfs-actions.pod:2928
28141 " guestfs_inotify_close (guestfs_h *g);\n"
28146 #: ../src/guestfs-actions.pod:2939
28147 msgid "guestfs_inotify_files"
28151 #: ../src/guestfs-actions.pod:2941
28155 " guestfs_inotify_files (guestfs_h *g);\n"
28160 #: ../src/guestfs-actions.pod:2944
28162 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
28163 "returns a list of pathnames of objects that were touched. The returned "
28164 "pathnames are sorted and deduplicated."
28168 #: ../src/guestfs-actions.pod:2954
28169 msgid "guestfs_inotify_init"
28173 #: ../src/guestfs-actions.pod:2956
28177 " guestfs_inotify_init (guestfs_h *g,\n"
28178 " int maxevents);\n"
28183 #: ../src/guestfs-actions.pod:2964
28185 "C<maxevents> is the maximum number of events which will be queued up between "
28186 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
28187 "passed as C<0>, then the kernel (or previously set) default is used. For "
28188 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
28189 "throws away events, but records the fact that it threw them away by setting "
28190 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
28191 "C<guestfs_inotify_read>)."
28195 #: ../src/guestfs-actions.pod:2974
28197 "Before any events are generated, you have to add some watches to the "
28198 "internal watch list. See: C<guestfs_inotify_add_watch>, "
28199 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
28203 #: ../src/guestfs-actions.pod:2980
28205 "Queued up events should be read periodically by calling "
28206 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
28207 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
28208 "often enough then you risk the internal queue overflowing."
28212 #: ../src/guestfs-actions.pod:2987
28214 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
28215 "This also removes any watches automatically."
28219 #: ../src/guestfs-actions.pod:3000
28220 msgid "guestfs_inotify_read"
28224 #: ../src/guestfs-actions.pod:3002
28227 " struct guestfs_inotify_event_list *\n"
28228 " guestfs_inotify_read (guestfs_h *g);\n"
28233 #: ../src/guestfs-actions.pod:3016
28235 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
28236 "there was an error. I<The caller must call "
28237 "C<guestfs_free_inotify_event_list> after use>."
28241 #: ../src/guestfs-actions.pod:3022
28242 msgid "guestfs_inotify_rm_watch"
28246 #: ../src/guestfs-actions.pod:3024
28250 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
28256 #: ../src/guestfs-actions.pod:3028
28258 "Remove a previously defined inotify watch. See "
28259 "C<guestfs_inotify_add_watch>."
28263 #: ../src/guestfs-actions.pod:3035
28264 msgid "guestfs_inspect_get_arch"
28268 #: ../src/guestfs-actions.pod:3037
28272 " guestfs_inspect_get_arch (guestfs_h *g,\n"
28273 " const char *root);\n"
28278 #: ../src/guestfs-actions.pod:3041
28280 "This returns the architecture of the inspected operating system. The "
28281 "possible return values are listed under C<guestfs_file_architecture>."
28285 #: ../src/guestfs-actions.pod:3055
28286 msgid "guestfs_inspect_get_distro"
28290 #: ../src/guestfs-actions.pod:3057
28294 " guestfs_inspect_get_distro (guestfs_h *g,\n"
28295 " const char *root);\n"
28300 #: ../src/guestfs-actions.pod:3157
28301 msgid "guestfs_inspect_get_drive_mappings"
28305 #: ../src/guestfs-actions.pod:3159
28309 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
28310 " const char *root);\n"
28315 #: ../src/guestfs-actions.pod:3188
28317 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28318 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
28322 #: ../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
28324 "This function returns a NULL-terminated array of strings, or NULL if there "
28325 "was an error. The array of strings will always have length C<2n+1>, where "
28326 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
28327 "caller must free the strings and the array after use>."
28331 #: ../src/guestfs-actions.pod:3198 ../src/guestfs-actions.pod:3659
28332 msgid "(Added in 1.9.17)"
28336 #: ../src/guestfs-actions.pod:3200
28337 msgid "guestfs_inspect_get_filesystems"
28341 #: ../src/guestfs-actions.pod:3202
28345 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
28346 " const char *root);\n"
28351 #: ../src/guestfs-actions.pod:3214
28353 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28354 "C<guestfs_inspect_get_mountpoints>."
28358 #: ../src/guestfs-actions.pod:3223
28359 msgid "guestfs_inspect_get_format"
28363 #: ../src/guestfs-actions.pod:3225
28367 " guestfs_inspect_get_format (guestfs_h *g,\n"
28368 " const char *root);\n"
28373 #: ../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
28374 msgid "(Added in 1.9.4)"
28378 #: ../src/guestfs-actions.pod:3261
28379 msgid "guestfs_inspect_get_hostname"
28383 #: ../src/guestfs-actions.pod:3263
28387 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
28388 " const char *root);\n"
28393 #: ../src/guestfs-actions.pod:3278
28394 msgid "(Added in 1.7.9)"
28398 #: ../src/guestfs-actions.pod:3280
28399 msgid "guestfs_inspect_get_icon"
28403 #: ../src/guestfs-actions.pod:3282
28407 " guestfs_inspect_get_icon (guestfs_h *g,\n"
28408 " const char *root,\n"
28409 " size_t *size_r,\n"
28415 #: ../src/guestfs-actions.pod:3293
28418 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
28419 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
28424 #: ../src/guestfs-actions.pod:3360 ../src/guestfs-actions.pod:4190 ../src/guestfs-actions.pod:5574
28425 msgid "(Added in 1.11.12)"
28429 #: ../src/guestfs-actions.pod:3362
28430 msgid "guestfs_inspect_get_icon_va"
28434 #: ../src/guestfs-actions.pod:3364
28438 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
28439 " const char *root,\n"
28440 " size_t *size_r,\n"
28441 " va_list args);\n"
28446 #: ../src/guestfs-actions.pod:3370
28447 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
28451 #: ../src/guestfs-actions.pod:3374
28452 msgid "guestfs_inspect_get_icon_argv"
28456 #: ../src/guestfs-actions.pod:3376
28460 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
28461 " const char *root,\n"
28462 " size_t *size_r,\n"
28463 " const struct guestfs_inspect_get_icon_argv "
28469 #: ../src/guestfs-actions.pod:3382
28470 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
28474 #: ../src/guestfs-actions.pod:3386
28475 msgid "guestfs_inspect_get_major_version"
28479 #: ../src/guestfs-actions.pod:3388
28483 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
28484 " const char *root);\n"
28489 #: ../src/guestfs-actions.pod:3410
28490 msgid "guestfs_inspect_get_minor_version"
28494 #: ../src/guestfs-actions.pod:3412
28498 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
28499 " const char *root);\n"
28504 #: ../src/guestfs-actions.pod:3421
28506 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28507 "C<guestfs_inspect_get_major_version>."
28511 #: ../src/guestfs-actions.pod:3428
28512 msgid "guestfs_inspect_get_mountpoints"
28516 #: ../src/guestfs-actions.pod:3430
28520 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
28521 " const char *root);\n"
28526 #: ../src/guestfs-actions.pod:3451
28528 "For operating systems like Windows which still use drive letters, this call "
28529 "will only return an entry for the first drive \"mounted on\" C</>. For "
28530 "information about the mapping of drive letters to partitions, see "
28531 "C<guestfs_inspect_get_drive_mappings>."
28535 #: ../src/guestfs-actions.pod:3457
28537 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28538 "C<guestfs_inspect_get_filesystems>."
28542 #: ../src/guestfs-actions.pod:3468
28543 msgid "guestfs_inspect_get_package_format"
28547 #: ../src/guestfs-actions.pod:3470
28551 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
28552 " const char *root);\n"
28557 #: ../src/guestfs-actions.pod:3474
28559 "This function and C<guestfs_inspect_get_package_management> return the "
28560 "package format and package management tool used by the inspected operating "
28561 "system. For example for Fedora these functions would return C<rpm> (package "
28562 "format) and C<yum> (package management)."
28566 #: ../src/guestfs-actions.pod:3493 ../src/guestfs-actions.pod:3521
28567 msgid "(Added in 1.7.5)"
28571 #: ../src/guestfs-actions.pod:3495
28572 msgid "guestfs_inspect_get_package_management"
28576 #: ../src/guestfs-actions.pod:3497
28580 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
28581 " const char *root);\n"
28586 #: ../src/guestfs-actions.pod:3501
28588 "C<guestfs_inspect_get_package_format> and this function return the package "
28589 "format and package management tool used by the inspected operating system. "
28590 "For example for Fedora these functions would return C<rpm> (package format) "
28591 "and C<yum> (package management)."
28595 #: ../src/guestfs-actions.pod:3523
28596 msgid "guestfs_inspect_get_product_name"
28600 #: ../src/guestfs-actions.pod:3525
28604 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
28605 " const char *root);\n"
28610 #: ../src/guestfs-actions.pod:3544
28611 msgid "guestfs_inspect_get_product_variant"
28615 #: ../src/guestfs-actions.pod:3546
28619 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
28620 " const char *root);\n"
28625 #: ../src/guestfs-actions.pod:3569
28627 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28628 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
28632 #: ../src/guestfs-actions.pod:3576
28633 msgid "(Added in 1.9.13)"
28637 #: ../src/guestfs-actions.pod:3578
28638 msgid "guestfs_inspect_get_roots"
28642 #: ../src/guestfs-actions.pod:3580
28646 " guestfs_inspect_get_roots (guestfs_h *g);\n"
28651 #: ../src/guestfs-actions.pod:3583
28653 "This function is a convenient way to get the list of root devices, as "
28654 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
28655 "the whole inspection process."
28659 #: ../src/guestfs-actions.pod:3587
28661 "This returns an empty list if either no root devices were found or the "
28662 "caller has not called C<guestfs_inspect_os>."
28666 #: ../src/guestfs-actions.pod:3596
28667 msgid "(Added in 1.7.3)"
28671 #: ../src/guestfs-actions.pod:3598
28672 msgid "guestfs_inspect_get_type"
28676 #: ../src/guestfs-actions.pod:3600
28680 " guestfs_inspect_get_type (guestfs_h *g,\n"
28681 " const char *root);\n"
28686 #: ../src/guestfs-actions.pod:3641
28687 msgid "guestfs_inspect_get_windows_current_control_set"
28691 #: ../src/guestfs-actions.pod:3643
28695 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
28696 " const char *root);\n"
28701 #: ../src/guestfs-actions.pod:3661
28702 msgid "guestfs_inspect_get_windows_systemroot"
28706 #: ../src/guestfs-actions.pod:3663
28710 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
28711 " const char *root);\n"
28716 #: ../src/guestfs-actions.pod:3679
28717 msgid "(Added in 1.5.25)"
28721 #: ../src/guestfs-actions.pod:3681
28722 msgid "guestfs_inspect_is_live"
28726 #: ../src/guestfs-actions.pod:3683
28730 " guestfs_inspect_is_live (guestfs_h *g,\n"
28731 " const char *root);\n"
28736 #: ../src/guestfs-actions.pod:3687
28738 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28739 "disk), then this returns true if a live image was detected on the disk."
28743 #: ../src/guestfs-actions.pod:3697
28744 msgid "guestfs_inspect_is_multipart"
28748 #: ../src/guestfs-actions.pod:3699
28752 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
28753 " const char *root);\n"
28758 #: ../src/guestfs-actions.pod:3703
28760 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28761 "disk), then this returns true if the disk is part of a set."
28765 #: ../src/guestfs-actions.pod:3713
28766 msgid "guestfs_inspect_is_netinst"
28770 #: ../src/guestfs-actions.pod:3715
28774 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
28775 " const char *root);\n"
28780 #: ../src/guestfs-actions.pod:3719
28782 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28783 "disk), then this returns true if the disk is a network installer, ie. not a "
28784 "self-contained install CD but one which is likely to require network access "
28785 "to complete the install."
28789 #: ../src/guestfs-actions.pod:3731
28790 msgid "guestfs_inspect_list_applications"
28794 #: ../src/guestfs-actions.pod:3733
28797 " struct guestfs_application_list *\n"
28798 " guestfs_inspect_list_applications (guestfs_h *g,\n"
28799 " const char *root);\n"
28804 #: ../src/guestfs-actions.pod:3739
28806 "I<Note:> This call works differently from other parts of the inspection "
28807 "API. You have to call C<guestfs_inspect_os>, then "
28808 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
28809 "this. Listing applications is a significantly more difficult operation "
28810 "which requires access to the full filesystem. Also note that unlike the "
28811 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
28812 "the libguestfs handle, this call actually reads parts of the mounted "
28813 "filesystems during the call."
28817 #: ../src/guestfs-actions.pod:3829
28819 "This function returns a C<struct guestfs_application_list *>, or NULL if "
28820 "there was an error. I<The caller must call C<guestfs_free_application_list> "
28825 #: ../src/guestfs-actions.pod:3833
28826 msgid "(Added in 1.7.8)"
28830 #: ../src/guestfs-actions.pod:3835
28831 msgid "guestfs_inspect_os"
28835 #: ../src/guestfs-actions.pod:3837
28839 " guestfs_inspect_os (guestfs_h *g);\n"
28844 #: ../src/guestfs-actions.pod:3853
28846 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
28847 "functions in order to query further information about each operating system, "
28848 "such as the name and version."
28852 #: ../src/guestfs-actions.pod:3858
28854 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
28855 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
28856 "the contents. This should be called with no disks currently mounted. The "
28857 "function may also use Augeas, so any existing Augeas handle will be closed."
28861 #: ../src/guestfs-actions.pod:3870 ../src/guestfs-actions.pod:4201 ../src/guestfs-actions.pod:4294
28862 msgid "See also C<guestfs_list_filesystems>."
28866 #: ../src/guestfs-actions.pod:3878
28867 msgid "guestfs_is_blockdev"
28871 #: ../src/guestfs-actions.pod:3880
28875 " guestfs_is_blockdev (guestfs_h *g,\n"
28876 " const char *path);\n"
28881 #: ../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
28882 msgid "See also C<guestfs_stat>."
28886 #: ../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
28887 msgid "(Added in 1.5.10)"
28891 #: ../src/guestfs-actions.pod:3893
28892 msgid "guestfs_is_busy"
28896 #: ../src/guestfs-actions.pod:3895
28900 " guestfs_is_busy (guestfs_h *g);\n"
28905 #: ../src/guestfs-actions.pod:3907
28906 msgid "guestfs_is_chardev"
28910 #: ../src/guestfs-actions.pod:3909
28914 " guestfs_is_chardev (guestfs_h *g,\n"
28915 " const char *path);\n"
28920 #: ../src/guestfs-actions.pod:3922
28921 msgid "guestfs_is_config"
28925 #: ../src/guestfs-actions.pod:3924
28929 " guestfs_is_config (guestfs_h *g);\n"
28934 #: ../src/guestfs-actions.pod:3936
28935 msgid "guestfs_is_dir"
28939 #: ../src/guestfs-actions.pod:3938
28943 " guestfs_is_dir (guestfs_h *g,\n"
28944 " const char *path);\n"
28949 #: ../src/guestfs-actions.pod:3952
28950 msgid "guestfs_is_fifo"
28954 #: ../src/guestfs-actions.pod:3954
28958 " guestfs_is_fifo (guestfs_h *g,\n"
28959 " const char *path);\n"
28964 #: ../src/guestfs-actions.pod:3967
28965 msgid "guestfs_is_file"
28969 #: ../src/guestfs-actions.pod:3969
28973 " guestfs_is_file (guestfs_h *g,\n"
28974 " const char *path);\n"
28979 #: ../src/guestfs-actions.pod:3983
28980 msgid "guestfs_is_launching"
28984 #: ../src/guestfs-actions.pod:3985
28988 " guestfs_is_launching (guestfs_h *g);\n"
28993 #: ../src/guestfs-actions.pod:3997
28994 msgid "guestfs_is_lv"
28998 #: ../src/guestfs-actions.pod:3999
29002 " guestfs_is_lv (guestfs_h *g,\n"
29003 " const char *device);\n"
29008 #: ../src/guestfs-actions.pod:4010
29009 msgid "guestfs_is_ready"
29013 #: ../src/guestfs-actions.pod:4012
29017 " guestfs_is_ready (guestfs_h *g);\n"
29022 #: ../src/guestfs-actions.pod:4024
29023 msgid "guestfs_is_socket"
29027 #: ../src/guestfs-actions.pod:4026
29031 " guestfs_is_socket (guestfs_h *g,\n"
29032 " const char *path);\n"
29037 #: ../src/guestfs-actions.pod:4039
29038 msgid "guestfs_is_symlink"
29042 #: ../src/guestfs-actions.pod:4041
29046 " guestfs_is_symlink (guestfs_h *g,\n"
29047 " const char *path);\n"
29052 #: ../src/guestfs-actions.pod:4054
29053 msgid "guestfs_is_zero"
29057 #: ../src/guestfs-actions.pod:4056
29061 " guestfs_is_zero (guestfs_h *g,\n"
29062 " const char *path);\n"
29067 #: ../src/guestfs-actions.pod:4065 ../src/guestfs-actions.pod:4079
29068 msgid "(Added in 1.11.8)"
29072 #: ../src/guestfs-actions.pod:4067
29073 msgid "guestfs_is_zero_device"
29077 #: ../src/guestfs-actions.pod:4069
29081 " guestfs_is_zero_device (guestfs_h *g,\n"
29082 " const char *device);\n"
29087 #: ../src/guestfs-actions.pod:4081
29088 msgid "guestfs_kill_subprocess"
29092 #: ../src/guestfs-actions.pod:4083
29096 " guestfs_kill_subprocess (guestfs_h *g);\n"
29101 #: ../src/guestfs-actions.pod:4092
29102 msgid "guestfs_launch"
29106 #: ../src/guestfs-actions.pod:4094
29110 " guestfs_launch (guestfs_h *g);\n"
29115 #: ../src/guestfs-actions.pod:4112
29116 msgid "guestfs_lchown"
29120 #: ../src/guestfs-actions.pod:4114
29124 " guestfs_lchown (guestfs_h *g,\n"
29127 " const char *path);\n"
29132 #: ../src/guestfs-actions.pod:4120
29134 "Change the file owner to C<owner> and group to C<group>. This is like "
29135 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
29136 "changed, not the target."
29140 #: ../src/guestfs-actions.pod:4132
29141 msgid "guestfs_lgetxattr"
29145 #: ../src/guestfs-actions.pod:4134
29149 " guestfs_lgetxattr (guestfs_h *g,\n"
29150 " const char *path,\n"
29151 " const char *name,\n"
29152 " size_t *size_r);\n"
29157 #: ../src/guestfs-actions.pod:4154
29158 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
29162 #: ../src/guestfs-actions.pod:4162
29163 msgid "guestfs_lgetxattrs"
29167 #: ../src/guestfs-actions.pod:4164
29170 " struct guestfs_xattr_list *\n"
29171 " guestfs_lgetxattrs (guestfs_h *g,\n"
29172 " const char *path);\n"
29177 #: ../src/guestfs-actions.pod:4168
29179 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
29180 "then it returns the extended attributes of the link itself."
29184 #: ../src/guestfs-actions.pod:4178
29185 msgid "guestfs_list_9p"
29189 #: ../src/guestfs-actions.pod:4180
29193 " guestfs_list_9p (guestfs_h *g);\n"
29198 #: ../src/guestfs-actions.pod:4192
29199 msgid "guestfs_list_devices"
29203 #: ../src/guestfs-actions.pod:4194
29207 " guestfs_list_devices (guestfs_h *g);\n"
29212 #: ../src/guestfs-actions.pod:4209
29213 msgid "guestfs_list_dm_devices"
29217 #: ../src/guestfs-actions.pod:4211
29221 " guestfs_list_dm_devices (guestfs_h *g);\n"
29226 #: ../src/guestfs-actions.pod:4216
29228 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
29229 "previous call to C<guestfs_luks_open>."
29233 #: ../src/guestfs-actions.pod:4219
29235 "Device mapper devices which correspond to logical volumes are I<not> "
29236 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
29241 #: ../src/guestfs-actions.pod:4227 ../src/guestfs-actions.pod:5813
29242 msgid "(Added in 1.11.15)"
29246 #: ../src/guestfs-actions.pod:4229
29247 msgid "guestfs_list_filesystems"
29251 #: ../src/guestfs-actions.pod:4231
29255 " guestfs_list_filesystems (guestfs_h *g);\n"
29260 #: ../src/guestfs-actions.pod:4251
29262 "This command runs other libguestfs commands, which might include "
29263 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
29264 "soon after launch and only when nothing is mounted."
29268 #: ../src/guestfs-actions.pod:4255
29270 "Not all of the filesystems returned will be mountable. In particular, swap "
29271 "partitions are returned in the list. Also this command does not check that "
29272 "each filesystem found is valid and mountable, and some filesystems might be "
29273 "mountable but require special options. Filesystems may not all belong to a "
29274 "single logical operating system (use C<guestfs_inspect_os> to look for "
29279 #: ../src/guestfs-actions.pod:4269 ../src/guestfs-actions.pod:6173
29280 msgid "(Added in 1.5.15)"
29284 #: ../src/guestfs-actions.pod:4271
29285 msgid "guestfs_list_md_devices"
29289 #: ../src/guestfs-actions.pod:4273
29293 " guestfs_list_md_devices (guestfs_h *g);\n"
29298 #: ../src/guestfs-actions.pod:4282
29299 msgid "guestfs_list_partitions"
29303 #: ../src/guestfs-actions.pod:4284
29307 " guestfs_list_partitions (guestfs_h *g);\n"
29312 #: ../src/guestfs-actions.pod:4291
29314 "This does not return logical volumes. For that you will need to call "
29319 #: ../src/guestfs-actions.pod:4302
29324 #: ../src/guestfs-actions.pod:4304
29328 " guestfs_ll (guestfs_h *g,\n"
29329 " const char *directory);\n"
29334 #: ../src/guestfs-actions.pod:4319
29339 #: ../src/guestfs-actions.pod:4321
29343 " guestfs_ln (guestfs_h *g,\n"
29344 " const char *target,\n"
29345 " const char *linkname);\n"
29350 #: ../src/guestfs-actions.pod:4332
29351 msgid "guestfs_ln_f"
29355 #: ../src/guestfs-actions.pod:4334
29359 " guestfs_ln_f (guestfs_h *g,\n"
29360 " const char *target,\n"
29361 " const char *linkname);\n"
29366 #: ../src/guestfs-actions.pod:4346
29367 msgid "guestfs_ln_s"
29371 #: ../src/guestfs-actions.pod:4348
29375 " guestfs_ln_s (guestfs_h *g,\n"
29376 " const char *target,\n"
29377 " const char *linkname);\n"
29382 #: ../src/guestfs-actions.pod:4359
29383 msgid "guestfs_ln_sf"
29387 #: ../src/guestfs-actions.pod:4361
29391 " guestfs_ln_sf (guestfs_h *g,\n"
29392 " const char *target,\n"
29393 " const char *linkname);\n"
29398 #: ../src/guestfs-actions.pod:4373
29399 msgid "guestfs_lremovexattr"
29403 #: ../src/guestfs-actions.pod:4375
29407 " guestfs_lremovexattr (guestfs_h *g,\n"
29408 " const char *xattr,\n"
29409 " const char *path);\n"
29414 #: ../src/guestfs-actions.pod:4380
29416 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
29417 "link, then it removes an extended attribute of the link itself."
29421 #: ../src/guestfs-actions.pod:4388
29426 #: ../src/guestfs-actions.pod:4390
29430 " guestfs_ls (guestfs_h *g,\n"
29431 " const char *directory);\n"
29436 #: ../src/guestfs-actions.pod:4398
29438 "This command is mostly useful for interactive sessions. Programs should "
29439 "probably use C<guestfs_readdir> instead."
29443 #: ../src/guestfs-actions.pod:4407
29444 msgid "guestfs_lsetxattr"
29448 #: ../src/guestfs-actions.pod:4409
29452 " guestfs_lsetxattr (guestfs_h *g,\n"
29453 " const char *xattr,\n"
29454 " const char *val,\n"
29456 " const char *path);\n"
29461 #: ../src/guestfs-actions.pod:4416
29463 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
29464 "then it sets an extended attribute of the link itself."
29468 #: ../src/guestfs-actions.pod:4424
29469 msgid "guestfs_lstat"
29473 #: ../src/guestfs-actions.pod:4426
29476 " struct guestfs_stat *\n"
29477 " guestfs_lstat (guestfs_h *g,\n"
29478 " const char *path);\n"
29483 #: ../src/guestfs-actions.pod:4432
29485 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
29486 "link, then the link is stat-ed, not the file it refers to."
29490 #: ../src/guestfs-actions.pod:4438 ../src/guestfs-actions.pod:7353
29492 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
29493 "error. I<The caller must call C<guestfs_free_stat> after use>."
29497 #: ../src/guestfs-actions.pod:4442 ../src/guestfs-actions.pod:7357 ../src/guestfs-actions.pod:7375 ../src/guestfs-actions.pod:7876
29498 msgid "(Added in 0.9.2)"
29502 #: ../src/guestfs-actions.pod:4444
29503 msgid "guestfs_lstatlist"
29507 #: ../src/guestfs-actions.pod:4446
29510 " struct guestfs_stat_list *\n"
29511 " guestfs_lstatlist (guestfs_h *g,\n"
29512 " const char *path,\n"
29513 " char *const *names);\n"
29518 #: ../src/guestfs-actions.pod:4451
29520 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
29521 "files, where all files are in the directory C<path>. C<names> is the list "
29522 "of files from this directory."
29526 #: ../src/guestfs-actions.pod:4460
29528 "This call is intended for programs that want to efficiently list a directory "
29529 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
29530 "for a similarly efficient call for getting extended attributes. Very long "
29531 "directory listings might cause the protocol message size to be exceeded, "
29532 "causing this call to fail. The caller must split up such requests into "
29533 "smaller groups of names."
29537 #: ../src/guestfs-actions.pod:4468
29539 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
29540 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
29544 #: ../src/guestfs-actions.pod:4474
29545 msgid "guestfs_luks_add_key"
29549 #: ../src/guestfs-actions.pod:4476
29553 " guestfs_luks_add_key (guestfs_h *g,\n"
29554 " const char *device,\n"
29555 " const char *key,\n"
29556 " const char *newkey,\n"
29562 #: ../src/guestfs-actions.pod:4488
29564 "Note that if C<keyslot> already contains a key, then this command will "
29565 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
29569 #: ../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
29571 "This function takes a key or passphrase parameter which could contain "
29572 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
29577 #: ../src/guestfs-actions.pod:4498 ../src/guestfs-actions.pod:4535 ../src/guestfs-actions.pod:4555 ../src/guestfs-actions.pod:4575
29578 msgid "(Added in 1.5.2)"
29582 #: ../src/guestfs-actions.pod:4500
29583 msgid "guestfs_luks_close"
29587 #: ../src/guestfs-actions.pod:4502
29591 " guestfs_luks_close (guestfs_h *g,\n"
29592 " const char *device);\n"
29597 #: ../src/guestfs-actions.pod:4506
29599 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
29600 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
29601 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
29602 "underlying block device."
29606 #: ../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
29607 msgid "(Added in 1.5.1)"
29611 #: ../src/guestfs-actions.pod:4516
29612 msgid "guestfs_luks_format"
29616 #: ../src/guestfs-actions.pod:4518
29620 " guestfs_luks_format (guestfs_h *g,\n"
29621 " const char *device,\n"
29622 " const char *key,\n"
29628 #: ../src/guestfs-actions.pod:4537
29629 msgid "guestfs_luks_format_cipher"
29633 #: ../src/guestfs-actions.pod:4539
29637 " guestfs_luks_format_cipher (guestfs_h *g,\n"
29638 " const char *device,\n"
29639 " const char *key,\n"
29641 " const char *cipher);\n"
29646 #: ../src/guestfs-actions.pod:4546
29648 "This command is the same as C<guestfs_luks_format> but it also allows you to "
29649 "set the C<cipher> used."
29653 #: ../src/guestfs-actions.pod:4557
29654 msgid "guestfs_luks_kill_slot"
29658 #: ../src/guestfs-actions.pod:4559
29662 " guestfs_luks_kill_slot (guestfs_h *g,\n"
29663 " const char *device,\n"
29664 " const char *key,\n"
29670 #: ../src/guestfs-actions.pod:4577
29671 msgid "guestfs_luks_open"
29675 #: ../src/guestfs-actions.pod:4579
29679 " guestfs_luks_open (guestfs_h *g,\n"
29680 " const char *device,\n"
29681 " const char *key,\n"
29682 " const char *mapname);\n"
29687 #: ../src/guestfs-actions.pod:4597
29689 "If this block device contains LVM volume groups, then calling "
29690 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
29695 #: ../src/guestfs-actions.pod:4601
29696 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
29700 #: ../src/guestfs-actions.pod:4612
29701 msgid "guestfs_luks_open_ro"
29705 #: ../src/guestfs-actions.pod:4614
29709 " guestfs_luks_open_ro (guestfs_h *g,\n"
29710 " const char *device,\n"
29711 " const char *key,\n"
29712 " const char *mapname);\n"
29717 #: ../src/guestfs-actions.pod:4620
29719 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
29724 #: ../src/guestfs-actions.pod:4631
29725 msgid "guestfs_lvcreate"
29729 #: ../src/guestfs-actions.pod:4633
29733 " guestfs_lvcreate (guestfs_h *g,\n"
29734 " const char *logvol,\n"
29735 " const char *volgroup,\n"
29741 #: ../src/guestfs-actions.pod:4646
29742 msgid "guestfs_lvm_canonical_lv_name"
29746 #: ../src/guestfs-actions.pod:4648
29750 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
29751 " const char *lvname);\n"
29756 #: ../src/guestfs-actions.pod:4659
29757 msgid "See also C<guestfs_is_lv>."
29761 #: ../src/guestfs-actions.pod:4664
29762 msgid "(Added in 1.5.24)"
29766 #: ../src/guestfs-actions.pod:4666
29767 msgid "guestfs_lvm_clear_filter"
29771 #: ../src/guestfs-actions.pod:4668
29775 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
29780 #: ../src/guestfs-actions.pod:4671
29782 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
29783 "see every block device."
29787 #: ../src/guestfs-actions.pod:4681
29788 msgid "guestfs_lvm_remove_all"
29792 #: ../src/guestfs-actions.pod:4683
29796 " guestfs_lvm_remove_all (guestfs_h *g);\n"
29801 #: ../src/guestfs-actions.pod:4693
29802 msgid "guestfs_lvm_set_filter"
29806 #: ../src/guestfs-actions.pod:4695
29810 " guestfs_lvm_set_filter (guestfs_h *g,\n"
29811 " char *const *devices);\n"
29816 #: ../src/guestfs-actions.pod:4726
29817 msgid "guestfs_lvremove"
29821 #: ../src/guestfs-actions.pod:4728
29825 " guestfs_lvremove (guestfs_h *g,\n"
29826 " const char *device);\n"
29831 #: ../src/guestfs-actions.pod:4740 ../src/guestfs-actions.pod:6288 ../src/guestfs-actions.pod:8246
29832 msgid "(Added in 1.0.13)"
29836 #: ../src/guestfs-actions.pod:4742
29837 msgid "guestfs_lvrename"
29841 #: ../src/guestfs-actions.pod:4744
29845 " guestfs_lvrename (guestfs_h *g,\n"
29846 " const char *logvol,\n"
29847 " const char *newlogvol);\n"
29852 #: ../src/guestfs-actions.pod:4753 ../src/guestfs-actions.pod:8259
29853 msgid "(Added in 1.0.83)"
29857 #: ../src/guestfs-actions.pod:4755
29858 msgid "guestfs_lvresize"
29862 #: ../src/guestfs-actions.pod:4757
29866 " guestfs_lvresize (guestfs_h *g,\n"
29867 " const char *device,\n"
29873 #: ../src/guestfs-actions.pod:4770
29874 msgid "guestfs_lvresize_free"
29878 #: ../src/guestfs-actions.pod:4772
29882 " guestfs_lvresize_free (guestfs_h *g,\n"
29883 " const char *lv,\n"
29889 #: ../src/guestfs-actions.pod:4785
29890 msgid "(Added in 1.3.3)"
29894 #: ../src/guestfs-actions.pod:4787
29895 msgid "guestfs_lvs"
29899 #: ../src/guestfs-actions.pod:4789
29903 " guestfs_lvs (guestfs_h *g);\n"
29908 #: ../src/guestfs-actions.pod:4798
29909 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
29913 #: ../src/guestfs-actions.pod:4806
29914 msgid "guestfs_lvs_full"
29918 #: ../src/guestfs-actions.pod:4808
29921 " struct guestfs_lvm_lv_list *\n"
29922 " guestfs_lvs_full (guestfs_h *g);\n"
29927 #: ../src/guestfs-actions.pod:4814
29929 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
29930 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after "
29935 #: ../src/guestfs-actions.pod:4820
29936 msgid "guestfs_lvuuid"
29940 #: ../src/guestfs-actions.pod:4822
29944 " guestfs_lvuuid (guestfs_h *g,\n"
29945 " const char *device);\n"
29950 #: ../src/guestfs-actions.pod:4833
29951 msgid "guestfs_lxattrlist"
29955 #: ../src/guestfs-actions.pod:4835
29958 " struct guestfs_xattr_list *\n"
29959 " guestfs_lxattrlist (guestfs_h *g,\n"
29960 " const char *path,\n"
29961 " char *const *names);\n"
29966 #: ../src/guestfs-actions.pod:4854
29968 "This call is intended for programs that want to efficiently list a directory "
29969 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
29970 "a similarly efficient call for getting standard stats. Very long directory "
29971 "listings might cause the protocol message size to be exceeded, causing this "
29972 "call to fail. The caller must split up such requests into smaller groups of "
29977 #: ../src/guestfs-actions.pod:4868
29978 msgid "guestfs_mdadm_create"
29982 #: ../src/guestfs-actions.pod:4870
29986 " guestfs_mdadm_create (guestfs_h *g,\n"
29987 " const char *name,\n"
29988 " char *const *devices,\n"
29994 #: ../src/guestfs-actions.pod:4881
29997 " GUESTFS_MDADM_CREATE_MISSINGBITMAP, int64_t missingbitmap,\n"
29998 " GUESTFS_MDADM_CREATE_NRDEVICES, int nrdevices,\n"
29999 " GUESTFS_MDADM_CREATE_SPARE, int spare,\n"
30000 " GUESTFS_MDADM_CREATE_CHUNK, int64_t chunk,\n"
30001 " GUESTFS_MDADM_CREATE_LEVEL, const char *level,\n"
30006 #: ../src/guestfs-actions.pod:4943
30007 msgid "guestfs_mdadm_create_va"
30011 #: ../src/guestfs-actions.pod:4945
30015 " guestfs_mdadm_create_va (guestfs_h *g,\n"
30016 " const char *name,\n"
30017 " char *const *devices,\n"
30018 " va_list args);\n"
30023 #: ../src/guestfs-actions.pod:4951
30024 msgid "This is the \"va_list variant\" of L</guestfs_mdadm_create>."
30028 #: ../src/guestfs-actions.pod:4955
30029 msgid "guestfs_mdadm_create_argv"
30033 #: ../src/guestfs-actions.pod:4957
30037 " guestfs_mdadm_create_argv (guestfs_h *g,\n"
30038 " const char *name,\n"
30039 " char *const *devices,\n"
30040 " const struct guestfs_mdadm_create_argv "
30046 #: ../src/guestfs-actions.pod:4963
30047 msgid "This is the \"argv variant\" of L</guestfs_mdadm_create>."
30051 #: ../src/guestfs-actions.pod:4967
30052 msgid "guestfs_mdadm_detail"
30056 #: ../src/guestfs-actions.pod:4969
30060 " guestfs_mdadm_detail (guestfs_h *g,\n"
30061 " const char *md);\n"
30066 #: ../src/guestfs-actions.pod:5006
30067 msgid "guestfs_mkdir"
30071 #: ../src/guestfs-actions.pod:5008
30075 " guestfs_mkdir (guestfs_h *g,\n"
30076 " const char *path);\n"
30081 #: ../src/guestfs-actions.pod:5018
30082 msgid "guestfs_mkdir_mode"
30086 #: ../src/guestfs-actions.pod:5020
30090 " guestfs_mkdir_mode (guestfs_h *g,\n"
30091 " const char *path,\n"
30097 #: ../src/guestfs-actions.pod:5032
30098 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
30102 #: ../src/guestfs-actions.pod:5038
30103 msgid "guestfs_mkdir_p"
30107 #: ../src/guestfs-actions.pod:5040
30111 " guestfs_mkdir_p (guestfs_h *g,\n"
30112 " const char *path);\n"
30117 #: ../src/guestfs-actions.pod:5051
30118 msgid "guestfs_mkdtemp"
30122 #: ../src/guestfs-actions.pod:5053
30126 " guestfs_mkdtemp (guestfs_h *g,\n"
30127 " const char *template);\n"
30132 #: ../src/guestfs-actions.pod:5081
30133 msgid "guestfs_mke2fs_J"
30137 #: ../src/guestfs-actions.pod:5083
30141 " guestfs_mke2fs_J (guestfs_h *g,\n"
30142 " const char *fstype,\n"
30143 " int blocksize,\n"
30144 " const char *device,\n"
30145 " const char *journal);\n"
30150 #: ../src/guestfs-actions.pod:5096
30151 msgid "See also C<guestfs_mke2journal>."
30155 #: ../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
30156 msgid "(Added in 1.0.68)"
30160 #: ../src/guestfs-actions.pod:5102
30161 msgid "guestfs_mke2fs_JL"
30165 #: ../src/guestfs-actions.pod:5104
30169 " guestfs_mke2fs_JL (guestfs_h *g,\n"
30170 " const char *fstype,\n"
30171 " int blocksize,\n"
30172 " const char *device,\n"
30173 " const char *label);\n"
30178 #: ../src/guestfs-actions.pod:5114
30179 msgid "See also C<guestfs_mke2journal_L>."
30183 #: ../src/guestfs-actions.pod:5120
30184 msgid "guestfs_mke2fs_JU"
30188 #: ../src/guestfs-actions.pod:5122
30192 " guestfs_mke2fs_JU (guestfs_h *g,\n"
30193 " const char *fstype,\n"
30194 " int blocksize,\n"
30195 " const char *device,\n"
30196 " const char *uuid);\n"
30201 #: ../src/guestfs-actions.pod:5132
30202 msgid "See also C<guestfs_mke2journal_U>."
30206 #: ../src/guestfs-actions.pod:5138
30207 msgid "guestfs_mke2journal"
30211 #: ../src/guestfs-actions.pod:5140
30215 " guestfs_mke2journal (guestfs_h *g,\n"
30216 " int blocksize,\n"
30217 " const char *device);\n"
30222 #: ../src/guestfs-actions.pod:5154
30223 msgid "guestfs_mke2journal_L"
30227 #: ../src/guestfs-actions.pod:5156
30231 " guestfs_mke2journal_L (guestfs_h *g,\n"
30232 " int blocksize,\n"
30233 " const char *label,\n"
30234 " const char *device);\n"
30239 #: ../src/guestfs-actions.pod:5168
30240 msgid "guestfs_mke2journal_U"
30244 #: ../src/guestfs-actions.pod:5170
30248 " guestfs_mke2journal_U (guestfs_h *g,\n"
30249 " int blocksize,\n"
30250 " const char *uuid,\n"
30251 " const char *device);\n"
30256 #: ../src/guestfs-actions.pod:5182
30257 msgid "guestfs_mkfifo"
30261 #: ../src/guestfs-actions.pod:5184
30265 " guestfs_mkfifo (guestfs_h *g,\n"
30267 " const char *path);\n"
30272 #: ../src/guestfs-actions.pod:5189
30274 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
30275 "is just a convenient wrapper around C<guestfs_mknod>."
30279 #: ../src/guestfs-actions.pod:5199
30280 msgid "guestfs_mkfs"
30284 #: ../src/guestfs-actions.pod:5201
30288 " guestfs_mkfs (guestfs_h *g,\n"
30289 " const char *fstype,\n"
30290 " const char *device);\n"
30295 #: ../src/guestfs-actions.pod:5214
30296 msgid "guestfs_mkfs_b"
30300 #: ../src/guestfs-actions.pod:5216
30304 " guestfs_mkfs_b (guestfs_h *g,\n"
30305 " const char *fstype,\n"
30306 " int blocksize,\n"
30307 " const char *device);\n"
30312 #: ../src/guestfs-actions.pod:5222
30314 "I<This function is deprecated.> In new code, use the L</guestfs_mkfs_opts> "
30319 #: ../src/guestfs-actions.pod:5229
30321 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
30322 "block size of the resulting filesystem. Supported block sizes depend on the "
30323 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
30327 #: ../src/guestfs-actions.pod:5241
30328 msgid "guestfs_mkfs_opts"
30332 #: ../src/guestfs-actions.pod:5243
30336 " guestfs_mkfs_opts (guestfs_h *g,\n"
30337 " const char *fstype,\n"
30338 " const char *device,\n"
30344 #: ../src/guestfs-actions.pod:5254
30347 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
30348 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
30349 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
30350 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
30355 #: ../src/guestfs-actions.pod:5302
30356 msgid "(Added in 1.7.19)"
30360 #: ../src/guestfs-actions.pod:5304
30361 msgid "guestfs_mkfs_opts_va"
30365 #: ../src/guestfs-actions.pod:5306
30369 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
30370 " const char *fstype,\n"
30371 " const char *device,\n"
30372 " va_list args);\n"
30377 #: ../src/guestfs-actions.pod:5312
30378 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
30382 #: ../src/guestfs-actions.pod:5316
30383 msgid "guestfs_mkfs_opts_argv"
30387 #: ../src/guestfs-actions.pod:5318
30391 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
30392 " const char *fstype,\n"
30393 " const char *device,\n"
30394 " const struct guestfs_mkfs_opts_argv *optargs);\n"
30399 #: ../src/guestfs-actions.pod:5324
30400 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
30404 #: ../src/guestfs-actions.pod:5328
30405 msgid "guestfs_mkmountpoint"
30409 #: ../src/guestfs-actions.pod:5330
30413 " guestfs_mkmountpoint (guestfs_h *g,\n"
30414 " const char *exemptpath);\n"
30419 #: ../src/guestfs-actions.pod:5334
30421 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
30422 "that can be used to create extra mountpoints before mounting the first "
30427 #: ../src/guestfs-actions.pod:5358
30429 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
30430 "may get unexpected errors if you try to mix these calls. It is safest to "
30431 "manually unmount filesystems and remove mountpoints after use."
30435 #: ../src/guestfs-actions.pod:5362
30437 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
30438 "first, so for this to work for manual mountpoints, you must ensure that the "
30439 "innermost mountpoints have the longest pathnames, as in the example code "
30444 #: ../src/guestfs-actions.pod:5369
30446 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
30447 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
30448 "can also trigger these issues."
30452 #: ../src/guestfs-actions.pod:5375 ../src/guestfs-actions.pod:5681 ../src/guestfs-actions.pod:6708
30453 msgid "(Added in 1.0.62)"
30457 #: ../src/guestfs-actions.pod:5377
30458 msgid "guestfs_mknod"
30462 #: ../src/guestfs-actions.pod:5379
30466 " guestfs_mknod (guestfs_h *g,\n"
30470 " const char *path);\n"
30475 #: ../src/guestfs-actions.pod:5394
30477 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
30478 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
30479 "regular file). These constants are available in the standard Linux header "
30480 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
30481 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
30482 "the appropriate constant for you."
30486 #: ../src/guestfs-actions.pod:5408
30487 msgid "guestfs_mknod_b"
30491 #: ../src/guestfs-actions.pod:5410
30495 " guestfs_mknod_b (guestfs_h *g,\n"
30499 " const char *path);\n"
30504 #: ../src/guestfs-actions.pod:5417
30506 "This call creates a block device node called C<path> with mode C<mode> and "
30507 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30508 "wrapper around C<guestfs_mknod>."
30512 #: ../src/guestfs-actions.pod:5427
30513 msgid "guestfs_mknod_c"
30517 #: ../src/guestfs-actions.pod:5429
30521 " guestfs_mknod_c (guestfs_h *g,\n"
30525 " const char *path);\n"
30530 #: ../src/guestfs-actions.pod:5436
30532 "This call creates a char device node called C<path> with mode C<mode> and "
30533 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30534 "wrapper around C<guestfs_mknod>."
30538 #: ../src/guestfs-actions.pod:5446
30539 msgid "guestfs_mkswap"
30543 #: ../src/guestfs-actions.pod:5448
30547 " guestfs_mkswap (guestfs_h *g,\n"
30548 " const char *device);\n"
30553 #: ../src/guestfs-actions.pod:5458
30554 msgid "guestfs_mkswap_L"
30558 #: ../src/guestfs-actions.pod:5460
30562 " guestfs_mkswap_L (guestfs_h *g,\n"
30563 " const char *label,\n"
30564 " const char *device);\n"
30569 #: ../src/guestfs-actions.pod:5475
30570 msgid "guestfs_mkswap_U"
30574 #: ../src/guestfs-actions.pod:5477
30578 " guestfs_mkswap_U (guestfs_h *g,\n"
30579 " const char *uuid,\n"
30580 " const char *device);\n"
30585 #: ../src/guestfs-actions.pod:5488
30586 msgid "guestfs_mkswap_file"
30590 #: ../src/guestfs-actions.pod:5490
30594 " guestfs_mkswap_file (guestfs_h *g,\n"
30595 " const char *path);\n"
30600 #: ../src/guestfs-actions.pod:5496
30602 "This command just writes a swap file signature to an existing file. To "
30603 "create the file itself, use something like C<guestfs_fallocate>."
30607 #: ../src/guestfs-actions.pod:5503
30608 msgid "guestfs_modprobe"
30612 #: ../src/guestfs-actions.pod:5505
30616 " guestfs_modprobe (guestfs_h *g,\n"
30617 " const char *modulename);\n"
30622 #: ../src/guestfs-actions.pod:5518
30623 msgid "guestfs_mount"
30627 #: ../src/guestfs-actions.pod:5520
30631 " guestfs_mount (guestfs_h *g,\n"
30632 " const char *device,\n"
30633 " const char *mountpoint);\n"
30638 #: ../src/guestfs-actions.pod:5539
30640 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
30641 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
30642 "problems for users. If your program might need to work with older versions "
30643 "of libguestfs, use C<guestfs_mount_options> instead (using an empty string "
30644 "for the first parameter if you don't want any options)."
30648 #: ../src/guestfs-actions.pod:5550
30649 msgid "guestfs_mount_9p"
30653 #: ../src/guestfs-actions.pod:5552
30657 " guestfs_mount_9p (guestfs_h *g,\n"
30658 " const char *mounttag,\n"
30659 " const char *mountpoint,\n"
30665 #: ../src/guestfs-actions.pod:5563
30668 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
30673 #: ../src/guestfs-actions.pod:5576
30674 msgid "guestfs_mount_9p_va"
30678 #: ../src/guestfs-actions.pod:5578
30682 " guestfs_mount_9p_va (guestfs_h *g,\n"
30683 " const char *mounttag,\n"
30684 " const char *mountpoint,\n"
30685 " va_list args);\n"
30690 #: ../src/guestfs-actions.pod:5584
30691 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
30695 #: ../src/guestfs-actions.pod:5588
30696 msgid "guestfs_mount_9p_argv"
30700 #: ../src/guestfs-actions.pod:5590
30704 " guestfs_mount_9p_argv (guestfs_h *g,\n"
30705 " const char *mounttag,\n"
30706 " const char *mountpoint,\n"
30707 " const struct guestfs_mount_9p_argv *optargs);\n"
30712 #: ../src/guestfs-actions.pod:5596
30713 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
30717 #: ../src/guestfs-actions.pod:5600
30718 msgid "guestfs_mount_loop"
30722 #: ../src/guestfs-actions.pod:5602
30726 " guestfs_mount_loop (guestfs_h *g,\n"
30727 " const char *file,\n"
30728 " const char *mountpoint);\n"
30733 #: ../src/guestfs-actions.pod:5615
30734 msgid "guestfs_mount_options"
30738 #: ../src/guestfs-actions.pod:5617
30742 " guestfs_mount_options (guestfs_h *g,\n"
30743 " const char *options,\n"
30744 " const char *device,\n"
30745 " const char *mountpoint);\n"
30750 #: ../src/guestfs-actions.pod:5623
30752 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30753 "the mount options as for the L<mount(8)> I<-o> flag."
30757 #: ../src/guestfs-actions.pod:5633 ../src/guestfs-actions.pod:5647 ../src/guestfs-actions.pod:5664
30758 msgid "(Added in 1.0.10)"
30762 #: ../src/guestfs-actions.pod:5635
30763 msgid "guestfs_mount_ro"
30767 #: ../src/guestfs-actions.pod:5637
30771 " guestfs_mount_ro (guestfs_h *g,\n"
30772 " const char *device,\n"
30773 " const char *mountpoint);\n"
30778 #: ../src/guestfs-actions.pod:5642
30780 "This is the same as the C<guestfs_mount> command, but it mounts the "
30781 "filesystem with the read-only (I<-o ro>) flag."
30785 #: ../src/guestfs-actions.pod:5649
30786 msgid "guestfs_mount_vfs"
30790 #: ../src/guestfs-actions.pod:5651
30794 " guestfs_mount_vfs (guestfs_h *g,\n"
30795 " const char *options,\n"
30796 " const char *vfstype,\n"
30797 " const char *device,\n"
30798 " const char *mountpoint);\n"
30803 #: ../src/guestfs-actions.pod:5658
30805 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30806 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
30811 #: ../src/guestfs-actions.pod:5666
30812 msgid "guestfs_mountpoints"
30816 #: ../src/guestfs-actions.pod:5668
30820 " guestfs_mountpoints (guestfs_h *g);\n"
30825 #: ../src/guestfs-actions.pod:5671
30827 "This call is similar to C<guestfs_mounts>. That call returns a list of "
30828 "devices. This one returns a hash table (map) of device name to directory "
30829 "where the device is mounted."
30833 #: ../src/guestfs-actions.pod:5683
30834 msgid "guestfs_mounts"
30838 #: ../src/guestfs-actions.pod:5685
30842 " guestfs_mounts (guestfs_h *g);\n"
30847 #: ../src/guestfs-actions.pod:5693
30848 msgid "See also: C<guestfs_mountpoints>"
30852 #: ../src/guestfs-actions.pod:5701
30857 #: ../src/guestfs-actions.pod:5703
30861 " guestfs_mv (guestfs_h *g,\n"
30862 " const char *src,\n"
30863 " const char *dest);\n"
30868 #: ../src/guestfs-actions.pod:5715
30869 msgid "guestfs_ntfs_3g_probe"
30873 #: ../src/guestfs-actions.pod:5717
30877 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
30879 " const char *device);\n"
30884 #: ../src/guestfs-actions.pod:5736
30885 msgid "(Added in 1.0.43)"
30889 #: ../src/guestfs-actions.pod:5738
30890 msgid "guestfs_ntfsresize"
30894 #: ../src/guestfs-actions.pod:5740
30898 " guestfs_ntfsresize (guestfs_h *g,\n"
30899 " const char *device);\n"
30904 #: ../src/guestfs-actions.pod:5744 ../src/guestfs-actions.pod:5844
30906 "I<This function is deprecated.> In new code, use the "
30907 "L</guestfs_ntfsresize_opts> call instead."
30911 #: ../src/guestfs-actions.pod:5768
30912 msgid "guestfs_ntfsresize_opts"
30916 #: ../src/guestfs-actions.pod:5770
30920 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
30921 " const char *device,\n"
30927 #: ../src/guestfs-actions.pod:5780
30930 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
30931 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
30936 #: ../src/guestfs-actions.pod:5800
30938 "After the resize operation, the filesystem is always marked as requiring a "
30939 "consistency check (for safety). You have to boot into Windows to perform "
30940 "this check and clear this condition. If you I<don't> set the C<force> "
30941 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
30942 "times on a single filesystem without booting into Windows between each "
30947 #: ../src/guestfs-actions.pod:5815
30948 msgid "guestfs_ntfsresize_opts_va"
30952 #: ../src/guestfs-actions.pod:5817
30956 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
30957 " const char *device,\n"
30958 " va_list args);\n"
30963 #: ../src/guestfs-actions.pod:5822
30964 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
30968 #: ../src/guestfs-actions.pod:5826
30969 msgid "guestfs_ntfsresize_opts_argv"
30973 #: ../src/guestfs-actions.pod:5828
30977 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
30978 " const char *device,\n"
30979 " const struct guestfs_ntfsresize_opts_argv "
30985 #: ../src/guestfs-actions.pod:5833
30986 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
30990 #: ../src/guestfs-actions.pod:5837
30991 msgid "guestfs_ntfsresize_size"
30995 #: ../src/guestfs-actions.pod:5839
30999 " guestfs_ntfsresize_size (guestfs_h *g,\n"
31000 " const char *device,\n"
31001 " int64_t size);\n"
31006 #: ../src/guestfs-actions.pod:5851
31008 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
31009 "to specify the new size (in bytes) explicitly."
31013 #: ../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
31014 msgid "(Added in 1.3.14)"
31018 #: ../src/guestfs-actions.pod:5858
31019 msgid "guestfs_part_add"
31023 #: ../src/guestfs-actions.pod:5860
31027 " guestfs_part_add (guestfs_h *g,\n"
31028 " const char *device,\n"
31029 " const char *prlogex,\n"
31030 " int64_t startsect,\n"
31031 " int64_t endsect);\n"
31036 #: ../src/guestfs-actions.pod:5867
31038 "This command adds a partition to C<device>. If there is no partition table "
31039 "on the device, call C<guestfs_part_init> first."
31043 #: ../src/guestfs-actions.pod:5879
31045 "Creating a partition which covers the whole disk is not so easy. Use "
31046 "C<guestfs_part_disk> to do that."
31050 #: ../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
31051 msgid "(Added in 1.0.78)"
31055 #: ../src/guestfs-actions.pod:5886
31056 msgid "guestfs_part_del"
31060 #: ../src/guestfs-actions.pod:5888
31064 " guestfs_part_del (guestfs_h *g,\n"
31065 " const char *device,\n"
31071 #: ../src/guestfs-actions.pod:5903
31072 msgid "guestfs_part_disk"
31076 #: ../src/guestfs-actions.pod:5905
31080 " guestfs_part_disk (guestfs_h *g,\n"
31081 " const char *device,\n"
31082 " const char *parttype);\n"
31087 #: ../src/guestfs-actions.pod:5910
31089 "This command is simply a combination of C<guestfs_part_init> followed by "
31090 "C<guestfs_part_add> to create a single primary partition covering the whole "
31095 #: ../src/guestfs-actions.pod:5914
31097 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
31098 "possible values are described in C<guestfs_part_init>."
31102 #: ../src/guestfs-actions.pod:5921
31103 msgid "guestfs_part_get_bootable"
31107 #: ../src/guestfs-actions.pod:5923
31111 " guestfs_part_get_bootable (guestfs_h *g,\n"
31112 " const char *device,\n"
31118 #: ../src/guestfs-actions.pod:5931
31119 msgid "See also C<guestfs_part_set_bootable>."
31123 #: ../src/guestfs-actions.pod:5937
31124 msgid "guestfs_part_get_mbr_id"
31128 #: ../src/guestfs-actions.pod:5939
31132 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
31133 " const char *device,\n"
31139 #: ../src/guestfs-actions.pod:5947 ../src/guestfs-actions.pod:6129
31141 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
31142 "undefined results for other partition table types (see "
31143 "C<guestfs_part_get_parttype>)."
31147 #: ../src/guestfs-actions.pod:5955
31148 msgid "guestfs_part_get_parttype"
31152 #: ../src/guestfs-actions.pod:5957
31156 " guestfs_part_get_parttype (guestfs_h *g,\n"
31157 " const char *device);\n"
31162 #: ../src/guestfs-actions.pod:5964
31164 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
31165 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
31166 "possible, although unusual. See C<guestfs_part_init> for a full list."
31170 #: ../src/guestfs-actions.pod:5974
31171 msgid "guestfs_part_init"
31175 #: ../src/guestfs-actions.pod:5976
31179 " guestfs_part_init (guestfs_h *g,\n"
31180 " const char *device,\n"
31181 " const char *parttype);\n"
31186 #: ../src/guestfs-actions.pod:5985
31188 "Initially there are no partitions. Following this, you should call "
31189 "C<guestfs_part_add> for each partition required."
31193 #: ../src/guestfs-actions.pod:6058
31194 msgid "guestfs_part_list"
31198 #: ../src/guestfs-actions.pod:6060
31201 " struct guestfs_partition_list *\n"
31202 " guestfs_part_list (guestfs_h *g,\n"
31203 " const char *device);\n"
31208 #: ../src/guestfs-actions.pod:6077
31210 "Start of the partition I<in bytes>. To get sectors you have to divide by "
31211 "the device's sector size, see C<guestfs_blockdev_getss>."
31215 #: ../src/guestfs-actions.pod:6090
31217 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
31218 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
31223 #: ../src/guestfs-actions.pod:6096
31224 msgid "guestfs_part_set_bootable"
31228 #: ../src/guestfs-actions.pod:6098
31232 " guestfs_part_set_bootable (guestfs_h *g,\n"
31233 " const char *device,\n"
31235 " int bootable);\n"
31240 #: ../src/guestfs-actions.pod:6115
31241 msgid "guestfs_part_set_mbr_id"
31245 #: ../src/guestfs-actions.pod:6117
31249 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
31250 " const char *device,\n"
31257 #: ../src/guestfs-actions.pod:6137
31258 msgid "guestfs_part_set_name"
31262 #: ../src/guestfs-actions.pod:6139
31266 " guestfs_part_set_name (guestfs_h *g,\n"
31267 " const char *device,\n"
31269 " const char *name);\n"
31274 #: ../src/guestfs-actions.pod:6155
31275 msgid "guestfs_part_to_dev"
31279 #: ../src/guestfs-actions.pod:6157
31283 " guestfs_part_to_dev (guestfs_h *g,\n"
31284 " const char *partition);\n"
31289 #: ../src/guestfs-actions.pod:6165 ../src/guestfs-actions.pod:6184
31291 "The named partition must exist, for example as a string returned from "
31292 "C<guestfs_list_partitions>."
31296 #: ../src/guestfs-actions.pod:6168
31297 msgid "See also C<guestfs_part_to_partnum>."
31301 #: ../src/guestfs-actions.pod:6175
31302 msgid "guestfs_part_to_partnum"
31306 #: ../src/guestfs-actions.pod:6177
31310 " guestfs_part_to_partnum (guestfs_h *g,\n"
31311 " const char *partition);\n"
31316 #: ../src/guestfs-actions.pod:6187
31317 msgid "See also C<guestfs_part_to_dev>."
31321 #: ../src/guestfs-actions.pod:6193
31322 msgid "guestfs_ping_daemon"
31326 #: ../src/guestfs-actions.pod:6195
31330 " guestfs_ping_daemon (guestfs_h *g);\n"
31335 #: ../src/guestfs-actions.pod:6207
31336 msgid "guestfs_pread"
31340 #: ../src/guestfs-actions.pod:6209
31344 " guestfs_pread (guestfs_h *g,\n"
31345 " const char *path,\n"
31347 " int64_t offset,\n"
31348 " size_t *size_r);\n"
31353 #: ../src/guestfs-actions.pod:6222
31354 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
31358 #: ../src/guestfs-actions.pod:6233
31359 msgid "guestfs_pread_device"
31363 #: ../src/guestfs-actions.pod:6235
31367 " guestfs_pread_device (guestfs_h *g,\n"
31368 " const char *device,\n"
31370 " int64_t offset,\n"
31371 " size_t *size_r);\n"
31376 #: ../src/guestfs-actions.pod:6248
31377 msgid "See also C<guestfs_pread>."
31381 #: ../src/guestfs-actions.pod:6257
31382 msgid "(Added in 1.5.21)"
31386 #: ../src/guestfs-actions.pod:6259
31387 msgid "guestfs_pvcreate"
31391 #: ../src/guestfs-actions.pod:6261
31395 " guestfs_pvcreate (guestfs_h *g,\n"
31396 " const char *device);\n"
31401 #: ../src/guestfs-actions.pod:6273
31402 msgid "guestfs_pvremove"
31406 #: ../src/guestfs-actions.pod:6275
31410 " guestfs_pvremove (guestfs_h *g,\n"
31411 " const char *device);\n"
31416 #: ../src/guestfs-actions.pod:6290
31417 msgid "guestfs_pvresize"
31421 #: ../src/guestfs-actions.pod:6292
31425 " guestfs_pvresize (guestfs_h *g,\n"
31426 " const char *device);\n"
31431 #: ../src/guestfs-actions.pod:6303
31432 msgid "guestfs_pvresize_size"
31436 #: ../src/guestfs-actions.pod:6305
31440 " guestfs_pvresize_size (guestfs_h *g,\n"
31441 " const char *device,\n"
31442 " int64_t size);\n"
31447 #: ../src/guestfs-actions.pod:6310
31449 "This command is the same as C<guestfs_pvresize> except that it allows you to "
31450 "specify the new size (in bytes) explicitly."
31454 #: ../src/guestfs-actions.pod:6317
31455 msgid "guestfs_pvs"
31459 #: ../src/guestfs-actions.pod:6319
31463 " guestfs_pvs (guestfs_h *g);\n"
31468 #: ../src/guestfs-actions.pod:6328
31469 msgid "See also C<guestfs_pvs_full>."
31473 #: ../src/guestfs-actions.pod:6336
31474 msgid "guestfs_pvs_full"
31478 #: ../src/guestfs-actions.pod:6338
31481 " struct guestfs_lvm_pv_list *\n"
31482 " guestfs_pvs_full (guestfs_h *g);\n"
31487 #: ../src/guestfs-actions.pod:6344
31489 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
31490 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after "
31495 #: ../src/guestfs-actions.pod:6350
31496 msgid "guestfs_pvuuid"
31500 #: ../src/guestfs-actions.pod:6352
31504 " guestfs_pvuuid (guestfs_h *g,\n"
31505 " const char *device);\n"
31510 #: ../src/guestfs-actions.pod:6363
31511 msgid "guestfs_pwrite"
31515 #: ../src/guestfs-actions.pod:6365
31519 " guestfs_pwrite (guestfs_h *g,\n"
31520 " const char *path,\n"
31521 " const char *content,\n"
31522 " size_t content_size,\n"
31523 " int64_t offset);\n"
31528 #: ../src/guestfs-actions.pod:6381
31529 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
31533 #: ../src/guestfs-actions.pod:6390
31534 msgid "guestfs_pwrite_device"
31538 #: ../src/guestfs-actions.pod:6392
31542 " guestfs_pwrite_device (guestfs_h *g,\n"
31543 " const char *device,\n"
31544 " const char *content,\n"
31545 " size_t content_size,\n"
31546 " int64_t offset);\n"
31551 #: ../src/guestfs-actions.pod:6407
31552 msgid "See also C<guestfs_pwrite>."
31556 #: ../src/guestfs-actions.pod:6414
31557 msgid "(Added in 1.5.20)"
31561 #: ../src/guestfs-actions.pod:6416
31562 msgid "guestfs_read_file"
31566 #: ../src/guestfs-actions.pod:6418
31570 " guestfs_read_file (guestfs_h *g,\n"
31571 " const char *path,\n"
31572 " size_t *size_r);\n"
31577 #: ../src/guestfs-actions.pod:6426
31579 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
31580 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
31581 "function is limited in the total size of file that can be handled."
31585 #: ../src/guestfs-actions.pod:6438
31586 msgid "(Added in 1.0.63)"
31590 #: ../src/guestfs-actions.pod:6440
31591 msgid "guestfs_read_lines"
31595 #: ../src/guestfs-actions.pod:6442
31599 " guestfs_read_lines (guestfs_h *g,\n"
31600 " const char *path);\n"
31605 #: ../src/guestfs-actions.pod:6451
31607 "Note that this function cannot correctly handle binary files (specifically, "
31608 "files containing C<\\0> character which is treated as end of line). For "
31609 "those you need to use the C<guestfs_read_file> function which has a more "
31610 "complex interface."
31614 #: ../src/guestfs-actions.pod:6462
31615 msgid "guestfs_readdir"
31619 #: ../src/guestfs-actions.pod:6464
31622 " struct guestfs_dirent_list *\n"
31623 " guestfs_readdir (guestfs_h *g,\n"
31624 " const char *dir);\n"
31629 #: ../src/guestfs-actions.pod:6518
31631 "This function is primarily intended for use by programs. To get a simple "
31632 "list of names, use C<guestfs_ls>. To get a printable directory for human "
31633 "consumption, use C<guestfs_ll>."
31637 #: ../src/guestfs-actions.pod:6522
31639 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
31640 "was an error. I<The caller must call C<guestfs_free_dirent_list> after "
31645 #: ../src/guestfs-actions.pod:6528
31646 msgid "guestfs_readlink"
31650 #: ../src/guestfs-actions.pod:6530
31654 " guestfs_readlink (guestfs_h *g,\n"
31655 " const char *path);\n"
31660 #: ../src/guestfs-actions.pod:6541
31661 msgid "guestfs_readlinklist"
31665 #: ../src/guestfs-actions.pod:6543
31669 " guestfs_readlinklist (guestfs_h *g,\n"
31670 " const char *path,\n"
31671 " char *const *names);\n"
31676 #: ../src/guestfs-actions.pod:6576
31677 msgid "guestfs_realpath"
31681 #: ../src/guestfs-actions.pod:6578
31685 " guestfs_realpath (guestfs_h *g,\n"
31686 " const char *path);\n"
31691 #: ../src/guestfs-actions.pod:6590
31692 msgid "guestfs_removexattr"
31696 #: ../src/guestfs-actions.pod:6592
31700 " guestfs_removexattr (guestfs_h *g,\n"
31701 " const char *xattr,\n"
31702 " const char *path);\n"
31707 #: ../src/guestfs-actions.pod:6600
31708 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
31712 #: ../src/guestfs-actions.pod:6606
31713 msgid "guestfs_resize2fs"
31717 #: ../src/guestfs-actions.pod:6608
31721 " guestfs_resize2fs (guestfs_h *g,\n"
31722 " const char *device);\n"
31727 #: ../src/guestfs-actions.pod:6615
31729 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
31730 "C<device> before calling this command. For unknown reasons C<resize2fs> "
31731 "sometimes gives an error about this and sometimes not. In any case, it is "
31732 "always safe to call C<guestfs_e2fsck_f> before calling this function."
31736 #: ../src/guestfs-actions.pod:6625
31737 msgid "guestfs_resize2fs_M"
31741 #: ../src/guestfs-actions.pod:6627
31745 " guestfs_resize2fs_M (guestfs_h *g,\n"
31746 " const char *device);\n"
31751 #: ../src/guestfs-actions.pod:6631
31753 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
31754 "resized to its minimum size. This works like the I<-M> option to the "
31755 "C<resize2fs> command."
31759 #: ../src/guestfs-actions.pod:6635
31761 "To get the resulting size of the filesystem you should call "
31762 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
31763 "These two numbers, multiplied together, give the resulting size of the "
31764 "minimal filesystem in bytes."
31768 #: ../src/guestfs-actions.pod:6644
31769 msgid "guestfs_resize2fs_size"
31773 #: ../src/guestfs-actions.pod:6646
31777 " guestfs_resize2fs_size (guestfs_h *g,\n"
31778 " const char *device,\n"
31779 " int64_t size);\n"
31784 #: ../src/guestfs-actions.pod:6651
31786 "This command is the same as C<guestfs_resize2fs> except that it allows you "
31787 "to specify the new size (in bytes) explicitly."
31791 #: ../src/guestfs-actions.pod:6658
31796 #: ../src/guestfs-actions.pod:6660
31800 " guestfs_rm (guestfs_h *g,\n"
31801 " const char *path);\n"
31806 #: ../src/guestfs-actions.pod:6670
31807 msgid "guestfs_rm_rf"
31811 #: ../src/guestfs-actions.pod:6672
31815 " guestfs_rm_rf (guestfs_h *g,\n"
31816 " const char *path);\n"
31821 #: ../src/guestfs-actions.pod:6684
31822 msgid "guestfs_rmdir"
31826 #: ../src/guestfs-actions.pod:6686
31830 " guestfs_rmdir (guestfs_h *g,\n"
31831 " const char *path);\n"
31836 #: ../src/guestfs-actions.pod:6696
31837 msgid "guestfs_rmmountpoint"
31841 #: ../src/guestfs-actions.pod:6698
31845 " guestfs_rmmountpoint (guestfs_h *g,\n"
31846 " const char *exemptpath);\n"
31851 #: ../src/guestfs-actions.pod:6702
31853 "This calls removes a mountpoint that was previously created with "
31854 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
31858 #: ../src/guestfs-actions.pod:6710
31859 msgid "guestfs_scrub_device"
31863 #: ../src/guestfs-actions.pod:6712
31867 " guestfs_scrub_device (guestfs_h *g,\n"
31868 " const char *device);\n"
31873 #: ../src/guestfs-actions.pod:6724 ../src/guestfs-actions.pod:6742 ../src/guestfs-actions.pod:6761
31874 msgid "(Added in 1.0.52)"
31878 #: ../src/guestfs-actions.pod:6726
31879 msgid "guestfs_scrub_file"
31883 #: ../src/guestfs-actions.pod:6728
31887 " guestfs_scrub_file (guestfs_h *g,\n"
31888 " const char *file);\n"
31893 #: ../src/guestfs-actions.pod:6744
31894 msgid "guestfs_scrub_freespace"
31898 #: ../src/guestfs-actions.pod:6746
31902 " guestfs_scrub_freespace (guestfs_h *g,\n"
31903 " const char *dir);\n"
31908 #: ../src/guestfs-actions.pod:6750
31910 "This command creates the directory C<dir> and then fills it with files until "
31911 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
31912 "and deletes them. The intention is to scrub any free space on the partition "
31913 "containing C<dir>."
31917 #: ../src/guestfs-actions.pod:6763
31918 msgid "guestfs_set_append"
31922 #: ../src/guestfs-actions.pod:6765
31926 " guestfs_set_append (guestfs_h *g,\n"
31927 " const char *append);\n"
31932 #: ../src/guestfs-actions.pod:6782
31933 msgid "guestfs_set_attach_method"
31937 #: ../src/guestfs-actions.pod:6784
31941 " guestfs_set_attach_method (guestfs_h *g,\n"
31942 " const char *attachmethod);\n"
31947 #: ../src/guestfs-actions.pod:6812
31948 msgid "guestfs_set_autosync"
31952 #: ../src/guestfs-actions.pod:6814
31956 " guestfs_set_autosync (guestfs_h *g,\n"
31957 " int autosync);\n"
31962 #: ../src/guestfs-actions.pod:6830
31963 msgid "guestfs_set_direct"
31967 #: ../src/guestfs-actions.pod:6832
31971 " guestfs_set_direct (guestfs_h *g,\n"
31977 #: ../src/guestfs-actions.pod:6840
31979 "One consequence of this is that log messages aren't caught by the library "
31980 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
31985 #: ../src/guestfs-actions.pod:6853
31986 msgid "guestfs_set_e2label"
31990 #: ../src/guestfs-actions.pod:6855
31994 " guestfs_set_e2label (guestfs_h *g,\n"
31995 " const char *device,\n"
31996 " const char *label);\n"
32001 #: ../src/guestfs-actions.pod:6864
32003 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
32004 "the existing label on a filesystem."
32008 #: ../src/guestfs-actions.pod:6871
32009 msgid "guestfs_set_e2uuid"
32013 #: ../src/guestfs-actions.pod:6873
32017 " guestfs_set_e2uuid (guestfs_h *g,\n"
32018 " const char *device,\n"
32019 " const char *uuid);\n"
32024 #: ../src/guestfs-actions.pod:6883
32026 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
32027 "the existing UUID of a filesystem."
32031 #: ../src/guestfs-actions.pod:6890
32032 msgid "guestfs_set_memsize"
32036 #: ../src/guestfs-actions.pod:6892
32040 " guestfs_set_memsize (guestfs_h *g,\n"
32046 #: ../src/guestfs-actions.pod:6896
32048 "This sets the memory size in megabytes allocated to the qemu subprocess. "
32049 "This only has any effect if called before C<guestfs_launch>."
32053 #: ../src/guestfs-actions.pod:6911
32054 msgid "guestfs_set_network"
32058 #: ../src/guestfs-actions.pod:6913
32062 " guestfs_set_network (guestfs_h *g,\n"
32068 #: ../src/guestfs-actions.pod:6923
32070 "You must call this before calling C<guestfs_launch>, otherwise it has no "
32075 #: ../src/guestfs-actions.pod:6930
32076 msgid "guestfs_set_path"
32080 #: ../src/guestfs-actions.pod:6932
32084 " guestfs_set_path (guestfs_h *g,\n"
32085 " const char *searchpath);\n"
32090 #: ../src/guestfs-actions.pod:6947
32091 msgid "guestfs_set_pgroup"
32095 #: ../src/guestfs-actions.pod:6949
32099 " guestfs_set_pgroup (guestfs_h *g,\n"
32105 #: ../src/guestfs-actions.pod:6966
32106 msgid "guestfs_set_qemu"
32110 #: ../src/guestfs-actions.pod:6968
32114 " guestfs_set_qemu (guestfs_h *g,\n"
32115 " const char *qemu);\n"
32120 #: ../src/guestfs-actions.pod:6994
32121 msgid "guestfs_set_recovery_proc"
32125 #: ../src/guestfs-actions.pod:6996
32129 " guestfs_set_recovery_proc (guestfs_h *g,\n"
32130 " int recoveryproc);\n"
32135 #: ../src/guestfs-actions.pod:7000
32137 "If this is called with the parameter C<false> then C<guestfs_launch> does "
32138 "not create a recovery process. The purpose of the recovery process is to "
32139 "stop runaway qemu processes in the case where the main program aborts "
32144 #: ../src/guestfs-actions.pod:7005
32146 "This only has any effect if called before C<guestfs_launch>, and the default "
32151 #: ../src/guestfs-actions.pod:7018
32152 msgid "guestfs_set_selinux"
32156 #: ../src/guestfs-actions.pod:7020
32160 " guestfs_set_selinux (guestfs_h *g,\n"
32166 #: ../src/guestfs-actions.pod:7037
32167 msgid "guestfs_set_smp"
32171 #: ../src/guestfs-actions.pod:7039
32175 " guestfs_set_smp (guestfs_h *g,\n"
32181 #: ../src/guestfs-actions.pod:7047
32182 msgid "This function must be called before C<guestfs_launch>."
32186 #: ../src/guestfs-actions.pod:7053
32187 msgid "guestfs_set_trace"
32191 #: ../src/guestfs-actions.pod:7055
32195 " guestfs_set_trace (guestfs_h *g,\n"
32201 #: ../src/guestfs-actions.pod:7069
32203 "Trace messages are normally sent to C<stderr>, unless you register a "
32204 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
32208 #: ../src/guestfs-actions.pod:7077
32209 msgid "guestfs_set_verbose"
32213 #: ../src/guestfs-actions.pod:7079
32217 " guestfs_set_verbose (guestfs_h *g,\n"
32223 #: ../src/guestfs-actions.pod:7088
32225 "Verbose messages are normally sent to C<stderr>, unless you register a "
32226 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
32230 #: ../src/guestfs-actions.pod:7096
32231 msgid "guestfs_setcon"
32235 #: ../src/guestfs-actions.pod:7098
32239 " guestfs_setcon (guestfs_h *g,\n"
32240 " const char *context);\n"
32245 #: ../src/guestfs-actions.pod:7111
32246 msgid "guestfs_setxattr"
32250 #: ../src/guestfs-actions.pod:7113
32254 " guestfs_setxattr (guestfs_h *g,\n"
32255 " const char *xattr,\n"
32256 " const char *val,\n"
32258 " const char *path);\n"
32263 #: ../src/guestfs-actions.pod:7124
32264 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
32268 #: ../src/guestfs-actions.pod:7130
32269 msgid "guestfs_sfdisk"
32273 #: ../src/guestfs-actions.pod:7132
32277 " guestfs_sfdisk (guestfs_h *g,\n"
32278 " const char *device,\n"
32282 " char *const *lines);\n"
32287 #: ../src/guestfs-actions.pod:7140 ../src/guestfs-actions.pod:7181 ../src/guestfs-actions.pod:7212
32289 "I<This function is deprecated.> In new code, use the L</guestfs_part_add> "
32294 #: ../src/guestfs-actions.pod:7167
32295 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
32299 #: ../src/guestfs-actions.pod:7174
32300 msgid "guestfs_sfdiskM"
32304 #: ../src/guestfs-actions.pod:7176
32308 " guestfs_sfdiskM (guestfs_h *g,\n"
32309 " const char *device,\n"
32310 " char *const *lines);\n"
32315 #: ../src/guestfs-actions.pod:7188
32317 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
32318 "partition sizes are specified in megabytes only (rounded to the nearest "
32319 "cylinder) and you don't need to specify the cyls, heads and sectors "
32320 "parameters which were rarely if ever used anyway."
32324 #: ../src/guestfs-actions.pod:7194
32326 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
32327 "C<guestfs_part_disk>"
32331 #: ../src/guestfs-actions.pod:7201
32332 msgid "guestfs_sfdisk_N"
32336 #: ../src/guestfs-actions.pod:7203
32340 " guestfs_sfdisk_N (guestfs_h *g,\n"
32341 " const char *device,\n"
32346 " const char *line);\n"
32351 #: ../src/guestfs-actions.pod:7222
32353 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
32354 "for the cyls/heads/sectors parameters."
32358 #: ../src/guestfs-actions.pod:7225
32359 msgid "See also: C<guestfs_part_add>"
32363 #: ../src/guestfs-actions.pod:7231
32364 msgid "guestfs_sfdisk_disk_geometry"
32368 #: ../src/guestfs-actions.pod:7233
32372 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
32373 " const char *device);\n"
32378 #: ../src/guestfs-actions.pod:7237
32380 "This displays the disk geometry of C<device> read from the partition table. "
32381 "Especially in the case where the underlying block device has been resized, "
32382 "this can be different from the kernel's idea of the geometry (see "
32383 "C<guestfs_sfdisk_kernel_geometry>)."
32387 #: ../src/guestfs-actions.pod:7250
32388 msgid "guestfs_sfdisk_kernel_geometry"
32392 #: ../src/guestfs-actions.pod:7252
32396 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
32397 " const char *device);\n"
32402 #: ../src/guestfs-actions.pod:7266
32403 msgid "guestfs_sfdisk_l"
32407 #: ../src/guestfs-actions.pod:7268
32411 " guestfs_sfdisk_l (guestfs_h *g,\n"
32412 " const char *device);\n"
32417 #: ../src/guestfs-actions.pod:7272
32419 "I<This function is deprecated.> In new code, use the L</guestfs_part_list> "
32424 #: ../src/guestfs-actions.pod:7283
32425 msgid "See also: C<guestfs_part_list>"
32429 #: ../src/guestfs-actions.pod:7290
32434 #: ../src/guestfs-actions.pod:7292
32438 " guestfs_sh (guestfs_h *g,\n"
32439 " const char *command);\n"
32444 #: ../src/guestfs-actions.pod:7299
32445 msgid "This is like C<guestfs_command>, but passes the command to:"
32449 #: ../src/guestfs-actions.pod:7307
32450 msgid "All the provisos about C<guestfs_command> apply to this call."
32454 #: ../src/guestfs-actions.pod:7314
32455 msgid "guestfs_sh_lines"
32459 #: ../src/guestfs-actions.pod:7316
32463 " guestfs_sh_lines (guestfs_h *g,\n"
32464 " const char *command);\n"
32469 #: ../src/guestfs-actions.pod:7320
32471 "This is the same as C<guestfs_sh>, but splits the result into a list of "
32476 #: ../src/guestfs-actions.pod:7323
32477 msgid "See also: C<guestfs_command_lines>"
32481 #: ../src/guestfs-actions.pod:7331
32482 msgid "guestfs_sleep"
32486 #: ../src/guestfs-actions.pod:7333
32490 " guestfs_sleep (guestfs_h *g,\n"
32496 #: ../src/guestfs-actions.pod:7341
32497 msgid "(Added in 1.0.41)"
32501 #: ../src/guestfs-actions.pod:7343 ../src/guestfs-structs.pod:109
32502 msgid "guestfs_stat"
32506 #: ../src/guestfs-actions.pod:7345
32509 " struct guestfs_stat *\n"
32510 " guestfs_stat (guestfs_h *g,\n"
32511 " const char *path);\n"
32516 #: ../src/guestfs-actions.pod:7359 ../src/guestfs-structs.pod:135
32517 msgid "guestfs_statvfs"
32521 #: ../src/guestfs-actions.pod:7361
32524 " struct guestfs_statvfs *\n"
32525 " guestfs_statvfs (guestfs_h *g,\n"
32526 " const char *path);\n"
32531 #: ../src/guestfs-actions.pod:7371
32533 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
32534 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
32538 #: ../src/guestfs-actions.pod:7377
32539 msgid "guestfs_strings"
32543 #: ../src/guestfs-actions.pod:7379
32547 " guestfs_strings (guestfs_h *g,\n"
32548 " const char *path);\n"
32553 #: ../src/guestfs-actions.pod:7395
32554 msgid "guestfs_strings_e"
32558 #: ../src/guestfs-actions.pod:7397
32562 " guestfs_strings_e (guestfs_h *g,\n"
32563 " const char *encoding,\n"
32564 " const char *path);\n"
32569 #: ../src/guestfs-actions.pod:7402
32571 "This is like the C<guestfs_strings> command, but allows you to specify the "
32572 "encoding of strings that are looked for in the source file C<path>."
32576 #: ../src/guestfs-actions.pod:7412
32578 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
32579 "ISO-8859-X (this is what C<guestfs_strings> uses)."
32583 #: ../src/guestfs-actions.pod:7450
32584 msgid "guestfs_swapoff_device"
32588 #: ../src/guestfs-actions.pod:7452
32592 " guestfs_swapoff_device (guestfs_h *g,\n"
32593 " const char *device);\n"
32598 #: ../src/guestfs-actions.pod:7456
32600 "This command disables the libguestfs appliance swap device or partition "
32601 "named C<device>. See C<guestfs_swapon_device>."
32605 #: ../src/guestfs-actions.pod:7464
32606 msgid "guestfs_swapoff_file"
32610 #: ../src/guestfs-actions.pod:7466
32614 " guestfs_swapoff_file (guestfs_h *g,\n"
32615 " const char *file);\n"
32620 #: ../src/guestfs-actions.pod:7476
32621 msgid "guestfs_swapoff_label"
32625 #: ../src/guestfs-actions.pod:7478
32629 " guestfs_swapoff_label (guestfs_h *g,\n"
32630 " const char *label);\n"
32635 #: ../src/guestfs-actions.pod:7489
32636 msgid "guestfs_swapoff_uuid"
32640 #: ../src/guestfs-actions.pod:7491
32644 " guestfs_swapoff_uuid (guestfs_h *g,\n"
32645 " const char *uuid);\n"
32650 #: ../src/guestfs-actions.pod:7502
32651 msgid "guestfs_swapon_device"
32655 #: ../src/guestfs-actions.pod:7504
32659 " guestfs_swapon_device (guestfs_h *g,\n"
32660 " const char *device);\n"
32665 #: ../src/guestfs-actions.pod:7508
32667 "This command enables the libguestfs appliance to use the swap device or "
32668 "partition named C<device>. The increased memory is made available for all "
32669 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
32673 #: ../src/guestfs-actions.pod:7524
32674 msgid "guestfs_swapon_file"
32678 #: ../src/guestfs-actions.pod:7526
32682 " guestfs_swapon_file (guestfs_h *g,\n"
32683 " const char *file);\n"
32688 #: ../src/guestfs-actions.pod:7530
32690 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
32695 #: ../src/guestfs-actions.pod:7537
32696 msgid "guestfs_swapon_label"
32700 #: ../src/guestfs-actions.pod:7539
32704 " guestfs_swapon_label (guestfs_h *g,\n"
32705 " const char *label);\n"
32710 #: ../src/guestfs-actions.pod:7543
32712 "This command enables swap to a labeled swap partition. See "
32713 "C<guestfs_swapon_device> for other notes."
32717 #: ../src/guestfs-actions.pod:7550
32718 msgid "guestfs_swapon_uuid"
32722 #: ../src/guestfs-actions.pod:7552
32726 " guestfs_swapon_uuid (guestfs_h *g,\n"
32727 " const char *uuid);\n"
32732 #: ../src/guestfs-actions.pod:7556
32734 "This command enables swap to a swap partition with the given UUID. See "
32735 "C<guestfs_swapon_device> for other notes."
32739 #: ../src/guestfs-actions.pod:7563
32740 msgid "guestfs_sync"
32744 #: ../src/guestfs-actions.pod:7565
32748 " guestfs_sync (guestfs_h *g);\n"
32753 #: ../src/guestfs-actions.pod:7578
32754 msgid "guestfs_tail"
32758 #: ../src/guestfs-actions.pod:7580
32762 " guestfs_tail (guestfs_h *g,\n"
32763 " const char *path);\n"
32768 #: ../src/guestfs-actions.pod:7596
32769 msgid "guestfs_tail_n"
32773 #: ../src/guestfs-actions.pod:7598
32777 " guestfs_tail_n (guestfs_h *g,\n"
32779 " const char *path);\n"
32784 #: ../src/guestfs-actions.pod:7620
32785 msgid "guestfs_tar_in"
32789 #: ../src/guestfs-actions.pod:7622
32793 " guestfs_tar_in (guestfs_h *g,\n"
32794 " const char *tarfile,\n"
32795 " const char *directory);\n"
32800 #: ../src/guestfs-actions.pod:7630
32801 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
32805 #: ../src/guestfs-actions.pod:7635 ../src/guestfs-actions.pod:7652 ../src/guestfs-actions.pod:7668 ../src/guestfs-actions.pod:7684
32806 msgid "(Added in 1.0.3)"
32810 #: ../src/guestfs-actions.pod:7637
32811 msgid "guestfs_tar_out"
32815 #: ../src/guestfs-actions.pod:7639
32819 " guestfs_tar_out (guestfs_h *g,\n"
32820 " const char *directory,\n"
32821 " const char *tarfile);\n"
32826 #: ../src/guestfs-actions.pod:7647
32828 "To download a compressed tarball, use C<guestfs_tgz_out> or "
32829 "C<guestfs_txz_out>."
32833 #: ../src/guestfs-actions.pod:7654
32834 msgid "guestfs_tgz_in"
32838 #: ../src/guestfs-actions.pod:7656
32842 " guestfs_tgz_in (guestfs_h *g,\n"
32843 " const char *tarball,\n"
32844 " const char *directory);\n"
32849 #: ../src/guestfs-actions.pod:7664
32850 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
32854 #: ../src/guestfs-actions.pod:7670
32855 msgid "guestfs_tgz_out"
32859 #: ../src/guestfs-actions.pod:7672
32863 " guestfs_tgz_out (guestfs_h *g,\n"
32864 " const char *directory,\n"
32865 " const char *tarball);\n"
32870 #: ../src/guestfs-actions.pod:7680
32871 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
32875 #: ../src/guestfs-actions.pod:7686
32876 msgid "guestfs_touch"
32880 #: ../src/guestfs-actions.pod:7688
32884 " guestfs_touch (guestfs_h *g,\n"
32885 " const char *path);\n"
32890 #: ../src/guestfs-actions.pod:7703
32891 msgid "guestfs_truncate"
32895 #: ../src/guestfs-actions.pod:7705
32899 " guestfs_truncate (guestfs_h *g,\n"
32900 " const char *path);\n"
32905 #: ../src/guestfs-actions.pod:7716
32906 msgid "guestfs_truncate_size"
32910 #: ../src/guestfs-actions.pod:7718
32914 " guestfs_truncate_size (guestfs_h *g,\n"
32915 " const char *path,\n"
32916 " int64_t size);\n"
32921 #: ../src/guestfs-actions.pod:7726
32923 "If the current file size is less than C<size> then the file is extended to "
32924 "the required size with zero bytes. This creates a sparse file (ie. disk "
32925 "blocks are not allocated for the file until you write to it). To create a "
32926 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
32930 #: ../src/guestfs-actions.pod:7736
32931 msgid "guestfs_tune2fs"
32935 #: ../src/guestfs-actions.pod:7738
32939 " guestfs_tune2fs (guestfs_h *g,\n"
32940 " const char *device,\n"
32946 #: ../src/guestfs-actions.pod:7748
32949 " GUESTFS_TUNE2FS_FORCE, int force,\n"
32950 " GUESTFS_TUNE2FS_MAXMOUNTCOUNT, int maxmountcount,\n"
32951 " GUESTFS_TUNE2FS_MOUNTCOUNT, int mountcount,\n"
32952 " GUESTFS_TUNE2FS_ERRORBEHAVIOR, const char *errorbehavior,\n"
32953 " GUESTFS_TUNE2FS_GROUP, int64_t group,\n"
32954 " GUESTFS_TUNE2FS_INTERVALBETWEENCHECKS, int intervalbetweenchecks,\n"
32955 " GUESTFS_TUNE2FS_RESERVEDBLOCKSPERCENTAGE, int reservedblockspercentage,\n"
32956 " GUESTFS_TUNE2FS_LASTMOUNTEDDIRECTORY, const char *lastmounteddirectory,\n"
32957 " GUESTFS_TUNE2FS_RESERVEDBLOCKSCOUNT, int64_t reservedblockscount,\n"
32958 " GUESTFS_TUNE2FS_USER, int64_t user,\n"
32963 #: ../src/guestfs-actions.pod:7828
32965 "To get the current values of filesystem parameters, see "
32966 "C<guestfs_tune2fs_l>. For precise details of how tune2fs works, see the "
32967 "L<tune2fs(8)> man page."
32971 #: ../src/guestfs-actions.pod:7834
32972 msgid "guestfs_tune2fs_va"
32976 #: ../src/guestfs-actions.pod:7836
32980 " guestfs_tune2fs_va (guestfs_h *g,\n"
32981 " const char *device,\n"
32982 " va_list args);\n"
32987 #: ../src/guestfs-actions.pod:7841
32988 msgid "This is the \"va_list variant\" of L</guestfs_tune2fs>."
32992 #: ../src/guestfs-actions.pod:7845
32993 msgid "guestfs_tune2fs_argv"
32997 #: ../src/guestfs-actions.pod:7847
33001 " guestfs_tune2fs_argv (guestfs_h *g,\n"
33002 " const char *device,\n"
33003 " const struct guestfs_tune2fs_argv *optargs);\n"
33008 #: ../src/guestfs-actions.pod:7852
33009 msgid "This is the \"argv variant\" of L</guestfs_tune2fs>."
33013 #: ../src/guestfs-actions.pod:7856
33014 msgid "guestfs_tune2fs_l"
33018 #: ../src/guestfs-actions.pod:7858
33022 " guestfs_tune2fs_l (guestfs_h *g,\n"
33023 " const char *device);\n"
33028 #: ../src/guestfs-actions.pod:7878
33029 msgid "guestfs_txz_in"
33033 #: ../src/guestfs-actions.pod:7880
33037 " guestfs_txz_in (guestfs_h *g,\n"
33038 " const char *tarball,\n"
33039 " const char *directory);\n"
33044 #: ../src/guestfs-actions.pod:7892
33045 msgid "guestfs_txz_out"
33049 #: ../src/guestfs-actions.pod:7894
33053 " guestfs_txz_out (guestfs_h *g,\n"
33054 " const char *directory,\n"
33055 " const char *tarball);\n"
33060 #: ../src/guestfs-actions.pod:7906
33061 msgid "guestfs_umask"
33065 #: ../src/guestfs-actions.pod:7908
33069 " guestfs_umask (guestfs_h *g,\n"
33075 #: ../src/guestfs-actions.pod:7924
33077 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
33078 "C<guestfs_mkdir>."
33082 #: ../src/guestfs-actions.pod:7933
33083 msgid "guestfs_umount"
33087 #: ../src/guestfs-actions.pod:7935
33091 " guestfs_umount (guestfs_h *g,\n"
33092 " const char *pathordevice);\n"
33097 #: ../src/guestfs-actions.pod:7947
33098 msgid "guestfs_umount_all"
33102 #: ../src/guestfs-actions.pod:7949
33106 " guestfs_umount_all (guestfs_h *g);\n"
33111 #: ../src/guestfs-actions.pod:7960
33112 msgid "guestfs_upload"
33116 #: ../src/guestfs-actions.pod:7962
33120 " guestfs_upload (guestfs_h *g,\n"
33121 " const char *filename,\n"
33122 " const char *remotefilename);\n"
33127 #: ../src/guestfs-actions.pod:7972
33128 msgid "See also C<guestfs_download>."
33132 #: ../src/guestfs-actions.pod:7983
33133 msgid "guestfs_upload_offset"
33137 #: ../src/guestfs-actions.pod:7985
33141 " guestfs_upload_offset (guestfs_h *g,\n"
33142 " const char *filename,\n"
33143 " const char *remotefilename,\n"
33144 " int64_t offset);\n"
33149 #: ../src/guestfs-actions.pod:8001
33151 "Note that there is no limit on the amount of data that can be uploaded with "
33152 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
33153 "full amount unless an error occurs."
33157 #: ../src/guestfs-actions.pod:8006
33158 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
33162 #: ../src/guestfs-actions.pod:8017
33163 msgid "guestfs_utimens"
33167 #: ../src/guestfs-actions.pod:8019
33171 " guestfs_utimens (guestfs_h *g,\n"
33172 " const char *path,\n"
33173 " int64_t atsecs,\n"
33174 " int64_t atnsecs,\n"
33175 " int64_t mtsecs,\n"
33176 " int64_t mtnsecs);\n"
33181 #: ../src/guestfs-actions.pod:8048 ../src/guestfs-structs.pod:175
33182 msgid "guestfs_version"
33186 #: ../src/guestfs-actions.pod:8050
33189 " struct guestfs_version *\n"
33190 " guestfs_version (guestfs_h *g);\n"
33195 #: ../src/guestfs-actions.pod:8078
33197 "I<Note:> Don't use this call to test for availability of features. In "
33198 "enterprise distributions we backport features from later versions into "
33199 "earlier versions, making this an unreliable way to test for features. Use "
33200 "C<guestfs_available> instead."
33204 #: ../src/guestfs-actions.pod:8084
33206 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
33207 "error. I<The caller must call C<guestfs_free_version> after use>."
33211 #: ../src/guestfs-actions.pod:8088
33212 msgid "(Added in 1.0.58)"
33216 #: ../src/guestfs-actions.pod:8090
33217 msgid "guestfs_vfs_label"
33221 #: ../src/guestfs-actions.pod:8092
33225 " guestfs_vfs_label (guestfs_h *g,\n"
33226 " const char *device);\n"
33231 #: ../src/guestfs-actions.pod:8101
33232 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
33236 #: ../src/guestfs-actions.pod:8106 ../src/guestfs-actions.pod:8143
33237 msgid "(Added in 1.3.18)"
33241 #: ../src/guestfs-actions.pod:8108
33242 msgid "guestfs_vfs_type"
33246 #: ../src/guestfs-actions.pod:8110
33250 " guestfs_vfs_type (guestfs_h *g,\n"
33251 " const char *device);\n"
33256 #: ../src/guestfs-actions.pod:8127
33257 msgid "guestfs_vfs_uuid"
33261 #: ../src/guestfs-actions.pod:8129
33265 " guestfs_vfs_uuid (guestfs_h *g,\n"
33266 " const char *device);\n"
33271 #: ../src/guestfs-actions.pod:8138
33272 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
33276 #: ../src/guestfs-actions.pod:8145
33277 msgid "guestfs_vg_activate"
33281 #: ../src/guestfs-actions.pod:8147
33285 " guestfs_vg_activate (guestfs_h *g,\n"
33287 " char *const *volgroups);\n"
33292 #: ../src/guestfs-actions.pod:8164
33293 msgid "guestfs_vg_activate_all"
33297 #: ../src/guestfs-actions.pod:8166
33301 " guestfs_vg_activate_all (guestfs_h *g,\n"
33302 " int activate);\n"
33307 #: ../src/guestfs-actions.pod:8179
33308 msgid "guestfs_vgcreate"
33312 #: ../src/guestfs-actions.pod:8181
33316 " guestfs_vgcreate (guestfs_h *g,\n"
33317 " const char *volgroup,\n"
33318 " char *const *physvols);\n"
33323 #: ../src/guestfs-actions.pod:8193
33324 msgid "guestfs_vglvuuids"
33328 #: ../src/guestfs-actions.pod:8195
33332 " guestfs_vglvuuids (guestfs_h *g,\n"
33333 " const char *vgname);\n"
33338 #: ../src/guestfs-actions.pod:8202
33340 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
33341 "associate logical volumes and volume groups."
33345 #: ../src/guestfs-actions.pod:8205
33346 msgid "See also C<guestfs_vgpvuuids>."
33350 #: ../src/guestfs-actions.pod:8213
33351 msgid "guestfs_vgpvuuids"
33355 #: ../src/guestfs-actions.pod:8215
33359 " guestfs_vgpvuuids (guestfs_h *g,\n"
33360 " const char *vgname);\n"
33365 #: ../src/guestfs-actions.pod:8222
33367 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
33368 "associate physical volumes and volume groups."
33372 #: ../src/guestfs-actions.pod:8225
33373 msgid "See also C<guestfs_vglvuuids>."
33377 #: ../src/guestfs-actions.pod:8233
33378 msgid "guestfs_vgremove"
33382 #: ../src/guestfs-actions.pod:8235
33386 " guestfs_vgremove (guestfs_h *g,\n"
33387 " const char *vgname);\n"
33392 #: ../src/guestfs-actions.pod:8248
33393 msgid "guestfs_vgrename"
33397 #: ../src/guestfs-actions.pod:8250
33401 " guestfs_vgrename (guestfs_h *g,\n"
33402 " const char *volgroup,\n"
33403 " const char *newvolgroup);\n"
33408 #: ../src/guestfs-actions.pod:8261
33409 msgid "guestfs_vgs"
33413 #: ../src/guestfs-actions.pod:8263
33417 " guestfs_vgs (guestfs_h *g);\n"
33422 #: ../src/guestfs-actions.pod:8272
33423 msgid "See also C<guestfs_vgs_full>."
33427 #: ../src/guestfs-actions.pod:8280
33428 msgid "guestfs_vgs_full"
33432 #: ../src/guestfs-actions.pod:8282
33435 " struct guestfs_lvm_vg_list *\n"
33436 " guestfs_vgs_full (guestfs_h *g);\n"
33441 #: ../src/guestfs-actions.pod:8288
33443 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
33444 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after "
33449 #: ../src/guestfs-actions.pod:8294
33450 msgid "guestfs_vgscan"
33454 #: ../src/guestfs-actions.pod:8296
33458 " guestfs_vgscan (guestfs_h *g);\n"
33463 #: ../src/guestfs-actions.pod:8306
33464 msgid "guestfs_vguuid"
33468 #: ../src/guestfs-actions.pod:8308
33472 " guestfs_vguuid (guestfs_h *g,\n"
33473 " const char *vgname);\n"
33478 #: ../src/guestfs-actions.pod:8319
33479 msgid "guestfs_wait_ready"
33483 #: ../src/guestfs-actions.pod:8321
33487 " guestfs_wait_ready (guestfs_h *g);\n"
33492 #: ../src/guestfs-actions.pod:8324
33494 "I<This function is deprecated.> In new code, use the L</guestfs_launch> call "
33499 #: ../src/guestfs-actions.pod:8331
33500 msgid "This function is a no op."
33504 #: ../src/guestfs-actions.pod:8333
33506 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
33507 "calling C<guestfs_launch> to wait for the launch to complete. However this "
33508 "is no longer necessary because C<guestfs_launch> now does the waiting."
33512 #: ../src/guestfs-actions.pod:8338
33514 "If you see any calls to this function in code then you can just remove them, "
33515 "unless you want to retain compatibility with older versions of the API."
33519 #: ../src/guestfs-actions.pod:8346
33520 msgid "guestfs_wc_c"
33524 #: ../src/guestfs-actions.pod:8348
33528 " guestfs_wc_c (guestfs_h *g,\n"
33529 " const char *path);\n"
33534 #: ../src/guestfs-actions.pod:8359
33535 msgid "guestfs_wc_l"
33539 #: ../src/guestfs-actions.pod:8361
33543 " guestfs_wc_l (guestfs_h *g,\n"
33544 " const char *path);\n"
33549 #: ../src/guestfs-actions.pod:8372
33550 msgid "guestfs_wc_w"
33554 #: ../src/guestfs-actions.pod:8374
33558 " guestfs_wc_w (guestfs_h *g,\n"
33559 " const char *path);\n"
33564 #: ../src/guestfs-actions.pod:8385
33565 msgid "guestfs_write"
33569 #: ../src/guestfs-actions.pod:8387
33573 " guestfs_write (guestfs_h *g,\n"
33574 " const char *path,\n"
33575 " const char *content,\n"
33576 " size_t content_size);\n"
33581 #: ../src/guestfs-actions.pod:8396
33582 msgid "See also C<guestfs_write_append>."
33586 #: ../src/guestfs-actions.pod:8405
33587 msgid "guestfs_write_append"
33591 #: ../src/guestfs-actions.pod:8407
33595 " guestfs_write_append (guestfs_h *g,\n"
33596 " const char *path,\n"
33597 " const char *content,\n"
33598 " size_t content_size);\n"
33603 #: ../src/guestfs-actions.pod:8416
33604 msgid "See also C<guestfs_write>."
33608 #: ../src/guestfs-actions.pod:8425
33609 msgid "guestfs_write_file"
33613 #: ../src/guestfs-actions.pod:8427
33617 " guestfs_write_file (guestfs_h *g,\n"
33618 " const char *path,\n"
33619 " const char *content,\n"
33625 #: ../src/guestfs-actions.pod:8433
33627 "I<This function is deprecated.> In new code, use the L</guestfs_write> call "
33632 #: ../src/guestfs-actions.pod:8458
33633 msgid "guestfs_zegrep"
33637 #: ../src/guestfs-actions.pod:8460
33641 " guestfs_zegrep (guestfs_h *g,\n"
33642 " const char *regex,\n"
33643 " const char *path);\n"
33648 #: ../src/guestfs-actions.pod:8477
33649 msgid "guestfs_zegrepi"
33653 #: ../src/guestfs-actions.pod:8479
33657 " guestfs_zegrepi (guestfs_h *g,\n"
33658 " const char *regex,\n"
33659 " const char *path);\n"
33664 #: ../src/guestfs-actions.pod:8496
33665 msgid "guestfs_zero"
33669 #: ../src/guestfs-actions.pod:8498
33673 " guestfs_zero (guestfs_h *g,\n"
33674 " const char *device);\n"
33679 #: ../src/guestfs-actions.pod:8512
33681 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
33682 "C<guestfs_is_zero_device>"
33686 #: ../src/guestfs-actions.pod:8524
33687 msgid "guestfs_zero_device"
33691 #: ../src/guestfs-actions.pod:8526
33695 " guestfs_zero_device (guestfs_h *g,\n"
33696 " const char *device);\n"
33701 #: ../src/guestfs-actions.pod:8530
33703 "This command writes zeroes over the entire C<device>. Compare with "
33704 "C<guestfs_zero> which just zeroes the first few blocks of a device."
33708 #: ../src/guestfs-actions.pod:8545
33709 msgid "(Added in 1.3.1)"
33713 #: ../src/guestfs-actions.pod:8547
33714 msgid "guestfs_zerofree"
33718 #: ../src/guestfs-actions.pod:8549
33722 " guestfs_zerofree (guestfs_h *g,\n"
33723 " const char *device);\n"
33728 #: ../src/guestfs-actions.pod:8568
33729 msgid "guestfs_zfgrep"
33733 #: ../src/guestfs-actions.pod:8570
33737 " guestfs_zfgrep (guestfs_h *g,\n"
33738 " const char *pattern,\n"
33739 " const char *path);\n"
33744 #: ../src/guestfs-actions.pod:8587
33745 msgid "guestfs_zfgrepi"
33749 #: ../src/guestfs-actions.pod:8589
33753 " guestfs_zfgrepi (guestfs_h *g,\n"
33754 " const char *pattern,\n"
33755 " const char *path);\n"
33760 #: ../src/guestfs-actions.pod:8606
33761 msgid "guestfs_zfile"
33765 #: ../src/guestfs-actions.pod:8608
33769 " guestfs_zfile (guestfs_h *g,\n"
33770 " const char *meth,\n"
33771 " const char *path);\n"
33776 #: ../src/guestfs-actions.pod:8613
33778 "I<This function is deprecated.> In new code, use the L</guestfs_file> call "
33783 #: ../src/guestfs-actions.pod:8625
33785 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
33790 #: ../src/guestfs-actions.pod:8633
33791 msgid "guestfs_zgrep"
33795 #: ../src/guestfs-actions.pod:8635
33799 " guestfs_zgrep (guestfs_h *g,\n"
33800 " const char *regex,\n"
33801 " const char *path);\n"
33806 #: ../src/guestfs-actions.pod:8652
33807 msgid "guestfs_zgrepi"
33811 #: ../src/guestfs-actions.pod:8654
33815 " guestfs_zgrepi (guestfs_h *g,\n"
33816 " const char *regex,\n"
33817 " const char *path);\n"
33822 #: ../src/guestfs-availability.pod:3
33827 #: ../src/guestfs-availability.pod:5
33829 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
33830 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
33831 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
33832 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
33833 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
33837 #: ../src/guestfs-availability.pod:21
33842 #: ../src/guestfs-availability.pod:23
33843 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
33847 #: ../src/guestfs-availability.pod:26
33852 #: ../src/guestfs-availability.pod:28
33853 msgid "The following functions: L</guestfs_grub_install>"
33857 #: ../src/guestfs-availability.pod:31
33862 #: ../src/guestfs-availability.pod:33
33864 "The following functions: L</guestfs_inotify_add_watch> "
33865 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
33866 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
33870 #: ../src/guestfs-availability.pod:41
33871 msgid "B<linuxfsuuid>"
33875 #: ../src/guestfs-availability.pod:43
33877 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
33878 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
33882 #: ../src/guestfs-availability.pod:50
33883 msgid "B<linuxmodules>"
33887 #: ../src/guestfs-availability.pod:52
33888 msgid "The following functions: L</guestfs_modprobe>"
33892 #: ../src/guestfs-availability.pod:55
33893 msgid "B<linuxxattrs>"
33897 #: ../src/guestfs-availability.pod:57
33899 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> "
33900 "L</guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> "
33901 "L</guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> "
33902 "L</guestfs_setxattr>"
33906 #: ../src/guestfs-availability.pod:68
33911 #: ../src/guestfs-availability.pod:70
33913 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
33914 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
33915 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
33919 #: ../src/guestfs-availability.pod:79
33924 #: ../src/guestfs-availability.pod:81
33926 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
33927 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
33928 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
33929 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
33930 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
33931 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
33932 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
33933 "L</guestfs_vgs_full>"
33937 #: ../src/guestfs-availability.pod:104
33942 #: ../src/guestfs-availability.pod:106
33943 msgid "The following functions: L</guestfs_mdadm_create> L</guestfs_mdadm_detail>"
33947 #: ../src/guestfs-availability.pod:110
33952 #: ../src/guestfs-availability.pod:112
33954 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
33955 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
33959 #: ../src/guestfs-availability.pod:118
33964 #: ../src/guestfs-availability.pod:120
33965 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
33969 #: ../src/guestfs-availability.pod:123
33970 msgid "B<ntfsprogs>"
33974 #: ../src/guestfs-availability.pod:125
33976 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
33977 "L</guestfs_ntfsresize_size>"
33981 #: ../src/guestfs-availability.pod:130
33982 msgid "B<realpath>"
33986 #: ../src/guestfs-availability.pod:132
33987 msgid "The following functions: L</guestfs_realpath>"
33991 #: ../src/guestfs-availability.pod:135
33996 #: ../src/guestfs-availability.pod:137
33998 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
33999 "L</guestfs_scrub_freespace>"
34003 #: ../src/guestfs-availability.pod:142
34008 #: ../src/guestfs-availability.pod:144
34009 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
34013 #: ../src/guestfs-availability.pod:148
34018 #: ../src/guestfs-availability.pod:150
34019 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
34023 #: ../src/guestfs-availability.pod:154
34024 msgid "B<zerofree>"
34028 #: ../src/guestfs-availability.pod:156
34029 msgid "The following functions: L</guestfs_zerofree>"
34033 #: ../src/guestfs-structs.pod:1
34034 msgid "guestfs_int_bool"
34038 #: ../src/guestfs-structs.pod:3
34041 " struct guestfs_int_bool {\n"
34049 #: ../src/guestfs-structs.pod:8
34052 " struct guestfs_int_bool_list {\n"
34053 " uint32_t len; /* Number of elements in list. */\n"
34054 " struct guestfs_int_bool *val; /* Elements. */\n"
34060 #: ../src/guestfs-structs.pod:13
34063 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
34064 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
34069 #: ../src/guestfs-structs.pod:16
34070 msgid "guestfs_lvm_pv"
34074 #: ../src/guestfs-structs.pod:18
34077 " struct guestfs_lvm_pv {\n"
34078 " char *pv_name;\n"
34079 " /* The next field is NOT nul-terminated, be careful when printing it: "
34081 " char pv_uuid[32];\n"
34083 " uint64_t pv_size;\n"
34084 " uint64_t dev_size;\n"
34085 " uint64_t pv_free;\n"
34086 " uint64_t pv_used;\n"
34087 " char *pv_attr;\n"
34088 " int64_t pv_pe_count;\n"
34089 " int64_t pv_pe_alloc_count;\n"
34090 " char *pv_tags;\n"
34091 " uint64_t pe_start;\n"
34092 " int64_t pv_mda_count;\n"
34093 " uint64_t pv_mda_free;\n"
34099 #: ../src/guestfs-structs.pod:36
34102 " struct guestfs_lvm_pv_list {\n"
34103 " uint32_t len; /* Number of elements in list. */\n"
34104 " struct guestfs_lvm_pv *val; /* Elements. */\n"
34110 #: ../src/guestfs-structs.pod:41
34113 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
34114 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
34119 #: ../src/guestfs-structs.pod:44
34120 msgid "guestfs_lvm_vg"
34124 #: ../src/guestfs-structs.pod:46
34127 " struct guestfs_lvm_vg {\n"
34128 " char *vg_name;\n"
34129 " /* The next field is NOT nul-terminated, be careful when printing it: "
34131 " char vg_uuid[32];\n"
34133 " char *vg_attr;\n"
34134 " uint64_t vg_size;\n"
34135 " uint64_t vg_free;\n"
34136 " char *vg_sysid;\n"
34137 " uint64_t vg_extent_size;\n"
34138 " int64_t vg_extent_count;\n"
34139 " int64_t vg_free_count;\n"
34140 " int64_t max_lv;\n"
34141 " int64_t max_pv;\n"
34142 " int64_t pv_count;\n"
34143 " int64_t lv_count;\n"
34144 " int64_t snap_count;\n"
34145 " int64_t vg_seqno;\n"
34146 " char *vg_tags;\n"
34147 " int64_t vg_mda_count;\n"
34148 " uint64_t vg_mda_free;\n"
34154 #: ../src/guestfs-structs.pod:69
34157 " struct guestfs_lvm_vg_list {\n"
34158 " uint32_t len; /* Number of elements in list. */\n"
34159 " struct guestfs_lvm_vg *val; /* Elements. */\n"
34165 #: ../src/guestfs-structs.pod:74
34168 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
34169 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
34174 #: ../src/guestfs-structs.pod:77
34175 msgid "guestfs_lvm_lv"
34179 #: ../src/guestfs-structs.pod:79
34182 " struct guestfs_lvm_lv {\n"
34183 " char *lv_name;\n"
34184 " /* The next field is NOT nul-terminated, be careful when printing it: "
34186 " char lv_uuid[32];\n"
34187 " char *lv_attr;\n"
34188 " int64_t lv_major;\n"
34189 " int64_t lv_minor;\n"
34190 " int64_t lv_kernel_major;\n"
34191 " int64_t lv_kernel_minor;\n"
34192 " uint64_t lv_size;\n"
34193 " int64_t seg_count;\n"
34195 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
34196 " float snap_percent;\n"
34197 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
34198 " float copy_percent;\n"
34199 " char *move_pv;\n"
34200 " char *lv_tags;\n"
34201 " char *mirror_log;\n"
34202 " char *modules;\n"
34208 #: ../src/guestfs-structs.pod:101
34211 " struct guestfs_lvm_lv_list {\n"
34212 " uint32_t len; /* Number of elements in list. */\n"
34213 " struct guestfs_lvm_lv *val; /* Elements. */\n"
34219 #: ../src/guestfs-structs.pod:106
34222 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
34223 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
34228 #: ../src/guestfs-structs.pod:111
34231 " struct guestfs_stat {\n"
34235 " int64_t nlink;\n"
34240 " int64_t blksize;\n"
34241 " int64_t blocks;\n"
34242 " int64_t atime;\n"
34243 " int64_t mtime;\n"
34244 " int64_t ctime;\n"
34250 #: ../src/guestfs-structs.pod:127
34253 " struct guestfs_stat_list {\n"
34254 " uint32_t len; /* Number of elements in list. */\n"
34255 " struct guestfs_stat *val; /* Elements. */\n"
34261 #: ../src/guestfs-structs.pod:132
34264 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
34265 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
34270 #: ../src/guestfs-structs.pod:137
34273 " struct guestfs_statvfs {\n"
34274 " int64_t bsize;\n"
34275 " int64_t frsize;\n"
34276 " int64_t blocks;\n"
34277 " int64_t bfree;\n"
34278 " int64_t bavail;\n"
34279 " int64_t files;\n"
34280 " int64_t ffree;\n"
34281 " int64_t favail;\n"
34284 " int64_t namemax;\n"
34290 #: ../src/guestfs-structs.pod:151
34293 " struct guestfs_statvfs_list {\n"
34294 " uint32_t len; /* Number of elements in list. */\n"
34295 " struct guestfs_statvfs *val; /* Elements. */\n"
34301 #: ../src/guestfs-structs.pod:156
34304 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
34305 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
34310 #: ../src/guestfs-structs.pod:159
34311 msgid "guestfs_dirent"
34315 #: ../src/guestfs-structs.pod:161
34318 " struct guestfs_dirent {\n"
34327 #: ../src/guestfs-structs.pod:167
34330 " struct guestfs_dirent_list {\n"
34331 " uint32_t len; /* Number of elements in list. */\n"
34332 " struct guestfs_dirent *val; /* Elements. */\n"
34338 #: ../src/guestfs-structs.pod:172
34341 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
34342 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
34347 #: ../src/guestfs-structs.pod:177
34350 " struct guestfs_version {\n"
34351 " int64_t major;\n"
34352 " int64_t minor;\n"
34353 " int64_t release;\n"
34360 #: ../src/guestfs-structs.pod:184
34363 " struct guestfs_version_list {\n"
34364 " uint32_t len; /* Number of elements in list. */\n"
34365 " struct guestfs_version *val; /* Elements. */\n"
34371 #: ../src/guestfs-structs.pod:189
34374 " void guestfs_free_version (struct guestfs_free_version *);\n"
34375 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
34380 #: ../src/guestfs-structs.pod:192
34381 msgid "guestfs_xattr"
34385 #: ../src/guestfs-structs.pod:194
34388 " struct guestfs_xattr {\n"
34389 " char *attrname;\n"
34390 " /* The next two fields describe a byte array. */\n"
34391 " uint32_t attrval_len;\n"
34392 " char *attrval;\n"
34398 #: ../src/guestfs-structs.pod:201
34401 " struct guestfs_xattr_list {\n"
34402 " uint32_t len; /* Number of elements in list. */\n"
34403 " struct guestfs_xattr *val; /* Elements. */\n"
34409 #: ../src/guestfs-structs.pod:206
34412 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
34413 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
34418 #: ../src/guestfs-structs.pod:209
34419 msgid "guestfs_inotify_event"
34423 #: ../src/guestfs-structs.pod:211
34426 " struct guestfs_inotify_event {\n"
34427 " int64_t in_wd;\n"
34428 " uint32_t in_mask;\n"
34429 " uint32_t in_cookie;\n"
34430 " char *in_name;\n"
34436 #: ../src/guestfs-structs.pod:218
34439 " struct guestfs_inotify_event_list {\n"
34440 " uint32_t len; /* Number of elements in list. */\n"
34441 " struct guestfs_inotify_event *val; /* Elements. */\n"
34447 #: ../src/guestfs-structs.pod:223
34450 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
34451 " void guestfs_free_inotify_event_list (struct "
34452 "guestfs_free_inotify_event_list *);\n"
34457 #: ../src/guestfs-structs.pod:226
34458 msgid "guestfs_partition"
34462 #: ../src/guestfs-structs.pod:228
34465 " struct guestfs_partition {\n"
34466 " int32_t part_num;\n"
34467 " uint64_t part_start;\n"
34468 " uint64_t part_end;\n"
34469 " uint64_t part_size;\n"
34475 #: ../src/guestfs-structs.pod:235
34478 " struct guestfs_partition_list {\n"
34479 " uint32_t len; /* Number of elements in list. */\n"
34480 " struct guestfs_partition *val; /* Elements. */\n"
34486 #: ../src/guestfs-structs.pod:240
34489 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
34490 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
34495 #: ../src/guestfs-structs.pod:243
34496 msgid "guestfs_application"
34500 #: ../src/guestfs-structs.pod:245
34503 " struct guestfs_application {\n"
34504 " char *app_name;\n"
34505 " char *app_display_name;\n"
34506 " int32_t app_epoch;\n"
34507 " char *app_version;\n"
34508 " char *app_release;\n"
34509 " char *app_install_path;\n"
34510 " char *app_trans_path;\n"
34511 " char *app_publisher;\n"
34512 " char *app_url;\n"
34513 " char *app_source_package;\n"
34514 " char *app_summary;\n"
34515 " char *app_description;\n"
34521 #: ../src/guestfs-structs.pod:260
34524 " struct guestfs_application_list {\n"
34525 " uint32_t len; /* Number of elements in list. */\n"
34526 " struct guestfs_application *val; /* Elements. */\n"
34532 #: ../src/guestfs-structs.pod:265
34535 " void guestfs_free_application (struct guestfs_free_application *);\n"
34536 " void guestfs_free_application_list (struct guestfs_free_application_list "
34542 #: ../src/guestfs.pod:5
34543 msgid "guestfs - Library for accessing and modifying virtual machine images"
34547 #: ../src/guestfs.pod:11
34550 " guestfs_h *g = guestfs_create ();\n"
34551 " guestfs_add_drive (g, \"guest.img\");\n"
34552 " guestfs_launch (g);\n"
34553 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34554 " guestfs_touch (g, \"/hello\");\n"
34555 " guestfs_umount (g, \"/\");\n"
34556 " guestfs_close (g);\n"
34561 #: ../src/guestfs.pod:25
34563 "Libguestfs is a library for accessing and modifying guest disk images. "
34564 "Amongst the things this is good for: making batch configuration changes to "
34565 "guests, getting disk used/free statistics (see also: virt-df), migrating "
34566 "between virtualization systems (see also: virt-p2v), performing partial "
34567 "backups, performing partial guest clones, cloning guests and changing "
34568 "registry/UUID/hostname info, and much else besides."
34572 #: ../src/guestfs.pod:33
34574 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
34575 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
34576 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
34581 #: ../src/guestfs.pod:38
34583 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
34584 "what filesystem is in each LV, etc.). It can also run commands in the "
34585 "context of the guest. Also you can access filesystems over FUSE."
34589 #: ../src/guestfs.pod:43
34591 "Libguestfs is a library that can be linked with C and C++ management "
34592 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
34593 "PHP, Erlang, Haskell or C#). You can also use it from shell scripts or the "
34598 #: ../src/guestfs.pod:48
34600 "You don't need to be root to use libguestfs, although obviously you do need "
34601 "enough permissions to access the disk images."
34605 #: ../src/guestfs.pod:51
34607 "Libguestfs is a large API because it can do many things. For a gentle "
34608 "introduction, please read the L</API OVERVIEW> section next."
34612 #: ../src/guestfs.pod:54
34614 "There are also some example programs in the L<guestfs-examples(3)> manual "
34619 #: ../src/guestfs.pod:57
34620 msgid "API OVERVIEW"
34624 #: ../src/guestfs.pod:59
34626 "This section provides a gentler overview of the libguestfs API. We also try "
34627 "to group API calls together, where that may not be obvious from reading "
34628 "about the individual calls in the main section of this manual."
34632 #: ../src/guestfs.pod:64
34637 #: ../src/guestfs.pod:66
34639 "Before you can use libguestfs calls, you have to create a handle. Then you "
34640 "must add at least one disk image to the handle, followed by launching the "
34641 "handle, then performing whatever operations you want, and finally closing "
34642 "the handle. By convention we use the single letter C<g> for the name of the "
34643 "handle variable, although of course you can use any name you want."
34647 #: ../src/guestfs.pod:73
34648 msgid "The general structure of all libguestfs-using programs looks like this:"
34652 #: ../src/guestfs.pod:76
34655 " guestfs_h *g = guestfs_create ();\n"
34660 #: ../src/guestfs.pod:78
34663 " /* Call guestfs_add_drive additional times if there are\n"
34664 " * multiple disk images.\n"
34666 " guestfs_add_drive (g, \"guest.img\");\n"
34671 #: ../src/guestfs.pod:83
34674 " /* Most manipulation calls won't work until you've launched\n"
34675 " * the handle 'g'. You have to do this _after_ adding drives\n"
34676 " * and _before_ other commands.\n"
34678 " guestfs_launch (g);\n"
34683 #: ../src/guestfs.pod:89
34686 " /* Now you can examine what partitions, LVs etc are available.\n"
34688 " char **partitions = guestfs_list_partitions (g);\n"
34689 " char **logvols = guestfs_lvs (g);\n"
34694 #: ../src/guestfs.pod:94
34697 " /* To access a filesystem in the image, you must mount it.\n"
34699 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34704 #: ../src/guestfs.pod:98
34707 " /* Now you can perform filesystem actions on the guest\n"
34710 " guestfs_touch (g, \"/hello\");\n"
34715 #: ../src/guestfs.pod:103
34718 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
34719 " * it is done automatically when you close the handle. See\n"
34720 " * discussion of autosync in this page.\n"
34722 " guestfs_sync (g);\n"
34727 #: ../src/guestfs.pod:109
34730 " /* Close the handle 'g'. */\n"
34731 " guestfs_close (g);\n"
34736 #: ../src/guestfs.pod:112
34738 "The code above doesn't include any error checking. In real code you should "
34739 "check return values carefully for errors. In general all functions that "
34740 "return integers return C<-1> on error, and all functions that return "
34741 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
34742 "how to handle errors, and consult the documentation for each function call "
34743 "below to see precisely how they return error indications. See "
34744 "L<guestfs-examples(3)> for fully worked examples."
34748 #: ../src/guestfs.pod:121
34749 msgid "DISK IMAGES"
34753 #: ../src/guestfs.pod:123
34755 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
34756 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
34757 "actual block device, or simply an empty file of zeroes that you have created "
34758 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
34763 #: ../src/guestfs.pod:129
34765 "The call you should use in modern code for adding drives is "
34766 "L</guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
34767 "specifying that the format is raw, do:"
34771 #: ../src/guestfs.pod:133
34774 " guestfs_add_drive_opts (g, filename,\n"
34775 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34781 #: ../src/guestfs.pod:137
34782 msgid "You can add a disk read-only using:"
34786 #: ../src/guestfs.pod:139
34789 " guestfs_add_drive_opts (g, filename,\n"
34790 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34791 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
34797 #: ../src/guestfs.pod:144
34799 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
34800 "libguestfs won't modify the file."
34804 #: ../src/guestfs.pod:147
34806 "Be extremely cautious if the disk image is in use, eg. if it is being used "
34807 "by a virtual machine. Adding it read-write will almost certainly cause disk "
34808 "corruption, but adding it read-only is safe."
34812 #: ../src/guestfs.pod:151
34814 "You must add at least one disk image, and you may add multiple disk images. "
34815 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
34816 "first one you added), C</dev/sdb> (for the second one you added), etc."
34820 #: ../src/guestfs.pod:156
34822 "Once L</guestfs_launch> has been called you cannot add any more images. You "
34823 "can call L</guestfs_list_devices> to get a list of the device names, in the "
34824 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
34828 #: ../src/guestfs.pod:161
34833 #: ../src/guestfs.pod:163
34835 "Before you can read or write files, create directories and so on in a disk "
34836 "image that contains filesystems, you have to mount those filesystems using "
34837 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
34838 "a disk image contains (for example) one partition with a filesystem on that "
34839 "partition, then you can mount it directly:"
34843 #: ../src/guestfs.pod:170
34846 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
34851 #: ../src/guestfs.pod:172
34853 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
34854 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
34855 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
34856 "that these are libguestfs virtual devices, and are nothing to do with host "
34861 #: ../src/guestfs.pod:178
34863 "If you are given a disk image and you don't know what it contains then you "
34864 "have to find out. Libguestfs can do that too: use "
34865 "L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions "
34866 "and LVs, and either try mounting each to see what is mountable, or else "
34867 "examine them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
34868 "filesystems, use L</guestfs_list_filesystems>."
34872 #: ../src/guestfs.pod:186
34874 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
34875 "L</INSPECTION> below). But you might find it easier to look at higher level "
34876 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
34880 #: ../src/guestfs.pod:191
34882 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
34883 "several other variations of the C<guestfs_mount_*> call."
34887 #: ../src/guestfs.pod:194
34888 msgid "FILESYSTEM ACCESS AND MODIFICATION"
34892 #: ../src/guestfs.pod:196
34894 "The majority of the libguestfs API consists of fairly low-level calls for "
34895 "accessing and modifying the files, directories, symlinks etc on mounted "
34896 "filesystems. There are over a hundred such calls which you can find listed "
34897 "in detail below in this man page, and we don't even pretend to cover them "
34898 "all in this overview."
34902 #: ../src/guestfs.pod:202
34904 "Specify filenames as full paths, starting with C<\"/\"> and including the "
34909 #: ../src/guestfs.pod:205
34911 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
34912 "the file called C<\"etc/passwd\"> then you could do:"
34916 #: ../src/guestfs.pod:208
34919 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
34924 #: ../src/guestfs.pod:210
34926 "This would return C<data> as a newly allocated buffer containing the full "
34927 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
34928 "or C<NULL> if there was an error."
34932 #: ../src/guestfs.pod:214
34934 "As another example, to create a top-level directory on that filesystem "
34935 "called C<\"var\"> you would do:"
34939 #: ../src/guestfs.pod:217
34942 " guestfs_mkdir (g, \"/var\");\n"
34947 #: ../src/guestfs.pod:219
34948 msgid "To create a symlink you could do:"
34952 #: ../src/guestfs.pod:221
34955 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
34956 " \"/etc/rc3.d/S30portmap\");\n"
34961 #: ../src/guestfs.pod:224
34963 "Libguestfs will reject attempts to use relative paths and there is no "
34964 "concept of a current working directory."
34968 #: ../src/guestfs.pod:227
34970 "Libguestfs can return errors in many situations: for example if the "
34971 "filesystem isn't writable, or if a file or directory that you requested "
34972 "doesn't exist. If you are using the C API (documented here) you have to "
34973 "check for those error conditions after each call. (Other language bindings "
34974 "turn these errors into exceptions)."
34978 #: ../src/guestfs.pod:233
34980 "File writes are affected by the per-handle umask, set by calling "
34981 "L</guestfs_umask> and defaulting to 022. See L</UMASK>."
34985 #: ../src/guestfs.pod:236
34986 msgid "PARTITIONING"
34990 #: ../src/guestfs.pod:238
34992 "Libguestfs contains API calls to read, create and modify partition tables on "
34997 #: ../src/guestfs.pod:241
34999 "In the common case where you want to create a single partition covering the "
35000 "whole disk, you should use the L</guestfs_part_disk> call:"
35004 #: ../src/guestfs.pod:245
35007 " const char *parttype = \"mbr\";\n"
35008 " if (disk_is_larger_than_2TB)\n"
35009 " parttype = \"gpt\";\n"
35010 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
35015 #: ../src/guestfs.pod:250
35017 "Obviously this effectively wipes anything that was on that disk image "
35022 #: ../src/guestfs.pod:253
35027 #: ../src/guestfs.pod:255
35029 "Libguestfs provides access to a large part of the LVM2 API, such as "
35030 "L</guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense "
35031 "unless you familiarize yourself with the concepts of physical volumes, "
35032 "volume groups and logical volumes."
35036 #: ../src/guestfs.pod:260
35038 "This author strongly recommends reading the LVM HOWTO, online at "
35039 "L<http://tldp.org/HOWTO/LVM-HOWTO/>."
35043 #: ../src/guestfs.pod:263
35044 msgid "DOWNLOADING"
35048 #: ../src/guestfs.pod:265
35050 "Use L</guestfs_cat> to download small, text only files. This call is "
35051 "limited to files which are less than 2 MB and which cannot contain any ASCII "
35052 "NUL (C<\\0>) characters. However the API is very simple to use."
35056 #: ../src/guestfs.pod:269
35058 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
35059 "bit data, since it returns a (pointer, size) pair. However it is still "
35060 "limited to \"small\" files, less than 2 MB."
35064 #: ../src/guestfs.pod:273
35066 "L</guestfs_download> can be used to download any file, with no limits on "
35067 "content or size (even files larger than 4 GB)."
35071 #: ../src/guestfs.pod:276
35072 msgid "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
35076 #: ../src/guestfs.pod:279
35081 #: ../src/guestfs.pod:281
35083 "It's often the case that you want to write a file or files to the disk "
35088 #: ../src/guestfs.pod:284
35090 "To write a small file with fixed content, use L</guestfs_write>. To create "
35091 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or "
35092 "L</guestfs_fallocate64> (with all disk blocks allocated). There are a "
35093 "variety of other functions for creating test files, for example "
35094 "L</guestfs_fill> and L</guestfs_fill_pattern>."
35098 #: ../src/guestfs.pod:290
35100 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
35101 "file content or size (even files larger than 4 GB)."
35105 #: ../src/guestfs.pod:293
35106 msgid "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
35110 #: ../src/guestfs.pod:295
35112 "However the fastest way to upload I<large numbers of arbitrary files> is to "
35113 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and "
35114 "L<mkisofs(8)>), then attach this using L</guestfs_add_drive_ro>. If you add "
35115 "the drive in a predictable way (eg. adding it last after all other drives) "
35116 "then you can get the device name from L</guestfs_list_devices> and mount it "
35117 "directly using L</guestfs_mount_ro>. Note that squashfs images are "
35118 "sometimes non-portable between kernel versions, and they don't support "
35119 "labels or UUIDs. If you want to pre-build an image or you need to mount it "
35120 "using a label or UUID, use an ISO image instead."
35124 #: ../src/guestfs.pod:306
35129 #: ../src/guestfs.pod:308
35131 "There are various different commands for copying between files and devices "
35132 "and in and out of the guest filesystem. These are summarised in the table "
35137 #: ../src/guestfs.pod:314
35138 msgid "B<file> to B<file>"
35142 #: ../src/guestfs.pod:316
35144 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
35145 "directories recursively."
35149 #: ../src/guestfs.pod:319
35150 msgid "To copy part of a file (offset and size) use L</guestfs_copy_file_to_file>."
35154 #: ../src/guestfs.pod:322
35155 msgid "B<file> to B<device>"
35159 #: ../src/guestfs.pod:324
35160 msgid "B<device> to B<file>"
35164 #: ../src/guestfs.pod:326
35165 msgid "B<device> to B<device>"
35169 #: ../src/guestfs.pod:328
35171 "Use L</guestfs_copy_file_to_device>, L</guestfs_copy_device_to_file>, or "
35172 "L</guestfs_copy_device_to_device>."
35176 #: ../src/guestfs.pod:331
35177 msgid "Example: duplicate the contents of an LV:"
35181 #: ../src/guestfs.pod:333
35184 " guestfs_copy_device_to_device (g,\n"
35185 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
35186 " /* -1 marks the end of the list of optional parameters */\n"
35192 #: ../src/guestfs.pod:338
35194 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
35195 "(C</dev/VG/Original>). To copy less than the whole source device, use the "
35196 "optional C<size> parameter:"
35200 #: ../src/guestfs.pod:342
35203 " guestfs_copy_device_to_device (g,\n"
35204 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
35205 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, 10000,\n"
35211 #: ../src/guestfs.pod:347
35212 msgid "B<file on the host> to B<file or device>"
35216 #: ../src/guestfs.pod:349
35217 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
35221 #: ../src/guestfs.pod:351
35222 msgid "B<file or device> to B<file on the host>"
35226 #: ../src/guestfs.pod:353
35227 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
35231 #: ../src/guestfs.pod:357
35232 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
35236 #: ../src/guestfs.pod:359
35238 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, "
35239 "L</guestfs_tar_out> etc appear to only take filenames as arguments, so it "
35240 "appears you can only upload and download to files. However many Un*x-like "
35241 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, "
35242 "C</dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, "
35243 "stderr, and arbitrary file descriptor N."
35247 #: ../src/guestfs.pod:367
35248 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
35252 #: ../src/guestfs.pod:370
35255 " guestfs_download (g, filename, \"/dev/stdout\");\n"
35260 #: ../src/guestfs.pod:372
35261 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
35265 #: ../src/guestfs.pod:374
35268 " char devfd[64];\n"
35269 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
35270 " guestfs_tar_out (g, \"/\", devfd);\n"
35275 #: ../src/guestfs.pod:378
35276 msgid "LISTING FILES"
35280 #: ../src/guestfs.pod:380
35282 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
35283 "L<guestfish(1)>-equivalent command C<ll>)."
35287 #: ../src/guestfs.pod:383
35289 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
35290 "programs, as a flat list of strings."
35294 #: ../src/guestfs.pod:386
35296 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
35297 "directory, plus additional information about each one. It is more "
35298 "equivalent to using the L<readdir(3)> call on a local filesystem."
35302 #: ../src/guestfs.pod:390
35304 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list "
35309 #: ../src/guestfs.pod:393
35310 msgid "RUNNING COMMANDS"
35314 #: ../src/guestfs.pod:395
35316 "Although libguestfs is primarily an API for manipulating files inside guest "
35317 "images, we also provide some limited facilities for running commands inside "
35322 #: ../src/guestfs.pod:399
35323 msgid "There are many limitations to this:"
35327 #: ../src/guestfs.pod:405
35329 "The kernel version that the command runs under will be different from what "
35334 #: ../src/guestfs.pod:410
35336 "If the command needs to communicate with daemons, then most likely they "
35337 "won't be running."
35341 #: ../src/guestfs.pod:415
35342 msgid "The command will be running in limited memory."
35346 #: ../src/guestfs.pod:419
35348 "The network may not be available unless you enable it (see "
35349 "L</guestfs_set_network>)."
35353 #: ../src/guestfs.pod:424
35354 msgid "Only supports Linux guests (not Windows, BSD, etc)."
35358 #: ../src/guestfs.pod:428
35359 msgid "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
35363 #: ../src/guestfs.pod:433
35365 "For SELinux guests, you may need to enable SELinux and load policy first. "
35366 "See L</SELINUX> in this manpage."
35370 #: ../src/guestfs.pod:438
35372 "I<Security:> It is not safe to run commands from untrusted, possibly "
35373 "malicious guests. These commands may attempt to exploit your program by "
35374 "sending unexpected output. They could also try to exploit the Linux kernel "
35375 "or qemu provided by the libguestfs appliance. They could use the network "
35376 "provided by the libguestfs appliance to bypass ordinary network partitions "
35377 "and firewalls. They could use the elevated privileges or different SELinux "
35378 "context of your program to their advantage."
35382 #: ../src/guestfs.pod:447
35384 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
35385 "(a script which runs when the guest next boots normally), and to have this "
35386 "script run the commands you want in the normal context of the running guest, "
35387 "network security and so on. For information about other security issues, "
35388 "see L</SECURITY>."
35392 #: ../src/guestfs.pod:455
35394 "The two main API calls to run commands are L</guestfs_command> and "
35395 "L</guestfs_sh> (there are also variations)."
35399 #: ../src/guestfs.pod:458
35401 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
35402 "shell globs, redirections, etc will work."
35406 #: ../src/guestfs.pod:461
35407 msgid "CONFIGURATION FILES"
35411 #: ../src/guestfs.pod:463
35413 "To read and write configuration files in Linux guest filesystems, we "
35414 "strongly recommend using Augeas. For example, Augeas understands how to "
35415 "read and write, say, a Linux shadow password file or X.org configuration "
35416 "file, and so avoids you having to write that code."
35420 #: ../src/guestfs.pod:468
35422 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
35423 "document Augeas itself here because there is excellent documentation on the "
35424 "L<http://augeas.net/> website."
35428 #: ../src/guestfs.pod:472
35430 "If you don't want to use Augeas (you fool!) then try calling "
35431 "L</guestfs_read_lines> to get the file as a list of lines which you can "
35436 #: ../src/guestfs.pod:476
35441 #: ../src/guestfs.pod:478
35443 "We support SELinux guests. To ensure that labeling happens correctly in "
35444 "SELinux guests, you need to enable SELinux and load the guest's policy:"
35448 #: ../src/guestfs.pod:486
35449 msgid "Before launching, do:"
35453 #: ../src/guestfs.pod:488
35456 " guestfs_set_selinux (g, 1);\n"
35461 #: ../src/guestfs.pod:492
35463 "After mounting the guest's filesystem(s), load the policy. This is best "
35464 "done by running the L<load_policy(8)> command in the guest itself:"
35468 #: ../src/guestfs.pod:496
35471 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
35476 #: ../src/guestfs.pod:498
35478 "(Older versions of C<load_policy> require you to specify the name of the "
35483 #: ../src/guestfs.pod:503
35485 "Optionally, set the security context for the API. The correct security "
35486 "context to use can only be known by inspecting the guest. As an example:"
35490 #: ../src/guestfs.pod:507
35493 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
35498 #: ../src/guestfs.pod:511
35499 msgid "This will work for running commands and editing existing files."
35503 #: ../src/guestfs.pod:513
35505 "When new files are created, you may need to label them explicitly, for "
35506 "example by running the external command C<restorecon pathname>."
35510 #: ../src/guestfs.pod:517
35515 #: ../src/guestfs.pod:519
35517 "Certain calls are affected by the current file mode creation mask (the "
35518 "\"umask\"). In particular ones which create files or directories, such as "
35519 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
35520 "either the default mode that the file is created with or modifies the mode "
35525 #: ../src/guestfs.pod:525
35527 "The default umask is C<022>, so files are created with modes such as C<0644> "
35528 "and directories with C<0755>."
35532 #: ../src/guestfs.pod:528
35534 "There are two ways to avoid being affected by umask. Either set umask to 0 "
35535 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
35536 "L</guestfs_chmod> after creating each file or directory."
35540 #: ../src/guestfs.pod:532
35541 msgid "For more information about umask, see L<umask(2)>."
35545 #: ../src/guestfs.pod:536
35547 "Libguestfs allows you to access Linux guests which have been encrypted using "
35548 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
35549 "standard. This includes nearly all whole disk encryption systems used by "
35550 "modern Linux guests."
35554 #: ../src/guestfs.pod:542
35556 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
35557 "returns the string C<crypto_LUKS>)."
35561 #: ../src/guestfs.pod:545
35563 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
35564 "will require the passphrase!"
35568 #: ../src/guestfs.pod:548
35570 "Opening a LUKS device creates a new device mapper device called "
35571 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
35572 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
35573 "decrypted from and encrypted to the underlying block device respectively."
35577 #: ../src/guestfs.pod:554
35579 "LVM volume groups on the device can be made visible by calling "
35580 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
35581 "volume(s) can now be mounted in the usual way."
35585 #: ../src/guestfs.pod:558
35587 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
35588 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
35589 "[\"/dev/VG\"])>. Then close the mapper device by calling "
35590 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
35591 "underlying encrypted block device)."
35595 #: ../src/guestfs.pod:565
35600 #: ../src/guestfs.pod:567
35602 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
35603 "contains operating systems, an install CD or a live CD. (These APIs used to "
35604 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
35605 "version 1.5.3 the most frequently used part of this library has been "
35606 "rewritten in C and moved into the core code)."
35610 #: ../src/guestfs.pod:574
35612 "Add all disks belonging to the unknown virtual machine and call "
35613 "L</guestfs_launch> in the usual way."
35617 #: ../src/guestfs.pod:577
35619 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
35620 "and certain heuristics, and returns a list of operating systems that were "
35621 "found. An empty list means none were found. A single element is the root "
35622 "filesystem of the operating system. For dual- or multi-boot guests, "
35623 "multiple roots can be returned, each one corresponding to a separate "
35624 "operating system. (Multi-boot virtual machines are extremely rare in the "
35625 "world of virtualization, but since this scenario can happen, we have built "
35626 "libguestfs to deal with it.)"
35630 #: ../src/guestfs.pod:586
35632 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
35633 "to get additional details about that operating system. For example, call "
35634 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
35635 "Windows and Linux-based operating systems respectively."
35639 #: ../src/guestfs.pod:592
35641 "Un*x-like and Linux-based operating systems usually consist of several "
35642 "filesystems which are mounted at boot time (for example, a separate boot "
35643 "partition mounted on C</boot>). The inspection rules are able to detect how "
35644 "filesystems correspond to mount points. Call "
35645 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
35646 "hash table like this example:"
35650 #: ../src/guestfs.pod:599
35653 " /boot => /dev/sda1\n"
35654 " / => /dev/vg_guest/lv_root\n"
35655 " /usr => /dev/vg_guest/lv_usr\n"
35660 #: ../src/guestfs.pod:603
35662 "The caller can then make calls to L</guestfs_mount_options> to mount the "
35663 "filesystems as suggested."
35667 #: ../src/guestfs.pod:606
35669 "Be careful to mount filesystems in the right order (eg. C</> before "
35670 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
35675 #: ../src/guestfs.pod:610
35677 "Inspection currently only works for some common operating systems. "
35678 "Contributors are welcome to send patches for other operating systems that we "
35679 "currently cannot detect."
35683 #: ../src/guestfs.pod:614
35685 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
35686 "for more details. The L</guestfs_inspect_os> function just ignores any "
35687 "encrypted devices."
35691 #: ../src/guestfs.pod:618
35693 "A note on the implementation: The call L</guestfs_inspect_os> performs "
35694 "inspection and caches the results in the guest handle. Subsequent calls to "
35695 "C<guestfs_inspect_get_*> return this cached information, but I<do not> "
35696 "re-read the disks. If you change the content of the guest disks, you can "
35697 "redo inspection by calling L</guestfs_inspect_os> again. "
35698 "(L</guestfs_inspect_list_applications> works a little differently from the "
35699 "other calls and does read the disks. See documentation for that function "
35704 #: ../src/guestfs.pod:627
35705 msgid "INSPECTING INSTALL DISKS"
35709 #: ../src/guestfs.pod:629
35711 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
35716 #: ../src/guestfs.pod:632
35718 "Call L</guestfs_inspect_get_format> to return the format of the operating "
35719 "system, which currently can be C<installed> (a regular operating system) or "
35720 "C<installer> (some sort of install disk)."
35724 #: ../src/guestfs.pod:636
35726 "Further information is available about the operating system that can be "
35727 "installed using the regular inspection APIs like "
35728 "L</guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> "
35733 #: ../src/guestfs.pod:641
35735 "Some additional information specific to installer disks is also available "
35736 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and "
35737 "L</guestfs_inspect_is_multipart> calls."
35741 #: ../src/guestfs.pod:646
35742 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
35746 #: ../src/guestfs.pod:648
35748 "Libguestfs can mount NTFS partitions. It does this using the "
35749 "L<http://www.ntfs-3g.org/> driver."
35753 #: ../src/guestfs.pod:651
35754 msgid "DRIVE LETTERS AND PATHS"
35758 #: ../src/guestfs.pod:653
35760 "DOS and Windows still use drive letters, and the filesystems are always "
35761 "treated as case insensitive by Windows itself, and therefore you might find "
35762 "a Windows configuration file referring to a path like "
35763 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
35764 "that directory might be referred to as C</WINDOWS/System32>."
35768 #: ../src/guestfs.pod:659
35770 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
35771 "L</guestfs_inspect_get_drive_mappings>)"
35775 #: ../src/guestfs.pod:662
35777 "Dealing with separator characters (backslash vs forward slash) is outside "
35778 "the scope of libguestfs, but usually a simple character replacement will "
35783 #: ../src/guestfs.pod:666
35785 "To resolve the case insensitivity of paths, call "
35786 "L</guestfs_case_sensitive_path>."
35790 #: ../src/guestfs.pod:669
35791 msgid "ACCESSING THE WINDOWS REGISTRY"
35795 #: ../src/guestfs.pod:671
35797 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
35798 "files, through the library C<hivex> which is part of the libguestfs project "
35799 "although ships as a separate tarball. You have to locate and download the "
35800 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
35801 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
35802 "L<virt-win-reg(1)> for more help on this issue."
35806 #: ../src/guestfs.pod:679
35807 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
35811 #: ../src/guestfs.pod:681
35813 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
35814 "provide something which looks like a Linux symlink. The way it tries to do "
35815 "the rewriting is described here:"
35819 #: ../src/guestfs.pod:685
35820 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-symbolic-links/>"
35824 #: ../src/guestfs.pod:687
35826 "The essential problem is that ntfs-3g simply does not have enough "
35827 "information to do a correct job. NTFS links can contain drive letters and "
35828 "references to external device GUIDs that ntfs-3g has no way of resolving. "
35829 "It is almost certainly the case that libguestfs callers should ignore what "
35830 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
35834 #: ../src/guestfs.pod:694
35836 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use "
35837 "L</guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
35838 "attribute, and read the raw reparse data from that (you can find the format "
35839 "documented in various places around the web)."
35843 #: ../src/guestfs.pod:699
35844 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
35848 #: ../src/guestfs.pod:701
35850 "There are other useful extended attributes that can be read from ntfs-3g "
35851 "filesystems (using L</guestfs_getxattr>). See:"
35855 #: ../src/guestfs.pod:704
35856 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
35860 #: ../src/guestfs.pod:706
35861 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
35865 #: ../src/guestfs.pod:708
35867 "Although we don't want to discourage you from using the C API, we will "
35868 "mention here that the same API is also available in other languages."
35872 #: ../src/guestfs.pod:711
35874 "The API is broadly identical in all supported languages. This means that "
35875 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
35876 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
35877 "OCaml. In other words, a straightforward, predictable isomorphism between "
35882 #: ../src/guestfs.pod:717
35884 "Error messages are automatically transformed into exceptions if the language "
35889 #: ../src/guestfs.pod:720
35891 "We don't try to \"object orientify\" parts of the API in OO languages, "
35892 "although contributors are welcome to write higher level APIs above what we "
35893 "provide in their favourite languages if they wish."
35897 #: ../src/guestfs.pod:726
35902 #: ../src/guestfs.pod:728
35904 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
35905 "identical to the C API. C++ classes and exceptions are not used."
35909 #: ../src/guestfs.pod:732
35914 #: ../src/guestfs.pod:734
35916 "The C# bindings are highly experimental. Please read the warnings at the "
35917 "top of C<csharp/Libguestfs.cs>."
35921 #: ../src/guestfs.pod:737
35926 #: ../src/guestfs.pod:739
35927 msgid "See L<guestfs-erlang(3)>."
35931 #: ../src/guestfs.pod:741
35936 #: ../src/guestfs.pod:743
35938 "This is the only language binding that is working but incomplete. Only "
35939 "calls which return simple integers have been bound in Haskell, and we are "
35940 "looking for help to complete this binding."
35944 #: ../src/guestfs.pod:747
35949 #: ../src/guestfs.pod:749
35951 "Full documentation is contained in the Javadoc which is distributed with "
35952 "libguestfs. For examples, see L<guestfs-java(3)>."
35956 #: ../src/guestfs.pod:752
35961 #: ../src/guestfs.pod:754
35962 msgid "See L<guestfs-ocaml(3)>."
35966 #: ../src/guestfs.pod:756
35971 #: ../src/guestfs.pod:758
35972 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
35976 #: ../src/guestfs.pod:760
35981 #: ../src/guestfs.pod:762
35983 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
35984 "the php-libguestfs package for your distribution."
35988 #: ../src/guestfs.pod:765
35989 msgid "The PHP binding only works correctly on 64 bit machines."
35993 #: ../src/guestfs.pod:767
35998 #: ../src/guestfs.pod:769
35999 msgid "See L<guestfs-python(3)>."
36003 #: ../src/guestfs.pod:771
36008 #: ../src/guestfs.pod:773
36009 msgid "See L<guestfs-ruby(3)>."
36013 #: ../src/guestfs.pod:775
36014 msgid "B<shell scripts>"
36018 #: ../src/guestfs.pod:777
36019 msgid "See L<guestfish(1)>."
36023 #: ../src/guestfs.pod:781
36024 msgid "LIBGUESTFS GOTCHAS"
36028 #: ../src/guestfs.pod:783
36030 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
36031 "system [...] that works in the way it is documented but is counterintuitive "
36032 "and almost invites mistakes.\""
36036 #: ../src/guestfs.pod:787
36038 "Since we developed libguestfs and the associated tools, there are several "
36039 "things we would have designed differently, but are now stuck with for "
36040 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
36041 "release, you can expect these to change. Beware of them."
36045 #: ../src/guestfs.pod:795
36046 msgid "Autosync / forgetting to sync."
36050 #: ../src/guestfs.pod:797
36052 "I<Update:> Autosync is enabled by default for all API users starting from "
36053 "libguestfs 1.5.24. This section only applies to older versions."
36057 #: ../src/guestfs.pod:800
36059 "When modifying a filesystem from C or another language, you B<must> unmount "
36060 "all filesystems and call L</guestfs_sync> explicitly before you close the "
36061 "libguestfs handle. You can also call:"
36065 #: ../src/guestfs.pod:804
36068 " guestfs_set_autosync (g, 1);\n"
36073 #: ../src/guestfs.pod:806
36075 "to have the unmount/sync done automatically for you when the handle 'g' is "
36076 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
36081 #: ../src/guestfs.pod:810
36083 "If you forget to do this, then it is entirely possible that your changes "
36084 "won't be written out, or will be partially written, or (very rarely) that "
36085 "you'll get disk corruption."
36089 #: ../src/guestfs.pod:814
36091 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
36092 "guestfish scripts that forget to sync will work just fine, which can make "
36093 "this very puzzling if you are trying to debug a problem."
36097 #: ../src/guestfs.pod:818
36098 msgid "Mount option C<-o sync> should not be the default."
36102 #: ../src/guestfs.pod:820
36104 "I<Update:> L</guestfs_mount> no longer adds any options starting from "
36105 "libguestfs 1.13.16. This section only applies to older versions."
36109 #: ../src/guestfs.pod:823
36111 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
36112 "However C<-o sync> does not add any reliability benefit, but does have a "
36113 "very large performance impact."
36117 #: ../src/guestfs.pod:827
36119 "The work around is to use L</guestfs_mount_options> and set the mount "
36120 "options that you actually want to use."
36124 #: ../src/guestfs.pod:830
36125 msgid "Read-only should be the default."
36129 #: ../src/guestfs.pod:832
36131 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
36132 "specify I<--rw> if you want to make changes to the image."
36136 #: ../src/guestfs.pod:835
36137 msgid "This would reduce the potential to corrupt live VM images."
36141 #: ../src/guestfs.pod:837
36143 "Note that many filesystems change the disk when you just mount and unmount, "
36144 "even if you didn't perform any writes. You need to use "
36145 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
36149 #: ../src/guestfs.pod:841
36150 msgid "guestfish command line is hard to use."
36154 #: ../src/guestfs.pod:843
36156 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
36157 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
36158 "exist, so it fails. In earlier versions of guestfish the error message was "
36159 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
36160 "we should have used C<guestfish -c command> to run commands."
36164 #: ../src/guestfs.pod:850
36165 msgid "guestfish megabyte modifiers don't work right on all commands"
36169 #: ../src/guestfs.pod:852
36171 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
36172 "other modifiers). What guestfish actually does is to multiply the number "
36173 "part by the modifier part and pass the result to the C API. However this "
36174 "doesn't work for a few APIs which aren't expecting bytes, but are already "
36175 "expecting some other unit (eg. megabytes)."
36179 #: ../src/guestfs.pod:859
36180 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
36184 #: ../src/guestfs.pod:861
36187 " lvcreate LV VG 100M\n"
36192 #: ../src/guestfs.pod:863
36194 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
36195 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
36196 "megabytes * megabytes) logical volume. The error message you get from this "
36197 "is also a little obscure."
36201 #: ../src/guestfs.pod:868
36203 "This could be fixed in the generator by specially marking parameters and "
36204 "return values which take bytes or other units."
36208 #: ../src/guestfs.pod:871
36209 msgid "Ambiguity between devices and paths"
36213 #: ../src/guestfs.pod:873
36215 "There is a subtle ambiguity in the API between a device name "
36216 "(eg. C</dev/sdb2>) and a similar pathname. A file might just happen to be "
36217 "called C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
36221 #: ../src/guestfs.pod:878
36223 "In the current API we usually resolve this ambiguity by having two separate "
36224 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
36225 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
36226 "detecting if the path supplied begins with C</dev/>."
36230 #: ../src/guestfs.pod:884
36232 "To avoid both the ambiguity and the need to duplicate some calls, we could "
36233 "make paths/devices into structured names. One way to do this would be to "
36234 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
36235 "aspect of grub. Another way would be to use a structured type, equivalent "
36236 "to this OCaml type:"
36240 #: ../src/guestfs.pod:890
36243 " type path = Path of string | Device of int | Partition of int * int\n"
36248 #: ../src/guestfs.pod:892
36249 msgid "which would allow you to pass arguments like:"
36253 #: ../src/guestfs.pod:894
36256 " Path \"/foo/bar\"\n"
36257 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
36258 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
36259 " Path \"/dev/sdb2\" (* not a device *)\n"
36264 #: ../src/guestfs.pod:899
36266 "As you can see there are still problems to resolve even with this "
36267 "representation. Also consider how it might work in guestfish."
36271 #: ../src/guestfs.pod:904
36272 msgid "KEYS AND PASSPHRASES"
36276 #: ../src/guestfs.pod:906
36278 "Certain libguestfs calls take a parameter that contains sensitive key "
36279 "material, passed in as a C string."
36283 #: ../src/guestfs.pod:909
36285 "In the future we would hope to change the libguestfs implementation so that "
36286 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
36287 "swap. However this is I<not> done at the moment, because of the complexity "
36288 "of such an implementation."
36292 #: ../src/guestfs.pod:914
36294 "Therefore you should be aware that any key parameter you pass to libguestfs "
36295 "might end up being written out to the swap partition. If this is a concern, "
36296 "scrub the swap partition or don't use libguestfs on encrypted devices."
36300 #: ../src/guestfs.pod:919
36301 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
36305 #: ../src/guestfs.pod:921
36307 "All high-level libguestfs actions are synchronous. If you want to use "
36308 "libguestfs asynchronously then you must create a thread."
36312 #: ../src/guestfs.pod:924
36314 "Only use the handle from a single thread. Either use the handle exclusively "
36315 "from one thread, or provide your own mutex so that two threads cannot issue "
36316 "calls on the same handle at the same time."
36320 #: ../src/guestfs.pod:928
36322 "See the graphical program guestfs-browser for one possible architecture for "
36323 "multithreaded programs using libvirt and libguestfs."
36327 #: ../src/guestfs.pod:931
36332 #: ../src/guestfs.pod:933
36334 "Libguestfs needs a supermin appliance, which it finds by looking along an "
36339 #: ../src/guestfs.pod:936
36341 "By default it looks for these in the directory C<$libdir/guestfs> "
36342 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
36346 #: ../src/guestfs.pod:939
36348 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
36349 "to change the directories that libguestfs will search in. The value is a "
36350 "colon-separated list of paths. The current directory is I<not> searched "
36351 "unless the path contains an empty element or C<.>. For example "
36352 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
36353 "then C</usr/lib/guestfs>."
36357 #: ../src/guestfs.pod:946
36358 msgid "QEMU WRAPPERS"
36362 #: ../src/guestfs.pod:948
36364 "If you want to compile your own qemu, run qemu from a non-standard location, "
36365 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
36370 #: ../src/guestfs.pod:952
36372 "There is one important rule to remember: you I<must C<exec qemu>> as the "
36373 "last command in the shell script (so that qemu replaces the shell and "
36374 "becomes the direct child of the libguestfs-using program). If you don't do "
36375 "this, then the qemu process won't be cleaned up correctly."
36379 #: ../src/guestfs.pod:957
36381 "Here is an example of a wrapper, where I have built my own copy of qemu from "
36386 #: ../src/guestfs.pod:960
36390 " qemudir=/home/rjones/d/qemu\n"
36391 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
36397 #: ../src/guestfs.pod:964
36399 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
36400 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
36405 #: ../src/guestfs.pod:968
36408 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
36413 #: ../src/guestfs.pod:970
36415 "Note that libguestfs also calls qemu with the -help and -version options in "
36416 "order to determine features."
36420 #: ../src/guestfs.pod:973
36422 "Wrappers can also be used to edit the options passed to qemu. In the "
36423 "following example, the C<-machine ...> option (C<-machine> and the following "
36424 "argument) are removed from the command line and replaced with C<-machine "
36425 "pc,accel=tcg>. The while loop iterates over the options until it finds the "
36426 "right one to remove, putting the remaining options into the C<args> array."
36430 #: ../src/guestfs.pod:982
36434 " while [ $# -gt 0 ]; do\n"
36435 " case \"$1\" in\n"
36439 " args[i]=\"$1\"\n"
36448 #: ../src/guestfs.pod:994
36451 " exec qemu-kvm -machine pc,accel=tcg \"${args[@]}\"\n"
36456 #: ../src/guestfs.pod:996
36457 msgid "ATTACHING TO RUNNING DAEMONS"
36461 #: ../src/guestfs.pod:998
36463 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
36464 "babies. Use with caution."
36468 #: ../src/guestfs.pod:1001
36470 "I<Note (2):> This section explains how to attach to a running daemon from a "
36471 "low level perspective. For most users, simply using virt tools such as "
36472 "L<guestfish(1)> with the I<--live> option will \"just work\"."
36476 #: ../src/guestfs.pod:1005
36477 msgid "Using guestfs_set_attach_method"
36481 #: ../src/guestfs.pod:1007
36483 "By calling L</guestfs_set_attach_method> you can change how the library "
36484 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read "
36485 "L</ARCHITECTURE> for some background)."
36489 #: ../src/guestfs.pod:1011
36491 "The normal attach method is C<appliance>, where a small appliance is created "
36492 "containing the daemon, and then the library connects to this."
36496 #: ../src/guestfs.pod:1014
36498 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
36499 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
36500 "daemon over the Unix domain socket."
36504 #: ../src/guestfs.pod:1018
36506 "The normal use for this is to connect to a running virtual machine that "
36507 "contains a C<guestfsd> daemon, and send commands so you can read and write "
36508 "files inside the live virtual machine."
36512 #: ../src/guestfs.pod:1022
36513 msgid "Using guestfs_add_domain with live flag"
36517 #: ../src/guestfs.pod:1024
36519 "L</guestfs_add_domain> provides some help for getting the correct attach "
36520 "method. If you pass the C<live> option to this function, then (if the "
36521 "virtual machine is running) it will examine the libvirt XML looking for a "
36522 "virtio-serial channel to connect to:"
36526 #: ../src/guestfs.pod:1030
36533 " <channel type='unix'>\n"
36534 " <source mode='bind' path='/path/to/socket'/>\n"
36535 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
36544 #: ../src/guestfs.pod:1042
36546 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
36547 "method to C<unix:/path/to/socket>."
36551 #: ../src/guestfs.pod:1045
36553 "Some of the libguestfs tools (including guestfish) support a I<--live> "
36554 "option which is passed through to L</guestfs_add_domain> thus allowing you "
36555 "to attach to and modify live virtual machines."
36559 #: ../src/guestfs.pod:1049
36561 "The virtual machine needs to have been set up beforehand so that it has the "
36562 "virtio-serial channel and so that guestfsd is running inside it."
36566 #: ../src/guestfs.pod:1053
36567 msgid "ABI GUARANTEE"
36571 #: ../src/guestfs.pod:1055
36573 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
36574 "actions as outlined in this section. Although we will deprecate some "
36575 "actions, for example if they get replaced by newer calls, we will keep the "
36576 "old actions forever. This allows you the developer to program in confidence "
36577 "against the libguestfs API."
36581 #: ../src/guestfs.pod:1061
36582 msgid "BLOCK DEVICE NAMING"
36586 #: ../src/guestfs.pod:1063
36588 "In the kernel there is now quite a profusion of schemata for naming block "
36589 "devices (in this context, by I<block device> I mean a physical or virtual "
36590 "hard drive). The original Linux IDE driver used names starting with "
36591 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
36592 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
36593 "replacement for the old IDE driver (particularly for SATA devices) those "
36594 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
36595 "machines with paravirtualized drivers. This has created several different "
36596 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
36601 #: ../src/guestfs.pod:1075
36603 "As discussed above, libguestfs uses a qemu appliance running an embedded "
36604 "Linux kernel to access block devices. We can run a variety of appliances "
36605 "based on a variety of Linux kernels."
36609 #: ../src/guestfs.pod:1079
36611 "This causes a problem for libguestfs because many API calls use device or "
36612 "partition names. Working scripts and the recipe (example) scripts that we "
36613 "make available over the internet could fail if the naming scheme changes."
36617 #: ../src/guestfs.pod:1084
36619 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
36620 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
36621 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
36622 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
36626 #: ../src/guestfs.pod:1090
36628 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
36629 "L</guestfs_list_partitions> and similar calls return the true names of the "
36630 "devices and partitions as known to the appliance."
36634 #: ../src/guestfs.pod:1095
36635 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
36639 #: ../src/guestfs.pod:1097
36641 "Usually this translation is transparent. However in some (very rare) cases "
36642 "you may need to know the exact algorithm. Such cases include where you use "
36643 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
36644 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
36649 #: ../src/guestfs.pod:1103
36651 "The algorithm is applied only to I<parameters> which are known to be either "
36652 "device or partition names. Return values from functions such as "
36653 "L</guestfs_list_devices> are never changed."
36657 #: ../src/guestfs.pod:1111
36658 msgid "Is the string a parameter which is a device or partition name?"
36662 #: ../src/guestfs.pod:1115
36663 msgid "Does the string begin with C</dev/sd>?"
36667 #: ../src/guestfs.pod:1119
36669 "Does the named device exist? If so, we use that device. However if I<not> "
36670 "then we continue with this algorithm."
36674 #: ../src/guestfs.pod:1124
36675 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
36679 #: ../src/guestfs.pod:1126
36680 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
36684 #: ../src/guestfs.pod:1128
36685 msgid "If that named device exists, use it. If not, continue."
36689 #: ../src/guestfs.pod:1132
36690 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
36694 #: ../src/guestfs.pod:1134
36695 msgid "If that named device exists, use it. If not, return an error."
36699 #: ../src/guestfs.pod:1138
36700 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
36704 #: ../src/guestfs.pod:1140
36706 "Although the standard naming scheme and automatic translation is useful for "
36707 "simple programs and guestfish scripts, for larger programs it is best not to "
36708 "rely on this mechanism."
36712 #: ../src/guestfs.pod:1144
36714 "Where possible for maximum future portability programs using libguestfs "
36715 "should use these future-proof techniques:"
36719 #: ../src/guestfs.pod:1151
36721 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
36722 "device names, and then use those names directly."
36726 #: ../src/guestfs.pod:1154
36727 msgid "Since those device names exist by definition, they will never be translated."
36731 #: ../src/guestfs.pod:1159
36733 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
36734 "filesystem labels."
36738 #: ../src/guestfs.pod:1166
36740 "This section discusses security implications of using libguestfs, "
36741 "particularly with untrusted or malicious guests or disk images."
36745 #: ../src/guestfs.pod:1169
36746 msgid "GENERAL SECURITY CONSIDERATIONS"
36750 #: ../src/guestfs.pod:1171
36752 "Be careful with any files or data that you download from a guest (by "
36753 "\"download\" we mean not just the L</guestfs_download> command but any "
36754 "command that reads files, filenames, directories or anything else from a "
36755 "disk image). An attacker could manipulate the data to fool your program "
36756 "into doing the wrong thing. Consider cases such as:"
36760 #: ../src/guestfs.pod:1181
36761 msgid "the data (file etc) not being present"
36765 #: ../src/guestfs.pod:1185
36766 msgid "being present but empty"
36770 #: ../src/guestfs.pod:1189
36771 msgid "being much larger than normal"
36775 #: ../src/guestfs.pod:1193
36776 msgid "containing arbitrary 8 bit data"
36780 #: ../src/guestfs.pod:1197
36781 msgid "being in an unexpected character encoding"
36785 #: ../src/guestfs.pod:1201
36786 msgid "containing homoglyphs."
36790 #: ../src/guestfs.pod:1205
36791 msgid "SECURITY OF MOUNTING FILESYSTEMS"
36795 #: ../src/guestfs.pod:1207
36797 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
36798 "(VFS) module can sometimes be escalated into exploits by deliberately "
36799 "creating a malicious, malformed filesystem. These exploits are very severe "
36800 "for two reasons. Firstly there are very many filesystem drivers in the "
36801 "kernel, and many of them are infrequently used and not much developer "
36802 "attention has been paid to the code. Linux userspace helps potential "
36803 "crackers by detecting the filesystem type and automatically choosing the "
36804 "right VFS driver, even if that filesystem type is obscure or unexpected for "
36805 "the administrator. Secondly, a kernel-level exploit is like a local root "
36806 "exploit (worse in some ways), giving immediate and total access to the "
36807 "system right down to the hardware level."
36811 #: ../src/guestfs.pod:1220
36813 "That explains why you should never mount a filesystem from an untrusted "
36814 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
36815 "inside a qemu virtual machine, usually running as a non-root user. The "
36816 "attacker would need to write a filesystem which first exploited the kernel, "
36817 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
36818 "the libguestfs protocol, and finally to be as serious as the host kernel "
36819 "exploit it would need to escalate its privileges to root. This multi-step "
36820 "escalation, performed by a static piece of data, is thought to be extremely "
36821 "hard to do, although we never say 'never' about security issues."
36825 #: ../src/guestfs.pod:1231
36827 "In any case callers can reduce the attack surface by forcing the filesystem "
36828 "type when mounting (use L</guestfs_mount_vfs>)."
36832 #: ../src/guestfs.pod:1234
36833 msgid "PROTOCOL SECURITY"
36837 #: ../src/guestfs.pod:1236
36839 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
36840 "defined upper message size. However a program that uses libguestfs must "
36841 "also take care - for example you can write a program that downloads a binary "
36842 "from a disk image and executes it locally, and no amount of protocol "
36843 "security will save you from the consequences."
36847 #: ../src/guestfs.pod:1242
36848 msgid "INSPECTION SECURITY"
36852 #: ../src/guestfs.pod:1244
36854 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
36855 "directly from the guest, and these could contain any 8 bit data. Callers "
36856 "should be careful to escape these before printing them to a structured file "
36857 "(for example, use HTML escaping if creating a web page)."
36861 #: ../src/guestfs.pod:1250
36863 "Guest configuration may be altered in unusual ways by the administrator of "
36864 "the virtual machine, and may not reflect reality (particularly for untrusted "
36865 "or actively malicious guests). For example we parse the hostname from "
36866 "configuration files like C</etc/sysconfig/network> that we find in the "
36867 "guest, but the guest administrator can easily manipulate these files to "
36868 "provide the wrong hostname."
36872 #: ../src/guestfs.pod:1258
36874 "The inspection API parses guest configuration using two external libraries: "
36875 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
36876 "designed to be robust in the face of malicious data, although denial of "
36877 "service attacks are still possible, for example with oversized configuration "
36882 #: ../src/guestfs.pod:1264
36883 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
36887 #: ../src/guestfs.pod:1266
36889 "Be very cautious about running commands from the guest. By running a "
36890 "command in the guest, you are giving CPU time to a binary that you do not "
36891 "control, under the same user account as the library, albeit wrapped in qemu "
36892 "virtualization. More information and alternatives can be found in the "
36893 "section L</RUNNING COMMANDS>."
36897 #: ../src/guestfs.pod:1272
36898 msgid "CVE-2010-3851"
36902 #: ../src/guestfs.pod:1274
36903 msgid "https://bugzilla.redhat.com/642934"
36907 #: ../src/guestfs.pod:1276
36909 "This security bug concerns the automatic disk format detection that qemu "
36910 "does on disk images."
36914 #: ../src/guestfs.pod:1279
36916 "A raw disk image is just the raw bytes, there is no header. Other disk "
36917 "images like qcow2 contain a special header. Qemu deals with this by looking "
36918 "for one of the known headers, and if none is found then assuming the disk "
36919 "image must be raw."
36923 #: ../src/guestfs.pod:1284
36925 "This allows a guest which has been given a raw disk image to write some "
36926 "other header. At next boot (or when the disk image is accessed by "
36927 "libguestfs) qemu would do autodetection and think the disk image format was, "
36928 "say, qcow2 based on the header written by the guest."
36932 #: ../src/guestfs.pod:1289
36934 "This in itself would not be a problem, but qcow2 offers many features, one "
36935 "of which is to allow a disk image to refer to another image (called the "
36936 "\"backing disk\"). It does this by placing the path to the backing disk "
36937 "into the qcow2 header. This path is not validated and could point to any "
36938 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
36939 "\"holes\" in the qcow2 disk image, which of course is completely under the "
36940 "control of the attacker."
36944 #: ../src/guestfs.pod:1297
36945 msgid "In libguestfs this is rather hard to exploit except under two circumstances:"
36949 #: ../src/guestfs.pod:1304
36950 msgid "You have enabled the network or have opened the disk in write mode."
36954 #: ../src/guestfs.pod:1308
36956 "You are also running untrusted code from the guest (see L</RUNNING "
36961 #: ../src/guestfs.pod:1313
36963 "The way to avoid this is to specify the expected disk format when adding "
36964 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
36965 "should always do this if the disk is raw format, and it's a good idea for "
36970 #: ../src/guestfs.pod:1318
36972 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
36973 "format is fetched from libvirt and passed through."
36977 #: ../src/guestfs.pod:1321
36979 "For libguestfs tools, use the I<--format> command line parameter as "
36984 #: ../src/guestfs.pod:1324
36985 msgid "CONNECTION MANAGEMENT"
36989 #: ../src/guestfs.pod:1326
36990 msgid "guestfs_h *"
36994 #: ../src/guestfs.pod:1328
36996 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
36997 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
36998 "handle and release all resources used."
37002 #: ../src/guestfs.pod:1332
37004 "For information on using multiple handles and threads, see the section "
37005 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> above."
37009 #: ../src/guestfs.pod:1335
37010 msgid "guestfs_create"
37014 #: ../src/guestfs.pod:1337
37017 " guestfs_h *guestfs_create (void);\n"
37022 #: ../src/guestfs.pod:1339
37023 msgid "Create a connection handle."
37027 #: ../src/guestfs.pod:1341
37029 "On success this returns a non-NULL pointer to a handle. On error it returns "
37034 #: ../src/guestfs.pod:1344
37036 "You have to \"configure\" the handle after creating it. This includes "
37037 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
37038 "handle at least once."
37042 #: ../src/guestfs.pod:1348
37043 msgid "After configuring the handle, you have to call L</guestfs_launch>."
37047 #: ../src/guestfs.pod:1350
37049 "You may also want to configure error handling for the handle. See the "
37050 "L</ERROR HANDLING> section below."
37054 #: ../src/guestfs.pod:1353
37055 msgid "guestfs_close"
37059 #: ../src/guestfs.pod:1355
37062 " void guestfs_close (guestfs_h *g);\n"
37067 #: ../src/guestfs.pod:1357
37068 msgid "This closes the connection handle and frees up all resources used."
37072 #: ../src/guestfs.pod:1359
37074 "If autosync was set on the handle and the handle was launched, then this "
37075 "implicitly calls various functions to unmount filesystems and sync the "
37076 "disk. See L</guestfs_set_autosync> for more details."
37080 #: ../src/guestfs.pod:1363
37081 msgid "If a close callback was set on the handle, then it is called."
37085 #: ../src/guestfs.pod:1365
37086 msgid "ERROR HANDLING"
37090 #: ../src/guestfs.pod:1367
37092 "API functions can return errors. For example, almost all functions that "
37093 "return C<int> will return C<-1> to indicate an error."
37097 #: ../src/guestfs.pod:1370
37099 "Additional information is available for errors: an error message string and "
37100 "optionally an error number (errno) if the thing that failed was a system "
37105 #: ../src/guestfs.pod:1374
37107 "You can get at the additional information about the last error on the handle "
37108 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
37109 "up an error handler with L</guestfs_set_error_handler>."
37113 #: ../src/guestfs.pod:1379
37115 "When the handle is created, a default error handler is installed which "
37116 "prints the error message string to C<stderr>. For small short-running "
37117 "command line programs it is sufficient to do:"
37121 #: ../src/guestfs.pod:1383
37124 " if (guestfs_launch (g) == -1)\n"
37125 " exit (EXIT_FAILURE);\n"
37130 #: ../src/guestfs.pod:1386
37132 "since the default error handler will ensure that an error message has been "
37133 "printed to C<stderr> before the program exits."
37137 #: ../src/guestfs.pod:1389
37139 "For other programs the caller will almost certainly want to install an "
37140 "alternate error handler or do error handling in-line like this:"
37144 #: ../src/guestfs.pod:1392
37147 " /* This disables the default behaviour of printing errors\n"
37149 " guestfs_set_error_handler (g, NULL, NULL);\n"
37154 #: ../src/guestfs.pod:1396
37157 " if (guestfs_launch (g) == -1) {\n"
37158 " /* Examine the error message and print it etc. */\n"
37159 " char *msg = guestfs_last_error (g);\n"
37160 " int errnum = guestfs_last_errno (g);\n"
37161 " fprintf (stderr, \"%s\", msg);\n"
37162 " if (errnum != 0)\n"
37163 " fprintf (stderr, \": %s\", strerror (errnum));\n"
37164 " fprintf (stderr, \"\\n\");\n"
37171 #: ../src/guestfs.pod:1407
37173 "Out of memory errors are handled differently. The default action is to call "
37174 "L<abort(3)>. If this is undesirable, then you can set a handler using "
37175 "L</guestfs_set_out_of_memory_handler>."
37179 #: ../src/guestfs.pod:1411
37181 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
37182 "because there is no handle if this happens there is no way to get additional "
37183 "error information. However L</guestfs_create> is supposed to be a "
37184 "lightweight operation which can only fail because of insufficient memory (it "
37185 "returns NULL in this case)."
37189 #: ../src/guestfs.pod:1417
37190 msgid "guestfs_last_error"
37194 #: ../src/guestfs.pod:1419
37197 " const char *guestfs_last_error (guestfs_h *g);\n"
37202 #: ../src/guestfs.pod:1421
37204 "This returns the last error message that happened on C<g>. If there has not "
37205 "been an error since the handle was created, then this returns C<NULL>."
37209 #: ../src/guestfs.pod:1425
37211 "The lifetime of the returned string is until the next error occurs, or "
37212 "L</guestfs_close> is called."
37216 #: ../src/guestfs.pod:1428
37217 msgid "guestfs_last_errno"
37221 #: ../src/guestfs.pod:1430
37224 " int guestfs_last_errno (guestfs_h *g);\n"
37229 #: ../src/guestfs.pod:1432
37230 msgid "This returns the last error number (errno) that happened on C<g>."
37234 #: ../src/guestfs.pod:1434
37235 msgid "If successful, an errno integer not equal to zero is returned."
37239 #: ../src/guestfs.pod:1436
37240 msgid "If no error, this returns 0. This call can return 0 in three situations:"
37244 #: ../src/guestfs.pod:1443
37245 msgid "There has not been any error on the handle."
37249 #: ../src/guestfs.pod:1447
37251 "There has been an error but the errno was meaningless. This corresponds to "
37252 "the case where the error did not come from a failed system call, but for "
37253 "some other reason."
37257 #: ../src/guestfs.pod:1453
37259 "There was an error from a failed system call, but for some reason the errno "
37260 "was not captured and returned. This usually indicates a bug in libguestfs."
37264 #: ../src/guestfs.pod:1459
37266 "Libguestfs tries to convert the errno from inside the applicance into a "
37267 "corresponding errno for the caller (not entirely trivial: the appliance "
37268 "might be running a completely different operating system from the library "
37269 "and error numbers are not standardized across Un*xen). If this could not be "
37270 "done, then the error is translated to C<EINVAL>. In practice this should "
37271 "only happen in very rare circumstances."
37275 #: ../src/guestfs.pod:1467
37276 msgid "guestfs_set_error_handler"
37280 #: ../src/guestfs.pod:1469
37283 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
37285 " const char *msg);\n"
37286 " void guestfs_set_error_handler (guestfs_h *g,\n"
37287 " guestfs_error_handler_cb cb,\n"
37288 " void *opaque);\n"
37293 #: ../src/guestfs.pod:1476
37295 "The callback C<cb> will be called if there is an error. The parameters "
37296 "passed to the callback are an opaque data pointer and the error message "
37301 #: ../src/guestfs.pod:1480
37303 "C<errno> is not passed to the callback. To get that the callback must call "
37304 "L</guestfs_last_errno>."
37308 #: ../src/guestfs.pod:1483
37310 "Note that the message string C<msg> is freed as soon as the callback "
37311 "function returns, so if you want to stash it somewhere you must make your "
37316 #: ../src/guestfs.pod:1487
37317 msgid "The default handler prints messages on C<stderr>."
37321 #: ../src/guestfs.pod:1489
37322 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
37326 #: ../src/guestfs.pod:1491
37327 msgid "guestfs_get_error_handler"
37331 #: ../src/guestfs.pod:1493
37334 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
37335 " void **opaque_rtn);\n"
37340 #: ../src/guestfs.pod:1496
37341 msgid "Returns the current error handler callback."
37345 #: ../src/guestfs.pod:1498
37346 msgid "guestfs_set_out_of_memory_handler"
37350 #: ../src/guestfs.pod:1500
37353 " typedef void (*guestfs_abort_cb) (void);\n"
37354 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
37355 " guestfs_abort_cb);\n"
37360 #: ../src/guestfs.pod:1504
37362 "The callback C<cb> will be called if there is an out of memory situation. "
37363 "I<Note this callback must not return>."
37367 #: ../src/guestfs.pod:1507
37368 msgid "The default is to call L<abort(3)>."
37372 #: ../src/guestfs.pod:1509
37373 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
37377 #: ../src/guestfs.pod:1512
37378 msgid "guestfs_get_out_of_memory_handler"
37382 #: ../src/guestfs.pod:1514
37385 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
37390 #: ../src/guestfs.pod:1516
37391 msgid "This returns the current out of memory handler."
37395 #: ../src/guestfs.pod:1518
37400 #: ../src/guestfs.pod:1522
37405 #: ../src/guestfs.pod:1524
37410 #: ../src/guestfs.pod:1526
37411 msgid "AVAILABILITY"
37415 #: ../src/guestfs.pod:1528
37416 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
37420 #: ../src/guestfs.pod:1530
37422 "Using L</guestfs_available> you can test availability of the following "
37423 "groups of functions. This test queries the appliance to see if the "
37424 "appliance you are currently using supports the functionality."
37428 #: ../src/guestfs.pod:1535
37429 msgid "@AVAILABILITY@"
37433 #: ../src/guestfs.pod:1537
37434 msgid "GUESTFISH supported COMMAND"
37438 #: ../src/guestfs.pod:1539
37440 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
37441 "prints out the available groups and whether they are supported by this build "
37442 "of libguestfs. Note however that you have to do C<run> first."
37446 #: ../src/guestfs.pod:1544
37447 msgid "SINGLE CALLS AT COMPILE TIME"
37451 #: ../src/guestfs.pod:1546
37453 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
37454 "function, such as:"
37458 #: ../src/guestfs.pod:1549
37461 " #define LIBGUESTFS_HAVE_DD 1\n"
37466 #: ../src/guestfs.pod:1551
37467 msgid "if L</guestfs_dd> is available."
37471 #: ../src/guestfs.pod:1553
37473 "Before version 1.5.8, if you needed to test whether a single libguestfs "
37474 "function is available at compile time, we recommended using build tools such "
37475 "as autoconf or cmake. For example in autotools you could use:"
37479 #: ../src/guestfs.pod:1558
37482 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
37483 " AC_CHECK_FUNCS([guestfs_dd])\n"
37488 #: ../src/guestfs.pod:1561
37490 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
37495 #: ../src/guestfs.pod:1564
37496 msgid "SINGLE CALLS AT RUN TIME"
37500 #: ../src/guestfs.pod:1566
37502 "Testing at compile time doesn't guarantee that a function really exists in "
37503 "the library. The reason is that you might be dynamically linked against a "
37504 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
37505 "This situation unfortunately results in a segmentation fault, which is a "
37506 "shortcoming of the C dynamic linking system itself."
37510 #: ../src/guestfs.pod:1573
37512 "You can use L<dlopen(3)> to test if a function is available at run time, as "
37513 "in this example program (note that you still need the compile time check as "
37518 #: ../src/guestfs.pod:1577
37521 " #include <stdio.h>\n"
37522 " #include <stdlib.h>\n"
37523 " #include <unistd.h>\n"
37524 " #include <dlfcn.h>\n"
37525 " #include <guestfs.h>\n"
37530 #: ../src/guestfs.pod:1583
37535 " #ifdef LIBGUESTFS_HAVE_DD\n"
37537 " int has_function;\n"
37542 #: ../src/guestfs.pod:1589
37545 " /* Test if the function guestfs_dd is really available. */\n"
37546 " dl = dlopen (NULL, RTLD_LAZY);\n"
37548 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
37549 " exit (EXIT_FAILURE);\n"
37551 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
37557 #: ../src/guestfs.pod:1598
37560 " if (!has_function)\n"
37561 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
37563 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
37564 " /* Now it's safe to call\n"
37565 " guestfs_dd (g, \"foo\", \"bar\");\n"
37569 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
37576 #: ../src/guestfs.pod:1611
37578 "You may think the above is an awful lot of hassle, and it is. There are "
37579 "other ways outside of the C linking system to ensure that this kind of "
37580 "incompatibility never arises, such as using package versioning:"
37584 #: ../src/guestfs.pod:1616
37587 " Requires: libguestfs >= 1.0.80\n"
37592 #: ../src/guestfs.pod:1618
37593 msgid "CALLS WITH OPTIONAL ARGUMENTS"
37597 #: ../src/guestfs.pod:1620
37599 "A recent feature of the API is the introduction of calls which take optional "
37600 "arguments. In C these are declared 3 ways. The main way is as a call which "
37601 "takes variable arguments (ie. C<...>), as in this example:"
37605 #: ../src/guestfs.pod:1625
37608 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
37613 #: ../src/guestfs.pod:1627
37615 "Call this with a list of optional arguments, terminated by C<-1>. So to "
37616 "call with no optional arguments specified:"
37620 #: ../src/guestfs.pod:1630
37623 " guestfs_add_drive_opts (g, filename, -1);\n"
37628 #: ../src/guestfs.pod:1632
37629 msgid "With a single optional argument:"
37633 #: ../src/guestfs.pod:1634
37636 " guestfs_add_drive_opts (g, filename,\n"
37637 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37643 #: ../src/guestfs.pod:1638
37648 #: ../src/guestfs.pod:1640
37651 " guestfs_add_drive_opts (g, filename,\n"
37652 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37653 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
37659 #: ../src/guestfs.pod:1645
37661 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
37666 #: ../src/guestfs.pod:1648
37667 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
37671 #: ../src/guestfs.pod:1650
37673 "The second variant has the same name with the suffix C<_va>, which works the "
37674 "same way but takes a C<va_list>. See the C manual for details. For the "
37675 "example function, this is declared:"
37679 #: ../src/guestfs.pod:1654
37682 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
37683 " va_list args);\n"
37688 #: ../src/guestfs.pod:1657
37689 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
37693 #: ../src/guestfs.pod:1659
37695 "The third variant is useful where you need to construct these calls. You "
37696 "pass in a structure where you fill in the optional fields. The structure "
37697 "has a bitmask as the first element which you must set to indicate which "
37698 "fields you have filled in. For our example function the structure and call "
37703 #: ../src/guestfs.pod:1665
37706 " struct guestfs_add_drive_opts_argv {\n"
37707 " uint64_t bitmask;\n"
37709 " const char *format;\n"
37712 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
37713 " const struct guestfs_add_drive_opts_argv *optargs);\n"
37718 #: ../src/guestfs.pod:1674
37719 msgid "You could call it like this:"
37723 #: ../src/guestfs.pod:1676
37726 " struct guestfs_add_drive_opts_argv optargs = {\n"
37727 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
37728 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
37729 " .readonly = 1,\n"
37730 " .format = \"qcow2\"\n"
37736 #: ../src/guestfs.pod:1683
37739 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
37744 #: ../src/guestfs.pod:1691
37745 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
37749 #: ../src/guestfs.pod:1696
37750 msgid "You do not need to fill in all fields of the structure."
37754 #: ../src/guestfs.pod:1700
37756 "There must be a one-to-one correspondence between fields of the structure "
37757 "that are filled in, and bits set in the bitmask."
37761 #: ../src/guestfs.pod:1705
37762 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
37766 #: ../src/guestfs.pod:1707
37768 "In other languages, optional arguments are expressed in the way that is "
37769 "natural for that language. We refer you to the language-specific "
37770 "documentation for more details on that."
37774 #: ../src/guestfs.pod:1711
37775 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
37779 #: ../src/guestfs.pod:1713
37780 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
37784 #: ../src/guestfs.pod:1715
37786 "B<Note:> This section documents the generic event mechanism introduced in "
37787 "libguestfs 1.10, which you should use in new code if possible. The old "
37788 "functions C<guestfs_set_log_message_callback>, "
37789 "C<guestfs_set_subprocess_quit_callback>, "
37790 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
37791 "C<guestfs_set_progress_callback> are no longer documented in this manual "
37792 "page. Because of the ABI guarantee, the old functions continue to work."
37796 #: ../src/guestfs.pod:1724
37798 "Handles generate events when certain things happen, such as log messages "
37799 "being generated, progress messages during long-running operations, or the "
37800 "handle being closed. The API calls described below let you register a "
37801 "callback to be called when events happen. You can register multiple "
37802 "callbacks (for the same, different or overlapping sets of events), and "
37803 "individually remove callbacks. If callbacks are not removed, then they "
37804 "remain in force until the handle is closed."
37808 #: ../src/guestfs.pod:1732
37810 "In the current implementation, events are only generated synchronously: that "
37811 "means that events (and hence callbacks) can only happen while you are in the "
37812 "middle of making another libguestfs call. The callback is called in the "
37817 #: ../src/guestfs.pod:1737
37819 "Events may contain a payload, usually nothing (void), an array of 64 bit "
37820 "unsigned integers, or a message buffer. Payloads are discussed later on."
37824 #: ../src/guestfs.pod:1741
37825 msgid "CLASSES OF EVENTS"
37829 #: ../src/guestfs.pod:1745
37830 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
37834 #: ../src/guestfs.pod:1748
37836 "The callback function will be called while the handle is being closed "
37837 "(synchronously from L</guestfs_close>)."
37841 #: ../src/guestfs.pod:1751
37843 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
37844 "handles that are open when the program exits. This means that this callback "
37845 "might be called indirectly from L<exit(3)>, which can cause unexpected "
37846 "problems in higher-level languages (eg. if your HLL interpreter has already "
37847 "been cleaned up by the time this is called, and if your callback then jumps "
37848 "into some HLL function)."
37852 #: ../src/guestfs.pod:1758
37854 "If no callback is registered: the handle is closed without any callback "
37859 #: ../src/guestfs.pod:1761
37860 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
37864 #: ../src/guestfs.pod:1764
37866 "The callback function will be called when the child process quits, either "
37867 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
37868 "corresponds to a transition from any state to the CONFIG state)."
37872 #: ../src/guestfs.pod:1768 ../src/guestfs.pod:1777 ../src/guestfs.pod:1894
37873 msgid "If no callback is registered: the event is ignored."
37877 #: ../src/guestfs.pod:1770
37878 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
37882 #: ../src/guestfs.pod:1773
37884 "The callback function will be called when the child process becomes ready "
37885 "first time after it has been launched. (This corresponds to a transition "
37886 "from LAUNCHING to the READY state)."
37890 #: ../src/guestfs.pod:1779
37891 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
37895 #: ../src/guestfs.pod:1782
37897 "Some long-running operations can generate progress messages. If this "
37898 "callback is registered, then it will be called each time a progress message "
37899 "is generated (usually two seconds after the operation started, and three "
37900 "times per second thereafter until it completes, although the frequency may "
37901 "change in future versions)."
37905 #: ../src/guestfs.pod:1788
37907 "The callback receives in the payload four unsigned 64 bit numbers which are "
37908 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
37912 #: ../src/guestfs.pod:1791
37914 "The units of C<total> are not defined, although for some operations C<total> "
37915 "may relate in some way to the amount of data to be transferred (eg. in bytes "
37916 "or megabytes), and C<position> may be the portion which has been "
37921 #: ../src/guestfs.pod:1796
37922 msgid "The only defined and stable parts of the API are:"
37926 #: ../src/guestfs.pod:1802
37928 "The callback can display to the user some type of progress bar or indicator "
37929 "which shows the ratio of C<position>:C<total>."
37933 #: ../src/guestfs.pod:1807
37934 msgid "0 E<lt>= C<position> E<lt>= C<total>"
37938 #: ../src/guestfs.pod:1811
37940 "If any progress notification is sent during a call, then a final progress "
37941 "notification is always sent when C<position> = C<total> (I<unless> the call "
37942 "fails with an error)."
37946 #: ../src/guestfs.pod:1815
37948 "This is to simplify caller code, so callers can easily set the progress "
37949 "indicator to \"100%\" at the end of the operation, without requiring special "
37950 "code to detect this case."
37954 #: ../src/guestfs.pod:1821
37956 "For some calls we are unable to estimate the progress of the call, but we "
37957 "can still generate progress messages to indicate activity. This is known as "
37958 "\"pulse mode\", and is directly supported by certain progress bar "
37959 "implementations (eg. GtkProgressBar)."
37963 #: ../src/guestfs.pod:1826
37965 "For these calls, zero or more progress messages are generated with "
37966 "C<position = 0> and C<total = 1>, followed by a final message with "
37967 "C<position = total = 1>."
37971 #: ../src/guestfs.pod:1830
37973 "As noted above, if the call fails with an error then the final message may "
37974 "not be generated."
37978 #: ../src/guestfs.pod:1835
37980 "The callback also receives the procedure number (C<proc_nr>) and serial "
37981 "number (C<serial>) of the call. These are only useful for debugging "
37982 "protocol issues, and the callback can normally ignore them. The callback "
37983 "may want to print these numbers in error messages or debugging messages."
37987 #: ../src/guestfs.pod:1841
37988 msgid "If no callback is registered: progress messages are discarded."
37992 #: ../src/guestfs.pod:1843
37993 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
37997 #: ../src/guestfs.pod:1846
37999 "The callback function is called whenever a log message is generated by qemu, "
38000 "the appliance kernel, guestfsd (daemon), or utility programs."
38004 #: ../src/guestfs.pod:1849
38006 "If the verbose flag (L</guestfs_set_verbose>) is set before launch "
38007 "(L</guestfs_launch>) then additional debug messages are generated."
38011 #: ../src/guestfs.pod:1852 ../src/guestfs.pod:1866
38013 "If no callback is registered: the messages are discarded unless the verbose "
38014 "flag is set in which case they are sent to stderr. You can override the "
38015 "printing of verbose messages to stderr by setting up a callback."
38019 #: ../src/guestfs.pod:1857
38020 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
38024 #: ../src/guestfs.pod:1860
38026 "The callback function is called whenever a log message is generated by the "
38027 "library part of libguestfs."
38031 #: ../src/guestfs.pod:1863
38033 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
38034 "messages are generated."
38038 #: ../src/guestfs.pod:1871
38039 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
38043 #: ../src/guestfs.pod:1874
38045 "The callback function is called whenever a trace message is generated. This "
38046 "only applies if the trace flag (L</guestfs_set_trace>) is set."
38050 #: ../src/guestfs.pod:1877
38052 "If no callback is registered: the messages are sent to stderr. You can "
38053 "override the printing of trace messages to stderr by setting up a callback."
38057 #: ../src/guestfs.pod:1881
38058 msgid "GUESTFS_EVENT_ENTER (payload type: function name)"
38062 #: ../src/guestfs.pod:1884
38063 msgid "The callback function is called whenever a libguestfs function is entered."
38067 #: ../src/guestfs.pod:1887
38069 "The payload is a string which contains the name of the function that we are "
38070 "entering (not including C<guestfs_> prefix)."
38074 #: ../src/guestfs.pod:1890
38076 "Note that libguestfs functions can call themselves, so you may see many "
38077 "events from a single call. A few libguestfs functions do not generate this "
38082 #: ../src/guestfs.pod:1898
38083 msgid "guestfs_set_event_callback"
38087 #: ../src/guestfs.pod:1900
38090 " int guestfs_set_event_callback (guestfs_h *g,\n"
38091 " guestfs_event_callback cb,\n"
38092 " uint64_t event_bitmask,\n"
38094 " void *opaque);\n"
38099 #: ../src/guestfs.pod:1906
38101 "This function registers a callback (C<cb>) for all event classes in the "
38102 "C<event_bitmask>."
38106 #: ../src/guestfs.pod:1909
38108 "For example, to register for all log message events, you could call this "
38109 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
38110 "To register a single callback for all possible classes of events, use "
38111 "C<GUESTFS_EVENT_ALL>."
38115 #: ../src/guestfs.pod:1915
38116 msgid "C<flags> should always be passed as 0."
38120 #: ../src/guestfs.pod:1917
38122 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
38123 "it for any purpose."
38127 #: ../src/guestfs.pod:1920
38129 "The return value is the event handle (an integer) which you can use to "
38130 "delete the callback (see below)."
38134 #: ../src/guestfs.pod:1923
38136 "If there is an error, this function returns C<-1>, and sets the error in the "
38137 "handle in the usual way (see L</guestfs_last_error> etc.)"
38141 #: ../src/guestfs.pod:1926
38143 "Callbacks remain in effect until they are deleted, or until the handle is "
38148 #: ../src/guestfs.pod:1929
38150 "In the case where multiple callbacks are registered for a particular event "
38151 "class, all of the callbacks are called. The order in which multiple "
38152 "callbacks are called is not defined."
38156 #: ../src/guestfs.pod:1933
38157 msgid "guestfs_delete_event_callback"
38161 #: ../src/guestfs.pod:1935
38164 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
38169 #: ../src/guestfs.pod:1937
38171 "Delete a callback that was previously registered. C<event_handle> should be "
38172 "the integer that was returned by a previous call to "
38173 "C<guestfs_set_event_callback> on the same handle."
38177 #: ../src/guestfs.pod:1941
38178 msgid "guestfs_event_callback"
38182 #: ../src/guestfs.pod:1943
38185 " typedef void (*guestfs_event_callback) (\n"
38188 " uint64_t event,\n"
38189 " int event_handle,\n"
38191 " const char *buf, size_t buf_len,\n"
38192 " const uint64_t *array, size_t array_len);\n"
38197 #: ../src/guestfs.pod:1952
38198 msgid "This is the type of the event callback function that you have to provide."
38202 #: ../src/guestfs.pod:1955
38204 "The basic parameters are: the handle (C<g>), the opaque user pointer "
38205 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
38206 "handle, and C<flags> which in the current API you should ignore."
38210 #: ../src/guestfs.pod:1959
38212 "The remaining parameters contain the event payload (if any). Each event may "
38213 "contain a payload, which usually relates to the event class, but for future "
38214 "proofing your code should be written to handle any payload for any event "
38219 #: ../src/guestfs.pod:1964
38221 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
38222 "there is no message buffer). Note that this message buffer can contain "
38223 "arbitrary 8 bit data, including NUL bytes."
38227 #: ../src/guestfs.pod:1968
38229 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
38230 "moment this is only used for progress messages."
38234 #: ../src/guestfs.pod:1971
38235 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
38239 #: ../src/guestfs.pod:1973
38241 "One motivation for the generic event API was to allow GUI programs to "
38242 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
38243 "unconditionally to C<stderr>."
38247 #: ../src/guestfs.pod:1977
38249 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
38250 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
38251 "messages are not events; you must capture error messages separately)."
38255 #: ../src/guestfs.pod:1982
38257 "Programs have to set up a callback to capture the classes of events of "
38262 #: ../src/guestfs.pod:1985
38266 " guestfs_set_event_callback\n"
38267 " (g, message_callback,\n"
38268 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
38269 " GUESTFS_EVENT_TRACE,\n"
38270 " 0, NULL) == -1)\n"
38271 " if (eh == -1) {\n"
38272 " // handle error in the usual way\n"
38278 #: ../src/guestfs.pod:1995
38280 "The callback can then direct messages to the appropriate place. In this "
38281 "example, messages are directed to syslog:"
38285 #: ../src/guestfs.pod:1998
38289 " message_callback (\n"
38292 " uint64_t event,\n"
38293 " int event_handle,\n"
38295 " const char *buf, size_t buf_len,\n"
38296 " const uint64_t *array, size_t array_len)\n"
38298 " const int priority = LOG_USER|LOG_INFO;\n"
38299 " if (buf_len > 0)\n"
38300 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
38306 #: ../src/guestfs.pod:2013
38307 msgid "CANCELLING LONG TRANSFERS"
38311 #: ../src/guestfs.pod:2015
38313 "Some operations can be cancelled by the caller while they are in progress. "
38314 "Currently only operations that involve uploading or downloading data can be "
38315 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
38316 "parameters in the generator)."
38320 #: ../src/guestfs.pod:2020
38321 msgid "guestfs_user_cancel"
38325 #: ../src/guestfs.pod:2022
38328 " void guestfs_user_cancel (guestfs_h *g);\n"
38333 #: ../src/guestfs.pod:2024
38334 msgid "C<guestfs_user_cancel> cancels the current upload or download operation."
38338 #: ../src/guestfs.pod:2027
38340 "Unlike most other libguestfs calls, this function is signal safe and thread "
38341 "safe. You can call it from a signal handler or from another thread, without "
38342 "needing to do any locking."
38346 #: ../src/guestfs.pod:2031
38348 "The transfer that was in progress (if there is one) will stop shortly "
38349 "afterwards, and will return an error. The errno (see "
38350 "L</guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find "
38351 "out if the operation was cancelled or failed because of another error."
38355 #: ../src/guestfs.pod:2037
38357 "No cleanup is performed: for example, if a file was being uploaded then "
38358 "after cancellation there may be a partially uploaded file. It is the "
38359 "caller's responsibility to clean up if necessary."
38363 #: ../src/guestfs.pod:2041
38364 msgid "There are two common places that you might call C<guestfs_user_cancel>."
38368 #: ../src/guestfs.pod:2043
38370 "In an interactive text-based program, you might call it from a C<SIGINT> "
38371 "signal handler so that pressing C<^C> cancels the current operation. (You "
38372 "also need to call L</guestfs_set_pgroup> so that child processes don't "
38373 "receive the C<^C> signal)."
38377 #: ../src/guestfs.pod:2048
38379 "In a graphical program, when the main thread is displaying a progress bar "
38380 "with a cancel button, wire up the cancel button to call this function."
38384 #: ../src/guestfs.pod:2052
38385 msgid "PRIVATE DATA AREA"
38389 #: ../src/guestfs.pod:2054
38391 "You can attach named pieces of private data to the libguestfs handle, fetch "
38392 "them by name, and walk over them, for the lifetime of the handle. This is "
38393 "called the private data area and is only available from the C API."
38397 #: ../src/guestfs.pod:2059
38398 msgid "To attach a named piece of data, use the following call:"
38402 #: ../src/guestfs.pod:2061
38405 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
38410 #: ../src/guestfs.pod:2063
38412 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
38413 "pointer (which can be C<NULL>). Any previous item with the same key is "
38418 #: ../src/guestfs.pod:2067
38420 "You can use any C<key> you want, but your key should I<not> start with an "
38421 "underscore character. Keys beginning with an underscore character are "
38422 "reserved for internal libguestfs purposes (eg. for implementing language "
38423 "bindings). It is recommended that you prefix the key with some unique "
38424 "string to avoid collisions with other users."
38428 #: ../src/guestfs.pod:2073
38429 msgid "To retrieve the pointer, use:"
38433 #: ../src/guestfs.pod:2075
38436 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
38441 #: ../src/guestfs.pod:2077
38443 "This function returns C<NULL> if either no data is found associated with "
38444 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
38449 #: ../src/guestfs.pod:2081
38451 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
38452 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
38453 "all. In particular, libguestfs does I<not> try to free the data when the "
38454 "handle is closed. If the data must be freed, then the caller must either "
38455 "free it before calling L</guestfs_close> or must set up a close callback to "
38456 "do it (see L</GUESTFS_EVENT_CLOSE>)."
38460 #: ../src/guestfs.pod:2088
38461 msgid "To walk over all entries, use these two functions:"
38465 #: ../src/guestfs.pod:2090
38468 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
38473 #: ../src/guestfs.pod:2092
38476 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
38481 #: ../src/guestfs.pod:2094
38483 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
38484 "not have any particular meaning -- keys are not returned in any defined "
38485 "order). A pointer to the key is returned in C<*key_rtn> and the "
38486 "corresponding data pointer is returned from the function. C<NULL> is "
38487 "returned if there are no keys stored in the handle."
38491 #: ../src/guestfs.pod:2100
38493 "C<guestfs_next_private> returns the next key, pointer pair. The return "
38494 "value of this function is also C<NULL> is there are no further entries to "
38499 #: ../src/guestfs.pod:2104
38500 msgid "Notes about walking over entries:"
38504 #: ../src/guestfs.pod:2110
38505 msgid "You must not call C<guestfs_set_private> while walking over the entries."
38509 #: ../src/guestfs.pod:2115
38511 "The handle maintains an internal iterator which is reset when you call "
38512 "C<guestfs_first_private>. This internal iterator is invalidated when you "
38513 "call C<guestfs_set_private>."
38517 #: ../src/guestfs.pod:2121
38518 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
38522 #: ../src/guestfs.pod:2123
38525 " guestfs_set_private (g, key, NULL);\n"
38530 #: ../src/guestfs.pod:2125
38531 msgid "then that C<key> is not returned when walking."
38535 #: ../src/guestfs.pod:2129
38537 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
38538 "C<guestfs_next_private> or C<guestfs_set_private>."
38542 #: ../src/guestfs.pod:2135
38544 "The following example code shows how to print all keys and data pointers "
38545 "that are associated with the handle C<g>:"
38549 #: ../src/guestfs.pod:2138
38552 " const char *key;\n"
38553 " void *data = guestfs_first_private (g, &key);\n"
38554 " while (data != NULL)\n"
38556 " printf (\"key = %s, data = %p\\n\", key, data);\n"
38557 " data = guestfs_next_private (g, &key);\n"
38563 #: ../src/guestfs.pod:2146
38565 "More commonly you are only interested in keys that begin with an "
38566 "application-specific prefix C<foo_>. Modify the loop like so:"
38570 #: ../src/guestfs.pod:2149
38573 " const char *key;\n"
38574 " void *data = guestfs_first_private (g, &key);\n"
38575 " while (data != NULL)\n"
38577 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38578 " printf (\"key = %s, data = %p\\n\", key, data);\n"
38579 " data = guestfs_next_private (g, &key);\n"
38585 #: ../src/guestfs.pod:2158
38587 "If you need to modify keys while walking, then you have to jump back to the "
38588 "beginning of the loop. For example, to delete all keys prefixed with "
38593 #: ../src/guestfs.pod:2162
38596 " const char *key;\n"
38599 " data = guestfs_first_private (g, &key);\n"
38600 " while (data != NULL)\n"
38602 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38604 " guestfs_set_private (g, key, NULL);\n"
38605 " /* note that 'key' pointer is now invalid, and so is\n"
38606 " the internal iterator */\n"
38609 " data = guestfs_next_private (g, &key);\n"
38615 #: ../src/guestfs.pod:2178
38617 "Note that the above loop is guaranteed to terminate because the keys are "
38618 "being deleted, but other manipulations of keys within the loop might not "
38619 "terminate unless you also maintain an indication of which keys have been "
38624 #: ../src/guestfs.pod:2183
38629 #: ../src/guestfs.pod:2185
38631 "The libguestfs C library can be probed using systemtap or DTrace. This is "
38632 "true of any library, not just libguestfs. However libguestfs also contains "
38633 "static markers to help in probing internal operations."
38637 #: ../src/guestfs.pod:2189
38638 msgid "You can list all the static markers by doing:"
38642 #: ../src/guestfs.pod:2191
38645 " stap -l 'process(\"/usr/lib*/libguestfs.so.0\")\n"
38646 " .provider(\"guestfs\").mark(\"*\")'\n"
38651 #: ../src/guestfs.pod:2194
38653 "B<Note:> These static markers are I<not> part of the stable API and may "
38654 "change in future versions."
38658 #: ../src/guestfs.pod:2197
38659 msgid "SYSTEMTAP SCRIPT EXAMPLE"
38663 #: ../src/guestfs.pod:2199
38665 "This script contains examples of displaying both the static markers and some "
38666 "ordinary C entry points:"
38670 #: ../src/guestfs.pod:2202
38678 #: ../src/guestfs.pod:2204
38681 " function display_time () {\n"
38682 " now = gettimeofday_us ();\n"
38685 " delta = now - last;\n"
38691 #: ../src/guestfs.pod:2211
38694 " printf (\"%d (+%d):\", now, delta);\n"
38700 #: ../src/guestfs.pod:2214
38705 " printf (\"ready\\n\");\n"
38711 #: ../src/guestfs.pod:2219
38714 " /* Display all calls to static markers. */\n"
38715 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38716 " .provider(\"guestfs\").mark(\"*\") ? {\n"
38717 " display_time();\n"
38718 " printf (\"\\t%s %s\\n\", $$name, $$parms);\n"
38724 #: ../src/guestfs.pod:2226
38727 " /* Display all calls to guestfs_mkfs* functions. */\n"
38728 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38729 " .function(\"guestfs_mkfs*\") ? {\n"
38730 " display_time();\n"
38731 " printf (\"\\t%s %s\\n\", probefunc(), $$parms);\n"
38737 #: ../src/guestfs.pod:2233
38739 "The script above can be saved to C<test.stap> and run using the L<stap(1)> "
38740 "program. Note that you either have to be root, or you have to add yourself "
38741 "to several special stap groups. Consult the systemtap documentation for "
38742 "more information."
38746 #: ../src/guestfs.pod:2238
38749 " # stap /tmp/test.stap\n"
38755 #: ../src/guestfs.pod:2241
38756 msgid "In another terminal, run a guestfish command such as this:"
38760 #: ../src/guestfs.pod:2245
38761 msgid "In the first terminal, stap trace output similar to this is shown:"
38765 #: ../src/guestfs.pod:2247
38768 " 1318248056692655 (+0):\tlaunch_start\n"
38769 " 1318248056692850 (+195): launch_build_appliance_start\n"
38770 " 1318248056818285 (+125435): launch_build_appliance_end\n"
38771 " 1318248056838059 (+19774): launch_run_qemu\n"
38772 " 1318248061071167 (+4233108): launch_end\n"
38773 " 1318248061280324 (+209157): guestfs_mkfs g=0x1024ab0 fstype=0x46116f "
38774 "device=0x1024e60\n"
38779 #: ../src/guestfs.pod:2254 ../src/guestfs.pod:2259
38784 #: ../src/guestfs.pod:2256
38786 "<!-- old anchor for the next section --> <a "
38787 "name=\"state_machine_and_low_level_event_api\"/>"
38791 #: ../src/guestfs.pod:2261
38792 msgid "ARCHITECTURE"
38796 #: ../src/guestfs.pod:2263
38798 "Internally, libguestfs is implemented by running an appliance (a special "
38799 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
38800 "process of the main program."
38804 #: ../src/guestfs.pod:2267
38807 " ___________________\n"
38809 " | main program |\n"
38811 " | | child process / appliance\n"
38812 " | | __________________________\n"
38814 " +-------------------+ RPC | +-----------------+ |\n"
38815 " | libguestfs <--------------------> guestfsd | |\n"
38816 " | | | +-----------------+ |\n"
38817 " \\___________________/ | | Linux kernel | |\n"
38818 " | +--^--------------+ |\n"
38819 " \\_________|________________/\n"
38821 " _______v______\n"
38824 " | disk image |\n"
38825 " \\______________/\n"
38830 #: ../src/guestfs.pod:2287
38832 "The library, linked to the main program, creates the child process and hence "
38833 "the appliance in the L</guestfs_launch> function."
38837 #: ../src/guestfs.pod:2290
38839 "Inside the appliance is a Linux kernel and a complete stack of userspace "
38840 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
38841 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
38842 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
38843 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
38844 "attached to the qemu process which translates device access by the "
38845 "appliance's Linux kernel into accesses to the image."
38849 #: ../src/guestfs.pod:2299
38851 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
38852 "Although the disk image you are attached to might also be used by some "
38853 "virtual machine, libguestfs doesn't know or care about this. (But you will "
38854 "care if both libguestfs's qemu process and your virtual machine are trying "
38855 "to update the disk image at the same time, since these usually results in "
38856 "massive disk corruption)."
38860 #: ../src/guestfs.pod:2306
38861 msgid "STATE MACHINE"
38865 #: ../src/guestfs.pod:2308
38866 msgid "libguestfs uses a state machine to model the child process:"
38870 #: ../src/guestfs.pod:2310
38874 " guestfs_create\n"
38882 " / | \\ \\ guestfs_launch\n"
38883 " / | _\\__V______\n"
38885 " / | | LAUNCHING |\n"
38886 " / | \\___________/\n"
38888 " / | guestfs_launch\n"
38890 " ______ / __|____V\n"
38891 " / \\ ------> / \\\n"
38892 " | BUSY | | READY |\n"
38893 " \\______/ <------ \\________/\n"
38898 #: ../src/guestfs.pod:2332
38900 "The normal transitions are (1) CONFIG (when the handle is created, but there "
38901 "is no child process), (2) LAUNCHING (when the child process is booting up), "
38902 "(3) alternating between READY and BUSY as commands are issued to, and "
38903 "carried out by, the child process."
38907 #: ../src/guestfs.pod:2337
38909 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
38910 "asynchronously at any time (eg. due to some internal error), and that causes "
38911 "the state to transition back to CONFIG."
38915 #: ../src/guestfs.pod:2341
38917 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
38918 "issued when in the CONFIG state."
38922 #: ../src/guestfs.pod:2344
38924 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
38925 "L</guestfs_launch> blocks until the child process is READY to accept "
38926 "commands (or until some failure or timeout). L</guestfs_launch> internally "
38927 "moves the state from CONFIG to LAUNCHING while it is running."
38931 #: ../src/guestfs.pod:2350
38933 "API actions such as L</guestfs_mount> can only be issued when in the READY "
38934 "state. These API calls block waiting for the command to be carried out "
38935 "(ie. the state to transition to BUSY and then back to READY). There are no "
38936 "non-blocking versions, and no way to issue more than one command per handle "
38937 "at the same time."
38941 #: ../src/guestfs.pod:2356
38943 "Finally, the child process sends asynchronous messages back to the main "
38944 "program, such as kernel log messages. You can register a callback to "
38945 "receive these messages."
38949 #: ../src/guestfs.pod:2360
38954 #: ../src/guestfs.pod:2362
38955 msgid "APPLIANCE BOOT PROCESS"
38959 #: ../src/guestfs.pod:2364
38961 "This process has evolved and continues to evolve. The description here "
38962 "corresponds only to the current version of libguestfs and is provided for "
38963 "information only."
38967 #: ../src/guestfs.pod:2368
38969 "In order to follow the stages involved below, enable libguestfs debugging "
38970 "(set the environment variable C<LIBGUESTFS_DEBUG=1>)."
38974 #: ../src/guestfs.pod:2373
38975 msgid "Create the appliance"
38979 #: ../src/guestfs.pod:2375
38981 "C<febootstrap-supermin-helper> is invoked to create the kernel, a small "
38982 "initrd and the appliance."
38986 #: ../src/guestfs.pod:2378
38988 "The appliance is cached in C</var/tmp/.guestfs-E<lt>UIDE<gt>> (or in another "
38989 "directory if C<TMPDIR> is set)."
38993 #: ../src/guestfs.pod:2381
38995 "For a complete description of how the appliance is created and cached, read "
38996 "the L<febootstrap(8)> and L<febootstrap-supermin-helper(8)> man pages."
39000 #: ../src/guestfs.pod:2385
39001 msgid "Start qemu and boot the kernel"
39005 #: ../src/guestfs.pod:2387
39006 msgid "qemu is invoked to boot the kernel."
39010 #: ../src/guestfs.pod:2389
39011 msgid "Run the initrd"
39015 #: ../src/guestfs.pod:2391
39017 "C<febootstrap-supermin-helper> builds a small initrd. The initrd is not the "
39018 "appliance. The purpose of the initrd is to load enough kernel modules in "
39019 "order that the appliance itself can be mounted and started."
39023 #: ../src/guestfs.pod:2395
39025 "The initrd is a cpio archive called "
39026 "C</var/tmp/.guestfs-E<lt>UIDE<gt>/initrd>."
39030 #: ../src/guestfs.pod:2398
39032 "When the initrd has started you will see messages showing that kernel "
39033 "modules are being loaded, similar to this:"
39037 #: ../src/guestfs.pod:2401
39040 " febootstrap: ext2 mini initrd starting up\n"
39041 " febootstrap: mounting /sys\n"
39042 " febootstrap: internal insmod libcrc32c.ko\n"
39043 " febootstrap: internal insmod crc32c-intel.ko\n"
39048 #: ../src/guestfs.pod:2406
39049 msgid "Find and mount the appliance device"
39053 #: ../src/guestfs.pod:2408
39055 "The appliance is a sparse file containing an ext2 filesystem which contains "
39056 "a familiar (although reduced in size) Linux operating system. It would "
39057 "normally be called C</var/tmp/.guestfs-E<lt>UIDE<gt>/root>."
39061 #: ../src/guestfs.pod:2412
39063 "The regular disks being inspected by libguestfs are the first devices "
39064 "exposed by qemu (eg. as C</dev/vda>)."
39068 #: ../src/guestfs.pod:2415
39070 "The last disk added to qemu is the appliance itself (eg. C</dev/vdb> if "
39071 "there was only one regular disk)."
39075 #: ../src/guestfs.pod:2418
39077 "Thus the final job of the initrd is to locate the appliance disk, mount it, "
39078 "and switch root into the appliance, and run C</init> from the appliance."
39082 #: ../src/guestfs.pod:2422
39083 msgid "If this works successfully you will see messages such as:"
39087 #: ../src/guestfs.pod:2424
39090 " febootstrap: picked /sys/block/vdb/dev as root device\n"
39091 " febootstrap: creating /dev/root as block special 252:16\n"
39092 " febootstrap: mounting new root on /root\n"
39093 " febootstrap: chroot\n"
39094 " Starting /init script ...\n"
39099 #: ../src/guestfs.pod:2430
39101 "Note that C<Starting /init script ...> indicates that the appliance's init "
39102 "script is now running."
39106 #: ../src/guestfs.pod:2433
39107 msgid "Initialize the appliance"
39111 #: ../src/guestfs.pod:2435
39113 "The appliance itself now initializes itself. This involves starting certain "
39114 "processes like C<udev>, possibly printing some debug information, and "
39115 "finally running the daemon (C<guestfsd>)."
39119 #: ../src/guestfs.pod:2439
39124 #: ../src/guestfs.pod:2441
39126 "Finally the daemon (C<guestfsd>) runs inside the appliance. If it runs you "
39131 #: ../src/guestfs.pod:2444
39134 " verbose daemon enabled\n"
39139 #: ../src/guestfs.pod:2446
39141 "The daemon expects to see a named virtio-serial port exposed by qemu and "
39142 "connected on the other end to the library."
39146 #: ../src/guestfs.pod:2449
39148 "The daemon connects to this port (and hence to the library) and sends a four "
39149 "byte message C<GUESTFS_LAUNCH_FLAG>, which initiates the communication "
39150 "protocol (see below)."
39154 #: ../src/guestfs.pod:2455
39155 msgid "COMMUNICATION PROTOCOL"
39159 #: ../src/guestfs.pod:2457
39161 "Don't rely on using this protocol directly. This section documents how it "
39162 "currently works, but it may change at any time."
39166 #: ../src/guestfs.pod:2460
39168 "The protocol used to talk between the library and the daemon running inside "
39169 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
39170 "1014, RFC 1832, RFC 4506)."
39174 #: ../src/guestfs.pod:2464
39176 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
39177 "this file is automatically generated)."
39181 #: ../src/guestfs.pod:2467
39183 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
39184 "and C<FileOut> parameters, which are handled with very simple request/reply "
39185 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
39186 "parameters, which use the same request and reply messages, but they may also "
39187 "be followed by files sent using a chunked encoding."
39191 #: ../src/guestfs.pod:2474
39192 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
39196 #: ../src/guestfs.pod:2476
39197 msgid "For ordinary functions, the request message is:"
39201 #: ../src/guestfs.pod:2478
39204 " total length (header + arguments,\n"
39205 " but not including the length word itself)\n"
39206 " struct guestfs_message_header (encoded as XDR)\n"
39207 " struct guestfs_<foo>_args (encoded as XDR)\n"
39212 #: ../src/guestfs.pod:2483
39214 "The total length field allows the daemon to allocate a fixed size buffer "
39215 "into which it slurps the rest of the message. As a result, the total length "
39216 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
39217 "effective size of any request is limited to somewhere under this size."
39221 #: ../src/guestfs.pod:2489
39223 "Note also that many functions don't take any arguments, in which case the "
39224 "C<guestfs_I<foo>_args> is completely omitted."
39228 #: ../src/guestfs.pod:2492
39230 "The header contains the procedure number (C<guestfs_proc>) which is how the "
39231 "receiver knows what type of args structure to expect, or none at all."
39235 #: ../src/guestfs.pod:2496
39237 "For functions that take optional arguments, the optional arguments are "
39238 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
39239 "arguments. A bitmask in the header indicates which optional arguments are "
39240 "meaningful. The bitmask is also checked to see if it contains bits set "
39241 "which the daemon does not know about (eg. if more optional arguments were "
39242 "added in a later version of the library), and this causes the call to be "
39247 #: ../src/guestfs.pod:2504
39248 msgid "The reply message for ordinary functions is:"
39252 #: ../src/guestfs.pod:2506
39255 " total length (header + ret,\n"
39256 " but not including the length word itself)\n"
39257 " struct guestfs_message_header (encoded as XDR)\n"
39258 " struct guestfs_<foo>_ret (encoded as XDR)\n"
39263 #: ../src/guestfs.pod:2511
39265 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
39266 "functions that return no formal return values."
39270 #: ../src/guestfs.pod:2514
39271 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
39275 #: ../src/guestfs.pod:2517
39277 "In the case of an error, a flag is set in the header, and the reply message "
39278 "is slightly changed:"
39282 #: ../src/guestfs.pod:2520
39285 " total length (header + error,\n"
39286 " but not including the length word itself)\n"
39287 " struct guestfs_message_header (encoded as XDR)\n"
39288 " struct guestfs_message_error (encoded as XDR)\n"
39293 #: ../src/guestfs.pod:2525
39295 "The C<guestfs_message_error> structure contains the error message as a "
39300 #: ../src/guestfs.pod:2528
39301 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
39305 #: ../src/guestfs.pod:2530
39307 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
39308 "The normal request message is sent (see above). However this is followed by "
39309 "a sequence of file chunks."
39313 #: ../src/guestfs.pod:2534
39316 " total length (header + arguments,\n"
39317 " but not including the length word itself,\n"
39318 " and not including the chunks)\n"
39319 " struct guestfs_message_header (encoded as XDR)\n"
39320 " struct guestfs_<foo>_args (encoded as XDR)\n"
39321 " sequence of chunks for FileIn param #0\n"
39322 " sequence of chunks for FileIn param #1 etc.\n"
39327 #: ../src/guestfs.pod:2542
39328 msgid "The \"sequence of chunks\" is:"
39332 #: ../src/guestfs.pod:2544
39335 " length of chunk (not including length word itself)\n"
39336 " struct guestfs_chunk (encoded as XDR)\n"
39337 " length of chunk\n"
39338 " struct guestfs_chunk (encoded as XDR)\n"
39340 " length of chunk\n"
39341 " struct guestfs_chunk (with data.data_len == 0)\n"
39346 #: ../src/guestfs.pod:2552
39348 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
39349 "is set in the final chunk to indicate either successful completion or early "
39354 #: ../src/guestfs.pod:2556
39356 "At time of writing there are no functions that have more than one FileIn "
39357 "parameter. However this is (theoretically) supported, by sending the "
39358 "sequence of chunks for each FileIn parameter one after another (from left to "
39363 #: ../src/guestfs.pod:2561
39365 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
39366 "transfer. The library does this by sending a chunk with a special flag set "
39367 "to indicate cancellation. When the daemon sees this, it cancels the whole "
39368 "RPC, does I<not> send any reply, and goes back to reading the next request."
39372 #: ../src/guestfs.pod:2567
39374 "The daemon may also cancel. It does this by writing a special word "
39375 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
39376 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
39377 "cancel chunk). The special word is chosen so that even if cancellation "
39378 "happens right at the end of the transfer (after the library has finished "
39379 "writing and has started listening for the reply), the \"spurious\" cancel "
39380 "flag will not be confused with the reply message."
39384 #: ../src/guestfs.pod:2576
39386 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
39387 "limit), and also files where the size is not known in advance (eg. from "
39388 "pipes or sockets). However the chunks are rather small "
39389 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
39390 "to keep much in memory."
39394 #: ../src/guestfs.pod:2582
39395 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
39399 #: ../src/guestfs.pod:2584
39401 "The protocol for FileOut parameters is exactly the same as for FileIn "
39402 "parameters, but with the roles of daemon and library reversed."
39406 #: ../src/guestfs.pod:2587
39409 " total length (header + ret,\n"
39410 " but not including the length word itself,\n"
39411 " and not including the chunks)\n"
39412 " struct guestfs_message_header (encoded as XDR)\n"
39413 " struct guestfs_<foo>_ret (encoded as XDR)\n"
39414 " sequence of chunks for FileOut param #0\n"
39415 " sequence of chunks for FileOut param #1 etc.\n"
39420 #: ../src/guestfs.pod:2595
39421 msgid "INITIAL MESSAGE"
39425 #: ../src/guestfs.pod:2597
39427 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
39428 "which indicates that the guest and daemon is alive. This is what "
39429 "L</guestfs_launch> waits for."
39433 #: ../src/guestfs.pod:2601
39434 msgid "PROGRESS NOTIFICATION MESSAGES"
39438 #: ../src/guestfs.pod:2603
39440 "The daemon may send progress notification messages at any time. These are "
39441 "distinguished by the normal length word being replaced by "
39442 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
39446 #: ../src/guestfs.pod:2607
39448 "The library turns them into progress callbacks (see "
39449 "L</GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards "
39454 #: ../src/guestfs.pod:2611
39456 "The daemon self-limits the frequency of progress messages it sends (see "
39457 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
39462 #: ../src/guestfs.pod:2615
39463 msgid "LIBGUESTFS VERSION NUMBERS"
39467 #: ../src/guestfs.pod:2617
39469 "Since April 2010, libguestfs has started to make separate development and "
39470 "stable releases, along with corresponding branches in our git repository. "
39471 "These separate releases can be identified by version number:"
39475 #: ../src/guestfs.pod:2622
39478 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
39479 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
39485 " | `-------- sub-version\n"
39487 " `------ always '1' because we don't change the ABI\n"
39492 #: ../src/guestfs.pod:2633
39493 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
39497 #: ../src/guestfs.pod:2635
39499 "As time passes we cherry pick fixes from the development branch and backport "
39500 "those into the stable branch, the effect being that the stable branch should "
39501 "get more stable and less buggy over time. So the stable releases are ideal "
39502 "for people who don't need new features but would just like the software to "
39507 #: ../src/guestfs.pod:2641
39508 msgid "Our criteria for backporting changes are:"
39512 #: ../src/guestfs.pod:2647
39514 "Documentation changes which don't affect any code are backported unless the "
39515 "documentation refers to a future feature which is not in stable."
39519 #: ../src/guestfs.pod:2653
39521 "Bug fixes which are not controversial, fix obvious problems, and have been "
39522 "well tested are backported."
39526 #: ../src/guestfs.pod:2658
39528 "Simple rearrangements of code which shouldn't affect how it works get "
39529 "backported. This is so that the code in the two branches doesn't get too "
39530 "far out of step, allowing us to backport future fixes more easily."
39534 #: ../src/guestfs.pod:2664
39536 "We I<don't> backport new features, new APIs, new tools etc, except in one "
39537 "exceptional case: the new feature is required in order to implement an "
39538 "important bug fix."
39542 #: ../src/guestfs.pod:2670
39544 "A new stable branch starts when we think the new features in development are "
39545 "substantial and compelling enough over the current stable branch to warrant "
39546 "it. When that happens we create new stable and development versions 1.N.0 "
39547 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
39548 "stable at this point, but by backporting fixes from development, that branch "
39549 "will stabilize over time."
39553 #: ../src/guestfs.pod:2678
39554 msgid "EXTENDING LIBGUESTFS"
39558 #: ../src/guestfs.pod:2680
39559 msgid "ADDING A NEW API ACTION"
39563 #: ../src/guestfs.pod:2682
39565 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
39566 "documentation) are generated, and this makes it easy to extend the "
39571 #: ../src/guestfs.pod:2686
39572 msgid "To add a new API action there are two changes:"
39576 #: ../src/guestfs.pod:2692
39578 "You need to add a description of the call (name, parameters, return type, "
39579 "tests, documentation) to C<generator/generator_actions.ml>."
39583 #: ../src/guestfs.pod:2695
39585 "There are two sorts of API action, depending on whether the call goes "
39586 "through to the daemon in the appliance, or is serviced entirely by the "
39587 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
39588 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
39589 "an example of the latter, since a trace flag is maintained in the handle and "
39590 "all tracing is done on the library side."
39594 #: ../src/guestfs.pod:2703
39596 "Most new actions are of the first type, and get added to the "
39597 "C<daemon_functions> list. Each function has a unique procedure number used "
39598 "in the RPC protocol which is assigned to that action when we publish "
39599 "libguestfs and cannot be reused. Take the latest procedure number and "
39604 #: ../src/guestfs.pod:2709
39606 "For library-only actions of the second type, add to the "
39607 "C<non_daemon_functions> list. Since these functions are serviced by the "
39608 "library and do not travel over the RPC mechanism to the daemon, these "
39609 "functions do not need a procedure number, and so the procedure number is set "
39614 #: ../src/guestfs.pod:2717
39615 msgid "Implement the action (in C):"
39619 #: ../src/guestfs.pod:2719
39621 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
39622 "C<daemon/> directory."
39626 #: ../src/guestfs.pod:2722
39628 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
39629 "(note: double underscore) in the C<src/> directory."
39633 #: ../src/guestfs.pod:2725
39634 msgid "In either case, use another function as an example of what to do."
39638 #: ../src/guestfs.pod:2729
39639 msgid "After making these changes, use C<make> to compile."
39643 #: ../src/guestfs.pod:2731
39645 "Note that you don't need to implement the RPC, language bindings, manual "
39646 "pages or anything else. It's all automatically generated from the OCaml "
39651 #: ../src/guestfs.pod:2735
39652 msgid "ADDING TESTS FOR AN API ACTION"
39656 #: ../src/guestfs.pod:2737
39658 "You can supply zero or as many tests as you want per API call. The tests "
39659 "can either be added as part of the API description "
39660 "(C<generator/generator_actions.ml>), or in some rarer cases you may want to "
39661 "drop a script into C<regressions/>. Note that adding a script to "
39662 "C<regressions/> is slower, so if possible use the first method."
39666 #: ../src/guestfs.pod:2743
39668 "The following describes the test environment used when you add an API test "
39669 "in C<generator_actions.ml>."
39673 #: ../src/guestfs.pod:2746
39674 msgid "The test environment has 4 block devices:"
39678 #: ../src/guestfs.pod:2750
39679 msgid "C</dev/sda> 500MB"
39683 #: ../src/guestfs.pod:2752
39684 msgid "General block device for testing."
39688 #: ../src/guestfs.pod:2754
39689 msgid "C</dev/sdb> 50MB"
39693 #: ../src/guestfs.pod:2756
39695 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
39700 #: ../src/guestfs.pod:2759
39701 msgid "C</dev/sdc> 10MB"
39705 #: ../src/guestfs.pod:2761
39706 msgid "Used in a few tests where two block devices are needed."
39710 #: ../src/guestfs.pod:2763
39711 msgid "C</dev/sdd>"
39715 #: ../src/guestfs.pod:2765
39716 msgid "ISO with fixed content (see C<images/test.iso>)."
39720 #: ../src/guestfs.pod:2769
39722 "To be able to run the tests in a reasonable amount of time, the libguestfs "
39723 "appliance and block devices are reused between tests. So don't try testing "
39724 "L</guestfs_kill_subprocess> :-x"
39728 #: ../src/guestfs.pod:2773
39730 "Each test starts with an initial scenario, selected using one of the "
39731 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
39732 "initialize the disks mentioned above in a particular way as documented in "
39733 "C<generator_types.ml>. You should not assume anything about the previous "
39734 "contents of other disks that are not initialized."
39738 #: ../src/guestfs.pod:2779
39740 "You can add a prerequisite clause to any individual test. This is a "
39741 "run-time check, which, if it fails, causes the test to be skipped. Useful "
39742 "if testing a command which might not work on all variations of libguestfs "
39743 "builds. A test that has prerequisite of C<Always> means to run "
39748 #: ../src/guestfs.pod:2785
39750 "In addition, packagers can skip individual tests by setting environment "
39751 "variables before running C<make check>."
39755 #: ../src/guestfs.pod:2788
39758 " SKIP_TEST_<CMD>_<NUM>=1\n"
39763 #: ../src/guestfs.pod:2790
39764 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
39768 #: ../src/guestfs.pod:2794
39771 " SKIP_TEST_<CMD>=1\n"
39776 #: ../src/guestfs.pod:2796
39777 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
39781 #: ../src/guestfs.pod:2798
39782 msgid "Packagers can run only certain tests by setting for example:"
39786 #: ../src/guestfs.pod:2800
39789 " TEST_ONLY=\"vfs_type zerofree\"\n"
39794 #: ../src/guestfs.pod:2802
39796 "See C<capitests/tests.c> for more details of how these environment variables "
39801 #: ../src/guestfs.pod:2805
39802 msgid "DEBUGGING NEW API ACTIONS"
39806 #: ../src/guestfs.pod:2807
39807 msgid "Test new actions work before submitting them."
39811 #: ../src/guestfs.pod:2809
39812 msgid "You can use guestfish to try out new commands."
39816 #: ../src/guestfs.pod:2811
39818 "Debugging the daemon is a problem because it runs inside a minimal "
39819 "environment. However you can fprintf messages in the daemon to stderr, and "
39820 "they will show up if you use C<guestfish -v>."
39824 #: ../src/guestfs.pod:2815
39825 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
39829 #: ../src/guestfs.pod:2817
39831 "Our C source code generally adheres to some basic code-formatting "
39832 "conventions. The existing code base is not totally consistent on this "
39833 "front, but we do prefer that contributed code be formatted similarly. In "
39834 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
39835 "indentation level, and other than that, follow the K&R style."
39839 #: ../src/guestfs.pod:2823
39841 "If you use Emacs, add the following to one of one of your start-up files "
39842 "(e.g., ~/.emacs), to help ensure that you get indentation right:"
39846 #: ../src/guestfs.pod:2826
39849 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
39850 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
39851 " (add-hook 'find-file-hook\n"
39852 " '(lambda () (if (and buffer-file-name\n"
39853 " (string-match \"/libguestfs\\\\>\"\n"
39854 " (buffer-file-name))\n"
39855 " (not (string-equal mode-name \"Change Log\"))\n"
39856 " (not (string-equal mode-name \"Makefile\")))\n"
39857 " (setq indent-tabs-mode nil))))\n"
39862 #: ../src/guestfs.pod:2836
39865 " ;;; When editing C sources in libguestfs, use this style.\n"
39866 " (defun libguestfs-c-mode ()\n"
39867 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
39869 " (c-set-style \"K&R\")\n"
39870 " (setq c-indent-level 2)\n"
39871 " (setq c-basic-offset 2))\n"
39872 " (add-hook 'c-mode-hook\n"
39873 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
39874 " (buffer-file-name))\n"
39875 " (libguestfs-c-mode))))\n"
39880 #: ../src/guestfs.pod:2848
39881 msgid "Enable warnings when compiling (and fix any problems this finds):"
39885 #: ../src/guestfs.pod:2851
39888 " ./configure --enable-gcc-warnings\n"
39893 #: ../src/guestfs.pod:2853
39894 msgid "Useful targets are:"
39898 #: ../src/guestfs.pod:2855
39901 " make syntax-check # checks the syntax of the C code\n"
39902 " make check # runs the test suite\n"
39907 #: ../src/guestfs.pod:2858
39908 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
39912 #: ../src/guestfs.pod:2860
39914 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
39915 "which are used to do shell quoting."
39919 #: ../src/guestfs.pod:2865
39924 #: ../src/guestfs.pod:2867
39926 "Simple shell quoted string. Any spaces or other shell characters are "
39931 #: ../src/guestfs.pod:2870
39936 #: ../src/guestfs.pod:2872
39938 "Same as C<%Q> except the string is treated as a path which is prefixed by "
39943 #: ../src/guestfs.pod:2879
39946 " asprintf (&cmd, \"cat %R\", path);\n"
39951 #: ../src/guestfs.pod:2881
39952 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
39956 #: ../src/guestfs.pod:2883
39958 "I<Note:> Do I<not> use these when you are passing parameters to the "
39959 "C<command{,r,v,rv}()> functions. These parameters do NOT need to be quoted "
39960 "because they are not passed via the shell (instead, straight to exec). You "
39961 "probably want to use the C<sysroot_path()> function however."
39965 #: ../src/guestfs.pod:2889
39966 msgid "SUBMITTING YOUR NEW API ACTIONS"
39970 #: ../src/guestfs.pod:2891
39972 "Submit patches to the mailing list: "
39973 "L<http://www.redhat.com/mailman/listinfo/libguestfs> and CC to "
39974 "L<rjones@redhat.com>."
39978 #: ../src/guestfs.pod:2895
39979 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
39983 #: ../src/guestfs.pod:2897
39984 msgid "We support i18n (gettext anyhow) in the library."
39988 #: ../src/guestfs.pod:2899
39990 "However many messages come from the daemon, and we don't translate those at "
39991 "the moment. One reason is that the appliance generally has all locale files "
39992 "removed from it, because they take up a lot of space. So we'd have to readd "
39993 "some of those, as well as copying our PO files into the appliance."
39997 #: ../src/guestfs.pod:2905
39999 "Debugging messages are never translated, since they are intended for the "
40004 #: ../src/guestfs.pod:2908
40005 msgid "SOURCE CODE SUBDIRECTORIES"
40009 #: ../src/guestfs.pod:2912
40014 #: ../src/guestfs.pod:2914
40015 msgid "L<virt-alignment-scan(1)> command and documentation."
40019 #: ../src/guestfs.pod:2918
40020 msgid "The libguestfs appliance, build scripts and so on."
40024 #: ../src/guestfs.pod:2920
40025 msgid "C<capitests>"
40029 #: ../src/guestfs.pod:2922
40030 msgid "Automated tests of the C API."
40034 #: ../src/guestfs.pod:2924
40039 #: ../src/guestfs.pod:2926
40041 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
40046 #: ../src/guestfs.pod:2929
40051 #: ../src/guestfs.pod:2931
40053 "Safety and liveness tests of components that libguestfs depends upon (not of "
40054 "libguestfs itself). Mainly this is for qemu and the kernel."
40058 #: ../src/guestfs.pod:2934
40063 #: ../src/guestfs.pod:2936
40065 "Tools for cloning virtual machines. Currently contains L<virt-sysprep(1)> "
40066 "command and documentation."
40070 #: ../src/guestfs.pod:2939
40075 #: ../src/guestfs.pod:2941
40076 msgid "Outside contributions, experimental parts."
40080 #: ../src/guestfs.pod:2943
40085 #: ../src/guestfs.pod:2945
40087 "The daemon that runs inside the libguestfs appliance and carries out "
40092 #: ../src/guestfs.pod:2948
40097 #: ../src/guestfs.pod:2950
40098 msgid "L<virt-df(1)> command and documentation."
40102 #: ../src/guestfs.pod:2952
40107 #: ../src/guestfs.pod:2954
40108 msgid "L<virt-edit(1)> command and documentation."
40112 #: ../src/guestfs.pod:2956
40113 msgid "C<examples>"
40117 #: ../src/guestfs.pod:2958
40118 msgid "C API example code."
40122 #: ../src/guestfs.pod:2960
40127 #: ../src/guestfs.pod:2962
40129 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
40130 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
40131 "L<virt-tar-out(1)>."
40135 #: ../src/guestfs.pod:2966
40140 #: ../src/guestfs.pod:2968
40141 msgid "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
40145 #: ../src/guestfs.pod:2970
40146 msgid "C<generator>"
40150 #: ../src/guestfs.pod:2972
40152 "The crucially important generator, used to automatically generate large "
40153 "amounts of boilerplate C code for things like RPC and bindings."
40157 #: ../src/guestfs.pod:2975
40162 #: ../src/guestfs.pod:2977
40163 msgid "Files used by the test suite."
40167 #: ../src/guestfs.pod:2979
40168 msgid "Some \"phony\" guest images which we test against."
40172 #: ../src/guestfs.pod:2981
40173 msgid "C<inspector>"
40177 #: ../src/guestfs.pod:2983
40178 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
40182 #: ../src/guestfs.pod:2985
40187 #: ../src/guestfs.pod:2987
40188 msgid "Logo used on the website. The fish is called Arthur by the way."
40192 #: ../src/guestfs.pod:2989
40197 #: ../src/guestfs.pod:2991
40198 msgid "M4 macros used by autoconf."
40202 #: ../src/guestfs.pod:2993
40207 #: ../src/guestfs.pod:2995
40208 msgid "Translations of simple gettext strings."
40212 #: ../src/guestfs.pod:2997
40217 #: ../src/guestfs.pod:2999
40219 "The build infrastructure and PO files for translations of manpages and POD "
40220 "files. Eventually this will be combined with the C<po> directory, but that "
40221 "is rather complicated."
40225 #: ../src/guestfs.pod:3003
40226 msgid "C<regressions>"
40230 #: ../src/guestfs.pod:3005
40231 msgid "Regression tests."
40235 #: ../src/guestfs.pod:3007
40240 #: ../src/guestfs.pod:3009
40241 msgid "L<virt-rescue(1)> command and documentation."
40245 #: ../src/guestfs.pod:3011
40250 #: ../src/guestfs.pod:3013
40251 msgid "L<virt-resize(1)> command and documentation."
40255 #: ../src/guestfs.pod:3015
40256 msgid "C<sparsify>"
40260 #: ../src/guestfs.pod:3017
40261 msgid "L<virt-sparsify(1)> command and documentation."
40265 #: ../src/guestfs.pod:3019
40270 #: ../src/guestfs.pod:3021
40271 msgid "Source code to the C library."
40275 #: ../src/guestfs.pod:3023
40280 #: ../src/guestfs.pod:3025
40281 msgid "Command line tools written in Perl (L<virt-win-reg(1)> and many others)."
40285 #: ../src/guestfs.pod:3027
40286 msgid "C<test-tool>"
40290 #: ../src/guestfs.pod:3029
40292 "Test tool for end users to test if their qemu/kernel combination will work "
40297 #: ../src/guestfs.pod:3032
40302 #: ../src/guestfs.pod:3034
40307 #: ../src/guestfs.pod:3036
40312 #: ../src/guestfs.pod:3038
40317 #: ../src/guestfs.pod:3040
40322 #: ../src/guestfs.pod:3042
40327 #: ../src/guestfs.pod:3044
40332 #: ../src/guestfs.pod:3046
40337 #: ../src/guestfs.pod:3048
40342 #: ../src/guestfs.pod:3050
40343 msgid "Language bindings."
40347 #: ../src/guestfs.pod:3054
40348 msgid "MAKING A STABLE RELEASE"
40352 #: ../src/guestfs.pod:3056
40354 "When we make a stable release, there are several steps documented here. See "
40355 "L</LIBGUESTFS VERSION NUMBERS> for general information about the stable "
40360 #: ../src/guestfs.pod:3064
40361 msgid "Check C<make && make check> works on at least Fedora, Debian and Ubuntu."
40365 #: ../src/guestfs.pod:3069
40366 msgid "Finalize RELEASE-NOTES."
40370 #: ../src/guestfs.pod:3073
40371 msgid "Update ROADMAP."
40375 #: ../src/guestfs.pod:3077
40376 msgid "Run C<src/api-support/update-from-tarballs.sh>."
40380 #: ../src/guestfs.pod:3081
40381 msgid "Push and pull from Transifex."
40385 #: ../src/guestfs.pod:3085
40393 #: ../src/guestfs.pod:3087
40394 msgid "to push the latest POT files to Transifex. Then run:"
40398 #: ../src/guestfs.pod:3089
40406 #: ../src/guestfs.pod:3091
40407 msgid "which is a wrapper to pull the latest translated C<*.po> files."
40411 #: ../src/guestfs.pod:3095
40413 "Create new stable and development directories under "
40414 "L<http://libguestfs.org/download>."
40418 #: ../src/guestfs.pod:3100
40419 msgid "Create the branch in git:"
40423 #: ../src/guestfs.pod:3102
40426 " git tag -a 1.XX.0 -m \"Version 1.XX.0 (stable)\"\n"
40427 " git tag -a 1.YY.0 -m \"Version 1.YY.0 (development)\"\n"
40428 " git branch stable-1.XX\n"
40429 " git push origin tag 1.XX.0 1.YY.0 stable-1.XX\n"
40434 #: ../src/guestfs.pod:3109
40439 #: ../src/guestfs.pod:3111
40440 msgid "PROTOCOL LIMITS"
40444 #: ../src/guestfs.pod:3113
40446 "Internally libguestfs uses a message-based protocol to pass API calls and "
40447 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
40448 "plenty more detail about this). The maximum message size used by the "
40449 "protocol is slightly less than 4 MB. For some API calls you may need to be "
40450 "aware of this limit. The API calls which may be affected are individually "
40451 "documented, with a link back to this section of the documentation."
40455 #: ../src/guestfs.pod:3121
40457 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
40458 "a simple string. Because this string is at some point internally encoded as "
40459 "a message, the maximum size that it can return is slightly under 4 MB. If "
40460 "the requested file is larger than this then you will get an error."
40464 #: ../src/guestfs.pod:3127
40466 "In order to transfer large files into and out of the guest filesystem, you "
40467 "need to use particular calls that support this. The sections L</UPLOADING> "
40468 "and L</DOWNLOADING> document how to do this."
40472 #: ../src/guestfs.pod:3131
40474 "You might also consider mounting the disk image using our FUSE filesystem "
40475 "support (L<guestmount(1)>)."
40479 #: ../src/guestfs.pod:3134
40480 msgid "MAXIMUM NUMBER OF DISKS"
40484 #: ../src/guestfs.pod:3136
40485 msgid "When using virtio disks (the default) the current limit is B<25> disks."
40489 #: ../src/guestfs.pod:3139
40491 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
40492 "slots. However febootstrap only understands disks with names C</dev/vda> "
40493 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
40498 #: ../src/guestfs.pod:3144
40500 "We are working to substantially raise this limit in future versions but it "
40501 "requires complex changes to qemu."
40505 #: ../src/guestfs.pod:3147
40507 "In future versions of libguestfs it should also be possible to \"hot plug\" "
40508 "disks (add and remove disks after calling L</guestfs_launch>). This also "
40509 "requires changes to qemu."
40513 #: ../src/guestfs.pod:3151
40514 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
40518 #: ../src/guestfs.pod:3153
40519 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
40523 #: ../src/guestfs.pod:3155
40525 "This is because it reserves 4 bits for the minor device number (thus "
40526 "C</dev/vda>, and C</dev/vda1> through C</dev/vda15>)."
40530 #: ../src/guestfs.pod:3158
40532 "If you attach a disk with more than 15 partitions, the extra partitions are "
40533 "ignored by libguestfs."
40537 #: ../src/guestfs.pod:3161
40538 msgid "MAXIMUM SIZE OF A DISK"
40542 #: ../src/guestfs.pod:3163
40543 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
40547 #: ../src/guestfs.pod:3165
40549 "We have tested block devices up to 1 exabyte (2**60 or "
40550 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
40555 #: ../src/guestfs.pod:3169
40557 "Although libguestfs probably does not impose any limit, the underlying host "
40558 "storage will. If you store disk images on a host ext4 filesystem, then the "
40559 "maximum size will be limited by the maximum ext4 file size (currently 16 "
40560 "TB). If you store disk images as host logical volumes then you are limited "
40561 "by the maximum size of an LV."
40565 #: ../src/guestfs.pod:3175
40567 "For the hugest disk image files, we recommend using XFS on the host for "
40572 #: ../src/guestfs.pod:3178
40573 msgid "MAXIMUM SIZE OF A PARTITION"
40577 #: ../src/guestfs.pod:3180
40579 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
40580 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
40581 "address a partition located beyond 2 TB on the disk."
40585 #: ../src/guestfs.pod:3184
40587 "It is recommended that you use GPT partitions on disks which are larger than "
40588 "this size. GPT uses 64 bit sector numbers and so can address partitions "
40589 "which are theoretically larger than the largest disk we could support."
40593 #: ../src/guestfs.pod:3189
40594 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
40598 #: ../src/guestfs.pod:3191
40600 "This depends on the filesystem type. libguestfs itself does not impose any "
40601 "known limit. Consult Wikipedia or the filesystem documentation to find out "
40602 "what these limits are."
40606 #: ../src/guestfs.pod:3195
40607 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
40611 #: ../src/guestfs.pod:3197
40613 "The API functions L</guestfs_upload>, L</guestfs_download>, "
40614 "L</guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
40615 "uploads and downloads."
40619 #: ../src/guestfs.pod:3201
40620 msgid "INSPECTION LIMITS"
40624 #: ../src/guestfs.pod:3203
40626 "The inspection code has several arbitrary limits on things like the size of "
40627 "Windows Registry hive it will read, and the length of product name. These "
40628 "are intended to stop a malicious guest from consuming arbitrary amounts of "
40629 "memory and disk space on the host, and should not be reached in practice. "
40630 "See the source code for more information."
40634 #: ../src/guestfs.pod:3229
40636 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
40637 "effect as calling C<guestfs_set_verbose (g, 1)>."
40641 #: ../src/guestfs.pod:3241
40643 "Set the path that libguestfs uses to search for a supermin appliance. See "
40644 "the discussion of paths in section L</PATH> above."
40648 #: ../src/guestfs.pod:3250
40649 msgid "See also L</QEMU WRAPPERS> above."
40653 #: ../src/guestfs.pod:3254
40655 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
40656 "effect as calling C<guestfs_set_trace (g, 1)>."
40660 #: ../src/guestfs.pod:3272
40662 "L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, "
40663 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
40664 "L<guestfs-ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, "
40665 "L<virt-alignment-scan(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
40666 "L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)>, "
40667 "L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
40668 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
40669 "L<virt-rescue(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, "
40670 "L<virt-sysprep(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, "
40671 "L<virt-win-reg(1)>, L<guestfs-testing(1)>, L<qemu(1)>, L<febootstrap(1)>, "
40672 "L<febootstrap-supermin-helper(8)>, L<hivex(3)>, L<stap(1)>, "
40673 "L<http://libguestfs.org/>."
40677 #: ../src/guestfs.pod:3309
40679 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
40680 "L<lvm(8)>, L<disktype(1)>."
40684 #: ../src/guestfs.pod:3316 ../tools/virt-make-fs.pl:571 ../tools/virt-win-reg.pl:772
40689 #: ../src/guestfs.pod:3318
40690 msgid "To get a list of bugs against libguestfs use this link:"
40694 #: ../src/guestfs.pod:3320
40695 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
40699 #: ../src/guestfs.pod:3322
40700 msgid "To report a new bug against libguestfs use this link:"
40704 #: ../src/guestfs.pod:3324
40705 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
40709 #: ../src/guestfs.pod:3326
40710 msgid "When reporting a bug, please check:"
40714 #: ../src/guestfs.pod:3332
40715 msgid "That the bug hasn't been reported already."
40719 #: ../src/guestfs.pod:3336
40720 msgid "That you are testing a recent version."
40724 #: ../src/guestfs.pod:3340
40725 msgid "Describe the bug accurately, and give a way to reproduce it."
40729 #: ../src/guestfs.pod:3344
40731 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
40736 #: ../test-tool/libguestfs-test-tool.pod:5
40737 msgid "libguestfs-test-tool - Diagnostics for libguestfs"
40741 #: ../test-tool/libguestfs-test-tool.pod:9
40744 " libguestfs-test-tool [--options]\n"
40749 #: ../test-tool/libguestfs-test-tool.pod:13
40751 "libguestfs-test-tool is a test program shipped with libguestfs to allow you "
40752 "to check basic libguestfs functionality is working. This is needed because "
40753 "libguestfs occasionally breaks for reasons beyond our control: usually "
40754 "because of changes in the underlying qemu or kernel packages, or the host "
40759 #: ../test-tool/libguestfs-test-tool.pod:19
40760 msgid "If you suspect a problem in libguestfs, then just run:"
40764 #: ../test-tool/libguestfs-test-tool.pod:21
40767 " libguestfs-test-tool\n"
40772 #: ../test-tool/libguestfs-test-tool.pod:23
40773 msgid "It will print lots of diagnostic messages."
40777 #: ../test-tool/libguestfs-test-tool.pod:25
40778 msgid "If it runs to completion successfully, you will see this near the end:"
40782 #: ../test-tool/libguestfs-test-tool.pod:27
40785 " ===== TEST FINISHED OK =====\n"
40790 #: ../test-tool/libguestfs-test-tool.pod:29
40791 msgid "and the test tool will exit with code 0."
40795 #: ../test-tool/libguestfs-test-tool.pod:31
40797 "If it fails (and/or exits with non-zero error code), please paste the "
40798 "I<complete, unedited> output of the test tool into a bug report. More "
40799 "information about reporting bugs can be found on the "
40800 "L<http://libguestfs.org/> website."
40804 #: ../test-tool/libguestfs-test-tool.pod:42
40805 msgid "Display short usage information and exit."
40809 #: ../test-tool/libguestfs-test-tool.pod:44
40810 msgid "B<--qemu qemu_binary>"
40814 #: ../test-tool/libguestfs-test-tool.pod:46
40816 "If you have downloaded another qemu binary, point this option at the full "
40817 "path of the binary to try it."
40821 #: ../test-tool/libguestfs-test-tool.pod:49
40822 msgid "B<--qemudir qemu_source_dir>"
40826 #: ../test-tool/libguestfs-test-tool.pod:51
40828 "If you have compiled qemu from source, point this option at the source "
40829 "directory to try it."
40833 #: ../test-tool/libguestfs-test-tool.pod:54
40838 #: ../test-tool/libguestfs-test-tool.pod:56
40839 msgid "B<--timeout N>"
40843 #: ../test-tool/libguestfs-test-tool.pod:58
40845 "Set the launch timeout to C<N> seconds. The default is 600 seconds (10 "
40846 "minutes) which does not usually need to be adjusted."
40850 #: ../test-tool/libguestfs-test-tool.pod:63
40851 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
40855 #: ../test-tool/libguestfs-test-tool.pod:65
40857 "If you have compiled another version of qemu from source and would like to "
40858 "try that, then you can use the I<--qemudir> option to point to the qemu "
40859 "source directory."
40863 #: ../test-tool/libguestfs-test-tool.pod:69
40865 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
40866 "option to point to the binary."
40870 #: ../test-tool/libguestfs-test-tool.pod:72
40872 "Note when using these options, you can ignore the business of qemu wrapper "
40873 "scripts (L<guestfs(3)/QEMU WRAPPERS>), since libguestfs-test-tool writes a "
40874 "wrapper script for you if one is needed."
40878 #: ../test-tool/libguestfs-test-tool.pod:76
40879 msgid "TRYING OUT A DIFFERENT KERNEL"
40883 #: ../test-tool/libguestfs-test-tool.pod:78
40885 "If you are using febootstrap E<ge> 3.8 then you can select which kernel "
40886 "libguestfs tries. You do this by setting the environment variables "
40887 "C<FEBOOTSTRAP_KERNEL> and/or C<FEBOOTSTRAP_MODULES>."
40891 #: ../test-tool/libguestfs-test-tool.pod:82
40893 "Refer to L<febootstrap-supermin-helper(8)/ENVIRONMENT VARIABLES> for further "
40898 #: ../test-tool/libguestfs-test-tool.pod:85
40899 msgid "SELF-DIAGNOSIS"
40903 #: ../test-tool/libguestfs-test-tool.pod:87
40905 "Refer to L<guestfs(3)/APPLIANCE BOOT PROCESS> to understand the messages "
40906 "produced by libguestfs-test-tool and/or possible errors."
40910 #: ../test-tool/libguestfs-test-tool.pod:92
40912 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
40913 "I<1> if there was an error."
40917 #: ../test-tool/libguestfs-test-tool.pod:97
40919 "For the full list of environment variables which may affect libguestfs, "
40920 "please see the L<guestfs(3)> manual page."
40924 #: ../test-tool/libguestfs-test-tool.pod:102
40925 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
40929 #: ../tools/virt-list-filesystems.pl:32
40930 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
40934 #: ../tools/virt-list-filesystems.pl:36
40937 " virt-list-filesystems [--options] domname\n"
40942 #: ../tools/virt-list-filesystems.pl:38
40945 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
40950 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
40952 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
40957 #: ../tools/virt-list-filesystems.pl:45
40959 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
40960 "are contained in a virtual machine or disk image."
40964 #: ../tools/virt-list-filesystems.pl:49
40966 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
40967 "functionality. For more complex cases you should look at the "
40968 "L<guestfish(1)> tool."
40972 #: ../tools/virt-list-filesystems.pl:112
40974 "With this option, C<virt-list-filesystems> displays the type of each "
40975 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
40979 #: ../tools/virt-list-filesystems.pl:119
40984 #: ../tools/virt-list-filesystems.pl:123
40986 "Normally we only show mountable filesystems. If this option is given then "
40987 "swap devices are shown too."
40991 #: ../tools/virt-list-filesystems.pl:197
40993 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
40994 "L<virt-filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, "
40995 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
40999 #: ../tools/virt-list-filesystems.pl:214 ../tools/virt-tar.pl:317
41000 msgid "Copyright (C) 2009 Red Hat Inc."
41004 #: ../tools/virt-list-partitions.pl:32
41005 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
41009 #: ../tools/virt-list-partitions.pl:36
41012 " virt-list-partitions [--options] domname\n"
41017 #: ../tools/virt-list-partitions.pl:38
41020 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
41025 #: ../tools/virt-list-partitions.pl:45
41027 "C<virt-list-partitions> is a command line tool to list the partitions that "
41028 "are contained in a virtual machine or disk image. It is mainly useful as a "
41029 "first step to using L<virt-resize(1)>."
41033 #: ../tools/virt-list-partitions.pl:50
41035 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
41036 "functionality. For more complex cases you should look at the "
41037 "L<guestfish(1)> tool."
41041 #: ../tools/virt-list-partitions.pl:113
41042 msgid "Show sizes in human-readable form (eg. \"1G\")."
41046 #: ../tools/virt-list-partitions.pl:123
41048 "With this option, C<virt-list-partitions> displays the type and size of each "
41049 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
41053 #: ../tools/virt-list-partitions.pl:130
41058 #: ../tools/virt-list-partitions.pl:132
41063 #: ../tools/virt-list-partitions.pl:134
41064 msgid "Display the total size of each block device (as a separate row or rows)."
41068 #: ../tools/virt-list-partitions.pl:267
41070 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
41071 "L<virt-list-filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, "
41072 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41076 #: ../tools/virt-list-partitions.pl:283
41077 msgid "Copyright (C) 2009-2010 Red Hat Inc."
41081 #: ../tools/virt-make-fs.pl:37
41082 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
41086 #: ../tools/virt-make-fs.pl:41
41089 " virt-make-fs [--options] input.tar output.img\n"
41094 #: ../tools/virt-make-fs.pl:43
41097 " virt-make-fs [--options] input.tar.gz output.img\n"
41102 #: ../tools/virt-make-fs.pl:45
41105 " virt-make-fs [--options] directory output.img\n"
41110 #: ../tools/virt-make-fs.pl:49
41112 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
41113 "archive or some files in a directory. It is similar to tools like "
41114 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
41115 "it can create common filesystem types like ext2/3 or NTFS, which can be "
41116 "useful if you want to attach these filesystems to existing virtual machines "
41117 "(eg. to import large amounts of read-only data to a VM)."
41121 #: ../tools/virt-make-fs.pl:57
41122 msgid "Basic usage is:"
41126 #: ../tools/virt-make-fs.pl:59
41129 " virt-make-fs input output.img\n"
41134 #: ../tools/virt-make-fs.pl:61
41136 "where C<input> is either a directory containing files that you want to add, "
41137 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
41138 "C<output.img> is a disk image. The input type is detected automatically. "
41139 "The output disk image defaults to a raw ext2 sparse image unless you specify "
41140 "extra flags (see L</OPTIONS> below)."
41144 #: ../tools/virt-make-fs.pl:67
41145 msgid "FILESYSTEM TYPE"
41149 #: ../tools/virt-make-fs.pl:69
41151 "The default filesystem type is C<ext2>. Just about any filesystem type that "
41152 "libguestfs supports can be used (but I<not> read-only formats like "
41153 "ISO9660). Here are some of the more common choices:"
41157 #: ../tools/virt-make-fs.pl:75
41162 #: ../tools/virt-make-fs.pl:77
41164 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
41165 "you are not going to use the filesystem in a way that requires the journal, "
41166 "then this is just wasted overhead."
41170 #: ../tools/virt-make-fs.pl:81
41171 msgid "I<ntfs> or I<vfat>"
41175 #: ../tools/virt-make-fs.pl:83
41176 msgid "Useful if exporting data to a Windows guest."
41180 #: ../tools/virt-make-fs.pl:85
41182 "I<Note for vfat>: The tar archive or local directory must only contain files "
41183 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
41184 "program running within libguestfs is unable to change the ownership of "
41185 "non-root files, since vfat itself does not support this."
41189 #: ../tools/virt-make-fs.pl:90
41194 #: ../tools/virt-make-fs.pl:92
41196 "Lower overhead than C<ext2>, but certain limitations on filename length and "
41197 "total filesystem size."
41201 #: ../tools/virt-make-fs.pl:97 ../tools/virt-make-fs.pl:116 ../tools/virt-make-fs.pl:149
41206 #: ../tools/virt-make-fs.pl:99
41209 " virt-make-fs --type=minix input minixfs.img\n"
41214 #: ../tools/virt-make-fs.pl:101
41215 msgid "TO PARTITION OR NOT TO PARTITION"
41219 #: ../tools/virt-make-fs.pl:103
41220 msgid "Optionally virt-make-fs can add a partition table to the output disk."
41224 #: ../tools/virt-make-fs.pl:105
41226 "Adding a partition can make the disk image more compatible with certain "
41227 "virtualized operating systems which don't expect to see a filesystem "
41228 "directly located on a block device (Linux doesn't care and will happily "
41229 "handle both types)."
41233 #: ../tools/virt-make-fs.pl:110
41235 "On the other hand, if you have a partition table then the output image is no "
41236 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
41237 "directly on a partitioned disk image. (However libguestfs tools such as "
41238 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
41242 #: ../tools/virt-make-fs.pl:118
41243 msgid "Add an MBR partition:"
41247 #: ../tools/virt-make-fs.pl:120
41250 " virt-make-fs --partition -- input disk.img\n"
41255 #: ../tools/virt-make-fs.pl:122
41257 "If the output disk image could be terabyte-sized or larger, it's better to "
41258 "use an EFI/GPT-compatible partition table:"
41262 #: ../tools/virt-make-fs.pl:125
41265 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
41270 #: ../tools/virt-make-fs.pl:127
41271 msgid "EXTRA SPACE"
41275 #: ../tools/virt-make-fs.pl:129
41277 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
41278 "the files that it contains, but might have extra space. Depending on how "
41279 "you are going to use the output, you might think this extra space is wasted "
41280 "and want to minimize it, or you might want to leave space so that more files "
41281 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
41282 "but you can use the I<--size> flag to leave space in the filesystem if you "
41287 #: ../tools/virt-make-fs.pl:137
41289 "An alternative way to leave extra space but not make the output image any "
41290 "bigger is to use an alternative disk image format (instead of the default "
41291 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
41292 "image format (check your hypervisor supports this before using it). This "
41293 "allows you to choose a large I<--size> but the extra space won't actually be "
41294 "allocated in the image until you try to store something in it."
41298 #: ../tools/virt-make-fs.pl:145
41300 "Don't forget that you can also use local commands including L<resize2fs(8)> "
41301 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
41302 "to build another image from scratch."
41306 #: ../tools/virt-make-fs.pl:151
41309 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
41314 #: ../tools/virt-make-fs.pl:179
41315 msgid "Enable debugging information."
41319 #: ../tools/virt-make-fs.pl:185
41320 msgid "B<--size=E<lt>NE<gt>>"
41324 #: ../tools/virt-make-fs.pl:187
41325 msgid "B<--size=+E<lt>NE<gt>>"
41329 #: ../tools/virt-make-fs.pl:189
41330 msgid "B<-s E<lt>NE<gt>>"
41334 #: ../tools/virt-make-fs.pl:191
41335 msgid "B<-s +E<lt>NE<gt>>"
41339 #: ../tools/virt-make-fs.pl:193
41340 msgid "Use the I<--size> (or I<-s>) option to choose the size of the output image."
41344 #: ../tools/virt-make-fs.pl:196
41346 "If this option is I<not> given, then the output image will be just large "
41347 "enough to contain all the files, with not much wasted space."
41351 #: ../tools/virt-make-fs.pl:199
41353 "To choose a fixed size output disk, specify an absolute number followed by "
41354 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
41355 "Petabytes or Exabytes. This must be large enough to contain all the input "
41356 "files, else you will get an error."
41360 #: ../tools/virt-make-fs.pl:204
41362 "To leave extra space, specify C<+> (plus sign) and a number followed by "
41363 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
41364 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
41365 "the input files, and (approximately) an extra 200 MB free space."
41369 #: ../tools/virt-make-fs.pl:210
41371 "Note that virt-make-fs estimates free space, and therefore will not produce "
41372 "filesystems containing precisely the free space requested. (It is much more "
41373 "expensive and time-consuming to produce a filesystem which has precisely the "
41374 "desired free space)."
41378 #: ../tools/virt-make-fs.pl:219
41379 msgid "B<--format=E<lt>fmtE<gt>>"
41383 #: ../tools/virt-make-fs.pl:221
41384 msgid "B<-F E<lt>fmtE<gt>>"
41388 #: ../tools/virt-make-fs.pl:223
41389 msgid "Choose the output disk image format."
41393 #: ../tools/virt-make-fs.pl:225
41394 msgid "The default is C<raw> (raw sparse disk image)."
41398 #: ../tools/virt-make-fs.pl:227
41400 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
41401 "that would really make sense here is C<qcow2>."
41405 #: ../tools/virt-make-fs.pl:234
41406 msgid "B<--type=E<lt>fsE<gt>>"
41410 #: ../tools/virt-make-fs.pl:236
41411 msgid "B<-t E<lt>fsE<gt>>"
41415 #: ../tools/virt-make-fs.pl:238
41416 msgid "Choose the output filesystem type."
41420 #: ../tools/virt-make-fs.pl:240
41421 msgid "The default is C<ext2>."
41425 #: ../tools/virt-make-fs.pl:242
41426 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
41430 #: ../tools/virt-make-fs.pl:249
41431 msgid "B<--partition>"
41435 #: ../tools/virt-make-fs.pl:251
41436 msgid "B<--partition=E<lt>parttypeE<gt>>"
41440 #: ../tools/virt-make-fs.pl:253
41442 "If specified, this flag adds an MBR partition table to the output disk "
41447 #: ../tools/virt-make-fs.pl:256
41449 "You can change the partition table type, eg. I<--partition=gpt> for large "
41454 #: ../tools/virt-make-fs.pl:259
41456 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
41457 "might consider the next parameter to be the partition type. For example:"
41461 #: ../tools/virt-make-fs.pl:263
41464 " virt-make-fs --partition input.tar output.img\n"
41469 #: ../tools/virt-make-fs.pl:265
41471 "would cause virt-make-fs to think you wanted to use a partition type of "
41472 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
41473 "dash) between options and the input and output arguments:"
41477 #: ../tools/virt-make-fs.pl:269
41480 " virt-make-fs --partition -- input.tar output.img\n"
41485 #: ../tools/virt-make-fs.pl:271
41486 msgid "For MBR, virt-make-fs sets the partition type byte automatically."
41490 #: ../tools/virt-make-fs.pl:559
41492 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
41493 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
41494 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
41498 #: ../tools/virt-make-fs.pl:573 ../tools/virt-win-reg.pl:774
41500 "When reporting bugs, please enable debugging and capture the I<complete> "
41505 #: ../tools/virt-make-fs.pl:576
41508 " export LIBGUESTFS_DEBUG=1\n"
41509 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
41514 #: ../tools/virt-make-fs.pl:579
41516 "Attach /tmp/virt-make-fs.log to a new bug report at "
41517 "L<https://bugzilla.redhat.com/>"
41521 #: ../tools/virt-tar.pl:33
41522 msgid "virt-tar - Extract or upload files to a virtual machine"
41526 #: ../tools/virt-tar.pl:37
41529 " virt-tar [--options] -x domname directory tarball\n"
41534 #: ../tools/virt-tar.pl:39
41537 " virt-tar [--options] -u domname tarball directory\n"
41542 #: ../tools/virt-tar.pl:41
41545 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
41550 #: ../tools/virt-tar.pl:43
41553 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
41558 #: ../tools/virt-tar.pl:45 ../tools/virt-win-reg.pl:88
41563 #: ../tools/virt-tar.pl:47
41565 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
41566 "L<virt-tar-in(1)>, L<virt-tar-out(1)> as replacements."
41570 #: ../tools/virt-tar.pl:52
41571 msgid "Download C</home> from the VM into a local tarball:"
41575 #: ../tools/virt-tar.pl:54
41578 " virt-tar -x domname /home home.tar\n"
41583 #: ../tools/virt-tar.pl:56
41586 " virt-tar -zx domname /home home.tar.gz\n"
41591 #: ../tools/virt-tar.pl:58
41592 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
41596 #: ../tools/virt-tar.pl:60
41599 " virt-tar -u domname uploadstuff.tar /tmp\n"
41604 #: ../tools/virt-tar.pl:62
41607 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
41612 #: ../tools/virt-tar.pl:66
41614 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
41615 "virtual machines. If you do this, you risk disk corruption in the VM. "
41616 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
41620 #: ../tools/virt-tar.pl:71
41622 "You can use I<-x> (extract) on live virtual machines, but you might get "
41623 "inconsistent results or errors if there is filesystem activity inside the "
41624 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
41625 "work, but the only way to guarantee consistent results is if the virtual "
41626 "machine is shut down."
41630 #: ../tools/virt-tar.pl:79
41632 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
41633 "parts of a guest filesystem. There are many possibilities: making backups, "
41634 "uploading data files, snooping on guest activity, fixing or customizing "
41639 #: ../tools/virt-tar.pl:84
41641 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
41642 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
41643 "should look at the L<guestfish(1)> tool."
41647 #: ../tools/virt-tar.pl:88
41649 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
41650 "its contents (recursively) from the virtual machine into a local tarball. "
41651 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
41652 "virtual machine. You cannot use these two options together."
41656 #: ../tools/virt-tar.pl:94
41658 "In addition, you may need to use the I<-z> (gZip) option to enable "
41659 "compression. When uploading, you have to specify I<-z> if the upload file "
41660 "is compressed because virt-tar won't detect this on its own."
41664 #: ../tools/virt-tar.pl:98
41666 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
41667 "example it cannot do PKZip files or bzip2 compression. If you want that "
41668 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
41669 "the L<libguestfs(3)> API)."
41673 #: ../tools/virt-tar.pl:160
41674 msgid "B<--extract>"
41678 #: ../tools/virt-tar.pl:162
41679 msgid "B<--download>"
41683 #: ../tools/virt-tar.pl:164
41688 #: ../tools/virt-tar.pl:166
41689 msgid "B<--upload>"
41693 #: ../tools/virt-tar.pl:168
41695 "Use I<-x> to extract (download) a directory from a virtual machine to a "
41700 #: ../tools/virt-tar.pl:171
41702 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
41703 "Please read the L</WARNING> section above before using this option."
41707 #: ../tools/virt-tar.pl:175
41708 msgid "You must specify exactly one of these options."
41712 #: ../tools/virt-tar.pl:181
41717 #: ../tools/virt-tar.pl:183
41722 #: ../tools/virt-tar.pl:185
41723 msgid "Specify that the input or output tarball is gzip-compressed."
41727 #: ../tools/virt-tar.pl:298
41729 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
41730 "L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
41731 "L<virt-tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
41732 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41736 #: ../tools/virt-win-reg.pl:37
41738 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
41743 #: ../tools/virt-win-reg.pl:41
41746 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
41751 #: ../tools/virt-win-reg.pl:43
41754 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
41759 #: ../tools/virt-win-reg.pl:45
41762 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
41767 #: ../tools/virt-win-reg.pl:47
41770 " virt-win-reg --merge domname [input.reg ...]\n"
41775 #: ../tools/virt-win-reg.pl:49
41778 " virt-win-reg [--options] disk.img ... # instead of domname\n"
41783 #: ../tools/virt-win-reg.pl:53
41785 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
41786 "virtual machines. If you do this, you I<will> get irreversible disk "
41787 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
41788 "but doesn't catch all cases."
41792 #: ../tools/virt-win-reg.pl:58
41794 "Modifying the Windows Registry is an inherently risky operation. The format "
41795 "is deliberately obscure and undocumented, and Registry changes can leave the "
41796 "system unbootable. Therefore when using the I<--merge> option, make sure "
41797 "you have a reliable backup first."
41801 #: ../tools/virt-win-reg.pl:65
41803 "This program can export and merge Windows Registry entries from a Windows "
41808 #: ../tools/virt-win-reg.pl:68
41810 "The first parameter is the libvirt guest name or the raw disk image of a "
41815 #: ../tools/virt-win-reg.pl:71
41817 "If I<--merge> is I<not> specified, then the chosen registry key is "
41818 "displayed/exported (recursively). For example:"
41822 #: ../tools/virt-win-reg.pl:74
41825 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
41830 #: ../tools/virt-win-reg.pl:76
41831 msgid "You can also display single values from within registry keys, for example:"
41835 #: ../tools/virt-win-reg.pl:79
41838 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
41839 " $ virt-win-reg Windows7 $cvkey ProductName\n"
41840 " Windows 7 Enterprise\n"
41845 #: ../tools/virt-win-reg.pl:83
41847 "With I<--merge>, you can merge a textual regedit file into the Windows "
41852 #: ../tools/virt-win-reg.pl:86
41855 " $ virt-win-reg --merge Windows7 changes.reg\n"
41860 #: ../tools/virt-win-reg.pl:90
41862 "This program is only meant for simple access to the registry. If you want "
41863 "to do complicated things with the registry, we suggest you download the "
41864 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
41865 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
41866 "L<hivexregedit(1)>."
41870 #: ../tools/virt-win-reg.pl:159
41875 #: ../tools/virt-win-reg.pl:161
41877 "In merge mode, this merges a textual regedit file into the Windows Registry "
41878 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
41879 "displays or exports Registry entries instead."
41883 #: ../tools/virt-win-reg.pl:165
41885 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
41886 "result in disk corruption. However exporting (without this flag) is always "
41891 #: ../tools/virt-win-reg.pl:173
41892 msgid "B<--encoding> UTF-16LE|ASCII"
41896 #: ../tools/virt-win-reg.pl:175
41898 "When merging (only), you may need to specify the encoding for strings to be "
41899 "used in the hive file. This is explained in detail in "
41900 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
41904 #: ../tools/virt-win-reg.pl:179
41906 "The default is to use UTF-16LE, which should work with recent versions of "
41911 #: ../tools/virt-win-reg.pl:186
41912 msgid "B<--unsafe-printable-strings>"
41916 #: ../tools/virt-win-reg.pl:188
41918 "When exporting (only), assume strings are UTF-16LE and print them as strings "
41919 "instead of hex sequences. Remove the final zero codepoint from strings if "
41924 #: ../tools/virt-win-reg.pl:192
41926 "This is unsafe and does not preserve the fidelity of strings in the original "
41927 "Registry for various reasons:"
41931 #: ../tools/virt-win-reg.pl:199
41933 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
41934 "other encodings will be corrupted by this transformation."
41938 #: ../tools/virt-win-reg.pl:204
41940 "Assumes that everything which has type 1 or 2 is really a string and that "
41941 "everything else is not a string, but the type field in real Registries is "
41946 #: ../tools/virt-win-reg.pl:210
41948 "Loses information about whether a zero codepoint followed the string in the "
41953 #: ../tools/virt-win-reg.pl:215
41955 "This all happens because the Registry itself contains no information about "
41956 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
41960 #: ../tools/virt-win-reg.pl:219
41962 "You should only use this option for quick hacking and debugging of the "
41963 "Registry contents, and I<never> use it if the output is going to be passed "
41964 "into another program or stored in another Registry."
41968 #: ../tools/virt-win-reg.pl:556
41969 msgid "SUPPORTED SYSTEMS"
41973 #: ../tools/virt-win-reg.pl:558
41975 "The program currently supports Windows NT-derived guests starting with "
41976 "Windows XP through to at least Windows 7."
41980 #: ../tools/virt-win-reg.pl:561
41981 msgid "The following Registry keys are supported:"
41985 #: ../tools/virt-win-reg.pl:565
41986 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
41990 #: ../tools/virt-win-reg.pl:567
41991 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
41995 #: ../tools/virt-win-reg.pl:569
41996 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
42000 #: ../tools/virt-win-reg.pl:571
42001 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
42005 #: ../tools/virt-win-reg.pl:573
42006 msgid "C<HKEY_USERS\\.DEFAULT>"
42010 #: ../tools/virt-win-reg.pl:575
42011 msgid "C<HKEY_USERS\\I<SID>>"
42015 #: ../tools/virt-win-reg.pl:577
42016 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
42020 #: ../tools/virt-win-reg.pl:579
42021 msgid "C<HKEY_USERS\\I<username>>"
42025 #: ../tools/virt-win-reg.pl:581
42026 msgid "where I<username> is a local user name (this is a libguestfs extension)."
42030 #: ../tools/virt-win-reg.pl:585
42032 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
42037 #: ../tools/virt-win-reg.pl:588
42039 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
42040 "supported (there is no \"current user\")."
42044 #: ../tools/virt-win-reg.pl:591
42049 #: ../tools/virt-win-reg.pl:593
42051 "C<virt-win-reg> expects that regedit files have already been reencoded in "
42052 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
42053 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
42054 "with Windows-style line endings, you may need to reencode the whole file "
42055 "before or after processing."
42059 #: ../tools/virt-win-reg.pl:599
42061 "To reencode a file from Windows format to Linux (before processing it with "
42062 "the I<--merge> option), you would do something like this:"
42066 #: ../tools/virt-win-reg.pl:602
42069 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
42074 #: ../tools/virt-win-reg.pl:604
42076 "To go in the opposite direction, after exporting and before sending the file "
42077 "to a Windows user, do something like this:"
42081 #: ../tools/virt-win-reg.pl:607
42084 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
42089 #: ../tools/virt-win-reg.pl:609
42090 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
42094 #: ../tools/virt-win-reg.pl:611
42096 "If you are unsure about the current encoding, use the L<file(1)> command. "
42097 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
42098 "Windows-style (CRLF) line endings, like this:"
42102 #: ../tools/virt-win-reg.pl:615
42105 " $ file software.reg\n"
42106 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
42107 " with CRLF line terminators\n"
42112 #: ../tools/virt-win-reg.pl:619
42113 msgid "This file would need conversion before you could I<--merge> it."
42117 #: ../tools/virt-win-reg.pl:621
42118 msgid "CurrentControlSet etc."
42122 #: ../tools/virt-win-reg.pl:623
42124 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
42125 "Registry at the level of the hive file, and therefore you cannot modify "
42130 #: ../tools/virt-win-reg.pl:627
42132 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
42133 "circumstances it might refer to another control set. The way to find out is "
42134 "to look at the C<HKLM\\SYSTEM\\Select> key:"
42138 #: ../tools/virt-win-reg.pl:631
42141 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
42142 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
42143 " \"Current\"=dword:00000001\n"
42144 " \"Default\"=dword:00000001\n"
42145 " \"Failed\"=dword:00000000\n"
42146 " \"LastKnownGood\"=dword:00000002\n"
42151 #: ../tools/virt-win-reg.pl:638
42152 msgid "\"Current\" is the one which Windows will choose when it boots."
42156 #: ../tools/virt-win-reg.pl:640
42157 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
42161 #: ../tools/virt-win-reg.pl:643
42162 msgid "DELETING REGISTRY KEYS AND VALUES"
42166 #: ../tools/virt-win-reg.pl:645
42167 msgid "To delete a whole registry key, use the syntax:"
42171 #: ../tools/virt-win-reg.pl:647
42174 " [-HKEY_LOCAL_MACHINE\\Foo]\n"
42179 #: ../tools/virt-win-reg.pl:649
42180 msgid "To delete a single value within a key, use the syntax:"
42184 #: ../tools/virt-win-reg.pl:651
42187 " [HKEY_LOCAL_MACHINE\\Foo]\n"
42193 #: ../tools/virt-win-reg.pl:654
42194 msgid "WINDOWS TIPS"
42198 #: ../tools/virt-win-reg.pl:656
42200 "Note that some of these tips modify the guest disk image. The guest I<must> "
42201 "be shut off, else you will get disk corruption."
42205 #: ../tools/virt-win-reg.pl:659
42206 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
42210 #: ../tools/virt-win-reg.pl:661
42212 "Prepare a DOS batch script, VBScript or executable. Upload this using "
42213 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
42214 "is uploaded into C<C:\\>:"
42218 #: ../tools/virt-win-reg.pl:665
42221 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
42226 #: ../tools/virt-win-reg.pl:667
42227 msgid "Prepare a regedit file containing the registry change:"
42231 #: ../tools/virt-win-reg.pl:669
42234 " cat > test.reg <<'EOF'\n"
42235 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
42236 " \"Test\"=\"c:\\\\test.bat\"\n"
42242 #: ../tools/virt-win-reg.pl:674
42244 "In this example we use the key C<RunOnce> which means that the script will "
42245 "run precisely once when the first user logs in. If you want it to run every "
42246 "time a user logs in, replace C<RunOnce> with C<Run>."
42250 #: ../tools/virt-win-reg.pl:678
42251 msgid "Now update the registry:"
42255 #: ../tools/virt-win-reg.pl:680
42258 " virt-win-reg --merge WindowsGuest test.reg\n"
42263 #: ../tools/virt-win-reg.pl:682
42264 msgid "INSTALLING A SERVICE"
42268 #: ../tools/virt-win-reg.pl:684
42270 "This section assumes you are familiar with Windows services, and you either "
42271 "have a program which handles the Windows Service Control Protocol directly "
42272 "or you want to run any program using a service wrapper like SrvAny or the "
42277 #: ../tools/virt-win-reg.pl:689
42279 "First upload the program and optionally the service wrapper. In this case "
42280 "the test program is called C<test.exe> and we are using the RHSrvAny "
42285 #: ../tools/virt-win-reg.pl:693
42288 " guestfish -i -d WindowsGuest <<EOF\n"
42289 " upload rhsrvany.exe /rhsrvany.exe\n"
42290 " upload test.exe /test.exe\n"
42296 #: ../tools/virt-win-reg.pl:698
42298 "Prepare a regedit file containing the registry changes. In this example, "
42299 "the first registry change is needed for the service itself or the service "
42300 "wrapper (if used). The second registry change is only needed because I am "
42301 "using the RHSrvAny service wrapper."
42305 #: ../tools/virt-win-reg.pl:703
42308 " cat > service.reg <<'EOF'\n"
42309 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
42310 " \"Type\"=dword:00000010\n"
42311 " \"Start\"=dword:00000002\n"
42312 " \"ErrorControl\"=dword:00000001\n"
42313 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
42314 " \"DisplayName\"=\"RHSrvAny\"\n"
42315 " \"ObjectName\"=\"NetworkService\"\n"
42320 #: ../tools/virt-win-reg.pl:712
42323 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
42324 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
42325 " \"PWD\"=\"c:\\\\Temp\"\n"
42331 #: ../tools/virt-win-reg.pl:723
42333 "For use of C<ControlSet001> see the section above in this manual page. You "
42334 "may need to adjust this according to the control set that is in use by the "
42339 #: ../tools/virt-win-reg.pl:729
42341 "C<\"ObjectName\"> controls the privileges that the service will have. An "
42342 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
42343 "privileged account."
42347 #: ../tools/virt-win-reg.pl:735
42349 "For the meaning of the magic numbers, see this Microsoft KB article: "
42350 "L<http://support.microsoft.com/kb/103000>."
42354 #: ../tools/virt-win-reg.pl:740
42355 msgid "Update the registry:"
42359 #: ../tools/virt-win-reg.pl:742
42362 " virt-win-reg --merge WindowsGuest service.reg\n"
42367 #: ../tools/virt-win-reg.pl:746
42369 "Be careful when passing parameters containing C<\\> (backslash) in the "
42370 "shell. Usually you will have to use 'single quotes' or double backslashes "
42371 "(but not both) to protect them from the shell."
42375 #: ../tools/virt-win-reg.pl:750
42376 msgid "Paths and value names are case-insensitive."
42380 #: ../tools/virt-win-reg.pl:759
42382 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
42383 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
42384 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
42385 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
42389 #: ../tools/virt-win-reg.pl:777
42392 " export LIBGUESTFS_DEBUG=1\n"
42393 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
42398 #: ../tools/virt-win-reg.pl:780
42400 "Attach /tmp/virt-win-reg.log to a new bug report at "
42401 "L<https://bugzilla.redhat.com/>"