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.13.19\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2011-10-08 13:55+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 #: ../align/virt-alignment-scan.pod:3 ../cat/virt-cat.pod:3 ../cat/virt-filesystems.pod:3 ../cat/virt-ls.pod:3 ../clone/virt-sysprep.pod:3 ../df/virt-df.pod:3 ../edit/virt-edit.pod:3 ../erlang/examples/guestfs-erlang.pod:3 ../examples/guestfs-examples.pod:3 ../examples/guestfs-recipes.pod:14 ../fish/guestfish.pod:3 ../fish/virt-copy-in.pod:3 ../fish/virt-copy-out.pod:3 ../fish/virt-tar-in.pod:3 ../fish/virt-tar-out.pod:3 ../fuse/guestmount.pod:3 ../inspector/virt-inspector.pod:3 ../java/examples/guestfs-java.pod:3 ../ocaml/examples/guestfs-ocaml.pod:3 ../perl/examples/guestfs-perl.pod:3 ../python/examples/guestfs-python.pod:3 ../rescue/virt-rescue.pod:3 ../resize/virt-resize.pod:3 ../ruby/examples/guestfs-ruby.pod:3 ../sparsify/virt-sparsify.pod:3 ../src/guestfs.pod:3 ../test-tool/libguestfs-test-tool.pod:3 ../tools/virt-list-filesystems.pl:30 ../tools/virt-list-partitions.pl:30 ../tools/virt-make-fs.pl:35 ../tools/virt-tar.pl:31 ../tools/virt-win-reg.pl:35
26 #: ../align/virt-alignment-scan.pod:5
27 msgid "virt-alignment-scan - Check alignment of virtual machine partitions"
31 #: ../align/virt-alignment-scan.pod:7 ../cat/virt-cat.pod:7 ../cat/virt-filesystems.pod:7 ../cat/virt-ls.pod:7 ../clone/virt-sysprep.pod:7 ../df/virt-df.pod:7 ../edit/virt-edit.pod:7 ../erlang/examples/guestfs-erlang.pod:7 ../examples/guestfs-examples.pod:7 ../fish/guestfish.pod:7 ../fish/virt-copy-in.pod:7 ../fish/virt-copy-out.pod:7 ../fish/virt-tar-in.pod:7 ../fish/virt-tar-out.pod:7 ../fuse/guestmount.pod:7 ../inspector/virt-inspector.pod:7 ../java/examples/guestfs-java.pod:7 ../ocaml/examples/guestfs-ocaml.pod:7 ../perl/examples/guestfs-perl.pod:7 ../python/examples/guestfs-python.pod:7 ../rescue/virt-rescue.pod:7 ../resize/virt-resize.pod:7 ../ruby/examples/guestfs-ruby.pod:7 ../sparsify/virt-sparsify.pod:7 ../src/guestfs.pod:7 ../test-tool/libguestfs-test-tool.pod:7 ../tools/virt-list-filesystems.pl:34 ../tools/virt-list-partitions.pl:34 ../tools/virt-make-fs.pl:39 ../tools/virt-tar.pl:35 ../tools/virt-win-reg.pl:39
36 #: ../align/virt-alignment-scan.pod:9
39 " virt-alignment-scan [--options] -d domname\n"
44 #: ../align/virt-alignment-scan.pod:11
47 " virt-alignment-scan [--options] -a disk.img [-a disk.img ...]\n"
52 #: ../align/virt-alignment-scan.pod:13 ../cat/virt-cat.pod:19 ../cat/virt-filesystems.pod:13 ../cat/virt-ls.pod:19 ../clone/virt-sysprep.pod:13 ../df/virt-df.pod:21 ../edit/virt-edit.pod:27 ../erlang/examples/guestfs-erlang.pod:16 ../examples/guestfs-examples.pod:19 ../examples/guestfs-recipes.pod:18 ../fish/guestfish.pod:30 ../fish/virt-copy-in.pod:19 ../fish/virt-copy-out.pod:13 ../fish/virt-tar-in.pod:21 ../fish/virt-tar-out.pod:15 ../fuse/guestmount.pod:20 ../inspector/virt-inspector.pod:19 ../java/examples/guestfs-java.pod:15 ../ocaml/examples/guestfs-ocaml.pod:25 ../perl/examples/guestfs-perl.pod:18 ../python/examples/guestfs-python.pod:14 ../rescue/virt-rescue.pod:29 ../resize/virt-resize.pod:13 ../ruby/examples/guestfs-ruby.pod:15 ../sparsify/virt-sparsify.pod:11 ../src/guestfs.pod:23 ../test-tool/libguestfs-test-tool.pod:11 ../tools/virt-list-filesystems.pl:40 ../tools/virt-list-partitions.pl:40 ../tools/virt-make-fs.pl:47 ../tools/virt-tar.pl:77 ../tools/virt-win-reg.pl:63
57 #: ../align/virt-alignment-scan.pod:15
59 "When older operating systems install themselves, the partitioning tools "
60 "place partitions at a sector misaligned with the underlying storage "
61 "(commonly the first partition starts on sector C<63>). Misaligned "
62 "partitions can result in an operating system issuing more I/O than should be "
67 #: ../align/virt-alignment-scan.pod:21
69 "The virt-alignment-scan tool checks the alignment of partitions in virtual "
70 "machines and disk images and warns you if there are alignment problems."
74 #: ../align/virt-alignment-scan.pod:25
76 "Currently there is no virt tool for fixing alignment problems. You can only "
77 "reinstall the guest operating system. The following NetApp document "
78 "summarises the problem and possible solutions: "
79 "L<http://media.netapp.com/documents/tr-3747.pdf>"
83 #: ../align/virt-alignment-scan.pod:30
88 #: ../align/virt-alignment-scan.pod:32
89 msgid "To run this tool on a disk image directly, use the I<-a> option:"
93 #: ../align/virt-alignment-scan.pod:34
96 " $ virt-alignment-scan -a winxp.img\n"
97 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
102 #: ../align/virt-alignment-scan.pod:37
105 " $ virt-alignment-scan -a fedora16.img\n"
106 " /dev/sda1 1048576 1024K ok\n"
107 " /dev/sda2 2097152 2048K ok\n"
108 " /dev/sda3 526385152 2048K ok\n"
113 #: ../align/virt-alignment-scan.pod:42
115 "To run the tool on a guest known to libvirt, use the I<-d> option and "
116 "possibly the I<-c> option:"
120 #: ../align/virt-alignment-scan.pod:45
123 " # virt-alignment-scan -d RHEL5\n"
124 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
125 " /dev/sda2 106928640 512 bad (alignment < 4K)\n"
130 #: ../align/virt-alignment-scan.pod:49
133 " $ virt-alignment-scan -c qemu:///system -d Win7TwoDisks\n"
134 " /dev/sda1 1048576 1024K ok\n"
135 " /dev/sda2 105906176 1024K ok\n"
136 " /dev/sdb1 65536 64K ok\n"
141 #: ../align/virt-alignment-scan.pod:54
143 "The output consists of 4 or more whitespace-separated columns. Only the "
144 "first 4 columns are signficant if you want to parse this from a program. "
149 #: ../align/virt-alignment-scan.pod:60
154 #: ../align/virt-alignment-scan.pod:62
156 "the device and partition name (eg. C</dev/sda1> meaning the first partition "
157 "on the first block device)"
161 #: ../align/virt-alignment-scan.pod:65
166 #: ../align/virt-alignment-scan.pod:67
167 msgid "the start of the partition in bytes"
171 #: ../align/virt-alignment-scan.pod:69
176 #: ../align/virt-alignment-scan.pod:71
177 msgid "the alignment in bytes or Kbytes (eg. C<512> or C<4K>)"
181 #: ../align/virt-alignment-scan.pod:73
186 #: ../align/virt-alignment-scan.pod:75
188 "C<ok> if the alignment is best for performance, or C<bad> if the alignment "
189 "can cause performance problems"
193 #: ../align/virt-alignment-scan.pod:78
198 #: ../align/virt-alignment-scan.pod:80
199 msgid "optional free-text explanation."
203 #: ../align/virt-alignment-scan.pod:84
205 "The exit code from the program changes depending on whether poorly aligned "
206 "partitions were found. See L</EXIT STATUS> below."
210 #: ../align/virt-alignment-scan.pod:87
211 msgid "If you just want the exit code with no output, use the I<-q> option."
215 #: ../align/virt-alignment-scan.pod:89 ../cat/virt-cat.pod:62 ../cat/virt-filesystems.pod:91 ../cat/virt-ls.pod:261 ../clone/virt-sysprep.pod:36 ../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 ../sparsify/virt-sparsify.pod:99 ../test-tool/libguestfs-test-tool.pod:36 ../tools/virt-list-filesystems.pl:53 ../tools/virt-list-partitions.pl:54 ../tools/virt-make-fs.pl:153 ../tools/virt-tar.pl:103 ../tools/virt-win-reg.pl:96
220 #: ../align/virt-alignment-scan.pod:93 ../cat/virt-cat.pod:66 ../cat/virt-filesystems.pod:95 ../cat/virt-ls.pod:265 ../clone/virt-sysprep.pod:40 ../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 ../sparsify/virt-sparsify.pod:103 ../test-tool/libguestfs-test-tool.pod:40 ../tools/virt-list-filesystems.pl:61 ../tools/virt-list-partitions.pl:62 ../tools/virt-make-fs.pl:161 ../tools/virt-tar.pl:111 ../tools/virt-win-reg.pl:104
225 #: ../align/virt-alignment-scan.pod:95 ../cat/virt-cat.pod:68 ../cat/virt-filesystems.pod:97 ../cat/virt-ls.pod:267 ../clone/virt-sysprep.pod:42 ../df/virt-df.pod:65 ../edit/virt-edit.pod:68 ../inspector/virt-inspector.pod:61 ../rescue/virt-rescue.pod:90 ../tools/virt-list-filesystems.pl:63 ../tools/virt-list-partitions.pl:64 ../tools/virt-make-fs.pl:163 ../tools/virt-tar.pl:113 ../tools/virt-win-reg.pl:106
226 msgid "Display brief help."
230 #: ../align/virt-alignment-scan.pod:97 ../cat/virt-cat.pod:70 ../cat/virt-filesystems.pod:99 ../cat/virt-ls.pod:269 ../clone/virt-sysprep.pod:44 ../df/virt-df.pod:67 ../edit/virt-edit.pod:70 ../inspector/virt-inspector.pod:63 ../rescue/virt-rescue.pod:92
235 #: ../align/virt-alignment-scan.pod:99 ../cat/virt-cat.pod:72 ../cat/virt-filesystems.pod:101 ../cat/virt-ls.pod:271 ../clone/virt-sysprep.pod:46 ../df/virt-df.pod:69 ../edit/virt-edit.pod:72 ../inspector/virt-inspector.pod:65 ../rescue/virt-rescue.pod:94
236 msgid "B<--add> file"
240 #: ../align/virt-alignment-scan.pod:101 ../clone/virt-sysprep.pod:48
241 msgid "Add I<file> which should be a disk image from a virtual machine."
245 #: ../align/virt-alignment-scan.pod:103 ../cat/virt-cat.pod:78 ../cat/virt-filesystems.pod:107 ../cat/virt-ls.pod:277 ../clone/virt-sysprep.pod:50 ../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
247 "The format of the disk image is auto-detected. To override this and force a "
248 "particular format use the I<--format=..> option."
252 #: ../align/virt-alignment-scan.pod:106 ../cat/virt-cat.pod:81 ../cat/virt-filesystems.pod:125 ../cat/virt-ls.pod:291 ../clone/virt-sysprep.pod:53 ../df/virt-df.pod:78 ../rescue/virt-rescue.pod:107
257 #: ../align/virt-alignment-scan.pod:108 ../cat/virt-cat.pod:83 ../cat/virt-filesystems.pod:127 ../cat/virt-ls.pod:293 ../clone/virt-sysprep.pod:55 ../df/virt-df.pod:80 ../rescue/virt-rescue.pod:109
258 msgid "B<--connect> URI"
262 #: ../align/virt-alignment-scan.pod:110 ../cat/virt-cat.pod:85 ../cat/virt-filesystems.pod:129 ../cat/virt-ls.pod:295 ../clone/virt-sysprep.pod:57 ../df/virt-df.pod:82 ../edit/virt-edit.pod:99 ../inspector/virt-inspector.pod:78 ../rescue/virt-rescue.pod:111 ../tools/virt-list-filesystems.pl:81 ../tools/virt-list-partitions.pl:82 ../tools/virt-tar.pl:131 ../tools/virt-win-reg.pl:132
264 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
265 "to the default libvirt hypervisor."
269 #: ../align/virt-alignment-scan.pod:113 ../cat/virt-cat.pod:88 ../cat/virt-filesystems.pod:132 ../cat/virt-ls.pod:298 ../clone/virt-sysprep.pod:60 ../df/virt-df.pod:85 ../rescue/virt-rescue.pod:114
271 "If you specify guest block devices directly (I<-a>), then libvirt is not "
276 #: ../align/virt-alignment-scan.pod:116 ../cat/virt-cat.pod:91 ../cat/virt-filesystems.pod:141 ../cat/virt-ls.pod:307 ../clone/virt-sysprep.pod:63 ../df/virt-df.pod:94 ../edit/virt-edit.pod:105 ../inspector/virt-inspector.pod:85 ../rescue/virt-rescue.pod:117
281 #: ../align/virt-alignment-scan.pod:118 ../cat/virt-cat.pod:93 ../cat/virt-filesystems.pod:143 ../cat/virt-ls.pod:309 ../clone/virt-sysprep.pod:65 ../df/virt-df.pod:96 ../edit/virt-edit.pod:107 ../inspector/virt-inspector.pod:87 ../rescue/virt-rescue.pod:119
282 msgid "B<--domain> guest"
286 #: ../align/virt-alignment-scan.pod:120 ../cat/virt-cat.pod:95 ../cat/virt-filesystems.pod:145 ../cat/virt-ls.pod:311 ../clone/virt-sysprep.pod:67 ../df/virt-df.pod:98 ../edit/virt-edit.pod:109 ../inspector/virt-inspector.pod:89 ../rescue/virt-rescue.pod:121
288 "Add all the disks from the named libvirt guest. Domain UUIDs can be used "
293 #: ../align/virt-alignment-scan.pod:123 ../cat/virt-cat.pod:105 ../cat/virt-filesystems.pod:170 ../cat/virt-ls.pod:328 ../clone/virt-sysprep.pod:89 ../df/virt-df.pod:101 ../fish/guestfish.pod:233 ../fuse/guestmount.pod:133 ../inspector/virt-inspector.pod:99 ../rescue/virt-rescue.pod:124
294 msgid "B<--format=raw|qcow2|..>"
298 #: ../align/virt-alignment-scan.pod:125 ../cat/virt-cat.pod:107 ../cat/virt-filesystems.pod:172 ../cat/virt-ls.pod:330 ../clone/virt-sysprep.pod:91 ../df/virt-df.pod:103 ../edit/virt-edit.pod:134 ../fish/guestfish.pod:235 ../fuse/guestmount.pod:135 ../inspector/virt-inspector.pod:101 ../rescue/virt-rescue.pod:126
303 #: ../align/virt-alignment-scan.pod:127 ../cat/virt-cat.pod:109 ../cat/virt-filesystems.pod:174 ../cat/virt-ls.pod:332 ../clone/virt-sysprep.pod:93 ../df/virt-df.pod:105 ../edit/virt-edit.pod:136 ../fish/guestfish.pod:237 ../fuse/guestmount.pod:137 ../rescue/virt-rescue.pod:128
305 "The default for the I<-a> option is to auto-detect the format of the disk "
306 "image. Using this forces the disk format for I<-a> options which follow on "
307 "the command line. Using I<--format> with no argument switches back to "
308 "auto-detection for subsequent I<-a> options."
312 #: ../align/virt-alignment-scan.pod:132 ../cat/virt-cat.pod:114 ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337 ../clone/virt-sysprep.pod:98 ../df/virt-df.pod:110 ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242 ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:336 ../rescue/virt-rescue.pod:133 ../src/guestfs.pod:2791
317 #: ../align/virt-alignment-scan.pod:134
320 " virt-alignment-scan --format=raw -a disk.img\n"
325 #: ../align/virt-alignment-scan.pod:136 ../cat/virt-cat.pod:118 ../cat/virt-filesystems.pod:183 ../cat/virt-ls.pod:341 ../clone/virt-sysprep.pod:102 ../df/virt-df.pod:114 ../edit/virt-edit.pod:145 ../fish/guestfish.pod:246 ../rescue/virt-rescue.pod:137
326 msgid "forces raw format (no auto-detection) for C<disk.img>."
330 #: ../align/virt-alignment-scan.pod:138
333 " virt-alignment-scan --format=raw -a disk.img --format -a another.img\n"
338 #: ../align/virt-alignment-scan.pod:140 ../cat/virt-cat.pod:122 ../cat/virt-filesystems.pod:187 ../cat/virt-ls.pod:345 ../clone/virt-sysprep.pod:106 ../df/virt-df.pod:118 ../edit/virt-edit.pod:149 ../fish/guestfish.pod:250 ../rescue/virt-rescue.pod:141
340 "forces raw format (no auto-detection) for C<disk.img> and reverts to "
341 "auto-detection for C<another.img>."
345 #: ../align/virt-alignment-scan.pod:143 ../cat/virt-cat.pod:125 ../cat/virt-filesystems.pod:190 ../cat/virt-ls.pod:348 ../clone/virt-sysprep.pod:109 ../df/virt-df.pod:121 ../edit/virt-edit.pod:152 ../rescue/virt-rescue.pod:144
347 "If you have untrusted raw-format guest disk images, you should use this "
348 "option to specify the disk format. This avoids a possible security problem "
349 "with malicious guests (CVE-2010-3851)."
353 #: ../align/virt-alignment-scan.pod:147 ../resize/virt-resize.pod:414 ../sparsify/virt-sparsify.pod:153
358 #: ../align/virt-alignment-scan.pod:149 ../resize/virt-resize.pod:416 ../sparsify/virt-sparsify.pod:155
363 #: ../align/virt-alignment-scan.pod:151
365 "Don't produce any output. Just set the exit code (see L</EXIT STATUS> "
370 #: ../align/virt-alignment-scan.pod:154 ../cat/virt-cat.pod:134 ../cat/virt-filesystems.pod:261 ../cat/virt-ls.pod:425 ../clone/virt-sysprep.pod:122 ../df/virt-df.pod:173 ../edit/virt-edit.pod:161 ../fish/guestfish.pod:390 ../fuse/guestmount.pod:257 ../inspector/virt-inspector.pod:119 ../rescue/virt-rescue.pod:182 ../sparsify/virt-sparsify.pod:159
375 #: ../align/virt-alignment-scan.pod:156 ../cat/virt-cat.pod:136 ../cat/virt-filesystems.pod:263 ../cat/virt-ls.pod:427 ../clone/virt-sysprep.pod:124 ../df/virt-df.pod:175 ../edit/virt-edit.pod:163 ../fish/guestfish.pod:392 ../fuse/guestmount.pod:259 ../inspector/virt-inspector.pod:121 ../rescue/virt-rescue.pod:184 ../sparsify/virt-sparsify.pod:161
380 #: ../align/virt-alignment-scan.pod:158 ../cat/virt-cat.pod:138 ../cat/virt-filesystems.pod:265 ../cat/virt-ls.pod:429 ../clone/virt-sysprep.pod:126 ../df/virt-df.pod:177 ../edit/virt-edit.pod:165 ../inspector/virt-inspector.pod:123 ../rescue/virt-rescue.pod:186 ../sparsify/virt-sparsify.pod:163
381 msgid "Enable verbose messages for debugging."
385 #: ../align/virt-alignment-scan.pod:160 ../cat/virt-cat.pod:140 ../cat/virt-filesystems.pod:267 ../cat/virt-ls.pod:431 ../clone/virt-sysprep.pod:128 ../df/virt-df.pod:179 ../edit/virt-edit.pod:167 ../fish/guestfish.pod:397 ../fuse/guestmount.pod:263 ../inspector/virt-inspector.pod:125 ../rescue/virt-rescue.pod:188 ../resize/virt-resize.pod:484 ../sparsify/virt-sparsify.pod:165
390 #: ../align/virt-alignment-scan.pod:162 ../cat/virt-cat.pod:142 ../cat/virt-filesystems.pod:269 ../cat/virt-ls.pod:433 ../clone/virt-sysprep.pod:130 ../df/virt-df.pod:181 ../edit/virt-edit.pod:169 ../fish/guestfish.pod:399 ../fuse/guestmount.pod:265 ../inspector/virt-inspector.pod:127 ../rescue/virt-rescue.pod:190 ../resize/virt-resize.pod:486 ../sparsify/virt-sparsify.pod:167 ../tools/virt-list-filesystems.pl:69 ../tools/virt-list-partitions.pl:70 ../tools/virt-make-fs.pl:169 ../tools/virt-tar.pl:119 ../tools/virt-win-reg.pl:112
395 #: ../align/virt-alignment-scan.pod:164 ../cat/virt-cat.pod:144 ../cat/virt-filesystems.pod:271 ../cat/virt-ls.pod:435 ../clone/virt-sysprep.pod:132 ../df/virt-df.pod:183 ../edit/virt-edit.pod:171 ../inspector/virt-inspector.pod:129 ../rescue/virt-rescue.pod:192 ../resize/virt-resize.pod:488 ../sparsify/virt-sparsify.pod:169 ../tools/virt-list-filesystems.pl:71 ../tools/virt-list-partitions.pl:72 ../tools/virt-make-fs.pl:171 ../tools/virt-tar.pl:121 ../tools/virt-win-reg.pl:114
396 msgid "Display version number and exit."
400 #: ../align/virt-alignment-scan.pod:166 ../cat/virt-cat.pod:146 ../cat/virt-filesystems.pod:281 ../cat/virt-ls.pod:437 ../clone/virt-sysprep.pod:134 ../df/virt-df.pod:185 ../edit/virt-edit.pod:173 ../fish/guestfish.pod:412 ../fuse/guestmount.pod:278 ../inspector/virt-inspector.pod:131 ../rescue/virt-rescue.pod:203 ../sparsify/virt-sparsify.pod:171 ../tools/virt-tar.pl:158
405 #: ../align/virt-alignment-scan.pod:168 ../cat/virt-cat.pod:148 ../cat/virt-filesystems.pod:283 ../cat/virt-ls.pod:439 ../clone/virt-sysprep.pod:136 ../df/virt-df.pod:187 ../edit/virt-edit.pod:175 ../inspector/virt-inspector.pod:133 ../rescue/virt-rescue.pod:205 ../sparsify/virt-sparsify.pod:173
406 msgid "Enable tracing of libguestfs API calls."
410 #: ../align/virt-alignment-scan.pod:172
411 msgid "RECOMMENDED ALIGNMENT"
415 #: ../align/virt-alignment-scan.pod:174
417 "Operating systems older than Windows 2008 and Linux before ca.2010 place the "
418 "first sector of the first partition at sector 63, with a 512 byte sector "
419 "size. This happens because of a historical accident. Drives have to report "
420 "a cylinder / head / sector (CHS) geometry to the BIOS. The geometry is "
421 "completely meaningless on modern drives, but it happens that the geometry "
422 "reported always has 63 sectors per track. The operating system therefore "
423 "places the first partition at the start of the second \"track\", at sector "
428 #: ../align/virt-alignment-scan.pod:183
430 "When the guest OS is virtualized, the host operating system and hypervisor "
431 "may prefer accesses aligned to one of:"
435 #: ../align/virt-alignment-scan.pod:188
440 #: ../align/virt-alignment-scan.pod:190
442 "if the host OS uses local storage directly on hard drive partitions, and the "
443 "hard drive has 512 byte physical sectors."
447 #: ../align/virt-alignment-scan.pod:193
452 #: ../align/virt-alignment-scan.pod:195
454 "for local storage on new hard drives with 4Kbyte physical sectors; for "
455 "file-backed storage on filesystems with 4Kbyte block size; or for some types "
456 "of network-attached storage."
460 #: ../align/virt-alignment-scan.pod:199
465 #: ../align/virt-alignment-scan.pod:201
467 "for high-end network-attached storage. This is the optimal block size for "
468 "some NetApp hardware."
472 #: ../align/virt-alignment-scan.pod:204
477 #: ../align/virt-alignment-scan.pod:206
478 msgid "see L</1 MB PARTITION ALIGNMENT> below."
482 #: ../align/virt-alignment-scan.pod:210
484 "Partitions which are not aligned correctly to the underlying storage cause "
485 "extra I/O. For example:"
489 #: ../align/virt-alignment-scan.pod:213
493 " +--------------------------+------\n"
495 " | filesystem block |\n"
496 " ---+------------------+------+-------------------+-----+---\n"
497 " | host block | host block |\n"
499 " ---+-------------------------+-------------------------+---\n"
504 #: ../align/virt-alignment-scan.pod:222
506 "In this example, each time a 4K guest block is read, two blocks on the host "
507 "must be accessed (so twice as much I/O is done). When a 4K guest block is "
508 "written, two host blocks must first be read, the old and new data combined, "
509 "and the two blocks written back (4x I/O)."
513 #: ../align/virt-alignment-scan.pod:227
514 msgid "LINUX HOST BLOCK AND I/O SIZE"
518 #: ../align/virt-alignment-scan.pod:229
520 "New versions of the Linux kernel expose the physical and logical block size, "
521 "and minimum and recommended I/O size."
525 #: ../align/virt-alignment-scan.pod:232
526 msgid "For a typical hard drive with 512 byte sectors:"
530 #: ../align/virt-alignment-scan.pod:234
533 " $ cat /sys/block/sda/queue/physical_block_size\n"
535 " $ cat /sys/block/sda/queue/logical_block_size\n"
537 " $ cat /sys/block/sda/queue/minimum_io_size\n"
539 " $ cat /sys/block/sda/queue/optimal_io_size\n"
545 #: ../align/virt-alignment-scan.pod:243
546 msgid "For a NetApp LUN:"
550 #: ../align/virt-alignment-scan.pod:245
553 " $ cat /sys/block/sdc/queue/logical_block_size\n"
555 " $ cat /sys/block/sdc/queue/physical_block_size\n"
557 " $ cat /sys/block/sdc/queue/minimum_io_size\n"
559 " $ cat /sys/block/sdc/queue/optimal_io_size\n"
565 #: ../align/virt-alignment-scan.pod:254
567 "The NetApp allows 512 byte accesses (but they will be very inefficient), "
568 "prefers a minimum 4K I/O size, but the optimal I/O size is 64K."
572 #: ../align/virt-alignment-scan.pod:258
574 "For detailed information about what these numbers mean, see "
575 "L<http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/newstorage-iolimits.html>"
579 #: ../align/virt-alignment-scan.pod:261
581 "[Thanks to Mike Snitzer for providing NetApp data and additional "
586 #: ../align/virt-alignment-scan.pod:264
587 msgid "1 MB PARTITION ALIGNMENT"
591 #: ../align/virt-alignment-scan.pod:266
593 "Microsoft picked 1 MB as the default alignment for all partitions starting "
594 "with Windows 2008 Server, and Linux has followed this."
598 #: ../align/virt-alignment-scan.pod:269
600 "Assuming 512 byte sectors in the guest, you will now see the first partition "
601 "starting at sector 2048, and subsequent partitions (if any) will start at a "
602 "multiple of 2048 sectors."
606 #: ../align/virt-alignment-scan.pod:273
608 "1 MB alignment is compatible with all current alignment requirements (4K, "
609 "64K) and provides room for future growth in physical block sizes."
613 #: ../align/virt-alignment-scan.pod:276
614 msgid "SETTING ALIGNMENT"
618 #: ../align/virt-alignment-scan.pod:278
620 "Currently there is no virt tool for fixing alignment problems in guests. "
621 "This is a difficult problem to fix because simply moving partitions around "
622 "breaks the bootloader, necessitating either manual reinstallation of the "
623 "bootloader using a rescue disk, or complex and error-prone hacks."
627 #: ../align/virt-alignment-scan.pod:284
629 "L<virt-resize(1)> does not change the alignment of the first partition, but "
630 "it does align the second and subsequent partitions to a multiple of 64 or "
631 "128 sectors (depending on the version of virt-resize, 128 in virt-resize "
632 "E<ge> 1.13.19). For operating systems that have a separate boot partition, "
633 "virt-resize could be used to align the main OS partition, so that the "
634 "majority of OS accesses except at boot will be aligned."
638 #: ../align/virt-alignment-scan.pod:292
640 "The easiest way to correct partition alignment problems is to reinstall your "
641 "guest operating systems. If you install operating systems from templates, "
642 "ensure these have correct partition alignment too."
646 #: ../align/virt-alignment-scan.pod:297
648 "For older versions of Windows, the following NetApp document contains useful "
649 "information: L<http://media.netapp.com/documents/tr-3747.pdf>"
653 #: ../align/virt-alignment-scan.pod:300
655 "For Red Hat Enterprise Linux E<le> 5, use a Kickstart script that contains "
656 "an explicit C<%pre> section that creates aligned partitions using "
657 "L<parted(8)>. Do not use the Kickstart C<part> command. The NetApp "
658 "document above contains an example."
662 #: ../align/virt-alignment-scan.pod:305 ../cat/virt-cat.pod:191 ../cat/virt-filesystems.pod:365 ../cat/virt-ls.pod:483 ../clone/virt-sysprep.pod:359 ../df/virt-df.pod:215 ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:352 ../rescue/virt-rescue.pod:266 ../resize/virt-resize.pod:601 ../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
663 msgid "SHELL QUOTING"
667 #: ../align/virt-alignment-scan.pod:307 ../cat/virt-cat.pod:193 ../cat/virt-filesystems.pod:367 ../cat/virt-ls.pod:485 ../clone/virt-sysprep.pod:361 ../df/virt-df.pod:217 ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:354 ../rescue/virt-rescue.pod:268 ../resize/virt-resize.pod:603 ../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
669 "Libvirt guest names can contain arbitrary characters, some of which have "
670 "meaning to the shell such as C<#> and space. You may need to quote or "
671 "escape these characters on the command line. See the shell manual page "
672 "L<sh(1)> for details."
676 #: ../align/virt-alignment-scan.pod:312 ../cat/virt-cat.pod:198 ../cat/virt-filesystems.pod:372 ../cat/virt-ls.pod:490 ../clone/virt-sysprep.pod:366 ../df/virt-df.pod:222 ../edit/virt-edit.pod:349 ../fish/guestfish.pod:1113 ../fuse/guestmount.pod:303 ../inspector/virt-inspector.pod:375 ../resize/virt-resize.pod:608 ../sparsify/virt-sparsify.pod:227 ../test-tool/libguestfs-test-tool.pod:90
681 #: ../align/virt-alignment-scan.pod:314
682 msgid "This program returns:"
686 #: ../align/virt-alignment-scan.pod:318 ../align/virt-alignment-scan.pod:324 ../align/virt-alignment-scan.pod:330 ../align/virt-alignment-scan.pod:337 ../clone/virt-sysprep.pod:213 ../clone/virt-sysprep.pod:217 ../clone/virt-sysprep.pod:221 ../clone/virt-sysprep.pod:225 ../clone/virt-sysprep.pod:240 ../clone/virt-sysprep.pod:244 ../clone/virt-sysprep.pod:248 ../clone/virt-sysprep.pod:252 ../clone/virt-sysprep.pod:256 ../clone/virt-sysprep.pod:292 ../clone/virt-sysprep.pod:314 ../clone/virt-sysprep.pod:318 ../df/virt-df.pod:148 ../df/virt-df.pod:154 ../edit/virt-edit.pod:266 ../edit/virt-edit.pod:271 ../edit/virt-edit.pod:276 ../edit/virt-edit.pod:287 ../edit/virt-edit.pod:291 ../examples/guestfs-recipes.pod:98 ../examples/guestfs-recipes.pod:102 ../examples/guestfs-recipes.pod:106 ../examples/guestfs-recipes.pod:132 ../examples/guestfs-recipes.pod:137 ../examples/guestfs-recipes.pod:227 ../examples/guestfs-recipes.pod:231 ../examples/guestfs-recipes.pod:235 ../examples/guestfs-recipes.pod:239 ../examples/guestfs-recipes.pod:243 ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:390 ../fish/guestfish-actions.pod:398 ../fish/guestfish-actions.pod:405 ../fish/guestfish-actions.pod:412 ../fish/guestfish-actions.pod:1139 ../fish/guestfish-actions.pod:1143 ../fish/guestfish-actions.pod:1147 ../fish/guestfish-actions.pod:1151 ../fish/guestfish-actions.pod:1159 ../fish/guestfish-actions.pod:1163 ../fish/guestfish-actions.pod:1167 ../fish/guestfish-actions.pod:1177 ../fish/guestfish-actions.pod:1181 ../fish/guestfish-actions.pod:1185 ../fish/guestfish-actions.pod:1275 ../fish/guestfish-actions.pod:1279 ../fish/guestfish-actions.pod:1284 ../fish/guestfish-actions.pod:1289 ../fish/guestfish-actions.pod:1331 ../fish/guestfish-actions.pod:1335 ../fish/guestfish-actions.pod:1340 ../fish/guestfish-actions.pod:1596 ../fish/guestfish-actions.pod:1603 ../fish/guestfish-actions.pod:1610 ../fish/guestfish-actions.pod:2005 ../fish/guestfish-actions.pod:2011 ../fish/guestfish-actions.pod:2019 ../fish/guestfish-actions.pod:2026 ../fish/guestfish-actions.pod:2033 ../fish/guestfish.pod:445 ../fish/guestfish.pod:449 ../fish/guestfish.pod:453 ../fish/guestfish.pod:457 ../inspector/virt-inspector.pod:393 ../inspector/virt-inspector.pod:397 ../resize/virt-resize.pod:282 ../resize/virt-resize.pod:286 ../resize/virt-resize.pod:295 ../resize/virt-resize.pod:301 ../sparsify/virt-sparsify.pod:32 ../sparsify/virt-sparsify.pod:39 ../sparsify/virt-sparsify.pod:43 ../sparsify/virt-sparsify.pod:49 ../sparsify/virt-sparsify.pod:54 ../sparsify/virt-sparsify.pod:58 ../sparsify/virt-sparsify.pod:64 ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:29 ../src/guestfs-actions.pod:588 ../src/guestfs-actions.pod:596 ../src/guestfs-actions.pod:603 ../src/guestfs-actions.pod:610 ../src/guestfs-actions.pod:1778 ../src/guestfs-actions.pod:1782 ../src/guestfs-actions.pod:1786 ../src/guestfs-actions.pod:1790 ../src/guestfs-actions.pod:1798 ../src/guestfs-actions.pod:1802 ../src/guestfs-actions.pod:1806 ../src/guestfs-actions.pod:1816 ../src/guestfs-actions.pod:1820 ../src/guestfs-actions.pod:1824 ../src/guestfs-actions.pod:1962 ../src/guestfs-actions.pod:1966 ../src/guestfs-actions.pod:1971 ../src/guestfs-actions.pod:1976 ../src/guestfs-actions.pod:2037 ../src/guestfs-actions.pod:2041 ../src/guestfs-actions.pod:2046 ../src/guestfs-actions.pod:2461 ../src/guestfs-actions.pod:2468 ../src/guestfs-actions.pod:2475 ../src/guestfs-actions.pod:3012 ../src/guestfs-actions.pod:3018 ../src/guestfs-actions.pod:3026 ../src/guestfs-actions.pod:3033 ../src/guestfs-actions.pod:3040 ../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:1094 ../src/guestfs.pod:1098 ../src/guestfs.pod:1102 ../src/guestfs.pod:1107 ../src/guestfs.pod:1115 ../src/guestfs.pod:1134 ../src/guestfs.pod:1142 ../src/guestfs.pod:1164 ../src/guestfs.pod:1168 ../src/guestfs.pod:1172 ../src/guestfs.pod:1176 ../src/guestfs.pod:1180 ../src/guestfs.pod:1184 ../src/guestfs.pod:1674 ../src/guestfs.pod:1679 ../src/guestfs.pod:1683 ../src/guestfs.pod:1785 ../src/guestfs.pod:1790 ../src/guestfs.pod:1794 ../src/guestfs.pod:1804 ../src/guestfs.pod:2093 ../src/guestfs.pod:2098 ../src/guestfs.pod:2104 ../src/guestfs.pod:2112 ../src/guestfs.pod:2559 ../src/guestfs.pod:2565 ../src/guestfs.pod:2570 ../src/guestfs.pod:2576 ../src/guestfs.pod:2976 ../src/guestfs.pod:2981 ../src/guestfs.pod:2985 ../src/guestfs.pod:2989 ../src/guestfs.pod:2993 ../src/guestfs.pod:3007 ../src/guestfs.pod:3012 ../src/guestfs.pod:3242 ../src/guestfs.pod:3246 ../src/guestfs.pod:3250 ../src/guestfs.pod:3254 ../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
691 #: ../align/virt-alignment-scan.pod:320
696 #: ../align/virt-alignment-scan.pod:322
697 msgid "successful exit, all partitions are aligned E<ge> 64K for best performance"
701 #: ../align/virt-alignment-scan.pod:326
706 #: ../align/virt-alignment-scan.pod:328
707 msgid "an error scanning the disk image or guest"
711 #: ../align/virt-alignment-scan.pod:332
716 #: ../align/virt-alignment-scan.pod:334
718 "successful exit, some partitions have alignment E<lt> 64K which can result "
719 "in poor performance on high end network storage"
723 #: ../align/virt-alignment-scan.pod:339
728 #: ../align/virt-alignment-scan.pod:341
730 "successful exit, some partitions have alignment E<lt> 4K which can result in "
731 "poor performance on most hypervisors"
735 #: ../align/virt-alignment-scan.pod:346 ../cat/virt-cat.pod:203 ../cat/virt-filesystems.pod:377 ../cat/virt-ls.pod:495 ../clone/virt-sysprep.pod:370 ../df/virt-df.pod:227 ../edit/virt-edit.pod:354 ../erlang/examples/guestfs-erlang.pod:97 ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384 ../fish/guestfish.pod:1267 ../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:308 ../inspector/virt-inspector.pod:380 ../java/examples/guestfs-java.pod:45 ../ocaml/examples/guestfs-ocaml.pod:78 ../perl/examples/guestfs-perl.pod:39 ../python/examples/guestfs-python.pod:42 ../rescue/virt-rescue.pod:288 ../resize/virt-resize.pod:613 ../ruby/examples/guestfs-ruby.pod:36 ../sparsify/virt-sparsify.pod:251 ../src/guestfs.pod:3184 ../test-tool/libguestfs-test-tool.pod:100 ../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
740 #: ../align/virt-alignment-scan.pod:348
742 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-rescue(1)>, "
743 "L<virt-resize(1)>, L<http://libguestfs.org/>."
747 #: ../align/virt-alignment-scan.pod:355 ../cat/virt-cat.pod:212 ../cat/virt-filesystems.pod:388 ../cat/virt-ls.pod:507 ../clone/virt-sysprep.pod:384 ../df/virt-df.pod:235 ../edit/virt-edit.pod:368 ../rescue/virt-rescue.pod:296 ../resize/virt-resize.pod:635 ../sparsify/virt-sparsify.pod:264 ../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
752 #: ../align/virt-alignment-scan.pod:357 ../cat/virt-cat.pod:214 ../cat/virt-filesystems.pod:390 ../cat/virt-ls.pod:509 ../clone/virt-sysprep.pod:386 ../df/virt-df.pod:237 ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:395 ../rescue/virt-rescue.pod:298 ../resize/virt-resize.pod:637 ../sparsify/virt-sparsify.pod:266 ../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
753 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
757 #: ../align/virt-alignment-scan.pod:359 ../cat/virt-cat.pod:216 ../cat/virt-filesystems.pod:392 ../cat/virt-ls.pod:511 ../clone/virt-sysprep.pod:388 ../df/virt-df.pod:239 ../edit/virt-edit.pod:372 ../erlang/examples/guestfs-erlang.pod:114 ../examples/guestfs-examples.pod:49 ../examples/guestfs-recipes.pod:401 ../fish/guestfish.pod:1299 ../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:323 ../inspector/virt-inspector.pod:403 ../java/examples/guestfs-java.pod:62 ../ocaml/examples/guestfs-ocaml.pod:95 ../perl/examples/guestfs-perl.pod:56 ../python/examples/guestfs-python.pod:58 ../rescue/virt-rescue.pod:300 ../resize/virt-resize.pod:639 ../ruby/examples/guestfs-ruby.pod:52 ../sparsify/virt-sparsify.pod:268 ../src/guestfs.pod:3265 ../test-tool/libguestfs-test-tool.pod:110 ../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
762 #: ../align/virt-alignment-scan.pod:361 ../clone/virt-sysprep.pod:390 ../sparsify/virt-sparsify.pod:270
763 msgid "Copyright (C) 2011 Red Hat Inc."
767 #: ../align/virt-alignment-scan.pod:363 ../cat/virt-cat.pod:220 ../cat/virt-filesystems.pod:396 ../cat/virt-ls.pod:515 ../clone/virt-sysprep.pod:392 ../df/virt-df.pod:243 ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1304 ../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:328 ../inspector/virt-inspector.pod:407 ../rescue/virt-rescue.pod:304 ../resize/virt-resize.pod:643 ../sparsify/virt-sparsify.pod:272 ../test-tool/libguestfs-test-tool.pod:115 ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:285 ../tools/virt-make-fs.pl:572 ../tools/virt-tar.pl:319 ../tools/virt-win-reg.pl:780
769 "This program is free software; you can redistribute it and/or modify it "
770 "under the terms of the GNU General Public License as published by the Free "
771 "Software Foundation; either version 2 of the License, or (at your option) "
776 #: ../align/virt-alignment-scan.pod:368 ../cat/virt-cat.pod:225 ../cat/virt-filesystems.pod:401 ../cat/virt-ls.pod:520 ../clone/virt-sysprep.pod:397 ../df/virt-df.pod:248 ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1309 ../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:333 ../inspector/virt-inspector.pod:412 ../rescue/virt-rescue.pod:309 ../resize/virt-resize.pod:648 ../sparsify/virt-sparsify.pod:277 ../test-tool/libguestfs-test-tool.pod:120 ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:290 ../tools/virt-make-fs.pl:577 ../tools/virt-tar.pl:324 ../tools/virt-win-reg.pl:785
778 "This program is distributed in the hope that it will be useful, but WITHOUT "
779 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
780 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
785 #: ../align/virt-alignment-scan.pod:373 ../cat/virt-cat.pod:230 ../cat/virt-filesystems.pod:406 ../cat/virt-ls.pod:525 ../clone/virt-sysprep.pod:402 ../df/virt-df.pod:253 ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1314 ../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:338 ../inspector/virt-inspector.pod:417 ../rescue/virt-rescue.pod:314 ../resize/virt-resize.pod:653 ../sparsify/virt-sparsify.pod:282 ../test-tool/libguestfs-test-tool.pod:125 ../tools/virt-list-filesystems.pl:226 ../tools/virt-list-partitions.pl:295 ../tools/virt-make-fs.pl:582 ../tools/virt-tar.pl:329 ../tools/virt-win-reg.pl:790
787 "You should have received a copy of the GNU General Public License along with "
788 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
789 "Ave, Cambridge, MA 02139, USA."
793 #: ../cat/virt-cat.pod:5
794 msgid "virt-cat - Display files in a virtual machine"
798 #: ../cat/virt-cat.pod:9
801 " virt-cat [--options] -d domname file [file ...]\n"
806 #: ../cat/virt-cat.pod:11
809 " virt-cat [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
814 #: ../cat/virt-cat.pod:13 ../edit/virt-edit.pod:15 ../inspector/virt-inspector.pod:13
819 #: ../cat/virt-cat.pod:15
822 " virt-cat domname file\n"
827 #: ../cat/virt-cat.pod:17
830 " virt-cat disk.img file\n"
835 #: ../cat/virt-cat.pod:21
837 "C<virt-cat> is a command line tool to display the contents of C<file> where "
838 "C<file> exists in the named virtual machine (or disk image)."
842 #: ../cat/virt-cat.pod:24
844 "Multiple filenames can be given, in which case they are concatenated "
845 "together. Each filename must be a full path, starting at the root directory "
846 "(starting with '/')."
850 #: ../cat/virt-cat.pod:28
852 "C<virt-cat> can be used to quickly view a file. To edit a file, use "
853 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
854 "tool (see L</USING GUESTFISH> below)."
858 #: ../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:1050 ../fish/virt-copy-in.pod:29 ../fish/virt-copy-out.pod:21 ../fish/virt-tar-in.pod:30 ../fish/virt-tar-out.pod:24 ../fuse/guestmount.pod:39 ../resize/virt-resize.pod:27 ../sparsify/virt-sparsify.pod:75 ../tools/virt-tar.pl:50
863 #: ../cat/virt-cat.pod:34
864 msgid "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
868 #: ../cat/virt-cat.pod:37
871 " virt-cat -d mydomain /etc/fstab\n"
876 #: ../cat/virt-cat.pod:39
877 msgid "List syslog messages from a VM disk image file:"
881 #: ../cat/virt-cat.pod:41
884 " virt-cat -a disk.img /var/log/messages | tail\n"
889 #: ../cat/virt-cat.pod:43
890 msgid "Find out what DHCP IP address a VM acquired:"
894 #: ../cat/virt-cat.pod:45
897 " virt-cat -d mydomain /var/log/messages | \\\n"
898 " grep 'dhclient: bound to' | tail\n"
903 #: ../cat/virt-cat.pod:48
904 msgid "Find out what packages were recently installed:"
908 #: ../cat/virt-cat.pod:50
911 " virt-cat -d mydomain /var/log/yum.log | tail\n"
916 #: ../cat/virt-cat.pod:52
917 msgid "Find out who is logged on inside a virtual machine:"
921 #: ../cat/virt-cat.pod:54
924 " virt-cat -d mydomain /var/run/utmp > /tmp/utmp\n"
930 #: ../cat/virt-cat.pod:57
931 msgid "or who was logged on:"
935 #: ../cat/virt-cat.pod:59
938 " virt-cat -d mydomain /var/log/wtmp > /tmp/wtmp\n"
939 " last -f /tmp/wtmp\n"
944 #: ../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
946 "Add I<file> which should be a disk image from a virtual machine. If the "
947 "virtual machine has multiple block devices, you must supply all of them with "
948 "separate I<-a> options."
952 #: ../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
953 msgid "B<--echo-keys>"
957 #: ../cat/virt-cat.pod:100
959 "When prompting for keys and passphrases, virt-cat normally turns echoing off "
960 "so you cannot see what you are typing. If you are not worried about Tempest "
961 "attacks and there is no one else in the room you can specify this flag to "
962 "see what you are typing."
966 #: ../cat/virt-cat.pod:116
969 " virt-cat --format=raw -a disk.img file\n"
974 #: ../cat/virt-cat.pod:120
977 " virt-cat --format=raw -a disk.img --format -a another.img file\n"
982 #: ../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
983 msgid "B<--keys-from-stdin>"
987 #: ../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
989 "Read key or passphrase parameters from stdin. The default is to try to read "
990 "passphrases from the user by opening C</dev/tty>."
994 #: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179 ../inspector/virt-inspector.pod:137 ../rescue/virt-rescue.pod:209
995 msgid "OLD-STYLE COMMAND LINE ARGUMENTS"
999 #: ../cat/virt-cat.pod:154
1000 msgid "Previous versions of virt-cat allowed you to write either:"
1004 #: ../cat/virt-cat.pod:156
1007 " virt-cat disk.img [disk.img ...] file\n"
1012 #: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185 ../inspector/virt-inspector.pod:143 ../rescue/virt-rescue.pod:215
1017 #: ../cat/virt-cat.pod:160
1020 " virt-cat guestname file\n"
1025 #: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189 ../inspector/virt-inspector.pod:147 ../rescue/virt-rescue.pod:219
1027 "whereas in this version you should use I<-a> or I<-d> respectively to avoid "
1028 "the confusing case where a disk image might have the same name as a guest."
1032 #: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193 ../inspector/virt-inspector.pod:151 ../rescue/virt-rescue.pod:223
1033 msgid "For compatibility the old style is still supported."
1037 #: ../cat/virt-cat.pod:168 ../edit/virt-edit.pod:297
1038 msgid "USING GUESTFISH"
1042 #: ../cat/virt-cat.pod:170
1044 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
1045 "C<virt-cat> doesn't work."
1049 #: ../cat/virt-cat.pod:173
1050 msgid "Using C<virt-cat> is approximately equivalent to doing:"
1054 #: ../cat/virt-cat.pod:175
1057 " guestfish --ro -i -d domname download file -\n"
1062 #: ../cat/virt-cat.pod:177
1064 "where C<domname> is the name of the libvirt guest, and C<file> is the full "
1065 "path to the file. Note the final C<-> (meaning \"output to stdout\")."
1069 #: ../cat/virt-cat.pod:181
1071 "The command above uses libguestfs's guest inspection feature and so does not "
1072 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
1073 "disk images that don't contain guests. To display a file from a disk image "
1078 #: ../cat/virt-cat.pod:186
1081 " guestfish --ro -a disk.img -m /dev/sda1 download file -\n"
1086 #: ../cat/virt-cat.pod:188
1088 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
1089 "the disk image, and C<file> is the full path to the file."
1093 #: ../cat/virt-cat.pod:200 ../cat/virt-filesystems.pod:374 ../cat/virt-ls.pod:492 ../df/virt-df.pod:224 ../edit/virt-edit.pod:351 ../fuse/guestmount.pod:305 ../inspector/virt-inspector.pod:377 ../resize/virt-resize.pod:610 ../sparsify/virt-sparsify.pod:229
1094 msgid "This program returns 0 if successful, or non-zero if there was an error."
1098 #: ../cat/virt-cat.pod:205
1100 "L<guestfs(3)>, L<guestfish(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
1101 "L<virt-tar-out(1)>, L<http://libguestfs.org/>."
1105 #: ../cat/virt-cat.pod:218 ../inspector/virt-inspector.pod:405 ../resize/virt-resize.pod:641
1106 msgid "Copyright (C) 2010-2011 Red Hat Inc."
1110 #: ../cat/virt-filesystems.pod:5
1112 "virt-filesystems - List filesystems, partitions, block devices, LVM in a "
1113 "virtual machine or disk image"
1117 #: ../cat/virt-filesystems.pod:9
1120 " virt-filesystems [--options] -d domname\n"
1125 #: ../cat/virt-filesystems.pod:11
1128 " virt-filesystems [--options] -a disk.img [-a disk.img ...]\n"
1133 #: ../cat/virt-filesystems.pod:15
1135 "This tool allows you to discover filesystems, partitions, logical volumes, "
1136 "and their sizes in a disk image or virtual machine. It is a replacement for "
1137 "L<virt-list-filesystems(1)> and L<virt-list-partitions(1)>."
1141 #: ../cat/virt-filesystems.pod:20
1143 "One use for this tool is from shell scripts to iterate over all filesystems "
1144 "from a disk image:"
1148 #: ../cat/virt-filesystems.pod:23
1151 " for fs in $(virt-filesystems -a disk.img); do\n"
1158 #: ../cat/virt-filesystems.pod:27
1160 "Another use is to list partitions before using another tool to modify those "
1161 "partitions (such as L<virt-resize(1)>). If you are curious about what an "
1162 "unknown disk image contains, use this tool along with L<virt-inspector(1)>."
1166 #: ../cat/virt-filesystems.pod:32
1168 "Various command line options control what this program displays. You need "
1169 "to give either I<-a> or I<-d> options to specify the disk image or libvirt "
1170 "guest respectively. If you just specify that then the program shows "
1171 "filesystems found, one per line, like this:"
1175 #: ../cat/virt-filesystems.pod:37
1178 " $ virt-filesystems -a disk.img\n"
1180 " /dev/vg_guest/lv_root\n"
1185 #: ../cat/virt-filesystems.pod:41
1186 msgid "If you add I<-l> or I<--long> then the output includes extra information:"
1190 #: ../cat/virt-filesystems.pod:44
1193 " $ virt-filesystems -a disk.img -l\n"
1194 " Name Type VFS Label Size\n"
1195 " /dev/sda1 filesystem ext4 boot 524288000\n"
1196 " /dev/vg_guest/lv_root filesystem ext4 root 10212081664\n"
1201 #: ../cat/virt-filesystems.pod:49
1203 "If you add I<--extra> then non-mountable (swap, unknown) filesystems are "
1208 #: ../cat/virt-filesystems.pod:52
1211 " $ virt-filesystems -a disk.img --extra\n"
1213 " /dev/vg_guest/lv_root\n"
1214 " /dev/vg_guest/lv_swap\n"
1215 " /dev/vg_guest/lv_data\n"
1220 #: ../cat/virt-filesystems.pod:58
1221 msgid "If you add I<--partitions> then partitions are shown instead of filesystems:"
1225 #: ../cat/virt-filesystems.pod:60
1228 " $ virt-filesystems -a disk.img --partitions\n"
1235 #: ../cat/virt-filesystems.pod:64
1237 "Similarly you can use I<--logical-volumes>, I<--volume-groups>, "
1238 "I<--physical-volumes>, I<--block-devices> to list those items."
1242 #: ../cat/virt-filesystems.pod:67
1244 "You can use these options in combination as well (if you want a combination "
1245 "including filesystems, you have to add I<--filesystems>). Notice that some "
1246 "items fall into several categories (eg. C</dev/sda1> might be both a "
1247 "partition and a filesystem). These items are listed several times. To get "
1248 "a list which includes absolutely everything that virt-filesystems knows "
1249 "about, use the I<--all> option."
1253 #: ../cat/virt-filesystems.pod:74
1255 "UUIDs (because they are quite long) are not shown by default. Add the "
1256 "I<--uuid> option to display device and filesystem UUIDs in the long output."
1260 #: ../cat/virt-filesystems.pod:78
1262 "I<--all --long --uuid> is a useful combination to display all possible "
1263 "information about everything."
1267 #: ../cat/virt-filesystems.pod:81
1270 " $ virt-filesystems -a win.img --all --long --uuid -h\n"
1271 " Name Type VFS Label Size Parent UUID\n"
1272 " /dev/sda1 filesystem ntfs System Reserved 100M - F81C92571C92112C\n"
1273 " /dev/sda2 filesystem ntfs - 20G - F2E8996AE8992E3B\n"
1274 " /dev/sda1 partition - - 100M /dev/sda -\n"
1275 " /dev/sda2 partition - - 20G /dev/sda -\n"
1276 " /dev/sda device - - 20G - -\n"
1281 #: ../cat/virt-filesystems.pod:89
1282 msgid "For machine-readable output, use I<--csv> to get Comma-Separated Values."
1286 #: ../cat/virt-filesystems.pod:110 ../tools/virt-list-filesystems.pl:121
1291 #: ../cat/virt-filesystems.pod:112
1293 "Display everything. This is currently the same as specifying these options: "
1294 "I<--filesystems>, I<--extra>, I<--partitions>, I<--block-devices>, "
1295 "I<--logical-volumes>, I<--volume-groups>, I<--physical-volumes>. (More may "
1296 "be added to this list in future)."
1300 #: ../cat/virt-filesystems.pod:117
1301 msgid "See also I<--long>."
1305 #: ../cat/virt-filesystems.pod:119
1306 msgid "B<--blkdevs>"
1310 #: ../cat/virt-filesystems.pod:121
1311 msgid "B<--block-devices>"
1315 #: ../cat/virt-filesystems.pod:123
1316 msgid "Display block devices."
1320 #: ../cat/virt-filesystems.pod:135 ../cat/virt-ls.pod:301 ../df/virt-df.pod:88
1325 #: ../cat/virt-filesystems.pod:137 ../cat/virt-ls.pod:303 ../df/virt-df.pod:90
1327 "Write out the results in CSV format (comma-separated values). This format "
1328 "can be imported easily into databases and spreadsheets, but read L</NOTE "
1329 "ABOUT CSV FORMAT> below."
1333 #: ../cat/virt-filesystems.pod:150
1335 "When prompting for keys and passphrases, virt-filesystems normally turns "
1336 "echoing off so you cannot see what you are typing. If you are not worried "
1337 "about Tempest attacks and there is no one else in the room you can specify "
1338 "this flag to see what you are typing."
1342 #: ../cat/virt-filesystems.pod:155
1347 #: ../cat/virt-filesystems.pod:157
1349 "This causes filesystems that are not ordinary, mountable filesystems to be "
1350 "displayed. This category includes swapspace, and filesystems that are empty "
1351 "or contain unknown data."
1355 #: ../cat/virt-filesystems.pod:161
1356 msgid "This option implies I<--filesystems>."
1360 #: ../cat/virt-filesystems.pod:163
1361 msgid "B<--filesystems>"
1365 #: ../cat/virt-filesystems.pod:165
1367 "Display mountable filesystems. If no display option was selected then this "
1368 "option is implied."
1372 #: ../cat/virt-filesystems.pod:168
1373 msgid "With I<--extra>, non-mountable filesystems are shown too."
1377 #: ../cat/virt-filesystems.pod:181
1380 " virt-filesystems --format=raw -a disk.img\n"
1385 #: ../cat/virt-filesystems.pod:185
1388 " virt-filesystems --format=raw -a disk.img --format -a another.img\n"
1393 #: ../cat/virt-filesystems.pod:194 ../cat/virt-ls.pod:352 ../df/virt-df.pod:125 ../fish/guestfish.pod:156 ../tools/virt-list-partitions.pl:109
1398 #: ../cat/virt-filesystems.pod:196 ../cat/virt-ls.pod:354 ../df/virt-df.pod:127 ../tools/virt-list-partitions.pl:111
1399 msgid "B<--human-readable>"
1403 #: ../cat/virt-filesystems.pod:198
1404 msgid "In I<--long> mode, display sizes in human-readable format."
1408 #: ../cat/virt-filesystems.pod:205 ../cat/virt-ls.pod:366 ../tools/virt-list-filesystems.pl:108 ../tools/virt-list-partitions.pl:119
1413 #: ../cat/virt-filesystems.pod:207 ../cat/virt-ls.pod:368 ../tools/virt-list-filesystems.pl:110 ../tools/virt-list-partitions.pl:121
1418 #: ../cat/virt-filesystems.pod:209
1419 msgid "Display extra columns of data (\"long format\")."
1423 #: ../cat/virt-filesystems.pod:211
1424 msgid "A title row is added unless you also specify I<--no-title>."
1428 #: ../cat/virt-filesystems.pod:213
1430 "The extra columns displayed depend on what output you select, and the "
1431 "ordering of columns may change in future versions. Use the title row, "
1432 "I<--csv> output and/or L<csvtool(1)> to match columns to data in external "
1437 #: ../cat/virt-filesystems.pod:218
1439 "Use I<-h> if you want sizes to be displayed in human-readable format. The "
1440 "default is to show raw numbers of I<bytes>."
1444 #: ../cat/virt-filesystems.pod:221
1445 msgid "Use I<--uuid> to display UUIDs too."
1449 #: ../cat/virt-filesystems.pod:223
1454 #: ../cat/virt-filesystems.pod:225
1455 msgid "B<--logvols>"
1459 #: ../cat/virt-filesystems.pod:227
1460 msgid "B<--logical-volumes>"
1464 #: ../cat/virt-filesystems.pod:229
1466 "Display LVM logical volumes. In this mode, these are displayed irrespective "
1467 "of whether the LVs contain filesystems."
1471 #: ../cat/virt-filesystems.pod:232
1472 msgid "B<--no-title>"
1476 #: ../cat/virt-filesystems.pod:234
1477 msgid "In I<--long> mode, don't add a title row."
1481 #: ../cat/virt-filesystems.pod:236
1483 "Note that the order of the columns is not fixed, and may change in future "
1484 "versions of virt-filesystems, so using this option may give you unexpected "
1489 #: ../cat/virt-filesystems.pod:240
1494 #: ../cat/virt-filesystems.pod:242
1495 msgid "B<--partitions>"
1499 #: ../cat/virt-filesystems.pod:244
1501 "Display partitions. In this mode, these are displayed irrespective of "
1502 "whether the partitions contain filesystems."
1506 #: ../cat/virt-filesystems.pod:247
1511 #: ../cat/virt-filesystems.pod:249
1512 msgid "B<--physvols>"
1516 #: ../cat/virt-filesystems.pod:251
1517 msgid "B<--physical-volumes>"
1521 #: ../cat/virt-filesystems.pod:253
1522 msgid "Display LVM physical volumes."
1526 #: ../cat/virt-filesystems.pod:255 ../df/virt-df.pod:163
1531 #: ../cat/virt-filesystems.pod:257
1536 #: ../cat/virt-filesystems.pod:259
1537 msgid "In I<--long> mode, display UUIDs as well."
1541 #: ../cat/virt-filesystems.pod:273
1546 #: ../cat/virt-filesystems.pod:275
1547 msgid "B<--volgroups>"
1551 #: ../cat/virt-filesystems.pod:277
1552 msgid "B<--volume-groups>"
1556 #: ../cat/virt-filesystems.pod:279
1557 msgid "Display LVM volume groups."
1561 #: ../cat/virt-filesystems.pod:287
1566 #: ../cat/virt-filesystems.pod:289
1568 "Note that columns in the output are subject to reordering and change in "
1569 "future versions of this tool."
1573 #: ../cat/virt-filesystems.pod:294
1578 #: ../cat/virt-filesystems.pod:296
1579 msgid "The filesystem, partition, block device or LVM name."
1583 #: ../cat/virt-filesystems.pod:298
1585 "For device and partition names these are displayed as canonical libguestfs "
1586 "names, so that for example C</dev/sda2> is the second partition on the first "
1591 #: ../cat/virt-filesystems.pod:302
1593 "If the I<--long> option is B<not> specified, then only the name column is "
1594 "shown in the output."
1598 #: ../cat/virt-filesystems.pod:305
1603 #: ../cat/virt-filesystems.pod:307
1604 msgid "The object type, for example C<filesystem>, C<lv>, C<device> etc."
1608 #: ../cat/virt-filesystems.pod:309
1613 #: ../cat/virt-filesystems.pod:311
1615 "If there is a filesystem, then this column displays the filesystem type if "
1616 "one could be detected, eg. C<ext4>."
1620 #: ../cat/virt-filesystems.pod:314
1625 #: ../cat/virt-filesystems.pod:316
1627 "If the object has a label (used for identifying and mounting filesystems) "
1628 "then this column contains the label."
1632 #: ../cat/virt-filesystems.pod:319
1637 #: ../cat/virt-filesystems.pod:321
1639 "The size of the object in bytes. If the I<--human> option is used then the "
1640 "size is displayed in a human-readable form."
1644 #: ../cat/virt-filesystems.pod:324
1649 #: ../cat/virt-filesystems.pod:326
1651 "The parent column records the parent relationship between objects. For "
1652 "example, if the object is a partition, then this column contains the name of "
1653 "the containing device. If the object is a logical volume, then this column "
1654 "is the name of the volume group."
1658 #: ../cat/virt-filesystems.pod:331
1663 #: ../cat/virt-filesystems.pod:333
1665 "If the object has a UUID (used for identifying and mounting filesystems and "
1666 "block devices) then this column contains the UUID as a string."
1670 #: ../cat/virt-filesystems.pod:337
1671 msgid "The UUID is only displayed if the I<--uuid> option is given."
1675 #: ../cat/virt-filesystems.pod:341 ../cat/virt-ls.pod:459 ../df/virt-df.pod:191
1676 msgid "NOTE ABOUT CSV FORMAT"
1680 #: ../cat/virt-filesystems.pod:343 ../cat/virt-ls.pod:461 ../df/virt-df.pod:193
1682 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
1683 "should be easy to parse, but it is definitely not easy to parse."
1687 #: ../cat/virt-filesystems.pod:346 ../cat/virt-ls.pod:464 ../df/virt-df.pod:196
1689 "Myth: Just split fields at commas. Reality: This does I<not> work "
1690 "reliably. This example has two columns:"
1694 #: ../cat/virt-filesystems.pod:349 ../cat/virt-ls.pod:467 ../df/virt-df.pod:199
1697 " \"foo,bar\",baz\n"
1702 #: ../cat/virt-filesystems.pod:351 ../cat/virt-ls.pod:469 ../df/virt-df.pod:201
1704 "Myth: Read the file one line at a time. Reality: This does I<not> work "
1705 "reliably. This example has one row:"
1709 #: ../cat/virt-filesystems.pod:354 ../cat/virt-ls.pod:472 ../df/virt-df.pod:204
1718 #: ../cat/virt-filesystems.pod:357 ../cat/virt-ls.pod:475 ../df/virt-df.pod:207
1720 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
1721 "packaged in major Linux distributions)."
1725 #: ../cat/virt-filesystems.pod:360 ../cat/virt-ls.pod:478 ../df/virt-df.pod:210
1727 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
1728 "or Python's built-in csv library)."
1732 #: ../cat/virt-filesystems.pod:363 ../cat/virt-ls.pod:481 ../df/virt-df.pod:213
1733 msgid "Most spreadsheets and databases can import CSV directly."
1737 #: ../cat/virt-filesystems.pod:379
1739 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-df(1)>, "
1740 "L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, L<csvtool(1)>, "
1741 "L<http://libguestfs.org/>."
1745 #: ../cat/virt-filesystems.pod:394 ../tools/virt-make-fs.pl:570 ../tools/virt-win-reg.pl:778
1746 msgid "Copyright (C) 2010 Red Hat Inc."
1750 #: ../cat/virt-ls.pod:5
1751 msgid "virt-ls - List files in a virtual machine"
1755 #: ../cat/virt-ls.pod:9
1758 " virt-ls [--options] -d domname directory [directory ...]\n"
1763 #: ../cat/virt-ls.pod:11
1766 " virt-ls [--options] -a disk.img [-a disk.img ...] directory [directory "
1772 #: ../cat/virt-ls.pod:13 ../df/virt-df.pod:15 ../rescue/virt-rescue.pod:13
1777 #: ../cat/virt-ls.pod:15
1780 " virt-ls [--options] domname directory\n"
1785 #: ../cat/virt-ls.pod:17
1788 " virt-ls [--options] disk.img [disk.img ...] directory\n"
1793 #: ../cat/virt-ls.pod:21
1795 "C<virt-ls> lists filenames, file sizes, checksums, extended attributes and "
1796 "more from a virtual machine or disk image."
1800 #: ../cat/virt-ls.pod:24
1802 "Multiple directory names can be given, in which case the output from each is "
1807 #: ../cat/virt-ls.pod:27
1809 "To list directories from a libvirt guest use the I<-d> option to specify the "
1810 "name of the guest. For a disk image, use the I<-a> option."
1814 #: ../cat/virt-ls.pod:31
1816 "C<virt-ls> can do many simple file listings. For more complicated cases you "
1817 "may need to use L<guestfish(1)>, or write a program directly to the "
1818 "L<guestfs(3)> API."
1822 #: ../cat/virt-ls.pod:37
1823 msgid "Get a list of all files and directories in a virtual machine:"
1827 #: ../cat/virt-ls.pod:39
1830 " virt-ls -R -d guest /\n"
1835 #: ../cat/virt-ls.pod:41
1836 msgid "List all setuid or setgid programs in a Linux virtual machine:"
1840 #: ../cat/virt-ls.pod:43
1843 " virt-ls -lR -d guest / | grep '^- [42]'\n"
1848 #: ../cat/virt-ls.pod:45
1849 msgid "List all public-writable directories in a Linux virtual machine:"
1853 #: ../cat/virt-ls.pod:47
1856 " virt-ls -lR -d guest / | grep '^d ...7'\n"
1861 #: ../cat/virt-ls.pod:49
1862 msgid "List all Unix domain sockets in a Linux virtual machine:"
1866 #: ../cat/virt-ls.pod:51
1869 " virt-ls -lR -d guest / | grep '^s'\n"
1874 #: ../cat/virt-ls.pod:53
1875 msgid "List all regular files with filenames ending in '.png':"
1879 #: ../cat/virt-ls.pod:55
1882 " virt-ls -lR -d guest / | grep -i '^-.*\\.png$'\n"
1887 #: ../cat/virt-ls.pod:57
1888 msgid "To display files larger than 10MB in home directories:"
1892 #: ../cat/virt-ls.pod:59
1895 " virt-ls -lR -d guest /home | awk '$3 > 10*1024*1024'\n"
1900 #: ../cat/virt-ls.pod:61
1901 msgid "Find everything modified in the last 7 days:"
1905 #: ../cat/virt-ls.pod:63
1908 " virt-ls -lR -d guest --time-days / | awk '$6 <= 7'\n"
1913 #: ../cat/virt-ls.pod:65
1914 msgid "Find regular files modified in the last 24 hours:"
1918 #: ../cat/virt-ls.pod:67
1921 " virt-ls -lR -d guest --time-days / | grep '^-' | awk '$6 < 1'\n"
1926 #: ../cat/virt-ls.pod:69
1927 msgid "DIFFERENCES IN SNAPSHOTS AND BACKING FILES"
1931 #: ../cat/virt-ls.pod:71
1933 "Find the differences between files in a guest and an earlier snapshot of the "
1938 #: ../cat/virt-ls.pod:74
1941 " virt-ls -lR -a snapshot.img / --uids --time-t > old\n"
1942 " virt-ls -lR -a current.img / --uids --time-t > new\n"
1943 " diff -u old new | less\n"
1948 #: ../cat/virt-ls.pod:78
1950 "The commands above won't find files where the content has changed but the "
1951 "metadata (eg. file size and modification date) is the same. To do that, you "
1952 "need to add the I<--checksum> parameter to both C<virt-ls> commands. "
1953 "I<--checksum> can be quite slow since it has to read and compute a checksum "
1954 "of every regular file in the virtual machine."
1958 #: ../cat/virt-ls.pod:84
1959 msgid "OUTPUT MODES"
1963 #: ../cat/virt-ls.pod:86
1965 "C<virt-ls> has four output modes, controlled by different combinations of "
1966 "the I<-l> and I<-R> options."
1970 #: ../cat/virt-ls.pod:89
1971 msgid "SIMPLE LISTING"
1975 #: ../cat/virt-ls.pod:91
1976 msgid "A simple listing is like the ordinary L<ls(1)> command:"
1980 #: ../cat/virt-ls.pod:93
1983 " $ virt-ls -d guest /\n"
1991 #: ../cat/virt-ls.pod:98
1992 msgid "LONG LISTING"
1996 #: ../cat/virt-ls.pod:100
1998 "With the I<-l> (I<--long>) option, the output is like the C<ls -l> command "
1999 "(more specifically, like the C<guestfs_ll> function)."
2003 #: ../cat/virt-ls.pod:103
2006 " $ virt-ls -l -d guest /\n"
2008 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
2009 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
2015 #: ../cat/virt-ls.pod:109
2017 "Note that while this is useful for displaying a directory, do not try "
2018 "parsing this output in another program. Use L</RECURSIVE LONG LISTING> "
2023 #: ../cat/virt-ls.pod:113
2024 msgid "RECURSIVE LISTING"
2028 #: ../cat/virt-ls.pod:115
2030 "With the I<-R> (I<--recursive>) option, C<virt-ls> lists the names of files "
2031 "and directories recursively:"
2035 #: ../cat/virt-ls.pod:118
2038 " $ virt-ls -R -d guest /tmp\n"
2046 #: ../cat/virt-ls.pod:123
2048 "To generate this output, C<virt-ls> runs the C<guestfs_find0> function and "
2049 "converts C<\\0> characters to C<\\n>."
2053 #: ../cat/virt-ls.pod:126
2054 msgid "RECURSIVE LONG LISTING"
2058 #: ../cat/virt-ls.pod:128
2060 "Using I<-lR> options together changes the output to display directories "
2061 "recursively, with file stats, and optionally other features such as "
2062 "checksums and extended attributes."
2066 #: ../cat/virt-ls.pod:132
2068 "Most of the interesting features of C<virt-ls> are only available when using "
2073 #: ../cat/virt-ls.pod:135
2075 "The fields are normally space-separated. Filenames are B<not> quoted, so "
2076 "you cannot use the output in another program (because filenames can contain "
2077 "spaces and other unsafe characters). If the guest was untrusted and someone "
2078 "knew you were using C<virt-ls> to analyze the guest, they could play tricks "
2079 "on you by creating filenames with embedded newline characters. To B<safely> "
2080 "parse the output in another program, use the I<--csv> (Comma-Separated "
2085 #: ../cat/virt-ls.pod:143
2087 "Note that this output format is completely unrelated to the C<ls -lR> "
2092 #: ../cat/virt-ls.pod:146
2095 " $ virt-ls -lR -d guest /bin\n"
2096 " d 0555 4096 /bin\n"
2097 " - 0755 123 /bin/alsaunmute\n"
2098 " - 0755 28328 /bin/arch\n"
2099 " l 0777 4 /bin/awk -> gawk\n"
2100 " - 0755 27216 /bin/basename\n"
2101 " - 0755 943360 /bin/bash\n"
2107 #: ../cat/virt-ls.pod:155
2108 msgid "These basic fields are always shown:"
2112 #: ../cat/virt-ls.pod:159
2117 #: ../cat/virt-ls.pod:161
2119 "The file type, one of: C<-> (regular file), C<d> (directory), C<c> "
2120 "(character device), C<b> (block device), C<p> (named pipe), C<l> (symbolic "
2121 "link), C<s> (socket) or C<u> (unknown)."
2125 #: ../cat/virt-ls.pod:171
2130 #: ../cat/virt-ls.pod:173
2131 msgid "The Unix permissions, displayed as a 4 digit octal number."
2135 #: ../cat/virt-ls.pod:175
2140 #: ../cat/virt-ls.pod:177
2142 "The size of the file. This is shown in bytes unless I<-h> or "
2143 "I<--human-readable> option is given, in which case this is shown as a "
2144 "human-readable number."
2148 #: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:4245
2153 #: ../cat/virt-ls.pod:183
2154 msgid "The full path of the file or directory."
2158 #: ../cat/virt-ls.pod:185
2163 #: ../cat/virt-ls.pod:187
2164 msgid "For symbolic links only, the link target."
2168 #: ../cat/virt-ls.pod:191
2170 "In I<-lR> mode, additional command line options enable the display of more "
2175 #: ../cat/virt-ls.pod:194
2177 "With the I<--uids> flag, these additional fields are displayed before the "
2182 #: ../cat/virt-ls.pod:199
2187 #: ../cat/virt-ls.pod:201
2192 #: ../cat/virt-ls.pod:203
2194 "The UID and GID of the owner of the file (displayed numerically). Note "
2195 "these only make sense in the context of a Unix-like guest."
2199 #: ../cat/virt-ls.pod:208
2200 msgid "With the I<--times> flag, these additional fields are displayed:"
2204 #: ../cat/virt-ls.pod:212
2209 #: ../cat/virt-ls.pod:214
2210 msgid "The time of last access."
2214 #: ../cat/virt-ls.pod:216
2219 #: ../cat/virt-ls.pod:218
2220 msgid "The time of last modification."
2224 #: ../cat/virt-ls.pod:220
2229 #: ../cat/virt-ls.pod:222
2230 msgid "The time of last status change."
2234 #: ../cat/virt-ls.pod:226
2236 "The time fields are displayed as string dates and times, unless one of the "
2237 "I<--time-t>, I<--time-relative> or I<--time-days> flags is given."
2241 #: ../cat/virt-ls.pod:229
2242 msgid "With the I<--extra-stats> flag, these additional fields are displayed:"
2246 #: ../cat/virt-ls.pod:233
2251 #: ../cat/virt-ls.pod:235
2253 "The device containing the file (displayed as major:minor). This may not "
2254 "match devices as known to the guest."
2258 #: ../cat/virt-ls.pod:238
2263 #: ../cat/virt-ls.pod:240
2264 msgid "The inode number."
2268 #: ../cat/virt-ls.pod:242
2273 #: ../cat/virt-ls.pod:244
2274 msgid "The number of hard links."
2278 #: ../cat/virt-ls.pod:246
2283 #: ../cat/virt-ls.pod:248
2284 msgid "For block and char special files, the device (displayed as major:minor)."
2288 #: ../cat/virt-ls.pod:251
2293 #: ../cat/virt-ls.pod:253
2294 msgid "The number of 512 byte blocks allocated to the file."
2298 #: ../cat/virt-ls.pod:257
2300 "With the I<--checksum> flag, the checksum of the file contents is shown "
2301 "(only for regular files). Computing file checksums can take a considerable "
2306 #: ../cat/virt-ls.pod:280
2307 msgid "B<--checksum>"
2311 #: ../cat/virt-ls.pod:282
2312 msgid "B<--checksum=crc|md5|sha1|sha224|sha256|sha384|sha512>"
2316 #: ../cat/virt-ls.pod:284
2318 "Display checksum over file contents for regular files. With no argument, "
2319 "this defaults to using I<md5>. Using an argument, you can select the "
2320 "checksum type to use."
2324 #: ../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
2326 "This option only has effect in I<-lR> output mode. See L</RECURSIVE LONG "
2331 #: ../cat/virt-ls.pod:316
2333 "When prompting for keys and passphrases, virt-ls normally turns echoing off "
2334 "so you cannot see what you are typing. If you are not worried about Tempest "
2335 "attacks and there is no one else in the room you can specify this flag to "
2336 "see what you are typing."
2340 #: ../cat/virt-ls.pod:321
2341 msgid "B<--extra-stats>"
2345 #: ../cat/virt-ls.pod:323
2346 msgid "Display extra stats."
2350 #: ../cat/virt-ls.pod:339
2353 " virt-ls --format=raw -a disk.img /dir\n"
2358 #: ../cat/virt-ls.pod:343
2361 " virt-ls --format=raw -a disk.img --format -a another.img /dir\n"
2366 #: ../cat/virt-ls.pod:356
2367 msgid "Display file sizes in human-readable format."
2371 #: ../cat/virt-ls.pod:370
2376 #: ../cat/virt-ls.pod:372
2377 msgid "B<--recursive>"
2381 #: ../cat/virt-ls.pod:374
2383 "Select the mode. With neither of these options, C<virt-ls> produces a "
2384 "simple, flat list of the files in the named directory. See L</SIMPLE "
2389 #: ../cat/virt-ls.pod:378
2391 "C<virt-ls -l> produces a \"long listing\", which shows more detail. See "
2396 #: ../cat/virt-ls.pod:381
2398 "C<virt-ls -R> produces a recursive list of files starting at the named "
2399 "directory. See L</RECURSIVE LISTING>."
2403 #: ../cat/virt-ls.pod:384
2405 "C<virt-ls -lR> produces a recursive long listing which can be more easily "
2406 "parsed. See L</RECURSIVE LONG LISTING>."
2410 #: ../cat/virt-ls.pod:387
2415 #: ../cat/virt-ls.pod:389
2416 msgid "Display time fields."
2420 #: ../cat/virt-ls.pod:394
2421 msgid "B<--time-days>"
2425 #: ../cat/virt-ls.pod:396
2426 msgid "Display time fields as days before now (negative if in the future)."
2430 #: ../cat/virt-ls.pod:398
2432 "Note that C<0> in output means \"up to 1 day before now\", or that the age "
2433 "of the file is between 0 and 86399 seconds."
2437 #: ../cat/virt-ls.pod:404
2438 msgid "B<--time-relative>"
2442 #: ../cat/virt-ls.pod:406
2443 msgid "Display time fields as seconds before now (negative if in the future)."
2447 #: ../cat/virt-ls.pod:411
2452 #: ../cat/virt-ls.pod:413
2453 msgid "Display time fields as seconds since the Unix epoch."
2457 #: ../cat/virt-ls.pod:418
2462 #: ../cat/virt-ls.pod:420
2463 msgid "Display UID and GID fields."
2467 #: ../cat/virt-ls.pod:445
2468 msgid "Previous versions of virt-ls allowed you to write either:"
2472 #: ../cat/virt-ls.pod:447
2475 " virt-ls disk.img [disk.img ...] /dir\n"
2480 #: ../cat/virt-ls.pod:451
2483 " virt-ls guestname /dir\n"
2488 #: ../cat/virt-ls.pod:497
2490 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, "
2491 "L<virt-tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
2492 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
2496 #: ../cat/virt-ls.pod:513 ../df/virt-df.pod:241 ../edit/virt-edit.pod:374 ../rescue/virt-rescue.pod:302
2497 msgid "Copyright (C) 2009-2011 Red Hat Inc."
2501 #: ../clone/virt-sysprep.pod:5
2502 msgid "virt-sysprep - Reset or unconfigure a virtual machine so clones can be made"
2506 #: ../clone/virt-sysprep.pod:9
2509 " virt-sysprep [--options] -d domname\n"
2514 #: ../clone/virt-sysprep.pod:11
2517 " virt-sysprep [--options] -a disk.img [-a disk.img ...]\n"
2522 #: ../clone/virt-sysprep.pod:15
2524 "Virt-sysprep \"resets\" or \"unconfigures\" a virtual machine so that clones "
2525 "can be made from it. Steps in this process include removing SSH host keys, "
2526 "removing persistent network MAC configuration, and removing user accounts. "
2527 "Each step can be enabled or disabled as required."
2531 #: ../clone/virt-sysprep.pod:21
2533 "Virt-sysprep is a simple shell script, allowing easy inspection or "
2534 "customization by the system administrator."
2538 #: ../clone/virt-sysprep.pod:24
2540 "Virt-sysprep modifies the guest or disk image I<in place>. The guest must "
2541 "be shut down. If you want to preserve the existing contents of the guest, "
2542 "you I<must copy or clone the disk first>. See L</COPYING AND CLONING> "
2547 #: ../clone/virt-sysprep.pod:29
2549 "\"Sysprep\" stands for \"system preparation\" tool. The name comes from the "
2550 "Microsoft program C<sysprep.exe> which is used to unconfigure Windows "
2551 "machines in preparation for cloning them. Having said that, virt-sysprep "
2552 "does I<not> currently work on Microsoft Windows guests. We plan to support "
2553 "Windows sysprepping in a future version, and we already have code to do it."
2557 #: ../clone/virt-sysprep.pod:70
2558 msgid "B<--enable=...>"
2562 #: ../clone/virt-sysprep.pod:72
2564 "Choose which sysprep operations to perform. Give a comma-separated list of "
2565 "operations, for example:"
2569 #: ../clone/virt-sysprep.pod:75
2572 " --enable=ssh-hostkeys,udev-persistent-net\n"
2577 #: ../clone/virt-sysprep.pod:77
2578 msgid "would enable ONLY C<ssh-hostkeys> and C<udev-persistent-net> operations."
2582 #: ../clone/virt-sysprep.pod:79
2584 "If the I<--enable> option is not given, then we default to trying all "
2585 "possible sysprep operations. But some sysprep operations are skipped for "
2590 #: ../clone/virt-sysprep.pod:83
2592 "Use I<--list-operations> to list operations supported by a particular "
2593 "version of virt-sysprep."
2597 #: ../clone/virt-sysprep.pod:86
2598 msgid "See L</OPERATIONS> below for a list and an explanation of each operation."
2602 #: ../clone/virt-sysprep.pod:100
2605 " virt-sysprep --format=raw -a disk.img\n"
2610 #: ../clone/virt-sysprep.pod:104
2613 " virt-sysprep --format=raw -a disk.img --format -a another.img\n"
2618 #: ../clone/virt-sysprep.pod:113
2619 msgid "B<--hostname> newhostname"
2623 #: ../clone/virt-sysprep.pod:115
2625 "Change the hostname. See the L</hostname> operation below. If not given, "
2626 "defaults to C<localhost.localdomain>."
2630 #: ../clone/virt-sysprep.pod:118
2631 msgid "B<--list-operations>"
2635 #: ../clone/virt-sysprep.pod:120
2636 msgid "List the operations supported by the virt-sysprep program."
2640 #: ../clone/virt-sysprep.pod:140
2645 #: ../clone/virt-sysprep.pod:142
2647 "If the I<--enable> option is I<not> given, then all sysprep operations in "
2648 "the list below are enabled, although some are skipped depending on the type "
2653 #: ../clone/virt-sysprep.pod:146
2655 "Operations can be individually enabled using the I<--enable> option. Use a "
2656 "comma-separated list, for example:"
2660 #: ../clone/virt-sysprep.pod:149
2663 " virt-sysprep --enable=ssh-hostkeys,udev-persistent-net [etc..]\n"
2668 #: ../clone/virt-sysprep.pod:151
2670 "To list the operations supported by the current version of virt-sysprep, use "
2671 "I<--list-operations>."
2675 #: ../clone/virt-sysprep.pod:154
2680 #: ../clone/virt-sysprep.pod:156
2682 "This changes the hostname of the guest to the value given in the "
2683 "I<--hostname> parameter."
2687 #: ../clone/virt-sysprep.pod:159
2689 "If the I<--hostname> parameter is not given, then the hostname is changed to "
2690 "C<localhost.localdomain>."
2694 #: ../clone/virt-sysprep.pod:162
2699 #: ../clone/virt-sysprep.pod:164
2701 "Remove HWADDR (hard-coded MAC address) configuration. For Fedora and Red "
2702 "Hat Enterprise Linux, this is removed from C<ifcfg-*> files."
2706 #: ../clone/virt-sysprep.pod:167
2707 msgid "ssh-hostkeys"
2711 #: ../clone/virt-sysprep.pod:169
2712 msgid "This erases the SSH host keys in the guest."
2716 #: ../clone/virt-sysprep.pod:171
2718 "The SSH host keys are regenerated (differently) next time the guest is "
2723 #: ../clone/virt-sysprep.pod:174
2725 "If, after cloning, the guest gets the same IP address, ssh will give you a "
2726 "stark warning about the host key changing:"
2730 #: ../clone/virt-sysprep.pod:177
2733 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
2734 " @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\n"
2735 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
2736 " IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\n"
2741 #: ../clone/virt-sysprep.pod:182
2742 msgid "udev-persistent-net"
2746 #: ../clone/virt-sysprep.pod:184
2748 "This erases udev persistent net rules which map the guest's existing MAC "
2749 "address to a fixed ethernet device (eg. eth0)."
2753 #: ../clone/virt-sysprep.pod:187
2755 "After a guest is cloned, the MAC address usually changes. Since the old MAC "
2756 "address occupies the old name (eg. eth0), this means the fresh MAC address "
2757 "is assigned to a new name (eg. eth1) and this is usually undesirable. "
2758 "Erasing the udev persistent net rules avoids this."
2762 #: ../clone/virt-sysprep.pod:192
2763 msgid "COPYING AND CLONING"
2767 #: ../clone/virt-sysprep.pod:194
2769 "Virt-sysprep can be used as part of a process of cloning guests, or to "
2770 "prepare a template from which guests can be cloned. There are many "
2771 "different ways to achieve this using the virt tools, and this section is "
2772 "just an introduction."
2776 #: ../clone/virt-sysprep.pod:199
2777 msgid "A virtual machine (when switched off) consists of two parts:"
2781 #: ../clone/virt-sysprep.pod:203
2782 msgid "I<configuration>"
2786 #: ../clone/virt-sysprep.pod:205
2788 "The configuration or description of the guest. eg. The libvirt XML (see "
2789 "C<virsh dumpxml>), the running configuration of the guest, or another "
2790 "external format like OVF."
2794 #: ../clone/virt-sysprep.pod:209
2795 msgid "Some configuration items that might need to be changed:"
2799 #: ../clone/virt-sysprep.pod:215
2804 #: ../clone/virt-sysprep.pod:219 ../clone/virt-sysprep.pod:246
2809 #: ../clone/virt-sysprep.pod:223
2810 msgid "path to block device(s)"
2814 #: ../clone/virt-sysprep.pod:227
2815 msgid "network card MAC address"
2819 #: ../clone/virt-sysprep.pod:231
2820 msgid "I<block device(s)>"
2824 #: ../clone/virt-sysprep.pod:233
2826 "One or more hard disk images, themselves containing files, directories, "
2827 "applications, kernels, configuration, etc."
2831 #: ../clone/virt-sysprep.pod:236
2832 msgid "Some things inside the block devices that might need to be changed:"
2836 #: ../clone/virt-sysprep.pod:242
2837 msgid "hostname and other net configuration"
2841 #: ../clone/virt-sysprep.pod:250
2842 msgid "SSH host keys"
2846 #: ../clone/virt-sysprep.pod:254
2847 msgid "Windows unique security ID (SID)"
2851 #: ../clone/virt-sysprep.pod:258
2852 msgid "Puppet registration"
2856 #: ../clone/virt-sysprep.pod:264
2857 msgid "COPYING THE BLOCK DEVICE"
2861 #: ../clone/virt-sysprep.pod:266
2863 "Starting with an original guest, you probably wish to copy the guest block "
2864 "device and its configuration to make a template. Then once you are happy "
2865 "with the template, you will want to make many clones from it."
2869 #: ../clone/virt-sysprep.pod:271
2875 " original guest --------> template ---------->\n"
2876 " \\------> cloned\n"
2877 " \\-----> guests\n"
2883 #: ../clone/virt-sysprep.pod:279
2885 "You can, of course, just copy the block device on the host using L<cp(1)> or "
2890 #: ../clone/virt-sysprep.pod:282
2894 " original guest --------> template ---------->\n"
2895 " \\------> cloned\n"
2896 " \\-----> guests\n"
2902 #: ../clone/virt-sysprep.pod:288
2903 msgid "There are some smarter (and faster) ways too:"
2907 #: ../clone/virt-sysprep.pod:294
2911 " template ---------->\n"
2912 " \\------> cloned\n"
2913 " \\-----> guests\n"
2919 #: ../clone/virt-sysprep.pod:300
2921 "Use the block device as a backing file and create a snapshot on top for each "
2922 "guest. The advantage is that you don't need to copy the block device (very "
2923 "fast) and only changes are stored (less storage required)."
2927 #: ../clone/virt-sysprep.pod:305
2929 "Note that writing to the backing file once you have created guests on top of "
2930 "it is not possible: you will corrupt the guests."
2934 #: ../clone/virt-sysprep.pod:308
2936 "Tools that can do this include: L<qemu-img(1)> (with the I<create -f qcow2 "
2937 "-o backing_file> option), L<lvcreate(8)> (I<--snapshot> option). Some "
2938 "filesystems (such as btrfs) and most Network Attached Storage devices can "
2939 "also create cheap snapshots from files or LUNs."
2943 #: ../clone/virt-sysprep.pod:316
2944 msgid "Get your NAS to snapshot and/or duplicate the LUN."
2948 #: ../clone/virt-sysprep.pod:320
2949 msgid "Prepare your template using L<virt-sparsify(1)>. See below."
2953 #: ../clone/virt-sysprep.pod:324
2958 #: ../clone/virt-sysprep.pod:326
2960 "A separate tool, L<virt-clone(1)>, can be used to duplicate the block device "
2961 "and/or modify the external libvirt configuration of a guest. It will reset "
2962 "the name, UUID and MAC address of the guest in the libvirt XML."
2966 #: ../clone/virt-sysprep.pod:331
2968 "L<virt-clone(1)> does not use libguestfs and cannot look inside the disk "
2969 "image. This was the original motivation to write virt-sysprep."
2973 #: ../clone/virt-sysprep.pod:334
2978 #: ../clone/virt-sysprep.pod:336
2982 " original guest --------> template\n"
2987 #: ../clone/virt-sysprep.pod:339
2989 "L<virt-sparsify(1)> can be used to make the cloning template smaller, making "
2990 "it easier to compress and/or faster to copy."
2994 #: ../clone/virt-sysprep.pod:342
2996 "Notice that since virt-sparsify also copies the image, you can use it to "
2997 "make the initial copy (instead of C<dd>)."
3001 #: ../clone/virt-sysprep.pod:345
3006 #: ../clone/virt-sysprep.pod:347
3010 " template ---------->\n"
3011 " \\------> cloned\n"
3012 " \\-----> guests\n"
3018 #: ../clone/virt-sysprep.pod:353
3020 "If you want to give people cloned guests, but let them pick the size of the "
3021 "guest themselves (eg. depending on how much they are prepared to pay for "
3022 "disk space), then instead of copying the template, you can run "
3023 "L<virt-resize(1)>. Virt-resize performs a copy and resize, and thus is "
3024 "ideal for cloning guests from a template."
3028 #: ../clone/virt-sysprep.pod:368
3029 msgid "This program returns 0 on success, or 1 if there was an error."
3033 #: ../clone/virt-sysprep.pod:372
3035 "L<guestfs(3)>, L<guestfish(1)>, L<virt-clone(1)>, L<virt-rescue(1)>, "
3036 "L<virt-resize(1)>, L<virt-sparsify(1)>, L<virsh(1)>, L<qemu-img(1)>, "
3037 "L<lvcreate(8)>, L<http://libguestfs.org/>, L<http://libvirt.org/>."
3041 #: ../df/virt-df.pod:5
3042 msgid "virt-df - Display free space on virtual filesystems"
3046 #: ../df/virt-df.pod:9
3049 " virt-df [--options]\n"
3054 #: ../df/virt-df.pod:11
3057 " virt-df [--options] -d domname\n"
3062 #: ../df/virt-df.pod:13
3065 " virt-df [--options] -a disk.img [-a disk.img ...]\n"
3070 #: ../df/virt-df.pod:17
3073 " virt-df [--options] domname\n"
3078 #: ../df/virt-df.pod:19
3081 " virt-df [--options] disk.img [disk.img ...]\n"
3086 #: ../df/virt-df.pod:23
3088 "C<virt-df> is a command line tool to display free space on virtual machine "
3089 "filesystems. Unlike other tools, it doesn't just display the size of disk "
3090 "allocated to a virtual machine, but can look inside disk images to see how "
3091 "much space is really being used."
3095 #: ../df/virt-df.pod:28
3097 "If used without any I<-a> or I<-d> arguments, C<virt-df> checks with libvirt "
3098 "to get a list of all active and inactive guests, and performs a C<df>-type "
3099 "operation on each one in turn, printing out the results."
3103 #: ../df/virt-df.pod:32
3105 "If any I<-a> or I<-d> arguments are specified, C<virt-df> performs a "
3106 "C<df>-type operation on either the single named libvirt domain, or on the "
3107 "disk image(s) listed on the command line (which must all belong to a single "
3108 "VM). In this mode (with arguments), C<virt-df> will I<only work for a "
3109 "single guest>. If you want to run on multiple guests, then you have to "
3110 "invoke C<virt-df> multiple times."
3114 #: ../df/virt-df.pod:39
3116 "Use the I<--csv> option to get a format which can be easily parsed by other "
3117 "programs. Other options are similar to the standard L<df(1)> command."
3121 #: ../df/virt-df.pod:45
3123 "Show disk usage for a single libvirt guest called C<F14x64>. Make the "
3124 "output human-readable:"
3128 #: ../df/virt-df.pod:48
3131 " # virt-df -d F14x64 -h\n"
3132 " Filesystem Size Used Available Use%\n"
3133 " F14x64:/dev/sda1 484M 66M 393M 14%\n"
3134 " F14x64:/dev/vg_f13x64/lv_root 7.4G 3.4G 4.0G 46%\n"
3139 #: ../df/virt-df.pod:53
3140 msgid "Show disk usage for a disk image file called C<test.img>:"
3144 #: ../df/virt-df.pod:55
3147 " $ virt-df -a test1.img\n"
3148 " Filesystem 1K-blocks Used Available Use%\n"
3149 " test1.img:/dev/sda1 99099 1551 92432 2%\n"
3154 #: ../df/virt-df.pod:112
3157 " virt-df --format=raw -a disk.img\n"
3162 #: ../df/virt-df.pod:116
3165 " virt-df --format=raw -a disk.img --format -a another.img\n"
3170 #: ../df/virt-df.pod:129
3171 msgid "Print sizes in human-readable format."
3175 #: ../df/virt-df.pod:131
3176 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
3180 #: ../df/virt-df.pod:133 ../fish/guestfish.pod:258 ../fuse/guestmount.pod:155
3185 #: ../df/virt-df.pod:135
3190 #: ../df/virt-df.pod:137
3191 msgid "Print inodes instead of blocks."
3195 #: ../df/virt-df.pod:139
3196 msgid "B<--one-per-guest>"
3200 #: ../df/virt-df.pod:141
3202 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
3203 "disks from several guests to a single libguestfs appliance."
3207 #: ../df/virt-df.pod:144
3208 msgid "You might use this option in the following circumstances:"
3212 #: ../df/virt-df.pod:150
3214 "If you think an untrusted guest might actively try to exploit the libguestfs "
3215 "appliance kernel, then this prevents one guest from interfering with the "
3216 "stats printed for another guest."
3220 #: ../df/virt-df.pod:156
3222 "If the kernel has a bug which stops it from accessing a filesystem in one "
3223 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
3224 "and report stats for further guests."
3228 #: ../df/virt-df.pod:165
3230 "Print UUIDs instead of names. This is useful for following a guest even "
3231 "when the guest is migrated or renamed, or when two guests happen to have the "
3236 #: ../df/virt-df.pod:169
3238 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
3239 "images, we still print the disk image name even when this option is "
3244 #: ../df/virt-df.pod:229
3246 "L<df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
3247 "L<http://libguestfs.org/>."
3251 #: ../edit/virt-edit.pod:5
3252 msgid "virt-edit - Edit a file in a virtual machine"
3256 #: ../edit/virt-edit.pod:9
3259 " virt-edit [--options] -d domname file [file ...]\n"
3264 #: ../edit/virt-edit.pod:11
3267 " virt-edit [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
3272 #: ../edit/virt-edit.pod:13
3275 " virt-edit [-d domname|-a disk.img] file -e 'expr'\n"
3280 #: ../edit/virt-edit.pod:17
3283 " virt-edit domname file\n"
3288 #: ../edit/virt-edit.pod:19 ../edit/virt-edit.pod:183
3291 " virt-edit disk.img [disk.img ...] file\n"
3296 #: ../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
3301 #: ../edit/virt-edit.pod:23
3303 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
3304 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
3305 "doing this, but doesn't catch all cases."
3309 #: ../edit/virt-edit.pod:29
3311 "C<virt-edit> is a command line tool to edit C<file> where each C<file> "
3312 "exists in the named virtual machine (or disk image)."
3316 #: ../edit/virt-edit.pod:32
3318 "Multiple filenames can be given, in which case they are each edited in "
3319 "turn. Each filename must be a full path, starting at the root directory "
3320 "(starting with '/')."
3324 #: ../edit/virt-edit.pod:36
3325 msgid "If you want to just view a file, use L<virt-cat(1)>."
3329 #: ../edit/virt-edit.pod:38
3331 "For more complex cases you should look at the L<guestfish(1)> tool (see "
3332 "L</USING GUESTFISH> below)."
3336 #: ../edit/virt-edit.pod:41
3338 "C<virt-edit> cannot be used to create a new file. L<guestfish(1)> can do "
3339 "that and much more."
3343 #: ../edit/virt-edit.pod:46
3344 msgid "Edit the named files interactively:"
3348 #: ../edit/virt-edit.pod:48
3351 " virt-edit -d mydomain /boot/grub/grub.conf\n"
3356 #: ../edit/virt-edit.pod:50
3359 " virt-edit -d mydomain /etc/passwd\n"
3364 #: ../edit/virt-edit.pod:52
3365 msgid "For Windows guests, some Windows paths are understood:"
3369 #: ../edit/virt-edit.pod:54
3372 " virt-edit -d mywindomain 'c:\\autoexec.bat'\n"
3377 #: ../edit/virt-edit.pod:56
3379 "If Perl is installed, you can also edit files non-interactively (see "
3380 "L</NON-INTERACTIVE EDITING> below). To change the init default level to 5:"
3384 #: ../edit/virt-edit.pod:60
3387 " virt-edit -d mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
3392 #: ../edit/virt-edit.pod:81
3393 msgid "B<-b> extension"
3397 #: ../edit/virt-edit.pod:83
3398 msgid "B<--backup> extension"
3402 #: ../edit/virt-edit.pod:85
3404 "Create a backup of the original file I<in the guest disk image>. The backup "
3405 "has the original filename with C<extension> added."
3409 #: ../edit/virt-edit.pod:88
3411 "Usually the first character of C<extension> would be a dot C<.> so you would "
3416 #: ../edit/virt-edit.pod:91
3419 " virt-edit -b .orig [etc]\n"
3424 #: ../edit/virt-edit.pod:93
3425 msgid "By default, no backup file is made."
3429 #: ../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
3434 #: ../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
3435 msgid "B<--connect URI>"
3439 #: ../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
3441 "If you specify guest block devices directly, then libvirt is not used at "
3446 #: ../edit/virt-edit.pod:114
3448 "When prompting for keys and passphrases, virt-edit normally turns echoing "
3449 "off so you cannot see what you are typing. If you are not worried about "
3450 "Tempest attacks and there is no one else in the room you can specify this "
3451 "flag to see what you are typing."
3455 #: ../edit/virt-edit.pod:119
3460 #: ../edit/virt-edit.pod:121
3461 msgid "B<--expr> EXPR"
3465 #: ../edit/virt-edit.pod:123
3467 "Instead of launching the external editor, non-interactively apply the Perl "
3468 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
3473 #: ../edit/virt-edit.pod:127
3475 "Be careful to properly quote the expression to prevent it from being altered "
3480 #: ../edit/virt-edit.pod:130
3481 msgid "Note that this option is only available when Perl 5 is installed."
3485 #: ../edit/virt-edit.pod:132
3486 msgid "B<--format> raw|qcow2|..."
3490 #: ../edit/virt-edit.pod:143
3493 " virt-edit --format=raw -a disk.img file\n"
3498 #: ../edit/virt-edit.pod:147
3501 " virt-edit --format=raw -a disk.img --format -a another.img file\n"
3506 #: ../edit/virt-edit.pod:181
3507 msgid "Previous versions of virt-edit allowed you to write either:"
3511 #: ../edit/virt-edit.pod:187
3514 " virt-edit guestname file\n"
3519 #: ../edit/virt-edit.pod:195
3520 msgid "NON-INTERACTIVE EDITING"
3524 #: ../edit/virt-edit.pod:197
3526 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
3527 "administrator can interactively edit the file."
3531 #: ../edit/virt-edit.pod:200
3533 "There are two ways also to use C<virt-edit> from scripts in order to make "
3534 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
3535 "like this, it's less error-prone to write scripts directly using the "
3536 "libguestfs API and Augeas for configuration file editing.)"
3540 #: ../edit/virt-edit.pod:206
3542 "The first method is to temporarily set C<$EDITOR> to any script or program "
3543 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
3544 "update C<tmpfile> in place however it likes."
3548 #: ../edit/virt-edit.pod:210
3550 "The second method is to use the I<-e> parameter of C<virt-edit> to run a "
3551 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
3552 "instances of C<foo> with C<bar> in a file:"
3556 #: ../edit/virt-edit.pod:214
3559 " virt-edit -d domname filename -e 's/foo/bar/'\n"
3564 #: ../edit/virt-edit.pod:216
3566 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
3567 "For example to delete root's password you could do:"
3571 #: ../edit/virt-edit.pod:219
3574 " virt-edit -d domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
3579 #: ../edit/virt-edit.pod:221
3581 "What really happens is that the snippet is evaluated as a Perl expression "
3582 "for each line of the file. The line, including the final C<\\n>, is passed "
3583 "in C<$_> and the expression should update C<$_> or leave it unchanged."
3587 #: ../edit/virt-edit.pod:226
3589 "To delete a line, set C<$_> to the empty string. For example, to delete the "
3590 "C<apache> user account from the password file you can do:"
3594 #: ../edit/virt-edit.pod:229
3597 " virt-edit -d mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
3602 #: ../edit/virt-edit.pod:231
3604 "To insert a line, prepend or append it to C<$_>. However appending lines to "
3605 "the end of the file is rather difficult this way since there is no concept "
3606 "of \"last line of the file\" - your expression just doesn't get called "
3607 "again. You might want to use the first method (setting C<$EDITOR>) if you "
3612 #: ../edit/virt-edit.pod:237
3614 "The variable C<$lineno> contains the current line number. As is "
3615 "traditional, the first line in the file is number C<1>."
3619 #: ../edit/virt-edit.pod:240
3621 "The return value from the expression is ignored, but the expression may call "
3622 "C<die> in order to abort the whole program, leaving the original file "
3627 #: ../edit/virt-edit.pod:244
3629 "Remember when matching the end of a line that C<$_> may contain the final "
3630 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
3631 "newline then neither of these. Thus to match or substitute some text at the "
3632 "end of a line, use this regular expression:"
3636 #: ../edit/virt-edit.pod:249
3639 " /some text(\\r?\\n)?$/\n"
3644 #: ../edit/virt-edit.pod:251
3646 "Alternately, use the perl C<chomp> function, being careful not to chomp "
3647 "C<$_> itself (since that would remove all newlines from the file):"
3651 #: ../edit/virt-edit.pod:255
3654 " my $m = $_; chomp $m; $m =~ /some text$/\n"
3659 #: ../edit/virt-edit.pod:257 ../fish/guestfish.pod:858
3660 msgid "WINDOWS PATHS"
3664 #: ../edit/virt-edit.pod:259
3666 "C<virt-edit> has a limited ability to understand Windows drive letters and "
3667 "paths (eg. C<E:\\foo\\bar.txt>)."
3671 #: ../edit/virt-edit.pod:262
3672 msgid "If and only if the guest is running Windows then:"
3676 #: ../edit/virt-edit.pod:268
3678 "Drive letter prefixes like C<C:> are resolved against the Windows Registry "
3679 "to the correct filesystem."
3683 #: ../edit/virt-edit.pod:273
3685 "Any backslash (C<\\>) characters in the path are replaced with forward "
3686 "slashes so that libguestfs can process it."
3690 #: ../edit/virt-edit.pod:278
3692 "The path is resolved case insensitively to locate the file that should be "
3697 #: ../edit/virt-edit.pod:283
3698 msgid "There are some known shortcomings:"
3702 #: ../edit/virt-edit.pod:289
3703 msgid "Some NTFS symbolic links may not be followed correctly."
3707 #: ../edit/virt-edit.pod:293
3708 msgid "NTFS junction points that cross filesystems are not followed."
3712 #: ../edit/virt-edit.pod:299
3714 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
3715 "C<virt-edit> doesn't work."
3719 #: ../edit/virt-edit.pod:302
3720 msgid "Using C<virt-edit> is approximately equivalent to doing:"
3724 #: ../edit/virt-edit.pod:304
3727 " guestfish --rw -i -d domname edit /file\n"
3732 #: ../edit/virt-edit.pod:306
3734 "where C<domname> is the name of the libvirt guest, and C</file> is the full "
3739 #: ../edit/virt-edit.pod:309
3741 "The command above uses libguestfs's guest inspection feature and so does not "
3742 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
3743 "disk images that don't contain guests. To edit a file on a disk image "
3748 #: ../edit/virt-edit.pod:314
3751 " guestfish --rw -a disk.img -m /dev/sda1 edit /file\n"
3756 #: ../edit/virt-edit.pod:316
3758 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
3759 "the disk image to edit, and C</file> is the full path to the file."
3763 #: ../edit/virt-edit.pod:320
3765 "C<virt-edit> cannot create new files. Use the guestfish commands C<touch>, "
3766 "C<write> or C<upload> instead:"
3770 #: ../edit/virt-edit.pod:323
3773 " guestfish --rw -i -d domname touch /newfile\n"
3778 #: ../edit/virt-edit.pod:325
3781 " guestfish --rw -i -d domname write /newfile \"new content\"\n"
3786 #: ../edit/virt-edit.pod:327
3789 " guestfish --rw -i -d domname upload localfile /newfile\n"
3794 #: ../edit/virt-edit.pod:329 ../fish/guestfish.pod:1118 ../rescue/virt-rescue.pod:261 ../sparsify/virt-sparsify.pod:232 ../src/guestfs.pod:3123 ../test-tool/libguestfs-test-tool.pod:95
3795 msgid "ENVIRONMENT VARIABLES"
3799 #: ../edit/virt-edit.pod:333
3804 #: ../edit/virt-edit.pod:335
3806 "If set, this string is used as the editor. It may contain arguments, "
3807 "eg. C<\"emacs -nw\">"
3811 #: ../edit/virt-edit.pod:338
3812 msgid "If not set, C<vi> is used."
3816 #: ../edit/virt-edit.pod:356
3818 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
3819 "L<virt-tar-in(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
3820 "L<Sys::Virt(3)>, L<http://libguestfs.org/>, L<perl(1)>, L<perlre(1)>."
3824 #: ../erlang/examples/guestfs-erlang.pod:5
3825 msgid "guestfs-erlang - How to use libguestfs from Erlang"
3829 #: ../erlang/examples/guestfs-erlang.pod:9
3832 " {ok, G} = guestfs:create(),\n"
3833 " ok = guestfs:add_drive_opts(G, Disk,\n"
3834 " [{format, \"raw\"}, {readonly, true}]),\n"
3835 " ok = guestfs:launch(G),\n"
3836 " [Device] = guestfs:list_devices(G),\n"
3837 " ok = guestfs:close(G).\n"
3842 #: ../erlang/examples/guestfs-erlang.pod:18
3844 "This manual page documents how to call libguestfs from the Erlang "
3845 "programming language. This page just documents the differences from the C "
3846 "API and gives some examples. If you are not familiar with using libguestfs, "
3847 "you also need to read L<guestfs(3)>."
3851 #: ../erlang/examples/guestfs-erlang.pod:23
3852 msgid "OPENING AND CLOSING THE HANDLE"
3856 #: ../erlang/examples/guestfs-erlang.pod:25
3858 "The Erlang bindings are implemented using an external program called "
3859 "C<erl-guestfs>. This program must be on the current PATH, or else you "
3860 "should specify the full path to the program:"
3864 #: ../erlang/examples/guestfs-erlang.pod:29
3867 " {ok, G} = guestfs:create().\n"
3872 #: ../erlang/examples/guestfs-erlang.pod:31
3875 " {ok, G} = guestfs:create(\"/path/to/erl-guestfs\").\n"
3880 #: ../erlang/examples/guestfs-erlang.pod:33
3881 msgid "C<G> is the libguestfs handle which you should pass to other functions."
3885 #: ../erlang/examples/guestfs-erlang.pod:36