X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=po-docs%2Fja.po;h=aeddd761c1e269d2915a84ac5eb5d461c1557917;hp=8deb477d7a7bef79ab5e6690e1f04da2256ff01e;hb=fef0ff3d869d2ebdb48eea0c538270fc98f5952d;hpb=f455dc3814bf9f7e7e894ba81360acb0edd92464 diff --git a/po-docs/ja.po b/po-docs/ja.po index 8deb477..aeddd76 100644 --- a/po-docs/ja.po +++ b/po-docs/ja.po @@ -1,6016 +1,5835 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. +# SOME DESCRIPTIVE TITLE +# Copyright (C) YEAR Red Hat Inc. +# This file is distributed under the same license as the libguestfs package. # -#, fuzzy +# Translators: +# rjones , 2011. +# , 2011. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: libguestfs\n" "Report-Msgid-Bugs-To: libguestfs@redhat.com\n" -"POT-Creation-Date: 2011-02-06 17:14+0000\n" -"PO-Revision-Date: 2010-09-02 14:46+0100\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" +"POT-Creation-Date: 2011-10-19 17:23+0200\n" +"PO-Revision-Date: 2011-10-19 15:46+0000\n" +"Last-Translator: rjones \n" +"Language-Team: Japanese \n" +"Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0\n" -# type: =head1 #. type: =head1 -#: ../src/guestfs.pod:3 ../fish/guestfish.pod:3 -#: ../test-tool/libguestfs-test-tool.pod:3 ../fuse/guestmount.pod:3 -#: ../tools/virt-edit.pl:32 ../tools/virt-win-reg.pl:35 -#: ../tools/virt-resize.pl:40 ../tools/virt-list-filesystems.pl:30 -#: ../tools/virt-tar.pl:31 ../tools/virt-make-fs.pl:35 -#: ../tools/virt-list-partitions.pl:30 +#: ../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 msgid "NAME" msgstr "名前" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:5 -msgid "guestfs - Library for accessing and modifying virtual machine images" +#: ../align/virt-alignment-scan.pod:5 +msgid "virt-alignment-scan - Check alignment of virtual machine partitions" msgstr "" -# type: =head1 #. type: =head1 -#: ../src/guestfs.pod:7 ../fish/guestfish.pod:7 -#: ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7 -#: ../tools/virt-edit.pl:36 ../tools/virt-win-reg.pl:39 -#: ../tools/virt-resize.pl:44 ../tools/virt-list-filesystems.pl:34 -#: ../tools/virt-tar.pl:35 ../tools/virt-make-fs.pl:39 -#: ../tools/virt-list-partitions.pl:34 +#: ../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 msgid "SYNOPSIS" msgstr "" -# type: verbatim -#. type: verbatim -#: ../src/guestfs.pod:9 -#, no-wrap -msgid "" -" #include \n" -" \n" -msgstr "" - -# type: verbatim #. type: verbatim -#: ../src/guestfs.pod:11 +#: ../align/virt-alignment-scan.pod:9 #, no-wrap msgid "" -" guestfs_h *g = guestfs_create ();\n" -" guestfs_add_drive (g, \"guest.img\");\n" -" guestfs_launch (g);\n" -" guestfs_mount (g, \"/dev/sda1\", \"/\");\n" -" guestfs_touch (g, \"/hello\");\n" -" guestfs_umount (g, \"/\");\n" -" guestfs_close (g);\n" +" virt-alignment-scan [--options] -d domname\n" "\n" msgstr "" -# type: verbatim #. type: verbatim -#: ../src/guestfs.pod:19 +#: ../align/virt-alignment-scan.pod:11 #, no-wrap msgid "" -" cc prog.c -o prog -lguestfs\n" -"or:\n" -" cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n" +" virt-alignment-scan [--options] -a disk.img [-a disk.img ...]\n" "\n" msgstr "" -# type: =head1 #. type: =head1 -#: ../src/guestfs.pod:23 ../fish/guestfish.pod:30 -#: ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:20 -#: ../tools/virt-edit.pl:50 ../tools/virt-win-reg.pl:63 -#: ../tools/virt-resize.pl:50 ../tools/virt-list-filesystems.pl:40 -#: ../tools/virt-tar.pl:77 ../tools/virt-make-fs.pl:47 -#: ../tools/virt-list-partitions.pl:40 +#: ../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 msgid "DESCRIPTION" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:25 +#: ../align/virt-alignment-scan.pod:15 msgid "" -"Libguestfs is a library for accessing and modifying guest disk images. " -"Amongst the things this is good for: making batch configuration changes to " -"guests, getting disk used/free statistics (see also: virt-df), migrating " -"between virtualization systems (see also: virt-p2v), performing partial " -"backups, performing partial guest clones, cloning guests and changing " -"registry/UUID/hostname info, and much else besides." +"When older operating systems install themselves, the partitioning tools " +"place partitions at a sector misaligned with the underlying storage " +"(commonly the first partition starts on sector C<63>). Misaligned " +"partitions can result in an operating system issuing more I/O than should be " +"necessary." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:33 +#: ../align/virt-alignment-scan.pod:21 msgid "" -"Libguestfs uses Linux kernel and qemu code, and can access any type of guest " -"filesystem that Linux and qemu can, including but not limited to: ext2/3/4, " -"btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, " -"qcow2, vmdk." +"The virt-alignment-scan tool checks the alignment of partitions in virtual " +"machines and disk images and warns you if there are alignment problems." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:38 +#: ../align/virt-alignment-scan.pod:25 msgid "" -"Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, " -"what filesystem is in each LV, etc.). It can also run commands in the " -"context of the guest. Also you can access filesystems over FUSE." +"Currently there is no virt tool for fixing alignment problems. You can only " +"reinstall the guest operating system. The following NetApp document " +"summarises the problem and possible solutions: L" +msgstr "" + +#. type: =head1 +#: ../align/virt-alignment-scan.pod:30 +msgid "OUTPUT" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:43 +#: ../align/virt-alignment-scan.pod:32 +msgid "To run this tool on a disk image directly, use the I<-a> option:" +msgstr "" + +#. type: verbatim +#: ../align/virt-alignment-scan.pod:34 +#, no-wrap msgid "" -"Libguestfs is a library that can be linked with C and C++ management " -"programs (or management programs written in OCaml, Perl, Python, Ruby, Java, " -"PHP, Haskell or C#). You can also use it from shell scripts or the command " -"line." +" $ virt-alignment-scan -a winxp.img\n" +" /dev/sda1 32256 512 bad (alignment < 4K)\n" +"\n" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:48 +#. type: verbatim +#: ../align/virt-alignment-scan.pod:37 +#, no-wrap msgid "" -"You don't need to be root to use libguestfs, although obviously you do need " -"enough permissions to access the disk images." +" $ virt-alignment-scan -a fedora16.img\n" +" /dev/sda1 1048576 1024K ok\n" +" /dev/sda2 2097152 2048K ok\n" +" /dev/sda3 526385152 2048K ok\n" +"\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:51 +#: ../align/virt-alignment-scan.pod:42 msgid "" -"Libguestfs is a large API because it can do many things. For a gentle " -"introduction, please read the L section next." +"To run the tool on a guest known to libvirt, use the I<-d> option and " +"possibly the I<-c> option:" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:54 +#. type: verbatim +#: ../align/virt-alignment-scan.pod:45 +#, no-wrap msgid "" -"There are also some example programs in the L manual " -"page." +" # virt-alignment-scan -d RHEL5\n" +" /dev/sda1 32256 512 bad (alignment < 4K)\n" +" /dev/sda2 106928640 512 bad (alignment < 4K)\n" +"\n" msgstr "" -# type: =head1 -#. type: =head1 -#: ../src/guestfs.pod:57 -msgid "API OVERVIEW" +#. type: verbatim +#: ../align/virt-alignment-scan.pod:49 +#, no-wrap +msgid "" +" $ virt-alignment-scan -c qemu:///system -d Win7TwoDisks\n" +" /dev/sda1 1048576 1024K ok\n" +" /dev/sda2 105906176 1024K ok\n" +" /dev/sdb1 65536 64K ok\n" +"\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:59 +#: ../align/virt-alignment-scan.pod:54 msgid "" -"This section provides a gentler overview of the libguestfs API. We also try " -"to group API calls together, where that may not be obvious from reading " -"about the individual calls in the main section of this manual." +"The output consists of 4 or more whitespace-separated columns. Only the " +"first 4 columns are signficant if you want to parse this from a program. " +"The columns are:" msgstr "" -# type: =head2 -#. type: =head2 -#: ../src/guestfs.pod:64 -msgid "HANDLES" +#. type: =item +#: ../align/virt-alignment-scan.pod:60 +msgid "col 1" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:66 +#: ../align/virt-alignment-scan.pod:62 msgid "" -"Before you can use libguestfs calls, you have to create a handle. Then you " -"must add at least one disk image to the handle, followed by launching the " -"handle, then performing whatever operations you want, and finally closing " -"the handle. By convention we use the single letter C for the name of the " -"handle variable, although of course you can use any name you want." +"the device and partition name (eg. C meaning the first partition " +"on the first block device)" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:73 -msgid "The general structure of all libguestfs-using programs looks like this:" +#. type: =item +#: ../align/virt-alignment-scan.pod:65 +msgid "col 2" msgstr "" -# type: verbatim -#. type: verbatim -#: ../src/guestfs.pod:76 -#, no-wrap -msgid "" -" guestfs_h *g = guestfs_create ();\n" -" \n" +#. type: textblock +#: ../align/virt-alignment-scan.pod:67 +msgid "the start of the partition in bytes" msgstr "" -# type: verbatim -#. type: verbatim -#: ../src/guestfs.pod:78 -#, no-wrap -msgid "" -" /* Call guestfs_add_drive additional times if there are\n" -" * multiple disk images.\n" -" */\n" -" guestfs_add_drive (g, \"guest.img\");\n" -" \n" +#. type: =item +#: ../align/virt-alignment-scan.pod:69 +msgid "col 3" msgstr "" -# type: verbatim -#. type: verbatim -#: ../src/guestfs.pod:83 -#, no-wrap -msgid "" -" /* Most manipulation calls won't work until you've launched\n" -" * the handle 'g'. You have to do this _after_ adding drives\n" -" * and _before_ other commands.\n" -" */\n" -" guestfs_launch (g);\n" -" \n" +#. type: textblock +#: ../align/virt-alignment-scan.pod:71 +msgid "the alignment in bytes or Kbytes (eg. C<512> or C<4K>)" msgstr "" -# type: verbatim -#. type: verbatim -#: ../src/guestfs.pod:89 -#, no-wrap -msgid "" -" /* Now you can examine what partitions, LVs etc are available.\n" -" */\n" -" char **partitions = guestfs_list_partitions (g);\n" -" char **logvols = guestfs_lvs (g);\n" -" \n" +#. type: =item +#: ../align/virt-alignment-scan.pod:73 +msgid "col 4" msgstr "" -# type: verbatim -#. type: verbatim -#: ../src/guestfs.pod:94 -#, no-wrap +#. type: textblock +#: ../align/virt-alignment-scan.pod:75 msgid "" -" /* To access a filesystem in the image, you must mount it.\n" -" */\n" -" guestfs_mount (g, \"/dev/sda1\", \"/\");\n" -" \n" +"C if the alignment is best for performance, or C if the alignment " +"can cause performance problems" msgstr "" -# type: verbatim -#. type: verbatim -#: ../src/guestfs.pod:98 -#, no-wrap -msgid "" -" /* Now you can perform filesystem actions on the guest\n" -" * disk image.\n" -" */\n" -" guestfs_touch (g, \"/hello\");\n" -"\n" +#. type: =item +#: ../align/virt-alignment-scan.pod:78 +msgid "cols 5+" msgstr "" -# type: verbatim -#. type: verbatim -#: ../src/guestfs.pod:103 -#, no-wrap -msgid "" -" /* This is only needed for libguestfs < 1.5.24. Since then\n" -" * it is done automatically when you close the handle. See\n" -" * discussion of autosync in this page.\n" -" */\n" -" guestfs_sync (g);\n" -" \n" +#. type: textblock +#: ../align/virt-alignment-scan.pod:80 +msgid "optional free-text explanation." msgstr "" -# type: verbatim -#. type: verbatim -#: ../src/guestfs.pod:109 -#, no-wrap +#. type: textblock +#: ../align/virt-alignment-scan.pod:84 msgid "" -" /* Close the handle 'g'. */\n" -" guestfs_close (g);\n" -"\n" +"The exit code from the program changes depending on whether poorly aligned " +"partitions were found. See L below." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:112 -msgid "" -"The code above doesn't include any error checking. In real code you should " -"check return values carefully for errors. In general all functions that " -"return integers return C<-1> on error, and all functions that return " -"pointers return C on error. See section L below for " -"how to handle errors, and consult the documentation for each function call " -"below to see precisely how they return error indications. See L for fully worked examples." +#: ../align/virt-alignment-scan.pod:87 +msgid "If you just want the exit code with no output, use the I<-q> option." msgstr "" -# type: =head2 -#. type: =head2 -#: ../src/guestfs.pod:121 -msgid "DISK IMAGES" +#. type: =head1 +#: ../align/virt-alignment-scan.pod:89 ../cat/virt-cat.pod:62 +#: ../cat/virt-filesystems.pod:91 ../cat/virt-ls.pod:261 +#: ../clone/virt-sysprep.pod:42 ../df/virt-df.pod:59 ../edit/virt-edit.pod:62 +#: ../fish/guestfish.pod:148 ../fish/virt-copy-in.pod:45 +#: ../fish/virt-copy-out.pod:34 ../fish/virt-tar-in.pod:42 +#: ../fish/virt-tar-out.pod:36 ../fuse/guestmount.pod:92 +#: ../inspector/virt-inspector.pod:55 ../rescue/virt-rescue.pod:84 +#: ../resize/virt-resize.pod: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 +msgid "OPTIONS" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:123 -msgid "" -"The image filename (C<\"guest.img\"> in the example above) could be a disk " -"image from a virtual machine, a L copy of a physical hard disk, an " -"actual block device, or simply an empty file of zeroes that you have created " -"through L. Libguestfs lets you do useful things to all " -"of these." +#. type: =item +#: ../align/virt-alignment-scan.pod:93 ../cat/virt-cat.pod:66 +#: ../cat/virt-filesystems.pod:95 ../cat/virt-ls.pod:265 +#: ../clone/virt-sysprep.pod:46 ../df/virt-df.pod:63 ../edit/virt-edit.pod:66 +#: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:160 +#: ../inspector/virt-inspector.pod:59 ../rescue/virt-rescue.pod:88 +#: ../resize/virt-resize.pod: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 +msgid "B<--help>" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:129 -msgid "" -"The call you should use in modern code for adding drives is L. To add a disk image, allowing writes, and " -"specifying that the format is raw, do:" +#: ../align/virt-alignment-scan.pod:95 ../cat/virt-cat.pod:68 +#: ../cat/virt-filesystems.pod:97 ../cat/virt-ls.pod:267 +#: ../clone/virt-sysprep.pod:48 ../df/virt-df.pod:65 ../edit/virt-edit.pod:68 +#: ../inspector/virt-inspector.pod:61 ../rescue/virt-rescue.pod:90 +#: ../tools/virt-list-filesystems.pl:63 ../tools/virt-list-partitions.pl:64 +#: ../tools/virt-make-fs.pl:163 ../tools/virt-tar.pl:113 +#: ../tools/virt-win-reg.pl:106 +msgid "Display brief help." msgstr "" -# type: verbatim -#. type: verbatim -#: ../src/guestfs.pod:133 -#, no-wrap -msgid "" -" guestfs_add_drive_opts (g, filename,\n" -" GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n" -" -1);\n" -"\n" +#. type: =item +#: ../align/virt-alignment-scan.pod:97 ../cat/virt-cat.pod:70 +#: ../cat/virt-filesystems.pod:99 ../cat/virt-ls.pod:269 +#: ../clone/virt-sysprep.pod:50 ../df/virt-df.pod:67 ../edit/virt-edit.pod:70 +#: ../inspector/virt-inspector.pod:63 ../rescue/virt-rescue.pod:92 +msgid "B<-a> file" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:137 -msgid "You can add a disk read-only using:" +#. type: =item +#: ../align/virt-alignment-scan.pod:99 ../cat/virt-cat.pod:72 +#: ../cat/virt-filesystems.pod:101 ../cat/virt-ls.pod:271 +#: ../clone/virt-sysprep.pod:52 ../df/virt-df.pod:69 ../edit/virt-edit.pod:72 +#: ../inspector/virt-inspector.pod:65 ../rescue/virt-rescue.pod:94 +msgid "B<--add> file" msgstr "" -# type: verbatim -#. type: verbatim -#: ../src/guestfs.pod:139 -#, no-wrap -msgid "" -" guestfs_add_drive_opts (g, filename,\n" -" GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n" -" GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n" -" -1);\n" -"\n" +#. type: textblock +#: ../align/virt-alignment-scan.pod:101 ../clone/virt-sysprep.pod:54 +msgid "Add I which should be a disk image from a virtual machine." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:144 +#: ../align/virt-alignment-scan.pod:103 ../cat/virt-cat.pod:78 +#: ../cat/virt-filesystems.pod:107 ../cat/virt-ls.pod:277 +#: ../clone/virt-sysprep.pod:56 ../df/virt-df.pod:75 ../edit/virt-edit.pod:78 +#: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:102 +#: ../inspector/virt-inspector.pod:71 ../rescue/virt-rescue.pod:100 msgid "" -"or by calling the older function L. In either case " -"libguestfs won't modify the file." +"The format of the disk image is auto-detected. To override this and force a " +"particular format use the I<--format=..> option." msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:147 -msgid "" -"Be extremely cautious if the disk image is in use, eg. if it is being used " -"by a virtual machine. Adding it read-write will almost certainly cause disk " -"corruption, but adding it read-only is safe." +#. type: =item +#: ../align/virt-alignment-scan.pod:106 ../cat/virt-cat.pod:81 +#: ../cat/virt-filesystems.pod:125 ../cat/virt-ls.pod:291 +#: ../clone/virt-sysprep.pod:59 ../df/virt-df.pod:78 +#: ../rescue/virt-rescue.pod:107 +msgid "B<-c> URI" +msgstr "" + +#. type: =item +#: ../align/virt-alignment-scan.pod:108 ../cat/virt-cat.pod:83 +#: ../cat/virt-filesystems.pod:127 ../cat/virt-ls.pod:293 +#: ../clone/virt-sysprep.pod:61 ../df/virt-df.pod:80 +#: ../rescue/virt-rescue.pod:109 +msgid "B<--connect> URI" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:151 +#: ../align/virt-alignment-scan.pod:110 ../cat/virt-cat.pod:85 +#: ../cat/virt-filesystems.pod:129 ../cat/virt-ls.pod:295 +#: ../clone/virt-sysprep.pod:63 ../df/virt-df.pod:82 ../edit/virt-edit.pod:99 +#: ../inspector/virt-inspector.pod:78 ../rescue/virt-rescue.pod:111 +#: ../tools/virt-list-filesystems.pl:81 ../tools/virt-list-partitions.pl:82 +#: ../tools/virt-tar.pl:131 ../tools/virt-win-reg.pl:132 msgid "" -"You must add at least one disk image, and you may add multiple disk images. " -"In the API, the disk images are usually referred to as C (for the " -"first one you added), C (for the second one you added), etc." +"If using libvirt, connect to the given I. If omitted, then we connect " +"to the default libvirt hypervisor." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:156 +#: ../align/virt-alignment-scan.pod:113 ../cat/virt-cat.pod:88 +#: ../cat/virt-filesystems.pod:132 ../cat/virt-ls.pod:298 +#: ../clone/virt-sysprep.pod:66 ../df/virt-df.pod:85 +#: ../rescue/virt-rescue.pod:114 msgid "" -"Once L has been called you cannot add any more images. You " -"can call L to get a list of the device names, in the " -"order that you added them. See also L below." +"If you specify guest block devices directly (I<-a>), then libvirt is not " +"used at all." msgstr "" -# type: =head2 -#. type: =head2 -#: ../src/guestfs.pod:161 -msgid "MOUNTING" +#. type: =item +#: ../align/virt-alignment-scan.pod:116 ../cat/virt-cat.pod:91 +#: ../cat/virt-filesystems.pod:141 ../cat/virt-ls.pod:307 +#: ../clone/virt-sysprep.pod:69 ../df/virt-df.pod:94 ../edit/virt-edit.pod:105 +#: ../inspector/virt-inspector.pod:85 ../rescue/virt-rescue.pod:117 +msgid "B<-d> guest" +msgstr "" + +#. type: =item +#: ../align/virt-alignment-scan.pod:118 ../cat/virt-cat.pod:93 +#: ../cat/virt-filesystems.pod:143 ../cat/virt-ls.pod:309 +#: ../clone/virt-sysprep.pod:71 ../df/virt-df.pod:96 ../edit/virt-edit.pod:107 +#: ../inspector/virt-inspector.pod:87 ../rescue/virt-rescue.pod:119 +msgid "B<--domain> guest" msgstr "" #. type: textblock -#: ../src/guestfs.pod:163 +#: ../align/virt-alignment-scan.pod:120 ../cat/virt-cat.pod:95 +#: ../cat/virt-filesystems.pod:145 ../cat/virt-ls.pod:311 +#: ../clone/virt-sysprep.pod:73 ../df/virt-df.pod:98 ../edit/virt-edit.pod:109 +#: ../inspector/virt-inspector.pod:89 ../rescue/virt-rescue.pod:121 msgid "" -"Before you can read or write files, create directories and so on in a disk " -"image that contains filesystems, you have to mount those filesystems using " -"L or L. If you already know that " -"a disk image contains (for example) one partition with a filesystem on that " -"partition, then you can mount it directly:" +"Add all the disks from the named libvirt guest. Domain UUIDs can be used " +"instead of names." msgstr "" -#. type: verbatim -#: ../src/guestfs.pod:170 +#. type: =item +#: ../align/virt-alignment-scan.pod:123 ../cat/virt-cat.pod:105 +#: ../cat/virt-filesystems.pod:170 ../cat/virt-ls.pod:328 +#: ../clone/virt-sysprep.pod:95 ../df/virt-df.pod:101 +#: ../fish/guestfish.pod:233 ../fuse/guestmount.pod:142 +#: ../inspector/virt-inspector.pod:99 ../rescue/virt-rescue.pod:124 +msgid "B<--format=raw|qcow2|..>" +msgstr "" + +#. type: =item +#: ../align/virt-alignment-scan.pod:125 ../cat/virt-cat.pod:107 +#: ../cat/virt-filesystems.pod:172 ../cat/virt-ls.pod:330 +#: ../clone/virt-sysprep.pod:97 ../df/virt-df.pod:103 +#: ../edit/virt-edit.pod:134 ../fish/guestfish.pod:235 +#: ../fuse/guestmount.pod:144 ../inspector/virt-inspector.pod:101 +#: ../rescue/virt-rescue.pod:126 +msgid "B<--format>" +msgstr "" + +#. type: textblock +#: ../align/virt-alignment-scan.pod:127 ../cat/virt-cat.pod:109 +#: ../cat/virt-filesystems.pod:174 ../cat/virt-ls.pod:332 +#: ../clone/virt-sysprep.pod:99 ../df/virt-df.pod:105 +#: ../edit/virt-edit.pod:136 ../fish/guestfish.pod:237 +#: ../fuse/guestmount.pod:146 ../rescue/virt-rescue.pod:128 +msgid "" +"The default for the I<-a> option is to auto-detect the format of the disk " +"image. Using this forces the disk format for I<-a> options which follow on " +"the command line. Using I<--format> with no argument switches back to auto-" +"detection for subsequent I<-a> options." +msgstr "" + +#. type: textblock +#: ../align/virt-alignment-scan.pod:132 ../cat/virt-cat.pod:114 +#: ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337 +#: ../clone/virt-sysprep.pod:104 ../df/virt-df.pod:110 +#: ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242 +#: ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:336 +#: ../rescue/virt-rescue.pod:133 ../src/guestfs.pod:2862 +msgid "For example:" +msgstr "" + +#. type: verbatim +#: ../align/virt-alignment-scan.pod:134 #, no-wrap msgid "" -" guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n" +" virt-alignment-scan --format=raw -a disk.img\n" "\n" msgstr "" #. type: textblock -#: ../src/guestfs.pod:172 +#: ../align/virt-alignment-scan.pod:136 ../cat/virt-cat.pod:118 +#: ../cat/virt-filesystems.pod:183 ../cat/virt-ls.pod:341 +#: ../clone/virt-sysprep.pod:108 ../df/virt-df.pod:114 +#: ../edit/virt-edit.pod:145 ../fish/guestfish.pod:246 +#: ../rescue/virt-rescue.pod:137 +msgid "forces raw format (no auto-detection) for C." +msgstr "" + +#. type: verbatim +#: ../align/virt-alignment-scan.pod:138 +#, no-wrap msgid "" -"where C means literally the first partition (C<1>) of the first " -"disk image that we added (C). If the disk contains Linux LVM2 " -"logical volumes you could refer to those instead (eg. C). Note " -"that these are libguestfs virtual devices, and are nothing to do with host " -"devices." +" virt-alignment-scan --format=raw -a disk.img --format -a another.img\n" +"\n" msgstr "" #. type: textblock -#: ../src/guestfs.pod:178 +#: ../align/virt-alignment-scan.pod:140 ../cat/virt-cat.pod:122 +#: ../cat/virt-filesystems.pod:187 ../cat/virt-ls.pod:345 +#: ../clone/virt-sysprep.pod:112 ../df/virt-df.pod:118 +#: ../edit/virt-edit.pod:149 ../fish/guestfish.pod:250 +#: ../rescue/virt-rescue.pod:141 msgid "" -"If you are given a disk image and you don't know what it contains then you " -"have to find out. Libguestfs can do that too: use L and L to list possible partitions and " -"LVs, and either try mounting each to see what is mountable, or else examine " -"them with L or L. To list just " -"filesystems, use L." +"forces raw format (no auto-detection) for C and reverts to auto-" +"detection for C." msgstr "" #. type: textblock -#: ../src/guestfs.pod:186 +#: ../align/virt-alignment-scan.pod:143 ../cat/virt-cat.pod:125 +#: ../cat/virt-filesystems.pod:190 ../cat/virt-ls.pod:348 +#: ../clone/virt-sysprep.pod:115 ../df/virt-df.pod:121 +#: ../edit/virt-edit.pod:152 ../rescue/virt-rescue.pod:144 msgid "" -"Libguestfs also has a set of APIs for inspection of unknown disk images (see " -"L below). But you might find it easier to look at higher level " -"programs built on top of libguestfs, in particular L." +"If you have untrusted raw-format guest disk images, you should use this " +"option to specify the disk format. This avoids a possible security problem " +"with malicious guests (CVE-2010-3851)." +msgstr "" + +#. type: =item +#: ../align/virt-alignment-scan.pod:147 ../resize/virt-resize.pod:414 +#: ../sparsify/virt-sparsify.pod:153 +msgid "B<-q>" +msgstr "" + +#. type: =item +#: ../align/virt-alignment-scan.pod:149 ../resize/virt-resize.pod:416 +#: ../sparsify/virt-sparsify.pod:155 +msgid "B<--quiet>" msgstr "" #. type: textblock -#: ../src/guestfs.pod:191 +#: ../align/virt-alignment-scan.pod:151 msgid "" -"To mount a filesystem read-only, use L. There are " -"several other variations of the C call." +"Don't produce any output. Just set the exit code (see L " +"below)." msgstr "" -# type: =head2 -#. type: =head2 -#: ../src/guestfs.pod:194 -msgid "FILESYSTEM ACCESS AND MODIFICATION" +#. type: =item +#: ../align/virt-alignment-scan.pod:154 ../cat/virt-cat.pod:134 +#: ../cat/virt-filesystems.pod:261 ../cat/virt-ls.pod:425 +#: ../clone/virt-sysprep.pod:138 ../df/virt-df.pod:173 +#: ../edit/virt-edit.pod:161 ../fish/guestfish.pod:390 +#: ../fuse/guestmount.pod:266 ../inspector/virt-inspector.pod:119 +#: ../rescue/virt-rescue.pod:182 ../sparsify/virt-sparsify.pod:159 +msgid "B<-v>" +msgstr "" + +#. type: =item +#: ../align/virt-alignment-scan.pod:156 ../cat/virt-cat.pod:136 +#: ../cat/virt-filesystems.pod:263 ../cat/virt-ls.pod:427 +#: ../clone/virt-sysprep.pod:140 ../df/virt-df.pod:175 +#: ../edit/virt-edit.pod:163 ../fish/guestfish.pod:392 +#: ../fuse/guestmount.pod:268 ../inspector/virt-inspector.pod:121 +#: ../rescue/virt-rescue.pod:184 ../sparsify/virt-sparsify.pod:161 +msgid "B<--verbose>" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:196 -msgid "" -"The majority of the libguestfs API consists of fairly low-level calls for " -"accessing and modifying the files, directories, symlinks etc on mounted " -"filesystems. There are over a hundred such calls which you can find listed " -"in detail below in this man page, and we don't even pretend to cover them " -"all in this overview." +#: ../align/virt-alignment-scan.pod:158 ../cat/virt-cat.pod:138 +#: ../cat/virt-filesystems.pod:265 ../cat/virt-ls.pod:429 +#: ../clone/virt-sysprep.pod:142 ../df/virt-df.pod:177 +#: ../edit/virt-edit.pod:165 ../inspector/virt-inspector.pod:123 +#: ../rescue/virt-rescue.pod:186 ../sparsify/virt-sparsify.pod:163 +msgid "Enable verbose messages for debugging." +msgstr "" + +#. type: =item +#: ../align/virt-alignment-scan.pod:160 ../cat/virt-cat.pod:140 +#: ../cat/virt-filesystems.pod:267 ../cat/virt-ls.pod:431 +#: ../clone/virt-sysprep.pod:144 ../df/virt-df.pod:179 +#: ../edit/virt-edit.pod:167 ../fish/guestfish.pod:397 +#: ../fuse/guestmount.pod:272 ../inspector/virt-inspector.pod:125 +#: ../rescue/virt-rescue.pod:188 ../resize/virt-resize.pod:484 +#: ../sparsify/virt-sparsify.pod:165 +msgid "B<-V>" +msgstr "" + +#. type: =item +#: ../align/virt-alignment-scan.pod:162 ../cat/virt-cat.pod:142 +#: ../cat/virt-filesystems.pod:269 ../cat/virt-ls.pod:433 +#: ../clone/virt-sysprep.pod:146 ../df/virt-df.pod:181 +#: ../edit/virt-edit.pod:169 ../fish/guestfish.pod:399 +#: ../fuse/guestmount.pod:274 ../inspector/virt-inspector.pod:127 +#: ../rescue/virt-rescue.pod:190 ../resize/virt-resize.pod: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 +msgid "B<--version>" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:202 -msgid "" -"Specify filenames as full paths, starting with C<\"/\"> and including the " -"mount point." +#: ../align/virt-alignment-scan.pod:164 ../cat/virt-cat.pod:144 +#: ../cat/virt-filesystems.pod:271 ../cat/virt-ls.pod:435 +#: ../clone/virt-sysprep.pod:148 ../df/virt-df.pod:183 +#: ../edit/virt-edit.pod:171 ../inspector/virt-inspector.pod:129 +#: ../rescue/virt-rescue.pod:192 ../resize/virt-resize.pod: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 +msgid "Display version number and exit." +msgstr "" + +#. type: =item +#: ../align/virt-alignment-scan.pod:166 ../cat/virt-cat.pod:146 +#: ../cat/virt-filesystems.pod:281 ../cat/virt-ls.pod:437 +#: ../clone/virt-sysprep.pod:150 ../df/virt-df.pod:185 +#: ../edit/virt-edit.pod:173 ../fish/guestfish.pod:412 +#: ../fuse/guestmount.pod:287 ../inspector/virt-inspector.pod:131 +#: ../rescue/virt-rescue.pod:203 ../sparsify/virt-sparsify.pod:171 +#: ../tools/virt-tar.pl:158 +msgid "B<-x>" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:205 -msgid "" -"For example, if you mounted a filesystem at C<\"/\"> and you want to read " -"the file called C<\"etc/passwd\"> then you could do:" +#: ../align/virt-alignment-scan.pod:168 ../cat/virt-cat.pod:148 +#: ../cat/virt-filesystems.pod:283 ../cat/virt-ls.pod:439 +#: ../clone/virt-sysprep.pod:152 ../df/virt-df.pod:187 +#: ../edit/virt-edit.pod:175 ../inspector/virt-inspector.pod:133 +#: ../rescue/virt-rescue.pod:205 ../sparsify/virt-sparsify.pod:173 +msgid "Enable tracing of libguestfs API calls." msgstr "" -# type: verbatim -#. type: verbatim -#: ../src/guestfs.pod:208 -#, no-wrap -msgid "" -" char *data = guestfs_cat (g, \"/etc/passwd\");\n" -"\n" +#. type: =head1 +#: ../align/virt-alignment-scan.pod:172 +msgid "RECOMMENDED ALIGNMENT" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:210 +#: ../align/virt-alignment-scan.pod:174 msgid "" -"This would return C as a newly allocated buffer containing the full " -"content of that file (with some conditions: see also L below), " -"or C if there was an error." +"Operating systems older than Windows 2008 and Linux before ca.2010 place the " +"first sector of the first partition at sector 63, with a 512 byte sector " +"size. This happens because of a historical accident. Drives have to report " +"a cylinder / head / sector (CHS) geometry to the BIOS. The geometry is " +"completely meaningless on modern drives, but it happens that the geometry " +"reported always has 63 sectors per track. The operating system therefore " +"places the first partition at the start of the second \"track\", at sector " +"63." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:214 +#: ../align/virt-alignment-scan.pod:183 msgid "" -"As another example, to create a top-level directory on that filesystem " -"called C<\"var\"> you would do:" +"When the guest OS is virtualized, the host operating system and hypervisor " +"may prefer accesses aligned to one of:" msgstr "" -# type: verbatim -#. type: verbatim -#: ../src/guestfs.pod:217 -#, no-wrap -msgid "" -" guestfs_mkdir (g, \"/var\");\n" -"\n" +#. type: =item +#: ../align/virt-alignment-scan.pod:188 +msgid "* 512 bytes" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:219 -msgid "To create a symlink you could do:" +#: ../align/virt-alignment-scan.pod:190 +msgid "" +"if the host OS uses local storage directly on hard drive partitions, and the " +"hard drive has 512 byte physical sectors." msgstr "" -# type: verbatim -#. type: verbatim -#: ../src/guestfs.pod:221 -#, no-wrap -msgid "" -" guestfs_ln_s (g, \"/etc/init.d/portmap\",\n" -" \"/etc/rc3.d/S30portmap\");\n" -"\n" +#. type: =item +#: ../align/virt-alignment-scan.pod:193 +msgid "* 4 Kbytes" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:224 +#: ../align/virt-alignment-scan.pod:195 msgid "" -"Libguestfs will reject attempts to use relative paths and there is no " -"concept of a current working directory." +"for local storage on new hard drives with 4Kbyte physical sectors; for file-" +"backed storage on filesystems with 4Kbyte block size; or for some types of " +"network-attached storage." msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:227 -msgid "" -"Libguestfs can return errors in many situations: for example if the " -"filesystem isn't writable, or if a file or directory that you requested " -"doesn't exist. If you are using the C API (documented here) you have to " -"check for those error conditions after each call. (Other language bindings " -"turn these errors into exceptions)." +#. type: =item +#: ../align/virt-alignment-scan.pod:199 +msgid "* 64 Kbytes" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:233 +#: ../align/virt-alignment-scan.pod:201 msgid "" -"File writes are affected by the per-handle umask, set by calling L and defaulting to 022. See L." +"for high-end network-attached storage. This is the optimal block size for " +"some NetApp hardware." msgstr "" -# type: =head2 -#. type: =head2 -#: ../src/guestfs.pod:236 -msgid "PARTITIONING" +#. type: =item +#: ../align/virt-alignment-scan.pod:204 +msgid "* 1 Mbyte" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:238 -msgid "" -"Libguestfs contains API calls to read, create and modify partition tables on " -"disk images." +#: ../align/virt-alignment-scan.pod:206 +msgid "see L below." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:241 +#: ../align/virt-alignment-scan.pod:210 msgid "" -"In the common case where you want to create a single partition covering the " -"whole disk, you should use the L call:" +"Partitions which are not aligned correctly to the underlying storage cause " +"extra I/O. For example:" msgstr "" -# type: verbatim #. type: verbatim -#: ../src/guestfs.pod:245 +#: ../align/virt-alignment-scan.pod:213 #, no-wrap msgid "" -" const char *parttype = \"mbr\";\n" -" if (disk_is_larger_than_2TB)\n" -" parttype = \"gpt\";\n" -" guestfs_part_disk (g, \"/dev/sda\", parttype);\n" +" sect#63\n" +" +--------------------------+------\n" +" | guest |\n" +" | filesystem block |\n" +" ---+------------------+------+-------------------+-----+---\n" +" | host block | host block |\n" +" | | |\n" +" ---+-------------------------+-------------------------+---\n" "\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:250 +#: ../align/virt-alignment-scan.pod:222 msgid "" -"Obviously this effectively wipes anything that was on that disk image before." +"In this example, each time a 4K guest block is read, two blocks on the host " +"must be accessed (so twice as much I/O is done). When a 4K guest block is " +"written, two host blocks must first be read, the old and new data combined, " +"and the two blocks written back (4x I/O)." msgstr "" -# type: =head2 #. type: =head2 -#: ../src/guestfs.pod:253 -msgid "LVM2" +#: ../align/virt-alignment-scan.pod:227 +msgid "LINUX HOST BLOCK AND I/O SIZE" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:255 +#: ../align/virt-alignment-scan.pod:229 msgid "" -"Libguestfs provides access to a large part of the LVM2 API, such as L and L. It won't make much sense unless " -"you familiarize yourself with the concepts of physical volumes, volume " -"groups and logical volumes." +"New versions of the Linux kernel expose the physical and logical block size, " +"and minimum and recommended I/O size." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:260 -msgid "" -"This author strongly recommends reading the LVM HOWTO, online at L." +#: ../align/virt-alignment-scan.pod:232 +msgid "For a typical hard drive with 512 byte sectors:" msgstr "" -# type: =head2 -#. type: =head2 -#: ../src/guestfs.pod:263 -msgid "DOWNLOADING" +#. type: verbatim +#: ../align/virt-alignment-scan.pod:234 +#, no-wrap +msgid "" +" $ cat /sys/block/sda/queue/physical_block_size\n" +" 512\n" +" $ cat /sys/block/sda/queue/logical_block_size\n" +" 512\n" +" $ cat /sys/block/sda/queue/minimum_io_size\n" +" 512\n" +" $ cat /sys/block/sda/queue/optimal_io_size\n" +" 0\n" +"\n" msgstr "" #. type: textblock -#: ../src/guestfs.pod:265 +#: ../align/virt-alignment-scan.pod:243 +msgid "For a NetApp LUN:" +msgstr "" + +#. type: verbatim +#: ../align/virt-alignment-scan.pod:245 +#, no-wrap msgid "" -"Use L to download small, text only files. This call is " -"limited to files which are less than 2 MB and which cannot contain any ASCII " -"NUL (C<\\0>) characters. However the API is very simple to use." +" $ cat /sys/block/sdc/queue/logical_block_size\n" +" 512\n" +" $ cat /sys/block/sdc/queue/physical_block_size\n" +" 512\n" +" $ cat /sys/block/sdc/queue/minimum_io_size\n" +" 4096\n" +" $ cat /sys/block/sdc/queue/optimal_io_size\n" +" 65536\n" +"\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:269 +#: ../align/virt-alignment-scan.pod:254 msgid "" -"L can be used to read files which contain arbitrary 8 " -"bit data, since it returns a (pointer, size) pair. However it is still " -"limited to \"small\" files, less than 2 MB." +"The NetApp allows 512 byte accesses (but they will be very inefficient), " +"prefers a minimum 4K I/O size, but the optimal I/O size is 64K." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:273 +#: ../align/virt-alignment-scan.pod:258 msgid "" -"L can be used to download any file, with no limits on " -"content or size (even files larger than 4 GB)." +"For detailed information about what these numbers mean, see L" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:276 +#: ../align/virt-alignment-scan.pod:261 msgid "" -"To download multiple files, see L and L." +"[Thanks to Mike Snitzer for providing NetApp data and additional " +"information.]" msgstr "" -# type: =head2 #. type: =head2 -#: ../src/guestfs.pod:279 -msgid "UPLOADING" +#: ../align/virt-alignment-scan.pod:264 +msgid "1 MB PARTITION ALIGNMENT" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:281 +#: ../align/virt-alignment-scan.pod:266 msgid "" -"It's often the case that you want to write a file or files to the disk image." +"Microsoft picked 1 MB as the default alignment for all partitions starting " +"with Windows 2008 Server, and Linux has followed this." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:284 +#: ../align/virt-alignment-scan.pod:269 msgid "" -"To write a small file with fixed content, use L. To create " -"a file of all zeroes, use L (sparse) or L (with all disk blocks allocated). There are a variety " -"of other functions for creating test files, for example L and " -"L." +"Assuming 512 byte sectors in the guest, you will now see the first partition " +"starting at sector 2048, and subsequent partitions (if any) will start at a " +"multiple of 2048 sectors." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:290 +#: ../align/virt-alignment-scan.pod:273 msgid "" -"To upload a single file, use L. This call has no limits on " -"file content or size (even files larger than 4 GB)." +"1 MB alignment is compatible with all current alignment requirements (4K, " +"64K) and provides room for future growth in physical block sizes." msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:293 -msgid "" -"To upload multiple files, see L and L." +#. type: =head2 +#: ../align/virt-alignment-scan.pod:276 +msgid "SETTING ALIGNMENT" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:295 +#: ../align/virt-alignment-scan.pod:278 msgid "" -"However the fastest way to upload I is to " -"turn them into a squashfs or CD ISO (see L and L), then attach this using L. If you add the drive " -"in a predictable way (eg. adding it last after all other drives) then you " -"can get the device name from L and mount it directly " -"using L. Note that squashfs images are sometimes non-" -"portable between kernel versions, and they don't support labels or UUIDs. " -"If you want to pre-build an image or you need to mount it using a label or " -"UUID, use an ISO image instead." +"Currently there is no virt tool for fixing alignment problems in guests. " +"This is a difficult problem to fix because simply moving partitions around " +"breaks the bootloader, necessitating either manual reinstallation of the " +"bootloader using a rescue disk, or complex and error-prone hacks." msgstr "" -# type: =head2 -#. type: =head2 -#: ../src/guestfs.pod:306 -msgid "COPYING" +#. type: textblock +#: ../align/virt-alignment-scan.pod:284 +msgid "" +"L does not change the alignment of the first partition, but " +"it does align the second and subsequent partitions to a multiple of 64 or " +"128 sectors (depending on the version of virt-resize, 128 in virt-resize " +"E 1.13.19). For operating systems that have a separate boot partition, " +"virt-resize could be used to align the main OS partition, so that the " +"majority of OS accesses except at boot will be aligned." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:308 +#: ../align/virt-alignment-scan.pod:292 msgid "" -"There are various different commands for copying between files and devices " -"and in and out of the guest filesystem. These are summarised in the table " -"below." +"The easiest way to correct partition alignment problems is to reinstall your " +"guest operating systems. If you install operating systems from templates, " +"ensure these have correct partition alignment too." msgstr "" -# type: =item -#. type: =item -#: ../src/guestfs.pod:314 -msgid "B to B" +#. type: textblock +#: ../align/virt-alignment-scan.pod:297 +msgid "" +"For older versions of Windows, the following NetApp document contains useful " +"information: L" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:316 +#: ../align/virt-alignment-scan.pod:300 msgid "" -"Use L to copy a single file, or L to copy " -"directories recursively." +"For Red Hat Enterprise Linux E 5, use a Kickstart script that contains " +"an explicit C<%pre> section that creates aligned partitions using L. Do not use the Kickstart C command. The NetApp document above " +"contains an example." msgstr "" -# type: =item -#. type: =item -#: ../src/guestfs.pod:319 -msgid "B to B" +#. type: =head1 +#: ../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:475 ../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 +msgid "SHELL QUOTING" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:321 +#: ../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:477 ../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 msgid "" -"Use L which efficiently uses L to copy between files and " -"devices in the guest." +"Libvirt guest names can contain arbitrary characters, some of which have " +"meaning to the shell such as C<#> and space. You may need to quote or " +"escape these characters on the command line. See the shell manual page L for details." msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:324 -msgid "Example: duplicate the contents of an LV:" +#. type: =head1 +#: ../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:482 ../df/virt-df.pod:222 +#: ../edit/virt-edit.pod:349 ../fish/guestfish.pod:1114 +#: ../fuse/guestmount.pod:312 ../inspector/virt-inspector.pod:375 +#: ../resize/virt-resize.pod:608 ../sparsify/virt-sparsify.pod:227 +#: ../test-tool/libguestfs-test-tool.pod:90 +msgid "EXIT STATUS" +msgstr "" + +#. type: textblock +#: ../align/virt-alignment-scan.pod:314 +msgid "This program returns:" +msgstr "" + +#. type: =item +#: ../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:283 ../clone/virt-sysprep.pod:287 +#: ../clone/virt-sysprep.pod:291 ../clone/virt-sysprep.pod:295 +#: ../clone/virt-sysprep.pod:310 ../clone/virt-sysprep.pod:314 +#: ../clone/virt-sysprep.pod:318 ../clone/virt-sysprep.pod:322 +#: ../clone/virt-sysprep.pod:326 ../clone/virt-sysprep.pod:362 +#: ../clone/virt-sysprep.pod:384 ../clone/virt-sysprep.pod:388 +#: ../df/virt-df.pod:148 ../df/virt-df.pod:154 ../edit/virt-edit.pod:266 +#: ../edit/virt-edit.pod:271 ../edit/virt-edit.pod:276 +#: ../edit/virt-edit.pod:287 ../edit/virt-edit.pod:291 +#: ../examples/guestfs-recipes.pod:98 ../examples/guestfs-recipes.pod:102 +#: ../examples/guestfs-recipes.pod:106 ../examples/guestfs-recipes.pod:132 +#: ../examples/guestfs-recipes.pod:137 ../examples/guestfs-recipes.pod:227 +#: ../examples/guestfs-recipes.pod:231 ../examples/guestfs-recipes.pod:235 +#: ../examples/guestfs-recipes.pod:239 ../examples/guestfs-recipes.pod:243 +#: ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20 +#: ../fish/guestfish-actions.pod:395 ../fish/guestfish-actions.pod:403 +#: ../fish/guestfish-actions.pod:410 ../fish/guestfish-actions.pod:417 +#: ../fish/guestfish-actions.pod:1144 ../fish/guestfish-actions.pod:1148 +#: ../fish/guestfish-actions.pod:1152 ../fish/guestfish-actions.pod:1156 +#: ../fish/guestfish-actions.pod:1164 ../fish/guestfish-actions.pod:1168 +#: ../fish/guestfish-actions.pod:1172 ../fish/guestfish-actions.pod:1182 +#: ../fish/guestfish-actions.pod:1186 ../fish/guestfish-actions.pod:1190 +#: ../fish/guestfish-actions.pod:1280 ../fish/guestfish-actions.pod:1284 +#: ../fish/guestfish-actions.pod:1289 ../fish/guestfish-actions.pod:1294 +#: ../fish/guestfish-actions.pod:1336 ../fish/guestfish-actions.pod:1340 +#: ../fish/guestfish-actions.pod:1345 ../fish/guestfish-actions.pod:1601 +#: ../fish/guestfish-actions.pod:1608 ../fish/guestfish-actions.pod:1615 +#: ../fish/guestfish-actions.pod:2018 ../fish/guestfish-actions.pod:2024 +#: ../fish/guestfish-actions.pod:2032 ../fish/guestfish-actions.pod:2039 +#: ../fish/guestfish-actions.pod:2046 ../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:594 ../src/guestfs-actions.pod:602 +#: ../src/guestfs-actions.pod:609 ../src/guestfs-actions.pod:616 +#: ../src/guestfs-actions.pod:1784 ../src/guestfs-actions.pod:1788 +#: ../src/guestfs-actions.pod:1792 ../src/guestfs-actions.pod:1796 +#: ../src/guestfs-actions.pod:1804 ../src/guestfs-actions.pod:1808 +#: ../src/guestfs-actions.pod:1812 ../src/guestfs-actions.pod:1822 +#: ../src/guestfs-actions.pod:1826 ../src/guestfs-actions.pod:1830 +#: ../src/guestfs-actions.pod:1968 ../src/guestfs-actions.pod:1972 +#: ../src/guestfs-actions.pod:1977 ../src/guestfs-actions.pod:1982 +#: ../src/guestfs-actions.pod:2043 ../src/guestfs-actions.pod:2047 +#: ../src/guestfs-actions.pod:2052 ../src/guestfs-actions.pod:2467 +#: ../src/guestfs-actions.pod:2474 ../src/guestfs-actions.pod:2481 +#: ../src/guestfs-actions.pod:3026 ../src/guestfs-actions.pod:3032 +#: ../src/guestfs-actions.pod:3040 ../src/guestfs-actions.pod:3047 +#: ../src/guestfs-actions.pod:3054 ../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:2630 ../src/guestfs.pod:2636 +#: ../src/guestfs.pod:2641 ../src/guestfs.pod:2647 ../src/guestfs.pod:3047 +#: ../src/guestfs.pod:3052 ../src/guestfs.pod:3056 ../src/guestfs.pod:3060 +#: ../src/guestfs.pod:3064 ../src/guestfs.pod:3078 ../src/guestfs.pod:3083 +#: ../src/guestfs.pod:3314 ../src/guestfs.pod:3318 ../src/guestfs.pod:3322 +#: ../src/guestfs.pod:3326 ../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 +msgid "*" msgstr "" -# type: verbatim -#. type: verbatim -#: ../src/guestfs.pod:326 -#, no-wrap -msgid "" -" guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n" -"\n" +#. type: textblock +#: ../align/virt-alignment-scan.pod:320 +msgid "0" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:328 +#: ../align/virt-alignment-scan.pod:322 msgid "" -"The destination (C) must be at least as large as the source " -"(C). To copy less than the whole source device, use L." +"successful exit, all partitions are aligned E 64K for best performance" msgstr "" -# type: =item -#. type: =item -#: ../src/guestfs.pod:332 -msgid "B to B" +#. type: textblock +#: ../align/virt-alignment-scan.pod:326 +msgid "1" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:334 -msgid "Use L. See L above." +#: ../align/virt-alignment-scan.pod:328 +msgid "an error scanning the disk image or guest" msgstr "" -# type: =item -#. type: =item -#: ../src/guestfs.pod:336 -msgid "B to B" +#. type: textblock +#: ../align/virt-alignment-scan.pod:332 +msgid "2" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:338 -msgid "Use L. See L above." +#: ../align/virt-alignment-scan.pod:334 +msgid "" +"successful exit, some partitions have alignment E 64K which can result " +"in poor performance on high end network storage" msgstr "" -# type: =head2 -#. type: =head2 -#: ../src/guestfs.pod:342 -msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS" +#. type: textblock +#: ../align/virt-alignment-scan.pod:339 +msgid "3" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:344 +#: ../align/virt-alignment-scan.pod:341 msgid "" -"Calls like L, L, L, L etc appear to only take filenames as arguments, so it " -"appears you can only upload and download to files. However many Un*x-like " -"hosts let you use the special device files C, C, C and C to read and write from stdin, stdout, stderr, " -"and arbitrary file descriptor N." +"successful exit, some partitions have alignment E 4K which can result in " +"poor performance on most hypervisors" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:352 -msgid "For example, L writes its output to stdout by doing:" +#. type: =head1 +#: ../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:486 ../df/virt-df.pod:227 +#: ../edit/virt-edit.pod:354 ../erlang/examples/guestfs-erlang.pod:97 +#: ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384 +#: ../fish/guestfish.pod:1268 ../fish/virt-copy-in.pod:50 +#: ../fish/virt-copy-out.pod:39 ../fish/virt-tar-in.pod:47 +#: ../fish/virt-tar-out.pod:41 ../fuse/guestmount.pod:317 +#: ../inspector/virt-inspector.pod: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:3255 +#: ../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 +msgid "SEE ALSO" msgstr "" -#. type: verbatim -#: ../src/guestfs.pod:355 -#, no-wrap +#. type: textblock +#: ../align/virt-alignment-scan.pod:348 msgid "" -" guestfs_download (g, filename, \"/dev/stdout\");\n" -"\n" +"L, L, L, L, " +"L, L." +msgstr "" + +#. type: =head1 +#: ../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:501 ../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 +msgid "AUTHOR" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:357 -msgid "and you can write tar output to a pipe C by doing:" +#: ../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:503 ../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 +msgid "Richard W.M. Jones L" msgstr "" -#. type: verbatim -#: ../src/guestfs.pod:359 -#, no-wrap -msgid "" -" char devfd[64];\n" -" snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n" -" guestfs_tar_out (g, \"/\", devfd);\n" -"\n" +#. type: =head1 +#: ../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:505 ../df/virt-df.pod:239 +#: ../edit/virt-edit.pod:372 ../erlang/examples/guestfs-erlang.pod:114 +#: ../examples/guestfs-examples.pod:49 ../examples/guestfs-recipes.pod:401 +#: ../fish/guestfish.pod:1300 ../fish/virt-copy-in.pod:64 +#: ../fish/virt-copy-out.pod:53 ../fish/virt-tar-in.pod:62 +#: ../fish/virt-tar-out.pod:55 ../fuse/guestmount.pod:332 +#: ../inspector/virt-inspector.pod: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:3337 +#: ../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 +msgid "COPYRIGHT" msgstr "" -# type: =head2 -#. type: =head2 -#: ../src/guestfs.pod:363 -msgid "LISTING FILES" +#. type: textblock +#: ../align/virt-alignment-scan.pod:361 ../clone/virt-sysprep.pod:507 +#: ../sparsify/virt-sparsify.pod:270 +msgid "Copyright (C) 2011 Red Hat Inc." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:365 +#: ../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:509 ../df/virt-df.pod:243 +#: ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1305 +#: ../fish/virt-copy-in.pod:69 ../fish/virt-copy-out.pod:58 +#: ../fish/virt-tar-in.pod:67 ../fish/virt-tar-out.pod:60 +#: ../fuse/guestmount.pod:337 ../inspector/virt-inspector.pod: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 msgid "" -"L is just designed for humans to read (mainly when using the " -"L-equivalent command C)." +"This program is free software; you can redistribute it and/or modify it " +"under the terms of the GNU General Public License as published by the Free " +"Software Foundation; either version 2 of the License, or (at your option) " +"any later version." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:368 +#: ../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:514 ../df/virt-df.pod:248 +#: ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1310 +#: ../fish/virt-copy-in.pod:74 ../fish/virt-copy-out.pod:63 +#: ../fish/virt-tar-in.pod:72 ../fish/virt-tar-out.pod:65 +#: ../fuse/guestmount.pod:342 ../inspector/virt-inspector.pod: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 msgid "" -"L is a quick way to get a list of files in a directory from " -"programs, as a flat list of strings." +"This program is distributed in the hope that it will be useful, but WITHOUT " +"ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or " +"FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for " +"more details." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:371 +#: ../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:519 ../df/virt-df.pod:253 +#: ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1315 +#: ../fish/virt-copy-in.pod:79 ../fish/virt-copy-out.pod:68 +#: ../fish/virt-tar-in.pod:77 ../fish/virt-tar-out.pod:70 +#: ../fuse/guestmount.pod:347 ../inspector/virt-inspector.pod: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 msgid "" -"L is a programmatic way to get a list of files in a " -"directory, plus additional information about each one. It is more " -"equivalent to using the L call on a local filesystem." +"You should have received a copy of the GNU General Public License along with " +"this program; if not, write to the Free Software Foundation, Inc., 675 Mass " +"Ave, Cambridge, MA 02139, USA." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:375 -msgid "" -"L and L can be used to recursively list files." +#: ../cat/virt-cat.pod:5 +msgid "virt-cat - Display files in a virtual machine" msgstr "" -# type: =head2 -#. type: =head2 -#: ../src/guestfs.pod:378 -msgid "RUNNING COMMANDS" +#. type: verbatim +#: ../cat/virt-cat.pod:9 +#, no-wrap +msgid "" +" virt-cat [--options] -d domname file [file ...]\n" +"\n" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:380 +#. type: verbatim +#: ../cat/virt-cat.pod:11 +#, no-wrap msgid "" -"Although libguestfs is primarily an API for manipulating files inside guest " -"images, we also provide some limited facilities for running commands inside " -"guests." +" virt-cat [--options] -a disk.img [-a disk.img ...] file [file ...]\n" +"\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:384 -msgid "There are many limitations to this:" +#: ../cat/virt-cat.pod:13 ../edit/virt-edit.pod:15 +#: ../inspector/virt-inspector.pod:13 +msgid "Old-style:" msgstr "" -# type: =item -#. type: =item -#: ../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:1088 -#: ../src/guestfs.pod:1092 ../src/guestfs.pod:1096 ../src/guestfs.pod:1101 -#: ../src/guestfs.pod:1109 ../src/guestfs.pod:1128 ../src/guestfs.pod:1136 -#: ../src/guestfs.pod:1158 ../src/guestfs.pod:1162 ../src/guestfs.pod:1166 -#: ../src/guestfs.pod:1170 ../src/guestfs.pod:1174 ../src/guestfs.pod:1178 -#: ../src/guestfs.pod:1660 ../src/guestfs.pod:1665 ../src/guestfs.pod:1669 -#: ../src/guestfs.pod:1779 ../src/guestfs.pod:1784 ../src/guestfs.pod:1788 -#: ../src/guestfs.pod:2140 ../src/guestfs.pod:2146 ../src/guestfs.pod:2151 -#: ../src/guestfs.pod:2157 ../src/guestfs.pod:2622 ../src/guestfs.pod:2626 -#: ../src/guestfs.pod:2630 ../src/guestfs.pod:2634 -#: ../src/guestfs-actions.pod:15 ../src/guestfs-actions.pod:22 -#: ../src/guestfs-actions.pod:577 ../src/guestfs-actions.pod:585 -#: ../src/guestfs-actions.pod:592 ../src/guestfs-actions.pod:599 -#: ../src/guestfs-actions.pod:1595 ../src/guestfs-actions.pod:1599 -#: ../src/guestfs-actions.pod:1603 ../src/guestfs-actions.pod:1607 -#: ../src/guestfs-actions.pod:1615 ../src/guestfs-actions.pod:1619 -#: ../src/guestfs-actions.pod:1623 ../src/guestfs-actions.pod:1633 -#: ../src/guestfs-actions.pod:1637 ../src/guestfs-actions.pod:1641 -#: ../src/guestfs-actions.pod:1779 ../src/guestfs-actions.pod:1783 -#: ../src/guestfs-actions.pod:1788 ../src/guestfs-actions.pod:1793 -#: ../src/guestfs-actions.pod:1854 ../src/guestfs-actions.pod:1858 -#: ../src/guestfs-actions.pod:1863 ../fish/guestfish.pod:432 -#: ../fish/guestfish.pod:436 ../fish/guestfish.pod:440 -#: ../fish/guestfish.pod:444 ../fish/guestfish-actions.pod:13 -#: ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:380 -#: ../fish/guestfish-actions.pod:388 ../fish/guestfish-actions.pod:395 -#: ../fish/guestfish-actions.pod:402 ../fish/guestfish-actions.pod:1072 -#: ../fish/guestfish-actions.pod:1076 ../fish/guestfish-actions.pod:1080 -#: ../fish/guestfish-actions.pod:1084 ../fish/guestfish-actions.pod:1092 -#: ../fish/guestfish-actions.pod:1096 ../fish/guestfish-actions.pod:1100 -#: ../fish/guestfish-actions.pod:1110 ../fish/guestfish-actions.pod:1114 -#: ../fish/guestfish-actions.pod:1118 ../fish/guestfish-actions.pod:1208 -#: ../fish/guestfish-actions.pod:1212 ../fish/guestfish-actions.pod:1217 -#: ../fish/guestfish-actions.pod:1222 ../fish/guestfish-actions.pod:1264 -#: ../fish/guestfish-actions.pod:1268 ../fish/guestfish-actions.pod:1273 -#: ../tools/virt-win-reg.pl:536 ../tools/virt-win-reg.pl:542 -#: ../tools/virt-win-reg.pl:548 ../tools/virt-resize.pl:345 -#: ../tools/virt-resize.pl:350 ../tools/virt-resize.pl:360 -msgid "*" +#. type: verbatim +#: ../cat/virt-cat.pod:15 +#, no-wrap +msgid "" +" virt-cat domname file\n" +"\n" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:390 +#. type: verbatim +#: ../cat/virt-cat.pod:17 +#, no-wrap msgid "" -"The kernel version that the command runs under will be different from what " -"it expects." +" virt-cat disk.img file\n" +"\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:395 +#: ../cat/virt-cat.pod:21 msgid "" -"If the command needs to communicate with daemons, then most likely they " -"won't be running." +"C is a command line tool to display the contents of C where " +"C exists in the named virtual machine (or disk image)." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:400 -msgid "The command will be running in limited memory." +#: ../cat/virt-cat.pod:24 +msgid "" +"Multiple filenames can be given, in which case they are concatenated " +"together. Each filename must be a full path, starting at the root directory " +"(starting with '/')." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:404 +#: ../cat/virt-cat.pod:28 msgid "" -"The network may not be available unless you enable it (see L)." +"C can be used to quickly view a file. To edit a file, use C. For more complex cases you should look at the L tool " +"(see L below)." msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:409 -msgid "Only supports Linux guests (not Windows, BSD, etc)." +#. type: =head1 +#: ../cat/virt-cat.pod:32 ../cat/virt-ls.pod:35 ../df/virt-df.pod:43 +#: ../edit/virt-edit.pod:44 ../fish/guestfish.pod:41 +#: ../fish/guestfish.pod:1051 ../fish/virt-copy-in.pod:29 +#: ../fish/virt-copy-out.pod:21 ../fish/virt-tar-in.pod:30 +#: ../fish/virt-tar-out.pod:24 ../fuse/guestmount.pod:39 +#: ../resize/virt-resize.pod:27 ../sparsify/virt-sparsify.pod:75 +#: ../tools/virt-tar.pl:50 +msgid "EXAMPLES" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:413 +#: ../cat/virt-cat.pod:34 msgid "" -"Architecture limitations (eg. won't work for a PPC guest on an X86 host)." +"Display C file from inside the libvirt VM called C:" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:418 +#. type: verbatim +#: ../cat/virt-cat.pod:37 +#, no-wrap msgid "" -"For SELinux guests, you may need to enable SELinux and load policy first. " -"See L in this manpage." +" virt-cat -d mydomain /etc/fstab\n" +"\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:423 -msgid "" -"I It is not safe to run commands from untrusted, possibly " -"malicious guests. These commands may attempt to exploit your program by " -"sending unexpected output. They could also try to exploit the Linux kernel " -"or qemu provided by the libguestfs appliance. They could use the network " -"provided by the libguestfs appliance to bypass ordinary network partitions " -"and firewalls. They could use the elevated privileges or different SELinux " -"context of your program to their advantage." +#: ../cat/virt-cat.pod:39 +msgid "List syslog messages from a VM disk image file:" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:432 +#. type: verbatim +#: ../cat/virt-cat.pod:41 +#, no-wrap msgid "" -"A secure alternative is to use libguestfs to install a \"firstboot\" script " -"(a script which runs when the guest next boots normally), and to have this " -"script run the commands you want in the normal context of the running guest, " -"network security and so on. For information about other security issues, " -"see L." +" virt-cat -a disk.img /var/log/messages | tail\n" +"\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:440 -msgid "" -"The two main API calls to run commands are L and L (there are also variations)." +#: ../cat/virt-cat.pod:43 +msgid "Find out what DHCP IP address a VM acquired:" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:443 +#. type: verbatim +#: ../cat/virt-cat.pod:45 +#, no-wrap msgid "" -"The difference is that L runs commands using the shell, so any " -"shell globs, redirections, etc will work." +" virt-cat -d mydomain /var/log/messages | \\\n" +" grep 'dhclient: bound to' | tail\n" +"\n" msgstr "" -# type: =head2 -#. type: =head2 -#: ../src/guestfs.pod:446 -msgid "CONFIGURATION FILES" +#. type: textblock +#: ../cat/virt-cat.pod:48 +msgid "Find out what packages were recently installed:" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:448 +#. type: verbatim +#: ../cat/virt-cat.pod:50 +#, no-wrap msgid "" -"To read and write configuration files in Linux guest filesystems, we " -"strongly recommend using Augeas. For example, Augeas understands how to " -"read and write, say, a Linux shadow password file or X.org configuration " -"file, and so avoids you having to write that code." +" virt-cat -d mydomain /var/log/yum.log | tail\n" +"\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:453 +#: ../cat/virt-cat.pod:52 +msgid "Find out who is logged on inside a virtual machine:" +msgstr "" + +#. type: verbatim +#: ../cat/virt-cat.pod:54 +#, no-wrap msgid "" -"The main Augeas calls are bound through the C APIs. We don't " -"document Augeas itself here because there is excellent documentation on the " -"L website." +" virt-cat -d mydomain /var/run/utmp > /tmp/utmp\n" +" who /tmp/utmp\n" +"\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:457 -msgid "" -"If you don't want to use Augeas (you fool!) then try calling L to get the file as a list of lines which you can iterate " -"over." +#: ../cat/virt-cat.pod:57 +msgid "or who was logged on:" msgstr "" -# type: =head2 -#. type: =head2 -#: ../src/guestfs.pod:461 -msgid "SELINUX" +#. type: verbatim +#: ../cat/virt-cat.pod:59 +#, no-wrap +msgid "" +" virt-cat -d mydomain /var/log/wtmp > /tmp/wtmp\n" +" last -f /tmp/wtmp\n" +"\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:463 +#: ../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 msgid "" -"We support SELinux guests. To ensure that labeling happens correctly in " -"SELinux guests, you need to enable SELinux and load the guest's policy:" +"Add I which should be a disk image from a virtual machine. If the " +"virtual machine has multiple block devices, you must supply all of them with " +"separate I<-a> options." msgstr "" -# type: =item #. type: =item -#: ../src/guestfs.pod:469 ../src/guestfs.pod:1281 ../src/guestfs.pod:1412 -#: ../src/guestfs.pod:2185 -msgid "1." +#: ../cat/virt-cat.pod:98 ../cat/virt-filesystems.pod:148 +#: ../cat/virt-ls.pod:314 ../edit/virt-edit.pod:112 ../fish/guestfish.pod:217 +#: ../fuse/guestmount.pod:135 ../inspector/virt-inspector.pod:92 +msgid "B<--echo-keys>" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:471 -msgid "Before launching, do:" +#: ../cat/virt-cat.pod:100 +msgid "" +"When prompting for keys and passphrases, virt-cat normally turns echoing off " +"so you cannot see what you are typing. If you are not worried about Tempest " +"attacks and there is no one else in the room you can specify this flag to " +"see what you are typing." msgstr "" -# type: verbatim #. type: verbatim -#: ../src/guestfs.pod:473 +#: ../cat/virt-cat.pod:116 #, no-wrap msgid "" -" guestfs_set_selinux (g, 1);\n" +" virt-cat --format=raw -a disk.img file\n" "\n" msgstr "" -# type: =item -#. type: =item -#: ../src/guestfs.pod:475 ../src/guestfs.pod:1285 ../src/guestfs.pod:1416 -#: ../src/guestfs.pod:2210 -msgid "2." -msgstr "" - -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:477 -msgid "" -"After mounting the guest's filesystem(s), load the policy. This is best " -"done by running the L command in the guest itself:" -msgstr "" - -# type: verbatim #. type: verbatim -#: ../src/guestfs.pod:481 +#: ../cat/virt-cat.pod:120 #, no-wrap msgid "" -" guestfs_sh (g, \"/usr/sbin/load_policy\");\n" +" virt-cat --format=raw -a disk.img --format -a another.img file\n" "\n" msgstr "" -# type: textblock +#. type: =item +#: ../cat/virt-cat.pod:129 ../cat/virt-filesystems.pod:200 +#: ../cat/virt-ls.pod:361 ../edit/virt-edit.pod:156 ../fish/guestfish.pod:289 +#: ../fuse/guestmount.pod:172 ../inspector/virt-inspector.pod:114 +msgid "B<--keys-from-stdin>" +msgstr "" + #. type: textblock -#: ../src/guestfs.pod:483 +#: ../cat/virt-cat.pod:131 ../cat/virt-filesystems.pod:202 +#: ../cat/virt-ls.pod:363 ../edit/virt-edit.pod:158 ../fish/guestfish.pod:291 +#: ../fuse/guestmount.pod:174 ../inspector/virt-inspector.pod:116 msgid "" -"(Older versions of C require you to specify the name of the " -"policy file)." +"Read key or passphrase parameters from stdin. The default is to try to read " +"passphrases from the user by opening C." msgstr "" -# type: =item -#. type: =item -#: ../src/guestfs.pod:486 ../src/guestfs.pod:1422 -msgid "3." +#. type: =head1 +#: ../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 +msgid "OLD-STYLE COMMAND LINE ARGUMENTS" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:488 -msgid "" -"Optionally, set the security context for the API. The correct security " -"context to use can only be known by inspecting the guest. As an example:" +#: ../cat/virt-cat.pod:154 +msgid "Previous versions of virt-cat allowed you to write either:" msgstr "" -# type: verbatim #. type: verbatim -#: ../src/guestfs.pod:492 +#: ../cat/virt-cat.pod:156 #, no-wrap msgid "" -" guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n" +" virt-cat disk.img [disk.img ...] file\n" "\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:496 -msgid "This will work for running commands and editing existing files." +#: ../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 +msgid "or" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:498 -msgid "" -"When new files are created, you may need to label them explicitly, for " -"example by running the external command C." -msgstr "" - -# type: =head2 -#. type: =head2 -#: ../src/guestfs.pod:502 -msgid "UMASK" -msgstr "" - -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:504 -msgid "" -"Certain calls are affected by the current file mode creation mask (the " -"\"umask\"). In particular ones which create files or directories, such as " -"L, L or L. This affects " -"either the default mode that the file is created with or modifies the mode " -"that you supply." -msgstr "" - -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:510 +#. type: verbatim +#: ../cat/virt-cat.pod:160 +#, no-wrap msgid "" -"The default umask is C<022>, so files are created with modes such as C<0644> " -"and directories with C<0755>." +" virt-cat guestname file\n" +"\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:513 +#: ../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 msgid "" -"There are two ways to avoid being affected by umask. Either set umask to 0 " -"(call C early after launching). Or call L after creating each file or directory." +"whereas in this version you should use I<-a> or I<-d> respectively to avoid " +"the confusing case where a disk image might have the same name as a guest." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:517 -msgid "For more information about umask, see L." +#: ../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 +msgid "For compatibility the old style is still supported." msgstr "" -# type: =head1 #. type: =head1 -#: ../src/guestfs.pod:519 ../fish/guestfish.pod:751 -msgid "ENCRYPTED DISKS" +#: ../cat/virt-cat.pod:168 ../edit/virt-edit.pod:297 +msgid "USING GUESTFISH" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:521 +#: ../cat/virt-cat.pod:170 msgid "" -"Libguestfs allows you to access Linux guests which have been encrypted using " -"whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) " -"standard. This includes nearly all whole disk encryption systems used by " -"modern Linux guests." +"L is a more powerful, lower level tool which you can use when " +"C doesn't work." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:527 -msgid "" -"Use L to identify LUKS-encrypted block devices (it " -"returns the string C)." +#: ../cat/virt-cat.pod:173 +msgid "Using C is approximately equivalent to doing:" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:530 +#. type: verbatim +#: ../cat/virt-cat.pod:175 +#, no-wrap msgid "" -"Then open these devices by calling L. Obviously you " -"will require the passphrase!" +" guestfish --ro -i -d domname download file -\n" +"\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:533 +#: ../cat/virt-cat.pod:177 msgid "" -"Opening a LUKS device creates a new device mapper device called C (where C is the string you supply to L). Reads and writes to this mapper device are decrypted " -"from and encrypted to the underlying block device respectively." +"where C is the name of the libvirt guest, and C is the full " +"path to the file. Note the final C<-> (meaning \"output to stdout\")." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:539 +#: ../cat/virt-cat.pod:181 msgid "" -"LVM volume groups on the device can be made visible by calling L followed by L. The logical volume" -"(s) can now be mounted in the usual way." +"The command above uses libguestfs's guest inspection feature and so does not " +"work on guests that libguestfs cannot inspect, or on things like arbitrary " +"disk images that don't contain guests. To display a file from a disk image " +"directly, use:" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:543 +#. type: verbatim +#: ../cat/virt-cat.pod:186 +#, no-wrap msgid "" -"Use the reverse process to close a LUKS device. Unmount any logical volumes " -"on it, deactivate the volume groups by caling C. Then close the mapper device by calling L on the C device (I the " -"underlying encrypted block device)." -msgstr "" - -# type: =head2 -#. type: =head2 -#: ../src/guestfs.pod:550 -msgid "INSPECTION" +" guestfish --ro -a disk.img -m /dev/sda1 download file -\n" +"\n" msgstr "" #. type: textblock -#: ../src/guestfs.pod:552 +#: ../cat/virt-cat.pod:188 msgid "" -"Libguestfs has APIs for inspecting an unknown disk image to find out if it " -"contains operating systems, an install CD or a live CD. (These APIs used to " -"be in a separate Perl-only library called L but since " -"version 1.5.3 the most frequently used part of this library has been " -"rewritten in C and moved into the core code)." +"where C is the disk image, C is the filesystem within " +"the disk image, and C is the full path to the file." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:559 +#: ../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:314 ../inspector/virt-inspector.pod:377 +#: ../resize/virt-resize.pod:610 ../sparsify/virt-sparsify.pod:229 msgid "" -"Add all disks belonging to the unknown virtual machine and call L in the usual way." +"This program returns 0 if successful, or non-zero if there was an error." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:562 +#: ../cat/virt-cat.pod:205 msgid "" -"Then call L. This function uses other libguestfs calls " -"and certain heuristics, and returns a list of operating systems that were " -"found. An empty list means none were found. A single element is the root " -"filesystem of the operating system. For dual- or multi-boot guests, " -"multiple roots can be returned, each one corresponding to a separate " -"operating system. (Multi-boot virtual machines are extremely rare in the " -"world of virtualization, but since this scenario can happen, we have built " -"libguestfs to deal with it.)" +"L, L, L, L, L, L." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:571 -msgid "" -"For each root, you can then call various C functions " -"to get additional details about that operating system. For example, call L to return the string C or C for " -"Windows and Linux-based operating systems respectively." +#: ../cat/virt-cat.pod:218 ../inspector/virt-inspector.pod:405 +#: ../resize/virt-resize.pod:641 +msgid "Copyright (C) 2010-2011 Red Hat Inc." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:577 +#: ../cat/virt-filesystems.pod:5 msgid "" -"Un*x-like and Linux-based operating systems usually consist of several " -"filesystems which are mounted at boot time (for example, a separate boot " -"partition mounted on C). The inspection rules are able to detect how " -"filesystems correspond to mount points. Call " -"C to get this mapping. It might return a " -"hash table like this example:" +"virt-filesystems - List filesystems, partitions, block devices, LVM in a " +"virtual machine or disk image" msgstr "" -# type: verbatim #. type: verbatim -#: ../src/guestfs.pod:584 +#: ../cat/virt-filesystems.pod:9 #, no-wrap msgid "" -" /boot => /dev/sda1\n" -" / => /dev/vg_guest/lv_root\n" -" /usr => /dev/vg_guest/lv_usr\n" +" virt-filesystems [--options] -d domname\n" "\n" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:588 +#. type: verbatim +#: ../cat/virt-filesystems.pod:11 +#, no-wrap msgid "" -"The caller can then make calls to L to mount the " -"filesystems as suggested." +" virt-filesystems [--options] -a disk.img [-a disk.img ...]\n" +"\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:591 +#: ../cat/virt-filesystems.pod:15 msgid "" -"Be careful to mount filesystems in the right order (eg. C before C). Sorting the keys of the hash by length, shortest first, should work." +"This tool allows you to discover filesystems, partitions, logical volumes, " +"and their sizes in a disk image or virtual machine. It is a replacement for " +"L and L." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:595 +#: ../cat/virt-filesystems.pod:20 msgid "" -"Inspection currently only works for some common operating systems. " -"Contributors are welcome to send patches for other operating systems that we " -"currently cannot detect." +"One use for this tool is from shell scripts to iterate over all filesystems " +"from a disk image:" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:599 +#. type: verbatim +#: ../cat/virt-filesystems.pod:23 +#, no-wrap msgid "" -"Encrypted disks must be opened before inspection. See L " -"for more details. The L function just ignores any " -"encrypted devices." +" for fs in $(virt-filesystems -a disk.img); do\n" +" # ...\n" +" done\n" +"\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:603 +#: ../cat/virt-filesystems.pod:27 msgid "" -"A note on the implementation: The call L performs " -"inspection and caches the results in the guest handle. Subsequent calls to " -"C return this cached information, but I re-" -"read the disks. If you change the content of the guest disks, you can redo " -"inspection by calling L again. (L works a little differently from the other " -"calls and does read the disks. See documentation for that function for " -"details)." +"Another use is to list partitions before using another tool to modify those " +"partitions (such as L). If you are curious about what an " +"unknown disk image contains, use this tool along with L." msgstr "" -#. type: =head3 -#: ../src/guestfs.pod:612 -msgid "INSPECTING INSTALL DISKS" +#. type: textblock +#: ../cat/virt-filesystems.pod:32 +msgid "" +"Various command line options control what this program displays. You need " +"to give either I<-a> or I<-d> options to specify the disk image or libvirt " +"guest respectively. If you just specify that then the program shows " +"filesystems found, one per line, like this:" msgstr "" -#. type: textblock -#: ../src/guestfs.pod:614 +#. type: verbatim +#: ../cat/virt-filesystems.pod:37 +#, no-wrap msgid "" -"Libguestfs (since 1.9.4) can detect some install disks, install CDs, live " -"CDs and more." +" $ virt-filesystems -a disk.img\n" +" /dev/sda1\n" +" /dev/vg_guest/lv_root\n" +"\n" msgstr "" #. type: textblock -#: ../src/guestfs.pod:617 +#: ../cat/virt-filesystems.pod:41 msgid "" -"Call L to return the format of the operating " -"system, which currently can be C (a regular operating system) or " -"C (some sort of install disk)." +"If you add I<-l> or I<--long> then the output includes extra information:" msgstr "" -#. type: textblock -#: ../src/guestfs.pod:621 +#. type: verbatim +#: ../cat/virt-filesystems.pod:44 +#, no-wrap msgid "" -"Further information is available about the operating system that can be " -"installed using the regular inspection APIs like L, L etc." +" $ virt-filesystems -a disk.img -l\n" +" Name Type VFS Label Size\n" +" /dev/sda1 filesystem ext4 boot 524288000\n" +" /dev/vg_guest/lv_root filesystem ext4 root 10212081664\n" +"\n" msgstr "" #. type: textblock -#: ../src/guestfs.pod:626 +#: ../cat/virt-filesystems.pod:49 msgid "" -"Some additional information specific to installer disks is also available " -"from the L, L and L calls." +"If you add I<--extra> then non-mountable (swap, unknown) filesystems are " +"shown as well:" msgstr "" -# type: =head2 -#. type: =head2 -#: ../src/guestfs.pod:631 -msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS" +#. type: verbatim +#: ../cat/virt-filesystems.pod:52 +#, no-wrap +msgid "" +" $ virt-filesystems -a disk.img --extra\n" +" /dev/sda1\n" +" /dev/vg_guest/lv_root\n" +" /dev/vg_guest/lv_swap\n" +" /dev/vg_guest/lv_data\n" +"\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:633 +#: ../cat/virt-filesystems.pod:58 msgid "" -"Libguestfs can mount NTFS partitions. It does this using the L driver." +"If you add I<--partitions> then partitions are shown instead of filesystems:" msgstr "" -# type: =head3 -#. type: =head3 -#: ../src/guestfs.pod:636 -msgid "DRIVE LETTERS AND PATHS" +#. type: verbatim +#: ../cat/virt-filesystems.pod:60 +#, no-wrap +msgid "" +" $ virt-filesystems -a disk.img --partitions\n" +" /dev/sda1\n" +" /dev/sda2\n" +"\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:638 +#: ../cat/virt-filesystems.pod:64 msgid "" -"DOS and Windows still use drive letters, and the filesystems are always " -"treated as case insensitive by Windows itself, and therefore you might find " -"a Windows configuration file referring to a path like C. When the filesystem is mounted in libguestfs, that directory " -"might be referred to as C." +"Similarly you can use I<--logical-volumes>, I<--volume-groups>, I<--physical-" +"volumes>, I<--block-devices> to list those items." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:644 +#: ../cat/virt-filesystems.pod:67 msgid "" -"Drive letter mappings are outside the scope of libguestfs. You have to use " -"libguestfs to read the appropriate Windows Registry and configuration files, " -"to determine yourself how drives are mapped (see also L and L)." +"You can use these options in combination as well (if you want a combination " +"including filesystems, you have to add I<--filesystems>). Notice that some " +"items fall into several categories (eg. C might be both a " +"partition and a filesystem). These items are listed several times. To get " +"a list which includes absolutely everything that virt-filesystems knows " +"about, use the I<--all> option." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:649 +#: ../cat/virt-filesystems.pod:74 msgid "" -"Replacing backslash characters with forward slash characters is also outside " -"the scope of libguestfs, but something that you can easily do." +"UUIDs (because they are quite long) are not shown by default. Add the I<--" +"uuid> option to display device and filesystem UUIDs in the long output." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:652 +#: ../cat/virt-filesystems.pod:78 msgid "" -"Where we can help is in resolving the case insensitivity of paths. For " -"this, call L." +"I<--all --long --uuid> is a useful combination to display all possible " +"information about everything." msgstr "" -# type: =head3 -#. type: =head3 -#: ../src/guestfs.pod:655 -msgid "ACCESSING THE WINDOWS REGISTRY" +#. type: verbatim +#: ../cat/virt-filesystems.pod:81 +#, no-wrap +msgid "" +" $ virt-filesystems -a win.img --all --long --uuid -h\n" +" Name Type VFS Label Size Parent UUID\n" +" /dev/sda1 filesystem ntfs System Reserved 100M - F81C92571C92112C\n" +" /dev/sda2 filesystem ntfs - 20G - F2E8996AE8992E3B\n" +" /dev/sda1 partition - - 100M /dev/sda -\n" +" /dev/sda2 partition - - 20G /dev/sda -\n" +" /dev/sda device - - 20G - -\n" +"\n" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:657 +#: ../cat/virt-filesystems.pod:89 msgid "" -"Libguestfs also provides some help for decoding Windows Registry \"hive\" " -"files, through the library C which is part of the libguestfs project " -"although ships as a separate tarball. You have to locate and download the " -"hive file(s) yourself, and then pass them to C functions. See also " -"the programs L, L, L and L for more help on this issue." +"For machine-readable output, use I<--csv> to get Comma-Separated Values." msgstr "" -# type: =head3 -#. type: =head3 -#: ../src/guestfs.pod:665 -msgid "SYMLINKS ON NTFS-3G FILESYSTEMS" +#. type: =item +#: ../cat/virt-filesystems.pod:110 ../tools/virt-list-filesystems.pl:121 +msgid "B<--all>" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:667 +#: ../cat/virt-filesystems.pod:112 msgid "" -"Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to " -"provide something which looks like a Linux symlink. The way it tries to do " -"the rewriting is described here:" +"Display everything. This is currently the same as specifying these options: " +"I<--filesystems>, I<--extra>, I<--partitions>, I<--block-devices>, I<--" +"logical-volumes>, I<--volume-groups>, I<--physical-volumes>. (More may be " +"added to this list in future)." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:671 -msgid "" -"L" +#: ../cat/virt-filesystems.pod:117 +msgid "See also I<--long>." msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:673 -msgid "" -"The essential problem is that ntfs-3g simply does not have enough " -"information to do a correct job. NTFS links can contain drive letters and " -"references to external device GUIDs that ntfs-3g has no way of resolving. " -"It is almost certainly the case that libguestfs callers should ignore what " -"ntfs-3g does (ie. don't use L on NTFS volumes)." +#. type: =item +#: ../cat/virt-filesystems.pod:119 +msgid "B<--blkdevs>" +msgstr "" + +#. type: =item +#: ../cat/virt-filesystems.pod:121 +msgid "B<--block-devices>" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:680 -msgid "" -"Instead if you encounter a symbolic link on an ntfs-3g filesystem, use L to read the C extended " -"attribute, and read the raw reparse data from that (you can find the format " -"documented in various places around the web)." +#: ../cat/virt-filesystems.pod:123 +msgid "Display block devices." msgstr "" -# type: =head3 -#. type: =head3 -#: ../src/guestfs.pod:685 -msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS" +#. type: =item +#: ../cat/virt-filesystems.pod:135 ../cat/virt-ls.pod:301 ../df/virt-df.pod:88 +msgid "B<--csv>" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:687 +#: ../cat/virt-filesystems.pod:137 ../cat/virt-ls.pod:303 ../df/virt-df.pod:90 msgid "" -"There are other useful extended attributes that can be read from ntfs-3g " -"filesystems (using L). See:" +"Write out the results in CSV format (comma-separated values). This format " +"can be imported easily into databases and spreadsheets, but read L below." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:690 +#: ../cat/virt-filesystems.pod:150 msgid "" -"L" +"When prompting for keys and passphrases, virt-filesystems normally turns " +"echoing off so you cannot see what you are typing. If you are not worried " +"about Tempest attacks and there is no one else in the room you can specify " +"this flag to see what you are typing." msgstr "" -# type: =head2 -#. type: =head2 -#: ../src/guestfs.pod:692 -msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES" +#. type: =item +#: ../cat/virt-filesystems.pod:155 +msgid "B<--extra>" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:694 +#: ../cat/virt-filesystems.pod:157 msgid "" -"Although we don't want to discourage you from using the C API, we will " -"mention here that the same API is also available in other languages." +"This causes filesystems that are not ordinary, mountable filesystems to be " +"displayed. This category includes swapspace, and filesystems that are empty " +"or contain unknown data." msgstr "" #. type: textblock -#: ../src/guestfs.pod:697 -msgid "" -"The API is broadly identical in all supported languages. This means that " -"the C call C is C<$g-Eadd_drive_ro($file)> " -"in Perl, C in Python, and C in " -"OCaml. In other words, a straightforward, predictable isomorphism between " -"each language." +#: ../cat/virt-filesystems.pod:161 +msgid "This option implies I<--filesystems>." msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:703 -msgid "" -"Error messages are automatically transformed into exceptions if the language " -"supports it." +#. type: =item +#: ../cat/virt-filesystems.pod:163 +msgid "B<--filesystems>" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:706 +#: ../cat/virt-filesystems.pod:165 msgid "" -"We don't try to \"object orientify\" parts of the API in OO languages, " -"although contributors are welcome to write higher level APIs above what we " -"provide in their favourite languages if they wish." +"Display mountable filesystems. If no display option was selected then this " +"option is implied." msgstr "" -# type: =item -#. type: =item -#: ../src/guestfs.pod:712 -msgid "B" +#. type: textblock +#: ../cat/virt-filesystems.pod:168 +msgid "With I<--extra>, non-mountable filesystems are shown too." msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:714 +#. type: verbatim +#: ../cat/virt-filesystems.pod:181 +#, no-wrap msgid "" -"You can use the I header file from C++ programs. The C++ API is " -"identical to the C API. C++ classes and exceptions are not used." +" virt-filesystems --format=raw -a disk.img\n" +"\n" +msgstr "" + +#. type: verbatim +#: ../cat/virt-filesystems.pod:185 +#, no-wrap +msgid "" +" virt-filesystems --format=raw -a disk.img --format -a another.img\n" +"\n" msgstr "" -# type: =item #. type: =item -#: ../src/guestfs.pod:718 -msgid "B" +#: ../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 +msgid "B<-h>" +msgstr "" + +#. type: =item +#: ../cat/virt-filesystems.pod:196 ../cat/virt-ls.pod:354 +#: ../df/virt-df.pod:127 ../tools/virt-list-partitions.pl:111 +msgid "B<--human-readable>" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:720 -msgid "" -"The C# bindings are highly experimental. Please read the warnings at the " -"top of C." +#: ../cat/virt-filesystems.pod:198 +msgid "In I<--long> mode, display sizes in human-readable format." msgstr "" -# type: =item #. type: =item -#: ../src/guestfs.pod:723 -msgid "B" +#: ../cat/virt-filesystems.pod:205 ../cat/virt-ls.pod:366 +#: ../tools/virt-list-filesystems.pl:108 ../tools/virt-list-partitions.pl:119 +msgid "B<-l>" +msgstr "" + +#. type: =item +#: ../cat/virt-filesystems.pod:207 ../cat/virt-ls.pod:368 +#: ../tools/virt-list-filesystems.pl:110 ../tools/virt-list-partitions.pl:121 +msgid "B<--long>" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:725 -msgid "" -"This is the only language binding that is working but incomplete. Only " -"calls which return simple integers have been bound in Haskell, and we are " -"looking for help to complete this binding." +#: ../cat/virt-filesystems.pod:209 +msgid "Display extra columns of data (\"long format\")." msgstr "" -# type: =item -#. type: =item -#: ../src/guestfs.pod:729 -msgid "B" +#. type: textblock +#: ../cat/virt-filesystems.pod:211 +msgid "A title row is added unless you also specify I<--no-title>." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:731 +#: ../cat/virt-filesystems.pod:213 msgid "" -"Full documentation is contained in the Javadoc which is distributed with " -"libguestfs." +"The extra columns displayed depend on what output you select, and the " +"ordering of columns may change in future versions. Use the title row, I<--" +"csv> output and/or L to match columns to data in external " +"programs." msgstr "" -# type: =item -#. type: =item -#: ../src/guestfs.pod:734 -msgid "B" +#. type: textblock +#: ../cat/virt-filesystems.pod:218 +msgid "" +"Use I<-h> if you want sizes to be displayed in human-readable format. The " +"default is to show raw numbers of I." msgstr "" #. type: textblock -#: ../src/guestfs.pod:736 -msgid "See L." +#: ../cat/virt-filesystems.pod:221 +msgid "Use I<--uuid> to display UUIDs too." msgstr "" -# type: =item #. type: =item -#: ../src/guestfs.pod:738 -msgid "B" +#: ../cat/virt-filesystems.pod:223 +msgid "B<--lvs>" msgstr "" -#. type: textblock -#: ../src/guestfs.pod:740 -msgid "See L and L." +#. type: =item +#: ../cat/virt-filesystems.pod:225 +msgid "B<--logvols>" msgstr "" -# type: =item #. type: =item -#: ../src/guestfs.pod:742 -msgid "B" +#: ../cat/virt-filesystems.pod:227 +msgid "B<--logical-volumes>" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:744 +#: ../cat/virt-filesystems.pod:229 msgid "" -"For documentation see C supplied with libguestfs sources or in " -"the php-libguestfs package for your distribution." +"Display LVM logical volumes. In this mode, these are displayed irrespective " +"of whether the LVs contain filesystems." msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:747 -msgid "The PHP binding only works correctly on 64 bit machines." +#. type: =item +#: ../cat/virt-filesystems.pod:232 +msgid "B<--no-title>" msgstr "" -# type: =item -#. type: =item -#: ../src/guestfs.pod:749 -msgid "B" +#. type: textblock +#: ../cat/virt-filesystems.pod:234 +msgid "In I<--long> mode, don't add a title row." msgstr "" #. type: textblock -#: ../src/guestfs.pod:751 -msgid "See L." +#: ../cat/virt-filesystems.pod:236 +msgid "" +"Note that the order of the columns is not fixed, and may change in future " +"versions of virt-filesystems, so using this option may give you unexpected " +"surprises." msgstr "" -# type: =item #. type: =item -#: ../src/guestfs.pod:753 -msgid "B" +#: ../cat/virt-filesystems.pod:240 +msgid "B<--parts>" +msgstr "" + +#. type: =item +#: ../cat/virt-filesystems.pod:242 +msgid "B<--partitions>" msgstr "" #. type: textblock -#: ../src/guestfs.pod:755 -msgid "See L." +#: ../cat/virt-filesystems.pod:244 +msgid "" +"Display partitions. In this mode, these are displayed irrespective of " +"whether the partitions contain filesystems." msgstr "" -# type: =item #. type: =item -#: ../src/guestfs.pod:757 -msgid "B" +#: ../cat/virt-filesystems.pod:247 +msgid "B<--pvs>" msgstr "" -#. type: textblock -#: ../src/guestfs.pod:759 -msgid "See L." +#. type: =item +#: ../cat/virt-filesystems.pod:249 +msgid "B<--physvols>" msgstr "" -# type: =head2 -#. type: =head2 -#: ../src/guestfs.pod:763 -msgid "LIBGUESTFS GOTCHAS" +#. type: =item +#: ../cat/virt-filesystems.pod:251 +msgid "B<--physical-volumes>" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:765 -msgid "" -"L: \"A feature of a " -"system [...] that works in the way it is documented but is counterintuitive " -"and almost invites mistakes.\"" +#: ../cat/virt-filesystems.pod:253 +msgid "Display LVM physical volumes." msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:769 -msgid "" -"Since we developed libguestfs and the associated tools, there are several " -"things we would have designed differently, but are now stuck with for " -"backwards compatibility or other reasons. If there is ever a libguestfs 2.0 " -"release, you can expect these to change. Beware of them." +#. type: =item +#: ../cat/virt-filesystems.pod:255 ../df/virt-df.pod:163 +msgid "B<--uuid>" msgstr "" -# type: =item #. type: =item -#: ../src/guestfs.pod:777 -msgid "Autosync / forgetting to sync." +#: ../cat/virt-filesystems.pod:257 +msgid "B<--uuids>" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:779 -msgid "" -"When modifying a filesystem from C or another language, you B unmount " -"all filesystems and call L explicitly before you close the " -"libguestfs handle. You can also call:" +#: ../cat/virt-filesystems.pod:259 +msgid "In I<--long> mode, display UUIDs as well." msgstr "" -# type: verbatim -#. type: verbatim -#: ../src/guestfs.pod:783 -#, no-wrap -msgid "" -" guestfs_set_autosync (g, 1);\n" -"\n" +#. type: =item +#: ../cat/virt-filesystems.pod:273 +msgid "B<--vgs>" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:785 -msgid "" -"to have the unmount/sync done automatically for you when the handle 'g' is " -"closed. (This feature is called \"autosync\", L q.v.)" +#. type: =item +#: ../cat/virt-filesystems.pod:275 +msgid "B<--volgroups>" msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:789 -msgid "" -"If you forget to do this, then it is entirely possible that your changes " -"won't be written out, or will be partially written, or (very rarely) that " -"you'll get disk corruption." +#. type: =item +#: ../cat/virt-filesystems.pod:277 +msgid "B<--volume-groups>" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:793 -msgid "" -"Note that in L autosync is the default. So quick and dirty " -"guestfish scripts that forget to sync will work just fine, which can make " -"this very puzzling if you are trying to debug a problem." +#: ../cat/virt-filesystems.pod:279 +msgid "Display LVM volume groups." +msgstr "" + +#. type: =head1 +#: ../cat/virt-filesystems.pod:287 +msgid "COLUMNS" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:797 +#: ../cat/virt-filesystems.pod:289 msgid "" -"Update: Autosync is enabled by default for all API users starting from " -"libguestfs 1.5.24." +"Note that columns in the output are subject to reordering and change in " +"future versions of this tool." msgstr "" -# type: =item #. type: =item -#: ../src/guestfs.pod:800 -msgid "Mount option C<-o sync> should not be the default." +#: ../cat/virt-filesystems.pod:294 +msgid "B" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:802 +#: ../cat/virt-filesystems.pod:296 +msgid "The filesystem, partition, block device or LVM name." +msgstr "" + +#. type: textblock +#: ../cat/virt-filesystems.pod:298 msgid "" -"If you use L, then C<-o sync,noatime> are added implicitly. " -"However C<-o sync> does not add any reliability benefit, but does have a " -"very large performance impact." +"For device and partition names these are displayed as canonical libguestfs " +"names, so that for example C is the second partition on the first " +"device." msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:806 +#: ../cat/virt-filesystems.pod:302 msgid "" -"The work around is to use L and set the mount " -"options that you actually want to use." +"If the I<--long> option is B specified, then only the name column is " +"shown in the output." msgstr "" -# type: =item #. type: =item -#: ../src/guestfs.pod:809 -msgid "Read-only should be the default." +#: ../cat/virt-filesystems.pod:305 +msgid "B" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:811 -msgid "" -"In L, I<--ro> should be the default, and you should have to " -"specify I<--rw> if you want to make changes to the image." +#: ../cat/virt-filesystems.pod:307 +msgid "The object type, for example C, C, C etc." msgstr "" -# type: textblock -#. type: textblock -#: ../src/guestfs.pod:814 -msgid "This would reduce the potential to corrupt live VM images." +#. type: =item +#: ../cat/virt-filesystems.pod:309 +msgid "B" msgstr "" -# type: textblock #. type: textblock -#: ../src/guestfs.pod:816 +#: ../cat/virt-filesystems.pod:311 msgid "" -"Note that many filesystems change the disk when you just mount and unmount, " -"even if you didn't perform any writes. You need to use L to guarantee that the disk is not changed." +"If there is a filesystem, then this column displays the filesystem type if " +"one could be detected, eg. C." msgstr "" -# type: =item #. type: =item -#: ../src/guestfs.pod:820 -msgid "guestfish command line is hard to use." +#: ../cat/virt-filesystems.pod:314 +msgid "B