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.12.0\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2011-07-20 17:31+0200\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 #: ../cat/virt-cat.pod:3 ../cat/virt-filesystems.pod:3 ../cat/virt-ls.pod:3 ../df/virt-df.pod:3 ../edit/virt-edit.pod:3 ../examples/guestfs-examples.pod:3 ../examples/guestfs-recipes.pod:14 ../fish/guestfish.pod:3 ../fish/virt-copy-in.pod:3 ../fish/virt-copy-out.pod:3 ../fish/virt-tar-in.pod:3 ../fish/virt-tar-out.pod:3 ../fuse/guestmount.pod:3 ../inspector/virt-inspector.pod:3 ../java/examples/guestfs-java.pod:3 ../ocaml/examples/guestfs-ocaml.pod:3 ../perl/examples/guestfs-perl.pod:3 ../python/examples/guestfs-python.pod:3 ../rescue/virt-rescue.pod:3 ../resize/virt-resize.pod:3 ../ruby/examples/guestfs-ruby.pod:3 ../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 #: ../cat/virt-cat.pod:5
27 msgid "virt-cat - Display files in a virtual machine"
31 #: ../cat/virt-cat.pod:7 ../cat/virt-filesystems.pod:7 ../cat/virt-ls.pod:7 ../df/virt-df.pod:7 ../edit/virt-edit.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 ../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 #: ../cat/virt-cat.pod:9
39 " virt-cat [--options] -d domname file [file ...]\n"
44 #: ../cat/virt-cat.pod:11
47 " virt-cat [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
52 #: ../cat/virt-cat.pod:13 ../edit/virt-edit.pod:15 ../inspector/virt-inspector.pod:13
57 #: ../cat/virt-cat.pod:15
60 " virt-cat domname file\n"
65 #: ../cat/virt-cat.pod:17
68 " virt-cat disk.img file\n"
73 #: ../cat/virt-cat.pod:19 ../cat/virt-filesystems.pod:13 ../cat/virt-ls.pod:19 ../df/virt-df.pod:21 ../edit/virt-edit.pod:27 ../examples/guestfs-examples.pod:19 ../examples/guestfs-recipes.pod:18 ../fish/guestfish.pod:30 ../fish/virt-copy-in.pod:19 ../fish/virt-copy-out.pod:13 ../fish/virt-tar-in.pod:21 ../fish/virt-tar-out.pod:15 ../fuse/guestmount.pod:20 ../inspector/virt-inspector.pod:19 ../java/examples/guestfs-java.pod:15 ../ocaml/examples/guestfs-ocaml.pod:25 ../perl/examples/guestfs-perl.pod:18 ../python/examples/guestfs-python.pod:14 ../rescue/virt-rescue.pod:29 ../resize/virt-resize.pod:13 ../ruby/examples/guestfs-ruby.pod:15 ../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
78 #: ../cat/virt-cat.pod:21
80 "C<virt-cat> is a command line tool to display the contents of C<file> where "
81 "C<file> exists in the named virtual machine (or disk image)."
85 #: ../cat/virt-cat.pod:24
87 "Multiple filenames can be given, in which case they are concatenated "
88 "together. Each filename must be a full path, starting at the root directory "
89 "(starting with '/')."
93 #: ../cat/virt-cat.pod:28
95 "C<virt-cat> can be used to quickly view a file. To edit a file, use "
96 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
97 "tool (see L</USING GUESTFISH> below)."
101 #: ../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:1007 ../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 ../tools/virt-tar.pl:50
106 #: ../cat/virt-cat.pod:34
107 msgid "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
111 #: ../cat/virt-cat.pod:37
114 " virt-cat -d mydomain /etc/fstab\n"
119 #: ../cat/virt-cat.pod:39
120 msgid "List syslog messages from a VM disk image file:"
124 #: ../cat/virt-cat.pod:41
127 " virt-cat -a disk.img /var/log/messages | tail\n"
132 #: ../cat/virt-cat.pod:43
133 msgid "Find out what DHCP IP address a VM acquired:"
137 #: ../cat/virt-cat.pod:45
140 " virt-cat -d mydomain /var/log/messages | \\\n"
141 " grep 'dhclient: bound to' | tail\n"
146 #: ../cat/virt-cat.pod:48
147 msgid "Find out what packages were recently installed:"
151 #: ../cat/virt-cat.pod:50
154 " virt-cat -d mydomain /var/log/yum.log | tail\n"
159 #: ../cat/virt-cat.pod:52
160 msgid "Find out who is logged on inside a virtual machine:"
164 #: ../cat/virt-cat.pod:54
167 " virt-cat -d mydomain /var/run/utmp > /tmp/utmp\n"
173 #: ../cat/virt-cat.pod:57
174 msgid "or who was logged on:"
178 #: ../cat/virt-cat.pod:59
181 " virt-cat -d mydomain /var/log/wtmp > /tmp/wtmp\n"
182 " last -f /tmp/wtmp\n"
187 #: ../cat/virt-cat.pod:62 ../cat/virt-filesystems.pod:91 ../cat/virt-ls.pod:261 ../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:83 ../inspector/virt-inspector.pod:55 ../rescue/virt-rescue.pod:84 ../resize/virt-resize.pod:241 ../test-tool/libguestfs-test-tool.pod:37 ../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
192 #: ../cat/virt-cat.pod:66 ../cat/virt-filesystems.pod:95 ../cat/virt-ls.pod:265 ../df/virt-df.pod:63 ../edit/virt-edit.pod:66 ../fish/guestfish.pod:152 ../fuse/guestmount.pod:151 ../inspector/virt-inspector.pod:59 ../rescue/virt-rescue.pod:88 ../resize/virt-resize.pod:245 ../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
197 #: ../cat/virt-cat.pod:68 ../cat/virt-filesystems.pod:97 ../cat/virt-ls.pod:267 ../df/virt-df.pod:65 ../edit/virt-edit.pod:68 ../inspector/virt-inspector.pod:61 ../rescue/virt-rescue.pod:90 ../tools/virt-list-filesystems.pl:63 ../tools/virt-list-partitions.pl:64 ../tools/virt-make-fs.pl:163 ../tools/virt-tar.pl:113 ../tools/virt-win-reg.pl:106
198 msgid "Display brief help."
202 #: ../cat/virt-cat.pod:70 ../cat/virt-filesystems.pod:99 ../cat/virt-ls.pod:269 ../df/virt-df.pod:67 ../edit/virt-edit.pod:70 ../inspector/virt-inspector.pod:63 ../rescue/virt-rescue.pod:92
207 #: ../cat/virt-cat.pod:72 ../cat/virt-filesystems.pod:101 ../cat/virt-ls.pod:271 ../df/virt-df.pod:69 ../edit/virt-edit.pod:72 ../inspector/virt-inspector.pod:65 ../rescue/virt-rescue.pod:94
208 msgid "B<--add> file"
212 #: ../cat/virt-cat.pod:74 ../cat/virt-filesystems.pod:103 ../cat/virt-ls.pod:273 ../df/virt-df.pod:71 ../edit/virt-edit.pod:74 ../inspector/virt-inspector.pod:67 ../rescue/virt-rescue.pod:96
214 "Add I<file> which should be a disk image from a virtual machine. If the "
215 "virtual machine has multiple block devices, you must supply all of them with "
216 "separate I<-a> options."
220 #: ../cat/virt-cat.pod:78 ../cat/virt-filesystems.pod:107 ../cat/virt-ls.pod:277 ../df/virt-df.pod:75 ../edit/virt-edit.pod:78 ../fish/guestfish.pod:174 ../fuse/guestmount.pod:93 ../inspector/virt-inspector.pod:71 ../rescue/virt-rescue.pod:100
222 "The format of the disk image is auto-detected. To override this and force a "
223 "particular format use the I<--format=..> option."
227 #: ../cat/virt-cat.pod:81 ../cat/virt-filesystems.pod:125 ../cat/virt-ls.pod:291 ../df/virt-df.pod:78 ../rescue/virt-rescue.pod:107
232 #: ../cat/virt-cat.pod:83 ../cat/virt-filesystems.pod:127 ../cat/virt-ls.pod:293 ../df/virt-df.pod:80 ../rescue/virt-rescue.pod:109
233 msgid "B<--connect> URI"
237 #: ../cat/virt-cat.pod:85 ../cat/virt-filesystems.pod:129 ../cat/virt-ls.pod:295 ../df/virt-df.pod:82 ../edit/virt-edit.pod:99 ../inspector/virt-inspector.pod:78 ../rescue/virt-rescue.pod:111 ../tools/virt-list-filesystems.pl:81 ../tools/virt-list-partitions.pl:82 ../tools/virt-tar.pl:131 ../tools/virt-win-reg.pl:132
239 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
240 "to the default libvirt hypervisor."
244 #: ../cat/virt-cat.pod:88 ../cat/virt-filesystems.pod:132 ../cat/virt-ls.pod:298 ../df/virt-df.pod:85 ../rescue/virt-rescue.pod:114
246 "If you specify guest block devices directly (I<-a>), then libvirt is not "
251 #: ../cat/virt-cat.pod:91 ../cat/virt-filesystems.pod:141 ../cat/virt-ls.pod:307 ../df/virt-df.pod:88 ../edit/virt-edit.pod:105 ../inspector/virt-inspector.pod:85 ../rescue/virt-rescue.pod:117
256 #: ../cat/virt-cat.pod:93 ../cat/virt-filesystems.pod:143 ../cat/virt-ls.pod:309 ../df/virt-df.pod:90 ../edit/virt-edit.pod:107 ../inspector/virt-inspector.pod:87 ../rescue/virt-rescue.pod:119
257 msgid "B<--domain> guest"
261 #: ../cat/virt-cat.pod:95 ../cat/virt-filesystems.pod:145 ../cat/virt-ls.pod:311 ../df/virt-df.pod:92 ../edit/virt-edit.pod:109 ../inspector/virt-inspector.pod:89 ../rescue/virt-rescue.pod:121
263 "Add all the disks from the named libvirt guest. Domain UUIDs can be used "
268 #: ../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:126 ../inspector/virt-inspector.pod:92
269 msgid "B<--echo-keys>"
273 #: ../cat/virt-cat.pod:100
275 "When prompting for keys and passphrases, virt-cat normally turns echoing off "
276 "so you cannot see what you are typing. If you are not worried about Tempest "
277 "attacks and there is no one else in the room you can specify this flag to "
278 "see what you are typing."
282 #: ../cat/virt-cat.pod:105 ../cat/virt-filesystems.pod:170 ../cat/virt-ls.pod:328 ../df/virt-df.pod:95 ../fish/guestfish.pod:233 ../fuse/guestmount.pod:133 ../inspector/virt-inspector.pod:99 ../rescue/virt-rescue.pod:124
283 msgid "B<--format=raw|qcow2|..>"
287 #: ../cat/virt-cat.pod:107 ../cat/virt-filesystems.pod:172 ../cat/virt-ls.pod:330 ../df/virt-df.pod:97 ../edit/virt-edit.pod:134 ../fish/guestfish.pod:235 ../fuse/guestmount.pod:135 ../inspector/virt-inspector.pod:101 ../rescue/virt-rescue.pod:126
292 #: ../cat/virt-cat.pod:109 ../cat/virt-filesystems.pod:174 ../cat/virt-ls.pod:332 ../df/virt-df.pod:99 ../edit/virt-edit.pod:136 ../fish/guestfish.pod:237 ../fuse/guestmount.pod:137 ../rescue/virt-rescue.pod:128
294 "The default for the I<-a> option is to auto-detect the format of the disk "
295 "image. Using this forces the disk format for I<-a> options which follow on "
296 "the command line. Using I<--format> with no argument switches back to "
297 "auto-detection for subsequent I<-a> options."
301 #: ../cat/virt-cat.pod:114 ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337 ../df/virt-df.pod:104 ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242 ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:335 ../rescue/virt-rescue.pod:133 ../src/guestfs.pod:2652
306 #: ../cat/virt-cat.pod:116
309 " virt-cat --format=raw -a disk.img file\n"
314 #: ../cat/virt-cat.pod:118 ../cat/virt-filesystems.pod:183 ../cat/virt-ls.pod:341 ../df/virt-df.pod:108 ../edit/virt-edit.pod:145 ../fish/guestfish.pod:246 ../rescue/virt-rescue.pod:137
315 msgid "forces raw format (no auto-detection) for C<disk.img>."
319 #: ../cat/virt-cat.pod:120
322 " virt-cat --format=raw -a disk.img --format -a another.img file\n"
327 #: ../cat/virt-cat.pod:122 ../cat/virt-filesystems.pod:187 ../cat/virt-ls.pod:345 ../df/virt-df.pod:112 ../edit/virt-edit.pod:149 ../fish/guestfish.pod:250 ../rescue/virt-rescue.pod:141
329 "forces raw format (no auto-detection) for C<disk.img> and reverts to "
330 "auto-detection for C<another.img>."
334 #: ../cat/virt-cat.pod:125 ../cat/virt-filesystems.pod:190 ../cat/virt-ls.pod:348 ../df/virt-df.pod:115 ../edit/virt-edit.pod:152 ../rescue/virt-rescue.pod:144
336 "If you have untrusted raw-format guest disk images, you should use this "
337 "option to specify the disk format. This avoids a possible security problem "
338 "with malicious guests (CVE-2010-3851)."
342 #: ../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:163 ../inspector/virt-inspector.pod:114
343 msgid "B<--keys-from-stdin>"
347 #: ../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:165 ../inspector/virt-inspector.pod:116
349 "Read key or passphrase parameters from stdin. The default is to try to read "
350 "passphrases from the user by opening C</dev/tty>."
354 #: ../cat/virt-cat.pod:134 ../cat/virt-filesystems.pod:261 ../cat/virt-ls.pod:425 ../df/virt-df.pod:167 ../edit/virt-edit.pod:161 ../fish/guestfish.pod:390 ../fuse/guestmount.pod:257 ../inspector/virt-inspector.pod:119 ../rescue/virt-rescue.pod:178
359 #: ../cat/virt-cat.pod:136 ../cat/virt-filesystems.pod:263 ../cat/virt-ls.pod:427 ../df/virt-df.pod:169 ../edit/virt-edit.pod:163 ../fish/guestfish.pod:392 ../fuse/guestmount.pod:259 ../inspector/virt-inspector.pod:121 ../rescue/virt-rescue.pod:180
364 #: ../cat/virt-cat.pod:138 ../cat/virt-filesystems.pod:265 ../cat/virt-ls.pod:429 ../df/virt-df.pod:171 ../edit/virt-edit.pod:165 ../inspector/virt-inspector.pod:123 ../rescue/virt-rescue.pod:182
365 msgid "Enable verbose messages for debugging."
369 #: ../cat/virt-cat.pod:140 ../cat/virt-filesystems.pod:267 ../cat/virt-ls.pod:431 ../df/virt-df.pod:173 ../edit/virt-edit.pod:167 ../fish/guestfish.pod:397 ../fuse/guestmount.pod:263 ../inspector/virt-inspector.pod:125 ../rescue/virt-rescue.pod:184 ../resize/virt-resize.pod:478
374 #: ../cat/virt-cat.pod:142 ../cat/virt-filesystems.pod:269 ../cat/virt-ls.pod:433 ../df/virt-df.pod:175 ../edit/virt-edit.pod:169 ../fish/guestfish.pod:399 ../fuse/guestmount.pod:265 ../inspector/virt-inspector.pod:127 ../rescue/virt-rescue.pod:186 ../resize/virt-resize.pod:480 ../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
379 #: ../cat/virt-cat.pod:144 ../cat/virt-filesystems.pod:271 ../cat/virt-ls.pod:435 ../df/virt-df.pod:177 ../edit/virt-edit.pod:171 ../inspector/virt-inspector.pod:129 ../rescue/virt-rescue.pod:188 ../resize/virt-resize.pod:482 ../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
380 msgid "Display version number and exit."
384 #: ../cat/virt-cat.pod:146 ../cat/virt-filesystems.pod:281 ../cat/virt-ls.pod:437 ../df/virt-df.pod:179 ../edit/virt-edit.pod:173 ../fish/guestfish.pod:412 ../fuse/guestmount.pod:278 ../inspector/virt-inspector.pod:131 ../rescue/virt-rescue.pod:199 ../tools/virt-tar.pl:158
389 #: ../cat/virt-cat.pod:148 ../cat/virt-filesystems.pod:283 ../cat/virt-ls.pod:439 ../df/virt-df.pod:181 ../edit/virt-edit.pod:175 ../inspector/virt-inspector.pod:133 ../rescue/virt-rescue.pod:201
390 msgid "Enable tracing of libguestfs API calls."
394 #: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179 ../inspector/virt-inspector.pod:137 ../rescue/virt-rescue.pod:205
395 msgid "OLD-STYLE COMMAND LINE ARGUMENTS"
399 #: ../cat/virt-cat.pod:154
400 msgid "Previous versions of virt-cat allowed you to write either:"
404 #: ../cat/virt-cat.pod:156
407 " virt-cat disk.img [disk.img ...] file\n"
412 #: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185 ../inspector/virt-inspector.pod:143 ../rescue/virt-rescue.pod:211
417 #: ../cat/virt-cat.pod:160
420 " virt-cat guestname file\n"
425 #: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189 ../inspector/virt-inspector.pod:147 ../rescue/virt-rescue.pod:215
427 "whereas in this version you should use I<-a> or I<-d> respectively to avoid "
428 "the confusing case where a disk image might have the same name as a guest."
432 #: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193 ../inspector/virt-inspector.pod:151 ../rescue/virt-rescue.pod:219
433 msgid "For compatibility the old style is still supported."
437 #: ../cat/virt-cat.pod:168 ../edit/virt-edit.pod:297
438 msgid "USING GUESTFISH"
442 #: ../cat/virt-cat.pod:170
444 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
445 "C<virt-cat> doesn't work."
449 #: ../cat/virt-cat.pod:173
450 msgid "Using C<virt-cat> is approximately equivalent to doing:"
454 #: ../cat/virt-cat.pod:175
457 " guestfish --ro -i -d domname download file -\n"
462 #: ../cat/virt-cat.pod:177
464 "where C<domname> is the name of the libvirt guest, and C<file> is the full "
465 "path to the file. Note the final C<-> (meaning \"output to stdout\")."
469 #: ../cat/virt-cat.pod:181
471 "The command above uses libguestfs's guest inspection feature and so does not "
472 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
473 "disk images that don't contain guests. To display a file from a disk image "
478 #: ../cat/virt-cat.pod:186
481 " guestfish --ro -a disk.img -m /dev/sda1 download file -\n"
486 #: ../cat/virt-cat.pod:188
488 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
489 "the disk image to edit, and C<file> is the full path to the file."
493 #: ../cat/virt-cat.pod:192 ../cat/virt-filesystems.pod:365 ../cat/virt-ls.pod:483 ../df/virt-df.pod:209 ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:349 ../rescue/virt-rescue.pod:262 ../resize/virt-resize.pod:543 ../tools/virt-list-filesystems.pl:188 ../tools/virt-list-partitions.pl:258 ../tools/virt-make-fs.pl:532 ../tools/virt-tar.pl:289 ../tools/virt-win-reg.pl:733
494 msgid "SHELL QUOTING"
498 #: ../cat/virt-cat.pod:194 ../cat/virt-filesystems.pod:367 ../cat/virt-ls.pod:485 ../df/virt-df.pod:211 ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:351 ../rescue/virt-rescue.pod:264 ../resize/virt-resize.pod:545 ../tools/virt-list-filesystems.pl:190 ../tools/virt-list-partitions.pl:260 ../tools/virt-make-fs.pl:534 ../tools/virt-tar.pl:291 ../tools/virt-win-reg.pl:741
500 "Libvirt guest names can contain arbitrary characters, some of which have "
501 "meaning to the shell such as C<#> and space. You may need to quote or "
502 "escape these characters on the command line. See the shell manual page "
503 "L<sh(1)> for details."
507 #: ../cat/virt-cat.pod:199 ../cat/virt-filesystems.pod:372 ../cat/virt-ls.pod:490 ../df/virt-df.pod:216 ../edit/virt-edit.pod:349 ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384 ../fish/guestfish.pod:1214 ../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:303 ../inspector/virt-inspector.pod:372 ../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:284 ../resize/virt-resize.pod:550 ../ruby/examples/guestfs-ruby.pod:36 ../src/guestfs.pod:3016 ../test-tool/libguestfs-test-tool.pod:87 ../tools/virt-list-filesystems.pl:195 ../tools/virt-list-partitions.pl:265 ../tools/virt-make-fs.pl:539 ../tools/virt-tar.pl:296 ../tools/virt-win-reg.pl:746
512 #: ../cat/virt-cat.pod:201
514 "L<guestfs(3)>, L<guestfish(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
515 "L<virt-tar-out(1)>, L<http://libguestfs.org/>."
519 #: ../cat/virt-cat.pod:208 ../cat/virt-filesystems.pod:383 ../cat/virt-ls.pod:502 ../df/virt-df.pod:224 ../edit/virt-edit.pod:363 ../rescue/virt-rescue.pod:292 ../resize/virt-resize.pod:571 ../tools/virt-list-filesystems.pl:208 ../tools/virt-list-partitions.pl:277 ../tools/virt-make-fs.pl:564 ../tools/virt-tar.pl:311 ../tools/virt-win-reg.pl:772
524 #: ../cat/virt-cat.pod:210 ../cat/virt-filesystems.pod:385 ../cat/virt-ls.pod:504 ../df/virt-df.pod:226 ../edit/virt-edit.pod:365 ../inspector/virt-inspector.pod:386 ../rescue/virt-rescue.pod:294 ../resize/virt-resize.pod:573 ../tools/virt-list-filesystems.pl:210 ../tools/virt-list-partitions.pl:279 ../tools/virt-make-fs.pl:566 ../tools/virt-tar.pl:313 ../tools/virt-win-reg.pl:774
525 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
529 #: ../cat/virt-cat.pod:212 ../cat/virt-filesystems.pod:387 ../cat/virt-ls.pod:506 ../df/virt-df.pod:228 ../edit/virt-edit.pod:367 ../examples/guestfs-examples.pod:48 ../examples/guestfs-recipes.pod:400 ../fish/guestfish.pod:1242 ../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:318 ../inspector/virt-inspector.pod:394 ../java/examples/guestfs-java.pod:61 ../ocaml/examples/guestfs-ocaml.pod:94 ../perl/examples/guestfs-perl.pod:55 ../python/examples/guestfs-python.pod:57 ../rescue/virt-rescue.pod:296 ../resize/virt-resize.pod:575 ../ruby/examples/guestfs-ruby.pod:51 ../src/guestfs.pod:3091 ../test-tool/libguestfs-test-tool.pod:97 ../tools/virt-list-filesystems.pl:212 ../tools/virt-list-partitions.pl:281 ../tools/virt-make-fs.pl:568 ../tools/virt-tar.pl:315 ../tools/virt-win-reg.pl:776
534 #: ../cat/virt-cat.pod:214 ../inspector/virt-inspector.pod:396 ../resize/virt-resize.pod:577
535 msgid "Copyright (C) 2010-2011 Red Hat Inc."
539 #: ../cat/virt-cat.pod:216 ../cat/virt-filesystems.pod:391 ../cat/virt-ls.pod:510 ../df/virt-df.pod:232 ../edit/virt-edit.pod:371 ../fish/guestfish.pod:1247 ../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:323 ../inspector/virt-inspector.pod:398 ../rescue/virt-rescue.pod:300 ../resize/virt-resize.pod:579 ../test-tool/libguestfs-test-tool.pod:102 ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:285 ../tools/virt-make-fs.pl:572 ../tools/virt-tar.pl:319 ../tools/virt-win-reg.pl:780
541 "This program is free software; you can redistribute it and/or modify it "
542 "under the terms of the GNU General Public License as published by the Free "
543 "Software Foundation; either version 2 of the License, or (at your option) "
548 #: ../cat/virt-cat.pod:221 ../cat/virt-filesystems.pod:396 ../cat/virt-ls.pod:515 ../df/virt-df.pod:237 ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1252 ../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:328 ../inspector/virt-inspector.pod:403 ../rescue/virt-rescue.pod:305 ../resize/virt-resize.pod:584 ../test-tool/libguestfs-test-tool.pod:107 ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:290 ../tools/virt-make-fs.pl:577 ../tools/virt-tar.pl:324 ../tools/virt-win-reg.pl:785
550 "This program is distributed in the hope that it will be useful, but WITHOUT "
551 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
552 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
557 #: ../cat/virt-cat.pod:226 ../cat/virt-filesystems.pod:401 ../cat/virt-ls.pod:520 ../df/virt-df.pod:242 ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1257 ../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:333 ../inspector/virt-inspector.pod:408 ../rescue/virt-rescue.pod:310 ../resize/virt-resize.pod:589 ../test-tool/libguestfs-test-tool.pod:112 ../tools/virt-list-filesystems.pl:226 ../tools/virt-list-partitions.pl:295 ../tools/virt-make-fs.pl:582 ../tools/virt-tar.pl:329 ../tools/virt-win-reg.pl:790
559 "You should have received a copy of the GNU General Public License along with "
560 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
561 "Ave, Cambridge, MA 02139, USA."
565 #: ../cat/virt-filesystems.pod:5
567 "virt-filesystems - List filesystems, partitions, block devices, LVM in a "
568 "virtual machine or disk image"
572 #: ../cat/virt-filesystems.pod:9
575 " virt-filesystems [--options] -d domname\n"
580 #: ../cat/virt-filesystems.pod:11
583 " virt-filesystems [--options] -a disk.img [-a disk.img ...]\n"
588 #: ../cat/virt-filesystems.pod:15
590 "This tool allows you to discover filesystems, partitions, logical volumes, "
591 "and their sizes in a disk image or virtual machine. It is a replacement for "
592 "L<virt-list-filesystems(1)> and L<virt-list-partitions(1)>."
596 #: ../cat/virt-filesystems.pod:20
598 "One use for this tool is from shell scripts to iterate over all filesystems "
603 #: ../cat/virt-filesystems.pod:23
606 " for fs in $(virt-filesystems -a disk.img); do\n"
613 #: ../cat/virt-filesystems.pod:27
615 "Another use is to list partitions before using another tool to modify those "
616 "partitions (such as L<virt-resize(1)>). If you are curious about what an "
617 "unknown disk image contains, use this tool along with L<virt-inspector(1)>."
621 #: ../cat/virt-filesystems.pod:32
623 "Various command line options control what this program displays. You need "
624 "to give either I<-a> or I<-d> options to specify the disk image or libvirt "
625 "guest respectively. If you just specify that then the program shows "
626 "filesystems found, one per line, like this:"
630 #: ../cat/virt-filesystems.pod:37
633 " $ virt-filesystems -a disk.img\n"
635 " /dev/vg_guest/lv_root\n"
640 #: ../cat/virt-filesystems.pod:41
641 msgid "If you add I<-l> or I<--long> then the output includes extra information:"
645 #: ../cat/virt-filesystems.pod:44
648 " $ virt-filesystems -a disk.img -l\n"
649 " Name Type VFS Label Size\n"
650 " /dev/sda1 filesystem ext4 boot 524288000\n"
651 " /dev/vg_guest/lv_root filesystem ext4 root 10212081664\n"
656 #: ../cat/virt-filesystems.pod:49
658 "If you add I<--extra> then non-mountable (swap, unknown) filesystems are "
663 #: ../cat/virt-filesystems.pod:52
666 " $ virt-filesystems -a disk.img --extra\n"
668 " /dev/vg_guest/lv_root\n"
669 " /dev/vg_guest/lv_swap\n"
670 " /dev/vg_guest/lv_data\n"
675 #: ../cat/virt-filesystems.pod:58
676 msgid "If you add I<--partitions> then partitions are shown instead of filesystems:"
680 #: ../cat/virt-filesystems.pod:60
683 " $ virt-filesystems -a disk.img --partitions\n"
690 #: ../cat/virt-filesystems.pod:64
692 "Similarly you can use I<--logical-volumes>, I<--volume-groups>, "
693 "I<--physical-volumes>, I<--block-devices> to list those items."
697 #: ../cat/virt-filesystems.pod:67
699 "You can use these options in combination as well (if you want a combination "
700 "including filesystems, you have to add I<--filesystems>). Notice that some "
701 "items fall into several categories (eg. C</dev/sda1> might be both a "
702 "partition and a filesystem). These items are listed several times. To get "
703 "a list which includes absolutely everything that virt-filesystems knows "
704 "about, use the I<--all> option."
708 #: ../cat/virt-filesystems.pod:74
710 "UUIDs (because they are quite long) are not shown by default. Add the "
711 "I<--uuid> option to display device and filesystem UUIDs in the long output."
715 #: ../cat/virt-filesystems.pod:78
717 "I<--all --long --uuid> is a useful combination to display all possible "
718 "information about everything."
722 #: ../cat/virt-filesystems.pod:81
725 " $ virt-filesystems -a win.img --all --long --uuid -h\n"
726 " Name Type VFS Label Size Parent UUID\n"
727 " /dev/sda1 filesystem ntfs System Reserved 100M - F81C92571C92112C\n"
728 " /dev/sda2 filesystem ntfs - 20G - F2E8996AE8992E3B\n"
729 " /dev/sda1 partition - - 100M /dev/sda -\n"
730 " /dev/sda2 partition - - 20G /dev/sda -\n"
731 " /dev/sda device - - 20G - -\n"
736 #: ../cat/virt-filesystems.pod:89
737 msgid "For machine-readable output, use I<--csv> to get Comma-Separated Values."
741 #: ../cat/virt-filesystems.pod:110 ../tools/virt-list-filesystems.pl:121
746 #: ../cat/virt-filesystems.pod:112
748 "Display everything. This is currently the same as specifying these options: "
749 "I<--filesystems>, I<--extra>, I<--partitions>, I<--block-devices>, "
750 "I<--logical-volumes>, I<--volume-groups>, I<--physical-volumes>. (More may "
751 "be added to this list in future)."
755 #: ../cat/virt-filesystems.pod:117
756 msgid "See also I<--long>."
760 #: ../cat/virt-filesystems.pod:119
765 #: ../cat/virt-filesystems.pod:121
766 msgid "B<--block-devices>"
770 #: ../cat/virt-filesystems.pod:123
771 msgid "Display block devices."
775 #: ../cat/virt-filesystems.pod:135 ../cat/virt-ls.pod:301
780 #: ../cat/virt-filesystems.pod:137 ../cat/virt-ls.pod:303
782 "Write out the results in CSV format (comma-separated values). This format "
783 "can be imported easily into databases and spreadsheets, but read L</NOTE "
784 "ABOUT CSV FORMAT> below."
788 #: ../cat/virt-filesystems.pod:150
790 "When prompting for keys and passphrases, virt-filesystems normally turns "
791 "echoing off so you cannot see what you are typing. If you are not worried "
792 "about Tempest attacks and there is no one else in the room you can specify "
793 "this flag to see what you are typing."
797 #: ../cat/virt-filesystems.pod:155
802 #: ../cat/virt-filesystems.pod:157
804 "This causes filesystems that are not ordinary, mountable filesystems to be "
805 "displayed. This category includes swapspace, and filesystems that are empty "
806 "or contain unknown data."
810 #: ../cat/virt-filesystems.pod:161
811 msgid "This option implies I<--filesystems>."
815 #: ../cat/virt-filesystems.pod:163
816 msgid "B<--filesystems>"
820 #: ../cat/virt-filesystems.pod:165
822 "Display mountable filesystems. If no display option was selected then this "
827 #: ../cat/virt-filesystems.pod:168
828 msgid "With I<--extra>, non-mountable filesystems are shown too."
832 #: ../cat/virt-filesystems.pod:181
835 " virt-filesystems --format=raw -a disk.img\n"
840 #: ../cat/virt-filesystems.pod:185
843 " virt-filesystems --format=raw -a disk.img --format -a another.img\n"
848 #: ../cat/virt-filesystems.pod:194 ../cat/virt-ls.pod:352 ../df/virt-df.pod:119 ../fish/guestfish.pod:156 ../tools/virt-list-partitions.pl:109
853 #: ../cat/virt-filesystems.pod:196 ../cat/virt-ls.pod:354 ../df/virt-df.pod:121 ../tools/virt-list-partitions.pl:111
854 msgid "B<--human-readable>"
858 #: ../cat/virt-filesystems.pod:198
859 msgid "In I<--long> mode, display sizes in human-readable format."
863 #: ../cat/virt-filesystems.pod:205 ../cat/virt-ls.pod:366 ../tools/virt-list-filesystems.pl:108 ../tools/virt-list-partitions.pl:119
868 #: ../cat/virt-filesystems.pod:207 ../cat/virt-ls.pod:368 ../tools/virt-list-filesystems.pl:110 ../tools/virt-list-partitions.pl:121
873 #: ../cat/virt-filesystems.pod:209
874 msgid "Display extra columns of data (\"long format\")."
878 #: ../cat/virt-filesystems.pod:211
879 msgid "A title row is added unless you also specify I<--no-title>."
883 #: ../cat/virt-filesystems.pod:213
885 "The extra columns displayed depend on what output you select, and the "
886 "ordering of columns may change in future versions. Use the title row, "
887 "I<--csv> output and/or L<csvtool(1)> to match columns to data in external "
892 #: ../cat/virt-filesystems.pod:218
894 "Use I<-h> if you want sizes to be displayed in human-readable format. The "
895 "default is to show raw numbers of I<bytes>."
899 #: ../cat/virt-filesystems.pod:221
900 msgid "Use I<--uuid> to display UUIDs too."
904 #: ../cat/virt-filesystems.pod:223
909 #: ../cat/virt-filesystems.pod:225
914 #: ../cat/virt-filesystems.pod:227
915 msgid "B<--logical-volumes>"
919 #: ../cat/virt-filesystems.pod:229
921 "Display LVM logical volumes. In this mode, these are displayed irrespective "
922 "of whether the LVs contain filesystems."
926 #: ../cat/virt-filesystems.pod:232
927 msgid "B<--no-title>"
931 #: ../cat/virt-filesystems.pod:234
932 msgid "In I<--long> mode, don't add a title row."
936 #: ../cat/virt-filesystems.pod:236
938 "Note that the order of the columns is not fixed, and may change in future "
939 "versions of virt-filesystems, so using this option may give you unexpected "
944 #: ../cat/virt-filesystems.pod:240
949 #: ../cat/virt-filesystems.pod:242
950 msgid "B<--partitions>"
954 #: ../cat/virt-filesystems.pod:244
956 "Display partitions. In this mode, these are displayed irrespective of "
957 "whether the partitions contain filesystems."
961 #: ../cat/virt-filesystems.pod:247
966 #: ../cat/virt-filesystems.pod:249
967 msgid "B<--physvols>"
971 #: ../cat/virt-filesystems.pod:251
972 msgid "B<--physical-volumes>"
976 #: ../cat/virt-filesystems.pod:253
977 msgid "Display LVM physical volumes."
981 #: ../cat/virt-filesystems.pod:255 ../df/virt-df.pod:157
986 #: ../cat/virt-filesystems.pod:257
991 #: ../cat/virt-filesystems.pod:259
992 msgid "In I<--long> mode, display UUIDs as well."
996 #: ../cat/virt-filesystems.pod:273
1001 #: ../cat/virt-filesystems.pod:275
1002 msgid "B<--volgroups>"
1006 #: ../cat/virt-filesystems.pod:277
1007 msgid "B<--volume-groups>"
1011 #: ../cat/virt-filesystems.pod:279
1012 msgid "Display LVM volume groups."
1016 #: ../cat/virt-filesystems.pod:287
1021 #: ../cat/virt-filesystems.pod:289
1023 "Note that columns in the output are subject to reordering and change in "
1024 "future versions of this tool."
1028 #: ../cat/virt-filesystems.pod:294
1033 #: ../cat/virt-filesystems.pod:296
1034 msgid "The filesystem, partition, block device or LVM name."
1038 #: ../cat/virt-filesystems.pod:298
1040 "For device and partition names these are displayed as canonical libguestfs "
1041 "names, so that for example C</dev/sda2> is the second partition on the first "
1046 #: ../cat/virt-filesystems.pod:302
1048 "If the I<--long> option is B<not> specified, then only the name column is "
1049 "shown in the output."
1053 #: ../cat/virt-filesystems.pod:305
1058 #: ../cat/virt-filesystems.pod:307
1059 msgid "The object type, for example C<filesystem>, C<lv>, C<device> etc."
1063 #: ../cat/virt-filesystems.pod:309
1068 #: ../cat/virt-filesystems.pod:311
1070 "If there is a filesystem, then this column displays the filesystem type if "
1071 "one could be detected, eg. C<ext4>."
1075 #: ../cat/virt-filesystems.pod:314
1080 #: ../cat/virt-filesystems.pod:316
1082 "If the object has a label (used for identifying and mounting filesystems) "
1083 "then this column contains the label."
1087 #: ../cat/virt-filesystems.pod:319
1092 #: ../cat/virt-filesystems.pod:321
1094 "The size of the object in bytes. If the I<--human> option is used then the "
1095 "size is displayed in a human-readable form."
1099 #: ../cat/virt-filesystems.pod:324
1104 #: ../cat/virt-filesystems.pod:326
1106 "The parent column records the parent relationship between objects. For "
1107 "example, if the object is a partition, then this column contains the name of "
1108 "the containing device. If the object is a logical volume, then this column "
1109 "is the name of the volume group."
1113 #: ../cat/virt-filesystems.pod:331
1118 #: ../cat/virt-filesystems.pod:333
1120 "If the object has a UUID (used for identifying and mounting filesystems and "
1121 "block devices) then this column contains the UUID as a string."
1125 #: ../cat/virt-filesystems.pod:337
1126 msgid "The UUID is only displayed if the I<--uuid> option is given."
1130 #: ../cat/virt-filesystems.pod:341 ../cat/virt-ls.pod:459 ../df/virt-df.pod:185
1131 msgid "NOTE ABOUT CSV FORMAT"
1135 #: ../cat/virt-filesystems.pod:343 ../cat/virt-ls.pod:461 ../df/virt-df.pod:187
1137 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
1138 "should be easy to parse, but it is definitely not easy to parse."
1142 #: ../cat/virt-filesystems.pod:346 ../cat/virt-ls.pod:464 ../df/virt-df.pod:190
1144 "Myth: Just split fields at commas. Reality: This does I<not> work "
1145 "reliably. This example has two columns:"
1149 #: ../cat/virt-filesystems.pod:349 ../cat/virt-ls.pod:467 ../df/virt-df.pod:193
1152 " \"foo,bar\",baz\n"
1157 #: ../cat/virt-filesystems.pod:351 ../cat/virt-ls.pod:469 ../df/virt-df.pod:195
1159 "Myth: Read the file one line at a time. Reality: This does I<not> work "
1160 "reliably. This example has one row:"
1164 #: ../cat/virt-filesystems.pod:354 ../cat/virt-ls.pod:472 ../df/virt-df.pod:198
1173 #: ../cat/virt-filesystems.pod:357 ../cat/virt-ls.pod:475 ../df/virt-df.pod:201
1175 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
1176 "packaged in major Linux distributions)."
1180 #: ../cat/virt-filesystems.pod:360 ../cat/virt-ls.pod:478 ../df/virt-df.pod:204
1182 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
1183 "or Python's built-in csv library)."
1187 #: ../cat/virt-filesystems.pod:363 ../cat/virt-ls.pod:481 ../df/virt-df.pod:207
1188 msgid "Most spreadsheets and databases can import CSV directly."
1192 #: ../cat/virt-filesystems.pod:374
1194 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-df(1)>, "
1195 "L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, L<csvtool(1)>, "
1196 "L<http://libguestfs.org/>."
1200 #: ../cat/virt-filesystems.pod:389 ../tools/virt-make-fs.pl:570 ../tools/virt-win-reg.pl:778
1201 msgid "Copyright (C) 2010 Red Hat Inc."
1205 #: ../cat/virt-ls.pod:5
1206 msgid "virt-ls - List files in a virtual machine"
1210 #: ../cat/virt-ls.pod:9
1213 " virt-ls [--options] -d domname directory [directory ...]\n"
1218 #: ../cat/virt-ls.pod:11
1221 " virt-ls [--options] -a disk.img [-a disk.img ...] directory [directory "
1227 #: ../cat/virt-ls.pod:13 ../df/virt-df.pod:15 ../rescue/virt-rescue.pod:13
1232 #: ../cat/virt-ls.pod:15
1235 " virt-ls [--options] domname directory\n"
1240 #: ../cat/virt-ls.pod:17
1243 " virt-ls [--options] disk.img [disk.img ...] directory\n"
1248 #: ../cat/virt-ls.pod:21
1250 "C<virt-ls> lists filenames, file sizes, checksums, extended attributes and "
1251 "more from a virtual machine or disk image."
1255 #: ../cat/virt-ls.pod:24
1257 "Multiple directory names can be given, in which case the output from each is "
1262 #: ../cat/virt-ls.pod:27
1264 "To list directories from a libvirt guest use the I<-d> option to specify the "
1265 "name of the guest. For a disk image, use the I<-a> option."
1269 #: ../cat/virt-ls.pod:31
1271 "C<virt-ls> can do many simple file listings. For more complicated cases you "
1272 "may need to use L<guestfish(1)>, or write a program directly to the "
1273 "L<guestfs(3)> API."
1277 #: ../cat/virt-ls.pod:37
1278 msgid "Get a list of all files and directories in a virtual machine:"
1282 #: ../cat/virt-ls.pod:39
1285 " virt-ls -R -d guest /\n"
1290 #: ../cat/virt-ls.pod:41
1291 msgid "List all setuid or setgid programs in a Linux virtual machine:"
1295 #: ../cat/virt-ls.pod:43
1298 " virt-ls -lR -d guest / | grep '^- [42]'\n"
1303 #: ../cat/virt-ls.pod:45
1304 msgid "List all public-writable directories in a Linux virtual machine:"
1308 #: ../cat/virt-ls.pod:47
1311 " virt-ls -lR -d guest / | grep '^d ...7'\n"
1316 #: ../cat/virt-ls.pod:49
1317 msgid "List all Unix domain sockets in a Linux virtual machine:"
1321 #: ../cat/virt-ls.pod:51
1324 " virt-ls -lR -d guest / | grep '^s'\n"
1329 #: ../cat/virt-ls.pod:53
1330 msgid "List all regular files with filenames ending in '.png':"
1334 #: ../cat/virt-ls.pod:55
1337 " virt-ls -lR -d guest / | grep -i '^-.*\\.png$'\n"
1342 #: ../cat/virt-ls.pod:57
1343 msgid "To display files larger than 10MB in home directories:"
1347 #: ../cat/virt-ls.pod:59
1350 " virt-ls -lR -d guest /home | awk '$3 > 10*1024*1024'\n"
1355 #: ../cat/virt-ls.pod:61
1356 msgid "Find everything modified in the last 7 days:"
1360 #: ../cat/virt-ls.pod:63
1363 " virt-ls -lR -d guest --time-days / | awk '$6 <= 7'\n"
1368 #: ../cat/virt-ls.pod:65
1369 msgid "Find regular files modified in the last 24 hours:"
1373 #: ../cat/virt-ls.pod:67
1376 " virt-ls -lR -d guest --time-days / | grep '^-' | awk '$6 < 1'\n"
1381 #: ../cat/virt-ls.pod:69
1382 msgid "DIFFERENCES IN SNAPSHOTS AND BACKING FILES"
1386 #: ../cat/virt-ls.pod:71
1388 "Find the differences between files in a guest and an earlier snapshot of the "
1393 #: ../cat/virt-ls.pod:74
1396 " virt-ls -lR -a snapshot.img / --uids --time-t > old\n"
1397 " virt-ls -lR -a current.img / --uids --time-t > new\n"
1398 " diff -u old new | less\n"
1403 #: ../cat/virt-ls.pod:78
1405 "The commands above won't find files where the content has changed but the "
1406 "metadata (eg. file size and modification date) is the same. To do that, you "
1407 "need to add the I<--checksum> parameter to both C<virt-ls> commands. "
1408 "I<--checksum> can be quite slow since it has to read and compute a checksum "
1409 "of every regular file in the virtual machine."
1413 #: ../cat/virt-ls.pod:84
1414 msgid "OUTPUT MODES"
1418 #: ../cat/virt-ls.pod:86
1420 "C<virt-ls> has four output modes, controlled by different combinations of "
1421 "the I<-l> and I<-R> options."
1425 #: ../cat/virt-ls.pod:89
1426 msgid "SIMPLE LISTING"
1430 #: ../cat/virt-ls.pod:91
1431 msgid "A simple listing is like the ordinary L<ls(1)> command:"
1435 #: ../cat/virt-ls.pod:93
1438 " $ virt-ls -d guest /\n"
1446 #: ../cat/virt-ls.pod:98
1447 msgid "LONG LISTING"
1451 #: ../cat/virt-ls.pod:100
1453 "With the I<-l> (I<--long>) option, the output is like the C<ls -l> command "
1454 "(more specifically, like the C<guestfs_ll> function)."
1458 #: ../cat/virt-ls.pod:103
1461 " $ virt-ls -l -d guest /\n"
1463 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
1464 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
1470 #: ../cat/virt-ls.pod:109
1472 "Note that while this is useful for displaying a directory, do not try "
1473 "parsing this output in another program. Use L</RECURSIVE LONG LISTING> "
1478 #: ../cat/virt-ls.pod:113
1479 msgid "RECURSIVE LISTING"
1483 #: ../cat/virt-ls.pod:115
1485 "With the I<-R> (I<--recursive>) option, C<virt-ls> lists the names of files "
1486 "and directories recursively:"
1490 #: ../cat/virt-ls.pod:118
1493 " $ virt-ls -R -d guest /tmp\n"
1501 #: ../cat/virt-ls.pod:123
1503 "To generate this output, C<virt-ls> runs the C<guestfs_find0> function and "
1504 "converts C<\\0> characters to C<\\n>."
1508 #: ../cat/virt-ls.pod:126
1509 msgid "RECURSIVE LONG LISTING"
1513 #: ../cat/virt-ls.pod:128
1515 "Using I<-lR> options together changes the output to display directories "
1516 "recursively, with file stats, and optionally other features such as "
1517 "checksums and extended attributes."
1521 #: ../cat/virt-ls.pod:132
1523 "Most of the interesting features of C<virt-ls> are only available when using "
1528 #: ../cat/virt-ls.pod:135
1530 "The fields are normally space-separated. Filenames are B<not> quoted, so "
1531 "you cannot use the output in another program (because filenames can contain "
1532 "spaces and other unsafe characters). If the guest was untrusted and someone "
1533 "knew you were using C<virt-ls> to analyze the guest, they could play tricks "
1534 "on you by creating filenames with embedded newline characters. To B<safely> "
1535 "parse the output in another program, use the I<--csv> (Comma-Separated "
1540 #: ../cat/virt-ls.pod:143
1542 "Note that this output format is completely unrelated to the C<ls -lR> "
1547 #: ../cat/virt-ls.pod:146
1550 " $ virt-ls -lR -d guest /bin\n"
1551 " d 0555 4096 /bin\n"
1552 " - 0755 123 /bin/alsaunmute\n"
1553 " - 0755 28328 /bin/arch\n"
1554 " l 0777 4 /bin/awk -> gawk\n"
1555 " - 0755 27216 /bin/basename\n"
1556 " - 0755 943360 /bin/bash\n"
1562 #: ../cat/virt-ls.pod:155
1563 msgid "These basic fields are always shown:"
1567 #: ../cat/virt-ls.pod:159
1572 #: ../cat/virt-ls.pod:161
1574 "The file type, one of: C<-> (regular file), C<d> (directory), C<c> "
1575 "(character device), C<b> (block device), C<p> (named pipe), C<l> (symbolic "
1576 "link), C<s> (socket) or C<u> (unknown)."
1580 #: ../cat/virt-ls.pod:171
1585 #: ../cat/virt-ls.pod:173
1586 msgid "The Unix permissions, displayed as a 4 digit octal number."
1590 #: ../cat/virt-ls.pod:175
1595 #: ../cat/virt-ls.pod:177
1597 "The size of the file. This is shown in bytes unless I<-h> or "
1598 "I<--human-readable> option is given, in which case this is shown as a "
1599 "human-readable number."
1603 #: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:4183
1608 #: ../cat/virt-ls.pod:183
1609 msgid "The full path of the file or directory."
1613 #: ../cat/virt-ls.pod:185
1618 #: ../cat/virt-ls.pod:187
1619 msgid "For symbolic links only, the link target."
1623 #: ../cat/virt-ls.pod:191
1625 "In I<-lR> mode, additional command line options enable the display of more "
1630 #: ../cat/virt-ls.pod:194
1632 "With the I<--uids> flag, these additional fields are displayed before the "
1637 #: ../cat/virt-ls.pod:199
1642 #: ../cat/virt-ls.pod:201
1647 #: ../cat/virt-ls.pod:203
1649 "The UID and GID of the owner of the file (displayed numerically). Note "
1650 "these only make sense in the context of a Unix-like guest."
1654 #: ../cat/virt-ls.pod:208
1655 msgid "With the I<--times> flag, these additional fields are displayed:"
1659 #: ../cat/virt-ls.pod:212
1664 #: ../cat/virt-ls.pod:214
1665 msgid "The time of last access."
1669 #: ../cat/virt-ls.pod:216
1674 #: ../cat/virt-ls.pod:218
1675 msgid "The time of last modification."
1679 #: ../cat/virt-ls.pod:220
1684 #: ../cat/virt-ls.pod:222
1685 msgid "The time of last status change."
1689 #: ../cat/virt-ls.pod:226
1691 "The time fields are displayed as string dates and times, unless one of the "
1692 "I<--time-t>, I<--time-relative> or I<--time-days> flags is given."
1696 #: ../cat/virt-ls.pod:229
1697 msgid "With the I<--extra-stats> flag, these additional fields are displayed:"
1701 #: ../cat/virt-ls.pod:233
1706 #: ../cat/virt-ls.pod:235
1708 "The device containing the file (displayed as major:minor). This may not "
1709 "match devices as known to the guest."
1713 #: ../cat/virt-ls.pod:238
1718 #: ../cat/virt-ls.pod:240
1719 msgid "The inode number."
1723 #: ../cat/virt-ls.pod:242
1728 #: ../cat/virt-ls.pod:244
1729 msgid "The number of hard links."
1733 #: ../cat/virt-ls.pod:246
1738 #: ../cat/virt-ls.pod:248
1739 msgid "For block and char special files, the device (displayed as major:minor)."
1743 #: ../cat/virt-ls.pod:251
1748 #: ../cat/virt-ls.pod:253
1749 msgid "The number of 512 byte blocks allocated to the file."
1753 #: ../cat/virt-ls.pod:257
1755 "With the I<--checksum> flag, the checksum of the file contents is shown "
1756 "(only for regular files). Computing file checksums can take a considerable "
1761 #: ../cat/virt-ls.pod:280
1762 msgid "B<--checksum>"
1766 #: ../cat/virt-ls.pod:282
1767 msgid "B<--checksum=crc|md5|sha1|sha224|sha256|sha384|sha512>"
1771 #: ../cat/virt-ls.pod:284
1773 "Display checksum over file contents for regular files. With no argument, "
1774 "this defaults to using I<md5>. Using an argument, you can select the "
1775 "checksum type to use."
1779 #: ../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
1781 "This option only has effect in I<-lR> output mode. See L</RECURSIVE LONG "
1786 #: ../cat/virt-ls.pod:316
1788 "When prompting for keys and passphrases, virt-ls normally turns echoing off "
1789 "so you cannot see what you are typing. If you are not worried about Tempest "
1790 "attacks and there is no one else in the room you can specify this flag to "
1791 "see what you are typing."
1795 #: ../cat/virt-ls.pod:321
1796 msgid "B<--extra-stats>"
1800 #: ../cat/virt-ls.pod:323
1801 msgid "Display extra stats."
1805 #: ../cat/virt-ls.pod:339
1808 " virt-ls --format=raw -a disk.img /dir\n"
1813 #: ../cat/virt-ls.pod:343
1816 " virt-ls --format=raw -a disk.img --format -a another.img /dir\n"
1821 #: ../cat/virt-ls.pod:356
1822 msgid "Display file sizes in human-readable format."
1826 #: ../cat/virt-ls.pod:370
1831 #: ../cat/virt-ls.pod:372
1832 msgid "B<--recursive>"
1836 #: ../cat/virt-ls.pod:374
1838 "Select the mode. With neither of these options, C<virt-ls> produces a "
1839 "simple, flat list of the files in the named directory. See L</SIMPLE "
1844 #: ../cat/virt-ls.pod:378
1846 "C<virt-ls -l> produces a \"long listing\", which shows more detail. See "
1851 #: ../cat/virt-ls.pod:381
1853 "C<virt-ls -R> produces a recursive list of files starting at the named "
1854 "directory. See L</RECURSIVE LISTING>."
1858 #: ../cat/virt-ls.pod:384
1860 "C<virt-ls -lR> produces a recursive long listing which can be more easily "
1861 "parsed. See L</RECURSIVE LONG LISTING>."
1865 #: ../cat/virt-ls.pod:387
1870 #: ../cat/virt-ls.pod:389
1871 msgid "Display time fields."
1875 #: ../cat/virt-ls.pod:394
1876 msgid "B<--time-days>"
1880 #: ../cat/virt-ls.pod:396
1881 msgid "Display time fields as days before now (negative if in the future)."
1885 #: ../cat/virt-ls.pod:398
1887 "Note that C<0> in output means \"up to 1 day before now\", or that the age "
1888 "of the file is between 0 and 86399 seconds."
1892 #: ../cat/virt-ls.pod:404
1893 msgid "B<--time-relative>"
1897 #: ../cat/virt-ls.pod:406
1898 msgid "Display time fields as seconds before now (negative if in the future)."
1902 #: ../cat/virt-ls.pod:411
1907 #: ../cat/virt-ls.pod:413
1908 msgid "Display time fields as seconds since the Unix epoch."
1912 #: ../cat/virt-ls.pod:418
1917 #: ../cat/virt-ls.pod:420
1918 msgid "Display UID and GID fields."
1922 #: ../cat/virt-ls.pod:445
1923 msgid "Previous versions of virt-ls allowed you to write either:"
1927 #: ../cat/virt-ls.pod:447
1930 " virt-ls disk.img [disk.img ...] /dir\n"
1935 #: ../cat/virt-ls.pod:451
1938 " virt-ls guestname /dir\n"
1943 #: ../cat/virt-ls.pod:492
1945 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, "
1946 "L<virt-tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
1947 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
1951 #: ../cat/virt-ls.pod:508 ../df/virt-df.pod:230 ../edit/virt-edit.pod:369 ../rescue/virt-rescue.pod:298
1952 msgid "Copyright (C) 2009-2011 Red Hat Inc."
1956 #: ../df/virt-df.pod:5
1957 msgid "virt-df - Display free space on virtual filesystems"
1961 #: ../df/virt-df.pod:9
1964 " virt-df [--options]\n"
1969 #: ../df/virt-df.pod:11
1972 " virt-df [--options] -d domname\n"
1977 #: ../df/virt-df.pod:13
1980 " virt-df [--options] -a disk.img [-a disk.img ...]\n"
1985 #: ../df/virt-df.pod:17
1988 " virt-df [--options] domname\n"
1993 #: ../df/virt-df.pod:19
1996 " virt-df [--options] disk.img [disk.img ...]\n"
2001 #: ../df/virt-df.pod:23
2003 "C<virt-df> is a command line tool to display free space on virtual machine "
2004 "filesystems. Unlike other tools, it doesn't just display the size of disk "
2005 "allocated to a virtual machine, but can look inside disk images to see how "
2006 "much space is really being used."
2010 #: ../df/virt-df.pod:28
2012 "If used without any I<-a> or I<-d> arguments, C<virt-df> checks with libvirt "
2013 "to get a list of all active and inactive guests, and performs a C<df>-type "
2014 "operation on each one in turn, printing out the results."
2018 #: ../df/virt-df.pod:32
2020 "If any I<-a> or I<-d> arguments are specified, C<virt-df> performs a "
2021 "C<df>-type operation on either the single named libvirt domain, or on the "
2022 "disk image(s) listed on the command line (which must all belong to a single "
2023 "VM). In this mode (with arguments), C<virt-df> will I<only work for a "
2024 "single guest>. If you want to run on multiple guests, then you have to "
2025 "invoke C<virt-df> multiple times."
2029 #: ../df/virt-df.pod:39
2031 "Use the I<--csv> option to get a format which can be easily parsed by other "
2032 "programs. Other options are similar to the standard L<df(1)> command."
2036 #: ../df/virt-df.pod:45
2038 "Show disk usage for a single libvirt guest called C<F14x64>. Make the "
2039 "output human-readable:"
2043 #: ../df/virt-df.pod:48
2046 " # virt-df -d F14x64 -h\n"
2047 " Filesystem Size Used Available Use%\n"
2048 " F14x64:/dev/sda1 484M 66M 393M 14%\n"
2049 " F14x64:/dev/vg_f13x64/lv_root 7.4G 3.4G 4.0G 46%\n"
2054 #: ../df/virt-df.pod:53
2055 msgid "Show disk usage for a disk image file called C<test.img>:"
2059 #: ../df/virt-df.pod:55
2062 " $ virt-df -a test1.img\n"
2063 " Filesystem 1K-blocks Used Available Use%\n"
2064 " test1.img:/dev/sda1 99099 1551 92432 2%\n"
2069 #: ../df/virt-df.pod:106
2072 " virt-df --format=raw -a disk.img\n"
2077 #: ../df/virt-df.pod:110
2080 " virt-df --format=raw -a disk.img --format -a another.img\n"
2085 #: ../df/virt-df.pod:123
2086 msgid "Print sizes in human-readable format."
2090 #: ../df/virt-df.pod:125
2091 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
2095 #: ../df/virt-df.pod:127 ../fish/guestfish.pod:258 ../fuse/guestmount.pod:155
2100 #: ../df/virt-df.pod:129
2105 #: ../df/virt-df.pod:131
2106 msgid "Print inodes instead of blocks."
2110 #: ../df/virt-df.pod:133
2111 msgid "B<--one-per-guest>"
2115 #: ../df/virt-df.pod:135
2117 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
2118 "disks from several guests to a single libguestfs appliance."
2122 #: ../df/virt-df.pod:138
2123 msgid "You might use this option in the following circumstances:"
2127 #: ../df/virt-df.pod:142 ../df/virt-df.pod:148 ../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:385 ../fish/guestfish-actions.pod:393 ../fish/guestfish-actions.pod:400 ../fish/guestfish-actions.pod:407 ../fish/guestfish-actions.pod:1099 ../fish/guestfish-actions.pod:1103 ../fish/guestfish-actions.pod:1107 ../fish/guestfish-actions.pod:1111 ../fish/guestfish-actions.pod:1119 ../fish/guestfish-actions.pod:1123 ../fish/guestfish-actions.pod:1127 ../fish/guestfish-actions.pod:1137 ../fish/guestfish-actions.pod:1141 ../fish/guestfish-actions.pod:1145 ../fish/guestfish-actions.pod:1235 ../fish/guestfish-actions.pod:1239 ../fish/guestfish-actions.pod:1244 ../fish/guestfish-actions.pod:1249 ../fish/guestfish-actions.pod:1291 ../fish/guestfish-actions.pod:1295 ../fish/guestfish-actions.pod:1300 ../fish/guestfish-actions.pod:1933 ../fish/guestfish-actions.pod:1939 ../fish/guestfish-actions.pod:1947 ../fish/guestfish-actions.pod:1954 ../fish/guestfish-actions.pod:1961 ../fish/guestfish.pod:445 ../fish/guestfish.pod:449 ../fish/guestfish.pod:453 ../fish/guestfish.pod:457 ../inspector/virt-inspector.pod:384 ../inspector/virt-inspector.pod:388 ../resize/virt-resize.pod:282 ../resize/virt-resize.pod:286 ../resize/virt-resize.pod:295 ../resize/virt-resize.pod:301 ../src/guestfs-actions.pod:15 ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:583 ../src/guestfs-actions.pod:591 ../src/guestfs-actions.pod:598 ../src/guestfs-actions.pod:605 ../src/guestfs-actions.pod:1662 ../src/guestfs-actions.pod:1666 ../src/guestfs-actions.pod:1670 ../src/guestfs-actions.pod:1674 ../src/guestfs-actions.pod:1682 ../src/guestfs-actions.pod:1686 ../src/guestfs-actions.pod:1690 ../src/guestfs-actions.pod:1700 ../src/guestfs-actions.pod:1704 ../src/guestfs-actions.pod:1708 ../src/guestfs-actions.pod:1846 ../src/guestfs-actions.pod:1850 ../src/guestfs-actions.pod:1855 ../src/guestfs-actions.pod:1860 ../src/guestfs-actions.pod:1921 ../src/guestfs-actions.pod:1925 ../src/guestfs-actions.pod:1930 ../src/guestfs-actions.pod:2859 ../src/guestfs-actions.pod:2865 ../src/guestfs-actions.pod:2873 ../src/guestfs-actions.pod:2880 ../src/guestfs-actions.pod:2887 ../src/guestfs.pod:388 ../src/guestfs.pod:393 ../src/guestfs.pod:398 ../src/guestfs.pod:402 ../src/guestfs.pod:407 ../src/guestfs.pod:411 ../src/guestfs.pod:416 ../src/guestfs.pod:421 ../src/guestfs.pod:1064 ../src/guestfs.pod:1068 ../src/guestfs.pod:1072 ../src/guestfs.pod:1077 ../src/guestfs.pod:1085 ../src/guestfs.pod:1104 ../src/guestfs.pod:1112 ../src/guestfs.pod:1134 ../src/guestfs.pod:1138 ../src/guestfs.pod:1142 ../src/guestfs.pod:1146 ../src/guestfs.pod:1150 ../src/guestfs.pod:1154 ../src/guestfs.pod:1643 ../src/guestfs.pod:1648 ../src/guestfs.pod:1652 ../src/guestfs.pod:1754 ../src/guestfs.pod:1759 ../src/guestfs.pod:1763 ../src/guestfs.pod:1773 ../src/guestfs.pod:2047 ../src/guestfs.pod:2052 ../src/guestfs.pod:2058 ../src/guestfs.pod:2066 ../src/guestfs.pod:2420 ../src/guestfs.pod:2426 ../src/guestfs.pod:2431 ../src/guestfs.pod:2437 ../src/guestfs.pod:2818 ../src/guestfs.pod:2823 ../src/guestfs.pod:2827 ../src/guestfs.pod:2831 ../src/guestfs.pod:2835 ../src/guestfs.pod:2849 ../src/guestfs.pod:2854 ../src/guestfs.pod:3068 ../src/guestfs.pod:3072 ../src/guestfs.pod:3076 ../src/guestfs.pod:3080 ../tools/virt-win-reg.pl:197 ../tools/virt-win-reg.pl:202 ../tools/virt-win-reg.pl:208 ../tools/virt-win-reg.pl:710 ../tools/virt-win-reg.pl:716 ../tools/virt-win-reg.pl:722
2132 #: ../df/virt-df.pod:144
2134 "If you think an untrusted guest might actively try to exploit the libguestfs "
2135 "appliance kernel, then this prevents one guest from interfering with the "
2136 "stats printed for another guest."
2140 #: ../df/virt-df.pod:150
2142 "If the kernel has a bug which stops it from accessing a filesystem in one "
2143 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
2144 "and report stats for further guests."
2148 #: ../df/virt-df.pod:159
2150 "Print UUIDs instead of names. This is useful for following a guest even "
2151 "when the guest is migrated or renamed, or when two guests happen to have the "
2156 #: ../df/virt-df.pod:163
2158 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
2159 "images, we still print the disk image name even when this option is "
2164 #: ../df/virt-df.pod:218
2166 "L<df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
2167 "L<http://libguestfs.org/>."
2171 #: ../edit/virt-edit.pod:5
2172 msgid "virt-edit - Edit a file in a virtual machine"
2176 #: ../edit/virt-edit.pod:9
2179 " virt-edit [--options] -d domname file [file ...]\n"
2184 #: ../edit/virt-edit.pod:11
2187 " virt-edit [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
2192 #: ../edit/virt-edit.pod:13
2195 " virt-edit [-d domname|-a disk.img] file -e 'expr'\n"
2200 #: ../edit/virt-edit.pod:17
2203 " virt-edit domname file\n"
2208 #: ../edit/virt-edit.pod:19 ../edit/virt-edit.pod:183
2211 " virt-edit disk.img [disk.img ...] file\n"
2216 #: ../edit/virt-edit.pod:21 ../fish/guestfish.pod:23 ../fish/virt-copy-in.pod:13 ../fish/virt-tar-in.pod:15 ../fuse/guestmount.pod:15 ../rescue/virt-rescue.pod:19 ../tools/virt-tar.pl:64 ../tools/virt-win-reg.pl:51
2221 #: ../edit/virt-edit.pod:23
2223 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
2224 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
2225 "doing this, but doesn't catch all cases."
2229 #: ../edit/virt-edit.pod:29
2231 "C<virt-edit> is a command line tool to edit C<file> where each C<file> "
2232 "exists in the named virtual machine (or disk image)."
2236 #: ../edit/virt-edit.pod:32
2238 "Multiple filenames can be given, in which case they are each edited in "
2239 "turn. Each filename must be a full path, starting at the root directory "
2240 "(starting with '/')."
2244 #: ../edit/virt-edit.pod:36
2245 msgid "If you want to just view a file, use L<virt-cat(1)>."
2249 #: ../edit/virt-edit.pod:38
2251 "For more complex cases you should look at the L<guestfish(1)> tool (see "
2252 "L</USING GUESTFISH> below)."
2256 #: ../edit/virt-edit.pod:41
2258 "C<virt-edit> cannot be used to create a new file. L<guestfish(1)> can do "
2259 "that and much more."
2263 #: ../edit/virt-edit.pod:46
2264 msgid "Edit the named files interactively:"
2268 #: ../edit/virt-edit.pod:48
2271 " virt-edit -d mydomain /boot/grub/grub.conf\n"
2276 #: ../edit/virt-edit.pod:50
2279 " virt-edit -d mydomain /etc/passwd\n"
2284 #: ../edit/virt-edit.pod:52
2285 msgid "For Windows guests, some Windows paths are understood:"
2289 #: ../edit/virt-edit.pod:54
2292 " virt-edit -d mywindomain 'c:\\autoexec.bat'\n"
2297 #: ../edit/virt-edit.pod:56
2299 "If Perl is installed, you can also edit files non-interactively (see "
2300 "L</NON-INTERACTIVE EDITING> below). To change the init default level to 5:"
2304 #: ../edit/virt-edit.pod:60
2307 " virt-edit -d mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
2312 #: ../edit/virt-edit.pod:81
2313 msgid "B<-b> extension"
2317 #: ../edit/virt-edit.pod:83
2318 msgid "B<--backup> extension"
2322 #: ../edit/virt-edit.pod:85
2324 "Create a backup of the original file I<in the guest disk image>. The backup "
2325 "has the original filename with C<extension> added."
2329 #: ../edit/virt-edit.pod:88
2331 "Usually the first character of C<extension> would be a dot C<.> so you would "
2336 #: ../edit/virt-edit.pod:91
2339 " virt-edit -b .orig [etc]\n"
2344 #: ../edit/virt-edit.pod:93
2345 msgid "By default, no backup file is made."
2349 #: ../edit/virt-edit.pod:95 ../fish/guestfish.pod:181 ../fuse/guestmount.pod:96 ../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
2354 #: ../edit/virt-edit.pod:97 ../fish/guestfish.pod:183 ../fuse/guestmount.pod:98 ../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
2355 msgid "B<--connect URI>"
2359 #: ../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
2361 "If you specify guest block devices directly, then libvirt is not used at "
2366 #: ../edit/virt-edit.pod:114
2368 "When prompting for keys and passphrases, virt-edit normally turns echoing "
2369 "off so you cannot see what you are typing. If you are not worried about "
2370 "Tempest attacks and there is no one else in the room you can specify this "
2371 "flag to see what you are typing."
2375 #: ../edit/virt-edit.pod:119
2380 #: ../edit/virt-edit.pod:121
2381 msgid "B<--expr> EXPR"
2385 #: ../edit/virt-edit.pod:123
2387 "Instead of launching the external editor, non-interactively apply the Perl "
2388 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
2393 #: ../edit/virt-edit.pod:127
2395 "Be careful to properly quote the expression to prevent it from being altered "
2400 #: ../edit/virt-edit.pod:130
2401 msgid "Note that this option is only available when Perl 5 is installed."
2405 #: ../edit/virt-edit.pod:132
2406 msgid "B<--format> raw|qcow2|..."
2410 #: ../edit/virt-edit.pod:143
2413 " virt-edit --format=raw -a disk.img file\n"
2418 #: ../edit/virt-edit.pod:147
2421 " virt-edit --format=raw -a disk.img --format -a another.img file\n"
2426 #: ../edit/virt-edit.pod:181
2427 msgid "Previous versions of virt-edit allowed you to write either:"
2431 #: ../edit/virt-edit.pod:187
2434 " virt-edit guestname file\n"
2439 #: ../edit/virt-edit.pod:195
2440 msgid "NON-INTERACTIVE EDITING"
2444 #: ../edit/virt-edit.pod:197
2446 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
2447 "administrator can interactively edit the file."
2451 #: ../edit/virt-edit.pod:200
2453 "There are two ways also to use C<virt-edit> from scripts in order to make "
2454 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
2455 "like this, it's less error-prone to write scripts directly using the "
2456 "libguestfs API and Augeas for configuration file editing.)"
2460 #: ../edit/virt-edit.pod:206
2462 "The first method is to temporarily set C<$EDITOR> to any script or program "
2463 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
2464 "update C<tmpfile> in place however it likes."
2468 #: ../edit/virt-edit.pod:210
2470 "The second method is to use the I<-e> parameter of C<virt-edit> to run a "
2471 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
2472 "instances of C<foo> with C<bar> in a file:"
2476 #: ../edit/virt-edit.pod:214
2479 " virt-edit -d domname filename -e 's/foo/bar/'\n"
2484 #: ../edit/virt-edit.pod:216
2486 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
2487 "For example to delete root's password you could do:"
2491 #: ../edit/virt-edit.pod:219
2494 " virt-edit -d domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
2499 #: ../edit/virt-edit.pod:221
2501 "What really happens is that the snippet is evaluated as a Perl expression "
2502 "for each line of the file. The line, including the final C<\\n>, is passed "
2503 "in C<$_> and the expression should update C<$_> or leave it unchanged."
2507 #: ../edit/virt-edit.pod:226
2509 "To delete a line, set C<$_> to the empty string. For example, to delete the "
2510 "C<apache> user account from the password file you can do:"
2514 #: ../edit/virt-edit.pod:229
2517 " virt-edit -d mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
2522 #: ../edit/virt-edit.pod:231
2524 "To insert a line, prepend or append it to C<$_>. However appending lines to "
2525 "the end of the file is rather difficult this way since there is no concept "
2526 "of \"last line of the file\" - your expression just doesn't get called "
2527 "again. You might want to use the first method (setting C<$EDITOR>) if you "
2532 #: ../edit/virt-edit.pod:237
2534 "The variable C<$lineno> contains the current line number. As is "
2535 "traditional, the first line in the file is number C<1>."
2539 #: ../edit/virt-edit.pod:240
2541 "The return value from the expression is ignored, but the expression may call "
2542 "C<die> in order to abort the whole program, leaving the original file "
2547 #: ../edit/virt-edit.pod:244
2549 "Remember when matching the end of a line that C<$_> may contain the final "
2550 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
2551 "newline then neither of these. Thus to match or substitute some text at the "
2552 "end of a line, use this regular expression:"
2556 #: ../edit/virt-edit.pod:249
2559 " /some text(\\r?\\n)?$/\n"
2564 #: ../edit/virt-edit.pod:251
2566 "Alternately, use the perl C<chomp> function, being careful not to chomp "
2567 "C<$_> itself (since that would remove all newlines from the file):"
2571 #: ../edit/virt-edit.pod:255
2574 " my $m = $_; chomp $m; $m =~ /some text$/\n"
2579 #: ../edit/virt-edit.pod:257 ../fish/guestfish.pod:858
2580 msgid "WINDOWS PATHS"
2584 #: ../edit/virt-edit.pod:259
2586 "C<virt-edit> has a limited ability to understand Windows drive letters and "
2587 "paths (eg. C<E:\\foo\\bar.txt>)."
2591 #: ../edit/virt-edit.pod:262
2592 msgid "If and only if the guest is running Windows then:"
2596 #: ../edit/virt-edit.pod:268
2598 "Drive letter prefixes like C<C:> are resolved against the Windows Registry "
2599 "to the correct filesystem."
2603 #: ../edit/virt-edit.pod:273
2605 "Any backslash (C<\\>) characters in the path are replaced with forward "
2606 "slashes so that libguestfs can process it."
2610 #: ../edit/virt-edit.pod:278
2612 "The path is resolved case insensitively to locate the file that should be "
2617 #: ../edit/virt-edit.pod:283
2618 msgid "There are some known shortcomings:"
2622 #: ../edit/virt-edit.pod:289
2623 msgid "Some NTFS symbolic links may not be followed correctly."
2627 #: ../edit/virt-edit.pod:293
2628 msgid "NTFS junction points that cross filesystems are not followed."
2632 #: ../edit/virt-edit.pod:299
2634 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
2635 "C<virt-edit> doesn't work."
2639 #: ../edit/virt-edit.pod:302
2640 msgid "Using C<virt-edit> is approximately equivalent to doing:"
2644 #: ../edit/virt-edit.pod:304
2647 " guestfish --rw -i -d domname edit /file\n"
2652 #: ../edit/virt-edit.pod:306
2654 "where C<domname> is the name of the libvirt guest, and C</file> is the full "
2659 #: ../edit/virt-edit.pod:309
2661 "The command above uses libguestfs's guest inspection feature and so does not "
2662 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
2663 "disk images that don't contain guests. To edit a file on a disk image "
2668 #: ../edit/virt-edit.pod:314
2671 " guestfish --rw -a disk.img -m /dev/sda1 edit /file\n"
2676 #: ../edit/virt-edit.pod:316
2678 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
2679 "the disk image to edit, and C</file> is the full path to the file."
2683 #: ../edit/virt-edit.pod:320
2685 "C<virt-edit> cannot create new files. Use the guestfish commands C<touch>, "
2686 "C<write> or C<upload> instead:"
2690 #: ../edit/virt-edit.pod:323
2693 " guestfish --rw -i -d domname touch /newfile\n"
2698 #: ../edit/virt-edit.pod:325
2701 " guestfish --rw -i -d domname write /newfile \"new content\"\n"
2706 #: ../edit/virt-edit.pod:327
2709 " guestfish --rw -i -d domname upload localfile /newfile\n"
2714 #: ../edit/virt-edit.pod:329 ../fish/guestfish.pod:1075 ../rescue/virt-rescue.pod:257 ../src/guestfs.pod:2965 ../test-tool/libguestfs-test-tool.pod:82
2715 msgid "ENVIRONMENT VARIABLES"
2719 #: ../edit/virt-edit.pod:333
2724 #: ../edit/virt-edit.pod:335
2726 "If set, this string is used as the editor. It may contain arguments, "
2727 "eg. C<\"emacs -nw\">"
2731 #: ../edit/virt-edit.pod:338
2732 msgid "If not set, C<vi> is used."
2736 #: ../edit/virt-edit.pod:351
2738 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
2739 "L<virt-tar-in(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
2740 "L<Sys::Virt(3)>, L<http://libguestfs.org/>, L<perl(1)>, L<perlre(1)>."
2744 #: ../examples/guestfs-examples.pod:5
2745 msgid "guestfs-examples - Examples of using libguestfs from C"
2749 #: ../examples/guestfs-examples.pod:9 ../src/guestfs.pod:9
2752 " #include <guestfs.h>\n"
2757 #: ../examples/guestfs-examples.pod:11
2760 " guestfs_h *g = guestfs_create ();\n"
2761 " guestfs_add_drive_ro (g, \"disk.img\");\n"
2762 " guestfs_launch (g);\n"
2767 #: ../examples/guestfs-examples.pod:15 ../src/guestfs.pod:19
2770 " cc prog.c -o prog -lguestfs\n"
2772 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
2777 #: ../examples/guestfs-examples.pod:21
2779 "This manual page contains examples of calling libguestfs from the C "
2780 "programming language. If you are not familiar with using libguestfs, you "
2781 "also need to read L<guestfs(3)>."
2785 #: ../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
2786 msgid "EXAMPLE 1: CREATE A DISK IMAGE"
2790 #: ../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
2795 #: ../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
2796 msgid "EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE"
2800 #: ../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
2805 #: ../examples/guestfs-examples.pod:35
2807 "L<guestfs(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, "
2808 "L<guestfs-python(3)>, L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, "
2809 "L<http://libguestfs.org/>."
2813 #: ../examples/guestfs-examples.pod:44 ../examples/guestfs-recipes.pod:396 ../fish/guestfish.pod:1238 ../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:314 ../inspector/virt-inspector.pod:380 ../java/examples/guestfs-java.pod:57 ../ocaml/examples/guestfs-ocaml.pod:90 ../perl/examples/guestfs-perl.pod:51 ../python/examples/guestfs-python.pod:53 ../ruby/examples/guestfs-ruby.pod:47 ../src/guestfs.pod:3087 ../test-tool/libguestfs-test-tool.pod:93
2818 #: ../examples/guestfs-examples.pod:46 ../examples/guestfs-recipes.pod:398 ../fish/guestfish.pod:1240 ../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:316 ../java/examples/guestfs-java.pod:59 ../ocaml/examples/guestfs-ocaml.pod:92 ../perl/examples/guestfs-perl.pod:53 ../python/examples/guestfs-python.pod:55 ../ruby/examples/guestfs-ruby.pod:49 ../src/guestfs.pod:3089 ../test-tool/libguestfs-test-tool.pod:95
2819 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
2823 #: ../examples/guestfs-examples.pod:50 ../ocaml/examples/guestfs-ocaml.pod:96 ../python/examples/guestfs-python.pod:59 ../ruby/examples/guestfs-ruby.pod:53
2824 msgid "Copyright (C) 2010 Red Hat Inc. L<http://libguestfs.org/>"
2828 #: ../examples/guestfs-examples.pod:52 ../examples/guestfs-recipes.pod:404 ../java/examples/guestfs-java.pod:65 ../ocaml/examples/guestfs-ocaml.pod:98 ../perl/examples/guestfs-perl.pod:59 ../python/examples/guestfs-python.pod:61 ../ruby/examples/guestfs-ruby.pod:55
2830 "The examples in this manual page may be freely copied, modified and "
2831 "distributed without any restrictions."
2835 #: ../examples/guestfs-examples.pod:55 ../examples/guestfs-recipes.pod:407 ../java/examples/guestfs-java.pod:68 ../ocaml/examples/guestfs-ocaml.pod:101 ../perl/examples/guestfs-perl.pod:62 ../python/examples/guestfs-python.pod:64 ../ruby/examples/guestfs-ruby.pod:58 ../src/guestfs.pod:3096
2837 "This library is free software; you can redistribute it and/or modify it "
2838 "under the terms of the GNU Lesser General Public License as published by the "
2839 "Free Software Foundation; either version 2 of the License, or (at your "
2840 "option) any later version."
2844 #: ../examples/guestfs-examples.pod:60 ../examples/guestfs-recipes.pod:412 ../java/examples/guestfs-java.pod:73 ../ocaml/examples/guestfs-ocaml.pod:106 ../perl/examples/guestfs-perl.pod:67 ../python/examples/guestfs-python.pod:69 ../ruby/examples/guestfs-ruby.pod:63 ../src/guestfs.pod:3101
2846 "This library is distributed in the hope that it will be useful, but WITHOUT "
2847 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
2848 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
2853 #: ../examples/guestfs-examples.pod:65 ../examples/guestfs-recipes.pod:417 ../java/examples/guestfs-java.pod:78 ../ocaml/examples/guestfs-ocaml.pod:111 ../perl/examples/guestfs-perl.pod:72 ../python/examples/guestfs-python.pod:74 ../ruby/examples/guestfs-ruby.pod:68 ../src/guestfs.pod:3106
2855 "You should have received a copy of the GNU Lesser General Public License "
2856 "along with this library; if not, write to the Free Software Foundation, "
2857 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
2861 #: ../examples/guestfs-recipes.pod:3 ../examples/guestfs-recipes.pod:12
2866 #: ../examples/guestfs-recipes.pod:5
2868 "pod2man and pod2html have differing bugs which makes it hard to write URLs "
2869 "here. The only way which works for both sorts of output is to just write "
2870 "the URL directly. Do NOT use L<...> for URLs."
2874 #: ../examples/guestfs-recipes.pod:9
2876 "We break with tradition here and don't use ALL CAPS for the section "
2877 "headings, as this makes them much easier to read."
2881 #: ../examples/guestfs-recipes.pod:16
2882 msgid "guestfs-recipes - libguestfs, guestfish and virt tools recipes"
2886 #: ../examples/guestfs-recipes.pod:20
2888 "This page contains recipes for and links to things you can do using "
2889 "libguestfs, L<guestfish(1)> and the virt tools."
2893 #: ../examples/guestfs-recipes.pod:23
2894 msgid "Audit a virtual machine for setuid files"
2898 #: ../examples/guestfs-recipes.pod:25
2900 "The link below contains a small program which can be used to audit a Linux "
2901 "virtual machine to see what setuid and setgid files it contains."
2905 #: ../examples/guestfs-recipes.pod:28
2906 msgid "https://rwmj.wordpress.com/2010/12/15/tip-audit-virtual-machine-for-setuid-files/#content"
2910 #: ../examples/guestfs-recipes.pod:30
2911 msgid "Change the background image in a Windows XP VM"
2915 #: ../examples/guestfs-recipes.pod:32
2917 "The links below explain how to use L<guestfish(1)> to change the background "
2918 "image for a user of a Windows XP VM. Unfortunately the technique appears to "
2919 "be substantially different for each version of Windows."
2923 #: ../examples/guestfs-recipes.pod:37
2925 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002655.html "
2926 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002658.html"
2930 #: ../examples/guestfs-recipes.pod:40
2931 msgid "Cloning a virtual machine (Linux)"
2935 #: ../examples/guestfs-recipes.pod:42
2937 "The guestfish technique described in the link below works well for most "
2938 "Linux VMs. Depending on the Linux distro you may need to change the paths "
2943 #: ../examples/guestfs-recipes.pod:46
2944 msgid "https://rwmj.wordpress.com/2010/09/24/tip-my-procedure-for-cloning-a-fedora-vm/#content"
2948 #: ../examples/guestfs-recipes.pod:48
2950 "Avoid L<virt-clone(1)>. Currently what to do about virt-clone is under "
2955 #: ../examples/guestfs-recipes.pod:51
2956 msgid "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
2960 #: ../examples/guestfs-recipes.pod:53
2961 msgid "Cloning a virtual machine (Windows)"
2965 #: ../examples/guestfs-recipes.pod:55
2967 "It is possible to do a \"sysprep\" using libguestfs alone, although not "
2968 "straightforward. Currently there is code in the Aeolus Oz project which "
2969 "does this (using libguestfs). As part of our review of the virt-clone tool, "
2970 "we may add sysprepping ability."
2974 #: ../examples/guestfs-recipes.pod:60
2976 "https://github.com/clalancette/oz "
2977 "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
2981 #: ../examples/guestfs-recipes.pod:63
2982 msgid "Convert a CD-ROM / DVD / ISO to a tarball"
2986 #: ../examples/guestfs-recipes.pod:65
2987 msgid "This converts input C<cd.iso> to output C<cd.tar.gz>:"
2991 #: ../examples/guestfs-recipes.pod:67
2994 " guestfish --ro -a cd.iso -m /dev/sda tgz-out / cd.tar.gz\n"
2999 #: ../examples/guestfs-recipes.pod:69
3000 msgid "To export just a subdirectory, eg. C</files>, do:"
3004 #: ../examples/guestfs-recipes.pod:71
3007 " guestfish --ro -a cd.iso -m /dev/sda tgz-out /files cd.tar.gz\n"
3012 #: ../examples/guestfs-recipes.pod:73
3013 msgid "Create empty disk images"
3017 #: ../examples/guestfs-recipes.pod:75
3019 "You can use the L<guestfish(1)> I<-N> option to create empty disk images. "
3020 "The useful guide below explains the options available."
3024 #: ../examples/guestfs-recipes.pod:78
3025 msgid "https://rwmj.wordpress.com/2010/09/08/new-guestfish-n-options-in-1-5-9/#content"
3029 #: ../examples/guestfs-recipes.pod:80
3030 msgid "Dump raw filesystem content from inside a disk image or VM"
3034 #: ../examples/guestfs-recipes.pod:82
3036 "You can use the L<guestfish(1)> C<download> command to extract the raw "
3037 "filesystem content from any filesystem in a disk image or a VM (even one "
3038 "which is encrypted or buried inside an LV):"
3042 #: ../examples/guestfs-recipes.pod:86
3045 " guestfish --ro -a disk.img run : download /dev/sda1 sda1.img\n"
3050 #: ../examples/guestfs-recipes.pod:88
3053 " guestfish --ro -d Guest run : download /dev/vg_guest/lv_root lv.img\n"
3058 #: ../examples/guestfs-recipes.pod:90
3059 msgid "To list the filesystems in a disk image, use L<virt-filesystems(1)>."
3063 #: ../examples/guestfs-recipes.pod:92
3064 msgid "Edit grub configuration in a VM"
3068 #: ../examples/guestfs-recipes.pod:94
3069 msgid "You can use this to:"
3073 #: ../examples/guestfs-recipes.pod:100
3074 msgid "Fix a virtual machine that does not boot."
3078 #: ../examples/guestfs-recipes.pod:104
3079 msgid "Change which kernel is used to boot the VM."
3083 #: ../examples/guestfs-recipes.pod:108
3084 msgid "Change kernel command line options."
3088 #: ../examples/guestfs-recipes.pod:112
3089 msgid "Use L<virt-edit(1)> to edit the grub configuration:"
3093 #: ../examples/guestfs-recipes.pod:114
3096 " virt-edit -d BrokenGuest /boot/grub/grub.conf\n"
3101 #: ../examples/guestfs-recipes.pod:116
3103 "or for general tinkering inside an unbootable VM use L<virt-rescue(1)> like "
3108 #: ../examples/guestfs-recipes.pod:119
3111 " virt-rescue -d BrokenGuest\n"
3116 #: ../examples/guestfs-recipes.pod:121
3117 msgid "Export any directory from a VM"
3121 #: ../examples/guestfs-recipes.pod:123
3122 msgid "To export C</home> from a VM into a local directory use L<virt-copy-out(1)>:"
3126 #: ../examples/guestfs-recipes.pod:126
3129 " virt-copy-out -d Guest /home .\n"
3134 #: ../examples/guestfs-recipes.pod:128 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1287 ../fish/guestfish-actions.pod:1929 ../src/guestfs-actions.pod:11 ../src/guestfs-actions.pod:1917 ../src/guestfs-actions.pod:2855 ../src/guestfs.pod:1639 ../tools/virt-win-reg.pl:706
3139 #: ../examples/guestfs-recipes.pod:134
3141 "The final dot of the command is not a printing error. It means we want to "
3142 "copy out to the current directory."
3146 #: ../examples/guestfs-recipes.pod:139
3147 msgid "This creates a directory called C<home> under the current directory."
3151 #: ../examples/guestfs-recipes.pod:143
3153 "If the guest is a Windows guest then you can use drive letters and "
3154 "backslashes, but you must prefix the path with C<win:> and quote it to "
3155 "protect it from the shell, like this:"
3159 #: ../examples/guestfs-recipes.pod:147
3162 " virt-copy-out -d WinGuest 'win:c:\\windows\\system32\\config' .\n"
3167 #: ../examples/guestfs-recipes.pod:149
3168 msgid "To get the output as a compressed tarball, do:"
3172 #: ../examples/guestfs-recipes.pod:151
3175 " virt-tar-out -d Guest /home - | gzip --best > home.tar.gz\n"
3180 #: ../examples/guestfs-recipes.pod:153
3182 "Although it sounds tempting, this is usually not a reliable way to get a "
3183 "backup from a running guest. See the entry in the FAQ: "
3184 "http://libguestfs.org/FAQ.html#backup"
3188 #: ../examples/guestfs-recipes.pod:157
3189 msgid "Find out which user is using the most space"
3193 #: ../examples/guestfs-recipes.pod:159
3195 "This simple script examines a Linux guest to find out which user is using "
3196 "the most space in their home directory:"
3200 #: ../examples/guestfs-recipes.pod:162
3208 #: ../examples/guestfs-recipes.pod:164
3216 #: ../examples/guestfs-recipes.pod:166
3225 #: ../examples/guestfs-recipes.pod:169
3228 " eval $(guestfish --ro -d \"$vm\" -i --listen)\n"
3233 #: ../examples/guestfs-recipes.pod:171
3236 " for d in $(guestfish --remote ls \"$dir\"); do\n"
3237 " echo -n \"$dir/$d\"\n"
3239 " guestfish --remote du \"$dir/$d\";\n"
3240 " done | sort -nr -k 2\n"
3245 #: ../examples/guestfs-recipes.pod:177 ../fish/guestfish.pod:941
3248 " guestfish --remote exit\n"
3253 #: ../examples/guestfs-recipes.pod:179
3254 msgid "Get DHCP address from a VM"
3258 #: ../examples/guestfs-recipes.pod:181
3260 "The link below explains the many different possible techniques for getting "
3261 "the last assigned DHCP address of a virtual machine."
3265 #: ../examples/guestfs-recipes.pod:184
3266 msgid "https://rwmj.wordpress.com/2011/03/31/tip-code-for-getting-dhcp-address-from-a-virtual-machine-disk-image/#content"
3270 #: ../examples/guestfs-recipes.pod:186
3272 "In the libguestfs source examples directory you will find the latest version "
3273 "of the C<virt-dhcp-address.c> program."
3277 #: ../examples/guestfs-recipes.pod:189
3278 msgid "Get the operating system product name string"
3282 #: ../examples/guestfs-recipes.pod:191
3283 msgid "Save the following script into a file called C<product-name.sh>:"
3287 #: ../examples/guestfs-recipes.pod:193
3292 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
3293 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
3294 " guestfish --remote inspect-get-product-name \"$root\"\n"
3295 " guestfish --remote exit\n"
3300 #: ../examples/guestfs-recipes.pod:200
3301 msgid "Make the script executable and run it on a named guest:"
3305 #: ../examples/guestfs-recipes.pod:202
3308 " # product-name.sh RHEL60x64\n"
3309 " Red Hat Enterprise Linux Server release 6.0 (Santiago)\n"
3314 #: ../examples/guestfs-recipes.pod:205
3316 "You can also use an XPath query on the L<virt-inspector(1)> XML using the "
3317 "C<xpath> command line tool or from your favourite programming language:"
3321 #: ../examples/guestfs-recipes.pod:209
3324 " # virt-inspector RHEL60x64 > xml\n"
3325 " # xpath '//product_name' < xml\n"
3328 " <product_name>Red Hat Enterprise Linux Server release 6.0 "
3329 "(Santiago)</product_name>\n"
3334 #: ../examples/guestfs-recipes.pod:215
3335 msgid "Get the default boot kernel for a Linux VM"
3339 #: ../examples/guestfs-recipes.pod:217
3341 "The link below contains a program to print the default boot kernel for a "
3346 #: ../examples/guestfs-recipes.pod:220
3347 msgid "https://rwmj.wordpress.com/2010/10/30/tip-use-augeas-to-get-the-default-boot-kernel-for-a-vm/#content"
3351 #: ../examples/guestfs-recipes.pod:222
3353 "It uses Augeas, and the technique is generally applicable for many different "
3358 #: ../examples/guestfs-recipes.pod:229
3359 msgid "listing the user accounts in the guest"
3363 #: ../examples/guestfs-recipes.pod:233
3364 msgid "what repositories is it configured to use"
3368 #: ../examples/guestfs-recipes.pod:237
3369 msgid "what NTP servers does it connect to"
3373 #: ../examples/guestfs-recipes.pod:241
3374 msgid "what were the boot messages last time it booted"
3378 #: ../examples/guestfs-recipes.pod:245
3379 msgid "listing who was logged in recently"
3383 #: ../examples/guestfs-recipes.pod:249
3384 msgid "http://augeas.net/"
3388 #: ../examples/guestfs-recipes.pod:251
3389 msgid "Install RPMs in a guest"
3393 #: ../examples/guestfs-recipes.pod:253
3395 "The link below contains a method to install RPMs in a guest. In fact the "
3396 "RPMs are just uploaded to the guest along with a \"firstboot\" script that "
3397 "installs them next time the guest is booted. You could use this technique "
3398 "to install vital security updates in an offline guest."
3402 #: ../examples/guestfs-recipes.pod:259
3403 msgid "https://rwmj.wordpress.com/2010/12/01/tip-install-rpms-in-a-guest/#content"
3407 #: ../examples/guestfs-recipes.pod:261
3408 msgid "List applications installed in a VM"
3412 #: ../examples/guestfs-recipes.pod:263
3413 msgid "Save the following to a file C<list-apps.sh>:"
3417 #: ../examples/guestfs-recipes.pod:265
3422 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
3423 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
3424 " guestfish --remote inspect-list-applications \"$root\"\n"
3425 " guestfish --remote exit\n"
3430 #: ../examples/guestfs-recipes.pod:272
3432 "Make the file executable and then you can run it on any named virtual "
3437 #: ../examples/guestfs-recipes.pod:275
3440 " # list-apps.sh WinGuest\n"
3442 " app_name: Mozilla Firefox (3.6.12)\n"
3443 " app_display_name: Mozilla Firefox (3.6.12)\n"
3445 " app_version: 3.6.12 (en-GB)\n"
3447 " app_install_path: C:\\Program Files\\Mozilla Firefox\n"
3448 " app_trans_path:\n"
3449 " app_publisher: Mozilla\n"
3450 " app_url: http://www.mozilla.com/en-GB/\n"
3451 " app_source_package:\n"
3453 " app_description: Mozilla Firefox\n"
3456 " app_name: VLC media player\n"
3457 " app_display_name: VLC media player 1.1.5\n"
3459 " app_version: 1.1.5\n"
3461 " app_install_path: C:\\Program Files\\VideoLAN\\VLC\n"
3462 " app_trans_path:\n"
3463 " app_publisher: VideoLAN\n"
3464 " app_url: http://www.videolan.org/\n"
3465 " app_source_package:\n"
3467 " app_description:\n"
3473 #: ../examples/guestfs-recipes.pod:305
3475 "If you want to run the script on disk images (instead of libvirt virtual "
3476 "machines), change C<-d \"$1\"> to C<-a \"$1\">. See also "
3477 "L<virt-inspector(1)>."
3481 #: ../examples/guestfs-recipes.pod:309
3482 msgid "List files and directories in a VM"
3486 #: ../examples/guestfs-recipes.pod:311
3487 msgid "This involves using the L<guestfish(1)> C<find0> command like this:"
3491 #: ../examples/guestfs-recipes.pod:313
3494 " guestfish --ro -d Guest -i find0 / - | tr '\\0' '\\n' | sort\n"
3499 #: ../examples/guestfs-recipes.pod:315
3500 msgid "List services in a Windows VM"
3504 #: ../examples/guestfs-recipes.pod:317
3506 "The link below contains a script that can be used to list out the services "
3507 "from a Windows VM, and whether those services run at boot time or are loaded "
3512 #: ../examples/guestfs-recipes.pod:321
3513 msgid "https://rwmj.wordpress.com/2010/12/10/tip-list-services-in-a-windows-guest/#content"
3517 #: ../examples/guestfs-recipes.pod:323
3518 msgid "Make a disk image sparse"
3522 #: ../examples/guestfs-recipes.pod:325
3524 "The link below contains some guides for making a disk image sparse (or "
3525 "reintroducing sparseness)."
3529 #: ../examples/guestfs-recipes.pod:328
3530 msgid "https://rwmj.wordpress.com/2010/10/19/tip-making-a-disk-image-sparse/#content"
3534 #: ../examples/guestfs-recipes.pod:330
3535 msgid "Monitor disk usage over time"
3539 #: ../examples/guestfs-recipes.pod:332
3541 "You can use L<virt-df(1)> to monitor disk usage of your guests over time. "
3542 "The link below contains a guide."
3546 #: ../examples/guestfs-recipes.pod:335
3547 msgid "http://virt-tools.org/learning/advanced-virt-df/"
3551 #: ../examples/guestfs-recipes.pod:337
3552 msgid "Reading the Windows Event Log from Windows Vista (or later)"
3556 #: ../examples/guestfs-recipes.pod:339
3558 "L<guestfish(1)> plus the tools described in the link below can be used to "
3559 "read out the Windows Event Log from any virtual machine running Windows "
3560 "Vista or a later version."
3564 #: ../examples/guestfs-recipes.pod:343
3565 msgid "https://rwmj.wordpress.com/2011/04/17/decoding-the-windows-event-log-using-guestfish/#content"
3569 #: ../examples/guestfs-recipes.pod:345
3570 msgid "Remove root password (Linux)"
3574 #: ../examples/guestfs-recipes.pod:347
3576 "Using the L<virt-edit(1)> I<-e> option you can do simple replacements on "
3577 "files. One use is to remove the root password from a Linux guest:"
3581 #: ../examples/guestfs-recipes.pod:350
3584 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
3589 #: ../examples/guestfs-recipes.pod:352
3590 msgid "Remove Administrator password (Windows)"
3594 #: ../examples/guestfs-recipes.pod:354
3596 "The link below contains one technique for removing the Administrator "
3597 "password from a Windows VM, or to be more precise, it gives you a command "
3598 "prompt the next time you log in which you can use to bypass any security:"
3602 #: ../examples/guestfs-recipes.pod:359
3603 msgid "https://mdbooth.wordpress.com/2010/10/18/resetting-a-windows-guests-administrator-password-with-guestfish/"
3607 #: ../examples/guestfs-recipes.pod:361
3608 msgid "Unpack a live CD"
3612 #: ../examples/guestfs-recipes.pod:363
3614 "Linux live CDs often contain multiple layers of disk images wrapped like a "
3615 "Russian doll. You can use L<guestfish(1)> to look inside these multiple "
3616 "layers, as outlined in the guide below."
3620 #: ../examples/guestfs-recipes.pod:367
3621 msgid "https://rwmj.wordpress.com/2009/07/15/unpack-the-russian-doll-of-a-f11-live-cd/#content"
3625 #: ../examples/guestfs-recipes.pod:369
3626 msgid "Uploading and downloading files"
3630 #: ../examples/guestfs-recipes.pod:371
3632 "The link below contains general tips on uploading (copying in) and "
3633 "downloading (copying out) files from VMs."
3637 #: ../examples/guestfs-recipes.pod:374
3638 msgid "https://rwmj.wordpress.com/2010/12/02/tip-uploading-and-downloading/#content"
3642 #: ../examples/guestfs-recipes.pod:376
3643 msgid "Use libguestfs tools on VMware ESX guests"
3647 #: ../examples/guestfs-recipes.pod:378
3649 "The link below explains how to use libguestfs, L<guestfish(1)> and the virt "
3650 "tools on any VMware ESX guests, by first sharing the VMware VMFS over sshfs."
3654 #: ../examples/guestfs-recipes.pod:382
3655 msgid "https://rwmj.wordpress.com/2011/05/10/tip-use-libguestfs-on-vmware-esx-guests/#content"
3659 #: ../examples/guestfs-recipes.pod:386
3661 "L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>, L<guestfs-java(3)>, "
3662 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
3663 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
3667 #: ../examples/guestfs-recipes.pod:402
3668 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
3672 #: ../fish/guestfish-actions.pod:1
3677 #: ../fish/guestfish-actions.pod:3
3680 " add-cdrom filename\n"
3685 #: ../fish/guestfish-actions.pod:5 ../src/guestfs-actions.pod:7
3686 msgid "This function adds a virtual CD-ROM disk image to the guest."
3690 #: ../fish/guestfish-actions.pod:7 ../src/guestfs-actions.pod:9
3691 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
3695 #: ../fish/guestfish-actions.pod:15
3697 "This call checks for the existence of C<filename>. This stops you from "
3698 "specifying other types of drive which are supported by qemu such as C<nbd:> "
3699 "and C<http:> URLs. To specify those, use the general L</config> call "
3704 #: ../fish/guestfish-actions.pod:22
3706 "If you just want to add an ISO file (often you use this as an efficient way "
3707 "to transfer large files into the guest), then you should probably use "
3708 "L</add-drive-ro> instead."
3712 #: ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:163 ../fish/guestfish-actions.pod:177 ../src/guestfs-actions.pod:32 ../src/guestfs-actions.pod:254 ../src/guestfs-actions.pod:275
3714 "This function is deprecated. In new code, use the C<add_drive_opts> call "
3719 #: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:166 ../fish/guestfish-actions.pod:180 ../fish/guestfish-actions.pod:986 ../fish/guestfish-actions.pod:1346 ../fish/guestfish-actions.pod:1360 ../fish/guestfish-actions.pod:3085 ../fish/guestfish-actions.pod:3292 ../fish/guestfish-actions.pod:3406 ../fish/guestfish-actions.pod:3454 ../fish/guestfish-actions.pod:4355 ../fish/guestfish-actions.pod:4378 ../fish/guestfish-actions.pod:4400 ../fish/guestfish-actions.pod:4438 ../fish/guestfish-actions.pod:5087 ../fish/guestfish-actions.pod:5185 ../src/guestfs-actions.pod:35 ../src/guestfs-actions.pod:257 ../src/guestfs-actions.pod:278 ../src/guestfs-actions.pod:1513 ../src/guestfs-actions.pod:2008 ../src/guestfs-actions.pod:2029 ../src/guestfs-actions.pod:4628 ../src/guestfs-actions.pod:4947 ../src/guestfs-actions.pod:5165 ../src/guestfs-actions.pod:5255 ../src/guestfs-actions.pod:6544 ../src/guestfs-actions.pod:6574 ../src/guestfs-actions.pod:6607 ../src/guestfs-actions.pod:6666 ../src/guestfs-actions.pod:7602 ../src/guestfs-actions.pod:7714 ../src/guestfs-actions.pod:7884
3721 "Deprecated functions will not be removed from the API, but the fact that "
3722 "they are deprecated indicates that there are problems with correct use of "
3727 #: ../fish/guestfish-actions.pod:35
3732 #: ../fish/guestfish-actions.pod:37
3737 #: ../fish/guestfish-actions.pod:39
3740 " add-domain dom [libvirturi:..] [readonly:..] [iface:..] [live:..] "
3746 #: ../fish/guestfish-actions.pod:41
3748 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
3749 "It works by connecting to libvirt, requesting the domain and domain XML from "
3750 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
3754 #: ../fish/guestfish-actions.pod:46 ../src/guestfs-actions.pod:64
3756 "The number of disks added is returned. This operation is atomic: if an "
3757 "error is returned, then no disks are added."
3761 #: ../fish/guestfish-actions.pod:49 ../src/guestfs-actions.pod:67
3763 "This function does some minimal checks to make sure the libvirt domain is "
3764 "not running (unless C<readonly> is true). In a future version we will try "
3765 "to acquire the libvirt lock on each disk."
3769 #: ../fish/guestfish-actions.pod:53 ../src/guestfs-actions.pod:71
3771 "Disks must be accessible locally. This often means that adding disks from a "
3772 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
3773 "unless those disks are accessible via the same device path locally too."
3777 #: ../fish/guestfish-actions.pod:58 ../src/guestfs-actions.pod:76
3779 "The optional C<libvirturi> parameter sets the libvirt URI (see "
3780 "L<http://libvirt.org/uri.html>). If this is not set then we connect to the "
3781 "default libvirt URI (or one set through an environment variable, see the "
3782 "libvirt documentation for full details)."
3786 #: ../fish/guestfish-actions.pod:64 ../src/guestfs-actions.pod:82
3788 "The optional C<live> flag controls whether this call will try to connect to "
3789 "a running virtual machine C<guestfsd> process if it sees a suitable "
3790 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
3791 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
3792 "DAEMONS> for more information."
3796 #: ../fish/guestfish-actions.pod:71 ../src/guestfs-actions.pod:89
3798 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
3799 "passed instead of the domain name. The C<dom> string is treated as a UUID "
3800 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
3805 #: ../fish/guestfish-actions.pod:76
3807 "The other optional parameters are passed directly through to "
3808 "L</add-drive-opts>."
3812 #: ../fish/guestfish-actions.pod:79 ../fish/guestfish-actions.pod:143 ../fish/guestfish-actions.pod:568 ../fish/guestfish-actions.pod:1968 ../fish/guestfish-actions.pod:3134 ../fish/guestfish-actions.pod:3307 ../fish/guestfish-actions.pod:3442
3814 "This command has one or more optional arguments. See L</OPTIONAL "
3819 #: ../fish/guestfish-actions.pod:81
3824 #: ../fish/guestfish-actions.pod:83
3827 " add-drive filename\n"
3832 #: ../fish/guestfish-actions.pod:85
3834 "This function is the equivalent of calling L</add-drive-opts> with no "
3835 "optional parameters, so the disk is added writable, with the format being "
3836 "detected automatically."
3840 #: ../fish/guestfish-actions.pod:89
3842 "Automatic detection of the format opens you up to a potential security hole "
3843 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
3844 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
3845 "you should think about replacing calls to this function with calls to "
3846 "L</add-drive-opts>, and specifying the format."
3850 #: ../fish/guestfish-actions.pod:96
3851 msgid "add-drive-opts"
3855 #: ../fish/guestfish-actions.pod:98
3860 #: ../fish/guestfish-actions.pod:100
3863 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
3868 #: ../fish/guestfish-actions.pod:102 ../src/guestfs-actions.pod:160
3870 "This function adds a virtual machine disk image C<filename> to libguestfs. "
3871 "The first time you call this function, the disk appears as C</dev/sda>, the "
3872 "second time as C</dev/sdb>, and so on."
3876 #: ../fish/guestfish-actions.pod:107 ../src/guestfs-actions.pod:165
3878 "You don't necessarily need to be root when using libguestfs. However you "
3879 "obviously do need sufficient permissions to access the filename for whatever "
3880 "operations you want to perform (ie. read access if you just want to read the "
3881 "image or write access if you want to modify the image)."
3885 #: ../fish/guestfish-actions.pod:113 ../src/guestfs-actions.pod:171
3886 msgid "This call checks that C<filename> exists."
3890 #: ../fish/guestfish-actions.pod:115 ../fish/guestfish-actions.pod:3096 ../src/guestfs-actions.pod:173 ../src/guestfs-actions.pod:4655
3891 msgid "The optional arguments are:"
3895 #: ../fish/guestfish-actions.pod:119 ../src/guestfs-actions.pod:177
3900 #: ../fish/guestfish-actions.pod:121 ../src/guestfs-actions.pod:179
3902 "If true then the image is treated as read-only. Writes are still allowed, "
3903 "but they are stored in a temporary snapshot overlay which is discarded at "
3904 "the end. The disk that you add is not modified."
3908 #: ../fish/guestfish-actions.pod:125 ../src/guestfs-actions.pod:183
3913 #: ../fish/guestfish-actions.pod:127
3915 "This forces the image format. If you omit this (or use L</add-drive> or "
3916 "L</add-drive-ro>) then the format is automatically detected. Possible "
3917 "formats include C<raw> and C<qcow2>."
3921 #: ../fish/guestfish-actions.pod:131 ../src/guestfs-actions.pod:189
3923 "Automatic detection of the format opens you up to a potential security hole "
3924 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
3925 "RHBZ#642934. Specifying the format closes this security hole."
3929 #: ../fish/guestfish-actions.pod:136 ../src/guestfs-actions.pod:194
3934 #: ../fish/guestfish-actions.pod:138
3936 "This rarely-used option lets you emulate the behaviour of the deprecated "
3937 "L</add-drive-with-if> call (q.v.)"
3941 #: ../fish/guestfish-actions.pod:145
3942 msgid "add-drive-ro"
3946 #: ../fish/guestfish-actions.pod:147
3951 #: ../fish/guestfish-actions.pod:149
3954 " add-drive-ro filename\n"
3959 #: ../fish/guestfish-actions.pod:151
3961 "This function is the equivalent of calling L</add-drive-opts> with the "
3962 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
3963 "is added read-only, with the format being detected automatically."
3967 #: ../fish/guestfish-actions.pod:156
3968 msgid "add-drive-ro-with-if"
3972 #: ../fish/guestfish-actions.pod:158
3975 " add-drive-ro-with-if filename iface\n"
3980 #: ../fish/guestfish-actions.pod:160
3982 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
3983 "interface emulation to use at run time."
3987 #: ../fish/guestfish-actions.pod:170
3988 msgid "add-drive-with-if"
3992 #: ../fish/guestfish-actions.pod:172
3995 " add-drive-with-if filename iface\n"
4000 #: ../fish/guestfish-actions.pod:174
4002 "This is the same as L</add-drive> but it allows you to specify the QEMU "
4003 "interface emulation to use at run time."
4007 #: ../fish/guestfish-actions.pod:184
4012 #: ../fish/guestfish-actions.pod:186
4015 " aug-clear augpath\n"
4020 #: ../fish/guestfish-actions.pod:188 ../src/guestfs-actions.pod:290
4022 "Set the value associated with C<path> to C<NULL>. This is the same as the "
4023 "L<augtool(1)> C<clear> command."
4027 #: ../fish/guestfish-actions.pod:191
4032 #: ../fish/guestfish-actions.pod:193
4040 #: ../fish/guestfish-actions.pod:195
4042 "Close the current Augeas handle and free up any resources used by it. After "
4043 "calling this, you have to call L</aug-init> again before you can use any "
4044 "other Augeas functions."
4048 #: ../fish/guestfish-actions.pod:200
4053 #: ../fish/guestfish-actions.pod:202
4056 " aug-defnode name expr val\n"
4061 #: ../fish/guestfish-actions.pod:204 ../src/guestfs-actions.pod:319
4062 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
4066 #: ../fish/guestfish-actions.pod:207
4068 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
4069 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
4070 "containing that single node."
4074 #: ../fish/guestfish-actions.pod:211 ../src/guestfs-actions.pod:326
4076 "On success this returns a pair containing the number of nodes in the "
4077 "nodeset, and a boolean flag if a node was created."
4081 #: ../fish/guestfish-actions.pod:215
4086 #: ../fish/guestfish-actions.pod:217
4089 " aug-defvar name expr\n"
4094 #: ../fish/guestfish-actions.pod:219 ../src/guestfs-actions.pod:343
4096 "Defines an Augeas variable C<name> whose value is the result of evaluating "
4097 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
4101 #: ../fish/guestfish-actions.pod:223 ../src/guestfs-actions.pod:347
4103 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
4104 "evaluates to something which is not a nodeset."
4108 #: ../fish/guestfish-actions.pod:226
4113 #: ../fish/guestfish-actions.pod:228
4116 " aug-get augpath\n"
4121 #: ../fish/guestfish-actions.pod:230 ../src/guestfs-actions.pod:360
4123 "Look up the value associated with C<path>. If C<path> matches exactly one "
4124 "node, the C<value> is returned."
4128 #: ../fish/guestfish-actions.pod:233
4133 #: ../fish/guestfish-actions.pod:235
4136 " aug-init root flags\n"
4141 #: ../fish/guestfish-actions.pod:237 ../src/guestfs-actions.pod:375
4143 "Create a new Augeas handle for editing configuration files. If there was "
4144 "any previous Augeas handle associated with this guestfs session, then it is "
4149 #: ../fish/guestfish-actions.pod:241
4150 msgid "You must call this before using any other L</aug-*> commands."
4154 #: ../fish/guestfish-actions.pod:244 ../src/guestfs-actions.pod:382
4155 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
4159 #: ../fish/guestfish-actions.pod:247 ../src/guestfs-actions.pod:385
4161 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
4162 "logical I<or> of the following integers:"
4166 #: ../fish/guestfish-actions.pod:253 ../src/guestfs-actions.pod:391
4167 msgid "C<AUG_SAVE_BACKUP> = 1"
4171 #: ../fish/guestfish-actions.pod:255 ../src/guestfs-actions.pod:393
4172 msgid "Keep the original file with a C<.augsave> extension."
4176 #: ../fish/guestfish-actions.pod:257 ../src/guestfs-actions.pod:395
4177 msgid "C<AUG_SAVE_NEWFILE> = 2"
4181 #: ../fish/guestfish-actions.pod:259 ../src/guestfs-actions.pod:397
4183 "Save changes into a file with extension C<.augnew>, and do not overwrite "
4184 "original. Overrides C<AUG_SAVE_BACKUP>."
4188 #: ../fish/guestfish-actions.pod:262 ../src/guestfs-actions.pod:400
4189 msgid "C<AUG_TYPE_CHECK> = 4"
4193 #: ../fish/guestfish-actions.pod:264 ../src/guestfs-actions.pod:402
4194 msgid "Typecheck lenses (can be expensive)."
4198 #: ../fish/guestfish-actions.pod:266 ../src/guestfs-actions.pod:404
4199 msgid "C<AUG_NO_STDINC> = 8"
4203 #: ../fish/guestfish-actions.pod:268 ../src/guestfs-actions.pod:406
4204 msgid "Do not use standard load path for modules."
4208 #: ../fish/guestfish-actions.pod:270 ../src/guestfs-actions.pod:408
4209 msgid "C<AUG_SAVE_NOOP> = 16"
4213 #: ../fish/guestfish-actions.pod:272 ../src/guestfs-actions.pod:410
4214 msgid "Make save a no-op, just record what would have been changed."
4218 #: ../fish/guestfish-actions.pod:274 ../src/guestfs-actions.pod:412
4219 msgid "C<AUG_NO_LOAD> = 32"
4223 #: ../fish/guestfish-actions.pod:276
4224 msgid "Do not load the tree in L</aug-init>."
4228 #: ../fish/guestfish-actions.pod:280
4229 msgid "To close the handle, you can call L</aug-close>."
4233 #: ../fish/guestfish-actions.pod:282 ../src/guestfs-actions.pod:420
4234 msgid "To find out more about Augeas, see L<http://augeas.net/>."
4238 #: ../fish/guestfish-actions.pod:284
4243 #: ../fish/guestfish-actions.pod:286
4246 " aug-insert augpath label true|false\n"
4251 #: ../fish/guestfish-actions.pod:288 ../src/guestfs-actions.pod:434
4253 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
4254 "or after C<path> (depending on the boolean flag C<before>)."
4258 #: ../fish/guestfish-actions.pod:292 ../src/guestfs-actions.pod:438
4260 "C<path> must match exactly one existing node in the tree, and C<label> must "
4261 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
4265 #: ../fish/guestfish-actions.pod:296
4270 #: ../fish/guestfish-actions.pod:298
4278 #: ../fish/guestfish-actions.pod:300 ../src/guestfs-actions.pod:451
4279 msgid "Load files into the tree."
4283 #: ../fish/guestfish-actions.pod:302 ../src/guestfs-actions.pod:453
4284 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
4288 #: ../fish/guestfish-actions.pod:305
4293 #: ../fish/guestfish-actions.pod:307
4301 #: ../fish/guestfish-actions.pod:309
4303 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
4304 "resulting nodes into alphabetical order."
4308 #: ../fish/guestfish-actions.pod:312
4313 #: ../fish/guestfish-actions.pod:314
4316 " aug-match augpath\n"
4321 #: ../fish/guestfish-actions.pod:316 ../src/guestfs-actions.pod:481
4323 "Returns a list of paths which match the path expression C<path>. The "
4324 "returned paths are sufficiently qualified so that they match exactly one "
4325 "node in the current tree."
4329 #: ../fish/guestfish-actions.pod:320
4334 #: ../fish/guestfish-actions.pod:322
4337 " aug-mv src dest\n"
4342 #: ../fish/guestfish-actions.pod:324 ../src/guestfs-actions.pod:498
4344 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
4345 "C<dest> is overwritten if it exists."
4349 #: ../fish/guestfish-actions.pod:327
4354 #: ../fish/guestfish-actions.pod:329
4362 #: ../fish/guestfish-actions.pod:331 ../src/guestfs-actions.pod:511
4363 msgid "Remove C<path> and all of its children."
4367 #: ../fish/guestfish-actions.pod:333 ../src/guestfs-actions.pod:513
4368 msgid "On success this returns the number of entries which were removed."
4372 #: ../fish/guestfish-actions.pod:335
4377 #: ../fish/guestfish-actions.pod:337
4385 #: ../fish/guestfish-actions.pod:339 ../src/guestfs-actions.pod:524
4386 msgid "This writes all pending changes to disk."
4390 #: ../fish/guestfish-actions.pod:341
4392 "The flags which were passed to L</aug-init> affect exactly how files are "
4397 #: ../fish/guestfish-actions.pod:344
4402 #: ../fish/guestfish-actions.pod:346
4405 " aug-set augpath val\n"
4410 #: ../fish/guestfish-actions.pod:348 ../src/guestfs-actions.pod:540
4411 msgid "Set the value associated with C<path> to C<val>."
4415 #: ../fish/guestfish-actions.pod:350
4417 "In the Augeas API, it is possible to clear a node by setting the value to "
4418 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
4419 "this call. Instead you must use the L</aug-clear> call."
4423 #: ../fish/guestfish-actions.pod:355
4428 #: ../fish/guestfish-actions.pod:357
4431 " available 'groups ...'\n"
4436 #: ../fish/guestfish-actions.pod:359 ../src/guestfs-actions.pod:557
4438 "This command is used to check the availability of some groups of "
4439 "functionality in the appliance, which not all builds of the libguestfs "
4440 "appliance will be able to provide."
4444 #: ../fish/guestfish-actions.pod:363
4446 "The libguestfs groups, and the functions that those groups correspond to, "
4447 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
4448 "runtime by calling L</available-all-groups>."
4452 #: ../fish/guestfish-actions.pod:368 ../src/guestfs-actions.pod:566
4454 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
4455 "\"augeas\"]> would check for the availability of the Linux inotify functions "
4456 "and Augeas (configuration file editing) functions."
4460 #: ../fish/guestfish-actions.pod:373 ../src/guestfs-actions.pod:571
4461 msgid "The command returns no error if I<all> requested groups are available."
4465 #: ../fish/guestfish-actions.pod:375 ../src/guestfs-actions.pod:573
4467 "It fails with an error if one or more of the requested groups is unavailable "
4472 #: ../fish/guestfish-actions.pod:378 ../src/guestfs-actions.pod:576
4474 "If an unknown group name is included in the list of groups then an error is "
4479 #: ../fish/guestfish-actions.pod:381 ../src/guestfs-actions.pod:579
4484 #: ../fish/guestfish-actions.pod:387
4485 msgid "You must call L</launch> before calling this function."
4489 #: ../fish/guestfish-actions.pod:389 ../src/guestfs-actions.pod:587
4491 "The reason is because we don't know what groups are supported by the "
4492 "appliance/daemon until it is running and can be queried."
4496 #: ../fish/guestfish-actions.pod:395 ../src/guestfs-actions.pod:593
4498 "If a group of functions is available, this does not necessarily mean that "
4499 "they will work. You still have to check for errors when calling individual "
4500 "API functions even if they are available."
4504 #: ../fish/guestfish-actions.pod:402 ../src/guestfs-actions.pod:600
4506 "It is usually the job of distro packagers to build complete functionality "
4507 "into the libguestfs appliance. Upstream libguestfs, if built from source "
4508 "with all requirements satisfied, will support everything."
4512 #: ../fish/guestfish-actions.pod:409
4514 "This call was added in version C<1.0.80>. In previous versions of "
4515 "libguestfs all you could do would be to speculatively execute a command to "
4516 "find out if the daemon implemented it. See also L</version>."
4520 #: ../fish/guestfish-actions.pod:416
4521 msgid "available-all-groups"
4525 #: ../fish/guestfish-actions.pod:418
4528 " available-all-groups\n"
4533 #: ../fish/guestfish-actions.pod:420
4535 "This command returns a list of all optional groups that this daemon knows "
4536 "about. Note this returns both supported and unsupported groups. To find "
4537 "out which ones the daemon can actually support you have to call "
4538 "L</available> on each member of the returned list."
4542 #: ../fish/guestfish-actions.pod:426
4543 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
4547 #: ../fish/guestfish-actions.pod:428
4552 #: ../fish/guestfish-actions.pod:430
4555 " base64-in (base64file|-) filename\n"
4560 #: ../fish/guestfish-actions.pod:432 ../src/guestfs-actions.pod:644
4561 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
4565 #: ../fish/guestfish-actions.pod:435 ../fish/guestfish-actions.pod:444 ../fish/guestfish-actions.pod:693 ../fish/guestfish-actions.pod:862 ../fish/guestfish-actions.pod:881 ../fish/guestfish-actions.pod:1255 ../fish/guestfish-actions.pod:4658 ../fish/guestfish-actions.pod:4670 ../fish/guestfish-actions.pod:4681 ../fish/guestfish-actions.pod:4692 ../fish/guestfish-actions.pod:4744 ../fish/guestfish-actions.pod:4753 ../fish/guestfish-actions.pod:4807 ../fish/guestfish-actions.pod:4830
4566 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
4570 #: ../fish/guestfish-actions.pod:437
4575 #: ../fish/guestfish-actions.pod:439
4578 " base64-out filename (base64file|-)\n"
4583 #: ../fish/guestfish-actions.pod:441 ../src/guestfs-actions.pod:658
4585 "This command downloads the contents of C<filename>, writing it out to local "
4586 "file C<base64file> encoded as base64."
4590 #: ../fish/guestfish-actions.pod:446
4591 msgid "blockdev-flushbufs"
4595 #: ../fish/guestfish-actions.pod:448
4598 " blockdev-flushbufs device\n"
4603 #: ../fish/guestfish-actions.pod:450 ../src/guestfs-actions.pod:671
4604 msgid "This tells the kernel to flush internal buffers associated with C<device>."
4608 #: ../fish/guestfish-actions.pod:453 ../fish/guestfish-actions.pod:464 ../fish/guestfish-actions.pod:473 ../fish/guestfish-actions.pod:483 ../fish/guestfish-actions.pod:495 ../fish/guestfish-actions.pod:508 ../fish/guestfish-actions.pod:516 ../fish/guestfish-actions.pod:527 ../fish/guestfish-actions.pod:535 ../fish/guestfish-actions.pod:543 ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:691 ../src/guestfs-actions.pod:706 ../src/guestfs-actions.pod:722 ../src/guestfs-actions.pod:740 ../src/guestfs-actions.pod:759 ../src/guestfs-actions.pod:773 ../src/guestfs-actions.pod:791 ../src/guestfs-actions.pod:805 ../src/guestfs-actions.pod:819
4609 msgid "This uses the L<blockdev(8)> command."
4613 #: ../fish/guestfish-actions.pod:455
4614 msgid "blockdev-getbsz"
4618 #: ../fish/guestfish-actions.pod:457
4621 " blockdev-getbsz device\n"
4626 #: ../fish/guestfish-actions.pod:459 ../src/guestfs-actions.pod:686
4627 msgid "This returns the block size of a device."
4631 #: ../fish/guestfish-actions.pod:461 ../fish/guestfish-actions.pod:524 ../src/guestfs-actions.pod:688 ../src/guestfs-actions.pod:788
4633 "(Note this is different from both I<size in blocks> and I<filesystem block "
4638 #: ../fish/guestfish-actions.pod:466
4639 msgid "blockdev-getro"
4643 #: ../fish/guestfish-actions.pod:468
4646 " blockdev-getro device\n"
4651 #: ../fish/guestfish-actions.pod:470 ../src/guestfs-actions.pod:703
4653 "Returns a boolean indicating if the block device is read-only (true if "
4654 "read-only, false if not)."
4658 #: ../fish/guestfish-actions.pod:475
4659 msgid "blockdev-getsize64"
4663 #: ../fish/guestfish-actions.pod:477
4666 " blockdev-getsize64 device\n"
4671 #: ../fish/guestfish-actions.pod:479 ../src/guestfs-actions.pod:718
4672 msgid "This returns the size of the device in bytes."
4676 #: ../fish/guestfish-actions.pod:481
4677 msgid "See also L</blockdev-getsz>."
4681 #: ../fish/guestfish-actions.pod:485
4682 msgid "blockdev-getss"
4686 #: ../fish/guestfish-actions.pod:487
4689 " blockdev-getss device\n"
4694 #: ../fish/guestfish-actions.pod:489 ../src/guestfs-actions.pod:734
4696 "This returns the size of sectors on a block device. Usually 512, but can be "
4697 "larger for modern devices."
4701 #: ../fish/guestfish-actions.pod:492
4702 msgid "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
4706 #: ../fish/guestfish-actions.pod:497
4707 msgid "blockdev-getsz"