1 # SOME DESCRIPTIVE TITLE.
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
10 "POT-Creation-Date: 2011-09-16 16:37+0200\n"
11 "PO-Revision-Date: 2010-09-02 14:46+0100\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
21 #: ../src/guestfs.pod:3 ../fish/guestfish.pod:3
22 #: ../test-tool/libguestfs-test-tool.pod:3 ../fuse/guestmount.pod:3
23 #: ../tools/virt-edit.pl:32 ../tools/virt-win-reg.pl:35
24 #: ../tools/virt-resize.pl:40 ../tools/virt-list-filesystems.pl:30
25 #: ../tools/virt-tar.pl:31 ../tools/virt-make-fs.pl:35
26 #: ../tools/virt-list-partitions.pl:30
32 #: ../src/guestfs.pod:5
33 msgid "guestfs - Library for accessing and modifying virtual machine images"
38 #: ../src/guestfs.pod:7 ../fish/guestfish.pod:7
39 #: ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7
40 #: ../tools/virt-edit.pl:36 ../tools/virt-win-reg.pl:39
41 #: ../tools/virt-resize.pl:44 ../tools/virt-list-filesystems.pl:34
42 #: ../tools/virt-tar.pl:35 ../tools/virt-make-fs.pl:39
43 #: ../tools/virt-list-partitions.pl:34
49 #: ../src/guestfs.pod:9
52 " #include <guestfs.h>\n"
58 #: ../src/guestfs.pod:11
61 " guestfs_h *g = guestfs_create ();\n"
62 " guestfs_add_drive (g, \"guest.img\");\n"
63 " guestfs_launch (g);\n"
64 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
65 " guestfs_touch (g, \"/hello\");\n"
66 " guestfs_umount (g, \"/\");\n"
67 " guestfs_close (g);\n"
73 #: ../src/guestfs.pod:19
76 " cc prog.c -o prog -lguestfs\n"
78 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
84 #: ../src/guestfs.pod:23 ../fish/guestfish.pod:30
85 #: ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:20
86 #: ../tools/virt-edit.pl:50 ../tools/virt-win-reg.pl:63
87 #: ../tools/virt-resize.pl:50 ../tools/virt-list-filesystems.pl:40
88 #: ../tools/virt-tar.pl:72 ../tools/virt-make-fs.pl:47
89 #: ../tools/virt-list-partitions.pl:40
95 #: ../src/guestfs.pod:25
97 "Libguestfs is a library for accessing and modifying guest disk images. "
98 "Amongst the things this is good for: making batch configuration changes to "
99 "guests, getting disk used/free statistics (see also: virt-df), migrating "
100 "between virtualization systems (see also: virt-p2v), performing partial "
101 "backups, performing partial guest clones, cloning guests and changing "
102 "registry/UUID/hostname info, and much else besides."
107 #: ../src/guestfs.pod:33
109 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
110 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
111 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
117 #: ../src/guestfs.pod:38
119 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
120 "what filesystem is in each LV, etc.). It can also run commands in the "
121 "context of the guest. Also you can access filesystems over FUSE."
126 #: ../src/guestfs.pod:43
128 "Libguestfs is a library that can be linked with C and C++ management "
129 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
130 "PHP, Haskell or C#). You can also use it from shell scripts or the command "
136 #: ../src/guestfs.pod:48
138 "You don't need to be root to use libguestfs, although obviously you do need "
139 "enough permissions to access the disk images."
144 #: ../src/guestfs.pod:51
146 "Libguestfs is a large API because it can do many things. For a gentle "
147 "introduction, please read the L</API OVERVIEW> section next."
152 #: ../src/guestfs.pod:54
154 "There are also some example programs in the L<guestfs-examples(3)> manual "
160 #: ../src/guestfs.pod:57
166 #: ../src/guestfs.pod:59
168 "This section provides a gentler overview of the libguestfs API. We also try "
169 "to group API calls together, where that may not be obvious from reading "
170 "about the individual calls in the main section of this manual."
175 #: ../src/guestfs.pod:64
181 #: ../src/guestfs.pod:66
183 "Before you can use libguestfs calls, you have to create a handle. Then you "
184 "must add at least one disk image to the handle, followed by launching the "
185 "handle, then performing whatever operations you want, and finally closing "
186 "the handle. By convention we use the single letter C<g> for the name of the "
187 "handle variable, although of course you can use any name you want."
192 #: ../src/guestfs.pod:73
193 msgid "The general structure of all libguestfs-using programs looks like this:"
198 #: ../src/guestfs.pod:76
201 " guestfs_h *g = guestfs_create ();\n"
207 #: ../src/guestfs.pod:78
210 " /* Call guestfs_add_drive additional times if there are\n"
211 " * multiple disk images.\n"
213 " guestfs_add_drive (g, \"guest.img\");\n"
219 #: ../src/guestfs.pod:83
222 " /* Most manipulation calls won't work until you've launched\n"
223 " * the handle 'g'. You have to do this _after_ adding drives\n"
224 " * and _before_ other commands.\n"
226 " guestfs_launch (g);\n"
232 #: ../src/guestfs.pod:89
235 " /* Now you can examine what partitions, LVs etc are available.\n"
237 " char **partitions = guestfs_list_partitions (g);\n"
238 " char **logvols = guestfs_lvs (g);\n"
244 #: ../src/guestfs.pod:94
247 " /* To access a filesystem in the image, you must mount it.\n"
249 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
254 #: ../src/guestfs.pod:98
257 " /* Now you can perform filesystem actions on the guest\n"
260 " guestfs_touch (g, \"/hello\");\n"
266 #: ../src/guestfs.pod:103
269 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
270 " * it is done automatically when you close the handle. See\n"
271 " * discussion of autosync in this page.\n"
273 " guestfs_sync (g);\n"
279 #: ../src/guestfs.pod:109
282 " /* Close the handle 'g'. */\n"
283 " guestfs_close (g);\n"
289 #: ../src/guestfs.pod:112
291 "The code above doesn't include any error checking. In real code you should "
292 "check return values carefully for errors. In general all functions that "
293 "return integers return C<-1> on error, and all functions that return "
294 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
295 "how to handle errors, and consult the documentation for each function call "
296 "below to see precisely how they return error indications. See L<guestfs-"
297 "examples(3)> for fully worked examples."
302 #: ../src/guestfs.pod:121
308 #: ../src/guestfs.pod:123
310 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
311 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
312 "actual block device, or simply an empty file of zeroes that you have created "
313 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
319 #: ../src/guestfs.pod:129
321 "The call you should use in modern code for adding drives is L</"
322 "guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
323 "specifying that the format is raw, do:"
328 #: ../src/guestfs.pod:133
331 " guestfs_add_drive_opts (g, filename,\n"
332 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
339 #: ../src/guestfs.pod:137
340 msgid "You can add a disk read-only using:"
345 #: ../src/guestfs.pod:139
348 " guestfs_add_drive_opts (g, filename,\n"
349 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
350 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
357 #: ../src/guestfs.pod:144
359 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
360 "libguestfs won't modify the file."
365 #: ../src/guestfs.pod:147
367 "Be extremely cautious if the disk image is in use, eg. if it is being used "
368 "by a virtual machine. Adding it read-write will almost certainly cause disk "
369 "corruption, but adding it read-only is safe."
374 #: ../src/guestfs.pod:151
376 "You must add at least one disk image, and you may add multiple disk images. "
377 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
378 "first one you added), C</dev/sdb> (for the second one you added), etc."
383 #: ../src/guestfs.pod:156
385 "Once L</guestfs_launch> has been called you cannot add any more images. You "
386 "can call L</guestfs_list_devices> to get a list of the device names, in the "
387 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
392 #: ../src/guestfs.pod:161
397 #: ../src/guestfs.pod:163
399 "Before you can read or write files, create directories and so on in a disk "
400 "image that contains filesystems, you have to mount those filesystems using "
401 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
402 "a disk image contains (for example) one partition with a filesystem on that "
403 "partition, then you can mount it directly:"
407 #: ../src/guestfs.pod:170
410 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
415 #: ../src/guestfs.pod:172
417 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
418 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
419 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
420 "that these are libguestfs virtual devices, and are nothing to do with host "
425 #: ../src/guestfs.pod:178
427 "If you are given a disk image and you don't know what it contains then you "
428 "have to find out. Libguestfs can do that too: use L</"
429 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
430 "LVs, and either try mounting each to see what is mountable, or else examine "
431 "them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
432 "filesystems, use L</guestfs_list_filesystems>."
436 #: ../src/guestfs.pod:186
438 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
439 "L</INSPECTION> below). But you might find it easier to look at higher level "
440 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
444 #: ../src/guestfs.pod:191
446 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
447 "several other variations of the C<guestfs_mount_*> call."
452 #: ../src/guestfs.pod:194
453 msgid "FILESYSTEM ACCESS AND MODIFICATION"
458 #: ../src/guestfs.pod:196
460 "The majority of the libguestfs API consists of fairly low-level calls for "
461 "accessing and modifying the files, directories, symlinks etc on mounted "
462 "filesystems. There are over a hundred such calls which you can find listed "
463 "in detail below in this man page, and we don't even pretend to cover them "
464 "all in this overview."
469 #: ../src/guestfs.pod:202
471 "Specify filenames as full paths, starting with C<\"/\"> and including the "
477 #: ../src/guestfs.pod:205
479 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
480 "the file called C<\"etc/passwd\"> then you could do:"
485 #: ../src/guestfs.pod:208
488 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
494 #: ../src/guestfs.pod:210
496 "This would return C<data> as a newly allocated buffer containing the full "
497 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
498 "or C<NULL> if there was an error."
503 #: ../src/guestfs.pod:214
505 "As another example, to create a top-level directory on that filesystem "
506 "called C<\"var\"> you would do:"
511 #: ../src/guestfs.pod:217
514 " guestfs_mkdir (g, \"/var\");\n"
520 #: ../src/guestfs.pod:219
521 msgid "To create a symlink you could do:"
526 #: ../src/guestfs.pod:221
529 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
530 " \"/etc/rc3.d/S30portmap\");\n"
536 #: ../src/guestfs.pod:224
538 "Libguestfs will reject attempts to use relative paths and there is no "
539 "concept of a current working directory."
544 #: ../src/guestfs.pod:227
546 "Libguestfs can return errors in many situations: for example if the "
547 "filesystem isn't writable, or if a file or directory that you requested "
548 "doesn't exist. If you are using the C API (documented here) you have to "
549 "check for those error conditions after each call. (Other language bindings "
550 "turn these errors into exceptions)."
555 #: ../src/guestfs.pod:233
557 "File writes are affected by the per-handle umask, set by calling L</"
558 "guestfs_umask> and defaulting to 022. See L</UMASK>."
563 #: ../src/guestfs.pod:236
569 #: ../src/guestfs.pod:238
571 "Libguestfs contains API calls to read, create and modify partition tables on "
577 #: ../src/guestfs.pod:241
579 "In the common case where you want to create a single partition covering the "
580 "whole disk, you should use the L</guestfs_part_disk> call:"
585 #: ../src/guestfs.pod:245
588 " const char *parttype = \"mbr\";\n"
589 " if (disk_is_larger_than_2TB)\n"
590 " parttype = \"gpt\";\n"
591 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
597 #: ../src/guestfs.pod:250
599 "Obviously this effectively wipes anything that was on that disk image before."
604 #: ../src/guestfs.pod:253
610 #: ../src/guestfs.pod:255
612 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
613 "guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense unless "
614 "you familiarize yourself with the concepts of physical volumes, volume "
615 "groups and logical volumes."
620 #: ../src/guestfs.pod:260
622 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
623 "tldp.org/HOWTO/LVM-HOWTO/>."
628 #: ../src/guestfs.pod:263
633 #: ../src/guestfs.pod:265
635 "Use L</guestfs_cat> to download small, text only files. This call is "
636 "limited to files which are less than 2 MB and which cannot contain any ASCII "
637 "NUL (C<\\0>) characters. However the API is very simple to use."
642 #: ../src/guestfs.pod:269
644 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
645 "bit data, since it returns a (pointer, size) pair. However it is still "
646 "limited to \"small\" files, less than 2 MB."
651 #: ../src/guestfs.pod:273
653 "L</guestfs_download> can be used to download any file, with no limits on "
654 "content or size (even files larger than 4 GB)."
659 #: ../src/guestfs.pod:276
661 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
666 #: ../src/guestfs.pod:279
672 #: ../src/guestfs.pod:281
674 "It's often the case that you want to write a file or files to the disk image."
679 #: ../src/guestfs.pod:284
681 "To write a small file with fixed content, use L</guestfs_write>. To create "
682 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
683 "guestfs_fallocate64> (with all disk blocks allocated). There are a variety "
684 "of other functions for creating test files, for example L</guestfs_fill> and "
685 "L</guestfs_fill_pattern>."
690 #: ../src/guestfs.pod:290
692 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
693 "file content or size (even files larger than 4 GB)."
698 #: ../src/guestfs.pod:293
700 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
705 #: ../src/guestfs.pod:295
707 "However the fastest way to upload I<large numbers of arbitrary files> is to "
708 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
709 ">), then attach this using L</guestfs_add_drive_ro>. If you add the drive "
710 "in a predictable way (eg. adding it last after all other drives) then you "
711 "can get the device name from L</guestfs_list_devices> and mount it directly "
712 "using L</guestfs_mount_ro>. Note that squashfs images are sometimes non-"
713 "portable between kernel versions, and they don't support labels or UUIDs. "
714 "If you want to pre-build an image or you need to mount it using a label or "
715 "UUID, use an ISO image instead."
720 #: ../src/guestfs.pod:306
726 #: ../src/guestfs.pod:308
728 "There are various different commands for copying between files and devices "
729 "and in and out of the guest filesystem. These are summarised in the table "
735 #: ../src/guestfs.pod:314
736 msgid "B<file> to B<file>"
741 #: ../src/guestfs.pod:316
743 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
744 "directories recursively."
749 #: ../src/guestfs.pod:319
750 msgid "B<file or device> to B<file or device>"
755 #: ../src/guestfs.pod:321
757 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
758 "devices in the guest."
763 #: ../src/guestfs.pod:324
764 msgid "Example: duplicate the contents of an LV:"
769 #: ../src/guestfs.pod:326
772 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
778 #: ../src/guestfs.pod:328
780 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
781 "(C</dev/VG/Original>). To copy less than the whole source device, use L</"
782 "guestfs_copy_size>."
787 #: ../src/guestfs.pod:332
788 msgid "B<file on the host> to B<file or device>"
793 #: ../src/guestfs.pod:334
794 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
799 #: ../src/guestfs.pod:336
800 msgid "B<file or device> to B<file on the host>"
805 #: ../src/guestfs.pod:338
806 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
811 #: ../src/guestfs.pod:342
812 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
817 #: ../src/guestfs.pod:344
819 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, L</"
820 "guestfs_tar_out> etc appear to only take filenames as arguments, so it "
821 "appears you can only upload and download to files. However many Un*x-like "
822 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, C</"
823 "dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, stderr, "
824 "and arbitrary file descriptor N."
829 #: ../src/guestfs.pod:352
830 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
834 #: ../src/guestfs.pod:355
837 " guestfs_download (g, filename, \"/dev/stdout\");\n"
843 #: ../src/guestfs.pod:357
844 msgid "and you can write tar output to a pipe C<fd> by doing:"
848 #: ../src/guestfs.pod:359
852 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
853 " guestfs_tar_out (g, \"/\", devfd);\n"
859 #: ../src/guestfs.pod:363
860 msgid "LISTING FILES"
865 #: ../src/guestfs.pod:365
867 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
868 "L<guestfish(1)>-equivalent command C<ll>)."
873 #: ../src/guestfs.pod:368
875 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
876 "programs, as a flat list of strings."
881 #: ../src/guestfs.pod:371
883 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
884 "directory, plus additional information about each one. It is more "
885 "equivalent to using the L<readdir(3)> call on a local filesystem."
890 #: ../src/guestfs.pod:375
892 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
897 #: ../src/guestfs.pod:378
898 msgid "RUNNING COMMANDS"
903 #: ../src/guestfs.pod:380
905 "Although libguestfs is primarily an API for manipulating files inside guest "
906 "images, we also provide some limited facilities for running commands inside "
912 #: ../src/guestfs.pod:384
913 msgid "There are many limitations to this:"
918 #: ../src/guestfs.pod:388 ../src/guestfs.pod:393 ../src/guestfs.pod:398
919 #: ../src/guestfs.pod:402 ../src/guestfs.pod:407 ../src/guestfs.pod:411
920 #: ../src/guestfs.pod:416 ../src/guestfs.pod:421 ../src/guestfs.pod:1011
921 #: ../src/guestfs.pod:1015 ../src/guestfs.pod:1019 ../src/guestfs.pod:1024
922 #: ../src/guestfs.pod:1032 ../src/guestfs.pod:1051 ../src/guestfs.pod:1059
923 #: ../src/guestfs.pod:1081 ../src/guestfs.pod:1085 ../src/guestfs.pod:1089
924 #: ../src/guestfs.pod:1093 ../src/guestfs.pod:1097 ../src/guestfs.pod:1101
925 #: ../src/guestfs.pod:1583 ../src/guestfs.pod:1588 ../src/guestfs.pod:1592
926 #: ../src/guestfs.pod:1702 ../src/guestfs.pod:1707 ../src/guestfs.pod:1711
927 #: ../src/guestfs.pod:2064 ../src/guestfs.pod:2070 ../src/guestfs.pod:2075
928 #: ../src/guestfs.pod:2081 ../src/guestfs.pod:2540 ../src/guestfs.pod:2544
929 #: ../src/guestfs.pod:2548 ../src/guestfs.pod:2552
930 #: ../src/guestfs-actions.pod:15 ../src/guestfs-actions.pod:22
931 #: ../src/guestfs-actions.pod:574 ../src/guestfs-actions.pod:582
932 #: ../src/guestfs-actions.pod:589 ../src/guestfs-actions.pod:596
933 #: ../src/guestfs-actions.pod:1589 ../src/guestfs-actions.pod:1593
934 #: ../src/guestfs-actions.pod:1597 ../src/guestfs-actions.pod:1601
935 #: ../src/guestfs-actions.pod:1609 ../src/guestfs-actions.pod:1613
936 #: ../src/guestfs-actions.pod:1617 ../src/guestfs-actions.pod:1627
937 #: ../src/guestfs-actions.pod:1631 ../src/guestfs-actions.pod:1635
938 #: ../src/guestfs-actions.pod:1773 ../src/guestfs-actions.pod:1777
939 #: ../src/guestfs-actions.pod:1782 ../src/guestfs-actions.pod:1787
940 #: ../src/guestfs-actions.pod:1848 ../src/guestfs-actions.pod:1852
941 #: ../src/guestfs-actions.pod:1857 ../src/guestfs-actions.pod:2238
942 #: ../src/guestfs-actions.pod:2245 ../src/guestfs-actions.pod:2252
943 #: ../fish/guestfish.pod:427 ../fish/guestfish.pod:431
944 #: ../fish/guestfish.pod:435 ../fish/guestfish.pod:439
945 #: ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20
946 #: ../fish/guestfish-actions.pod:378 ../fish/guestfish-actions.pod:386
947 #: ../fish/guestfish-actions.pod:393 ../fish/guestfish-actions.pod:400
948 #: ../fish/guestfish-actions.pod:1067 ../fish/guestfish-actions.pod:1071
949 #: ../fish/guestfish-actions.pod:1075 ../fish/guestfish-actions.pod:1079
950 #: ../fish/guestfish-actions.pod:1087 ../fish/guestfish-actions.pod:1091
951 #: ../fish/guestfish-actions.pod:1095 ../fish/guestfish-actions.pod:1105
952 #: ../fish/guestfish-actions.pod:1109 ../fish/guestfish-actions.pod:1113
953 #: ../fish/guestfish-actions.pod:1203 ../fish/guestfish-actions.pod:1207
954 #: ../fish/guestfish-actions.pod:1212 ../fish/guestfish-actions.pod:1217
955 #: ../fish/guestfish-actions.pod:1259 ../fish/guestfish-actions.pod:1263
956 #: ../fish/guestfish-actions.pod:1268 ../fish/guestfish-actions.pod:1506
957 #: ../fish/guestfish-actions.pod:1513 ../fish/guestfish-actions.pod:1520
958 #: ../tools/virt-win-reg.pl:536 ../tools/virt-win-reg.pl:542
959 #: ../tools/virt-win-reg.pl:548 ../tools/virt-resize.pl:345
960 #: ../tools/virt-resize.pl:350 ../tools/virt-resize.pl:360
966 #: ../src/guestfs.pod:390
968 "The kernel version that the command runs under will be different from what "
974 #: ../src/guestfs.pod:395
976 "If the command needs to communicate with daemons, then most likely they "
982 #: ../src/guestfs.pod:400
983 msgid "The command will be running in limited memory."
988 #: ../src/guestfs.pod:404
990 "The network may not be available unless you enable it (see L</"
991 "guestfs_set_network>)."
996 #: ../src/guestfs.pod:409
997 msgid "Only supports Linux guests (not Windows, BSD, etc)."
1002 #: ../src/guestfs.pod:413
1004 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
1009 #: ../src/guestfs.pod:418
1011 "For SELinux guests, you may need to enable SELinux and load policy first. "
1012 "See L</SELINUX> in this manpage."
1017 #: ../src/guestfs.pod:423
1019 "I<Security:> It is not safe to run commands from untrusted, possibly "
1020 "malicious guests. These commands may attempt to exploit your program by "
1021 "sending unexpected output. They could also try to exploit the Linux kernel "
1022 "or qemu provided by the libguestfs appliance. They could use the network "
1023 "provided by the libguestfs appliance to bypass ordinary network partitions "
1024 "and firewalls. They could use the elevated privileges or different SELinux "
1025 "context of your program to their advantage."
1030 #: ../src/guestfs.pod:432
1032 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
1033 "(a script which runs when the guest next boots normally), and to have this "
1034 "script run the commands you want in the normal context of the running guest, "
1035 "network security and so on. For information about other security issues, "
1041 #: ../src/guestfs.pod:440
1043 "The two main API calls to run commands are L</guestfs_command> and L</"
1044 "guestfs_sh> (there are also variations)."
1049 #: ../src/guestfs.pod:443
1051 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
1052 "shell globs, redirections, etc will work."
1057 #: ../src/guestfs.pod:446
1058 msgid "CONFIGURATION FILES"
1063 #: ../src/guestfs.pod:448
1065 "To read and write configuration files in Linux guest filesystems, we "
1066 "strongly recommend using Augeas. For example, Augeas understands how to "
1067 "read and write, say, a Linux shadow password file or X.org configuration "
1068 "file, and so avoids you having to write that code."
1073 #: ../src/guestfs.pod:453
1075 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
1076 "document Augeas itself here because there is excellent documentation on the "
1077 "L<http://augeas.net/> website."
1082 #: ../src/guestfs.pod:457
1084 "If you don't want to use Augeas (you fool!) then try calling L</"
1085 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
1091 #: ../src/guestfs.pod:461
1097 #: ../src/guestfs.pod:463
1099 "We support SELinux guests. To ensure that labeling happens correctly in "
1100 "SELinux guests, you need to enable SELinux and load the guest's policy:"
1105 #: ../src/guestfs.pod:469 ../src/guestfs.pod:1204 ../src/guestfs.pod:1335
1106 #: ../src/guestfs.pod:2109
1112 #: ../src/guestfs.pod:471
1113 msgid "Before launching, do:"
1118 #: ../src/guestfs.pod:473
1121 " guestfs_set_selinux (g, 1);\n"
1127 #: ../src/guestfs.pod:475 ../src/guestfs.pod:1208 ../src/guestfs.pod:1339
1128 #: ../src/guestfs.pod:2134
1134 #: ../src/guestfs.pod:477
1136 "After mounting the guest's filesystem(s), load the policy. This is best "
1137 "done by running the L<load_policy(8)> command in the guest itself:"
1142 #: ../src/guestfs.pod:481
1145 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
1151 #: ../src/guestfs.pod:483
1153 "(Older versions of C<load_policy> require you to specify the name of the "
1159 #: ../src/guestfs.pod:486 ../src/guestfs.pod:1345
1165 #: ../src/guestfs.pod:488
1167 "Optionally, set the security context for the API. The correct security "
1168 "context to use can only be known by inspecting the guest. As an example:"
1173 #: ../src/guestfs.pod:492
1176 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
1182 #: ../src/guestfs.pod:496
1183 msgid "This will work for running commands and editing existing files."
1188 #: ../src/guestfs.pod:498
1190 "When new files are created, you may need to label them explicitly, for "
1191 "example by running the external command C<restorecon pathname>."
1196 #: ../src/guestfs.pod:502
1202 #: ../src/guestfs.pod:504
1204 "Certain calls are affected by the current file mode creation mask (the "
1205 "\"umask\"). In particular ones which create files or directories, such as "
1206 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
1207 "either the default mode that the file is created with or modifies the mode "
1213 #: ../src/guestfs.pod:510
1215 "The default umask is C<022>, so files are created with modes such as C<0644> "
1216 "and directories with C<0755>."
1221 #: ../src/guestfs.pod:513
1223 "There are two ways to avoid being affected by umask. Either set umask to 0 "
1224 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
1225 "guestfs_chmod> after creating each file or directory."
1230 #: ../src/guestfs.pod:517
1231 msgid "For more information about umask, see L<umask(2)>."
1236 #: ../src/guestfs.pod:519 ../fish/guestfish.pod:720
1237 msgid "ENCRYPTED DISKS"
1242 #: ../src/guestfs.pod:521
1244 "Libguestfs allows you to access Linux guests which have been encrypted using "
1245 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1246 "standard. This includes nearly all whole disk encryption systems used by "
1247 "modern Linux guests."
1252 #: ../src/guestfs.pod:527
1254 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1255 "returns the string C<crypto_LUKS>)."
1260 #: ../src/guestfs.pod:530
1262 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
1263 "will require the passphrase!"
1268 #: ../src/guestfs.pod:533
1270 "Opening a LUKS device creates a new device mapper device called C</dev/"
1271 "mapper/mapname> (where C<mapname> is the string you supply to L</"
1272 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
1273 "from and encrypted to the underlying block device respectively."
1278 #: ../src/guestfs.pod:539
1280 "LVM volume groups on the device can be made visible by calling L</"
1281 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
1282 "(s) can now be mounted in the usual way."
1287 #: ../src/guestfs.pod:543
1289 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1290 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1291 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
1292 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1293 "underlying encrypted block device)."
1298 #: ../src/guestfs.pod:550
1304 #: ../src/guestfs.pod:552
1306 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1307 "contains operating systems. (These APIs used to be in a separate Perl-only "
1308 "library called L<Sys::Guestfs::Lib(3)> but since version 1.5.3 the most "
1309 "frequently used part of this library has been rewritten in C and moved into "
1315 #: ../src/guestfs.pod:558
1317 "Add all disks belonging to the unknown virtual machine and call L</"
1318 "guestfs_launch> in the usual way."
1323 #: ../src/guestfs.pod:561
1325 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1326 "and certain heuristics, and returns a list of operating systems that were "
1327 "found. An empty list means none were found. A single element is the root "
1328 "filesystem of the operating system. For dual- or multi-boot guests, "
1329 "multiple roots can be returned, each one corresponding to a separate "
1330 "operating system. (Multi-boot virtual machines are extremely rare in the "
1331 "world of virtualization, but since this scenario can happen, we have built "
1332 "libguestfs to deal with it.)"
1337 #: ../src/guestfs.pod:570
1339 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1340 "to get additional details about that operating system. For example, call L</"
1341 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1342 "Windows and Linux-based operating systems respectively."
1347 #: ../src/guestfs.pod:576
1349 "Un*x-like and Linux-based operating systems usually consist of several "
1350 "filesystems which are mounted at boot time (for example, a separate boot "
1351 "partition mounted on C</boot>). The inspection rules are able to detect how "
1352 "filesystems correspond to mount points. Call "
1353 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1354 "hash table like this example:"
1359 #: ../src/guestfs.pod:583
1362 " /boot => /dev/sda1\n"
1363 " / => /dev/vg_guest/lv_root\n"
1364 " /usr => /dev/vg_guest/lv_usr\n"
1370 #: ../src/guestfs.pod:587
1372 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1373 "filesystems as suggested."
1378 #: ../src/guestfs.pod:590
1380 "Be careful to mount filesystems in the right order (eg. C</> before C</"
1381 "usr>). Sorting the keys of the hash by length, shortest first, should work."
1386 #: ../src/guestfs.pod:594
1388 "Inspection currently only works for some common operating systems. "
1389 "Contributors are welcome to send patches for other operating systems that we "
1390 "currently cannot detect."
1395 #: ../src/guestfs.pod:598
1397 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1398 "for more details. The L</guestfs_inspect_os> function just ignores any "
1399 "encrypted devices."
1404 #: ../src/guestfs.pod:602
1406 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1407 "inspection and caches the results in the guest handle. Subsequent calls to "
1408 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
1409 "read the disks. If you change the content of the guest disks, you can redo "
1410 "inspection by calling L</guestfs_inspect_os> again. (L</"
1411 "guestfs_inspect_list_applications> works a little differently from the other "
1412 "calls and does read the disks. See documentation for that function for "
1418 #: ../src/guestfs.pod:611
1419 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1424 #: ../src/guestfs.pod:613
1426 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
1427 "ntfs-3g.org/> driver."
1432 #: ../src/guestfs.pod:616
1433 msgid "DRIVE LETTERS AND PATHS"
1438 #: ../src/guestfs.pod:618
1440 "DOS and Windows still use drive letters, and the filesystems are always "
1441 "treated as case insensitive by Windows itself, and therefore you might find "
1442 "a Windows configuration file referring to a path like C<c:\\windows"
1443 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
1444 "might be referred to as C</WINDOWS/System32>."
1449 #: ../src/guestfs.pod:624
1451 "Drive letter mappings are outside the scope of libguestfs. You have to use "
1452 "libguestfs to read the appropriate Windows Registry and configuration files, "
1453 "to determine yourself how drives are mapped (see also L<hivex(3)> and L<virt-"
1459 #: ../src/guestfs.pod:629
1461 "Replacing backslash characters with forward slash characters is also outside "
1462 "the scope of libguestfs, but something that you can easily do."
1467 #: ../src/guestfs.pod:632
1469 "Where we can help is in resolving the case insensitivity of paths. For "
1470 "this, call L</guestfs_case_sensitive_path>."
1475 #: ../src/guestfs.pod:635
1476 msgid "ACCESSING THE WINDOWS REGISTRY"
1481 #: ../src/guestfs.pod:637
1483 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1484 "files, through the library C<hivex> which is part of the libguestfs project "
1485 "although ships as a separate tarball. You have to locate and download the "
1486 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1487 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
1488 "reg(1)> for more help on this issue."
1493 #: ../src/guestfs.pod:645
1494 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
1499 #: ../src/guestfs.pod:647
1501 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
1502 "provide something which looks like a Linux symlink. The way it tries to do "
1503 "the rewriting is described here:"
1508 #: ../src/guestfs.pod:651
1510 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
1516 #: ../src/guestfs.pod:653
1518 "The essential problem is that ntfs-3g simply does not have enough "
1519 "information to do a correct job. NTFS links can contain drive letters and "
1520 "references to external device GUIDs that ntfs-3g has no way of resolving. "
1521 "It is almost certainly the case that libguestfs callers should ignore what "
1522 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
1527 #: ../src/guestfs.pod:660
1529 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use L</"
1530 "guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
1531 "attribute, and read the raw reparse data from that (you can find the format "
1532 "documented in various places around the web)."
1537 #: ../src/guestfs.pod:665
1538 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
1543 #: ../src/guestfs.pod:667
1545 "There are other useful extended attributes that can be read from ntfs-3g "
1546 "filesystems (using L</guestfs_getxattr>). See:"
1551 #: ../src/guestfs.pod:670
1553 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
1558 #: ../src/guestfs.pod:672
1559 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1564 #: ../src/guestfs.pod:674
1566 "Although we don't want to discourage you from using the C API, we will "
1567 "mention here that the same API is also available in other languages."
1571 #: ../src/guestfs.pod:677
1573 "The API is broadly identical in all supported languages. This means that "
1574 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
1575 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
1576 "OCaml. In other words, a straightforward, predictable isomorphism between "
1582 #: ../src/guestfs.pod:683
1584 "Error messages are automatically transformed into exceptions if the language "
1590 #: ../src/guestfs.pod:686
1592 "We don't try to \"object orientify\" parts of the API in OO languages, "
1593 "although contributors are welcome to write higher level APIs above what we "
1594 "provide in their favourite languages if they wish."
1599 #: ../src/guestfs.pod:692
1605 #: ../src/guestfs.pod:694
1607 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1608 "identical to the C API. C++ classes and exceptions are not used."
1613 #: ../src/guestfs.pod:698
1619 #: ../src/guestfs.pod:700
1621 "The C# bindings are highly experimental. Please read the warnings at the "
1622 "top of C<csharp/Libguestfs.cs>."
1627 #: ../src/guestfs.pod:703
1633 #: ../src/guestfs.pod:705
1635 "This is the only language binding that is working but incomplete. Only "
1636 "calls which return simple integers have been bound in Haskell, and we are "
1637 "looking for help to complete this binding."
1642 #: ../src/guestfs.pod:709
1648 #: ../src/guestfs.pod:711
1650 "Full documentation is contained in the Javadoc which is distributed with "
1656 #: ../src/guestfs.pod:714
1661 #: ../src/guestfs.pod:716
1662 msgid "See L<guestfs-ocaml(3)>."
1667 #: ../src/guestfs.pod:718
1672 #: ../src/guestfs.pod:720
1673 msgid "See L<Sys::Guestfs(3)>."
1678 #: ../src/guestfs.pod:722
1684 #: ../src/guestfs.pod:724
1686 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1687 "the php-libguestfs package for your distribution."
1692 #: ../src/guestfs.pod:727
1693 msgid "The PHP binding only works correctly on 64 bit machines."
1698 #: ../src/guestfs.pod:729
1703 #: ../src/guestfs.pod:731
1704 msgid "See L<guestfs-python(3)>."
1709 #: ../src/guestfs.pod:733
1714 #: ../src/guestfs.pod:735
1715 msgid "See L<guestfs-ruby(3)>."
1720 #: ../src/guestfs.pod:737
1721 msgid "B<shell scripts>"
1725 #: ../src/guestfs.pod:739
1726 msgid "See L<guestfish(1)>."
1731 #: ../src/guestfs.pod:743
1732 msgid "LIBGUESTFS GOTCHAS"
1737 #: ../src/guestfs.pod:745
1739 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1740 "system [...] that works in the way it is documented but is counterintuitive "
1741 "and almost invites mistakes.\""
1746 #: ../src/guestfs.pod:749
1748 "Since we developed libguestfs and the associated tools, there are several "
1749 "things we would have designed differently, but are now stuck with for "
1750 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1751 "release, you can expect these to change. Beware of them."
1756 #: ../src/guestfs.pod:757
1757 msgid "Autosync / forgetting to sync."
1762 #: ../src/guestfs.pod:759
1764 "When modifying a filesystem from C or another language, you B<must> unmount "
1765 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1766 "libguestfs handle. You can also call:"
1771 #: ../src/guestfs.pod:763
1774 " guestfs_set_autosync (g, 1);\n"
1780 #: ../src/guestfs.pod:765
1782 "to have the unmount/sync done automatically for you when the handle 'g' is "
1783 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
1788 #: ../src/guestfs.pod:769
1790 "If you forget to do this, then it is entirely possible that your changes "
1791 "won't be written out, or will be partially written, or (very rarely) that "
1792 "you'll get disk corruption."
1797 #: ../src/guestfs.pod:773
1799 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1800 "guestfish scripts that forget to sync will work just fine, which can make "
1801 "this very puzzling if you are trying to debug a problem."
1806 #: ../src/guestfs.pod:777
1808 "Update: Autosync is enabled by default for all API users starting from "
1809 "libguestfs 1.5.24."
1814 #: ../src/guestfs.pod:780
1815 msgid "Mount option C<-o sync> should not be the default."
1820 #: ../src/guestfs.pod:782
1822 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1823 "However C<-o sync> does not add any reliability benefit, but does have a "
1824 "very large performance impact."
1829 #: ../src/guestfs.pod:786
1831 "The work around is to use L</guestfs_mount_options> and set the mount "
1832 "options that you actually want to use."
1837 #: ../src/guestfs.pod:789
1838 msgid "Read-only should be the default."
1843 #: ../src/guestfs.pod:791
1845 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1846 "specify I<--rw> if you want to make changes to the image."
1851 #: ../src/guestfs.pod:794
1852 msgid "This would reduce the potential to corrupt live VM images."
1857 #: ../src/guestfs.pod:796
1859 "Note that many filesystems change the disk when you just mount and unmount, "
1860 "even if you didn't perform any writes. You need to use L</"
1861 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
1866 #: ../src/guestfs.pod:800
1867 msgid "guestfish command line is hard to use."
1872 #: ../src/guestfs.pod:802
1874 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1875 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1876 "exist, so it fails. In earlier versions of guestfish the error message was "
1877 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1878 "we should have used C<guestfish -c command> to run commands."
1883 #: ../src/guestfs.pod:809
1884 msgid "guestfish megabyte modifiers don't work right on all commands"
1889 #: ../src/guestfs.pod:811
1891 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1892 "other modifiers). What guestfish actually does is to multiply the number "
1893 "part by the modifier part and pass the result to the C API. However this "
1894 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1895 "expecting some other unit (eg. megabytes)."
1900 #: ../src/guestfs.pod:818
1901 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1906 #: ../src/guestfs.pod:820
1909 " lvcreate LV VG 100M\n"
1915 #: ../src/guestfs.pod:822
1917 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1918 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1919 "megabytes * megabytes) logical volume. The error message you get from this "
1920 "is also a little obscure."
1925 #: ../src/guestfs.pod:827
1927 "This could be fixed in the generator by specially marking parameters and "
1928 "return values which take bytes or other units."
1933 #: ../src/guestfs.pod:830
1934 msgid "Ambiguity between devices and paths"
1939 #: ../src/guestfs.pod:832
1941 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
1942 "sdb2>) and a similar pathname. A file might just happen to be called "
1943 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1948 #: ../src/guestfs.pod:837
1950 "In the current API we usually resolve this ambiguity by having two separate "
1951 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1952 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1953 "detecting if the path supplied begins with C</dev/>."
1958 #: ../src/guestfs.pod:843
1960 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1961 "make paths/devices into structured names. One way to do this would be to "
1962 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1963 "aspect of grub. Another way would be to use a structured type, equivalent "
1964 "to this OCaml type:"
1969 #: ../src/guestfs.pod:849
1972 " type path = Path of string | Device of int | Partition of int * int\n"
1978 #: ../src/guestfs.pod:851
1979 msgid "which would allow you to pass arguments like:"
1984 #: ../src/guestfs.pod:853
1987 " Path \"/foo/bar\"\n"
1988 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
1989 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
1990 " Path \"/dev/sdb2\" (* not a device *)\n"
1996 #: ../src/guestfs.pod:858
1998 "As you can see there are still problems to resolve even with this "
1999 "representation. Also consider how it might work in guestfish."
2004 #: ../src/guestfs.pod:863
2005 msgid "PROTOCOL LIMITS"
2010 #: ../src/guestfs.pod:865
2012 "Internally libguestfs uses a message-based protocol to pass API calls and "
2013 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
2014 "plenty more detail about this). The maximum message size used by the "
2015 "protocol is slightly less than 4 MB. For some API calls you may need to be "
2016 "aware of this limit. The API calls which may be affected are individually "
2017 "documented, with a link back to this section of the documentation."
2022 #: ../src/guestfs.pod:873
2024 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
2025 "a simple string. Because this string is at some point internally encoded as "
2026 "a message, the maximum size that it can return is slightly under 4 MB. If "
2027 "the requested file is larger than this then you will get an error."
2032 #: ../src/guestfs.pod:879
2034 "In order to transfer large files into and out of the guest filesystem, you "
2035 "need to use particular calls that support this. The sections L</UPLOADING> "
2036 "and L</DOWNLOADING> document how to do this."
2041 #: ../src/guestfs.pod:883
2043 "You might also consider mounting the disk image using our FUSE filesystem "
2044 "support (L<guestmount(1)>)."
2049 #: ../src/guestfs.pod:886
2050 msgid "KEYS AND PASSPHRASES"
2055 #: ../src/guestfs.pod:888
2057 "Certain libguestfs calls take a parameter that contains sensitive key "
2058 "material, passed in as a C string."
2063 #: ../src/guestfs.pod:891
2065 "In the future we would hope to change the libguestfs implementation so that "
2066 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
2067 "swap. However this is I<not> done at the moment, because of the complexity "
2068 "of such an implementation."
2073 #: ../src/guestfs.pod:896
2075 "Therefore you should be aware that any key parameter you pass to libguestfs "
2076 "might end up being written out to the swap partition. If this is a concern, "
2077 "scrub the swap partition or don't use libguestfs on encrypted devices."
2082 #: ../src/guestfs.pod:901
2083 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
2088 #: ../src/guestfs.pod:903
2090 "All high-level libguestfs actions are synchronous. If you want to use "
2091 "libguestfs asynchronously then you must create a thread."
2096 #: ../src/guestfs.pod:906
2098 "Only use the handle from a single thread. Either use the handle exclusively "
2099 "from one thread, or provide your own mutex so that two threads cannot issue "
2100 "calls on the same handle at the same time."
2105 #: ../src/guestfs.pod:910
2107 "See the graphical program guestfs-browser for one possible architecture for "
2108 "multithreaded programs using libvirt and libguestfs."
2113 #: ../src/guestfs.pod:913
2118 #: ../src/guestfs.pod:915
2120 "Libguestfs needs a supermin appliance, which it finds by looking along an "
2126 #: ../src/guestfs.pod:918
2128 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
2129 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
2134 #: ../src/guestfs.pod:921
2136 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
2137 "to change the directories that libguestfs will search in. The value is a "
2138 "colon-separated list of paths. The current directory is I<not> searched "
2139 "unless the path contains an empty element or C<.>. For example "
2140 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
2141 "then C</usr/lib/guestfs>."
2146 #: ../src/guestfs.pod:928
2147 msgid "QEMU WRAPPERS"
2152 #: ../src/guestfs.pod:930
2154 "If you want to compile your own qemu, run qemu from a non-standard location, "
2155 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
2161 #: ../src/guestfs.pod:934
2163 "There is one important rule to remember: you I<must C<exec qemu>> as the "
2164 "last command in the shell script (so that qemu replaces the shell and "
2165 "becomes the direct child of the libguestfs-using program). If you don't do "
2166 "this, then the qemu process won't be cleaned up correctly."
2171 #: ../src/guestfs.pod:939
2173 "Here is an example of a wrapper, where I have built my own copy of qemu from "
2179 #: ../src/guestfs.pod:942
2183 " qemudir=/home/rjones/d/qemu\n"
2184 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
2190 #: ../src/guestfs.pod:946
2192 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
2193 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
2199 #: ../src/guestfs.pod:950
2202 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
2208 #: ../src/guestfs.pod:952
2210 "Note that libguestfs also calls qemu with the -help and -version options in "
2211 "order to determine features."
2216 #: ../src/guestfs.pod:955
2217 msgid "ABI GUARANTEE"
2222 #: ../src/guestfs.pod:957
2224 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
2225 "actions as outlined in this section. Although we will deprecate some "
2226 "actions, for example if they get replaced by newer calls, we will keep the "
2227 "old actions forever. This allows you the developer to program in confidence "
2228 "against the libguestfs API."
2233 #: ../src/guestfs.pod:963
2234 msgid "BLOCK DEVICE NAMING"
2239 #: ../src/guestfs.pod:965
2241 "In the kernel there is now quite a profusion of schemata for naming block "
2242 "devices (in this context, by I<block device> I mean a physical or virtual "
2243 "hard drive). The original Linux IDE driver used names starting with C</dev/"
2244 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
2245 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
2246 "for the old IDE driver (particularly for SATA devices) those devices also "
2247 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
2248 "paravirtualized drivers. This has created several different naming systems, "
2249 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
2254 #: ../src/guestfs.pod:977
2256 "As discussed above, libguestfs uses a qemu appliance running an embedded "
2257 "Linux kernel to access block devices. We can run a variety of appliances "
2258 "based on a variety of Linux kernels."
2263 #: ../src/guestfs.pod:981
2265 "This causes a problem for libguestfs because many API calls use device or "
2266 "partition names. Working scripts and the recipe (example) scripts that we "
2267 "make available over the internet could fail if the naming scheme changes."
2272 #: ../src/guestfs.pod:986
2274 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2275 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2276 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2277 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2282 #: ../src/guestfs.pod:992
2284 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2285 "L</guestfs_list_partitions> and similar calls return the true names of the "
2286 "devices and partitions as known to the appliance."
2291 #: ../src/guestfs.pod:997
2292 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2297 #: ../src/guestfs.pod:999
2299 "Usually this translation is transparent. However in some (very rare) cases "
2300 "you may need to know the exact algorithm. Such cases include where you use "
2301 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
2302 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
2307 #: ../src/guestfs.pod:1005
2309 "The algorithm is applied only to I<parameters> which are known to be either "
2310 "device or partition names. Return values from functions such as L</"
2311 "guestfs_list_devices> are never changed."
2316 #: ../src/guestfs.pod:1013
2317 msgid "Is the string a parameter which is a device or partition name?"
2322 #: ../src/guestfs.pod:1017
2323 msgid "Does the string begin with C</dev/sd>?"
2328 #: ../src/guestfs.pod:1021
2330 "Does the named device exist? If so, we use that device. However if I<not> "
2331 "then we continue with this algorithm."
2336 #: ../src/guestfs.pod:1026
2337 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
2342 #: ../src/guestfs.pod:1028
2343 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
2348 #: ../src/guestfs.pod:1030
2349 msgid "If that named device exists, use it. If not, continue."
2354 #: ../src/guestfs.pod:1034
2355 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
2360 #: ../src/guestfs.pod:1036
2361 msgid "If that named device exists, use it. If not, return an error."
2366 #: ../src/guestfs.pod:1040
2367 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
2372 #: ../src/guestfs.pod:1042
2374 "Although the standard naming scheme and automatic translation is useful for "
2375 "simple programs and guestfish scripts, for larger programs it is best not to "
2376 "rely on this mechanism."
2381 #: ../src/guestfs.pod:1046
2383 "Where possible for maximum future portability programs using libguestfs "
2384 "should use these future-proof techniques:"
2389 #: ../src/guestfs.pod:1053
2391 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2392 "device names, and then use those names directly."
2397 #: ../src/guestfs.pod:1056
2399 "Since those device names exist by definition, they will never be translated."
2404 #: ../src/guestfs.pod:1061
2406 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2407 "filesystem labels."
2412 #: ../src/guestfs.pod:1066
2418 #: ../src/guestfs.pod:1068
2420 "This section discusses security implications of using libguestfs, "
2421 "particularly with untrusted or malicious guests or disk images."
2426 #: ../src/guestfs.pod:1071
2427 msgid "GENERAL SECURITY CONSIDERATIONS"
2432 #: ../src/guestfs.pod:1073
2434 "Be careful with any files or data that you download from a guest (by "
2435 "\"download\" we mean not just the L</guestfs_download> command but any "
2436 "command that reads files, filenames, directories or anything else from a "
2437 "disk image). An attacker could manipulate the data to fool your program "
2438 "into doing the wrong thing. Consider cases such as:"
2443 #: ../src/guestfs.pod:1083
2444 msgid "the data (file etc) not being present"
2449 #: ../src/guestfs.pod:1087
2450 msgid "being present but empty"
2455 #: ../src/guestfs.pod:1091
2456 msgid "being much larger than normal"
2461 #: ../src/guestfs.pod:1095
2462 msgid "containing arbitrary 8 bit data"
2467 #: ../src/guestfs.pod:1099
2468 msgid "being in an unexpected character encoding"
2473 #: ../src/guestfs.pod:1103
2474 msgid "containing homoglyphs."
2479 #: ../src/guestfs.pod:1107
2480 msgid "SECURITY OF MOUNTING FILESYSTEMS"
2485 #: ../src/guestfs.pod:1109
2487 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
2488 "(VFS) module can sometimes be escalated into exploits by deliberately "
2489 "creating a malicious, malformed filesystem. These exploits are very severe "
2490 "for two reasons. Firstly there are very many filesystem drivers in the "
2491 "kernel, and many of them are infrequently used and not much developer "
2492 "attention has been paid to the code. Linux userspace helps potential "
2493 "crackers by detecting the filesystem type and automatically choosing the "
2494 "right VFS driver, even if that filesystem type is obscure or unexpected for "
2495 "the administrator. Secondly, a kernel-level exploit is like a local root "
2496 "exploit (worse in some ways), giving immediate and total access to the "
2497 "system right down to the hardware level."
2502 #: ../src/guestfs.pod:1122
2504 "That explains why you should never mount a filesystem from an untrusted "
2505 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
2506 "inside a qemu virtual machine, usually running as a non-root user. The "
2507 "attacker would need to write a filesystem which first exploited the kernel, "
2508 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
2509 "the libguestfs protocol, and finally to be as serious as the host kernel "
2510 "exploit it would need to escalate its privileges to root. This multi-step "
2511 "escalation, performed by a static piece of data, is thought to be extremely "
2512 "hard to do, although we never say 'never' about security issues."
2517 #: ../src/guestfs.pod:1133
2519 "In any case callers can reduce the attack surface by forcing the filesystem "
2520 "type when mounting (use L</guestfs_mount_vfs>)."
2525 #: ../src/guestfs.pod:1136
2526 msgid "PROTOCOL SECURITY"
2531 #: ../src/guestfs.pod:1138
2533 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
2534 "defined upper message size. However a program that uses libguestfs must "
2535 "also take care - for example you can write a program that downloads a binary "
2536 "from a disk image and executes it locally, and no amount of protocol "
2537 "security will save you from the consequences."
2542 #: ../src/guestfs.pod:1144
2543 msgid "INSPECTION SECURITY"
2548 #: ../src/guestfs.pod:1146
2550 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
2551 "directly from the guest, and these could contain any 8 bit data. Callers "
2552 "should be careful to escape these before printing them to a structured file "
2553 "(for example, use HTML escaping if creating a web page)."
2558 #: ../src/guestfs.pod:1152
2560 "Guest configuration may be altered in unusual ways by the administrator of "
2561 "the virtual machine, and may not reflect reality (particularly for untrusted "
2562 "or actively malicious guests). For example we parse the hostname from "
2563 "configuration files like C</etc/sysconfig/network> that we find in the "
2564 "guest, but the guest administrator can easily manipulate these files to "
2565 "provide the wrong hostname."
2570 #: ../src/guestfs.pod:1160
2572 "The inspection API parses guest configuration using two external libraries: "
2573 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
2574 "designed to be robust in the face of malicious data, although denial of "
2575 "service attacks are still possible, for example with oversized configuration "
2581 #: ../src/guestfs.pod:1166
2582 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
2587 #: ../src/guestfs.pod:1168
2589 "Be very cautious about running commands from the guest. By running a "
2590 "command in the guest, you are giving CPU time to a binary that you do not "
2591 "control, under the same user account as the library, albeit wrapped in qemu "
2592 "virtualization. More information and alternatives can be found in the "
2593 "section L</RUNNING COMMANDS>."
2598 #: ../src/guestfs.pod:1174
2599 msgid "CVE-2010-3851"
2604 #: ../src/guestfs.pod:1176
2605 msgid "https://bugzilla.redhat.com/642934"
2610 #: ../src/guestfs.pod:1178
2612 "This security bug concerns the automatic disk format detection that qemu "
2613 "does on disk images."
2618 #: ../src/guestfs.pod:1181
2620 "A raw disk image is just the raw bytes, there is no header. Other disk "
2621 "images like qcow2 contain a special header. Qemu deals with this by looking "
2622 "for one of the known headers, and if none is found then assuming the disk "
2623 "image must be raw."
2628 #: ../src/guestfs.pod:1186
2630 "This allows a guest which has been given a raw disk image to write some "
2631 "other header. At next boot (or when the disk image is accessed by "
2632 "libguestfs) qemu would do autodetection and think the disk image format was, "
2633 "say, qcow2 based on the header written by the guest."
2638 #: ../src/guestfs.pod:1191
2640 "This in itself would not be a problem, but qcow2 offers many features, one "
2641 "of which is to allow a disk image to refer to another image (called the "
2642 "\"backing disk\"). It does this by placing the path to the backing disk "
2643 "into the qcow2 header. This path is not validated and could point to any "
2644 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
2645 "\"holes\" in the qcow2 disk image, which of course is completely under the "
2646 "control of the attacker."
2651 #: ../src/guestfs.pod:1199
2653 "In libguestfs this is rather hard to exploit except under two circumstances:"
2658 #: ../src/guestfs.pod:1206
2659 msgid "You have enabled the network or have opened the disk in write mode."
2664 #: ../src/guestfs.pod:1210
2666 "You are also running untrusted code from the guest (see L</RUNNING "
2672 #: ../src/guestfs.pod:1215
2674 "The way to avoid this is to specify the expected disk format when adding "
2675 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
2676 "should always do this if the disk is raw format, and it's a good idea for "
2682 #: ../src/guestfs.pod:1220
2684 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
2685 "format is fetched from libvirt and passed through."
2690 #: ../src/guestfs.pod:1223
2692 "For libguestfs tools, use the I<--format> command line parameter as "
2698 #: ../src/guestfs.pod:1226
2699 msgid "CONNECTION MANAGEMENT"
2704 #: ../src/guestfs.pod:1228
2710 #: ../src/guestfs.pod:1230
2712 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
2713 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
2714 "handle and release all resources used."
2719 #: ../src/guestfs.pod:1234
2721 "For information on using multiple handles and threads, see the section L</"
2722 "MULTIPLE HANDLES AND MULTIPLE THREADS> below."
2727 #: ../src/guestfs.pod:1237
2728 msgid "guestfs_create"
2733 #: ../src/guestfs.pod:1239
2736 " guestfs_h *guestfs_create (void);\n"
2742 #: ../src/guestfs.pod:1241
2743 msgid "Create a connection handle."
2748 #: ../src/guestfs.pod:1243
2750 "You have to call L</guestfs_add_drive_opts> (or one of the equivalent calls) "
2751 "on the handle at least once."
2756 #: ../src/guestfs.pod:1246
2758 "This function returns a non-NULL pointer to a handle on success or NULL on "
2764 #: ../src/guestfs.pod:1249
2765 msgid "After configuring the handle, you have to call L</guestfs_launch>."
2770 #: ../src/guestfs.pod:1251
2772 "You may also want to configure error handling for the handle. See L</ERROR "
2773 "HANDLING> section below."
2778 #: ../src/guestfs.pod:1254
2779 msgid "guestfs_close"
2784 #: ../src/guestfs.pod:1256
2787 " void guestfs_close (guestfs_h *g);\n"
2793 #: ../src/guestfs.pod:1258
2794 msgid "This closes the connection handle and frees up all resources used."
2799 #: ../src/guestfs.pod:1260
2800 msgid "ERROR HANDLING"
2805 #: ../src/guestfs.pod:1262
2807 "API functions can return errors. For example, almost all functions that "
2808 "return C<int> will return C<-1> to indicate an error."
2813 #: ../src/guestfs.pod:1265
2815 "Additional information is available for errors: an error message string and "
2816 "optionally an error number (errno) if the thing that failed was a system "
2822 #: ../src/guestfs.pod:1269
2824 "You can get at the additional information about the last error on the handle "
2825 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
2826 "up an error handler with L</guestfs_set_error_handler>."
2831 #: ../src/guestfs.pod:1274
2833 "When the handle is created, a default error handler is installed which "
2834 "prints the error message string to C<stderr>. For small short-running "
2835 "command line programs it is sufficient to do:"
2840 #: ../src/guestfs.pod:1278
2843 " if (guestfs_launch (g) == -1)\n"
2844 " exit (EXIT_FAILURE);\n"
2850 #: ../src/guestfs.pod:1281
2852 "since the default error handler will ensure that an error message has been "
2853 "printed to C<stderr> before the program exits."
2858 #: ../src/guestfs.pod:1284
2860 "For other programs the caller will almost certainly want to install an "
2861 "alternate error handler or do error handling in-line like this:"
2866 #: ../src/guestfs.pod:1287
2869 " g = guestfs_create ();\n"
2875 #: ../src/guestfs.pod:1289
2878 " /* This disables the default behaviour of printing errors\n"
2880 " guestfs_set_error_handler (g, NULL, NULL);\n"
2886 #: ../src/guestfs.pod:1293
2889 " if (guestfs_launch (g) == -1) {\n"
2890 " /* Examine the error message and print it etc. */\n"
2891 " char *msg = guestfs_last_error (g);\n"
2892 " int errnum = guestfs_last_errno (g);\n"
2893 " fprintf (stderr, \"%s\\n\", msg);\n"
2901 #: ../src/guestfs.pod:1301
2903 "Out of memory errors are handled differently. The default action is to call "
2904 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
2905 "guestfs_set_out_of_memory_handler>."
2910 #: ../src/guestfs.pod:1305
2912 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
2913 "because there is no handle if this happens there is no way to get additional "
2914 "error information. However L</guestfs_create> is supposed to be a "
2915 "lightweight operation which can only fail because of insufficient memory (it "
2916 "returns NULL in this case)."
2921 #: ../src/guestfs.pod:1311
2922 msgid "guestfs_last_error"
2927 #: ../src/guestfs.pod:1313
2930 " const char *guestfs_last_error (guestfs_h *g);\n"
2936 #: ../src/guestfs.pod:1315
2938 "This returns the last error message that happened on C<g>. If there has not "
2939 "been an error since the handle was created, then this returns C<NULL>."
2944 #: ../src/guestfs.pod:1319
2946 "The lifetime of the returned string is until the next error occurs, or L</"
2947 "guestfs_close> is called."
2952 #: ../src/guestfs.pod:1322
2953 msgid "guestfs_last_errno"
2958 #: ../src/guestfs.pod:1324
2961 " int guestfs_last_errno (guestfs_h *g);\n"
2967 #: ../src/guestfs.pod:1326
2968 msgid "This returns the last error number (errno) that happened on C<g>."
2973 #: ../src/guestfs.pod:1328
2974 msgid "If successful, an errno integer not equal to zero is returned."
2979 #: ../src/guestfs.pod:1330
2981 "If no error, this returns 0. This call can return 0 in three situations:"
2986 #: ../src/guestfs.pod:1337
2987 msgid "There has not been any error on the handle."
2992 #: ../src/guestfs.pod:1341
2994 "There has been an error but the errno was meaningless. This corresponds to "
2995 "the case where the error did not come from a failed system call, but for "
2996 "some other reason."
3001 #: ../src/guestfs.pod:1347
3003 "There was an error from a failed system call, but for some reason the errno "
3004 "was not captured and returned. This usually indicates a bug in libguestfs."
3009 #: ../src/guestfs.pod:1353
3011 "Libguestfs tries to convert the errno from inside the applicance into a "
3012 "corresponding errno for the caller (not entirely trivial: the appliance "
3013 "might be running a completely different operating system from the library "
3014 "and error numbers are not standardized across Un*xen). If this could not be "
3015 "done, then the error is translated to C<EINVAL>. In practice this should "
3016 "only happen in very rare circumstances."
3021 #: ../src/guestfs.pod:1361
3022 msgid "guestfs_set_error_handler"
3027 #: ../src/guestfs.pod:1363
3030 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
3032 " const char *msg);\n"
3033 " void guestfs_set_error_handler (guestfs_h *g,\n"
3034 " guestfs_error_handler_cb cb,\n"
3041 #: ../src/guestfs.pod:1370
3043 "The callback C<cb> will be called if there is an error. The parameters "
3044 "passed to the callback are an opaque data pointer and the error message "
3050 #: ../src/guestfs.pod:1374
3052 "C<errno> is not passed to the callback. To get that the callback must call "
3053 "L</guestfs_last_errno>."
3058 #: ../src/guestfs.pod:1377
3060 "Note that the message string C<msg> is freed as soon as the callback "
3061 "function returns, so if you want to stash it somewhere you must make your "
3067 #: ../src/guestfs.pod:1381
3068 msgid "The default handler prints messages on C<stderr>."
3073 #: ../src/guestfs.pod:1383
3074 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
3079 #: ../src/guestfs.pod:1385
3080 msgid "guestfs_get_error_handler"
3085 #: ../src/guestfs.pod:1387
3088 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
3089 " void **opaque_rtn);\n"
3095 #: ../src/guestfs.pod:1390
3096 msgid "Returns the current error handler callback."
3101 #: ../src/guestfs.pod:1392
3102 msgid "guestfs_set_out_of_memory_handler"
3106 #: ../src/guestfs.pod:1394
3109 " typedef void (*guestfs_abort_cb) (void);\n"
3110 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
3111 " guestfs_abort_cb);\n"
3117 #: ../src/guestfs.pod:1398
3119 "The callback C<cb> will be called if there is an out of memory situation. "
3120 "I<Note this callback must not return>."
3125 #: ../src/guestfs.pod:1401
3126 msgid "The default is to call L<abort(3)>."
3131 #: ../src/guestfs.pod:1403
3133 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
3138 #: ../src/guestfs.pod:1406
3139 msgid "guestfs_get_out_of_memory_handler"
3144 #: ../src/guestfs.pod:1408
3147 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
3153 #: ../src/guestfs.pod:1410
3154 msgid "This returns the current out of memory handler."
3159 #: ../src/guestfs.pod:1412
3165 #: ../src/guestfs.pod:1414 ../fish/guestfish.pod:969
3171 #: ../src/guestfs.pod:1416
3177 #: ../src/guestfs.pod:1418
3183 #: ../src/guestfs.pod:1420
3184 msgid "AVAILABILITY"
3189 #: ../src/guestfs.pod:1422
3190 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
3195 #: ../src/guestfs.pod:1424
3197 "Using L</guestfs_available> you can test availability of the following "
3198 "groups of functions. This test queries the appliance to see if the "
3199 "appliance you are currently using supports the functionality."
3204 #: ../src/guestfs.pod:1429
3205 msgid "@AVAILABILITY@"
3210 #: ../src/guestfs.pod:1431
3211 msgid "GUESTFISH supported COMMAND"
3216 #: ../src/guestfs.pod:1433
3218 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
3219 "prints out the available groups and whether they are supported by this build "
3220 "of libguestfs. Note however that you have to do C<run> first."
3225 #: ../src/guestfs.pod:1438
3226 msgid "SINGLE CALLS AT COMPILE TIME"
3231 #: ../src/guestfs.pod:1440
3233 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
3234 "function, such as:"
3239 #: ../src/guestfs.pod:1443
3242 " #define LIBGUESTFS_HAVE_DD 1\n"
3248 #: ../src/guestfs.pod:1445
3249 msgid "if L</guestfs_dd> is available."
3254 #: ../src/guestfs.pod:1447
3256 "Before version 1.5.8, if you needed to test whether a single libguestfs "
3257 "function is available at compile time, we recommended using build tools such "
3258 "as autoconf or cmake. For example in autotools you could use:"
3263 #: ../src/guestfs.pod:1452
3266 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
3267 " AC_CHECK_FUNCS([guestfs_dd])\n"
3273 #: ../src/guestfs.pod:1455
3275 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
3281 #: ../src/guestfs.pod:1458
3282 msgid "SINGLE CALLS AT RUN TIME"
3287 #: ../src/guestfs.pod:1460
3289 "Testing at compile time doesn't guarantee that a function really exists in "
3290 "the library. The reason is that you might be dynamically linked against a "
3291 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
3292 "This situation unfortunately results in a segmentation fault, which is a "
3293 "shortcoming of the C dynamic linking system itself."
3298 #: ../src/guestfs.pod:1467
3300 "You can use L<dlopen(3)> to test if a function is available at run time, as "
3301 "in this example program (note that you still need the compile time check as "
3307 #: ../src/guestfs.pod:1471
3310 " #include <stdio.h>\n"
3311 " #include <stdlib.h>\n"
3312 " #include <unistd.h>\n"
3313 " #include <dlfcn.h>\n"
3314 " #include <guestfs.h>\n"
3320 #: ../src/guestfs.pod:1477
3325 " #ifdef LIBGUESTFS_HAVE_DD\n"
3327 " int has_function;\n"
3333 #: ../src/guestfs.pod:1483
3336 " /* Test if the function guestfs_dd is really available. */\n"
3337 " dl = dlopen (NULL, RTLD_LAZY);\n"
3339 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
3340 " exit (EXIT_FAILURE);\n"
3342 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
3349 #: ../src/guestfs.pod:1492
3352 " if (!has_function)\n"
3353 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
3355 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
3356 " /* Now it's safe to call\n"
3357 " guestfs_dd (g, \"foo\", \"bar\");\n"
3361 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
3369 #: ../src/guestfs.pod:1505
3371 "You may think the above is an awful lot of hassle, and it is. There are "
3372 "other ways outside of the C linking system to ensure that this kind of "
3373 "incompatibility never arises, such as using package versioning:"
3378 #: ../src/guestfs.pod:1510
3381 " Requires: libguestfs >= 1.0.80\n"
3387 #: ../src/guestfs.pod:1512
3388 msgid "CALLS WITH OPTIONAL ARGUMENTS"
3393 #: ../src/guestfs.pod:1514
3395 "A recent feature of the API is the introduction of calls which take optional "
3396 "arguments. In C these are declared 3 ways. The main way is as a call which "
3397 "takes variable arguments (ie. C<...>), as in this example:"
3402 #: ../src/guestfs.pod:1519
3405 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
3411 #: ../src/guestfs.pod:1521
3413 "Call this with a list of optional arguments, terminated by C<-1>. So to "
3414 "call with no optional arguments specified:"
3419 #: ../src/guestfs.pod:1524
3422 " guestfs_add_drive_opts (g, filename, -1);\n"
3428 #: ../src/guestfs.pod:1526
3429 msgid "With a single optional argument:"
3434 #: ../src/guestfs.pod:1528
3437 " guestfs_add_drive_opts (g, filename,\n"
3438 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3445 #: ../src/guestfs.pod:1532
3451 #: ../src/guestfs.pod:1534
3454 " guestfs_add_drive_opts (g, filename,\n"
3455 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3456 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
3463 #: ../src/guestfs.pod:1539
3465 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
3471 #: ../src/guestfs.pod:1542
3472 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
3477 #: ../src/guestfs.pod:1544
3479 "The second variant has the same name with the suffix C<_va>, which works the "
3480 "same way but takes a C<va_list>. See the C manual for details. For the "
3481 "example function, this is declared:"
3486 #: ../src/guestfs.pod:1548
3489 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
3496 #: ../src/guestfs.pod:1551
3497 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
3502 #: ../src/guestfs.pod:1553
3504 "The third variant is useful where you need to construct these calls. You "
3505 "pass in a structure where you fill in the optional fields. The structure "
3506 "has a bitmask as the first element which you must set to indicate which "
3507 "fields you have filled in. For our example function the structure and call "
3513 #: ../src/guestfs.pod:1559
3516 " struct guestfs_add_drive_opts_argv {\n"
3517 " uint64_t bitmask;\n"
3519 " const char *format;\n"
3522 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
3523 " const struct guestfs_add_drive_opts_argv *optargs);\n"
3529 #: ../src/guestfs.pod:1568
3530 msgid "You could call it like this:"
3535 #: ../src/guestfs.pod:1570
3538 " struct guestfs_add_drive_opts_argv optargs = {\n"
3539 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
3540 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
3542 " .format = \"qcow2\"\n"
3549 #: ../src/guestfs.pod:1577
3552 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
3558 #: ../src/guestfs.pod:1579 ../src/guestfs-actions.pod:11
3559 #: ../src/guestfs-actions.pod:1844 ../src/guestfs-actions.pod:2234
3560 #: ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1255
3561 #: ../fish/guestfish-actions.pod:1502 ../tools/virt-win-reg.pl:532
3567 #: ../src/guestfs.pod:1585
3568 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
3573 #: ../src/guestfs.pod:1590
3574 msgid "You do not need to fill in all fields of the structure."
3579 #: ../src/guestfs.pod:1594
3581 "There must be a one-to-one correspondence between fields of the structure "
3582 "that are filled in, and bits set in the bitmask."
3587 #: ../src/guestfs.pod:1599
3588 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
3593 #: ../src/guestfs.pod:1601
3595 "In other languages, optional arguments are expressed in the way that is "
3596 "natural for that language. We refer you to the language-specific "
3597 "documentation for more details on that."
3602 #: ../src/guestfs.pod:1605
3603 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
3608 #: ../src/guestfs.pod:1607
3609 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
3614 #: ../src/guestfs.pod:1609
3616 "The child process generates events in some situations. Current events "
3617 "include: receiving a log message, the child process exits."
3622 #: ../src/guestfs.pod:1612
3624 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
3630 #: ../src/guestfs.pod:1615
3632 "Only I<one callback of each type> can be registered for each handle. "
3633 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
3634 "that type. Cancel all callbacks of this type by calling this function with "
3635 "C<cb> set to C<NULL>."
3640 #: ../src/guestfs.pod:1620
3641 msgid "guestfs_set_log_message_callback"
3646 #: ../src/guestfs.pod:1622
3649 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
3650 " char *buf, int len);\n"
3651 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
3652 " guestfs_log_message_cb cb,\n"
3659 #: ../src/guestfs.pod:1628
3661 "The callback function C<cb> will be called whenever qemu or the guest writes "
3662 "anything to the console."
3667 #: ../src/guestfs.pod:1631
3668 msgid "Use this function to capture kernel messages and similar."
3673 #: ../src/guestfs.pod:1633
3675 "Normally there is no log message handler, and log messages are just "
3681 #: ../src/guestfs.pod:1636
3682 msgid "guestfs_set_subprocess_quit_callback"
3687 #: ../src/guestfs.pod:1638
3690 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
3691 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
3692 " guestfs_subprocess_quit_cb cb,\n"
3699 #: ../src/guestfs.pod:1643
3701 "The callback function C<cb> will be called when the child process quits, "
3702 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
3703 "corresponds to a transition from any state to the CONFIG state)."
3708 #: ../src/guestfs.pod:1648
3709 msgid "guestfs_set_launch_done_callback"
3714 #: ../src/guestfs.pod:1650
3717 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
3718 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
3719 " guestfs_launch_done_cb cb,\n"
3726 #: ../src/guestfs.pod:1655
3728 "The callback function C<cb> will be called when the child process becomes "
3729 "ready first time after it has been launched. (This corresponds to a "
3730 "transition from LAUNCHING to the READY state)."
3735 #: ../src/guestfs.pod:1659
3736 msgid "guestfs_set_close_callback"
3741 #: ../src/guestfs.pod:1661
3744 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
3745 " void guestfs_set_close_callback (guestfs_h *g,\n"
3746 " guestfs_close_cb cb,\n"
3753 #: ../src/guestfs.pod:1666
3755 "The callback function C<cb> will be called while the handle is being closed "
3756 "(synchronously from L</guestfs_close>)."
3761 #: ../src/guestfs.pod:1669
3763 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
3764 "handles that are open when the program exits. This means that this callback "
3765 "might be called indirectly from L<exit(3)>, which can cause unexpected "
3766 "problems in higher-level languages (eg. if your HLL interpreter has already "
3767 "been cleaned up by the time this is called, and if your callback then jumps "
3768 "into some HLL function)."
3773 #: ../src/guestfs.pod:1677
3774 msgid "guestfs_set_progress_callback"
3779 #: ../src/guestfs.pod:1679
3782 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
3783 " int proc_nr, int serial,\n"
3784 " uint64_t position, uint64_t total);\n"
3785 " void guestfs_set_progress_callback (guestfs_h *g,\n"
3786 " guestfs_progress_cb cb,\n"
3793 #: ../src/guestfs.pod:1686
3795 "Some long-running operations can generate progress messages. If this "
3796 "callback is registered, then it will be called each time a progress message "
3797 "is generated (usually two seconds after the operation started, and three "
3798 "times per second thereafter until it completes, although the frequency may "
3799 "change in future versions)."
3804 #: ../src/guestfs.pod:1692
3806 "The callback receives two numbers: C<position> and C<total>. The units of "
3807 "C<total> are not defined, although for some operations C<total> may relate "
3808 "in some way to the amount of data to be transferred (eg. in bytes or "
3809 "megabytes), and C<position> may be the portion which has been transferred."
3814 #: ../src/guestfs.pod:1698
3815 msgid "The only defined and stable parts of the API are:"
3820 #: ../src/guestfs.pod:1704
3822 "The callback can display to the user some type of progress bar or indicator "
3823 "which shows the ratio of C<position>:C<total>."
3828 #: ../src/guestfs.pod:1709
3829 msgid "0 E<lt>= C<position> E<lt>= C<total>"
3833 #: ../src/guestfs.pod:1713
3835 "If any progress notification is sent during a call, then a final progress "
3836 "notification is always sent when C<position> = C<total> (I<unless> the call "
3837 "fails with an error)."
3842 #: ../src/guestfs.pod:1717
3844 "This is to simplify caller code, so callers can easily set the progress "
3845 "indicator to \"100%\" at the end of the operation, without requiring special "
3846 "code to detect this case."
3851 #: ../src/guestfs.pod:1723
3853 "The callback also receives the procedure number and serial number of the "
3854 "call. These are only useful for debugging protocol issues, and the callback "
3855 "can normally ignore them. The callback may want to print these numbers in "
3856 "error messages or debugging messages."
3861 #: ../src/guestfs.pod:1728
3862 msgid "PRIVATE DATA AREA"
3867 #: ../src/guestfs.pod:1730
3869 "You can attach named pieces of private data to the libguestfs handle, and "
3870 "fetch them by name for the lifetime of the handle. This is called the "
3871 "private data area and is only available from the C API."
3876 #: ../src/guestfs.pod:1734
3877 msgid "To attach a named piece of data, use the following call:"
3882 #: ../src/guestfs.pod:1736
3885 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
3891 #: ../src/guestfs.pod:1738
3893 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
3894 "pointer (which can be C<NULL>). Any previous item with the same name is "
3900 #: ../src/guestfs.pod:1742
3902 "You can use any C<key> you want, but names beginning with an underscore "
3903 "character are reserved for internal libguestfs purposes (for implementing "
3904 "language bindings). It is recommended to prefix the name with some unique "
3905 "string to avoid collisions with other users."
3910 #: ../src/guestfs.pod:1747
3911 msgid "To retrieve the pointer, use:"
3916 #: ../src/guestfs.pod:1749
3919 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
3925 #: ../src/guestfs.pod:1751
3927 "This function returns C<NULL> if either no data is found associated with "
3928 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
3934 #: ../src/guestfs.pod:1755
3936 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
3937 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
3938 "all. In particular, libguestfs does I<not> try to free the data when the "
3939 "handle is closed. If the data must be freed, then the caller must either "
3940 "free it before calling L</guestfs_close> or must set up a close callback to "
3941 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
3942 "can be registered for a handle)."
3947 #: ../src/guestfs.pod:1763
3949 "The private data area is implemented using a hash table, and should be "
3950 "reasonably efficient for moderate numbers of keys."
3955 #: ../src/guestfs.pod:1766 ../src/guestfs.pod:1771
3961 #: ../src/guestfs.pod:1768
3963 "<!-- old anchor for the next section --> <a name="
3964 "\"state_machine_and_low_level_event_api\"/>"
3969 #: ../src/guestfs.pod:1773
3970 msgid "ARCHITECTURE"
3975 #: ../src/guestfs.pod:1775
3977 "Internally, libguestfs is implemented by running an appliance (a special "
3978 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
3979 "process of the main program."
3984 #: ../src/guestfs.pod:1779
3987 " ___________________\n"
3989 " | main program |\n"
3991 " | | child process / appliance\n"
3992 " | | __________________________\n"
3994 " +-------------------+ RPC | +-----------------+ |\n"
3995 " | libguestfs <--------------------> guestfsd | |\n"
3996 " | | | +-----------------+ |\n"
3997 " \\___________________/ | | Linux kernel | |\n"
3998 " | +--^--------------+ |\n"
3999 " \\_________|________________/\n"
4005 " \\______________/\n"
4011 #: ../src/guestfs.pod:1799
4013 "The library, linked to the main program, creates the child process and hence "
4014 "the appliance in the L</guestfs_launch> function."
4019 #: ../src/guestfs.pod:1802
4021 "Inside the appliance is a Linux kernel and a complete stack of userspace "
4022 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
4023 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
4024 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
4025 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
4026 "attached to the qemu process which translates device access by the "
4027 "appliance's Linux kernel into accesses to the image."
4032 #: ../src/guestfs.pod:1811
4034 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
4035 "Although the disk image you are attached to might also be used by some "
4036 "virtual machine, libguestfs doesn't know or care about this. (But you will "
4037 "care if both libguestfs's qemu process and your virtual machine are trying "
4038 "to update the disk image at the same time, since these usually results in "
4039 "massive disk corruption)."
4044 #: ../src/guestfs.pod:1818
4045 msgid "STATE MACHINE"
4050 #: ../src/guestfs.pod:1820
4051 msgid "libguestfs uses a state machine to model the child process:"
4056 #: ../src/guestfs.pod:1822
4068 " / | \\ \\ guestfs_launch\n"
4069 " / | _\\__V______\n"
4071 " / | | LAUNCHING |\n"
4072 " / | \\___________/\n"
4074 " / | guestfs_launch\n"
4076 " ______ / __|____V\n"
4077 " / \\ ------> / \\\n"
4078 " | BUSY | | READY |\n"
4079 " \\______/ <------ \\________/\n"
4085 #: ../src/guestfs.pod:1844
4087 "The normal transitions are (1) CONFIG (when the handle is created, but there "
4088 "is no child process), (2) LAUNCHING (when the child process is booting up), "
4089 "(3) alternating between READY and BUSY as commands are issued to, and "
4090 "carried out by, the child process."
4095 #: ../src/guestfs.pod:1849
4097 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
4098 "asynchronously at any time (eg. due to some internal error), and that causes "
4099 "the state to transition back to CONFIG."
4104 #: ../src/guestfs.pod:1853
4106 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
4107 "issued when in the CONFIG state."
4112 #: ../src/guestfs.pod:1856
4114 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
4115 "L</guestfs_launch> blocks until the child process is READY to accept "
4116 "commands (or until some failure or timeout). L</guestfs_launch> internally "
4117 "moves the state from CONFIG to LAUNCHING while it is running."
4122 #: ../src/guestfs.pod:1862
4124 "API actions such as L</guestfs_mount> can only be issued when in the READY "
4125 "state. These API calls block waiting for the command to be carried out (ie. "
4126 "the state to transition to BUSY and then back to READY). There are no non-"
4127 "blocking versions, and no way to issue more than one command per handle at "
4133 #: ../src/guestfs.pod:1868
4135 "Finally, the child process sends asynchronous messages back to the main "
4136 "program, such as kernel log messages. You can register a callback to "
4137 "receive these messages."
4142 #: ../src/guestfs.pod:1872
4148 #: ../src/guestfs.pod:1874
4149 msgid "COMMUNICATION PROTOCOL"
4154 #: ../src/guestfs.pod:1876
4156 "Don't rely on using this protocol directly. This section documents how it "
4157 "currently works, but it may change at any time."
4162 #: ../src/guestfs.pod:1879
4164 "The protocol used to talk between the library and the daemon running inside "
4165 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
4166 "1014, RFC 1832, RFC 4506)."
4171 #: ../src/guestfs.pod:1883
4173 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
4174 "this file is automatically generated)."
4179 #: ../src/guestfs.pod:1886
4181 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
4182 "and C<FileOut> parameters, which are handled with very simple request/reply "
4183 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
4184 "parameters, which use the same request and reply messages, but they may also "
4185 "be followed by files sent using a chunked encoding."
4190 #: ../src/guestfs.pod:1893
4191 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
4196 #: ../src/guestfs.pod:1895
4197 msgid "For ordinary functions, the request message is:"
4202 #: ../src/guestfs.pod:1897
4205 " total length (header + arguments,\n"
4206 " but not including the length word itself)\n"
4207 " struct guestfs_message_header (encoded as XDR)\n"
4208 " struct guestfs_<foo>_args (encoded as XDR)\n"
4214 #: ../src/guestfs.pod:1902
4216 "The total length field allows the daemon to allocate a fixed size buffer "
4217 "into which it slurps the rest of the message. As a result, the total length "
4218 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
4219 "effective size of any request is limited to somewhere under this size."
4224 #: ../src/guestfs.pod:1908
4226 "Note also that many functions don't take any arguments, in which case the "
4227 "C<guestfs_I<foo>_args> is completely omitted."
4232 #: ../src/guestfs.pod:1911
4234 "The header contains the procedure number (C<guestfs_proc>) which is how the "
4235 "receiver knows what type of args structure to expect, or none at all."
4240 #: ../src/guestfs.pod:1915
4242 "For functions that take optional arguments, the optional arguments are "
4243 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
4244 "arguments. A bitmask in the header indicates which optional arguments are "
4245 "meaningful. The bitmask is also checked to see if it contains bits set "
4246 "which the daemon does not know about (eg. if more optional arguments were "
4247 "added in a later version of the library), and this causes the call to be "
4253 #: ../src/guestfs.pod:1923
4254 msgid "The reply message for ordinary functions is:"
4259 #: ../src/guestfs.pod:1925
4262 " total length (header + ret,\n"
4263 " but not including the length word itself)\n"
4264 " struct guestfs_message_header (encoded as XDR)\n"
4265 " struct guestfs_<foo>_ret (encoded as XDR)\n"
4271 #: ../src/guestfs.pod:1930
4273 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
4274 "functions that return no formal return values."
4279 #: ../src/guestfs.pod:1933
4281 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
4286 #: ../src/guestfs.pod:1936
4288 "In the case of an error, a flag is set in the header, and the reply message "
4289 "is slightly changed:"
4294 #: ../src/guestfs.pod:1939
4297 " total length (header + error,\n"
4298 " but not including the length word itself)\n"
4299 " struct guestfs_message_header (encoded as XDR)\n"
4300 " struct guestfs_message_error (encoded as XDR)\n"
4306 #: ../src/guestfs.pod:1944
4308 "The C<guestfs_message_error> structure contains the error message as a "
4314 #: ../src/guestfs.pod:1947
4315 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
4320 #: ../src/guestfs.pod:1949
4322 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
4323 "The normal request message is sent (see above). However this is followed by "
4324 "a sequence of file chunks."
4329 #: ../src/guestfs.pod:1953
4332 " total length (header + arguments,\n"
4333 " but not including the length word itself,\n"
4334 " and not including the chunks)\n"
4335 " struct guestfs_message_header (encoded as XDR)\n"
4336 " struct guestfs_<foo>_args (encoded as XDR)\n"
4337 " sequence of chunks for FileIn param #0\n"
4338 " sequence of chunks for FileIn param #1 etc.\n"
4344 #: ../src/guestfs.pod:1961
4345 msgid "The \"sequence of chunks\" is:"
4350 #: ../src/guestfs.pod:1963
4353 " length of chunk (not including length word itself)\n"
4354 " struct guestfs_chunk (encoded as XDR)\n"
4355 " length of chunk\n"
4356 " struct guestfs_chunk (encoded as XDR)\n"
4358 " length of chunk\n"
4359 " struct guestfs_chunk (with data.data_len == 0)\n"
4365 #: ../src/guestfs.pod:1971
4367 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
4368 "is set in the final chunk to indicate either successful completion or early "
4374 #: ../src/guestfs.pod:1975
4376 "At time of writing there are no functions that have more than one FileIn "
4377 "parameter. However this is (theoretically) supported, by sending the "
4378 "sequence of chunks for each FileIn parameter one after another (from left to "
4384 #: ../src/guestfs.pod:1980
4386 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
4387 "transfer. The library does this by sending a chunk with a special flag set "
4388 "to indicate cancellation. When the daemon sees this, it cancels the whole "
4389 "RPC, does I<not> send any reply, and goes back to reading the next request."
4394 #: ../src/guestfs.pod:1986
4396 "The daemon may also cancel. It does this by writing a special word "
4397 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
4398 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
4399 "cancel chunk). The special word is chosen so that even if cancellation "
4400 "happens right at the end of the transfer (after the library has finished "
4401 "writing and has started listening for the reply), the \"spurious\" cancel "
4402 "flag will not be confused with the reply message."
4407 #: ../src/guestfs.pod:1995
4409 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
4410 "limit), and also files where the size is not known in advance (eg. from "
4411 "pipes or sockets). However the chunks are rather small "
4412 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
4413 "to keep much in memory."
4418 #: ../src/guestfs.pod:2001
4419 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
4424 #: ../src/guestfs.pod:2003
4426 "The protocol for FileOut parameters is exactly the same as for FileIn "
4427 "parameters, but with the roles of daemon and library reversed."
4432 #: ../src/guestfs.pod:2006
4435 " total length (header + ret,\n"
4436 " but not including the length word itself,\n"
4437 " and not including the chunks)\n"
4438 " struct guestfs_message_header (encoded as XDR)\n"
4439 " struct guestfs_<foo>_ret (encoded as XDR)\n"
4440 " sequence of chunks for FileOut param #0\n"
4441 " sequence of chunks for FileOut param #1 etc.\n"
4447 #: ../src/guestfs.pod:2014
4448 msgid "INITIAL MESSAGE"
4453 #: ../src/guestfs.pod:2016
4455 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
4456 "which indicates that the guest and daemon is alive. This is what L</"
4457 "guestfs_launch> waits for."
4462 #: ../src/guestfs.pod:2020
4463 msgid "PROGRESS NOTIFICATION MESSAGES"
4468 #: ../src/guestfs.pod:2022
4470 "The daemon may send progress notification messages at any time. These are "
4471 "distinguished by the normal length word being replaced by "
4472 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
4477 #: ../src/guestfs.pod:2026
4479 "The library turns them into progress callbacks (see "
4480 "C<guestfs_set_progress_callback>) if there is a callback registered, or "
4481 "discards them if not."
4486 #: ../src/guestfs.pod:2030
4488 "The daemon self-limits the frequency of progress messages it sends (see "
4489 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
4495 #: ../src/guestfs.pod:2034
4496 msgid "LIBGUESTFS VERSION NUMBERS"
4501 #: ../src/guestfs.pod:2036
4503 "Since April 2010, libguestfs has started to make separate development and "
4504 "stable releases, along with corresponding branches in our git repository. "
4505 "These separate releases can be identified by version number:"
4510 #: ../src/guestfs.pod:2041
4513 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
4514 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
4520 " | `-------- sub-version\n"
4522 " `------ always '1' because we don't change the ABI\n"
4528 #: ../src/guestfs.pod:2052
4529 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
4534 #: ../src/guestfs.pod:2054
4536 "As time passes we cherry pick fixes from the development branch and backport "
4537 "those into the stable branch, the effect being that the stable branch should "
4538 "get more stable and less buggy over time. So the stable releases are ideal "
4539 "for people who don't need new features but would just like the software to "
4545 #: ../src/guestfs.pod:2060
4546 msgid "Our criteria for backporting changes are:"
4551 #: ../src/guestfs.pod:2066
4553 "Documentation changes which don't affect any code are backported unless the "
4554 "documentation refers to a future feature which is not in stable."
4559 #: ../src/guestfs.pod:2072
4561 "Bug fixes which are not controversial, fix obvious problems, and have been "
4562 "well tested are backported."
4567 #: ../src/guestfs.pod:2077
4569 "Simple rearrangements of code which shouldn't affect how it works get "
4570 "backported. This is so that the code in the two branches doesn't get too "
4571 "far out of step, allowing us to backport future fixes more easily."
4576 #: ../src/guestfs.pod:2083
4578 "We I<don't> backport new features, new APIs, new tools etc, except in one "
4579 "exceptional case: the new feature is required in order to implement an "
4580 "important bug fix."
4585 #: ../src/guestfs.pod:2089
4587 "A new stable branch starts when we think the new features in development are "
4588 "substantial and compelling enough over the current stable branch to warrant "
4589 "it. When that happens we create new stable and development versions 1.N.0 "
4590 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
4591 "stable at this point, but by backporting fixes from development, that branch "
4592 "will stabilize over time."
4596 #: ../src/guestfs.pod:2097
4597 msgid "EXTENDING LIBGUESTFS"
4601 #: ../src/guestfs.pod:2099
4602 msgid "ADDING A NEW API ACTION"
4606 #: ../src/guestfs.pod:2101
4608 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
4609 "documentation) are generated, and this makes it easy to extend the "
4614 #: ../src/guestfs.pod:2105
4615 msgid "To add a new API action there are two changes:"
4619 #: ../src/guestfs.pod:2111
4621 "You need to add a description of the call (name, parameters, return type, "
4622 "tests, documentation) to C<generator/generator_actions.ml>."
4626 #: ../src/guestfs.pod:2114
4628 "There are two sorts of API action, depending on whether the call goes "
4629 "through to the daemon in the appliance, or is serviced entirely by the "
4630 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
4631 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
4632 "an example of the latter, since a trace flag is maintained in the handle and "
4633 "all tracing is done on the library side."
4637 #: ../src/guestfs.pod:2122
4639 "Most new actions are of the first type, and get added to the "
4640 "C<daemon_functions> list. Each function has a unique procedure number used "
4641 "in the RPC protocol which is assigned to that action when we publish "
4642 "libguestfs and cannot be reused. Take the latest procedure number and "
4647 #: ../src/guestfs.pod:2128
4649 "For library-only actions of the second type, add to the "
4650 "C<non_daemon_functions> list. Since these functions are serviced by the "
4651 "library and do not travel over the RPC mechanism to the daemon, these "
4652 "functions do not need a procedure number, and so the procedure number is set "
4657 #: ../src/guestfs.pod:2136
4658 msgid "Implement the action (in C):"
4662 #: ../src/guestfs.pod:2138
4664 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
4665 "C<daemon/> directory."
4669 #: ../src/guestfs.pod:2141
4671 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
4672 "(note: double underscore) in the C<src/> directory."
4676 #: ../src/guestfs.pod:2144
4677 msgid "In either case, use another function as an example of what to do."
4681 #: ../src/guestfs.pod:2148
4682 msgid "After making these changes, use C<make> to compile."
4686 #: ../src/guestfs.pod:2150
4688 "Note that you don't need to implement the RPC, language bindings, manual "
4689 "pages or anything else. It's all automatically generated from the OCaml "
4694 #: ../src/guestfs.pod:2154
4695 msgid "ADDING TESTS FOR AN API ACTION"
4699 #: ../src/guestfs.pod:2156
4701 "You can supply zero or as many tests as you want per API call. The tests "
4702 "can either be added as part of the API description (C<generator/"
4703 "generator_actions.ml>), or in some rarer cases you may want to drop a script "
4704 "into C<regressions/>. Note that adding a script to C<regressions/> is "
4705 "slower, so if possible use the first method."
4709 #: ../src/guestfs.pod:2162
4711 "The following describes the test environment used when you add an API test "
4712 "in C<generator_actions.ml>."
4716 #: ../src/guestfs.pod:2165
4717 msgid "The test environment has 4 block devices:"
4721 #: ../src/guestfs.pod:2169
4722 msgid "C</dev/sda> 500MB"
4726 #: ../src/guestfs.pod:2171
4727 msgid "General block device for testing."
4731 #: ../src/guestfs.pod:2173
4732 msgid "C</dev/sdb> 50MB"
4736 #: ../src/guestfs.pod:2175
4738 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
4743 #: ../src/guestfs.pod:2178
4744 msgid "C</dev/sdc> 10MB"
4748 #: ../src/guestfs.pod:2180
4749 msgid "Used in a few tests where two block devices are needed."
4753 #: ../src/guestfs.pod:2182
4758 #: ../src/guestfs.pod:2184
4759 msgid "ISO with fixed content (see C<images/test.iso>)."
4763 #: ../src/guestfs.pod:2188
4765 "To be able to run the tests in a reasonable amount of time, the libguestfs "
4766 "appliance and block devices are reused between tests. So don't try testing "
4767 "L</guestfs_kill_subprocess> :-x"
4771 #: ../src/guestfs.pod:2192
4773 "Each test starts with an initial scenario, selected using one of the "
4774 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
4775 "initialize the disks mentioned above in a particular way as documented in "
4776 "C<generator_types.ml>. You should not assume anything about the previous "
4777 "contents of other disks that are not initialized."
4781 #: ../src/guestfs.pod:2198
4783 "You can add a prerequisite clause to any individual test. This is a run-"
4784 "time check, which, if it fails, causes the test to be skipped. Useful if "
4785 "testing a command which might not work on all variations of libguestfs "
4786 "builds. A test that has prerequisite of C<Always> means to run "
4791 #: ../src/guestfs.pod:2204
4793 "In addition, packagers can skip individual tests by setting environment "
4794 "variables before running C<make check>."
4798 #: ../src/guestfs.pod:2207
4801 " SKIP_TEST_<CMD>_<NUM>=1\n"
4806 #: ../src/guestfs.pod:2209
4807 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
4811 #: ../src/guestfs.pod:2211
4816 #: ../src/guestfs.pod:2213
4819 " SKIP_TEST_<CMD>=1\n"
4824 #: ../src/guestfs.pod:2215
4825 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
4829 #: ../src/guestfs.pod:2217
4830 msgid "Packagers can run only certain tests by setting for example:"
4834 #: ../src/guestfs.pod:2219
4837 " TEST_ONLY=\"vfs_type zerofree\"\n"
4842 #: ../src/guestfs.pod:2221
4844 "See C<capitests/tests.c> for more details of how these environment variables "
4849 #: ../src/guestfs.pod:2224
4850 msgid "DEBUGGING NEW API ACTIONS"
4854 #: ../src/guestfs.pod:2226
4855 msgid "Test new actions work before submitting them."
4859 #: ../src/guestfs.pod:2228
4860 msgid "You can use guestfish to try out new commands."
4864 #: ../src/guestfs.pod:2230
4866 "Debugging the daemon is a problem because it runs inside a minimal "
4867 "environment. However you can fprintf messages in the daemon to stderr, and "
4868 "they will show up if you use C<guestfish -v>."
4872 #: ../src/guestfs.pod:2234
4873 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
4877 #: ../src/guestfs.pod:2236
4879 "Our C source code generally adheres to some basic code-formatting "
4880 "conventions. The existing code base is not totally consistent on this "
4881 "front, but we do prefer that contributed code be formatted similarly. In "
4882 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
4883 "indentation level, and other than that, follow the K&R style."
4887 #: ../src/guestfs.pod:2242
4889 "If you use Emacs, add the following to one of one of your start-up files (e."
4890 "g., ~/.emacs), to help ensure that you get indentation right:"
4894 #: ../src/guestfs.pod:2245
4897 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
4898 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
4899 " (add-hook 'find-file-hook\n"
4900 " '(lambda () (if (and buffer-file-name\n"
4901 " (string-match \"/libguestfs\\\\>\"\n"
4902 " (buffer-file-name))\n"
4903 " (not (string-equal mode-name \"Change Log\"))\n"
4904 " (not (string-equal mode-name \"Makefile\")))\n"
4905 " (setq indent-tabs-mode nil))))\n"
4910 #: ../src/guestfs.pod:2255
4913 " ;;; When editing C sources in libguestfs, use this style.\n"
4914 " (defun libguestfs-c-mode ()\n"
4915 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
4917 " (c-set-style \"K&R\")\n"
4918 " (setq c-indent-level 2)\n"
4919 " (setq c-basic-offset 2))\n"
4920 " (add-hook 'c-mode-hook\n"
4921 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
4922 " (buffer-file-name))\n"
4923 " (libguestfs-c-mode))))\n"
4928 #: ../src/guestfs.pod:2267
4929 msgid "Enable warnings when compiling (and fix any problems this finds):"
4933 #: ../src/guestfs.pod:2270
4936 " ./configure --enable-gcc-warnings\n"
4941 #: ../src/guestfs.pod:2272
4942 msgid "Useful targets are:"
4946 #: ../src/guestfs.pod:2274
4949 " make syntax-check # checks the syntax of the C code\n"
4950 " make check # runs the test suite\n"
4955 #: ../src/guestfs.pod:2277
4956 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
4960 #: ../src/guestfs.pod:2279
4962 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
4963 "which are used to do shell quoting."
4967 #: ../src/guestfs.pod:2284
4972 #: ../src/guestfs.pod:2286
4974 "Simple shell quoted string. Any spaces or other shell characters are "
4979 #: ../src/guestfs.pod:2289
4984 #: ../src/guestfs.pod:2291
4986 "Same as C<%Q> except the string is treated as a path which is prefixed by "
4992 #: ../src/guestfs.pod:2296 ../fish/guestfish.pod:240 ../fish/guestfish.pod:594
4993 msgid "For example:"
4997 #: ../src/guestfs.pod:2298
5000 " asprintf (&cmd, \"cat %R\", path);\n"
5005 #: ../src/guestfs.pod:2300
5006 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
5010 #: ../src/guestfs.pod:2302
5012 "I<Note:> Do I<not> use these when you are passing parameters to the C<command"
5013 "{,r,v,rv}()> functions. These parameters do NOT need to be quoted because "
5014 "they are not passed via the shell (instead, straight to exec). You probably "
5015 "want to use the C<sysroot_path()> function however."
5019 #: ../src/guestfs.pod:2308
5020 msgid "SUBMITTING YOUR NEW API ACTIONS"
5024 #: ../src/guestfs.pod:2310
5026 "Submit patches to the mailing list: L<http://www.redhat.com/mailman/listinfo/"
5027 "libguestfs> and CC to L<rjones@redhat.com>."
5031 #: ../src/guestfs.pod:2314
5032 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
5036 #: ../src/guestfs.pod:2316
5037 msgid "We support i18n (gettext anyhow) in the library."
5041 #: ../src/guestfs.pod:2318
5043 "However many messages come from the daemon, and we don't translate those at "
5044 "the moment. One reason is that the appliance generally has all locale files "
5045 "removed from it, because they take up a lot of space. So we'd have to readd "
5046 "some of those, as well as copying our PO files into the appliance."
5050 #: ../src/guestfs.pod:2324
5052 "Debugging messages are never translated, since they are intended for the "
5057 #: ../src/guestfs.pod:2327
5058 msgid "SOURCE CODE SUBDIRECTORIES"
5062 #: ../src/guestfs.pod:2331
5063 msgid "C<appliance>"
5067 #: ../src/guestfs.pod:2333
5068 msgid "The libguestfs appliance, build scripts and so on."
5072 #: ../src/guestfs.pod:2335
5073 msgid "C<capitests>"
5077 #: ../src/guestfs.pod:2337
5078 msgid "Automated tests of the C API."
5082 #: ../src/guestfs.pod:2339
5087 #: ../src/guestfs.pod:2341
5089 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
5094 #: ../src/guestfs.pod:2344
5099 #: ../src/guestfs.pod:2346
5101 "Safety and liveness tests of components that libguestfs depends upon (not of "
5102 "libguestfs itself). Mainly this is for qemu and the kernel."
5106 #: ../src/guestfs.pod:2349
5111 #: ../src/guestfs.pod:2351
5112 msgid "Outside contributions, experimental parts."
5116 #: ../src/guestfs.pod:2353
5121 #: ../src/guestfs.pod:2355
5123 "The daemon that runs inside the libguestfs appliance and carries out actions."
5127 #: ../src/guestfs.pod:2358
5132 #: ../src/guestfs.pod:2360
5133 msgid "L<virt-df(1)> command and documentation."
5137 #: ../src/guestfs.pod:2362
5142 #: ../src/guestfs.pod:2364
5143 msgid "C API example code."
5147 #: ../src/guestfs.pod:2366
5152 #: ../src/guestfs.pod:2368
5153 msgid "L<guestfish(1)>, the command-line shell."
5157 #: ../src/guestfs.pod:2370
5162 #: ../src/guestfs.pod:2372
5164 "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
5168 #: ../src/guestfs.pod:2374
5169 msgid "C<generator>"
5173 #: ../src/guestfs.pod:2376
5175 "The crucially important generator, used to automatically generate large "
5176 "amounts of boilerplate C code for things like RPC and bindings."
5180 #: ../src/guestfs.pod:2379
5185 #: ../src/guestfs.pod:2381
5186 msgid "Files used by the test suite."
5190 #: ../src/guestfs.pod:2383
5191 msgid "Some \"phony\" guest images which we test against."
5195 #: ../src/guestfs.pod:2385
5196 msgid "C<inspector>"
5200 #: ../src/guestfs.pod:2387
5201 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
5205 #: ../src/guestfs.pod:2389
5210 #: ../src/guestfs.pod:2391
5211 msgid "M4 macros used by autoconf."
5215 #: ../src/guestfs.pod:2393
5220 #: ../src/guestfs.pod:2395
5221 msgid "Translations of simple gettext strings."
5225 #: ../src/guestfs.pod:2397
5230 #: ../src/guestfs.pod:2399
5232 "The build infrastructure and PO files for translations of manpages and POD "
5233 "files. Eventually this will be combined with the C<po> directory, but that "
5234 "is rather complicated."
5238 #: ../src/guestfs.pod:2403
5239 msgid "C<regressions>"
5243 #: ../src/guestfs.pod:2405
5244 msgid "Regression tests."
5248 #: ../src/guestfs.pod:2407
5253 #: ../src/guestfs.pod:2409
5254 msgid "L<virt-rescue(1)> command and documentation."
5258 #: ../src/guestfs.pod:2411
5263 #: ../src/guestfs.pod:2413
5264 msgid "Source code to the C library."
5268 #: ../src/guestfs.pod:2415
5273 #: ../src/guestfs.pod:2417
5274 msgid "Command line tools written in Perl (L<virt-resize(1)> and many others)."
5278 #: ../src/guestfs.pod:2419
5279 msgid "C<test-tool>"
5283 #: ../src/guestfs.pod:2421
5285 "Test tool for end users to test if their qemu/kernel combination will work "
5290 #: ../src/guestfs.pod:2424
5295 #: ../src/guestfs.pod:2426
5300 #: ../src/guestfs.pod:2428
5305 #: ../src/guestfs.pod:2430
5310 #: ../src/guestfs.pod:2432
5315 #: ../src/guestfs.pod:2434
5320 #: ../src/guestfs.pod:2436
5325 #: ../src/guestfs.pod:2438
5330 #: ../src/guestfs.pod:2440
5331 msgid "Language bindings."
5336 #: ../src/guestfs.pod:2444 ../fish/guestfish.pod:976
5337 #: ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:375
5338 msgid "ENVIRONMENT VARIABLES"
5343 #: ../src/guestfs.pod:2448 ../fish/guestfish.pod:1002
5344 msgid "LIBGUESTFS_APPEND"
5349 #: ../src/guestfs.pod:2450 ../fish/guestfish.pod:1004
5350 msgid "Pass additional options to the guest kernel."
5355 #: ../src/guestfs.pod:2452 ../fish/guestfish.pod:1006
5356 msgid "LIBGUESTFS_DEBUG"
5361 #: ../src/guestfs.pod:2454
5363 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
5364 "effect as calling C<guestfs_set_verbose (g, 1)>."
5369 #: ../src/guestfs.pod:2457 ../fish/guestfish.pod:1011
5370 msgid "LIBGUESTFS_MEMSIZE"
5375 #: ../src/guestfs.pod:2459 ../fish/guestfish.pod:1013
5377 "Set the memory allocated to the qemu process, in megabytes. For example:"
5382 #: ../src/guestfs.pod:2462 ../fish/guestfish.pod:1016
5385 " LIBGUESTFS_MEMSIZE=700\n"
5391 #: ../src/guestfs.pod:2464 ../fish/guestfish.pod:1018
5392 msgid "LIBGUESTFS_PATH"
5396 #: ../src/guestfs.pod:2466
5398 "Set the path that libguestfs uses to search for a supermin appliance. See "
5399 "the discussion of paths in section L</PATH> above."
5404 #: ../src/guestfs.pod:2469 ../fish/guestfish.pod:1023
5405 msgid "LIBGUESTFS_QEMU"
5410 #: ../src/guestfs.pod:2471 ../fish/guestfish.pod:1025
5412 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
5413 "which was found at compile time by the configure script is used."
5418 #: ../src/guestfs.pod:2475
5419 msgid "See also L</QEMU WRAPPERS> above."
5424 #: ../src/guestfs.pod:2477 ../fish/guestfish.pod:1029
5425 msgid "LIBGUESTFS_TRACE"
5430 #: ../src/guestfs.pod:2479
5432 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
5433 "effect as calling C<guestfs_set_trace (g, 1)>."
5438 #: ../src/guestfs.pod:2482 ../fish/guestfish.pod:1038
5444 #: ../src/guestfs.pod:2484 ../fish/guestfish.pod:1040
5445 msgid "Location of temporary directory, defaults to C</tmp>."
5450 #: ../src/guestfs.pod:2486 ../fish/guestfish.pod:1042
5452 "If libguestfs was compiled to use the supermin appliance then the real "
5453 "appliance is cached in this directory, shared between all handles belonging "
5454 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
5455 "use in case C</tmp> is not large enough."
5460 #: ../src/guestfs.pod:2494 ../fish/guestfish.pod:1100
5461 #: ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:233
5462 #: ../tools/virt-edit.pl:395 ../tools/virt-win-reg.pl:572
5463 #: ../tools/virt-resize.pl:1483 ../tools/virt-list-filesystems.pl:189
5464 #: ../tools/virt-tar.pl:281 ../tools/virt-make-fs.pl:539
5465 #: ../tools/virt-list-partitions.pl:257
5471 #: ../src/guestfs.pod:2496
5473 "L<guestfs-examples(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, L<guestfs-"
5474 "ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-df(1)>, "
5475 "L<virt-edit(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-"
5476 "filesystems(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)"
5477 ">, L<virt-rescue(1)>, L<virt-tar(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
5478 "L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
5483 #: ../src/guestfs.pod:2519
5485 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
5486 "(8)>, L<disktype(1)>."
5491 #: ../src/guestfs.pod:2526 ../tools/virt-win-reg.pl:587
5492 #: ../tools/virt-make-fs.pl:553
5498 #: ../src/guestfs.pod:2528
5499 msgid "To get a list of bugs against libguestfs use this link:"
5504 #: ../src/guestfs.pod:2530
5506 "L<https://bugzilla.redhat.com/buglist.cgi?"
5507 "component=libguestfs&product=Virtualization+Tools>"
5512 #: ../src/guestfs.pod:2532
5513 msgid "To report a new bug against libguestfs use this link:"
5518 #: ../src/guestfs.pod:2534
5520 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
5521 "component=libguestfs&product=Virtualization+Tools>"
5526 #: ../src/guestfs.pod:2536
5527 msgid "When reporting a bug, please check:"
5532 #: ../src/guestfs.pod:2542
5533 msgid "That the bug hasn't been reported already."
5538 #: ../src/guestfs.pod:2546
5539 msgid "That you are testing a recent version."
5544 #: ../src/guestfs.pod:2550
5545 msgid "Describe the bug accurately, and give a way to reproduce it."
5550 #: ../src/guestfs.pod:2554
5552 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
5558 #: ../src/guestfs.pod:2559 ../fish/guestfish.pod:1119
5559 #: ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:244
5565 #: ../src/guestfs.pod:2561 ../fish/guestfish.pod:1121
5566 #: ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:246
5567 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
5572 #: ../src/guestfs.pod:2563 ../fish/guestfish.pod:1123
5573 #: ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:248
5574 #: ../tools/virt-edit.pl:411 ../tools/virt-win-reg.pl:602
5575 #: ../tools/virt-resize.pl:1508 ../tools/virt-list-filesystems.pl:206
5576 #: ../tools/virt-tar.pl:296 ../tools/virt-make-fs.pl:568
5577 #: ../tools/virt-list-partitions.pl:273
5583 #: ../src/guestfs.pod:2565 ../fish/guestfish.pod:1125
5584 #: ../fuse/guestmount.pod:250
5585 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
5590 #: ../src/guestfs.pod:2568
5592 "This library is free software; you can redistribute it and/or modify it "
5593 "under the terms of the GNU Lesser General Public License as published by the "
5594 "Free Software Foundation; either version 2 of the License, or (at your "
5595 "option) any later version."
5600 #: ../src/guestfs.pod:2573
5602 "This library is distributed in the hope that it will be useful, but WITHOUT "
5603 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
5604 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
5610 #: ../src/guestfs.pod:2578
5612 "You should have received a copy of the GNU Lesser General Public License "
5613 "along with this library; if not, write to the Free Software Foundation, "
5614 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
5619 #: ../src/guestfs-actions.pod:1
5620 msgid "guestfs_add_cdrom"
5625 #: ../src/guestfs-actions.pod:3
5629 " guestfs_add_cdrom (guestfs_h *g,\n"
5630 " const char *filename);\n"
5636 #: ../src/guestfs-actions.pod:7 ../fish/guestfish-actions.pod:5
5637 msgid "This function adds a virtual CD-ROM disk image to the guest."
5642 #: ../src/guestfs-actions.pod:9 ../fish/guestfish-actions.pod:7
5643 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
5648 #: ../src/guestfs-actions.pod:17
5650 "This call checks for the existence of C<filename>. This stops you from "
5651 "specifying other types of drive which are supported by qemu such as C<nbd:> "
5652 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
5658 #: ../src/guestfs-actions.pod:24
5660 "If you just want to add an ISO file (often you use this as an efficient way "
5661 "to transfer large files into the guest), then you should probably use "
5662 "C<guestfs_add_drive_ro> instead."
5667 #: ../src/guestfs-actions.pod:30 ../src/guestfs-actions.pod:126
5668 #: ../src/guestfs-actions.pod:187 ../src/guestfs-actions.pod:224
5669 #: ../src/guestfs-actions.pod:238 ../src/guestfs-actions.pod:259
5670 #: ../src/guestfs-actions.pod:279 ../src/guestfs-actions.pod:293
5671 #: ../src/guestfs-actions.pod:413 ../src/guestfs-actions.pod:433
5672 #: ../src/guestfs-actions.pod:447 ../src/guestfs-actions.pod:492
5673 #: ../src/guestfs-actions.pod:520 ../src/guestfs-actions.pod:538
5674 #: ../src/guestfs-actions.pod:605 ../src/guestfs-actions.pod:638
5675 #: ../src/guestfs-actions.pod:652 ../src/guestfs-actions.pod:667
5676 #: ../src/guestfs-actions.pod:766 ../src/guestfs-actions.pod:784
5677 #: ../src/guestfs-actions.pod:798 ../src/guestfs-actions.pod:812
5678 #: ../src/guestfs-actions.pod:973 ../src/guestfs-actions.pod:993
5679 #: ../src/guestfs-actions.pod:1011 ../src/guestfs-actions.pod:1095
5680 #: ../src/guestfs-actions.pod:1113 ../src/guestfs-actions.pod:1132
5681 #: ../src/guestfs-actions.pod:1146 ../src/guestfs-actions.pod:1166
5682 #: ../src/guestfs-actions.pod:1236 ../src/guestfs-actions.pod:1267
5683 #: ../src/guestfs-actions.pod:1292 ../src/guestfs-actions.pod:1329
5684 #: ../src/guestfs-actions.pod:1435 ../src/guestfs-actions.pod:1469
5685 #: ../src/guestfs-actions.pod:1684 ../src/guestfs-actions.pod:1706
5686 #: ../src/guestfs-actions.pod:1793 ../src/guestfs-actions.pod:2267
5687 #: ../src/guestfs-actions.pod:2411 ../src/guestfs-actions.pod:2472
5688 #: ../src/guestfs-actions.pod:2507 ../src/guestfs-actions.pod:3250
5689 #: ../src/guestfs-actions.pod:3265 ../src/guestfs-actions.pod:3285
5690 #: ../src/guestfs-actions.pod:3440 ../src/guestfs-actions.pod:3454
5691 #: ../src/guestfs-actions.pod:3467 ../src/guestfs-actions.pod:3481
5692 #: ../src/guestfs-actions.pod:3496 ../src/guestfs-actions.pod:3532
5693 #: ../src/guestfs-actions.pod:3604 ../src/guestfs-actions.pod:3624
5694 #: ../src/guestfs-actions.pod:3641 ../src/guestfs-actions.pod:3664
5695 #: ../src/guestfs-actions.pod:3687 ../src/guestfs-actions.pod:3719
5696 #: ../src/guestfs-actions.pod:3738 ../src/guestfs-actions.pod:3757
5697 #: ../src/guestfs-actions.pod:3792 ../src/guestfs-actions.pod:3804
5698 #: ../src/guestfs-actions.pod:3840 ../src/guestfs-actions.pod:3856
5699 #: ../src/guestfs-actions.pod:3869 ../src/guestfs-actions.pod:3884
5700 #: ../src/guestfs-actions.pod:3901 ../src/guestfs-actions.pod:3994
5701 #: ../src/guestfs-actions.pod:4014 ../src/guestfs-actions.pod:4027
5702 #: ../src/guestfs-actions.pod:4078 ../src/guestfs-actions.pod:4096
5703 #: ../src/guestfs-actions.pod:4114 ../src/guestfs-actions.pod:4130
5704 #: ../src/guestfs-actions.pod:4144 ../src/guestfs-actions.pod:4158
5705 #: ../src/guestfs-actions.pod:4175 ../src/guestfs-actions.pod:4190
5706 #: ../src/guestfs-actions.pod:4210 ../src/guestfs-actions.pod:4256
5707 #: ../src/guestfs-actions.pod:4329 ../src/guestfs-actions.pod:4360
5708 #: ../src/guestfs-actions.pod:4379 ../src/guestfs-actions.pod:4398
5709 #: ../src/guestfs-actions.pod:4410 ../src/guestfs-actions.pod:4427
5710 #: ../src/guestfs-actions.pod:4440 ../src/guestfs-actions.pod:4455
5711 #: ../src/guestfs-actions.pod:4470 ../src/guestfs-actions.pod:4505
5712 #: ../src/guestfs-actions.pod:4520 ../src/guestfs-actions.pod:4540
5713 #: ../src/guestfs-actions.pod:4554 ../src/guestfs-actions.pod:4571
5714 #: ../src/guestfs-actions.pod:4620 ../src/guestfs-actions.pod:4666
5715 #: ../src/guestfs-actions.pod:4680 ../src/guestfs-actions.pod:4708
5716 #: ../src/guestfs-actions.pod:4725 ../src/guestfs-actions.pod:4743
5717 #: ../src/guestfs-actions.pod:4877 ../src/guestfs-actions.pod:4934
5718 #: ../src/guestfs-actions.pod:4956 ../src/guestfs-actions.pod:4974
5719 #: ../src/guestfs-actions.pod:5006 ../src/guestfs-actions.pod:5072
5720 #: ../src/guestfs-actions.pod:5089 ../src/guestfs-actions.pod:5102
5721 #: ../src/guestfs-actions.pod:5116 ../src/guestfs-actions.pod:5405
5722 #: ../src/guestfs-actions.pod:5424 ../src/guestfs-actions.pod:5438
5723 #: ../src/guestfs-actions.pod:5450 ../src/guestfs-actions.pod:5464
5724 #: ../src/guestfs-actions.pod:5476 ../src/guestfs-actions.pod:5490
5725 #: ../src/guestfs-actions.pod:5506 ../src/guestfs-actions.pod:5527
5726 #: ../src/guestfs-actions.pod:5546 ../src/guestfs-actions.pod:5565
5727 #: ../src/guestfs-actions.pod:5583 ../src/guestfs-actions.pod:5606
5728 #: ../src/guestfs-actions.pod:5624 ../src/guestfs-actions.pod:5643
5729 #: ../src/guestfs-actions.pod:5664 ../src/guestfs-actions.pod:5683
5730 #: ../src/guestfs-actions.pod:5700 ../src/guestfs-actions.pod:5728
5731 #: ../src/guestfs-actions.pod:5752 ../src/guestfs-actions.pod:5771
5732 #: ../src/guestfs-actions.pod:5795 ../src/guestfs-actions.pod:5810
5733 #: ../src/guestfs-actions.pod:5825 ../src/guestfs-actions.pod:5844
5734 #: ../src/guestfs-actions.pod:5881 ../src/guestfs-actions.pod:5904
5735 #: ../src/guestfs-actions.pod:5930 ../src/guestfs-actions.pod:6038
5736 #: ../src/guestfs-actions.pod:6159 ../src/guestfs-actions.pod:6171
5737 #: ../src/guestfs-actions.pod:6184 ../src/guestfs-actions.pod:6197
5738 #: ../src/guestfs-actions.pod:6219 ../src/guestfs-actions.pod:6232
5739 #: ../src/guestfs-actions.pod:6245 ../src/guestfs-actions.pod:6258
5740 #: ../src/guestfs-actions.pod:6273 ../src/guestfs-actions.pod:6332
5741 #: ../src/guestfs-actions.pod:6349 ../src/guestfs-actions.pod:6365
5742 #: ../src/guestfs-actions.pod:6381 ../src/guestfs-actions.pod:6398
5743 #: ../src/guestfs-actions.pod:6411 ../src/guestfs-actions.pod:6431
5744 #: ../src/guestfs-actions.pod:6467 ../src/guestfs-actions.pod:6481
5745 #: ../src/guestfs-actions.pod:6522 ../src/guestfs-actions.pod:6535
5746 #: ../src/guestfs-actions.pod:6553 ../src/guestfs-actions.pod:6587
5747 #: ../src/guestfs-actions.pod:6623 ../src/guestfs-actions.pod:6742
5748 #: ../src/guestfs-actions.pod:6760 ../src/guestfs-actions.pod:6774
5749 #: ../src/guestfs-actions.pod:6829 ../src/guestfs-actions.pod:6842
5750 #: ../src/guestfs-actions.pod:6887 ../src/guestfs-actions.pod:6920
5751 #: ../src/guestfs-actions.pod:6974 ../src/guestfs-actions.pod:7000
5752 #: ../src/guestfs-actions.pod:7066 ../src/guestfs-actions.pod:7085
5753 #: ../src/guestfs-actions.pod:7114
5754 msgid "This function returns 0 on success or -1 on error."
5758 #: ../src/guestfs-actions.pod:32 ../src/guestfs-actions.pod:240
5759 #: ../src/guestfs-actions.pod:261
5761 "This function is deprecated. In new code, use the L</"
5762 "guestfs_add_drive_opts> call instead."
5767 #: ../src/guestfs-actions.pod:35 ../src/guestfs-actions.pod:243
5768 #: ../src/guestfs-actions.pod:264 ../src/guestfs-actions.pod:1440
5769 #: ../src/guestfs-actions.pod:1923 ../src/guestfs-actions.pod:1944
5770 #: ../src/guestfs-actions.pod:4215 ../src/guestfs-actions.pod:7008
5771 #: ../src/guestfs-actions.pod:7177 ../fish/guestfish-actions.pod:31
5772 #: ../fish/guestfish-actions.pod:154 ../fish/guestfish-actions.pod:168
5773 #: ../fish/guestfish-actions.pod:954 ../fish/guestfish-actions.pod:1308
5774 #: ../fish/guestfish-actions.pod:1322 ../fish/guestfish-actions.pod:2844
5775 #: ../fish/guestfish-actions.pod:4657 ../fish/guestfish-actions.pod:4754
5777 "Deprecated functions will not be removed from the API, but the fact that "
5778 "they are deprecated indicates that there are problems with correct use of "
5784 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:128
5785 #: ../src/guestfs-actions.pod:1097 ../src/guestfs-actions.pod:1895
5786 #: ../src/guestfs-actions.pod:1993 ../src/guestfs-actions.pod:2096
5787 #: ../src/guestfs-actions.pod:3252 ../src/guestfs-actions.pod:3267
5788 #: ../src/guestfs-actions.pod:4507 ../src/guestfs-actions.pod:5585
5789 #: ../src/guestfs-actions.pod:5702 ../src/guestfs-actions.pod:5812
5790 #: ../src/guestfs-actions.pod:6275 ../src/guestfs-actions.pod:6400
5791 #: ../src/guestfs-actions.pod:6922
5792 msgid "(Added in 0.3)"
5797 #: ../src/guestfs-actions.pod:41
5798 msgid "guestfs_add_domain"
5803 #: ../src/guestfs-actions.pod:43
5807 " guestfs_add_domain (guestfs_h *g,\n"
5808 " const char *dom,\n"
5815 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:137
5816 #: ../src/guestfs-actions.pod:4229
5818 "You may supply a list of optional arguments to this call. Use zero or more "
5819 "of the following pairs of parameters, and terminate the list with C<-1> on "
5820 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
5825 #: ../src/guestfs-actions.pod:53
5828 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
5829 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
5830 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
5836 #: ../src/guestfs-actions.pod:57
5838 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
5839 "It works by connecting to libvirt, requesting the domain and domain XML from "
5840 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
5846 #: ../src/guestfs-actions.pod:62 ../fish/guestfish-actions.pod:46
5848 "The number of disks added is returned. This operation is atomic: if an "
5849 "error is returned, then no disks are added."
5854 #: ../src/guestfs-actions.pod:65 ../fish/guestfish-actions.pod:49
5856 "This function does some minimal checks to make sure the libvirt domain is "
5857 "not running (unless C<readonly> is true). In a future version we will try "
5858 "to acquire the libvirt lock on each disk."
5863 #: ../src/guestfs-actions.pod:69 ../fish/guestfish-actions.pod:53
5865 "Disks must be accessible locally. This often means that adding disks from a "
5866 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
5867 "unless those disks are accessible via the same device path locally too."
5871 #: ../src/guestfs-actions.pod:74 ../fish/guestfish-actions.pod:58
5873 "The optional C<libvirturi> parameter sets the libvirt URI (see L<http://"
5874 "libvirt.org/uri.html>). If this is not set then we connect to the default "
5875 "libvirt URI (or one set through an environment variable, see the libvirt "
5876 "documentation for full details)."
5881 #: ../src/guestfs-actions.pod:80
5883 "The other optional parameters are passed directly through to "
5884 "C<guestfs_add_drive_opts>."
5889 #: ../src/guestfs-actions.pod:83 ../src/guestfs-actions.pod:336
5890 #: ../src/guestfs-actions.pod:506 ../src/guestfs-actions.pod:684
5891 #: ../src/guestfs-actions.pod:715 ../src/guestfs-actions.pod:733
5892 #: ../src/guestfs-actions.pod:752 ../src/guestfs-actions.pod:1312
5893 #: ../src/guestfs-actions.pod:1663 ../src/guestfs-actions.pod:1866
5894 #: ../src/guestfs-actions.pod:1965 ../src/guestfs-actions.pod:2005
5895 #: ../src/guestfs-actions.pod:2060 ../src/guestfs-actions.pod:2083
5896 #: ../src/guestfs-actions.pod:2398 ../src/guestfs-actions.pod:2686
5897 #: ../src/guestfs-actions.pod:2707 ../src/guestfs-actions.pod:4643
5898 #: ../src/guestfs-actions.pod:4780 ../src/guestfs-actions.pod:5186
5899 #: ../src/guestfs-actions.pod:5212 ../src/guestfs-actions.pod:6508
5900 #: ../src/guestfs-actions.pod:6933 ../src/guestfs-actions.pod:6946
5901 #: ../src/guestfs-actions.pod:6959
5902 msgid "On error this function returns -1."
5907 #: ../src/guestfs-actions.pod:85
5908 msgid "(Added in 1.7.4)"
5913 #: ../src/guestfs-actions.pod:87
5914 msgid "guestfs_add_domain_va"
5919 #: ../src/guestfs-actions.pod:89
5923 " guestfs_add_domain_va (guestfs_h *g,\n"
5924 " const char *dom,\n"
5931 #: ../src/guestfs-actions.pod:94
5932 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
5937 #: ../src/guestfs-actions.pod:96 ../src/guestfs-actions.pod:107
5938 #: ../src/guestfs-actions.pod:200 ../src/guestfs-actions.pod:211
5939 #: ../src/guestfs-actions.pod:4270 ../src/guestfs-actions.pod:4282
5940 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
5945 #: ../src/guestfs-actions.pod:98
5946 msgid "guestfs_add_domain_argv"
5951 #: ../src/guestfs-actions.pod:100
5955 " guestfs_add_domain_argv (guestfs_h *g,\n"
5956 " const char *dom,\n"
5957 " const struct guestfs_add_domain_argv *optargs);\n"
5963 #: ../src/guestfs-actions.pod:105
5964 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
5969 #: ../src/guestfs-actions.pod:109
5970 msgid "guestfs_add_drive"
5975 #: ../src/guestfs-actions.pod:111
5979 " guestfs_add_drive (guestfs_h *g,\n"
5980 " const char *filename);\n"
5986 #: ../src/guestfs-actions.pod:115
5988 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
5989 "optional parameters, so the disk is added writable, with the format being "
5990 "detected automatically."
5995 #: ../src/guestfs-actions.pod:119
5997 "Automatic detection of the format opens you up to a potential security hole "
5998 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
5999 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
6000 "you should think about replacing calls to this function with calls to "
6001 "C<guestfs_add_drive_opts>, and specifying the format."
6006 #: ../src/guestfs-actions.pod:130
6007 msgid "guestfs_add_drive_opts"
6012 #: ../src/guestfs-actions.pod:132
6016 " guestfs_add_drive_opts (guestfs_h *g,\n"
6017 " const char *filename,\n"
6024 #: ../src/guestfs-actions.pod:142
6027 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
6028 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
6029 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
6035 #: ../src/guestfs-actions.pod:146 ../fish/guestfish-actions.pod:90
6037 "This function adds a virtual machine disk image C<filename> to libguestfs. "
6038 "The first time you call this function, the disk appears as C</dev/sda>, the "
6039 "second time as C</dev/sdb>, and so on."
6044 #: ../src/guestfs-actions.pod:151 ../fish/guestfish-actions.pod:95
6046 "You don't necessarily need to be root when using libguestfs. However you "
6047 "obviously do need sufficient permissions to access the filename for whatever "
6048 "operations you want to perform (ie. read access if you just want to read the "
6049 "image or write access if you want to modify the image)."
6054 #: ../src/guestfs-actions.pod:157 ../fish/guestfish-actions.pod:101
6055 msgid "This call checks that C<filename> exists."
6060 #: ../src/guestfs-actions.pod:159 ../src/guestfs-actions.pod:4239
6061 #: ../fish/guestfish-actions.pod:103 ../fish/guestfish-actions.pod:2855
6062 msgid "The optional arguments are:"
6067 #: ../src/guestfs-actions.pod:163 ../fish/guestfish-actions.pod:107
6073 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:109
6075 "If true then the image is treated as read-only. Writes are still allowed, "
6076 "but they are stored in a temporary snapshot overlay which is discarded at "
6077 "the end. The disk that you add is not modified."
6082 #: ../src/guestfs-actions.pod:169 ../fish/guestfish-actions.pod:113
6088 #: ../src/guestfs-actions.pod:171
6090 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
6091 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
6092 "Possible formats include C<raw> and C<qcow2>."
6097 #: ../src/guestfs-actions.pod:175 ../fish/guestfish-actions.pod:119
6099 "Automatic detection of the format opens you up to a potential security hole "
6100 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6101 "RHBZ#642934. Specifying the format closes this security hole."
6106 #: ../src/guestfs-actions.pod:180 ../fish/guestfish-actions.pod:124
6112 #: ../src/guestfs-actions.pod:182
6114 "This rarely-used option lets you emulate the behaviour of the deprecated "
6115 "C<guestfs_add_drive_with_if> call (q.v.)"
6120 #: ../src/guestfs-actions.pod:189
6121 msgid "(Added in 1.5.23)"
6126 #: ../src/guestfs-actions.pod:191
6127 msgid "guestfs_add_drive_opts_va"
6132 #: ../src/guestfs-actions.pod:193
6136 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
6137 " const char *filename,\n"
6144 #: ../src/guestfs-actions.pod:198
6145 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
6150 #: ../src/guestfs-actions.pod:202
6151 msgid "guestfs_add_drive_opts_argv"
6156 #: ../src/guestfs-actions.pod:204
6160 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
6161 " const char *filename,\n"
6162 " const struct guestfs_add_drive_opts_argv *optargs);\n"
6168 #: ../src/guestfs-actions.pod:209
6169 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
6174 #: ../src/guestfs-actions.pod:213
6175 msgid "guestfs_add_drive_ro"
6180 #: ../src/guestfs-actions.pod:215
6184 " guestfs_add_drive_ro (guestfs_h *g,\n"
6185 " const char *filename);\n"
6191 #: ../src/guestfs-actions.pod:219
6193 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
6194 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
6195 "disk is added read-only, with the format being detected automatically."
6200 #: ../src/guestfs-actions.pod:226
6201 msgid "(Added in 1.0.38)"
6206 #: ../src/guestfs-actions.pod:228
6207 msgid "guestfs_add_drive_ro_with_if"
6212 #: ../src/guestfs-actions.pod:230
6216 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
6217 " const char *filename,\n"
6218 " const char *iface);\n"
6224 #: ../src/guestfs-actions.pod:235
6226 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
6227 "QEMU interface emulation to use at run time."
6232 #: ../src/guestfs-actions.pod:247 ../src/guestfs-actions.pod:268
6233 #: ../src/guestfs-actions.pod:2357
6234 msgid "(Added in 1.0.84)"
6239 #: ../src/guestfs-actions.pod:249
6240 msgid "guestfs_add_drive_with_if"
6245 #: ../src/guestfs-actions.pod:251
6249 " guestfs_add_drive_with_if (guestfs_h *g,\n"
6250 " const char *filename,\n"
6251 " const char *iface);\n"
6257 #: ../src/guestfs-actions.pod:256
6259 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
6260 "QEMU interface emulation to use at run time."
6265 #: ../src/guestfs-actions.pod:270
6266 msgid "guestfs_aug_clear"
6271 #: ../src/guestfs-actions.pod:272
6275 " guestfs_aug_clear (guestfs_h *g,\n"
6276 " const char *augpath);\n"
6282 #: ../src/guestfs-actions.pod:276 ../fish/guestfish-actions.pod:176
6284 "Set the value associated with C<path> to C<NULL>. This is the same as the "
6285 "L<augtool(1)> C<clear> command."
6290 #: ../src/guestfs-actions.pod:281 ../src/guestfs-actions.pod:2085
6291 msgid "(Added in 1.3.4)"
6296 #: ../src/guestfs-actions.pod:283
6297 msgid "guestfs_aug_close"
6302 #: ../src/guestfs-actions.pod:285
6306 " guestfs_aug_close (guestfs_h *g);\n"
6312 #: ../src/guestfs-actions.pod:288
6314 "Close the current Augeas handle and free up any resources used by it. After "
6315 "calling this, you have to call C<guestfs_aug_init> again before you can use "
6316 "any other Augeas functions."
6321 #: ../src/guestfs-actions.pod:295 ../src/guestfs-actions.pod:320
6322 #: ../src/guestfs-actions.pod:338 ../src/guestfs-actions.pod:352
6323 #: ../src/guestfs-actions.pod:415 ../src/guestfs-actions.pod:435
6324 #: ../src/guestfs-actions.pod:449 ../src/guestfs-actions.pod:480
6325 #: ../src/guestfs-actions.pod:494 ../src/guestfs-actions.pod:508
6326 #: ../src/guestfs-actions.pod:522 ../src/guestfs-actions.pod:540
6327 #: ../src/guestfs-actions.pod:5263
6328 msgid "(Added in 0.7)"
6333 #: ../src/guestfs-actions.pod:297
6334 msgid "guestfs_aug_defnode"
6339 #: ../src/guestfs-actions.pod:299
6342 " struct guestfs_int_bool *\n"
6343 " guestfs_aug_defnode (guestfs_h *g,\n"
6344 " const char *name,\n"
6345 " const char *expr,\n"
6346 " const char *val);\n"
6352 #: ../src/guestfs-actions.pod:305 ../fish/guestfish-actions.pod:192
6354 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
6359 #: ../src/guestfs-actions.pod:308
6361 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
6362 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
6363 "containing that single node."
6368 #: ../src/guestfs-actions.pod:312 ../fish/guestfish-actions.pod:199
6370 "On success this returns a pair containing the number of nodes in the "
6371 "nodeset, and a boolean flag if a node was created."
6376 #: ../src/guestfs-actions.pod:316
6378 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
6379 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
6384 #: ../src/guestfs-actions.pod:322
6385 msgid "guestfs_aug_defvar"
6390 #: ../src/guestfs-actions.pod:324
6394 " guestfs_aug_defvar (guestfs_h *g,\n"
6395 " const char *name,\n"
6396 " const char *expr);\n"
6402 #: ../src/guestfs-actions.pod:329 ../fish/guestfish-actions.pod:207
6404 "Defines an Augeas variable C<name> whose value is the result of evaluating "
6405 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
6410 #: ../src/guestfs-actions.pod:333 ../fish/guestfish-actions.pod:211
6412 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
6413 "evaluates to something which is not a nodeset."
6418 #: ../src/guestfs-actions.pod:340
6419 msgid "guestfs_aug_get"
6424 #: ../src/guestfs-actions.pod:342
6428 " guestfs_aug_get (guestfs_h *g,\n"
6429 " const char *augpath);\n"
6435 #: ../src/guestfs-actions.pod:346 ../fish/guestfish-actions.pod:218
6437 "Look up the value associated with C<path>. If C<path> matches exactly one "
6438 "node, the C<value> is returned."
6443 #: ../src/guestfs-actions.pod:349 ../src/guestfs-actions.pod:854
6444 #: ../src/guestfs-actions.pod:872 ../src/guestfs-actions.pod:932
6445 #: ../src/guestfs-actions.pod:948 ../src/guestfs-actions.pod:1051
6446 #: ../src/guestfs-actions.pod:1181 ../src/guestfs-actions.pod:1198
6447 #: ../src/guestfs-actions.pod:1217 ../src/guestfs-actions.pod:1346
6448 #: ../src/guestfs-actions.pod:1534 ../src/guestfs-actions.pod:1646
6449 #: ../src/guestfs-actions.pod:1809 ../src/guestfs-actions.pod:1826
6450 #: ../src/guestfs-actions.pod:1917 ../src/guestfs-actions.pod:1938
6451 #: ../src/guestfs-actions.pod:2108 ../src/guestfs-actions.pod:2322
6452 #: ../src/guestfs-actions.pod:2529 ../src/guestfs-actions.pod:2610
6453 #: ../src/guestfs-actions.pod:2658 ../src/guestfs-actions.pod:2772
6454 #: ../src/guestfs-actions.pod:2803 ../src/guestfs-actions.pod:2827
6455 #: ../src/guestfs-actions.pod:2889 ../src/guestfs-actions.pod:2912
6456 #: ../src/guestfs-actions.pod:3426 ../src/guestfs-actions.pod:3776
6457 #: ../src/guestfs-actions.pod:3946 ../src/guestfs-actions.pod:4056
6458 #: ../src/guestfs-actions.pod:4798 ../src/guestfs-actions.pod:4991
6459 #: ../src/guestfs-actions.pod:5161 ../src/guestfs-actions.pod:5339
6460 #: ../src/guestfs-actions.pod:5388 ../src/guestfs-actions.pod:5951
6461 #: ../src/guestfs-actions.pod:5967 ../src/guestfs-actions.pod:5984
6462 #: ../src/guestfs-actions.pod:6008 ../src/guestfs-actions.pod:6682
6463 #: ../src/guestfs-actions.pod:6701 ../src/guestfs-actions.pod:6719
6464 #: ../src/guestfs-actions.pod:6899 ../src/guestfs-actions.pod:7171
6466 "This function returns a string, or NULL on error. I<The caller must free "
6467 "the returned string after use>."
6472 #: ../src/guestfs-actions.pod:354
6473 msgid "guestfs_aug_init"
6478 #: ../src/guestfs-actions.pod:356
6482 " guestfs_aug_init (guestfs_h *g,\n"
6483 " const char *root,\n"
6490 #: ../src/guestfs-actions.pod:361 ../fish/guestfish-actions.pod:225
6492 "Create a new Augeas handle for editing configuration files. If there was "
6493 "any previous Augeas handle associated with this guestfs session, then it is "
6499 #: ../src/guestfs-actions.pod:365
6500 msgid "You must call this before using any other C<guestfs_aug_*> commands."
6505 #: ../src/guestfs-actions.pod:368 ../fish/guestfish-actions.pod:232
6507 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
6512 #: ../src/guestfs-actions.pod:371 ../fish/guestfish-actions.pod:235
6514 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
6515 "logical I<or> of the following integers:"
6520 #: ../src/guestfs-actions.pod:377 ../fish/guestfish-actions.pod:241
6521 msgid "C<AUG_SAVE_BACKUP> = 1"
6526 #: ../src/guestfs-actions.pod:379 ../fish/guestfish-actions.pod:243
6527 msgid "Keep the original file with a C<.augsave> extension."
6532 #: ../src/guestfs-actions.pod:381 ../fish/guestfish-actions.pod:245
6533 msgid "C<AUG_SAVE_NEWFILE> = 2"
6538 #: ../src/guestfs-actions.pod:383 ../fish/guestfish-actions.pod:247
6540 "Save changes into a file with extension C<.augnew>, and do not overwrite "
6541 "original. Overrides C<AUG_SAVE_BACKUP>."
6546 #: ../src/guestfs-actions.pod:386 ../fish/guestfish-actions.pod:250
6547 msgid "C<AUG_TYPE_CHECK> = 4"
6551 #: ../src/guestfs-actions.pod:388 ../fish/guestfish-actions.pod:252
6552 msgid "Typecheck lenses."
6556 #: ../src/guestfs-actions.pod:390
6558 "This option is only useful when debugging Augeas lenses. Use of this option "
6559 "may require additional memory for the libguestfs appliance. You may need to "
6560 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
6561 "C<guestfs_set_memsize>."
6566 #: ../src/guestfs-actions.pod:395 ../fish/guestfish-actions.pod:259
6567 msgid "C<AUG_NO_STDINC> = 8"
6572 #: ../src/guestfs-actions.pod:397 ../fish/guestfish-actions.pod:261
6573 msgid "Do not use standard load path for modules."
6578 #: ../src/guestfs-actions.pod:399 ../fish/guestfish-actions.pod:263
6579 msgid "C<AUG_SAVE_NOOP> = 16"
6584 #: ../src/guestfs-actions.pod:401 ../fish/guestfish-actions.pod:265
6585 msgid "Make save a no-op, just record what would have been changed."
6590 #: ../src/guestfs-actions.pod:403 ../fish/guestfish-actions.pod:267
6591 msgid "C<AUG_NO_LOAD> = 32"
6596 #: ../src/guestfs-actions.pod:405
6597 msgid "Do not load the tree in C<guestfs_aug_init>."
6602 #: ../src/guestfs-actions.pod:409
6603 msgid "To close the handle, you can call C<guestfs_aug_close>."
6608 #: ../src/guestfs-actions.pod:411 ../fish/guestfish-actions.pod:275
6609 msgid "To find out more about Augeas, see L<http://augeas.net/>."
6614 #: ../src/guestfs-actions.pod:417
6615 msgid "guestfs_aug_insert"
6620 #: ../src/guestfs-actions.pod:419
6624 " guestfs_aug_insert (guestfs_h *g,\n"
6625 " const char *augpath,\n"
6626 " const char *label,\n"
6633 #: ../src/guestfs-actions.pod:425 ../fish/guestfish-actions.pod:281
6635 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
6636 "or after C<path> (depending on the boolean flag C<before>)."
6641 #: ../src/guestfs-actions.pod:429 ../fish/guestfish-actions.pod:285
6643 "C<path> must match exactly one existing node in the tree, and C<label> must "
6644 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
6649 #: ../src/guestfs-actions.pod:437
6650 msgid "guestfs_aug_load"
6655 #: ../src/guestfs-actions.pod:439
6659 " guestfs_aug_load (guestfs_h *g);\n"
6665 #: ../src/guestfs-actions.pod:442 ../fish/guestfish-actions.pod:293
6666 msgid "Load files into the tree."
6671 #: ../src/guestfs-actions.pod:444 ../fish/guestfish-actions.pod:295
6672 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
6677 #: ../src/guestfs-actions.pod:451
6678 msgid "guestfs_aug_ls"
6683 #: ../src/guestfs-actions.pod:453
6687 " guestfs_aug_ls (guestfs_h *g,\n"
6688 " const char *augpath);\n"
6694 #: ../src/guestfs-actions.pod:457
6696 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
6697 "sorting the resulting nodes into alphabetical order."
6702 #: ../src/guestfs-actions.pod:460 ../src/guestfs-actions.pod:476
6703 #: ../src/guestfs-actions.pod:622 ../src/guestfs-actions.pod:1070
6704 #: ../src/guestfs-actions.pod:1361 ../src/guestfs-actions.pod:1380
6705 #: ../src/guestfs-actions.pod:1483 ../src/guestfs-actions.pod:1502
6706 #: ../src/guestfs-actions.pod:1748 ../src/guestfs-actions.pod:2180
6707 #: ../src/guestfs-actions.pod:2196 ../src/guestfs-actions.pod:2215
6708 #: ../src/guestfs-actions.pod:2280 ../src/guestfs-actions.pod:2304
6709 #: ../src/guestfs-actions.pod:2375 ../src/guestfs-actions.pod:2424
6710 #: ../src/guestfs-actions.pod:2635 ../src/guestfs-actions.pod:2846
6711 #: ../src/guestfs-actions.pod:3061 ../src/guestfs-actions.pod:3346
6712 #: ../src/guestfs-actions.pod:3408 ../src/guestfs-actions.pod:3513
6713 #: ../src/guestfs-actions.pod:3918 ../src/guestfs-actions.pod:4604
6714 #: ../src/guestfs-actions.pod:5133 ../src/guestfs-actions.pod:5259
6715 #: ../src/guestfs-actions.pod:5373 ../src/guestfs-actions.pod:6024
6716 #: ../src/guestfs-actions.pod:6085 ../src/guestfs-actions.pod:6140
6717 #: ../src/guestfs-actions.pod:6286 ../src/guestfs-actions.pod:6310
6718 #: ../src/guestfs-actions.pod:6792 ../src/guestfs-actions.pod:6812
6719 #: ../src/guestfs-actions.pod:6859 ../src/guestfs-actions.pod:7024
6720 #: ../src/guestfs-actions.pod:7043 ../src/guestfs-actions.pod:7128
6721 #: ../src/guestfs-actions.pod:7147 ../src/guestfs-actions.pod:7193
6722 #: ../src/guestfs-actions.pod:7212
6724 "This function returns a NULL-terminated array of strings (like L<environ(3)"
6725 ">), or NULL if there was an error. I<The caller must free the strings and "
6726 "the array after use>."
6731 #: ../src/guestfs-actions.pod:464 ../src/guestfs-actions.pod:995
6732 #: ../src/guestfs-actions.pod:1013 ../src/guestfs-actions.pod:1418
6733 #: ../src/guestfs-actions.pod:3139 ../src/guestfs-actions.pod:3170
6734 #: ../src/guestfs-actions.pod:3759 ../src/guestfs-actions.pod:3809
6735 #: ../src/guestfs-actions.pod:3996 ../src/guestfs-actions.pod:4029
6736 #: ../src/guestfs-actions.pod:4192 ../src/guestfs-actions.pod:4608
6737 #: ../src/guestfs-actions.pod:5074 ../src/guestfs-actions.pod:5452
6738 #: ../src/guestfs-actions.pod:5466 ../src/guestfs-actions.pod:5478
6739 #: ../src/guestfs-actions.pod:5886 ../src/guestfs-actions.pod:6524
6740 #: ../src/guestfs-actions.pod:6537 ../src/guestfs-actions.pod:6776
6741 #: ../src/guestfs-actions.pod:7012
6742 msgid "(Added in 0.8)"
6747 #: ../src/guestfs-actions.pod:466
6748 msgid "guestfs_aug_match"
6753 #: ../src/guestfs-actions.pod:468
6757 " guestfs_aug_match (guestfs_h *g,\n"
6758 " const char *augpath);\n"
6764 #: ../src/guestfs-actions.pod:472 ../fish/guestfish-actions.pod:309
6766 "Returns a list of paths which match the path expression C<path>. The "
6767 "returned paths are sufficiently qualified so that they match exactly one "
6768 "node in the current tree."
6773 #: ../src/guestfs-actions.pod:482
6774 msgid "guestfs_aug_mv"
6779 #: ../src/guestfs-actions.pod:484
6783 " guestfs_aug_mv (guestfs_h *g,\n"
6784 " const char *src,\n"
6785 " const char *dest);\n"
6791 #: ../src/guestfs-actions.pod:489 ../fish/guestfish-actions.pod:317
6793 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
6794 "C<dest> is overwritten if it exists."
6799 #: ../src/guestfs-actions.pod:496
6800 msgid "guestfs_aug_rm"
6805 #: ../src/guestfs-actions.pod:498
6809 " guestfs_aug_rm (guestfs_h *g,\n"
6810 " const char *augpath);\n"
6816 #: ../src/guestfs-actions.pod:502 ../fish/guestfish-actions.pod:324
6817 msgid "Remove C<path> and all of its children."
6822 #: ../src/guestfs-actions.pod:504 ../fish/guestfish-actions.pod:326
6823 msgid "On success this returns the number of entries which were removed."
6828 #: ../src/guestfs-actions.pod:510
6829 msgid "guestfs_aug_save"
6834 #: ../src/guestfs-actions.pod:512
6838 " guestfs_aug_save (guestfs_h *g);\n"
6844 #: ../src/guestfs-actions.pod:515 ../fish/guestfish-actions.pod:332
6845 msgid "This writes all pending changes to disk."
6850 #: ../src/guestfs-actions.pod:517
6852 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
6858 #: ../src/guestfs-actions.pod:524
6859 msgid "guestfs_aug_set"
6864 #: ../src/guestfs-actions.pod:526
6868 " guestfs_aug_set (guestfs_h *g,\n"
6869 " const char *augpath,\n"
6870 " const char *val);\n"
6876 #: ../src/guestfs-actions.pod:531 ../fish/guestfish-actions.pod:341
6877 msgid "Set the value associated with C<path> to C<val>."
6882 #: ../src/guestfs-actions.pod:533
6884 "In the Augeas API, it is possible to clear a node by setting the value to "
6885 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
6886 "this call. Instead you must use the C<guestfs_aug_clear> call."
6891 #: ../src/guestfs-actions.pod:542
6892 msgid "guestfs_available"
6897 #: ../src/guestfs-actions.pod:544
6901 " guestfs_available (guestfs_h *g,\n"
6902 " char *const *groups);\n"
6908 #: ../src/guestfs-actions.pod:548 ../fish/guestfish-actions.pod:352
6910 "This command is used to check the availability of some groups of "
6911 "functionality in the appliance, which not all builds of the libguestfs "
6912 "appliance will be able to provide."
6917 #: ../src/guestfs-actions.pod:552
6919 "The libguestfs groups, and the functions that those groups correspond to, "
6920 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
6921 "runtime by calling C<guestfs_available_all_groups>."
6926 #: ../src/guestfs-actions.pod:557 ../fish/guestfish-actions.pod:361
6928 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
6929 "\"]> would check for the availability of the Linux inotify functions and "
6930 "Augeas (configuration file editing) functions."
6935 #: ../src/guestfs-actions.pod:562 ../fish/guestfish-actions.pod:366
6936 msgid "The command returns no error if I<all> requested groups are available."
6941 #: ../src/guestfs-actions.pod:564 ../fish/guestfish-actions.pod:368
6943 "It fails with an error if one or more of the requested groups is unavailable "
6949 #: ../src/guestfs-actions.pod:567 ../fish/guestfish-actions.pod:371
6951 "If an unknown group name is included in the list of groups then an error is "
6957 #: ../src/guestfs-actions.pod:570 ../fish/guestfish-actions.pod:374
6963 #: ../src/guestfs-actions.pod:576
6964 msgid "You must call C<guestfs_launch> before calling this function."
6969 #: ../src/guestfs-actions.pod:578 ../fish/guestfish-actions.pod:382
6971 "The reason is because we don't know what groups are supported by the "
6972 "appliance/daemon until it is running and can be queried."
6977 #: ../src/guestfs-actions.pod:584 ../fish/guestfish-actions.pod:388
6979 "If a group of functions is available, this does not necessarily mean that "
6980 "they will work. You still have to check for errors when calling individual "
6981 "API functions even if they are available."
6986 #: ../src/guestfs-actions.pod:591 ../fish/guestfish-actions.pod:395
6988 "It is usually the job of distro packagers to build complete functionality "
6989 "into the libguestfs appliance. Upstream libguestfs, if built from source "
6990 "with all requirements satisfied, will support everything."
6995 #: ../src/guestfs-actions.pod:598
6997 "This call was added in version C<1.0.80>. In previous versions of "
6998 "libguestfs all you could do would be to speculatively execute a command to "
6999 "find out if the daemon implemented it. See also C<guestfs_version>."
7004 #: ../src/guestfs-actions.pod:607 ../src/guestfs-actions.pod:1168
7005 msgid "(Added in 1.0.80)"
7010 #: ../src/guestfs-actions.pod:609
7011 msgid "guestfs_available_all_groups"
7016 #: ../src/guestfs-actions.pod:611
7020 " guestfs_available_all_groups (guestfs_h *g);\n"
7026 #: ../src/guestfs-actions.pod:614
7028 "This command returns a list of all optional groups that this daemon knows "
7029 "about. Note this returns both supported and unsupported groups. To find "
7030 "out which ones the daemon can actually support you have to call "
7031 "C<guestfs_available> on each member of the returned list."
7036 #: ../src/guestfs-actions.pod:620
7037 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
7042 #: ../src/guestfs-actions.pod:626
7043 msgid "(Added in 1.3.15)"
7048 #: ../src/guestfs-actions.pod:628
7049 msgid "guestfs_base64_in"
7054 #: ../src/guestfs-actions.pod:630
7058 " guestfs_base64_in (guestfs_h *g,\n"
7059 " const char *base64file,\n"
7060 " const char *filename);\n"
7066 #: ../src/guestfs-actions.pod:635 ../fish/guestfish-actions.pod:425
7068 "This command uploads base64-encoded data from C<base64file> to C<filename>."
7073 #: ../src/guestfs-actions.pod:640 ../src/guestfs-actions.pod:654
7074 msgid "(Added in 1.3.5)"
7079 #: ../src/guestfs-actions.pod:642
7080 msgid "guestfs_base64_out"
7085 #: ../src/guestfs-actions.pod:644
7089 " guestfs_base64_out (guestfs_h *g,\n"
7090 " const char *filename,\n"
7091 " const char *base64file);\n"
7097 #: ../src/guestfs-actions.pod:649 ../fish/guestfish-actions.pod:434
7099 "This command downloads the contents of C<filename>, writing it out to local "
7100 "file C<base64file> encoded as base64."
7105 #: ../src/guestfs-actions.pod:656
7106 msgid "guestfs_blockdev_flushbufs"
7111 #: ../src/guestfs-actions.pod:658
7115 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
7116 " const char *device);\n"
7122 #: ../src/guestfs-actions.pod:662 ../fish/guestfish-actions.pod:443
7124 "This tells the kernel to flush internal buffers associated with C<device>."
7129 #: ../src/guestfs-actions.pod:665 ../src/guestfs-actions.pod:682
7130 #: ../src/guestfs-actions.pod:697 ../src/guestfs-actions.pod:713
7131 #: ../src/guestfs-actions.pod:731 ../src/guestfs-actions.pod:750
7132 #: ../src/guestfs-actions.pod:764 ../src/guestfs-actions.pod:782
7133 #: ../src/guestfs-actions.pod:796 ../src/guestfs-actions.pod:810
7134 #: ../fish/guestfish-actions.pod:446 ../fish/guestfish-actions.pod:457
7135 #: ../fish/guestfish-actions.pod:466 ../fish/guestfish-actions.pod:476
7136 #: ../fish/guestfish-actions.pod:488 ../fish/guestfish-actions.pod:501
7137 #: ../fish/guestfish-actions.pod:509 ../fish/guestfish-actions.pod:520
7138 #: ../fish/guestfish-actions.pod:528 ../fish/guestfish-actions.pod:536
7139 msgid "This uses the L<blockdev(8)> command."
7144 #: ../src/guestfs-actions.pod:669 ../src/guestfs-actions.pod:686
7145 #: ../src/guestfs-actions.pod:701 ../src/guestfs-actions.pod:717
7146 #: ../src/guestfs-actions.pod:735 ../src/guestfs-actions.pod:754
7147 #: ../src/guestfs-actions.pod:768 ../src/guestfs-actions.pod:786
7148 #: ../src/guestfs-actions.pod:800 ../src/guestfs-actions.pod:814
7149 msgid "(Added in 0.9.3)"
7154 #: ../src/guestfs-actions.pod:671
7155 msgid "guestfs_blockdev_getbsz"
7160 #: ../src/guestfs-actions.pod:673
7164 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
7165 " const char *device);\n"
7171 #: ../src/guestfs-actions.pod:677 ../fish/guestfish-actions.pod:452
7172 msgid "This returns the block size of a device."
7177 #: ../src/guestfs-actions.pod:679 ../src/guestfs-actions.pod:779
7178 #: ../fish/guestfish-actions.pod:454 ../fish/guestfish-actions.pod:517
7180 "(Note this is different from both I<size in blocks> and I<filesystem block "
7186 #: ../src/guestfs-actions.pod:688
7187 msgid "guestfs_blockdev_getro"
7192 #: ../src/guestfs-actions.pod:690
7196 " guestfs_blockdev_getro (guestfs_h *g,\n"
7197 " const char *device);\n"
7203 #: ../src/guestfs-actions.pod:694 ../fish/guestfish-actions.pod:463
7205 "Returns a boolean indicating if the block device is read-only (true if read-"
7206 "only, false if not)."
7211 #: ../src/guestfs-actions.pod:699 ../src/guestfs-actions.pod:1401
7212 #: ../src/guestfs-actions.pod:1416 ../src/guestfs-actions.pod:1893
7213 #: ../src/guestfs-actions.pod:1904 ../src/guestfs-actions.pod:1976
7214 #: ../src/guestfs-actions.pod:2031 ../src/guestfs-actions.pod:2046
7215 #: ../src/guestfs-actions.pod:2071 ../src/guestfs-actions.pod:2094
7216 #: ../src/guestfs-actions.pod:3078 ../src/guestfs-actions.pod:3092
7217 #: ../src/guestfs-actions.pod:3107 ../src/guestfs-actions.pod:3121
7218 #: ../src/guestfs-actions.pod:3137 ../src/guestfs-actions.pod:3152
7219 #: ../src/guestfs-actions.pod:3168 ../src/guestfs-actions.pod:3182
7220 #: ../src/guestfs-actions.pod:3195 ../src/guestfs-actions.pod:3209
7221 #: ../src/guestfs-actions.pod:3224 ../src/guestfs-actions.pod:3239
7222 #: ../src/guestfs-actions.pod:4762
7223 msgid "This function returns a C truth value on success or -1 on error."
7228 #: ../src/guestfs-actions.pod:703
7229 msgid "guestfs_blockdev_getsize64"
7234 #: ../src/guestfs-actions.pod:705
7238 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
7239 " const char *device);\n"
7245 #: ../src/guestfs-actions.pod:709 ../fish/guestfish-actions.pod:472
7246 msgid "This returns the size of the device in bytes."
7251 #: ../src/guestfs-actions.pod:711
7252 msgid "See also C<guestfs_blockdev_getsz>."
7257 #: ../src/guestfs-actions.pod:719
7258 msgid "guestfs_blockdev_getss"
7263 #: ../src/guestfs-actions.pod:721
7267 " guestfs_blockdev_getss (guestfs_h *g,\n"
7268 " const char *device);\n"
7274 #: ../src/guestfs-actions.pod:725 ../fish/guestfish-actions.pod:482
7276 "This returns the size of sectors on a block device. Usually 512, but can be "
7277 "larger for modern devices."
7282 #: ../src/guestfs-actions.pod:728
7284 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
7290 #: ../src/guestfs-actions.pod:737
7291 msgid "guestfs_blockdev_getsz"
7296 #: ../src/guestfs-actions.pod:739
7300 " guestfs_blockdev_getsz (guestfs_h *g,\n"
7301 " const char *device);\n"
7307 #: ../src/guestfs-actions.pod:743 ../fish/guestfish-actions.pod:494
7309 "This returns the size of the device in units of 512-byte sectors (even if "
7310 "the sectorsize isn't 512 bytes ... weird)."
7315 #: ../src/guestfs-actions.pod:746
7317 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
7318 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
7323 #: ../src/guestfs-actions.pod:756
7324 msgid "guestfs_blockdev_rereadpt"
7329 #: ../src/guestfs-actions.pod:758
7333 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
7334 " const char *device);\n"
7340 #: ../src/guestfs-actions.pod:762 ../fish/guestfish-actions.pod:507
7341 msgid "Reread the partition table on C<device>."
7346 #: ../src/guestfs-actions.pod:770
7347 msgid "guestfs_blockdev_setbsz"
7352 #: ../src/guestfs-actions.pod:772
7356 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
7357 " const char *device,\n"
7358 " int blocksize);\n"
7364 #: ../src/guestfs-actions.pod:777 ../fish/guestfish-actions.pod:515
7365 msgid "This sets the block size of a device."
7370 #: ../src/guestfs-actions.pod:788
7371 msgid "guestfs_blockdev_setro"
7376 #: ../src/guestfs-actions.pod:790
7380 " guestfs_blockdev_setro (guestfs_h *g,\n"
7381 " const char *device);\n"
7387 #: ../src/guestfs-actions.pod:794 ../fish/guestfish-actions.pod:526
7388 msgid "Sets the block device named C<device> to read-only."
7393 #: ../src/guestfs-actions.pod:802
7394 msgid "guestfs_blockdev_setrw"
7399 #: ../src/guestfs-actions.pod:804
7403 " guestfs_blockdev_setrw (guestfs_h *g,\n"
7404 " const char *device);\n"
7410 #: ../src/guestfs-actions.pod:808 ../fish/guestfish-actions.pod:534
7411 msgid "Sets the block device named C<device> to read-write."
7416 #: ../src/guestfs-actions.pod:816
7417 msgid "guestfs_case_sensitive_path"
7422 #: ../src/guestfs-actions.pod:818
7426 " guestfs_case_sensitive_path (guestfs_h *g,\n"
7427 " const char *path);\n"
7433 #: ../src/guestfs-actions.pod:822 ../fish/guestfish-actions.pod:542
7435 "This can be used to resolve case insensitive paths on a filesystem which is "
7436 "case sensitive. The use case is to resolve paths which you have read from "
7437 "Windows configuration files or the Windows Registry, to the true path."
7442 #: ../src/guestfs-actions.pod:827 ../fish/guestfish-actions.pod:547
7444 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
7445 "(and probably others), which is that although the underlying filesystem is "
7446 "case-insensitive, the driver exports the filesystem to Linux as case-"
7452 #: ../src/guestfs-actions.pod:832 ../fish/guestfish-actions.pod:552
7454 "One consequence of this is that special directories such as C<c:\\windows> "
7455 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
7456 "precise details of how they were created. In Windows itself this would not "
7462 #: ../src/guestfs-actions.pod:838 ../fish/guestfish-actions.pod:558
7464 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
7470 #: ../src/guestfs-actions.pod:841 ../fish/guestfish-actions.pod:561
7472 "This function resolves the true case of each element in the path and returns "
7473 "the case-sensitive path."
7478 #: ../src/guestfs-actions.pod:844
7480 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
7481 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
7482 "how the directories were originally created under Windows)."
7487 #: ../src/guestfs-actions.pod:849 ../fish/guestfish-actions.pod:569
7488 msgid "I<Note>: This function does not handle drive names, backslashes etc."
7493 #: ../src/guestfs-actions.pod:852
7494 msgid "See also C<guestfs_realpath>."
7499 #: ../src/guestfs-actions.pod:857 ../src/guestfs-actions.pod:6704
7500 msgid "(Added in 1.0.75)"
7505 #: ../src/guestfs-actions.pod:859
7511 #: ../src/guestfs-actions.pod:861
7515 " guestfs_cat (guestfs_h *g,\n"
7516 " const char *path);\n"
7522 #: ../src/guestfs-actions.pod:865 ../src/guestfs-actions.pod:5249
7523 #: ../fish/guestfish-actions.pod:578 ../fish/guestfish-actions.pod:3501
7524 msgid "Return the contents of the file named C<path>."
7529 #: ../src/guestfs-actions.pod:867
7531 "Note that this function cannot correctly handle binary files (specifically, "
7532 "files containing C<\\0> character which is treated as end of string). For "
7533 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
7534 "functions which have a more complex interface."
7539 #: ../src/guestfs-actions.pod:875 ../src/guestfs-actions.pod:1054
7540 #: ../src/guestfs-actions.pod:1074 ../src/guestfs-actions.pod:1365
7541 #: ../src/guestfs-actions.pod:1384 ../src/guestfs-actions.pod:1487
7542 #: ../src/guestfs-actions.pod:1506 ../src/guestfs-actions.pod:1752
7543 #: ../src/guestfs-actions.pod:2200 ../src/guestfs-actions.pod:2219
7544 #: ../src/guestfs-actions.pod:2284 ../src/guestfs-actions.pod:2308
7545 #: ../src/guestfs-actions.pod:2325 ../src/guestfs-actions.pod:2354
7546 #: ../src/guestfs-actions.pod:5031 ../src/guestfs-actions.pod:5057
7547 #: ../src/guestfs-actions.pod:5188 ../src/guestfs-actions.pod:5214
7548 #: ../src/guestfs-actions.pod:5238 ../src/guestfs-actions.pod:6089
7549 #: ../src/guestfs-actions.pod:6144 ../src/guestfs-actions.pod:6290
7550 #: ../src/guestfs-actions.pod:6314 ../src/guestfs-actions.pod:6976
7551 #: ../src/guestfs-actions.pod:7002 ../src/guestfs-actions.pod:7028
7552 #: ../src/guestfs-actions.pod:7047 ../src/guestfs-actions.pod:7132
7553 #: ../src/guestfs-actions.pod:7151 ../src/guestfs-actions.pod:7197
7554 #: ../src/guestfs-actions.pod:7216 ../fish/guestfish-actions.pod:585
7555 #: ../fish/guestfish-actions.pod:720 ../fish/guestfish-actions.pod:732
7556 #: ../fish/guestfish-actions.pod:908 ../fish/guestfish-actions.pod:918
7557 #: ../fish/guestfish-actions.pod:985 ../fish/guestfish-actions.pod:995
7558 #: ../fish/guestfish-actions.pod:1187 ../fish/guestfish-actions.pod:1482
7559 #: ../fish/guestfish-actions.pod:1492 ../fish/guestfish-actions.pod:1542
7560 #: ../fish/guestfish-actions.pod:1557 ../fish/guestfish-actions.pod:1567
7561 #: ../fish/guestfish-actions.pod:1586 ../fish/guestfish-actions.pod:3371
7562 #: ../fish/guestfish-actions.pod:3386 ../fish/guestfish-actions.pod:3462
7563 #: ../fish/guestfish-actions.pod:3479 ../fish/guestfish-actions.pod:3494
7564 #: ../fish/guestfish-actions.pod:4077 ../fish/guestfish-actions.pod:4123
7565 #: ../fish/guestfish-actions.pod:4208 ../fish/guestfish-actions.pod:4223
7566 #: ../fish/guestfish-actions.pod:4633 ../fish/guestfish-actions.pod:4651
7567 #: ../fish/guestfish-actions.pod:4668 ../fish/guestfish-actions.pod:4678
7568 #: ../fish/guestfish-actions.pod:4726 ../fish/guestfish-actions.pod:4736
7569 #: ../fish/guestfish-actions.pod:4765 ../fish/guestfish-actions.pod:4775
7571 "Because of the message protocol, there is a transfer limit of somewhere "
7572 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
7577 #: ../src/guestfs-actions.pod:878 ../src/guestfs-actions.pod:3350
7578 #: ../src/guestfs-actions.pod:3412 ../src/guestfs-actions.pod:3429
7579 #: ../src/guestfs-actions.pod:3517 ../src/guestfs-actions.pod:3922
7580 #: ../src/guestfs-actions.pod:3936 ../src/guestfs-actions.pod:5137
7581 #: ../src/guestfs-actions.pod:5151 ../src/guestfs-actions.pod:6863
7582 #: ../src/guestfs-actions.pod:6877
7583 msgid "(Added in 0.4)"
7588 #: ../src/guestfs-actions.pod:880
7589 msgid "guestfs_checksum"
7594 #: ../src/guestfs-actions.pod:882
7598 " guestfs_checksum (guestfs_h *g,\n"
7599 " const char *csumtype,\n"
7600 " const char *path);\n"
7606 #: ../src/guestfs-actions.pod:887 ../fish/guestfish-actions.pod:592
7608 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
7613 #: ../src/guestfs-actions.pod:890 ../fish/guestfish-actions.pod:595
7615 "The type of checksum to compute is given by the C<csumtype> parameter which "
7616 "must have one of the following values:"
7621 #: ../src/guestfs-actions.pod:895 ../fish/guestfish-actions.pod:600
7627 #: ../src/guestfs-actions.pod:897 ../fish/guestfish-actions.pod:602
7629 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
7635 #: ../src/guestfs-actions.pod:900 ../fish/guestfish-actions.pod:605
7641 #: ../src/guestfs-actions.pod:902 ../fish/guestfish-actions.pod:607
7642 msgid "Compute the MD5 hash (using the C<md5sum> program)."
7647 #: ../src/guestfs-actions.pod:904 ../fish/guestfish-actions.pod:609
7653 #: ../src/guestfs-actions.pod:906 ../fish/guestfish-actions.pod:611
7654 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
7659 #: ../src/guestfs-actions.pod:908 ../fish/guestfish-actions.pod:613
7665 #: ../src/guestfs-actions.pod:910 ../fish/guestfish-actions.pod:615
7666 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
7671 #: ../src/guestfs-actions.pod:912 ../fish/guestfish-actions.pod:617
7677 #: ../src/guestfs-actions.pod:914 ../fish/guestfish-actions.pod:619
7678 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
7683 #: ../src/guestfs-actions.pod:916 ../fish/guestfish-actions.pod:621
7689 #: ../src/guestfs-actions.pod:918 ../fish/guestfish-actions.pod:623
7690 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
7695 #: ../src/guestfs-actions.pod:920 ../fish/guestfish-actions.pod:625
7701 #: ../src/guestfs-actions.pod:922 ../fish/guestfish-actions.pod:627
7702 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
7707 #: ../src/guestfs-actions.pod:926 ../fish/guestfish-actions.pod:631
7708 msgid "The checksum is returned as a printable string."
7713 #: ../src/guestfs-actions.pod:928
7714 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
7719 #: ../src/guestfs-actions.pod:930
7720 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
7725 #: ../src/guestfs-actions.pod:935 ../src/guestfs-actions.pod:1243
7726 #: ../src/guestfs-actions.pod:2062 ../src/guestfs-actions.pod:3094
7727 #: ../src/guestfs-actions.pod:3123 ../src/guestfs-actions.pod:3184
7728 #: ../src/guestfs-actions.pod:3211 ../src/guestfs-actions.pod:6560
7729 msgid "(Added in 1.0.2)"
7734 #: ../src/guestfs-actions.pod:937
7735 msgid "guestfs_checksum_device"
7740 #: ../src/guestfs-actions.pod:939
7744 " guestfs_checksum_device (guestfs_h *g,\n"
7745 " const char *csumtype,\n"
7746 " const char *device);\n"
7752 #: ../src/guestfs-actions.pod:944
7754 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
7755 "device named C<device>. For the types of checksums supported see the "
7756 "C<guestfs_checksum> command."
7761 #: ../src/guestfs-actions.pod:951 ../src/guestfs-actions.pod:4668
7762 #: ../src/guestfs-actions.pod:4727 ../src/guestfs-actions.pod:4764
7763 #: ../src/guestfs-actions.pod:4782 ../src/guestfs-actions.pod:4958
7764 #: ../src/guestfs-actions.pod:6469 ../src/guestfs-actions.pod:6483
7765 #: ../src/guestfs-actions.pod:6889
7766 msgid "(Added in 1.3.2)"
7771 #: ../src/guestfs-actions.pod:953
7772 msgid "guestfs_checksums_out"
7777 #: ../src/guestfs-actions.pod:955
7781 " guestfs_checksums_out (guestfs_h *g,\n"
7782 " const char *csumtype,\n"
7783 " const char *directory,\n"
7784 " const char *sumsfile);\n"
7790 #: ../src/guestfs-actions.pod:961 ../fish/guestfish-actions.pod:649
7792 "This command computes the checksums of all regular files in C<directory> and "
7793 "then emits a list of those checksums to the local output file C<sumsfile>."
7798 #: ../src/guestfs-actions.pod:965 ../fish/guestfish-actions.pod:653
7800 "This can be used for verifying the integrity of a virtual machine. However "
7801 "to be properly secure you should pay attention to the output of the checksum "
7802 "command (it uses the ones from GNU coreutils). In particular when the "
7803 "filename is not printable, coreutils uses a special backslash syntax. For "
7804 "more information, see the GNU coreutils info file."
7809 #: ../src/guestfs-actions.pod:975
7810 msgid "(Added in 1.3.7)"
7815 #: ../src/guestfs-actions.pod:977
7816 msgid "guestfs_chmod"
7821 #: ../src/guestfs-actions.pod:979
7825 " guestfs_chmod (guestfs_h *g,\n"
7827 " const char *path);\n"
7833 #: ../src/guestfs-actions.pod:984 ../fish/guestfish-actions.pod:667
7835 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
7841 #: ../src/guestfs-actions.pod:987 ../fish/guestfish-actions.pod:670
7843 "I<Note>: When using this command from guestfish, C<mode> by default would be "
7844 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
7850 #: ../src/guestfs-actions.pod:991 ../src/guestfs-actions.pod:4173
7851 #: ../src/guestfs-actions.pod:4358 ../src/guestfs-actions.pod:4377
7852 #: ../src/guestfs-actions.pod:4396 ../fish/guestfish-actions.pod:674
7853 #: ../fish/guestfish-actions.pod:2819 ../fish/guestfish-actions.pod:2937
7854 #: ../fish/guestfish-actions.pod:2947 ../fish/guestfish-actions.pod:2957
7855 msgid "The mode actually set is affected by the umask."
7860 #: ../src/guestfs-actions.pod:997
7861 msgid "guestfs_chown"
7866 #: ../src/guestfs-actions.pod:999
7870 " guestfs_chown (guestfs_h *g,\n"
7873 " const char *path);\n"
7879 #: ../src/guestfs-actions.pod:1005 ../fish/guestfish-actions.pod:680
7880 msgid "Change the file owner to C<owner> and group to C<group>."
7885 #: ../src/guestfs-actions.pod:1007 ../src/guestfs-actions.pod:3281
7886 #: ../fish/guestfish-actions.pod:682 ../fish/guestfish-actions.pod:2277
7888 "Only numeric uid and gid are supported. If you want to use names, you will "
7889 "need to locate and parse the password file yourself (Augeas support makes "
7890 "this relatively easy)."
7895 #: ../src/guestfs-actions.pod:1015
7896 msgid "guestfs_command"
7901 #: ../src/guestfs-actions.pod:1017
7905 " guestfs_command (guestfs_h *g,\n"
7906 " char *const *arguments);\n"
7912 #: ../src/guestfs-actions.pod:1021 ../fish/guestfish-actions.pod:690
7914 "This call runs a command from the guest filesystem. The filesystem must be "
7915 "mounted, and must contain a compatible operating system (ie. something "
7916 "Linux, with the same or compatible processor architecture)."
7921 #: ../src/guestfs-actions.pod:1026
7923 "The single parameter is an argv-style list of arguments. The first element "
7924 "is the name of the program to run. Subsequent elements are parameters. The "
7925 "list must be non-empty (ie. must contain a program name). Note that the "
7926 "command runs directly, and is I<not> invoked via the shell (see "
7932 #: ../src/guestfs-actions.pod:1033 ../fish/guestfish-actions.pod:702
7933 msgid "The return value is anything printed to I<stdout> by the command."
7938 #: ../src/guestfs-actions.pod:1036 ../fish/guestfish-actions.pod:705
7940 "If the command returns a non-zero exit status, then this function returns an "
7941 "error message. The error message string is the content of I<stderr> from "
7947 #: ../src/guestfs-actions.pod:1040 ../fish/guestfish-actions.pod:709
7949 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
7950 "bin>. If you require a program from another location, you should provide "
7951 "the full path in the first parameter."
7956 #: ../src/guestfs-actions.pod:1045 ../fish/guestfish-actions.pod:714
7958 "Shared libraries and data files required by the program must be available on "
7959 "filesystems which are mounted in the correct places. It is the caller's "
7960 "responsibility to ensure all filesystems that are needed are mounted at the "
7966 #: ../src/guestfs-actions.pod:1057 ../src/guestfs-actions.pod:1077
7967 #: ../src/guestfs-actions.pod:1537
7968 msgid "(Added in 0.9.1)"
7973 #: ../src/guestfs-actions.pod:1059
7974 msgid "guestfs_command_lines"
7979 #: ../src/guestfs-actions.pod:1061
7983 " guestfs_command_lines (guestfs_h *g,\n"
7984 " char *const *arguments);\n"
7990 #: ../src/guestfs-actions.pod:1065
7992 "This is the same as C<guestfs_command>, but splits the result into a list of "
7998 #: ../src/guestfs-actions.pod:1068
7999 msgid "See also: C<guestfs_sh_lines>"
8004 #: ../src/guestfs-actions.pod:1079
8005 msgid "guestfs_config"
8010 #: ../src/guestfs-actions.pod:1081
8014 " guestfs_config (guestfs_h *g,\n"
8015 " const char *qemuparam,\n"
8016 " const char *qemuvalue);\n"
8022 #: ../src/guestfs-actions.pod:1086 ../fish/guestfish-actions.pod:739
8024 "This can be used to add arbitrary qemu command line parameters of the form "
8025 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
8026 "setting some parameters which would interfere with parameters that we use."
8031 #: ../src/guestfs-actions.pod:1091 ../fish/guestfish-actions.pod:744
8032 msgid "The first character of C<param> string must be a C<-> (dash)."
8037 #: ../src/guestfs-actions.pod:1093 ../fish/guestfish-actions.pod:746
8038 msgid "C<value> can be NULL."
8043 #: ../src/guestfs-actions.pod:1099
8044 msgid "guestfs_copy_size"
8049 #: ../src/guestfs-actions.pod:1101
8053 " guestfs_copy_size (guestfs_h *g,\n"
8054 " const char *src,\n"
8055 " const char *dest,\n"
8062 #: ../src/guestfs-actions.pod:1107 ../fish/guestfish-actions.pod:752
8064 "This command copies exactly C<size> bytes from one source device or file "
8065 "C<src> to another destination device or file C<dest>."
8070 #: ../src/guestfs-actions.pod:1110 ../fish/guestfish-actions.pod:755
8072 "Note this will fail if the source is too short or if the destination is not "
8078 #: ../src/guestfs-actions.pod:1115 ../src/guestfs-actions.pod:1238
8079 #: ../src/guestfs-actions.pod:1269 ../src/guestfs-actions.pod:1686
8080 #: ../src/guestfs-actions.pod:1708 ../src/guestfs-actions.pod:6555
8081 #: ../src/guestfs-actions.pod:6589 ../src/guestfs-actions.pod:7068
8082 #: ../src/guestfs-actions.pod:7087
8084 "This long-running command can generate progress notification messages so "
8085 "that the caller can display a progress bar or indicator. To receive these "
8086 "messages, the caller must register a progress callback. See L<guestfs(3)/"
8087 "guestfs_set_progress_callback>."
8092 #: ../src/guestfs-actions.pod:1120 ../src/guestfs-actions.pod:3949
8093 #: ../src/guestfs-actions.pod:5164 ../src/guestfs-actions.pod:6796
8094 #: ../src/guestfs-actions.pod:6816 ../src/guestfs-actions.pod:6902
8095 msgid "(Added in 1.0.87)"
8100 #: ../src/guestfs-actions.pod:1122
8106 #: ../src/guestfs-actions.pod:1124
8110 " guestfs_cp (guestfs_h *g,\n"
8111 " const char *src,\n"
8112 " const char *dest);\n"
8118 #: ../src/guestfs-actions.pod:1129 ../fish/guestfish-actions.pod:762
8120 "This copies a file from C<src> to C<dest> where C<dest> is either a "
8121 "destination filename or destination directory."
8126 #: ../src/guestfs-actions.pod:1134 ../src/guestfs-actions.pod:1148
8127 #: ../src/guestfs-actions.pod:1220 ../src/guestfs-actions.pod:1294
8128 #: ../src/guestfs-actions.pod:1403 ../src/guestfs-actions.pod:4622
8129 #: ../src/guestfs-actions.pod:5008
8130 msgid "(Added in 1.0.18)"
8135 #: ../src/guestfs-actions.pod:1136
8136 msgid "guestfs_cp_a"
8141 #: ../src/guestfs-actions.pod:1138
8145 " guestfs_cp_a (guestfs_h *g,\n"
8146 " const char *src,\n"
8147 " const char *dest);\n"
8153 #: ../src/guestfs-actions.pod:1143 ../fish/guestfish-actions.pod:769
8155 "This copies a file or directory from C<src> to C<dest> recursively using the "
8161 #: ../src/guestfs-actions.pod:1150
8167 #: ../src/guestfs-actions.pod:1152
8171 " guestfs_dd (guestfs_h *g,\n"
8172 " const char *src,\n"
8173 " const char *dest);\n"
8179 #: ../src/guestfs-actions.pod:1157 ../fish/guestfish-actions.pod:776
8181 "This command copies from one source device or file C<src> to another "
8182 "destination device or file C<dest>. Normally you would use this to copy to "
8183 "or from a device or partition, for example to duplicate a filesystem."
8188 #: ../src/guestfs-actions.pod:1162
8190 "If the destination is a device, it must be as large or larger than the "
8191 "source file or device, otherwise the copy will fail. This command cannot do "
8192 "partial copies (see C<guestfs_copy_size>)."
8197 #: ../src/guestfs-actions.pod:1170
8203 #: ../src/guestfs-actions.pod:1172
8207 " guestfs_df (guestfs_h *g);\n"
8213 #: ../src/guestfs-actions.pod:1175 ../fish/guestfish-actions.pod:789
8214 msgid "This command runs the C<df> command to report disk space used."
8219 #: ../src/guestfs-actions.pod:1177 ../src/guestfs-actions.pod:1194
8221 "This command is mostly useful for interactive sessions. It is I<not> "
8222 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
8228 #: ../src/guestfs-actions.pod:1184 ../src/guestfs-actions.pod:1201
8229 #: ../src/guestfs-actions.pod:1314 ../src/guestfs-actions.pod:2287
8230 #: ../src/guestfs-actions.pod:2311 ../src/guestfs-actions.pod:2379
8231 #: ../src/guestfs-actions.pod:4059 ../src/guestfs-actions.pod:4522
8232 #: ../src/guestfs-actions.pod:6293 ../src/guestfs-actions.pod:6317
8233 #: ../src/guestfs-actions.pod:6935 ../src/guestfs-actions.pod:6948
8234 #: ../src/guestfs-actions.pod:6961
8235 msgid "(Added in 1.0.54)"
8240 #: ../src/guestfs-actions.pod:1186
8241 msgid "guestfs_df_h"
8246 #: ../src/guestfs-actions.pod:1188
8250 " guestfs_df_h (guestfs_h *g);\n"
8256 #: ../src/guestfs-actions.pod:1191 ../fish/guestfish-actions.pod:799
8258 "This command runs the C<df -h> command to report disk space used in human-"
8264 #: ../src/guestfs-actions.pod:1203
8265 msgid "guestfs_dmesg"
8270 #: ../src/guestfs-actions.pod:1205
8274 " guestfs_dmesg (guestfs_h *g);\n"
8280 #: ../src/guestfs-actions.pod:1208 ../fish/guestfish-actions.pod:810
8282 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
8283 "This is sometimes useful for extended debugging of problems."
8288 #: ../src/guestfs-actions.pod:1212
8290 "Another way to get the same information is to enable verbose messages with "
8291 "C<guestfs_set_verbose> or by setting the environment variable "
8292 "C<LIBGUESTFS_DEBUG=1> before running the program."
8297 #: ../src/guestfs-actions.pod:1222
8298 msgid "guestfs_download"
8303 #: ../src/guestfs-actions.pod:1224
8307 " guestfs_download (guestfs_h *g,\n"
8308 " const char *remotefilename,\n"
8309 " const char *filename);\n"
8315 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:1254
8316 #: ../fish/guestfish-actions.pod:823 ../fish/guestfish-actions.pod:836
8318 "Download file C<remotefilename> and save it as C<filename> on the local "
8324 #: ../src/guestfs-actions.pod:1232 ../src/guestfs-actions.pod:6549
8325 #: ../fish/guestfish-actions.pod:826 ../fish/guestfish-actions.pod:4381
8326 msgid "C<filename> can also be a named pipe."
8331 #: ../src/guestfs-actions.pod:1234
8332 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
8337 #: ../src/guestfs-actions.pod:1245
8338 msgid "guestfs_download_offset"
8343 #: ../src/guestfs-actions.pod:1247
8347 " guestfs_download_offset (guestfs_h *g,\n"
8348 " const char *remotefilename,\n"
8349 " const char *filename,\n"
8350 " int64_t offset,\n"
8357 #: ../src/guestfs-actions.pod:1257 ../fish/guestfish-actions.pod:839
8359 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
8360 "region must be within the file or device)."
8365 #: ../src/guestfs-actions.pod:1260
8367 "Note that there is no limit on the amount of data that can be downloaded "
8368 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
8369 "full amount unless an error occurs."
8374 #: ../src/guestfs-actions.pod:1265
8375 msgid "See also C<guestfs_download>, C<guestfs_pread>."
8380 #: ../src/guestfs-actions.pod:1274 ../src/guestfs-actions.pod:6594
8381 msgid "(Added in 1.5.17)"
8386 #: ../src/guestfs-actions.pod:1276
8387 msgid "guestfs_drop_caches"
8392 #: ../src/guestfs-actions.pod:1278
8396 " guestfs_drop_caches (guestfs_h *g,\n"
8397 " int whattodrop);\n"
8403 #: ../src/guestfs-actions.pod:1282 ../fish/guestfish-actions.pod:855
8405 "This instructs the guest kernel to drop its page cache, and/or dentries and "
8406 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
8407 "to drop, see L<http://linux-mm.org/Drop_Caches>"
8412 #: ../src/guestfs-actions.pod:1287 ../fish/guestfish-actions.pod:860
8413 msgid "Setting C<whattodrop> to 3 should drop everything."
8418 #: ../src/guestfs-actions.pod:1289 ../fish/guestfish-actions.pod:862
8420 "This automatically calls L<sync(2)> before the operation, so that the "
8421 "maximum guest memory is freed."
8426 #: ../src/guestfs-actions.pod:1296
8432 #: ../src/guestfs-actions.pod:1298
8436 " guestfs_du (guestfs_h *g,\n"
8437 " const char *path);\n"
8443 #: ../src/guestfs-actions.pod:1302 ../fish/guestfish-actions.pod:869
8445 "This command runs the C<du -s> command to estimate file space usage for "
8451 #: ../src/guestfs-actions.pod:1305 ../fish/guestfish-actions.pod:872
8453 "C<path> can be a file or a directory. If C<path> is a directory then the "
8454 "estimate includes the contents of the directory and all subdirectories "
8460 #: ../src/guestfs-actions.pod:1309 ../fish/guestfish-actions.pod:876
8462 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
8467 #: ../src/guestfs-actions.pod:1316
8468 msgid "guestfs_e2fsck_f"
8473 #: ../src/guestfs-actions.pod:1318
8477 " guestfs_e2fsck_f (guestfs_h *g,\n"
8478 " const char *device);\n"
8484 #: ../src/guestfs-actions.pod:1322 ../fish/guestfish-actions.pod:883
8486 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
8487 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
8493 #: ../src/guestfs-actions.pod:1326
8495 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
8496 "Normally you should use C<guestfs_fsck>."
8501 #: ../src/guestfs-actions.pod:1331
8502 msgid "(Added in 1.0.29)"
8507 #: ../src/guestfs-actions.pod:1333
8508 msgid "guestfs_echo_daemon"
8513 #: ../src/guestfs-actions.pod:1335
8517 " guestfs_echo_daemon (guestfs_h *g,\n"
8518 " char *const *words);\n"
8524 #: ../src/guestfs-actions.pod:1339 ../fish/guestfish-actions.pod:894
8526 "This command concatenates the list of C<words> passed with single spaces "
8527 "between them and returns the resulting string."
8532 #: ../src/guestfs-actions.pod:1342 ../fish/guestfish-actions.pod:897
8533 msgid "You can use this command to test the connection through to the daemon."
8538 #: ../src/guestfs-actions.pod:1344
8539 msgid "See also C<guestfs_ping_daemon>."
8544 #: ../src/guestfs-actions.pod:1349 ../src/guestfs-actions.pod:2073
8545 #: ../src/guestfs-actions.pod:5797
8546 msgid "(Added in 1.0.69)"
8551 #: ../src/guestfs-actions.pod:1351
8552 msgid "guestfs_egrep"
8557 #: ../src/guestfs-actions.pod:1353
8561 " guestfs_egrep (guestfs_h *g,\n"
8562 " const char *regex,\n"
8563 " const char *path);\n"
8569 #: ../src/guestfs-actions.pod:1358 ../fish/guestfish-actions.pod:905
8571 "This calls the external C<egrep> program and returns the matching lines."
8576 #: ../src/guestfs-actions.pod:1368 ../src/guestfs-actions.pod:1387
8577 #: ../src/guestfs-actions.pod:1444 ../src/guestfs-actions.pod:1490
8578 #: ../src/guestfs-actions.pod:1509 ../src/guestfs-actions.pod:2203
8579 #: ../src/guestfs-actions.pod:2222 ../src/guestfs-actions.pod:2400
8580 #: ../src/guestfs-actions.pod:2413 ../src/guestfs-actions.pod:2428
8581 #: ../src/guestfs-actions.pod:2474 ../src/guestfs-actions.pod:2496
8582 #: ../src/guestfs-actions.pod:2509 ../src/guestfs-actions.pod:3442
8583 #: ../src/guestfs-actions.pod:3456 ../src/guestfs-actions.pod:3469
8584 #: ../src/guestfs-actions.pod:3483 ../src/guestfs-actions.pod:4457
8585 #: ../src/guestfs-actions.pod:5342 ../src/guestfs-actions.pod:5391
8586 #: ../src/guestfs-actions.pod:6161 ../src/guestfs-actions.pod:6173
8587 #: ../src/guestfs-actions.pod:6186 ../src/guestfs-actions.pod:6199
8588 #: ../src/guestfs-actions.pod:6221 ../src/guestfs-actions.pod:6234
8589 #: ../src/guestfs-actions.pod:6247 ../src/guestfs-actions.pod:6260
8590 #: ../src/guestfs-actions.pod:7031 ../src/guestfs-actions.pod:7050
8591 #: ../src/guestfs-actions.pod:7135 ../src/guestfs-actions.pod:7154
8592 #: ../src/guestfs-actions.pod:7200 ../src/guestfs-actions.pod:7219
8593 msgid "(Added in 1.0.66)"
8598 #: ../src/guestfs-actions.pod:1370
8599 msgid "guestfs_egrepi"
8604 #: ../src/guestfs-actions.pod:1372
8608 " guestfs_egrepi (guestfs_h *g,\n"
8609 " const char *regex,\n"
8610 " const char *path);\n"
8616 #: ../src/guestfs-actions.pod:1377 ../fish/guestfish-actions.pod:915
8618 "This calls the external C<egrep -i> program and returns the matching lines."
8623 #: ../src/guestfs-actions.pod:1389
8624 msgid "guestfs_equal"
8629 #: ../src/guestfs-actions.pod:1391
8633 " guestfs_equal (guestfs_h *g,\n"
8634 " const char *file1,\n"
8635 " const char *file2);\n"
8641 #: ../src/guestfs-actions.pod:1396 ../fish/guestfish-actions.pod:925
8643 "This compares the two files C<file1> and C<file2> and returns true if their "
8644 "content is exactly equal, or false otherwise."
8649 #: ../src/guestfs-actions.pod:1399 ../fish/guestfish-actions.pod:928
8650 msgid "The external L<cmp(1)> program is used for the comparison."
8655 #: ../src/guestfs-actions.pod:1405
8656 msgid "guestfs_exists"
8661 #: ../src/guestfs-actions.pod:1407
8665 " guestfs_exists (guestfs_h *g,\n"
8666 " const char *path);\n"
8672 #: ../src/guestfs-actions.pod:1411 ../fish/guestfish-actions.pod:934
8674 "This returns C<true> if and only if there is a file, directory (or anything) "
8675 "with the given C<path> name."
8680 #: ../src/guestfs-actions.pod:1414
8681 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
8686 #: ../src/guestfs-actions.pod:1420
8687 msgid "guestfs_fallocate"
8692 #: ../src/guestfs-actions.pod:1422
8696 " guestfs_fallocate (guestfs_h *g,\n"
8697 " const char *path,\n"
8704 #: ../src/guestfs-actions.pod:1427 ../src/guestfs-actions.pod:1453
8705 #: ../fish/guestfish-actions.pod:943 ../fish/guestfish-actions.pod:962
8707 "This command preallocates a file (containing zero bytes) named C<path> of "
8708 "size C<len> bytes. If the file exists already, it is overwritten."
8713 #: ../src/guestfs-actions.pod:1431 ../fish/guestfish-actions.pod:947
8715 "Do not confuse this with the guestfish-specific C<alloc> command which "
8716 "allocates a file in the host and attaches it as a device."
8720 #: ../src/guestfs-actions.pod:1437
8722 "This function is deprecated. In new code, use the L</guestfs_fallocate64> "
8728 #: ../src/guestfs-actions.pod:1446
8729 msgid "guestfs_fallocate64"
8734 #: ../src/guestfs-actions.pod:1448
8738 " guestfs_fallocate64 (guestfs_h *g,\n"
8739 " const char *path,\n"
8746 #: ../src/guestfs-actions.pod:1457
8748 "Note that this call allocates disk blocks for the file. To create a sparse "
8749 "file use C<guestfs_truncate_size> instead."
8754 #: ../src/guestfs-actions.pod:1460
8756 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
8757 "oversight it only allowed 30 bit lengths to be specified, effectively "
8758 "limiting the maximum size of files created through that call to 1GB."
8763 #: ../src/guestfs-actions.pod:1465 ../fish/guestfish-actions.pod:974
8765 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
8766 "commands which create a file in the host and attach it as a device."
8771 #: ../src/guestfs-actions.pod:1471
8772 msgid "(Added in 1.3.17)"
8777 #: ../src/guestfs-actions.pod:1473
8778 msgid "guestfs_fgrep"
8783 #: ../src/guestfs-actions.pod:1475
8787 " guestfs_fgrep (guestfs_h *g,\n"
8788 " const char *pattern,\n"
8789 " const char *path);\n"
8795 #: ../src/guestfs-actions.pod:1480 ../fish/guestfish-actions.pod:982
8797 "This calls the external C<fgrep> program and returns the matching lines."
8802 #: ../src/guestfs-actions.pod:1492
8803 msgid "guestfs_fgrepi"
8808 #: ../src/guestfs-actions.pod:1494
8812 " guestfs_fgrepi (guestfs_h *g,\n"
8813 " const char *pattern,\n"
8814 " const char *path);\n"
8820 #: ../src/guestfs-actions.pod:1499 ../fish/guestfish-actions.pod:992
8822 "This calls the external C<fgrep -i> program and returns the matching lines."
8827 #: ../src/guestfs-actions.pod:1511
8828 msgid "guestfs_file"
8833 #: ../src/guestfs-actions.pod:1513
8837 " guestfs_file (guestfs_h *g,\n"
8838 " const char *path);\n"
8844 #: ../src/guestfs-actions.pod:1517 ../fish/guestfish-actions.pod:1002
8846 "This call uses the standard L<file(1)> command to determine the type or "
8847 "contents of the file."
8852 #: ../src/guestfs-actions.pod:1520 ../fish/guestfish-actions.pod:1005
8854 "This call will also transparently look inside various types of compressed "
8860 #: ../src/guestfs-actions.pod:1523 ../fish/guestfish-actions.pod:1008
8862 "The exact command which runs is C<file -zb path>. Note in particular that "
8863 "the filename is not prepended to the output (the C<-b> option)."
8867 #: ../src/guestfs-actions.pod:1527 ../fish/guestfish-actions.pod:1012
8869 "The output depends on the output of the underlying L<file(1)> command and it "
8870 "can change in future in ways beyond our control. In other words, the output "
8871 "is not guaranteed by the ABI."
8875 #: ../src/guestfs-actions.pod:1531
8877 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
8878 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc)."
8883 #: ../src/guestfs-actions.pod:1539
8884 msgid "guestfs_file_architecture"
8889 #: ../src/guestfs-actions.pod:1541
8893 " guestfs_file_architecture (guestfs_h *g,\n"
8894 " const char *filename);\n"
8900 #: ../src/guestfs-actions.pod:1545 ../fish/guestfish-actions.pod:1023
8902 "This detects the architecture of the binary C<filename>, and returns it if "
8908 #: ../src/guestfs-actions.pod:1548 ../fish/guestfish-actions.pod:1026
8909 msgid "Currently defined architectures are:"
8914 #: ../src/guestfs-actions.pod:1552 ../fish/guestfish-actions.pod:1030
8920 #: ../src/guestfs-actions.pod:1554 ../fish/guestfish-actions.pod:1032
8922 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
8923 "irrespective of the precise processor requirements of the binary."
8928 #: ../src/guestfs-actions.pod:1557 ../fish/guestfish-actions.pod:1035
8934 #: ../src/guestfs-actions.pod:1559 ../fish/guestfish-actions.pod:1037
8935 msgid "64 bit x86-64."
8940 #: ../src/guestfs-actions.pod:1561 ../fish/guestfish-actions.pod:1039
8946 #: ../src/guestfs-actions.pod:1563 ../fish/guestfish-actions.pod:1041
8947 msgid "32 bit SPARC."
8952 #: ../src/guestfs-actions.pod:1565 ../fish/guestfish-actions.pod:1043
8958 #: ../src/guestfs-actions.pod:1567 ../fish/guestfish-actions.pod:1045
8959 msgid "64 bit SPARC V9 and above."
8964 #: ../src/guestfs-actions.pod:1569 ../fish/guestfish-actions.pod:1047
8970 #: ../src/guestfs-actions.pod:1571 ../fish/guestfish-actions.pod:1049
8971 msgid "Intel Itanium."
8976 #: ../src/guestfs-actions.pod:1573 ../fish/guestfish-actions.pod:1051
8982 #: ../src/guestfs-actions.pod:1575 ../fish/guestfish-actions.pod:1053
8983 msgid "32 bit Power PC."
8988 #: ../src/guestfs-actions.pod:1577 ../fish/guestfish-actions.pod:1055
8994 #: ../src/guestfs-actions.pod:1579 ../fish/guestfish-actions.pod:1057
8995 msgid "64 bit Power PC."
9000 #: ../src/guestfs-actions.pod:1583 ../fish/guestfish-actions.pod:1061
9001 msgid "Libguestfs may return other architecture strings in future."
9006 #: ../src/guestfs-actions.pod:1585 ../fish/guestfish-actions.pod:1063
9007 msgid "The function works on at least the following types of files:"
9012 #: ../src/guestfs-actions.pod:1591 ../fish/guestfish-actions.pod:1069
9013 msgid "many types of Un*x and Linux binary"
9018 #: ../src/guestfs-actions.pod:1595 ../fish/guestfish-actions.pod:1073
9019 msgid "many types of Un*x and Linux shared library"
9024 #: ../src/guestfs-actions.pod:1599 ../fish/guestfish-actions.pod:1077
9025 msgid "Windows Win32 and Win64 binaries"
9030 #: ../src/guestfs-actions.pod:1603 ../fish/guestfish-actions.pod:1081
9031 msgid "Windows Win32 and Win64 DLLs"
9036 #: ../src/guestfs-actions.pod:1605 ../fish/guestfish-actions.pod:1083
9037 msgid "Win32 binaries and DLLs return C<i386>."
9042 #: ../src/guestfs-actions.pod:1607 ../fish/guestfish-actions.pod:1085
9043 msgid "Win64 binaries and DLLs return C<x86_64>."
9048 #: ../src/guestfs-actions.pod:1611 ../fish/guestfish-actions.pod:1089
9049 msgid "Linux kernel modules"
9054 #: ../src/guestfs-actions.pod:1615 ../fish/guestfish-actions.pod:1093
9055 msgid "Linux new-style initrd images"
9060 #: ../src/guestfs-actions.pod:1619 ../fish/guestfish-actions.pod:1097
9061 msgid "some non-x86 Linux vmlinuz kernels"
9066 #: ../src/guestfs-actions.pod:1623 ../fish/guestfish-actions.pod:1101
9067 msgid "What it can't do currently:"
9072 #: ../src/guestfs-actions.pod:1629 ../fish/guestfish-actions.pod:1107
9073 msgid "static libraries (libfoo.a)"
9078 #: ../src/guestfs-actions.pod:1633 ../fish/guestfish-actions.pod:1111
9079 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
9084 #: ../src/guestfs-actions.pod:1637 ../fish/guestfish-actions.pod:1115
9085 msgid "x86 Linux vmlinuz kernels"
9090 #: ../src/guestfs-actions.pod:1639 ../fish/guestfish-actions.pod:1117
9092 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
9093 "compressed code, and are horribly hard to unpack. If you want to find the "
9094 "architecture of a kernel, use the architecture of the associated initrd or "
9095 "kernel module(s) instead."
9100 #: ../src/guestfs-actions.pod:1649 ../src/guestfs-actions.pod:1812
9101 #: ../src/guestfs-actions.pod:1829 ../src/guestfs-actions.pod:2532
9102 #: ../src/guestfs-actions.pod:2613 ../src/guestfs-actions.pod:2639
9103 #: ../src/guestfs-actions.pod:2688 ../src/guestfs-actions.pod:2709
9104 #: ../src/guestfs-actions.pod:2746 ../src/guestfs-actions.pod:2830
9105 #: ../src/guestfs-actions.pod:2892 ../src/guestfs-actions.pod:3065
9106 #: ../src/guestfs-actions.pod:3197
9107 msgid "(Added in 1.5.3)"
9112 #: ../src/guestfs-actions.pod:1651
9113 msgid "guestfs_filesize"
9118 #: ../src/guestfs-actions.pod:1653
9122 " guestfs_filesize (guestfs_h *g,\n"
9123 " const char *file);\n"
9129 #: ../src/guestfs-actions.pod:1657 ../fish/guestfish-actions.pod:1128
9130 msgid "This command returns the size of C<file> in bytes."
9135 #: ../src/guestfs-actions.pod:1659
9137 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
9138 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
9139 "devices, use C<guestfs_blockdev_getsize64>."
9144 #: ../src/guestfs-actions.pod:1665
9145 msgid "(Added in 1.0.82)"
9150 #: ../src/guestfs-actions.pod:1667
9151 msgid "guestfs_fill"
9156 #: ../src/guestfs-actions.pod:1669
9160 " guestfs_fill (guestfs_h *g,\n"
9163 " const char *path);\n"
9169 #: ../src/guestfs-actions.pod:1675 ../fish/guestfish-actions.pod:1138
9171 "This command creates a new file called C<path>. The initial content of the "
9172 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
9178 #: ../src/guestfs-actions.pod:1679
9180 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
9181 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
9182 "bytes use C<guestfs_fill_pattern>."
9187 #: ../src/guestfs-actions.pod:1691
9188 msgid "(Added in 1.0.79)"
9193 #: ../src/guestfs-actions.pod:1693
9194 msgid "guestfs_fill_pattern"
9199 #: ../src/guestfs-actions.pod:1695
9203 " guestfs_fill_pattern (guestfs_h *g,\n"
9204 " const char *pattern,\n"
9206 " const char *path);\n"
9212 #: ../src/guestfs-actions.pod:1701
9214 "This function is like C<guestfs_fill> except that it creates a new file of "
9215 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
9216 "pattern is truncated if necessary to ensure the length of the file is "
9217 "exactly C<len> bytes."
9222 #: ../src/guestfs-actions.pod:1713
9223 msgid "(Added in 1.3.12)"
9228 #: ../src/guestfs-actions.pod:1715
9229 msgid "guestfs_find"
9234 #: ../src/guestfs-actions.pod:1717
9238 " guestfs_find (guestfs_h *g,\n"
9239 " const char *directory);\n"
9245 #: ../src/guestfs-actions.pod:1721 ../fish/guestfish-actions.pod:1160
9247 "This command lists out all files and directories, recursively, starting at "
9248 "C<directory>. It is essentially equivalent to running the shell command "
9249 "C<find directory -print> but some post-processing happens on the output, "
9255 #: ../src/guestfs-actions.pod:1726 ../fish/guestfish-actions.pod:1165
9257 "This returns a list of strings I<without any prefix>. Thus if the directory "
9263 #: ../src/guestfs-actions.pod:1729 ../fish/guestfish-actions.pod:1168
9274 #: ../src/guestfs-actions.pod:1733
9276 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
9281 #: ../src/guestfs-actions.pod:1736 ../fish/guestfish-actions.pod:1175
9293 #: ../src/guestfs-actions.pod:1741 ../fish/guestfish-actions.pod:1180
9294 msgid "If C<directory> is not a directory, then this command returns an error."
9299 #: ../src/guestfs-actions.pod:1744 ../fish/guestfish-actions.pod:1183
9300 msgid "The returned list is sorted."
9305 #: ../src/guestfs-actions.pod:1746
9306 msgid "See also C<guestfs_find0>."
9311 #: ../src/guestfs-actions.pod:1755 ../src/guestfs-actions.pod:3886
9312 #: ../src/guestfs-actions.pod:5426
9313 msgid "(Added in 1.0.27)"
9318 #: ../src/guestfs-actions.pod:1757
9319 msgid "guestfs_find0"
9324 #: ../src/guestfs-actions.pod:1759
9328 " guestfs_find0 (guestfs_h *g,\n"
9329 " const char *directory,\n"
9330 " const char *files);\n"
9336 #: ../src/guestfs-actions.pod:1764 ../fish/guestfish-actions.pod:1194
9338 "This command lists out all files and directories, recursively, starting at "
9339 "C<directory>, placing the resulting list in the external file called "
9345 #: ../src/guestfs-actions.pod:1768
9347 "This command works the same way as C<guestfs_find> with the following "
9353 #: ../src/guestfs-actions.pod:1775 ../fish/guestfish-actions.pod:1205
9354 msgid "The resulting list is written to an external file."
9359 #: ../src/guestfs-actions.pod:1779 ../fish/guestfish-actions.pod:1209
9361 "Items (filenames) in the result are separated by C<\\0> characters. See "
9362 "L<find(1)> option I<-print0>."
9367 #: ../src/guestfs-actions.pod:1784 ../fish/guestfish-actions.pod:1214
9368 msgid "This command is not limited in the number of names that it can return."
9373 #: ../src/guestfs-actions.pod:1789 ../fish/guestfish-actions.pod:1219
9374 msgid "The result list is not sorted."
9379 #: ../src/guestfs-actions.pod:1795
9380 msgid "(Added in 1.0.74)"
9385 #: ../src/guestfs-actions.pod:1797
9386 msgid "guestfs_findfs_label"
9391 #: ../src/guestfs-actions.pod:1799
9395 " guestfs_findfs_label (guestfs_h *g,\n"
9396 " const char *label);\n"
9402 #: ../src/guestfs-actions.pod:1803 ../fish/guestfish-actions.pod:1229
9404 "This command searches the filesystems and returns the one which has the "
9405 "given label. An error is returned if no such filesystem can be found."
9410 #: ../src/guestfs-actions.pod:1807
9411 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
9416 #: ../src/guestfs-actions.pod:1814
9417 msgid "guestfs_findfs_uuid"
9422 #: ../src/guestfs-actions.pod:1816
9426 " guestfs_findfs_uuid (guestfs_h *g,\n"
9427 " const char *uuid);\n"
9433 #: ../src/guestfs-actions.pod:1820 ../fish/guestfish-actions.pod:1239
9435 "This command searches the filesystems and returns the one which has the "
9436 "given UUID. An error is returned if no such filesystem can be found."
9441 #: ../src/guestfs-actions.pod:1824
9442 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
9447 #: ../src/guestfs-actions.pod:1831
9448 msgid "guestfs_fsck"
9453 #: ../src/guestfs-actions.pod:1833
9457 " guestfs_fsck (guestfs_h *g,\n"
9458 " const char *fstype,\n"
9459 " const char *device);\n"
9465 #: ../src/guestfs-actions.pod:1838 ../fish/guestfish-actions.pod:1249
9467 "This runs the filesystem checker (fsck) on C<device> which should have "
9468 "filesystem type C<fstype>."
9473 #: ../src/guestfs-actions.pod:1841 ../fish/guestfish-actions.pod:1252
9475 "The returned integer is the status. See L<fsck(8)> for the list of status "
9476 "codes from C<fsck>."
9481 #: ../src/guestfs-actions.pod:1850 ../fish/guestfish-actions.pod:1261
9482 msgid "Multiple status codes can be summed together."
9487 #: ../src/guestfs-actions.pod:1854 ../fish/guestfish-actions.pod:1265
9489 "A non-zero return code can mean \"success\", for example if errors have been "
9490 "corrected on the filesystem."
9495 #: ../src/guestfs-actions.pod:1859 ../fish/guestfish-actions.pod:1270
9496 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
9501 #: ../src/guestfs-actions.pod:1864 ../fish/guestfish-actions.pod:1275
9503 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
9508 #: ../src/guestfs-actions.pod:1868 ../src/guestfs-actions.pod:7073
9509 msgid "(Added in 1.0.16)"
9514 #: ../src/guestfs-actions.pod:1870
9515 msgid "guestfs_get_append"
9520 #: ../src/guestfs-actions.pod:1872
9524 " guestfs_get_append (guestfs_h *g);\n"
9530 #: ../src/guestfs-actions.pod:1875 ../fish/guestfish-actions.pod:1281
9532 "Return the additional kernel options which are added to the guest kernel "
9538 #: ../src/guestfs-actions.pod:1878 ../fish/guestfish-actions.pod:1284
9539 msgid "If C<NULL> then no options are added."
9544 #: ../src/guestfs-actions.pod:1880
9546 "This function returns a string which may be NULL. There is no way to return "
9547 "an error from this function. The string is owned by the guest handle and "
9548 "must I<not> be freed."
9553 #: ../src/guestfs-actions.pod:1884 ../src/guestfs-actions.pod:5104
9554 #: ../src/guestfs-actions.pod:5567 ../src/guestfs-actions.pod:5935
9555 #: ../src/guestfs-actions.pod:5954 ../src/guestfs-actions.pod:5970
9556 #: ../src/guestfs-actions.pod:5987 ../src/guestfs-actions.pod:6744
9557 #: ../src/guestfs-actions.pod:6762 ../src/guestfs-actions.pod:7116
9558 msgid "(Added in 1.0.26)"
9563 #: ../src/guestfs-actions.pod:1886
9564 msgid "guestfs_get_autosync"
9569 #: ../src/guestfs-actions.pod:1888
9573 " guestfs_get_autosync (guestfs_h *g);\n"
9579 #: ../src/guestfs-actions.pod:1891 ../fish/guestfish-actions.pod:1290
9580 msgid "Get the autosync flag."
9585 #: ../src/guestfs-actions.pod:1897
9586 msgid "guestfs_get_direct"
9591 #: ../src/guestfs-actions.pod:1899
9595 " guestfs_get_direct (guestfs_h *g);\n"
9601 #: ../src/guestfs-actions.pod:1902 ../fish/guestfish-actions.pod:1296
9602 msgid "Return the direct appliance mode flag."
9607 #: ../src/guestfs-actions.pod:1906 ../src/guestfs-actions.pod:5608
9608 msgid "(Added in 1.0.72)"
9613 #: ../src/guestfs-actions.pod:1908
9614 msgid "guestfs_get_e2label"
9619 #: ../src/guestfs-actions.pod:1910
9623 " guestfs_get_e2label (guestfs_h *g,\n"
9624 " const char *device);\n"
9630 #: ../src/guestfs-actions.pod:1914 ../fish/guestfish-actions.pod:1302
9632 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
9636 #: ../src/guestfs-actions.pod:1920
9638 "This function is deprecated. In new code, use the L</guestfs_vfs_label> "
9644 #: ../src/guestfs-actions.pod:1927 ../src/guestfs-actions.pod:1948
9645 #: ../src/guestfs-actions.pod:5626 ../src/guestfs-actions.pod:5645
9646 msgid "(Added in 1.0.15)"
9651 #: ../src/guestfs-actions.pod:1929
9652 msgid "guestfs_get_e2uuid"
9657 #: ../src/guestfs-actions.pod:1931
9661 " guestfs_get_e2uuid (guestfs_h *g,\n"
9662 " const char *device);\n"
9668 #: ../src/guestfs-actions.pod:1935 ../fish/guestfish-actions.pod:1316
9670 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
9674 #: ../src/guestfs-actions.pod:1941
9676 "This function is deprecated. In new code, use the L</guestfs_vfs_uuid> call "
9682 #: ../src/guestfs-actions.pod:1950
9683 msgid "guestfs_get_memsize"
9688 #: ../src/guestfs-actions.pod:1952
9692 " guestfs_get_memsize (guestfs_h *g);\n"
9698 #: ../src/guestfs-actions.pod:1955 ../fish/guestfish-actions.pod:1330
9700 "This gets the memory size in megabytes allocated to the qemu subprocess."
9705 #: ../src/guestfs-actions.pod:1958
9707 "If C<guestfs_set_memsize> was not called on this handle, and if "
9708 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
9709 "value for memsize."
9714 #: ../src/guestfs-actions.pod:1962 ../src/guestfs-actions.pod:2043
9715 #: ../src/guestfs-actions.pod:5661 ../src/guestfs-actions.pod:5768
9716 #: ../fish/guestfish-actions.pod:1337 ../fish/guestfish-actions.pod:1388
9717 #: ../fish/guestfish-actions.pod:3788 ../fish/guestfish-actions.pod:3875
9719 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
9724 #: ../src/guestfs-actions.pod:1967 ../src/guestfs-actions.pod:4177
9725 #: ../src/guestfs-actions.pod:4362 ../src/guestfs-actions.pod:4381
9726 #: ../src/guestfs-actions.pod:4400 ../src/guestfs-actions.pod:4412
9727 #: ../src/guestfs-actions.pod:4429 ../src/guestfs-actions.pod:4442
9728 #: ../src/guestfs-actions.pod:5329 ../src/guestfs-actions.pod:5666
9729 #: ../src/guestfs-actions.pod:5909 ../src/guestfs-actions.pod:6510
9730 msgid "(Added in 1.0.55)"
9735 #: ../src/guestfs-actions.pod:1969
9736 msgid "guestfs_get_network"
9741 #: ../src/guestfs-actions.pod:1971
9745 " guestfs_get_network (guestfs_h *g);\n"
9751 #: ../src/guestfs-actions.pod:1974 ../fish/guestfish-actions.pod:1344
9752 msgid "This returns the enable network flag."
9757 #: ../src/guestfs-actions.pod:1978 ../src/guestfs-actions.pod:5685
9758 msgid "(Added in 1.5.4)"
9763 #: ../src/guestfs-actions.pod:1980
9764 msgid "guestfs_get_path"
9769 #: ../src/guestfs-actions.pod:1982
9773 " guestfs_get_path (guestfs_h *g);\n"
9779 #: ../src/guestfs-actions.pod:1985 ../fish/guestfish-actions.pod:1350
9780 msgid "Return the current search path."
9785 #: ../src/guestfs-actions.pod:1987 ../fish/guestfish-actions.pod:1352
9787 "This is always non-NULL. If it wasn't set already, then this will return "
9793 #: ../src/guestfs-actions.pod:1990 ../src/guestfs-actions.pod:2019
9795 "This function returns a string, or NULL on error. The string is owned by "
9796 "the guest handle and must I<not> be freed."
9801 #: ../src/guestfs-actions.pod:1995
9802 msgid "guestfs_get_pid"
9807 #: ../src/guestfs-actions.pod:1997
9811 " guestfs_get_pid (guestfs_h *g);\n"
9817 #: ../src/guestfs-actions.pod:2000 ../fish/guestfish-actions.pod:1361
9819 "Return the process ID of the qemu subprocess. If there is no qemu "
9820 "subprocess, then this will return an error."
9825 #: ../src/guestfs-actions.pod:2003 ../fish/guestfish-actions.pod:1364
9826 msgid "This is an internal call used for debugging and testing."
9831 #: ../src/guestfs-actions.pod:2007
9832 msgid "(Added in 1.0.56)"
9837 #: ../src/guestfs-actions.pod:2009
9838 msgid "guestfs_get_qemu"
9843 #: ../src/guestfs-actions.pod:2011
9847 " guestfs_get_qemu (guestfs_h *g);\n"
9853 #: ../src/guestfs-actions.pod:2014 ../fish/guestfish-actions.pod:1370
9854 msgid "Return the current qemu binary."
9859 #: ../src/guestfs-actions.pod:2016 ../fish/guestfish-actions.pod:1372
9861 "This is always non-NULL. If it wasn't set already, then this will return "
9862 "the default qemu binary name."
9867 #: ../src/guestfs-actions.pod:2022 ../src/guestfs-actions.pod:5730
9868 msgid "(Added in 1.0.6)"
9873 #: ../src/guestfs-actions.pod:2024
9874 msgid "guestfs_get_recovery_proc"
9879 #: ../src/guestfs-actions.pod:2026
9883 " guestfs_get_recovery_proc (guestfs_h *g);\n"
9889 #: ../src/guestfs-actions.pod:2029 ../fish/guestfish-actions.pod:1379
9890 msgid "Return the recovery process enabled flag."
9895 #: ../src/guestfs-actions.pod:2033 ../src/guestfs-actions.pod:3287
9896 #: ../src/guestfs-actions.pod:3584 ../src/guestfs-actions.pod:3984
9897 #: ../src/guestfs-actions.pod:4016 ../src/guestfs-actions.pod:5034
9898 #: ../src/guestfs-actions.pod:5377 ../src/guestfs-actions.pod:5754
9899 #: ../src/guestfs-actions.pod:6413 ../src/guestfs-actions.pod:6433
9900 #: ../src/guestfs-actions.pod:6625
9901 msgid "(Added in 1.0.77)"
9906 #: ../src/guestfs-actions.pod:2035
9907 msgid "guestfs_get_selinux"
9912 #: ../src/guestfs-actions.pod:2037
9916 " guestfs_get_selinux (guestfs_h *g);\n"
9922 #: ../src/guestfs-actions.pod:2040
9924 "This returns the current setting of the selinux flag which is passed to the "
9925 "appliance at boot time. See C<guestfs_set_selinux>."
9930 #: ../src/guestfs-actions.pod:2048 ../src/guestfs-actions.pod:2111
9931 #: ../src/guestfs-actions.pod:5773 ../src/guestfs-actions.pod:5827
9932 msgid "(Added in 1.0.67)"
9937 #: ../src/guestfs-actions.pod:2050
9938 msgid "guestfs_get_state"
9943 #: ../src/guestfs-actions.pod:2052
9947 " guestfs_get_state (guestfs_h *g);\n"
9953 #: ../src/guestfs-actions.pod:2055 ../fish/guestfish-actions.pod:1395
9955 "This returns the current state as an opaque integer. This is only useful "
9956 "for printing debug and internal error messages."
9961 #: ../src/guestfs-actions.pod:2058 ../src/guestfs-actions.pod:3090
9962 #: ../src/guestfs-actions.pod:3119 ../src/guestfs-actions.pod:3180
9963 #: ../src/guestfs-actions.pod:3207 ../fish/guestfish-actions.pod:1398
9964 #: ../fish/guestfish-actions.pod:2159 ../fish/guestfish-actions.pod:2177
9965 #: ../fish/guestfish-actions.pod:2215 ../fish/guestfish-actions.pod:2231
9966 msgid "For more information on states, see L<guestfs(3)>."
9971 #: ../src/guestfs-actions.pod:2064
9972 msgid "guestfs_get_trace"
9977 #: ../src/guestfs-actions.pod:2066
9981 " guestfs_get_trace (guestfs_h *g);\n"
9987 #: ../src/guestfs-actions.pod:2069 ../fish/guestfish-actions.pod:1404
9988 msgid "Return the command trace flag."
9993 #: ../src/guestfs-actions.pod:2075
9994 msgid "guestfs_get_umask"
9999 #: ../src/guestfs-actions.pod:2077
10003 " guestfs_get_umask (guestfs_h *g);\n"
10009 #: ../src/guestfs-actions.pod:2080
10011 "Return the current umask. By default the umask is C<022> unless it has been "
10012 "set by calling C<guestfs_umask>."
10017 #: ../src/guestfs-actions.pod:2087
10018 msgid "guestfs_get_verbose"
10023 #: ../src/guestfs-actions.pod:2089
10027 " guestfs_get_verbose (guestfs_h *g);\n"
10033 #: ../src/guestfs-actions.pod:2092 ../fish/guestfish-actions.pod:1417
10034 msgid "This returns the verbose messages flag."
10039 #: ../src/guestfs-actions.pod:2098
10040 msgid "guestfs_getcon"
10045 #: ../src/guestfs-actions.pod:2100
10049 " guestfs_getcon (guestfs_h *g);\n"
10055 #: ../src/guestfs-actions.pod:2103 ../fish/guestfish-actions.pod:1423
10056 msgid "This gets the SELinux security context of the daemon."
10061 #: ../src/guestfs-actions.pod:2105
10063 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
10068 #: ../src/guestfs-actions.pod:2113
10069 msgid "guestfs_getxattr"
10074 #: ../src/guestfs-actions.pod:2115
10078 " guestfs_getxattr (guestfs_h *g,\n"
10079 " const char *path,\n"
10080 " const char *name,\n"
10081 " size_t *size_r);\n"
10087 #: ../src/guestfs-actions.pod:2121
10089 "Get a single extended attribute from file C<path> named C<name>. This call "
10090 "follows symlinks. If you want to lookup an extended attribute for the "
10091 "symlink itself, use C<guestfs_lgetxattr>."
10096 #: ../src/guestfs-actions.pod:2125 ../src/guestfs-actions.pod:3301
10098 "Normally it is better to get all extended attributes from a file in one go "
10099 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
10100 "implementations are buggy and do not provide a way to list out attributes. "
10101 "For these filesystems (notably ntfs-3g) you have to know the names of the "
10102 "extended attributes you want in advance and call this function."
10107 #: ../src/guestfs-actions.pod:2132 ../src/guestfs-actions.pod:3308
10108 #: ../fish/guestfish-actions.pod:1443 ../fish/guestfish-actions.pod:2296
10110 "Extended attribute values are blobs of binary data. If there is no extended "
10111 "attribute named C<name>, this returns an error."
10116 #: ../src/guestfs-actions.pod:2135
10117 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
10122 #: ../src/guestfs-actions.pod:2137 ../src/guestfs-actions.pod:2350
10123 #: ../src/guestfs-actions.pod:3313 ../src/guestfs-actions.pod:5027
10124 #: ../src/guestfs-actions.pod:5053 ../src/guestfs-actions.pod:5234
10126 "This function returns a buffer, or NULL on error. The size of the returned "
10127 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
10132 #: ../src/guestfs-actions.pod:2141 ../src/guestfs-actions.pod:3317
10133 msgid "(Added in 1.7.24)"
10138 #: ../src/guestfs-actions.pod:2143
10139 msgid "guestfs_getxattrs"
10144 #: ../src/guestfs-actions.pod:2145
10147 " struct guestfs_xattr_list *\n"
10148 " guestfs_getxattrs (guestfs_h *g,\n"
10149 " const char *path);\n"
10155 #: ../src/guestfs-actions.pod:2149 ../fish/guestfish-actions.pod:1452
10157 "This call lists the extended attributes of the file or directory C<path>."
10162 #: ../src/guestfs-actions.pod:2152 ../fish/guestfish-actions.pod:1455
10164 "At the system call level, this is a combination of the L<listxattr(2)> and "
10165 "L<getxattr(2)> calls."
10170 #: ../src/guestfs-actions.pod:2155
10171 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
10176 #: ../src/guestfs-actions.pod:2157 ../src/guestfs-actions.pod:3329
10177 #: ../src/guestfs-actions.pod:3980
10179 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
10180 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
10185 #: ../src/guestfs-actions.pod:2161 ../src/guestfs-actions.pod:3333
10186 #: ../src/guestfs-actions.pod:3498 ../src/guestfs-actions.pod:3534
10187 #: ../src/guestfs-actions.pod:5407 ../src/guestfs-actions.pod:5846
10188 #: ../src/guestfs-actions.pod:7181
10189 msgid "(Added in 1.0.59)"
10194 #: ../src/guestfs-actions.pod:2163
10195 msgid "guestfs_glob_expand"
10200 #: ../src/guestfs-actions.pod:2165
10204 " guestfs_glob_expand (guestfs_h *g,\n"
10205 " const char *pattern);\n"
10211 #: ../src/guestfs-actions.pod:2169 ../fish/guestfish-actions.pod:1464
10213 "This command searches for all the pathnames matching C<pattern> according to "
10214 "the wildcard expansion rules used by the shell."
10219 #: ../src/guestfs-actions.pod:2173 ../fish/guestfish-actions.pod:1468
10221 "If no paths match, then this returns an empty list (note: not an error)."
10226 #: ../src/guestfs-actions.pod:2176 ../fish/guestfish-actions.pod:1471
10228 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
10229 "GLOB_BRACE>. See that manual page for more details."
10234 #: ../src/guestfs-actions.pod:2184 ../src/guestfs-actions.pod:6011
10235 #: ../src/guestfs-actions.pod:6028
10236 msgid "(Added in 1.0.50)"
10241 #: ../src/guestfs-actions.pod:2186
10242 msgid "guestfs_grep"
10247 #: ../src/guestfs-actions.pod:2188
10251 " guestfs_grep (guestfs_h *g,\n"
10252 " const char *regex,\n"
10253 " const char *path);\n"
10259 #: ../src/guestfs-actions.pod:2193 ../fish/guestfish-actions.pod:1479
10260 msgid "This calls the external C<grep> program and returns the matching lines."
10265 #: ../src/guestfs-actions.pod:2205
10266 msgid "guestfs_grepi"
10271 #: ../src/guestfs-actions.pod:2207
10275 " guestfs_grepi (guestfs_h *g,\n"
10276 " const char *regex,\n"
10277 " const char *path);\n"
10283 #: ../src/guestfs-actions.pod:2212 ../fish/guestfish-actions.pod:1489
10285 "This calls the external C<grep -i> program and returns the matching lines."
10290 #: ../src/guestfs-actions.pod:2224
10291 msgid "guestfs_grub_install"
10296 #: ../src/guestfs-actions.pod:2226
10300 " guestfs_grub_install (guestfs_h *g,\n"
10301 " const char *root,\n"
10302 " const char *device);\n"
10307 #: ../src/guestfs-actions.pod:2231 ../fish/guestfish-actions.pod:1499
10309 "This command installs GRUB 1 (the Grand Unified Bootloader) on C<device>, "
10310 "with the root directory being C<root>."
10314 #: ../src/guestfs-actions.pod:2240 ../fish/guestfish-actions.pod:1508
10316 "There is currently no way in the API to install grub2, which is used by most "
10317 "modern Linux guests. It is possible to run the grub2 command from the "
10318 "guest, although see the caveats in L<guestfs(3)/RUNNING COMMANDS>."
10322 #: ../src/guestfs-actions.pod:2247 ../fish/guestfish-actions.pod:1515
10324 "This uses C<grub-install> from the host. Unfortunately grub is not always "
10325 "compatible with itself, so this only works in rather narrow circumstances. "
10326 "Careful testing with each guest version is advisable."
10330 #: ../src/guestfs-actions.pod:2254 ../fish/guestfish-actions.pod:1522
10332 "If grub-install reports the error \"No suitable drive was found in the "
10333 "generated device map.\" it may be that you need to create a C</boot/grub/"
10334 "device.map> file first that contains the mapping between grub device names "
10335 "and Linux device names. It is usually sufficient to create a file "
10341 #: ../src/guestfs-actions.pod:2261 ../fish/guestfish-actions.pod:1529
10344 " (hd0) /dev/vda\n"
10350 #: ../src/guestfs-actions.pod:2263 ../fish/guestfish-actions.pod:1531
10351 msgid "replacing C</dev/vda> with the name of the installation device."
10356 #: ../src/guestfs-actions.pod:2269
10357 msgid "(Added in 1.0.17)"
10362 #: ../src/guestfs-actions.pod:2271
10363 msgid "guestfs_head"
10368 #: ../src/guestfs-actions.pod:2273
10372 " guestfs_head (guestfs_h *g,\n"
10373 " const char *path);\n"
10379 #: ../src/guestfs-actions.pod:2277 ../fish/guestfish-actions.pod:1539
10381 "This command returns up to the first 10 lines of a file as a list of strings."
10386 #: ../src/guestfs-actions.pod:2289
10387 msgid "guestfs_head_n"
10392 #: ../src/guestfs-actions.pod:2291
10396 " guestfs_head_n (guestfs_h *g,\n"
10398 " const char *path);\n"
10404 #: ../src/guestfs-actions.pod:2296 ../fish/guestfish-actions.pod:1549
10406 "If the parameter C<nrlines> is a positive number, this returns the first "
10407 "C<nrlines> lines of the file C<path>."
10412 #: ../src/guestfs-actions.pod:2299 ../fish/guestfish-actions.pod:1552
10414 "If the parameter C<nrlines> is a negative number, this returns lines from "
10415 "the file C<path>, excluding the last C<nrlines> lines."
10420 #: ../src/guestfs-actions.pod:2302 ../src/guestfs-actions.pod:6308
10421 #: ../fish/guestfish-actions.pod:1555 ../fish/guestfish-actions.pod:4221
10422 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
10427 #: ../src/guestfs-actions.pod:2313
10428 msgid "guestfs_hexdump"
10433 #: ../src/guestfs-actions.pod:2315
10437 " guestfs_hexdump (guestfs_h *g,\n"
10438 " const char *path);\n"
10444 #: ../src/guestfs-actions.pod:2319 ../fish/guestfish-actions.pod:1564
10446 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
10447 "readable, canonical hex dump of the file."
10452 #: ../src/guestfs-actions.pod:2328 ../src/guestfs-actions.pod:6092
10453 #: ../src/guestfs-actions.pod:6147
10454 msgid "(Added in 1.0.22)"
10459 #: ../src/guestfs-actions.pod:2330
10460 msgid "guestfs_initrd_cat"
10465 #: ../src/guestfs-actions.pod:2332
10469 " guestfs_initrd_cat (guestfs_h *g,\n"
10470 " const char *initrdpath,\n"
10471 " const char *filename,\n"
10472 " size_t *size_r);\n"
10478 #: ../src/guestfs-actions.pod:2338 ../fish/guestfish-actions.pod:1574
10480 "This command unpacks the file C<filename> from the initrd file called "
10481 "C<initrdpath>. The filename must be given I<without> the initial C</> "
10487 #: ../src/guestfs-actions.pod:2342 ../fish/guestfish-actions.pod:1578
10489 "For example, in guestfish you could use the following command to examine the "
10490 "boot script (usually called C</init>) contained in a Linux initrd or "
10496 #: ../src/guestfs-actions.pod:2346 ../fish/guestfish-actions.pod:1582
10499 " initrd-cat /boot/initrd-<version>.img init\n"
10505 #: ../src/guestfs-actions.pod:2348
10506 msgid "See also C<guestfs_initrd_list>."
10511 #: ../src/guestfs-actions.pod:2359
10512 msgid "guestfs_initrd_list"
10517 #: ../src/guestfs-actions.pod:2361
10521 " guestfs_initrd_list (guestfs_h *g,\n"
10522 " const char *path);\n"
10528 #: ../src/guestfs-actions.pod:2365 ../fish/guestfish-actions.pod:1593
10529 msgid "This command lists out files contained in an initrd."
10534 #: ../src/guestfs-actions.pod:2367 ../fish/guestfish-actions.pod:1595
10536 "The files are listed without any initial C</> character. The files are "
10537 "listed in the order they appear (not necessarily alphabetical). Directory "
10538 "names are listed as separate items."
10543 #: ../src/guestfs-actions.pod:2371 ../fish/guestfish-actions.pod:1599
10545 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
10546 "initrd. We I<only> support the newer initramfs format (compressed cpio "
10552 #: ../src/guestfs-actions.pod:2381
10553 msgid "guestfs_inotify_add_watch"
10558 #: ../src/guestfs-actions.pod:2383
10562 " guestfs_inotify_add_watch (guestfs_h *g,\n"
10563 " const char *path,\n"
10570 #: ../src/guestfs-actions.pod:2388 ../fish/guestfish-actions.pod:1607
10571 msgid "Watch C<path> for the events listed in C<mask>."
10576 #: ../src/guestfs-actions.pod:2390 ../fish/guestfish-actions.pod:1609
10578 "Note that if C<path> is a directory then events within that directory are "
10579 "watched, but this does I<not> happen recursively (in subdirectories)."
10584 #: ../src/guestfs-actions.pod:2394 ../fish/guestfish-actions.pod:1613
10586 "Note for non-C or non-Linux callers: the inotify events are defined by the "
10587 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
10592 #: ../src/guestfs-actions.pod:2402
10593 msgid "guestfs_inotify_close"
10598 #: ../src/guestfs-actions.pod:2404
10602 " guestfs_inotify_close (guestfs_h *g);\n"
10608 #: ../src/guestfs-actions.pod:2407 ../fish/guestfish-actions.pod:1621
10610 "This closes the inotify handle which was previously opened by inotify_init. "
10611 "It removes all watches, throws away any pending events, and deallocates all "
10617 #: ../src/guestfs-actions.pod:2415
10618 msgid "guestfs_inotify_files"
10623 #: ../src/guestfs-actions.pod:2417
10627 " guestfs_inotify_files (guestfs_h *g);\n"
10633 #: ../src/guestfs-actions.pod:2420
10635 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
10636 "returns a list of pathnames of objects that were touched. The returned "
10637 "pathnames are sorted and deduplicated."
10642 #: ../src/guestfs-actions.pod:2430
10643 msgid "guestfs_inotify_init"
10648 #: ../src/guestfs-actions.pod:2432
10652 " guestfs_inotify_init (guestfs_h *g,\n"
10653 " int maxevents);\n"
10659 #: ../src/guestfs-actions.pod:2436 ../fish/guestfish-actions.pod:1637
10661 "This command creates a new inotify handle. The inotify subsystem can be "
10662 "used to notify events which happen to objects in the guest filesystem."
10667 #: ../src/guestfs-actions.pod:2440
10669 "C<maxevents> is the maximum number of events which will be queued up between "
10670 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
10671 "passed as C<0>, then the kernel (or previously set) default is used. For "
10672 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
10673 "throws away events, but records the fact that it threw them away by setting "
10674 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
10675 "C<guestfs_inotify_read>)."
10680 #: ../src/guestfs-actions.pod:2450
10682 "Before any events are generated, you have to add some watches to the "
10683 "internal watch list. See: C<guestfs_inotify_add_watch>, "
10684 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
10689 #: ../src/guestfs-actions.pod:2456
10691 "Queued up events should be read periodically by calling "
10692 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
10693 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
10694 "often enough then you risk the internal queue overflowing."
10699 #: ../src/guestfs-actions.pod:2463
10701 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
10702 "This also removes any watches automatically."
10707 #: ../src/guestfs-actions.pod:2467 ../fish/guestfish-actions.pod:1668
10709 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
10710 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
10711 "that there is one global inotify handle per libguestfs instance."
10716 #: ../src/guestfs-actions.pod:2476
10717 msgid "guestfs_inotify_read"
10722 #: ../src/guestfs-actions.pod:2478
10725 " struct guestfs_inotify_event_list *\n"
10726 " guestfs_inotify_read (guestfs_h *g);\n"
10732 #: ../src/guestfs-actions.pod:2481 ../fish/guestfish-actions.pod:1677
10734 "Return the complete queue of events that have happened since the previous "
10740 #: ../src/guestfs-actions.pod:2484 ../fish/guestfish-actions.pod:1680
10741 msgid "If no events have happened, this returns an empty list."
10746 #: ../src/guestfs-actions.pod:2486 ../fish/guestfish-actions.pod:1682
10748 "I<Note>: In order to make sure that all events have been read, you must call "
10749 "this function repeatedly until it returns an empty list. The reason is that "
10750 "the call will read events up to the maximum appliance-to-host message size "
10751 "and leave remaining events in the queue."
10756 #: ../src/guestfs-actions.pod:2492
10758 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
10759 "there was an error. I<The caller must call "
10760 "C<guestfs_free_inotify_event_list> after use>."
10765 #: ../src/guestfs-actions.pod:2498
10766 msgid "guestfs_inotify_rm_watch"
10771 #: ../src/guestfs-actions.pod:2500
10775 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
10782 #: ../src/guestfs-actions.pod:2504
10784 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
10789 #: ../src/guestfs-actions.pod:2511
10790 msgid "guestfs_inspect_get_arch"
10795 #: ../src/guestfs-actions.pod:2513
10799 " guestfs_inspect_get_arch (guestfs_h *g,\n"
10800 " const char *root);\n"
10806 #: ../src/guestfs-actions.pod:2517 ../src/guestfs-actions.pod:2540
10807 #: ../src/guestfs-actions.pod:2621 ../src/guestfs-actions.pod:2647
10808 #: ../src/guestfs-actions.pod:2669 ../src/guestfs-actions.pod:2696
10809 #: ../src/guestfs-actions.pod:2717 ../src/guestfs-actions.pod:2754
10810 #: ../src/guestfs-actions.pod:2783 ../src/guestfs-actions.pod:2814
10811 #: ../src/guestfs-actions.pod:2858 ../src/guestfs-actions.pod:2900
10812 #: ../src/guestfs-actions.pod:2923
10814 "This function should only be called with a root device string as returned by "
10815 "C<guestfs_inspect_os>."
10820 #: ../src/guestfs-actions.pod:2520
10822 "This returns the architecture of the inspected operating system. The "
10823 "possible return values are listed under C<guestfs_file_architecture>."
10828 #: ../src/guestfs-actions.pod:2524 ../fish/guestfish-actions.pod:1706
10830 "If the architecture could not be determined, then the string C<unknown> is "
10836 #: ../src/guestfs-actions.pod:2527 ../src/guestfs-actions.pod:2608
10837 #: ../src/guestfs-actions.pod:2656 ../src/guestfs-actions.pod:2684
10838 #: ../src/guestfs-actions.pod:2770 ../src/guestfs-actions.pod:2801
10839 #: ../src/guestfs-actions.pod:2825 ../src/guestfs-actions.pod:2844
10840 #: ../src/guestfs-actions.pod:2887 ../src/guestfs-actions.pod:2910
10841 #: ../src/guestfs-actions.pod:3016 ../src/guestfs-actions.pod:3057
10842 #: ../fish/guestfish-actions.pod:1709 ../fish/guestfish-actions.pod:1783
10843 #: ../fish/guestfish-actions.pod:1816 ../fish/guestfish-actions.pod:1837
10844 #: ../fish/guestfish-actions.pod:1901 ../fish/guestfish-actions.pod:1925
10845 #: ../fish/guestfish-actions.pod:1942 ../fish/guestfish-actions.pod:1955
10846 #: ../fish/guestfish-actions.pod:1990 ../fish/guestfish-actions.pod:2006
10847 #: ../fish/guestfish-actions.pod:2105 ../fish/guestfish-actions.pod:2139
10848 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
10853 #: ../src/guestfs-actions.pod:2534
10854 msgid "guestfs_inspect_get_distro"
10859 #: ../src/guestfs-actions.pod:2536
10863 " guestfs_inspect_get_distro (guestfs_h *g,\n"
10864 " const char *root);\n"
10870 #: ../src/guestfs-actions.pod:2543 ../fish/guestfish-actions.pod:1718
10872 "This returns the distro (distribution) of the inspected operating system."
10877 #: ../src/guestfs-actions.pod:2546 ../fish/guestfish-actions.pod:1721
10878 msgid "Currently defined distros are:"
10883 #: ../src/guestfs-actions.pod:2550 ../fish/guestfish-actions.pod:1725
10884 msgid "\"archlinux\""
10889 #: ../src/guestfs-actions.pod:2552 ../fish/guestfish-actions.pod:1727
10890 msgid "Arch Linux."
10895 #: ../src/guestfs-actions.pod:2554 ../fish/guestfish-actions.pod:1729
10901 #: ../src/guestfs-actions.pod:2556 ../fish/guestfish-actions.pod:1731
10907 #: ../src/guestfs-actions.pod:2558 ../fish/guestfish-actions.pod:1733
10913 #: ../src/guestfs-actions.pod:2560 ../fish/guestfish-actions.pod:1735
10919 #: ../src/guestfs-actions.pod:2562 ../fish/guestfish-actions.pod:1737
10925 #: ../src/guestfs-actions.pod:2564 ../fish/guestfish-actions.pod:1739
10931 #: ../src/guestfs-actions.pod:2566 ../fish/guestfish-actions.pod:1741
10932 msgid "\"linuxmint\""
10937 #: ../src/guestfs-actions.pod:2568 ../fish/guestfish-actions.pod:1743
10938 msgid "Linux Mint."
10943 #: ../src/guestfs-actions.pod:2570 ../fish/guestfish-actions.pod:1745
10944 msgid "\"mandriva\""
10949 #: ../src/guestfs-actions.pod:2572 ../fish/guestfish-actions.pod:1747
10955 #: ../src/guestfs-actions.pod:2574 ../fish/guestfish-actions.pod:1749
10961 #: ../src/guestfs-actions.pod:2576 ../fish/guestfish-actions.pod:1751
10967 #: ../src/guestfs-actions.pod:2578 ../fish/guestfish-actions.pod:1753
10973 #: ../src/guestfs-actions.pod:2580 ../fish/guestfish-actions.pod:1755
10979 #: ../src/guestfs-actions.pod:2582 ../fish/guestfish-actions.pod:1757
10980 msgid "\"redhat-based\""
10985 #: ../src/guestfs-actions.pod:2584 ../fish/guestfish-actions.pod:1759
10986 msgid "Some Red Hat-derived distro."
10991 #: ../src/guestfs-actions.pod:2586 ../fish/guestfish-actions.pod:1761
10997 #: ../src/guestfs-actions.pod:2588 ../fish/guestfish-actions.pod:1763
10998 msgid "Red Hat Enterprise Linux and some derivatives."
11003 #: ../src/guestfs-actions.pod:2590 ../fish/guestfish-actions.pod:1765
11009 #: ../src/guestfs-actions.pod:2592 ../fish/guestfish-actions.pod:1767
11015 #: ../src/guestfs-actions.pod:2594 ../src/guestfs-actions.pod:2878
11016 #: ../fish/guestfish-actions.pod:1769 ../fish/guestfish-actions.pod:1981
11017 msgid "\"unknown\""
11022 #: ../src/guestfs-actions.pod:2596 ../fish/guestfish-actions.pod:1771
11023 msgid "The distro could not be determined."
11028 #: ../src/guestfs-actions.pod:2598 ../src/guestfs-actions.pod:2870
11029 #: ../fish/guestfish-actions.pod:1773 ../fish/guestfish-actions.pod:1973
11030 msgid "\"windows\""
11035 #: ../src/guestfs-actions.pod:2600 ../fish/guestfish-actions.pod:1775
11037 "Windows does not have distributions. This string is returned if the OS type "
11043 #: ../src/guestfs-actions.pod:2605 ../src/guestfs-actions.pod:2884
11044 #: ../fish/guestfish-actions.pod:1780 ../fish/guestfish-actions.pod:1987
11046 "Future versions of libguestfs may return other strings here. The caller "
11047 "should be prepared to handle any string."
11052 #: ../src/guestfs-actions.pod:2615
11053 msgid "guestfs_inspect_get_filesystems"
11058 #: ../src/guestfs-actions.pod:2617
11062 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
11063 " const char *root);\n"
11069 #: ../src/guestfs-actions.pod:2624 ../fish/guestfish-actions.pod:1792
11071 "This returns a list of all the filesystems that we think are associated with "
11072 "this operating system. This includes the root filesystem, other ordinary "
11073 "filesystems, and non-mounted devices like swap partitions."
11078 #: ../src/guestfs-actions.pod:2629 ../fish/guestfish-actions.pod:1797
11080 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
11081 "to be shared between operating systems."
11086 #: ../src/guestfs-actions.pod:2632
11088 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
11089 "C<guestfs_inspect_get_mountpoints>."
11094 #: ../src/guestfs-actions.pod:2641
11095 msgid "guestfs_inspect_get_hostname"
11100 #: ../src/guestfs-actions.pod:2643
11104 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
11105 " const char *root);\n"
11111 #: ../src/guestfs-actions.pod:2650 ../fish/guestfish-actions.pod:1810
11113 "This function returns the hostname of the operating system as found by "
11114 "inspection of the guest's configuration files."
11119 #: ../src/guestfs-actions.pod:2653 ../fish/guestfish-actions.pod:1813
11121 "If the hostname could not be determined, then the string C<unknown> is "
11127 #: ../src/guestfs-actions.pod:2661
11128 msgid "(Added in 1.7.9)"
11133 #: ../src/guestfs-actions.pod:2663
11134 msgid "guestfs_inspect_get_major_version"
11139 #: ../src/guestfs-actions.pod:2665
11143 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
11144 " const char *root);\n"
11150 #: ../src/guestfs-actions.pod:2672 ../fish/guestfish-actions.pod:1825
11152 "This returns the major version number of the inspected operating system."
11157 #: ../src/guestfs-actions.pod:2675 ../fish/guestfish-actions.pod:1828
11159 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
11160 "popular public names used by the operating system. Notably the operating "
11161 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
11162 "1). You can find out the real versions corresponding to releases of Windows "
11163 "by consulting Wikipedia or MSDN."
11168 #: ../src/guestfs-actions.pod:2682 ../src/guestfs-actions.pod:2702
11169 #: ../fish/guestfish-actions.pod:1835 ../fish/guestfish-actions.pod:1849
11170 msgid "If the version could not be determined, then C<0> is returned."
11175 #: ../src/guestfs-actions.pod:2690
11176 msgid "guestfs_inspect_get_minor_version"
11181 #: ../src/guestfs-actions.pod:2692
11185 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
11186 " const char *root);\n"
11192 #: ../src/guestfs-actions.pod:2699 ../fish/guestfish-actions.pod:1846
11194 "This returns the minor version number of the inspected operating system."
11199 #: ../src/guestfs-actions.pod:2704
11201 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
11202 "C<guestfs_inspect_get_major_version>."
11207 #: ../src/guestfs-actions.pod:2711
11208 msgid "guestfs_inspect_get_mountpoints"
11213 #: ../src/guestfs-actions.pod:2713
11217 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
11218 " const char *root);\n"
11223 #: ../src/guestfs-actions.pod:2720 ../fish/guestfish-actions.pod:1861
11225 "This returns a hash of where we think the filesystems associated with this "
11226 "operating system should be mounted. Callers should note that this is at "
11227 "best an educated guess made by reading configuration files such as C</etc/"
11228 "fstab>. I<In particular note> that this may return filesystems which are "
11229 "non-existent or not mountable and callers should be prepared to handle or "
11230 "ignore failures if they try to mount them."
11235 #: ../src/guestfs-actions.pod:2729 ../fish/guestfish-actions.pod:1870
11237 "Each element in the returned hashtable has a key which is the path of the "
11238 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
11239 "mounted there (eg. C</dev/sda1>)."
11244 #: ../src/guestfs-actions.pod:2734 ../fish/guestfish-actions.pod:1875
11246 "Non-mounted devices such as swap devices are I<not> returned in this list."
11251 #: ../src/guestfs-actions.pod:2737
11253 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
11254 "C<guestfs_inspect_get_filesystems>."
11259 #: ../src/guestfs-actions.pod:2740 ../src/guestfs-actions.pod:3386
11260 #: ../src/guestfs-actions.pod:4584 ../src/guestfs-actions.pod:6449
11262 "This function returns a NULL-terminated array of strings, or NULL if there "
11263 "was an error. The array of strings will always have length C<2n+1>, where "
11264 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
11265 "caller must free the strings and the array after use>."
11270 #: ../src/guestfs-actions.pod:2748
11271 msgid "guestfs_inspect_get_package_format"
11276 #: ../src/guestfs-actions.pod:2750
11280 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
11281 " const char *root);\n"
11287 #: ../src/guestfs-actions.pod:2757
11289 "This function and C<guestfs_inspect_get_package_management> return the "
11290 "package format and package management tool used by the inspected operating "
11291 "system. For example for Fedora these functions would return C<rpm> (package "
11292 "format) and C<yum> (package management)."
11297 #: ../src/guestfs-actions.pod:2763 ../fish/guestfish-actions.pod:1894
11299 "This returns the string C<unknown> if we could not determine the package "
11300 "format I<or> if the operating system does not have a real packaging system "
11306 #: ../src/guestfs-actions.pod:2767 ../fish/guestfish-actions.pod:1898
11308 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>. "
11309 "Future versions of libguestfs may return other strings."
11314 #: ../src/guestfs-actions.pod:2775 ../src/guestfs-actions.pod:2806
11315 msgid "(Added in 1.7.5)"
11320 #: ../src/guestfs-actions.pod:2777
11321 msgid "guestfs_inspect_get_package_management"
11326 #: ../src/guestfs-actions.pod:2779
11330 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
11331 " const char *root);\n"
11337 #: ../src/guestfs-actions.pod:2786
11339 "C<guestfs_inspect_get_package_format> and this function return the package "
11340 "format and package management tool used by the inspected operating system. "
11341 "For example for Fedora these functions would return C<rpm> (package format) "
11342 "and C<yum> (package management)."
11347 #: ../src/guestfs-actions.pod:2792 ../fish/guestfish-actions.pod:1916
11349 "This returns the string C<unknown> if we could not determine the package "
11350 "management tool I<or> if the operating system does not have a real packaging "
11351 "system (eg. Windows)."
11356 #: ../src/guestfs-actions.pod:2796 ../fish/guestfish-actions.pod:1920
11358 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
11359 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>. Future versions of "
11360 "libguestfs may return other strings."
11365 #: ../src/guestfs-actions.pod:2808
11366 msgid "guestfs_inspect_get_product_name"
11371 #: ../src/guestfs-actions.pod:2810
11375 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
11376 " const char *root);\n"
11382 #: ../src/guestfs-actions.pod:2817 ../fish/guestfish-actions.pod:1934
11384 "This returns the product name of the inspected operating system. The "
11385 "product name is generally some freeform string which can be displayed to the "
11386 "user, but should not be parsed by programs."
11391 #: ../src/guestfs-actions.pod:2822 ../fish/guestfish-actions.pod:1939
11393 "If the product name could not be determined, then the string C<unknown> is "
11399 #: ../src/guestfs-actions.pod:2832
11400 msgid "guestfs_inspect_get_roots"
11405 #: ../src/guestfs-actions.pod:2834
11409 " guestfs_inspect_get_roots (guestfs_h *g);\n"
11415 #: ../src/guestfs-actions.pod:2837
11417 "This function is a convenient way to get the list of root devices, as "
11418 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
11419 "the whole inspection process."
11424 #: ../src/guestfs-actions.pod:2841
11426 "This returns an empty list if either no root devices were found or the "
11427 "caller has not called C<guestfs_inspect_os>."
11432 #: ../src/guestfs-actions.pod:2850
11433 msgid "(Added in 1.7.3)"
11438 #: ../src/guestfs-actions.pod:2852
11439 msgid "guestfs_inspect_get_type"
11444 #: ../src/guestfs-actions.pod:2854
11448 " guestfs_inspect_get_type (guestfs_h *g,\n"
11449 " const char *root);\n"
11455 #: ../src/guestfs-actions.pod:2861 ../fish/guestfish-actions.pod:1964
11457 "This returns the type of the inspected operating system. Currently defined "
11463 #: ../src/guestfs-actions.pod:2866 ../fish/guestfish-actions.pod:1969
11469 #: ../src/guestfs-actions.pod:2868 ../fish/guestfish-actions.pod:1971
11470 msgid "Any Linux-based operating system."
11475 #: ../src/guestfs-actions.pod:2872 ../fish/guestfish-actions.pod:1975
11476 msgid "Any Microsoft Windows operating system."
11481 #: ../src/guestfs-actions.pod:2874 ../fish/guestfish-actions.pod:1977
11482 msgid "\"freebsd\""
11487 #: ../src/guestfs-actions.pod:2876 ../fish/guestfish-actions.pod:1979
11493 #: ../src/guestfs-actions.pod:2880 ../fish/guestfish-actions.pod:1983
11494 msgid "The operating system type could not be determined."
11499 #: ../src/guestfs-actions.pod:2894
11500 msgid "guestfs_inspect_get_windows_systemroot"
11505 #: ../src/guestfs-actions.pod:2896
11509 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
11510 " const char *root);\n"
11516 #: ../src/guestfs-actions.pod:2903 ../fish/guestfish-actions.pod:1999
11518 "This returns the Windows systemroot of the inspected guest. The systemroot "
11519 "is a directory path such as C</WINDOWS>."
11524 #: ../src/guestfs-actions.pod:2906 ../fish/guestfish-actions.pod:2002
11526 "This call assumes that the guest is Windows and that the systemroot could be "
11527 "determined by inspection. If this is not the case then an error is returned."
11532 #: ../src/guestfs-actions.pod:2915
11533 msgid "(Added in 1.5.25)"
11538 #: ../src/guestfs-actions.pod:2917
11539 msgid "guestfs_inspect_list_applications"
11544 #: ../src/guestfs-actions.pod:2919
11547 " struct guestfs_application_list *\n"
11548 " guestfs_inspect_list_applications (guestfs_h *g,\n"
11549 " const char *root);\n"
11555 #: ../src/guestfs-actions.pod:2926 ../fish/guestfish-actions.pod:2015
11556 msgid "Return the list of applications installed in the operating system."
11561 #: ../src/guestfs-actions.pod:2928
11563 "I<Note:> This call works differently from other parts of the inspection "
11564 "API. You have to call C<guestfs_inspect_os>, then "
11565 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
11566 "this. Listing applications is a significantly more difficult operation "
11567 "which requires access to the full filesystem. Also note that unlike the "
11568 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
11569 "the libguestfs handle, this call actually reads parts of the mounted "
11570 "filesystems during the call."
11575 #: ../src/guestfs-actions.pod:2938 ../fish/guestfish-actions.pod:2027
11577 "This returns an empty list if the inspection code was not able to determine "
11578 "the list of applications."
11583 #: ../src/guestfs-actions.pod:2941 ../fish/guestfish-actions.pod:2030
11584 msgid "The application structure contains the following fields:"
11589 #: ../src/guestfs-actions.pod:2945 ../fish/guestfish-actions.pod:2034
11590 msgid "C<app_name>"
11595 #: ../src/guestfs-actions.pod:2947 ../fish/guestfish-actions.pod:2036
11597 "The name of the application. For Red Hat-derived and Debian-derived Linux "
11598 "guests, this is the package name."
11603 #: ../src/guestfs-actions.pod:2950 ../fish/guestfish-actions.pod:2039
11604 msgid "C<app_display_name>"
11609 #: ../src/guestfs-actions.pod:2952 ../fish/guestfish-actions.pod:2041
11611 "The display name of the application, sometimes localized to the install "
11612 "language of the guest operating system."
11617 #: ../src/guestfs-actions.pod:2955 ../fish/guestfish-actions.pod:2044
11619 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
11620 "to display something can use C<app_name> instead."
11625 #: ../src/guestfs-actions.pod:2958 ../fish/guestfish-actions.pod:2047
11626 msgid "C<app_epoch>"
11631 #: ../src/guestfs-actions.pod:2960 ../fish/guestfish-actions.pod:2049
11633 "For package managers which use epochs, this contains the epoch of the "
11634 "package (an integer). If unavailable, this is returned as C<0>."
11639 #: ../src/guestfs-actions.pod:2963 ../fish/guestfish-actions.pod:2052
11640 msgid "C<app_version>"
11645 #: ../src/guestfs-actions.pod:2965 ../fish/guestfish-actions.pod:2054
11647 "The version string of the application or package. If unavailable this is "
11648 "returned as an empty string C<\"\">."
11653 #: ../src/guestfs-actions.pod:2968 ../fish/guestfish-actions.pod:2057
11654 msgid "C<app_release>"
11659 #: ../src/guestfs-actions.pod:2970 ../fish/guestfish-actions.pod:2059
11661 "The release string of the application or package, for package managers that "
11662 "use this. If unavailable this is returned as an empty string C<\"\">."
11667 #: ../src/guestfs-actions.pod:2974 ../fish/guestfish-actions.pod:2063
11668 msgid "C<app_install_path>"
11673 #: ../src/guestfs-actions.pod:2976 ../fish/guestfish-actions.pod:2065
11675 "The installation path of the application (on operating systems such as "
11676 "Windows which use installation paths). This path is in the format used by "
11677 "the guest operating system, it is not a libguestfs path."
11682 #: ../src/guestfs-actions.pod:2981 ../fish/guestfish-actions.pod:2070
11683 msgid "If unavailable this is returned as an empty string C<\"\">."
11688 #: ../src/guestfs-actions.pod:2983 ../fish/guestfish-actions.pod:2072
11689 msgid "C<app_trans_path>"
11694 #: ../src/guestfs-actions.pod:2985 ../fish/guestfish-actions.pod:2074
11696 "The install path translated into a libguestfs path. If unavailable this is "
11697 "returned as an empty string C<\"\">."
11702 #: ../src/guestfs-actions.pod:2988 ../fish/guestfish-actions.pod:2077
11703 msgid "C<app_publisher>"
11708 #: ../src/guestfs-actions.pod:2990 ../fish/guestfish-actions.pod:2079
11710 "The name of the publisher of the application, for package managers that use "
11711 "this. If unavailable this is returned as an empty string C<\"\">."
11716 #: ../src/guestfs-actions.pod:2994 ../fish/guestfish-actions.pod:2083
11722 #: ../src/guestfs-actions.pod:2996 ../fish/guestfish-actions.pod:2085
11724 "The URL (eg. upstream URL) of the application. If unavailable this is "
11725 "returned as an empty string C<\"\">."
11730 #: ../src/guestfs-actions.pod:2999 ../fish/guestfish-actions.pod:2088
11731 msgid "C<app_source_package>"
11736 #: ../src/guestfs-actions.pod:3001 ../fish/guestfish-actions.pod:2090
11738 "For packaging systems which support this, the name of the source package. "
11739 "If unavailable this is returned as an empty string C<\"\">."
11744 #: ../src/guestfs-actions.pod:3004 ../fish/guestfish-actions.pod:2093
11745 msgid "C<app_summary>"
11750 #: ../src/guestfs-actions.pod:3006 ../fish/guestfish-actions.pod:2095
11752 "A short (usually one line) description of the application or package. If "
11753 "unavailable this is returned as an empty string C<\"\">."
11758 #: ../src/guestfs-actions.pod:3009 ../fish/guestfish-actions.pod:2098
11759 msgid "C<app_description>"
11764 #: ../src/guestfs-actions.pod:3011 ../fish/guestfish-actions.pod:2100
11766 "A longer description of the application or package. If unavailable this is "
11767 "returned as an empty string C<\"\">."
11772 #: ../src/guestfs-actions.pod:3018
11774 "This function returns a C<struct guestfs_application_list *>, or NULL if "
11775 "there was an error. I<The caller must call C<guestfs_free_application_list> "
11781 #: ../src/guestfs-actions.pod:3022
11782 msgid "(Added in 1.7.8)"
11787 #: ../src/guestfs-actions.pod:3024
11788 msgid "guestfs_inspect_os"
11793 #: ../src/guestfs-actions.pod:3026
11797 " guestfs_inspect_os (guestfs_h *g);\n"
11803 #: ../src/guestfs-actions.pod:3029 ../fish/guestfish-actions.pod:2111
11805 "This function uses other libguestfs functions and certain heuristics to "
11806 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
11807 "for operating systems."
11812 #: ../src/guestfs-actions.pod:3033 ../fish/guestfish-actions.pod:2115
11813 msgid "The list returned is empty if no operating systems were found."
11818 #: ../src/guestfs-actions.pod:3035 ../fish/guestfish-actions.pod:2117
11820 "If one operating system was found, then this returns a list with a single "
11821 "element, which is the name of the root filesystem of this operating system. "
11822 "It is also possible for this function to return a list containing more than "
11823 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
11824 "element being the root filesystem of one of the operating systems."
11829 #: ../src/guestfs-actions.pod:3042
11831 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
11832 "functions in order to query further information about each operating system, "
11833 "such as the name and version."
11838 #: ../src/guestfs-actions.pod:3047
11840 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
11841 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
11842 "the contents. This should be called with no disks currently mounted. The "
11843 "function may also use Augeas, so any existing Augeas handle will be closed."
11848 #: ../src/guestfs-actions.pod:3053 ../fish/guestfish-actions.pod:2135
11850 "This function cannot decrypt encrypted disks. The caller must do that first "
11851 "(supplying the necessary keys) if the disk is encrypted."
11856 #: ../src/guestfs-actions.pod:3059 ../src/guestfs-actions.pod:3344
11857 #: ../src/guestfs-actions.pod:3406
11858 msgid "See also C<guestfs_list_filesystems>."
11863 #: ../src/guestfs-actions.pod:3067
11864 msgid "guestfs_is_blockdev"
11869 #: ../src/guestfs-actions.pod:3069
11873 " guestfs_is_blockdev (guestfs_h *g,\n"
11874 " const char *path);\n"
11880 #: ../src/guestfs-actions.pod:3073 ../fish/guestfish-actions.pod:2147
11882 "This returns C<true> if and only if there is a block device with the given "
11888 #: ../src/guestfs-actions.pod:3076 ../src/guestfs-actions.pod:3105
11889 #: ../src/guestfs-actions.pod:3135 ../src/guestfs-actions.pod:3150
11890 #: ../src/guestfs-actions.pod:3166 ../src/guestfs-actions.pod:3222
11891 #: ../src/guestfs-actions.pod:3237
11892 msgid "See also C<guestfs_stat>."
11897 #: ../src/guestfs-actions.pod:3080 ../src/guestfs-actions.pod:3109
11898 #: ../src/guestfs-actions.pod:3154 ../src/guestfs-actions.pod:3226
11899 #: ../src/guestfs-actions.pod:3241
11900 msgid "(Added in 1.5.10)"
11905 #: ../src/guestfs-actions.pod:3082
11906 msgid "guestfs_is_busy"
11911 #: ../src/guestfs-actions.pod:3084
11915 " guestfs_is_busy (guestfs_h *g);\n"
11921 #: ../src/guestfs-actions.pod:3087 ../fish/guestfish-actions.pod:2156
11923 "This returns true iff this handle is busy processing a command (in the "
11929 #: ../src/guestfs-actions.pod:3096
11930 msgid "guestfs_is_chardev"
11935 #: ../src/guestfs-actions.pod:3098
11939 " guestfs_is_chardev (guestfs_h *g,\n"
11940 " const char *path);\n"
11946 #: ../src/guestfs-actions.pod:3102 ../fish/guestfish-actions.pod:2165
11948 "This returns C<true> if and only if there is a character device with the "
11949 "given C<path> name."
11954 #: ../src/guestfs-actions.pod:3111
11955 msgid "guestfs_is_config"
11960 #: ../src/guestfs-actions.pod:3113
11964 " guestfs_is_config (guestfs_h *g);\n"
11970 #: ../src/guestfs-actions.pod:3116 ../fish/guestfish-actions.pod:2174
11972 "This returns true iff this handle is being configured (in the C<CONFIG> "
11978 #: ../src/guestfs-actions.pod:3125
11979 msgid "guestfs_is_dir"
11984 #: ../src/guestfs-actions.pod:3127
11988 " guestfs_is_dir (guestfs_h *g,\n"
11989 " const char *path);\n"
11995 #: ../src/guestfs-actions.pod:3131 ../fish/guestfish-actions.pod:2183
11997 "This returns C<true> if and only if there is a directory with the given "
11998 "C<path> name. Note that it returns false for other objects like files."
12003 #: ../src/guestfs-actions.pod:3141
12004 msgid "guestfs_is_fifo"
12009 #: ../src/guestfs-actions.pod:3143
12013 " guestfs_is_fifo (guestfs_h *g,\n"
12014 " const char *path);\n"
12020 #: ../src/guestfs-actions.pod:3147 ../fish/guestfish-actions.pod:2193
12022 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
12023 "given C<path> name."
12028 #: ../src/guestfs-actions.pod:3156
12029 msgid "guestfs_is_file"
12034 #: ../src/guestfs-actions.pod:3158
12038 " guestfs_is_file (guestfs_h *g,\n"
12039 " const char *path);\n"
12045 #: ../src/guestfs-actions.pod:3162 ../fish/guestfish-actions.pod:2202
12047 "This returns C<true> if and only if there is a regular file with the given "
12048 "C<path> name. Note that it returns false for other objects like directories."
12053 #: ../src/guestfs-actions.pod:3172
12054 msgid "guestfs_is_launching"
12059 #: ../src/guestfs-actions.pod:3174
12063 " guestfs_is_launching (guestfs_h *g);\n"
12069 #: ../src/guestfs-actions.pod:3177 ../fish/guestfish-actions.pod:2212
12071 "This returns true iff this handle is launching the subprocess (in the "
12072 "C<LAUNCHING> state)."
12077 #: ../src/guestfs-actions.pod:3186
12078 msgid "guestfs_is_lv"
12083 #: ../src/guestfs-actions.pod:3188
12087 " guestfs_is_lv (guestfs_h *g,\n"
12088 " const char *device);\n"
12094 #: ../src/guestfs-actions.pod:3192 ../fish/guestfish-actions.pod:2221
12096 "This command tests whether C<device> is a logical volume, and returns true "
12097 "iff this is the case."
12102 #: ../src/guestfs-actions.pod:3199
12103 msgid "guestfs_is_ready"
12108 #: ../src/guestfs-actions.pod:3201
12112 " guestfs_is_ready (guestfs_h *g);\n"
12118 #: ../src/guestfs-actions.pod:3204 ../fish/guestfish-actions.pod:2228
12120 "This returns true iff this handle is ready to accept commands (in the "
12126 #: ../src/guestfs-actions.pod:3213
12127 msgid "guestfs_is_socket"
12132 #: ../src/guestfs-actions.pod:3215
12136 " guestfs_is_socket (guestfs_h *g,\n"
12137 " const char *path);\n"
12143 #: ../src/guestfs-actions.pod:3219 ../fish/guestfish-actions.pod:2237
12145 "This returns C<true> if and only if there is a Unix domain socket with the "
12146 "given C<path> name."
12151 #: ../src/guestfs-actions.pod:3228
12152 msgid "guestfs_is_symlink"
12157 #: ../src/guestfs-actions.pod:3230
12161 " guestfs_is_symlink (guestfs_h *g,\n"
12162 " const char *path);\n"
12168 #: ../src/guestfs-actions.pod:3234 ../fish/guestfish-actions.pod:2246
12170 "This returns C<true> if and only if there is a symbolic link with the given "
12176 #: ../src/guestfs-actions.pod:3243
12177 msgid "guestfs_kill_subprocess"
12182 #: ../src/guestfs-actions.pod:3245
12186 " guestfs_kill_subprocess (guestfs_h *g);\n"
12192 #: ../src/guestfs-actions.pod:3248 ../fish/guestfish-actions.pod:2255
12193 msgid "This kills the qemu subprocess. You should never need to call this."
12198 #: ../src/guestfs-actions.pod:3254
12199 msgid "guestfs_launch"
12204 #: ../src/guestfs-actions.pod:3256
12208 " guestfs_launch (guestfs_h *g);\n"
12214 #: ../src/guestfs-actions.pod:3259 ../fish/guestfish-actions.pod:2263
12216 "Internally libguestfs is implemented by running a virtual machine using "
12222 #: ../src/guestfs-actions.pod:3262 ../fish/guestfish-actions.pod:2266
12224 "You should call this after configuring the handle (eg. adding drives) but "
12225 "before performing any actions."
12230 #: ../src/guestfs-actions.pod:3269
12231 msgid "guestfs_lchown"
12236 #: ../src/guestfs-actions.pod:3271
12240 " guestfs_lchown (guestfs_h *g,\n"
12243 " const char *path);\n"
12249 #: ../src/guestfs-actions.pod:3277
12251 "Change the file owner to C<owner> and group to C<group>. This is like "
12252 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
12253 "changed, not the target."
12258 #: ../src/guestfs-actions.pod:3289
12259 msgid "guestfs_lgetxattr"
12264 #: ../src/guestfs-actions.pod:3291
12268 " guestfs_lgetxattr (guestfs_h *g,\n"
12269 " const char *path,\n"
12270 " const char *name,\n"
12271 " size_t *size_r);\n"
12277 #: ../src/guestfs-actions.pod:3297 ../fish/guestfish-actions.pod:2285
12279 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
12280 "is a symlink, then this call returns an extended attribute from the symlink."
12285 #: ../src/guestfs-actions.pod:3311
12286 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
12291 #: ../src/guestfs-actions.pod:3319
12292 msgid "guestfs_lgetxattrs"
12297 #: ../src/guestfs-actions.pod:3321
12300 " struct guestfs_xattr_list *\n"
12301 " guestfs_lgetxattrs (guestfs_h *g,\n"
12302 " const char *path);\n"
12308 #: ../src/guestfs-actions.pod:3325
12310 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
12311 "then it returns the extended attributes of the link itself."
12316 #: ../src/guestfs-actions.pod:3335
12317 msgid "guestfs_list_devices"
12322 #: ../src/guestfs-actions.pod:3337
12326 " guestfs_list_devices (guestfs_h *g);\n"
12332 #: ../src/guestfs-actions.pod:3340 ../fish/guestfish-actions.pod:2313
12333 msgid "List all the block devices."
12338 #: ../src/guestfs-actions.pod:3342 ../fish/guestfish-actions.pod:2315
12339 msgid "The full block device names are returned, eg. C</dev/sda>."
12344 #: ../src/guestfs-actions.pod:3352
12345 msgid "guestfs_list_filesystems"
12350 #: ../src/guestfs-actions.pod:3354
12354 " guestfs_list_filesystems (guestfs_h *g);\n"
12360 #: ../src/guestfs-actions.pod:3357 ../fish/guestfish-actions.pod:2323
12362 "This inspection command looks for filesystems on partitions, block devices "
12363 "and logical volumes, returning a list of devices containing filesystems and "
12369 #: ../src/guestfs-actions.pod:3361 ../fish/guestfish-actions.pod:2327
12371 "The return value is a hash, where the keys are the devices containing "
12372 "filesystems, and the values are the filesystem types. For example:"
12377 #: ../src/guestfs-actions.pod:3365 ../fish/guestfish-actions.pod:2331
12380 " \"/dev/sda1\" => \"ntfs\"\n"
12381 " \"/dev/sda2\" => \"ext2\"\n"
12382 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
12383 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
12389 #: ../src/guestfs-actions.pod:3370 ../fish/guestfish-actions.pod:2336
12391 "The value can have the special value \"unknown\", meaning the content of the "
12392 "device is undetermined or empty. \"swap\" means a Linux swap partition."
12397 #: ../src/guestfs-actions.pod:3374
12399 "This command runs other libguestfs commands, which might include "
12400 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
12401 "soon after launch and only when nothing is mounted."
12406 #: ../src/guestfs-actions.pod:3378
12408 "Not all of the filesystems returned will be mountable. In particular, swap "
12409 "partitions are returned in the list. Also this command does not check that "
12410 "each filesystem found is valid and mountable, and some filesystems might be "
12411 "mountable but require special options. Filesystems may not all belong to a "
12412 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
12417 #: ../src/guestfs-actions.pod:3392 ../src/guestfs-actions.pod:4994
12418 msgid "(Added in 1.5.15)"
12423 #: ../src/guestfs-actions.pod:3394
12424 msgid "guestfs_list_partitions"
12429 #: ../src/guestfs-actions.pod:3396
12433 " guestfs_list_partitions (guestfs_h *g);\n"
12439 #: ../src/guestfs-actions.pod:3399 ../fish/guestfish-actions.pod:2356
12440 msgid "List all the partitions detected on all block devices."
12445 #: ../src/guestfs-actions.pod:3401 ../fish/guestfish-actions.pod:2358
12446 msgid "The full partition device names are returned, eg. C</dev/sda1>"
12451 #: ../src/guestfs-actions.pod:3403
12453 "This does not return logical volumes. For that you will need to call "
12459 #: ../src/guestfs-actions.pod:3414
12465 #: ../src/guestfs-actions.pod:3416
12469 " guestfs_ll (guestfs_h *g,\n"
12470 " const char *directory);\n"
12476 #: ../src/guestfs-actions.pod:3420 ../fish/guestfish-actions.pod:2369
12478 "List the files in C<directory> (relative to the root directory, there is no "
12479 "cwd) in the format of 'ls -la'."
12484 #: ../src/guestfs-actions.pod:3423 ../fish/guestfish-actions.pod:2372
12486 "This command is mostly useful for interactive sessions. It is I<not> "
12487 "intended that you try to parse the output string."
12492 #: ../src/guestfs-actions.pod:3431
12498 #: ../src/guestfs-actions.pod:3433
12502 " guestfs_ln (guestfs_h *g,\n"
12503 " const char *target,\n"
12504 " const char *linkname);\n"
12510 #: ../src/guestfs-actions.pod:3438 ../fish/guestfish-actions.pod:2379
12511 msgid "This command creates a hard link using the C<ln> command."
12516 #: ../src/guestfs-actions.pod:3444
12517 msgid "guestfs_ln_f"
12522 #: ../src/guestfs-actions.pod:3446
12526 " guestfs_ln_f (guestfs_h *g,\n"
12527 " const char *target,\n"
12528 " const char *linkname);\n"
12534 #: ../src/guestfs-actions.pod:3451 ../fish/guestfish-actions.pod:2385
12536 "This command creates a hard link using the C<ln -f> command. The C<-f> "
12537 "option removes the link (C<linkname>) if it exists already."
12542 #: ../src/guestfs-actions.pod:3458
12543 msgid "guestfs_ln_s"
12548 #: ../src/guestfs-actions.pod:3460
12552 " guestfs_ln_s (guestfs_h *g,\n"
12553 " const char *target,\n"
12554 " const char *linkname);\n"
12560 #: ../src/guestfs-actions.pod:3465 ../fish/guestfish-actions.pod:2392
12561 msgid "This command creates a symbolic link using the C<ln -s> command."
12566 #: ../src/guestfs-actions.pod:3471
12567 msgid "guestfs_ln_sf"
12572 #: ../src/guestfs-actions.pod:3473
12576 " guestfs_ln_sf (guestfs_h *g,\n"
12577 " const char *target,\n"
12578 " const char *linkname);\n"
12584 #: ../src/guestfs-actions.pod:3478 ../fish/guestfish-actions.pod:2398
12586 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
12587 "option removes the link (C<linkname>) if it exists already."
12592 #: ../src/guestfs-actions.pod:3485
12593 msgid "guestfs_lremovexattr"
12598 #: ../src/guestfs-actions.pod:3487
12602 " guestfs_lremovexattr (guestfs_h *g,\n"
12603 " const char *xattr,\n"
12604 " const char *path);\n"
12610 #: ../src/guestfs-actions.pod:3492
12612 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
12613 "link, then it removes an extended attribute of the link itself."
12618 #: ../src/guestfs-actions.pod:3500
12624 #: ../src/guestfs-actions.pod:3502
12628 " guestfs_ls (guestfs_h *g,\n"
12629 " const char *directory);\n"
12635 #: ../src/guestfs-actions.pod:3506 ../fish/guestfish-actions.pod:2413
12637 "List the files in C<directory> (relative to the root directory, there is no "
12638 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
12643 #: ../src/guestfs-actions.pod:3510
12645 "This command is mostly useful for interactive sessions. Programs should "
12646 "probably use C<guestfs_readdir> instead."
12651 #: ../src/guestfs-actions.pod:3519
12652 msgid "guestfs_lsetxattr"
12657 #: ../src/guestfs-actions.pod:3521
12661 " guestfs_lsetxattr (guestfs_h *g,\n"
12662 " const char *xattr,\n"
12663 " const char *val,\n"
12665 " const char *path);\n"
12671 #: ../src/guestfs-actions.pod:3528
12673 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
12674 "then it sets an extended attribute of the link itself."
12679 #: ../src/guestfs-actions.pod:3536
12680 msgid "guestfs_lstat"
12685 #: ../src/guestfs-actions.pod:3538
12688 " struct guestfs_stat *\n"
12689 " guestfs_lstat (guestfs_h *g,\n"
12690 " const char *path);\n"
12696 #: ../src/guestfs-actions.pod:3542 ../src/guestfs-actions.pod:6048
12697 #: ../fish/guestfish-actions.pod:2432 ../fish/guestfish-actions.pod:4056
12698 msgid "Returns file information for the given C<path>."
12703 #: ../src/guestfs-actions.pod:3544
12705 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
12706 "link, then the link is stat-ed, not the file it refers to."
12711 #: ../src/guestfs-actions.pod:3548 ../fish/guestfish-actions.pod:2438
12712 msgid "This is the same as the C<lstat(2)> system call."
12717 #: ../src/guestfs-actions.pod:3550 ../src/guestfs-actions.pod:6052
12719 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
12720 "error. I<The caller must call C<guestfs_free_stat> after use>."
12725 #: ../src/guestfs-actions.pod:3554 ../src/guestfs-actions.pod:6056
12726 #: ../src/guestfs-actions.pod:6074 ../src/guestfs-actions.pod:6455
12727 msgid "(Added in 0.9.2)"
12732 #: ../src/guestfs-actions.pod:3556
12733 msgid "guestfs_lstatlist"
12738 #: ../src/guestfs-actions.pod:3558
12741 " struct guestfs_stat_list *\n"
12742 " guestfs_lstatlist (guestfs_h *g,\n"
12743 " const char *path,\n"
12744 " char *const *names);\n"
12750 #: ../src/guestfs-actions.pod:3563
12752 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
12753 "files, where all files are in the directory C<path>. C<names> is the list "
12754 "of files from this directory."
12759 #: ../src/guestfs-actions.pod:3567 ../fish/guestfish-actions.pod:2448
12761 "On return you get a list of stat structs, with a one-to-one correspondence "
12762 "to the C<names> list. If any name did not exist or could not be lstat'd, "
12763 "then the C<ino> field of that structure is set to C<-1>."
12768 #: ../src/guestfs-actions.pod:3572
12770 "This call is intended for programs that want to efficiently list a directory "
12771 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
12772 "for a similarly efficient call for getting extended attributes. Very long "
12773 "directory listings might cause the protocol message size to be exceeded, "
12774 "causing this call to fail. The caller must split up such requests into "
12775 "smaller groups of names."
12780 #: ../src/guestfs-actions.pod:3580
12782 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
12783 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
12788 #: ../src/guestfs-actions.pod:3586
12789 msgid "guestfs_luks_add_key"
12794 #: ../src/guestfs-actions.pod:3588
12798 " guestfs_luks_add_key (guestfs_h *g,\n"
12799 " const char *device,\n"
12800 " const char *key,\n"
12801 " const char *newkey,\n"
12808 #: ../src/guestfs-actions.pod:3595 ../fish/guestfish-actions.pod:2465
12810 "This command adds a new key on LUKS device C<device>. C<key> is any "
12811 "existing key, and is used to access the device. C<newkey> is the new key to "
12812 "add. C<keyslot> is the key slot that will be replaced."
12817 #: ../src/guestfs-actions.pod:3600
12819 "Note that if C<keyslot> already contains a key, then this command will "
12820 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
12825 #: ../src/guestfs-actions.pod:3606 ../src/guestfs-actions.pod:3646
12826 #: ../src/guestfs-actions.pod:3669 ../src/guestfs-actions.pod:3689
12827 #: ../src/guestfs-actions.pod:3721 ../src/guestfs-actions.pod:3740
12829 "This function takes a key or passphrase parameter which could contain "
12830 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
12836 #: ../src/guestfs-actions.pod:3610 ../src/guestfs-actions.pod:3650
12837 #: ../src/guestfs-actions.pod:3673 ../src/guestfs-actions.pod:3693
12838 msgid "(Added in 1.5.2)"
12843 #: ../src/guestfs-actions.pod:3612
12844 msgid "guestfs_luks_close"
12849 #: ../src/guestfs-actions.pod:3614
12853 " guestfs_luks_close (guestfs_h *g,\n"
12854 " const char *device);\n"
12860 #: ../src/guestfs-actions.pod:3618
12862 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
12863 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
12864 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
12865 "underlying block device."
12870 #: ../src/guestfs-actions.pod:3626 ../src/guestfs-actions.pod:3725
12871 #: ../src/guestfs-actions.pod:3744 ../src/guestfs-actions.pod:3794
12872 #: ../src/guestfs-actions.pod:3842
12873 msgid "(Added in 1.5.1)"
12878 #: ../src/guestfs-actions.pod:3628
12879 msgid "guestfs_luks_format"
12884 #: ../src/guestfs-actions.pod:3630
12888 " guestfs_luks_format (guestfs_h *g,\n"
12889 " const char *device,\n"
12890 " const char *key,\n"
12897 #: ../src/guestfs-actions.pod:3636 ../fish/guestfish-actions.pod:2491
12899 "This command erases existing data on C<device> and formats the device as a "
12900 "LUKS encrypted device. C<key> is the initial key, which is added to key "
12901 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
12906 #: ../src/guestfs-actions.pod:3643 ../src/guestfs-actions.pod:3666
12907 #: ../src/guestfs-actions.pod:3806 ../src/guestfs-actions.pod:4745
12908 #: ../src/guestfs-actions.pod:5508 ../src/guestfs-actions.pod:5883
12909 #: ../src/guestfs-actions.pod:5906 ../src/guestfs-actions.pod:5932
12910 #: ../src/guestfs-actions.pod:7092 ../fish/guestfish-actions.pod:2499
12911 #: ../fish/guestfish-actions.pod:2512 ../fish/guestfish-actions.pod:2596
12912 #: ../fish/guestfish-actions.pod:3168 ../fish/guestfish-actions.pod:3675
12913 #: ../fish/guestfish-actions.pod:3955 ../fish/guestfish-actions.pod:3971
12914 #: ../fish/guestfish-actions.pod:3986 ../fish/guestfish-actions.pod:4701
12916 "B<This command is dangerous. Without careful use you can easily destroy all "
12922 #: ../src/guestfs-actions.pod:3652
12923 msgid "guestfs_luks_format_cipher"
12928 #: ../src/guestfs-actions.pod:3654
12932 " guestfs_luks_format_cipher (guestfs_h *g,\n"
12933 " const char *device,\n"
12934 " const char *key,\n"
12936 " const char *cipher);\n"
12942 #: ../src/guestfs-actions.pod:3661
12944 "This command is the same as C<guestfs_luks_format> but it also allows you to "
12945 "set the C<cipher> used."
12950 #: ../src/guestfs-actions.pod:3675
12951 msgid "guestfs_luks_kill_slot"
12956 #: ../src/guestfs-actions.pod:3677
12960 " guestfs_luks_kill_slot (guestfs_h *g,\n"
12961 " const char *device,\n"
12962 " const char *key,\n"
12969 #: ../src/guestfs-actions.pod:3683 ../fish/guestfish-actions.pod:2519
12971 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
12972 "device C<device>. C<key> must be one of the I<other> keys."
12977 #: ../src/guestfs-actions.pod:3695
12978 msgid "guestfs_luks_open"
12983 #: ../src/guestfs-actions.pod:3697
12987 " guestfs_luks_open (guestfs_h *g,\n"
12988 " const char *device,\n"
12989 " const char *key,\n"
12990 " const char *mapname);\n"
12996 #: ../src/guestfs-actions.pod:3703 ../fish/guestfish-actions.pod:2530
12998 "This command opens a block device which has been encrypted according to the "
12999 "Linux Unified Key Setup (LUKS) standard."
13004 #: ../src/guestfs-actions.pod:3706 ../fish/guestfish-actions.pod:2533
13005 msgid "C<device> is the encrypted block device or partition."
13010 #: ../src/guestfs-actions.pod:3708 ../fish/guestfish-actions.pod:2535
13012 "The caller must supply one of the keys associated with the LUKS block "
13013 "device, in the C<key> parameter."
13018 #: ../src/guestfs-actions.pod:3711 ../fish/guestfish-actions.pod:2538
13020 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
13021 "writes to this block device are decrypted from and encrypted to the "
13022 "underlying C<device> respectively."
13027 #: ../src/guestfs-actions.pod:3715
13029 "If this block device contains LVM volume groups, then calling "
13030 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
13036 #: ../src/guestfs-actions.pod:3727
13037 msgid "guestfs_luks_open_ro"
13042 #: ../src/guestfs-actions.pod:3729
13046 " guestfs_luks_open_ro (guestfs_h *g,\n"
13047 " const char *device,\n"
13048 " const char *key,\n"
13049 " const char *mapname);\n"
13055 #: ../src/guestfs-actions.pod:3735
13057 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
13063 #: ../src/guestfs-actions.pod:3746
13064 msgid "guestfs_lvcreate"
13069 #: ../src/guestfs-actions.pod:3748
13073 " guestfs_lvcreate (guestfs_h *g,\n"
13074 " const char *logvol,\n"
13075 " const char *volgroup,\n"
13082 #: ../src/guestfs-actions.pod:3754 ../fish/guestfish-actions.pod:2563
13084 "This creates an LVM logical volume called C<logvol> on the volume group "
13085 "C<volgroup>, with C<size> megabytes."
13090 #: ../src/guestfs-actions.pod:3761
13091 msgid "guestfs_lvm_canonical_lv_name"
13096 #: ../src/guestfs-actions.pod:3763
13100 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
13101 " const char *lvname);\n"
13107 #: ../src/guestfs-actions.pod:3767 ../fish/guestfish-actions.pod:2570
13109 "This converts alternative naming schemes for LVs that you might find to the "
13110 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
13116 #: ../src/guestfs-actions.pod:3771 ../fish/guestfish-actions.pod:2574
13118 "This command returns an error if the C<lvname> parameter does not refer to a "
13124 #: ../src/guestfs-actions.pod:3774
13125 msgid "See also C<guestfs_is_lv>."
13130 #: ../src/guestfs-actions.pod:3779
13131 msgid "(Added in 1.5.24)"
13136 #: ../src/guestfs-actions.pod:3781
13137 msgid "guestfs_lvm_clear_filter"
13142 #: ../src/guestfs-actions.pod:3783
13146 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
13152 #: ../src/guestfs-actions.pod:3786
13154 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
13155 "see every block device."
13160 #: ../src/guestfs-actions.pod:3789 ../src/guestfs-actions.pod:3831
13161 #: ../fish/guestfish-actions.pod:2586 ../fish/guestfish-actions.pod:2617
13163 "This command also clears the LVM cache and performs a volume group scan."
13168 #: ../src/guestfs-actions.pod:3796
13169 msgid "guestfs_lvm_remove_all"
13174 #: ../src/guestfs-actions.pod:3798
13178 " guestfs_lvm_remove_all (guestfs_h *g);\n"
13184 #: ../src/guestfs-actions.pod:3801 ../fish/guestfish-actions.pod:2593
13186 "This command removes all LVM logical volumes, volume groups and physical "
13192 #: ../src/guestfs-actions.pod:3811
13193 msgid "guestfs_lvm_set_filter"
13198 #: ../src/guestfs-actions.pod:3813
13202 " guestfs_lvm_set_filter (guestfs_h *g,\n"
13203 " char *const *devices);\n"
13209 #: ../src/guestfs-actions.pod:3817 ../fish/guestfish-actions.pod:2603
13211 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
13212 "block devices in the list C<devices>, and will ignore all other attached "
13218 #: ../src/guestfs-actions.pod:3821 ../fish/guestfish-actions.pod:2607
13220 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
13221 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
13222 "there are two types of duplication possible: either cloned PVs/VGs which "
13223 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
13224 "same name. In normal operation you cannot create this situation, but you "
13225 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
13226 "inside the LVM metadata."
13231 #: ../src/guestfs-actions.pod:3834 ../fish/guestfish-actions.pod:2620
13232 msgid "You can filter whole block devices or individual partitions."
13237 #: ../src/guestfs-actions.pod:3836 ../fish/guestfish-actions.pod:2622
13239 "You cannot use this if any VG is currently in use (eg. contains a mounted "
13240 "filesystem), even if you are not filtering out that VG."
13245 #: ../src/guestfs-actions.pod:3844
13246 msgid "guestfs_lvremove"
13251 #: ../src/guestfs-actions.pod:3846
13255 " guestfs_lvremove (guestfs_h *g,\n"
13256 " const char *device);\n"
13262 #: ../src/guestfs-actions.pod:3850 ../fish/guestfish-actions.pod:2630
13264 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
13265 "LV, such as C</dev/VG/LV>."
13270 #: ../src/guestfs-actions.pod:3853 ../fish/guestfish-actions.pod:2633
13272 "You can also remove all LVs in a volume group by specifying the VG name, C</"
13278 #: ../src/guestfs-actions.pod:3858 ../src/guestfs-actions.pod:5091
13279 #: ../src/guestfs-actions.pod:6831
13280 msgid "(Added in 1.0.13)"
13285 #: ../src/guestfs-actions.pod:3860
13286 msgid "guestfs_lvrename"
13291 #: ../src/guestfs-actions.pod:3862
13295 " guestfs_lvrename (guestfs_h *g,\n"
13296 " const char *logvol,\n"
13297 " const char *newlogvol);\n"
13303 #: ../src/guestfs-actions.pod:3867 ../fish/guestfish-actions.pod:2640
13304 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
13309 #: ../src/guestfs-actions.pod:3871 ../src/guestfs-actions.pod:6844
13310 msgid "(Added in 1.0.83)"
13315 #: ../src/guestfs-actions.pod:3873
13316 msgid "guestfs_lvresize"
13321 #: ../src/guestfs-actions.pod:3875
13325 " guestfs_lvresize (guestfs_h *g,\n"
13326 " const char *device,\n"
13333 #: ../src/guestfs-actions.pod:3880 ../fish/guestfish-actions.pod:2646
13335 "This resizes (expands or shrinks) an existing LVM logical volume to "
13336 "C<mbytes>. When reducing, data in the reduced part is lost."
13341 #: ../src/guestfs-actions.pod:3888
13342 msgid "guestfs_lvresize_free"
13347 #: ../src/guestfs-actions.pod:3890
13351 " guestfs_lvresize_free (guestfs_h *g,\n"
13352 " const char *lv,\n"
13359 #: ../src/guestfs-actions.pod:3895 ../fish/guestfish-actions.pod:2654
13361 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
13362 "remaining free space in the volume group. Commonly you would call this with "
13363 "pc = 100 which expands the logical volume as much as possible, using all "
13364 "remaining free space in the volume group."
13369 #: ../src/guestfs-actions.pod:3903
13370 msgid "(Added in 1.3.3)"
13375 #: ../src/guestfs-actions.pod:3905
13376 msgid "guestfs_lvs"
13381 #: ../src/guestfs-actions.pod:3907
13385 " guestfs_lvs (guestfs_h *g);\n"
13391 #: ../src/guestfs-actions.pod:3910 ../fish/guestfish-actions.pod:2664
13393 "List all the logical volumes detected. This is the equivalent of the L<lvs"
13399 #: ../src/guestfs-actions.pod:3913 ../fish/guestfish-actions.pod:2667
13401 "This returns a list of the logical volume device names (eg. C</dev/"
13402 "VolGroup00/LogVol00>)."
13407 #: ../src/guestfs-actions.pod:3916
13408 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
13413 #: ../src/guestfs-actions.pod:3924
13414 msgid "guestfs_lvs_full"
13419 #: ../src/guestfs-actions.pod:3926
13422 " struct guestfs_lvm_lv_list *\n"
13423 " guestfs_lvs_full (guestfs_h *g);\n"
13429 #: ../src/guestfs-actions.pod:3929 ../fish/guestfish-actions.pod:2676
13431 "List all the logical volumes detected. This is the equivalent of the L<lvs"
13432 "(8)> command. The \"full\" version includes all fields."
13437 #: ../src/guestfs-actions.pod:3932
13439 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
13440 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after use>."
13445 #: ../src/guestfs-actions.pod:3938
13446 msgid "guestfs_lvuuid"
13451 #: ../src/guestfs-actions.pod:3940
13455 " guestfs_lvuuid (guestfs_h *g,\n"
13456 " const char *device);\n"
13462 #: ../src/guestfs-actions.pod:3944 ../fish/guestfish-actions.pod:2683
13463 msgid "This command returns the UUID of the LVM LV C<device>."
13468 #: ../src/guestfs-actions.pod:3951
13469 msgid "guestfs_lxattrlist"
13474 #: ../src/guestfs-actions.pod:3953
13477 " struct guestfs_xattr_list *\n"
13478 " guestfs_lxattrlist (guestfs_h *g,\n"
13479 " const char *path,\n"
13480 " char *const *names);\n"
13486 #: ../src/guestfs-actions.pod:3958 ../fish/guestfish-actions.pod:2689
13488 "This call allows you to get the extended attributes of multiple files, where "
13489 "all files are in the directory C<path>. C<names> is the list of files from "
13495 #: ../src/guestfs-actions.pod:3962 ../fish/guestfish-actions.pod:2693
13497 "On return you get a flat list of xattr structs which must be interpreted "
13498 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
13499 "C<attrval> in this struct is zero-length to indicate there was an error "
13500 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
13501 "number (the number of following attributes for this file, which could be C<"
13502 "\"0\">). Then after the first xattr struct are the zero or more attributes "
13503 "for the first named file. This repeats for the second and subsequent files."
13508 #: ../src/guestfs-actions.pod:3972
13510 "This call is intended for programs that want to efficiently list a directory "
13511 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
13512 "a similarly efficient call for getting standard stats. Very long directory "
13513 "listings might cause the protocol message size to be exceeded, causing this "
13514 "call to fail. The caller must split up such requests into smaller groups of "
13520 #: ../src/guestfs-actions.pod:3986
13521 msgid "guestfs_mkdir"
13526 #: ../src/guestfs-actions.pod:3988
13530 " guestfs_mkdir (guestfs_h *g,\n"
13531 " const char *path);\n"
13537 #: ../src/guestfs-actions.pod:3992 ../fish/guestfish-actions.pod:2715
13538 msgid "Create a directory named C<path>."
13543 #: ../src/guestfs-actions.pod:3998
13544 msgid "guestfs_mkdir_mode"
13549 #: ../src/guestfs-actions.pod:4000
13553 " guestfs_mkdir_mode (guestfs_h *g,\n"
13554 " const char *path,\n"
13561 #: ../src/guestfs-actions.pod:4005 ../fish/guestfish-actions.pod:2721
13563 "This command creates a directory, setting the initial permissions of the "
13564 "directory to C<mode>."
13569 #: ../src/guestfs-actions.pod:4008 ../fish/guestfish-actions.pod:2724
13571 "For common Linux filesystems, the actual mode which is set will be C<mode & "
13572 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
13578 #: ../src/guestfs-actions.pod:4012
13579 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
13584 #: ../src/guestfs-actions.pod:4018
13585 msgid "guestfs_mkdir_p"
13590 #: ../src/guestfs-actions.pod:4020
13594 " guestfs_mkdir_p (guestfs_h *g,\n"
13595 " const char *path);\n"
13601 #: ../src/guestfs-actions.pod:4024 ../fish/guestfish-actions.pod:2734
13603 "Create a directory named C<path>, creating any parent directories as "
13604 "necessary. This is like the C<mkdir -p> shell command."
13609 #: ../src/guestfs-actions.pod:4031
13610 msgid "guestfs_mkdtemp"
13615 #: ../src/guestfs-actions.pod:4033
13619 " guestfs_mkdtemp (guestfs_h *g,\n"
13620 " const char *template);\n"
13626 #: ../src/guestfs-actions.pod:4037 ../fish/guestfish-actions.pod:2741
13628 "This command creates a temporary directory. The C<template> parameter "
13629 "should be a full pathname for the temporary directory name with the final "
13630 "six characters being \"XXXXXX\"."
13635 #: ../src/guestfs-actions.pod:4042 ../fish/guestfish-actions.pod:2746
13637 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
13638 "being suitable for Windows filesystems."
13643 #: ../src/guestfs-actions.pod:4045 ../fish/guestfish-actions.pod:2749
13644 msgid "The name of the temporary directory that was created is returned."
13649 #: ../src/guestfs-actions.pod:4048 ../fish/guestfish-actions.pod:2752
13650 msgid "The temporary directory is created with mode 0700 and is owned by root."
13655 #: ../src/guestfs-actions.pod:4051 ../fish/guestfish-actions.pod:2755
13657 "The caller is responsible for deleting the temporary directory and its "
13658 "contents after use."
13663 #: ../src/guestfs-actions.pod:4054 ../fish/guestfish-actions.pod:2758
13664 msgid "See also: L<mkdtemp(3)>"
13669 #: ../src/guestfs-actions.pod:4061
13670 msgid "guestfs_mke2fs_J"
13675 #: ../src/guestfs-actions.pod:4063
13679 " guestfs_mke2fs_J (guestfs_h *g,\n"
13680 " const char *fstype,\n"
13681 " int blocksize,\n"
13682 " const char *device,\n"
13683 " const char *journal);\n"
13689 #: ../src/guestfs-actions.pod:4070 ../fish/guestfish-actions.pod:2764
13691 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13692 "C<journal>. It is equivalent to the command:"
13697 #: ../src/guestfs-actions.pod:4074 ../fish/guestfish-actions.pod:2768
13700 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
13706 #: ../src/guestfs-actions.pod:4076
13707 msgid "See also C<guestfs_mke2journal>."
13712 #: ../src/guestfs-actions.pod:4080 ../src/guestfs-actions.pod:4098
13713 #: ../src/guestfs-actions.pod:4116 ../src/guestfs-actions.pod:4132
13714 #: ../src/guestfs-actions.pod:4146 ../src/guestfs-actions.pod:4160
13715 #: ../src/guestfs-actions.pod:4219 ../src/guestfs-actions.pod:4472
13716 msgid "(Added in 1.0.68)"
13721 #: ../src/guestfs-actions.pod:4082
13722 msgid "guestfs_mke2fs_JL"
13727 #: ../src/guestfs-actions.pod:4084
13731 " guestfs_mke2fs_JL (guestfs_h *g,\n"
13732 " const char *fstype,\n"
13733 " int blocksize,\n"
13734 " const char *device,\n"
13735 " const char *label);\n"
13741 #: ../src/guestfs-actions.pod:4091 ../fish/guestfish-actions.pod:2776
13743 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13744 "the journal labeled C<label>."
13749 #: ../src/guestfs-actions.pod:4094
13750 msgid "See also C<guestfs_mke2journal_L>."
13755 #: ../src/guestfs-actions.pod:4100
13756 msgid "guestfs_mke2fs_JU"
13761 #: ../src/guestfs-actions.pod:4102
13765 " guestfs_mke2fs_JU (guestfs_h *g,\n"
13766 " const char *fstype,\n"
13767 " int blocksize,\n"
13768 " const char *device,\n"
13769 " const char *uuid);\n"
13775 #: ../src/guestfs-actions.pod:4109 ../fish/guestfish-actions.pod:2785
13777 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13778 "the journal with UUID C<uuid>."
13783 #: ../src/guestfs-actions.pod:4112
13784 msgid "See also C<guestfs_mke2journal_U>."
13789 #: ../src/guestfs-actions.pod:4118
13790 msgid "guestfs_mke2journal"
13795 #: ../src/guestfs-actions.pod:4120
13799 " guestfs_mke2journal (guestfs_h *g,\n"
13800 " int blocksize,\n"
13801 " const char *device);\n"
13807 #: ../src/guestfs-actions.pod:4125 ../fish/guestfish-actions.pod:2794
13809 "This creates an ext2 external journal on C<device>. It is equivalent to the "
13815 #: ../src/guestfs-actions.pod:4128 ../fish/guestfish-actions.pod:2797
13818 " mke2fs -O journal_dev -b blocksize device\n"
13824 #: ../src/guestfs-actions.pod:4134
13825 msgid "guestfs_mke2journal_L"
13830 #: ../src/guestfs-actions.pod:4136
13834 " guestfs_mke2journal_L (guestfs_h *g,\n"
13835 " int blocksize,\n"
13836 " const char *label,\n"
13837 " const char *device);\n"
13843 #: ../src/guestfs-actions.pod:4142 ../fish/guestfish-actions.pod:2803
13844 msgid "This creates an ext2 external journal on C<device> with label C<label>."
13849 #: ../src/guestfs-actions.pod:4148
13850 msgid "guestfs_mke2journal_U"
13855 #: ../src/guestfs-actions.pod:4150
13859 " guestfs_mke2journal_U (guestfs_h *g,\n"
13860 " int blocksize,\n"
13861 " const char *uuid,\n"
13862 " const char *device);\n"
13868 #: ../src/guestfs-actions.pod:4156 ../fish/guestfish-actions.pod:2809
13869 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
13874 #: ../src/guestfs-actions.pod:4162
13875 msgid "guestfs_mkfifo"
13880 #: ../src/guestfs-actions.pod:4164
13884 " guestfs_mkfifo (guestfs_h *g,\n"
13886 " const char *path);\n"
13892 #: ../src/guestfs-actions.pod:4169
13894 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
13895 "is just a convenient wrapper around C<guestfs_mknod>."
13900 #: ../src/guestfs-actions.pod:4179
13901 msgid "guestfs_mkfs"
13906 #: ../src/guestfs-actions.pod:4181
13910 " guestfs_mkfs (guestfs_h *g,\n"
13911 " const char *fstype,\n"
13912 " const char *device);\n"
13918 #: ../src/guestfs-actions.pod:4186 ../fish/guestfish-actions.pod:2825
13920 "This creates a filesystem on C<device> (usually a partition or LVM logical "
13921 "volume). The filesystem type is C<fstype>, for example C<ext3>."
13926 #: ../src/guestfs-actions.pod:4194
13927 msgid "guestfs_mkfs_b"
13932 #: ../src/guestfs-actions.pod:4196
13936 " guestfs_mkfs_b (guestfs_h *g,\n"
13937 " const char *fstype,\n"
13938 " int blocksize,\n"
13939 " const char *device);\n"
13945 #: ../src/guestfs-actions.pod:4202
13947 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
13948 "block size of the resulting filesystem. Supported block sizes depend on the "
13949 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
13954 #: ../src/guestfs-actions.pod:4207 ../src/guestfs-actions.pod:4249
13955 #: ../fish/guestfish-actions.pod:2838 ../fish/guestfish-actions.pod:2865
13957 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
13962 #: ../src/guestfs-actions.pod:4212
13964 "This function is deprecated. In new code, use the L</guestfs_mkfs_opts> "
13970 #: ../src/guestfs-actions.pod:4221
13971 msgid "guestfs_mkfs_opts"
13976 #: ../src/guestfs-actions.pod:4223
13980 " guestfs_mkfs_opts (guestfs_h *g,\n"
13981 " const char *fstype,\n"
13982 " const char *device,\n"
13989 #: ../src/guestfs-actions.pod:4234
13992 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
13998 #: ../src/guestfs-actions.pod:4236 ../fish/guestfish-actions.pod:2852
14000 "This function creates a filesystem on C<device>. The filesystem type is "
14001 "C<fstype>, for example C<ext3>."
14006 #: ../src/guestfs-actions.pod:4243 ../fish/guestfish-actions.pod:2859
14007 msgid "C<blocksize>"
14012 #: ../src/guestfs-actions.pod:4245 ../fish/guestfish-actions.pod:2861
14014 "The filesystem block size. Supported block sizes depend on the filesystem "
14015 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
14020 #: ../src/guestfs-actions.pod:4252 ../fish/guestfish-actions.pod:2868
14021 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
14025 #: ../src/guestfs-actions.pod:4258
14026 msgid "(Added in 1.7.19)"
14031 #: ../src/guestfs-actions.pod:4260
14032 msgid "guestfs_mkfs_opts_va"
14037 #: ../src/guestfs-actions.pod:4262
14041 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
14042 " const char *fstype,\n"
14043 " const char *device,\n"
14044 " va_list args);\n"
14050 #: ../src/guestfs-actions.pod:4268
14051 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
14056 #: ../src/guestfs-actions.pod:4272
14057 msgid "guestfs_mkfs_opts_argv"
14062 #: ../src/guestfs-actions.pod:4274
14066 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
14067 " const char *fstype,\n"
14068 " const char *device,\n"
14069 " const struct guestfs_mkfs_opts_argv *optargs);\n"
14075 #: ../src/guestfs-actions.pod:4280
14076 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
14081 #: ../src/guestfs-actions.pod:4284
14082 msgid "guestfs_mkmountpoint"
14087 #: ../src/guestfs-actions.pod:4286
14091 " guestfs_mkmountpoint (guestfs_h *g,\n"
14092 " const char *exemptpath);\n"
14098 #: ../src/guestfs-actions.pod:4290
14100 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
14101 "that can be used to create extra mountpoints before mounting the first "
14107 #: ../src/guestfs-actions.pod:4294 ../fish/guestfish-actions.pod:2882
14109 "These calls are I<only> necessary in some very limited circumstances, mainly "
14110 "the case where you want to mount a mix of unrelated and/or read-only "
14111 "filesystems together."
14116 #: ../src/guestfs-actions.pod:4298 ../fish/guestfish-actions.pod:2886
14118 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
14119 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
14120 "inside that. You can unpack this as follows in guestfish:"
14125 #: ../src/guestfs-actions.pod:4303 ../fish/guestfish-actions.pod:2891
14128 " add-ro Fedora-11-i686-Live.iso\n"
14130 " mkmountpoint /cd\n"
14131 " mkmountpoint /sqsh\n"
14132 " mkmountpoint /ext3fs\n"
14133 " mount /dev/sda /cd\n"
14134 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
14135 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
14141 #: ../src/guestfs-actions.pod:4312 ../fish/guestfish-actions.pod:2900
14142 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
14147 #: ../src/guestfs-actions.pod:4314
14149 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
14150 "may get unexpected errors if you try to mix these calls. It is safest to "
14151 "manually unmount filesystems and remove mountpoints after use."
14156 #: ../src/guestfs-actions.pod:4318
14158 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
14159 "first, so for this to work for manual mountpoints, you must ensure that the "
14160 "innermost mountpoints have the longest pathnames, as in the example code "
14166 #: ../src/guestfs-actions.pod:4323 ../fish/guestfish-actions.pod:2911
14168 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
14173 #: ../src/guestfs-actions.pod:4325
14175 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
14176 "means that C<guestfs_umount_all> is called when the handle is closed which "
14177 "can also trigger these issues."
14182 #: ../src/guestfs-actions.pod:4331 ../src/guestfs-actions.pod:4590
14183 #: ../src/guestfs-actions.pod:5492
14184 msgid "(Added in 1.0.62)"
14189 #: ../src/guestfs-actions.pod:4333
14190 msgid "guestfs_mknod"
14195 #: ../src/guestfs-actions.pod:4335
14199 " guestfs_mknod (guestfs_h *g,\n"
14203 " const char *path);\n"
14209 #: ../src/guestfs-actions.pod:4342 ../fish/guestfish-actions.pod:2921
14211 "This call creates block or character special devices, or named pipes (FIFOs)."
14216 #: ../src/guestfs-actions.pod:4345 ../fish/guestfish-actions.pod:2924
14218 "The C<mode> parameter should be the mode, using the standard constants. "
14219 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
14220 "used when creating block and character special devices."
14225 #: ../src/guestfs-actions.pod:4350
14227 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
14228 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
14229 "regular file). These constants are available in the standard Linux header "
14230 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
14231 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
14232 "the appropriate constant for you."
14237 #: ../src/guestfs-actions.pod:4364
14238 msgid "guestfs_mknod_b"
14243 #: ../src/guestfs-actions.pod:4366
14247 " guestfs_mknod_b (guestfs_h *g,\n"
14251 " const char *path);\n"
14257 #: ../src/guestfs-actions.pod:4373
14259 "This call creates a block device node called C<path> with mode C<mode> and "
14260 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
14261 "wrapper around C<guestfs_mknod>."
14266 #: ../src/guestfs-actions.pod:4383
14267 msgid "guestfs_mknod_c"
14272 #: ../src/guestfs-actions.pod:4385
14276 " guestfs_mknod_c (guestfs_h *g,\n"
14280 " const char *path);\n"
14286 #: ../src/guestfs-actions.pod:4392
14288 "This call creates a char device node called C<path> with mode C<mode> and "
14289 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
14290 "wrapper around C<guestfs_mknod>."
14295 #: ../src/guestfs-actions.pod:4402
14296 msgid "guestfs_mkswap"
14301 #: ../src/guestfs-actions.pod:4404
14305 " guestfs_mkswap (guestfs_h *g,\n"
14306 " const char *device);\n"
14312 #: ../src/guestfs-actions.pod:4408 ../fish/guestfish-actions.pod:2963
14313 msgid "Create a swap partition on C<device>."
14318 #: ../src/guestfs-actions.pod:4414
14319 msgid "guestfs_mkswap_L"
14324 #: ../src/guestfs-actions.pod:4416
14328 " guestfs_mkswap_L (guestfs_h *g,\n"
14329 " const char *label,\n"
14330 " const char *device);\n"
14336 #: ../src/guestfs-actions.pod:4421 ../fish/guestfish-actions.pod:2969
14337 msgid "Create a swap partition on C<device> with label C<label>."
14342 #: ../src/guestfs-actions.pod:4423 ../fish/guestfish-actions.pod:2971
14344 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
14345 "sda>), just to a partition. This appears to be a limitation of the kernel "
14351 #: ../src/guestfs-actions.pod:4431
14352 msgid "guestfs_mkswap_U"
14357 #: ../src/guestfs-actions.pod:4433
14361 " guestfs_mkswap_U (guestfs_h *g,\n"
14362 " const char *uuid,\n"
14363 " const char *device);\n"
14369 #: ../src/guestfs-actions.pod:4438 ../fish/guestfish-actions.pod:2979
14370 msgid "Create a swap partition on C<device> with UUID C<uuid>."
14375 #: ../src/guestfs-actions.pod:4444
14376 msgid "guestfs_mkswap_file"
14381 #: ../src/guestfs-actions.pod:4446
14385 " guestfs_mkswap_file (guestfs_h *g,\n"
14386 " const char *path);\n"
14392 #: ../src/guestfs-actions.pod:4450 ../fish/guestfish-actions.pod:2985
14393 msgid "Create a swap file."
14398 #: ../src/guestfs-actions.pod:4452
14400 "This command just writes a swap file signature to an existing file. To "
14401 "create the file itself, use something like C<guestfs_fallocate>."
14406 #: ../src/guestfs-actions.pod:4459
14407 msgid "guestfs_modprobe"
14412 #: ../src/guestfs-actions.pod:4461
14416 " guestfs_modprobe (guestfs_h *g,\n"
14417 " const char *modulename);\n"
14423 #: ../src/guestfs-actions.pod:4465 ../fish/guestfish-actions.pod:2994
14424 msgid "This loads a kernel module in the appliance."
14429 #: ../src/guestfs-actions.pod:4467 ../fish/guestfish-actions.pod:2996
14431 "The kernel module must have been whitelisted when libguestfs was built (see "
14432 "C<appliance/kmod.whitelist.in> in the source)."
14437 #: ../src/guestfs-actions.pod:4474
14438 msgid "guestfs_mount"
14443 #: ../src/guestfs-actions.pod:4476
14447 " guestfs_mount (guestfs_h *g,\n"
14448 " const char *device,\n"
14449 " const char *mountpoint);\n"
14455 #: ../src/guestfs-actions.pod:4481 ../fish/guestfish-actions.pod:3003
14457 "Mount a guest disk at a position in the filesystem. Block devices are named "
14458 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
14459 "those block devices contain partitions, they will have the usual names (eg. "
14460 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
14465 #: ../src/guestfs-actions.pod:4487 ../fish/guestfish-actions.pod:3009
14467 "The rules are the same as for L<mount(2)>: A filesystem must first be "
14468 "mounted on C</> before others can be mounted. Other filesystems can only be "
14469 "mounted on directories which already exist."
14474 #: ../src/guestfs-actions.pod:4492 ../fish/guestfish-actions.pod:3014
14476 "The mounted filesystem is writable, if we have sufficient permissions on the "
14477 "underlying device."
14482 #: ../src/guestfs-actions.pod:4495
14484 "B<Important note:> When you use this call, the filesystem options C<sync> "
14485 "and C<noatime> are set implicitly. This was originally done because we "
14486 "thought it would improve reliability, but it turns out that I<-o sync> has a "
14487 "very large negative performance impact and negligible effect on "
14488 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
14489 "in any code that needs performance, and instead use C<guestfs_mount_options> "
14490 "(use an empty string for the first parameter if you don't want any options)."
14495 #: ../src/guestfs-actions.pod:4509
14496 msgid "guestfs_mount_loop"
14501 #: ../src/guestfs-actions.pod:4511
14505 " guestfs_mount_loop (guestfs_h *g,\n"
14506 " const char *file,\n"
14507 " const char *mountpoint);\n"
14513 #: ../src/guestfs-actions.pod:4516 ../fish/guestfish-actions.pod:3031
14515 "This command lets you mount C<file> (a filesystem image in a file) on a "
14516 "mount point. It is entirely equivalent to the command C<mount -o loop file "
14522 #: ../src/guestfs-actions.pod:4524
14523 msgid "guestfs_mount_options"
14528 #: ../src/guestfs-actions.pod:4526
14532 " guestfs_mount_options (guestfs_h *g,\n"
14533 " const char *options,\n"
14534 " const char *device,\n"
14535 " const char *mountpoint);\n"
14541 #: ../src/guestfs-actions.pod:4532
14543 "This is the same as the C<guestfs_mount> command, but it allows you to set "
14544 "the mount options as for the L<mount(8)> I<-o> flag."
14549 #: ../src/guestfs-actions.pod:4536 ../fish/guestfish-actions.pod:3043
14551 "If the C<options> parameter is an empty string, then no options are passed "
14552 "(all options default to whatever the filesystem uses)."
14557 #: ../src/guestfs-actions.pod:4542 ../src/guestfs-actions.pod:4556
14558 #: ../src/guestfs-actions.pod:4573
14559 msgid "(Added in 1.0.10)"
14564 #: ../src/guestfs-actions.pod:4544
14565 msgid "guestfs_mount_ro"
14570 #: ../src/guestfs-actions.pod:4546
14574 " guestfs_mount_ro (guestfs_h *g,\n"
14575 " const char *device,\n"
14576 " const char *mountpoint);\n"
14582 #: ../src/guestfs-actions.pod:4551
14584 "This is the same as the C<guestfs_mount> command, but it mounts the "
14585 "filesystem with the read-only (I<-o ro>) flag."
14590 #: ../src/guestfs-actions.pod:4558
14591 msgid "guestfs_mount_vfs"
14596 #: ../src/guestfs-actions.pod:4560
14600 " guestfs_mount_vfs (guestfs_h *g,\n"
14601 " const char *options,\n"
14602 " const char *vfstype,\n"
14603 " const char *device,\n"
14604 " const char *mountpoint);\n"
14610 #: ../src/guestfs-actions.pod:4567
14612 "This is the same as the C<guestfs_mount> command, but it allows you to set "
14613 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
14619 #: ../src/guestfs-actions.pod:4575
14620 msgid "guestfs_mountpoints"
14625 #: ../src/guestfs-actions.pod:4577
14629 " guestfs_mountpoints (guestfs_h *g);\n"
14635 #: ../src/guestfs-actions.pod:4580
14637 "This call is similar to C<guestfs_mounts>. That call returns a list of "
14638 "devices. This one returns a hash table (map) of device name to directory "
14639 "where the device is mounted."
14644 #: ../src/guestfs-actions.pod:4592
14645 msgid "guestfs_mounts"
14650 #: ../src/guestfs-actions.pod:4594
14654 " guestfs_mounts (guestfs_h *g);\n"
14660 #: ../src/guestfs-actions.pod:4597 ../fish/guestfish-actions.pod:3074
14662 "This returns the list of currently mounted filesystems. It returns the list "
14663 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
14668 #: ../src/guestfs-actions.pod:4600 ../fish/guestfish-actions.pod:3077
14669 msgid "Some internal mounts are not shown."
14674 #: ../src/guestfs-actions.pod:4602
14675 msgid "See also: C<guestfs_mountpoints>"
14680 #: ../src/guestfs-actions.pod:4610
14686 #: ../src/guestfs-actions.pod:4612
14690 " guestfs_mv (guestfs_h *g,\n"
14691 " const char *src,\n"
14692 " const char *dest);\n"
14698 #: ../src/guestfs-actions.pod:4617 ../fish/guestfish-actions.pod:3085
14700 "This moves a file from C<src> to C<dest> where C<dest> is either a "
14701 "destination filename or destination directory."
14706 #: ../src/guestfs-actions.pod:4624
14707 msgid "guestfs_ntfs_3g_probe"
14712 #: ../src/guestfs-actions.pod:4626
14716 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
14718 " const char *device);\n"
14724 #: ../src/guestfs-actions.pod:4631 ../fish/guestfish-actions.pod:3092
14726 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
14727 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
14728 "write, and some cannot be mounted at all)."
14733 #: ../src/guestfs-actions.pod:4635 ../fish/guestfish-actions.pod:3096
14735 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
14736 "can be mounted read-write. Set it to false if you want to test if the "
14737 "volume can be mounted read-only."
14742 #: ../src/guestfs-actions.pod:4639 ../fish/guestfish-actions.pod:3100
14744 "The return value is an integer which C<0> if the operation would succeed, or "
14745 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
14750 #: ../src/guestfs-actions.pod:4645
14751 msgid "(Added in 1.0.43)"
14756 #: ../src/guestfs-actions.pod:4647
14757 msgid "guestfs_ntfsresize"
14762 #: ../src/guestfs-actions.pod:4649
14766 " guestfs_ntfsresize (guestfs_h *g,\n"
14767 " const char *device);\n"
14772 #: ../src/guestfs-actions.pod:4653 ../fish/guestfish-actions.pod:3108
14774 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
14775 "size of the underlying device."
14779 #: ../src/guestfs-actions.pod:4656 ../fish/guestfish-actions.pod:3111
14781 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
14782 "consistency check (for safety). You have to boot into Windows to perform "
14783 "this check and clear this condition. Furthermore, ntfsresize refuses to "
14784 "resize filesystems which have been marked in this way. So in effect it is "
14785 "not possible to call ntfsresize multiple times on a single filesystem "
14786 "without booting into Windows between each resize."
14790 #: ../src/guestfs-actions.pod:4664 ../fish/guestfish-actions.pod:3119
14791 msgid "See also L<ntfsresize(8)>."
14796 #: ../src/guestfs-actions.pod:4670
14797 msgid "guestfs_ntfsresize_size"
14802 #: ../src/guestfs-actions.pod:4672
14806 " guestfs_ntfsresize_size (guestfs_h *g,\n"
14807 " const char *device,\n"
14808 " int64_t size);\n"
14814 #: ../src/guestfs-actions.pod:4677
14816 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
14817 "to specify the new size (in bytes) explicitly."
14822 #: ../src/guestfs-actions.pod:4682 ../src/guestfs-actions.pod:5118
14823 #: ../src/guestfs-actions.pod:5191 ../src/guestfs-actions.pod:5440
14824 #: ../src/guestfs-actions.pod:6979
14825 msgid "(Added in 1.3.14)"
14830 #: ../src/guestfs-actions.pod:4684
14831 msgid "guestfs_part_add"
14836 #: ../src/guestfs-actions.pod:4686
14840 " guestfs_part_add (guestfs_h *g,\n"
14841 " const char *device,\n"
14842 " const char *prlogex,\n"
14843 " int64_t startsect,\n"
14844 " int64_t endsect);\n"
14850 #: ../src/guestfs-actions.pod:4693
14852 "This command adds a partition to C<device>. If there is no partition table "
14853 "on the device, call C<guestfs_part_init> first."
14858 #: ../src/guestfs-actions.pod:4696 ../fish/guestfish-actions.pod:3135
14860 "The C<prlogex> parameter is the type of partition. Normally you should pass "
14861 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
14862 "C<logical>) and C<e> (or C<extended>) partition types."
14867 #: ../src/guestfs-actions.pod:4701 ../fish/guestfish-actions.pod:3140
14869 "C<startsect> and C<endsect> are the start and end of the partition in "
14870 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
14871 "from the end of the disk (C<-1> is the last sector)."
14876 #: ../src/guestfs-actions.pod:4705
14878 "Creating a partition which covers the whole disk is not so easy. Use "
14879 "C<guestfs_part_disk> to do that."
14884 #: ../src/guestfs-actions.pod:4710 ../src/guestfs-actions.pod:4748
14885 #: ../src/guestfs-actions.pod:4801 ../src/guestfs-actions.pod:4879
14886 #: ../src/guestfs-actions.pod:4917 ../src/guestfs-actions.pod:4936
14887 #: ../src/guestfs-actions.pod:4976
14888 msgid "(Added in 1.0.78)"
14893 #: ../src/guestfs-actions.pod:4712
14894 msgid "guestfs_part_del"
14899 #: ../src/guestfs-actions.pod:4714
14903 " guestfs_part_del (guestfs_h *g,\n"
14904 " const char *device,\n"
14911 #: ../src/guestfs-actions.pod:4719 ../fish/guestfish-actions.pod:3151
14912 msgid "This command deletes the partition numbered C<partnum> on C<device>."
14917 #: ../src/guestfs-actions.pod:4721 ../fish/guestfish-actions.pod:3153
14919 "Note that in the case of MBR partitioning, deleting an extended partition "
14920 "also deletes any logical partitions it contains."
14925 #: ../src/guestfs-actions.pod:4729
14926 msgid "guestfs_part_disk"
14931 #: ../src/guestfs-actions.pod:4731
14935 " guestfs_part_disk (guestfs_h *g,\n"
14936 " const char *device,\n"
14937 " const char *parttype);\n"
14943 #: ../src/guestfs-actions.pod:4736
14945 "This command is simply a combination of C<guestfs_part_init> followed by "
14946 "C<guestfs_part_add> to create a single primary partition covering the whole "
14952 #: ../src/guestfs-actions.pod:4740
14954 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
14955 "possible values are described in C<guestfs_part_init>."
14960 #: ../src/guestfs-actions.pod:4750
14961 msgid "guestfs_part_get_bootable"
14966 #: ../src/guestfs-actions.pod:4752
14970 " guestfs_part_get_bootable (guestfs_h *g,\n"
14971 " const char *device,\n"
14978 #: ../src/guestfs-actions.pod:4757 ../fish/guestfish-actions.pod:3175
14980 "This command returns true if the partition C<partnum> on C<device> has the "
14981 "bootable flag set."
14986 #: ../src/guestfs-actions.pod:4760
14987 msgid "See also C<guestfs_part_set_bootable>."
14992 #: ../src/guestfs-actions.pod:4766
14993 msgid "guestfs_part_get_mbr_id"
14998 #: ../src/guestfs-actions.pod:4768
15002 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
15003 " const char *device,\n"
15010 #: ../src/guestfs-actions.pod:4773 ../fish/guestfish-actions.pod:3184
15012 "Returns the MBR type byte (also known as the ID byte) from the numbered "
15013 "partition C<partnum>."
15018 #: ../src/guestfs-actions.pod:4776 ../src/guestfs-actions.pod:4952
15020 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
15021 "undefined results for other partition table types (see "
15022 "C<guestfs_part_get_parttype>)."
15027 #: ../src/guestfs-actions.pod:4784
15028 msgid "guestfs_part_get_parttype"
15033 #: ../src/guestfs-actions.pod:4786
15037 " guestfs_part_get_parttype (guestfs_h *g,\n"
15038 " const char *device);\n"
15044 #: ../src/guestfs-actions.pod:4790 ../fish/guestfish-actions.pod:3195
15046 "This command examines the partition table on C<device> and returns the "
15047 "partition table type (format) being used."
15052 #: ../src/guestfs-actions.pod:4793
15054 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
15055 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
15056 "possible, although unusual. See C<guestfs_part_init> for a full list."
15061 #: ../src/guestfs-actions.pod:4803
15062 msgid "guestfs_part_init"
15067 #: ../src/guestfs-actions.pod:4805
15071 " guestfs_part_init (guestfs_h *g,\n"
15072 " const char *device,\n"
15073 " const char *parttype);\n"
15079 #: ../src/guestfs-actions.pod:4810 ../fish/guestfish-actions.pod:3207
15081 "This creates an empty partition table on C<device> of one of the partition "
15082 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
15083 "(for large disks)."
15088 #: ../src/guestfs-actions.pod:4814
15090 "Initially there are no partitions. Following this, you should call "
15091 "C<guestfs_part_add> for each partition required."
15096 #: ../src/guestfs-actions.pod:4817 ../fish/guestfish-actions.pod:3214
15097 msgid "Possible values for C<parttype> are:"
15102 #: ../src/guestfs-actions.pod:4821 ../fish/guestfish-actions.pod:3218
15103 msgid "B<efi> | B<gpt>"
15108 #: ../src/guestfs-actions.pod:4823 ../fish/guestfish-actions.pod:3220
15109 msgid "Intel EFI / GPT partition table."
15114 #: ../src/guestfs-actions.pod:4825 ../fish/guestfish-actions.pod:3222
15116 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
15117 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
15118 "the C<mbr> format."
15123 #: ../src/guestfs-actions.pod:4829 ../fish/guestfish-actions.pod:3226
15124 msgid "B<mbr> | B<msdos>"
15129 #: ../src/guestfs-actions.pod:4831 ../fish/guestfish-actions.pod:3228
15131 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
15132 "Windows. This partition type will B<only> work for device sizes up to 2 "
15133 "TB. For large disks we recommend using C<gpt>."
15138 #: ../src/guestfs-actions.pod:4838 ../fish/guestfish-actions.pod:3235
15140 "Other partition table types that may work but are not supported include:"
15145 #: ../src/guestfs-actions.pod:4843 ../fish/guestfish-actions.pod:3240
15151 #: ../src/guestfs-actions.pod:4845 ../fish/guestfish-actions.pod:3242
15152 msgid "AIX disk labels."
15157 #: ../src/guestfs-actions.pod:4847 ../fish/guestfish-actions.pod:3244
15158 msgid "B<amiga> | B<rdb>"
15163 #: ../src/guestfs-actions.pod:4849 ../fish/guestfish-actions.pod:3246
15164 msgid "Amiga \"Rigid Disk Block\" format."
15169 #: ../src/guestfs-actions.pod:4851 ../fish/guestfish-actions.pod:3248
15175 #: ../src/guestfs-actions.pod:4853 ../fish/guestfish-actions.pod:3250
15176 msgid "BSD disk labels."
15181 #: ../src/guestfs-actions.pod:4855 ../fish/guestfish-actions.pod:3252
15187 #: ../src/guestfs-actions.pod:4857 ../fish/guestfish-actions.pod:3254
15188 msgid "DASD, used on IBM mainframes."
15193 #: ../src/guestfs-actions.pod:4859 ../fish/guestfish-actions.pod:3256
15199 #: ../src/guestfs-actions.pod:4861 ../fish/guestfish-actions.pod:3258
15200 msgid "MIPS/SGI volumes."
15205 #: ../src/guestfs-actions.pod:4863 ../fish/guestfish-actions.pod:3260
15211 #: ../src/guestfs-actions.pod:4865 ../fish/guestfish-actions.pod:3262
15212 msgid "Old Mac partition format. Modern Macs use C<gpt>."
15217 #: ../src/guestfs-actions.pod:4867 ../fish/guestfish-actions.pod:3264
15223 #: ../src/guestfs-actions.pod:4869 ../fish/guestfish-actions.pod:3266
15224 msgid "NEC PC-98 format, common in Japan apparently."
15229 #: ../src/guestfs-actions.pod:4871 ../fish/guestfish-actions.pod:3268
15235 #: ../src/guestfs-actions.pod:4873 ../fish/guestfish-actions.pod:3270
15236 msgid "Sun disk labels."
15241 #: ../src/guestfs-actions.pod:4881
15242 msgid "guestfs_part_list"
15247 #: ../src/guestfs-actions.pod:4883
15250 " struct guestfs_partition_list *\n"
15251 " guestfs_part_list (guestfs_h *g,\n"
15252 " const char *device);\n"
15258 #: ../src/guestfs-actions.pod:4887 ../fish/guestfish-actions.pod:3278
15260 "This command parses the partition table on C<device> and returns the list of "
15261 "partitions found."
15266 #: ../src/guestfs-actions.pod:4890 ../fish/guestfish-actions.pod:3281
15267 msgid "The fields in the returned structure are:"
15272 #: ../src/guestfs-actions.pod:4894 ../fish/guestfish-actions.pod:3285
15273 msgid "B<part_num>"
15278 #: ../src/guestfs-actions.pod:4896 ../fish/guestfish-actions.pod:3287
15279 msgid "Partition number, counting from 1."
15284 #: ../src/guestfs-actions.pod:4898 ../fish/guestfish-actions.pod:3289
15285 msgid "B<part_start>"
15290 #: ../src/guestfs-actions.pod:4900
15292 "Start of the partition I<in bytes>. To get sectors you have to divide by "
15293 "the device's sector size, see C<guestfs_blockdev_getss>."
15298 #: ../src/guestfs-actions.pod:4903 ../fish/guestfish-actions.pod:3294
15299 msgid "B<part_end>"
15304 #: ../src/guestfs-actions.pod:4905 ../fish/guestfish-actions.pod:3296
15305 msgid "End of the partition in bytes."
15310 #: ../src/guestfs-actions.pod:4907 ../fish/guestfish-actions.pod:3298
15311 msgid "B<part_size>"
15316 #: ../src/guestfs-actions.pod:4909 ../fish/guestfish-actions.pod:3300
15317 msgid "Size of the partition in bytes."
15322 #: ../src/guestfs-actions.pod:4913
15324 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
15325 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
15331 #: ../src/guestfs-actions.pod:4919
15332 msgid "guestfs_part_set_bootable"
15337 #: ../src/guestfs-actions.pod:4921
15341 " guestfs_part_set_bootable (guestfs_h *g,\n"
15342 " const char *device,\n"
15344 " int bootable);\n"
15350 #: ../src/guestfs-actions.pod:4927 ../fish/guestfish-actions.pod:3308
15352 "This sets the bootable flag on partition numbered C<partnum> on device "
15353 "C<device>. Note that partitions are numbered from 1."
15358 #: ../src/guestfs-actions.pod:4930 ../fish/guestfish-actions.pod:3311
15360 "The bootable flag is used by some operating systems (notably Windows) to "
15361 "determine which partition to boot from. It is by no means universally "
15367 #: ../src/guestfs-actions.pod:4938
15368 msgid "guestfs_part_set_mbr_id"
15373 #: ../src/guestfs-actions.pod:4940
15377 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
15378 " const char *device,\n"
15386 #: ../src/guestfs-actions.pod:4946 ../fish/guestfish-actions.pod:3319
15388 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
15389 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
15390 "documentation are in fact hexadecimal numbers, but usually documented "
15391 "without any leading \"0x\" which might be confusing."
15396 #: ../src/guestfs-actions.pod:4960
15397 msgid "guestfs_part_set_name"
15402 #: ../src/guestfs-actions.pod:4962
15406 " guestfs_part_set_name (guestfs_h *g,\n"
15407 " const char *device,\n"
15409 " const char *name);\n"
15415 #: ../src/guestfs-actions.pod:4968 ../fish/guestfish-actions.pod:3333
15417 "This sets the partition name on partition numbered C<partnum> on device "
15418 "C<device>. Note that partitions are numbered from 1."
15423 #: ../src/guestfs-actions.pod:4971 ../fish/guestfish-actions.pod:3336
15425 "The partition name can only be set on certain types of partition table. "
15426 "This works on C<gpt> but not on C<mbr> partitions."
15431 #: ../src/guestfs-actions.pod:4978
15432 msgid "guestfs_part_to_dev"
15437 #: ../src/guestfs-actions.pod:4980
15441 " guestfs_part_to_dev (guestfs_h *g,\n"
15442 " const char *partition);\n"
15448 #: ../src/guestfs-actions.pod:4984 ../fish/guestfish-actions.pod:3343
15450 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
15451 "partition number, returning the device name (eg. \"/dev/sdb\")."
15456 #: ../src/guestfs-actions.pod:4988
15458 "The named partition must exist, for example as a string returned from "
15459 "C<guestfs_list_partitions>."
15464 #: ../src/guestfs-actions.pod:4996
15465 msgid "guestfs_ping_daemon"
15470 #: ../src/guestfs-actions.pod:4998
15474 " guestfs_ping_daemon (guestfs_h *g);\n"
15480 #: ../src/guestfs-actions.pod:5001 ../fish/guestfish-actions.pod:3354
15482 "This is a test probe into the guestfs daemon running inside the qemu "
15483 "subprocess. Calling this function checks that the daemon responds to the "
15484 "ping message, without affecting the daemon or attached block device(s) in "
15490 #: ../src/guestfs-actions.pod:5010
15491 msgid "guestfs_pread"
15496 #: ../src/guestfs-actions.pod:5012
15500 " guestfs_pread (guestfs_h *g,\n"
15501 " const char *path,\n"
15503 " int64_t offset,\n"
15504 " size_t *size_r);\n"
15510 #: ../src/guestfs-actions.pod:5019 ../fish/guestfish-actions.pod:3363
15512 "This command lets you read part of a file. It reads C<count> bytes of the "
15513 "file, starting at C<offset>, from file C<path>."
15518 #: ../src/guestfs-actions.pod:5022 ../src/guestfs-actions.pod:5048
15519 #: ../fish/guestfish-actions.pod:3366 ../fish/guestfish-actions.pod:3381
15521 "This may read fewer bytes than requested. For further details see the "
15522 "L<pread(2)> system call."
15527 #: ../src/guestfs-actions.pod:5025
15528 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
15533 #: ../src/guestfs-actions.pod:5036
15534 msgid "guestfs_pread_device"
15539 #: ../src/guestfs-actions.pod:5038
15543 " guestfs_pread_device (guestfs_h *g,\n"
15544 " const char *device,\n"
15546 " int64_t offset,\n"
15547 " size_t *size_r);\n"
15553 #: ../src/guestfs-actions.pod:5045 ../fish/guestfish-actions.pod:3378
15555 "This command lets you read part of a file. It reads C<count> bytes of "
15556 "C<device>, starting at C<offset>."
15561 #: ../src/guestfs-actions.pod:5051
15562 msgid "See also C<guestfs_pread>."
15567 #: ../src/guestfs-actions.pod:5060
15568 msgid "(Added in 1.5.21)"
15573 #: ../src/guestfs-actions.pod:5062
15574 msgid "guestfs_pvcreate"
15579 #: ../src/guestfs-actions.pod:5064
15583 " guestfs_pvcreate (guestfs_h *g,\n"
15584 " const char *device);\n"
15590 #: ../src/guestfs-actions.pod:5068 ../fish/guestfish-actions.pod:3393
15592 "This creates an LVM physical volume on the named C<device>, where C<device> "
15593 "should usually be a partition name such as C</dev/sda1>."
15598 #: ../src/guestfs-actions.pod:5076
15599 msgid "guestfs_pvremove"
15604 #: ../src/guestfs-actions.pod:5078
15608 " guestfs_pvremove (guestfs_h *g,\n"
15609 " const char *device);\n"
15615 #: ../src/guestfs-actions.pod:5082 ../fish/guestfish-actions.pod:3401
15617 "This wipes a physical volume C<device> so that LVM will no longer recognise "
15623 #: ../src/guestfs-actions.pod:5085 ../fish/guestfish-actions.pod:3404
15625 "The implementation uses the C<pvremove> command which refuses to wipe "
15626 "physical volumes that contain any volume groups, so you have to remove those "
15632 #: ../src/guestfs-actions.pod:5093
15633 msgid "guestfs_pvresize"
15638 #: ../src/guestfs-actions.pod:5095
15642 " guestfs_pvresize (guestfs_h *g,\n"
15643 " const char *device);\n"
15649 #: ../src/guestfs-actions.pod:5099 ../fish/guestfish-actions.pod:3412
15651 "This resizes (expands or shrinks) an existing LVM physical volume to match "
15652 "the new size of the underlying device."
15657 #: ../src/guestfs-actions.pod:5106
15658 msgid "guestfs_pvresize_size"
15663 #: ../src/guestfs-actions.pod:5108
15667 " guestfs_pvresize_size (guestfs_h *g,\n"
15668 " const char *device,\n"
15669 " int64_t size);\n"
15675 #: ../src/guestfs-actions.pod:5113
15677 "This command is the same as C<guestfs_pvresize> except that it allows you to "
15678 "specify the new size (in bytes) explicitly."
15683 #: ../src/guestfs-actions.pod:5120
15684 msgid "guestfs_pvs"
15689 #: ../src/guestfs-actions.pod:5122
15693 " guestfs_pvs (guestfs_h *g);\n"
15699 #: ../src/guestfs-actions.pod:5125 ../fish/guestfish-actions.pod:3426
15701 "List all the physical volumes detected. This is the equivalent of the L<pvs"
15707 #: ../src/guestfs-actions.pod:5128 ../fish/guestfish-actions.pod:3429
15709 "This returns a list of just the device names that contain PVs (eg. C</dev/"
15715 #: ../src/guestfs-actions.pod:5131
15716 msgid "See also C<guestfs_pvs_full>."
15721 #: ../src/guestfs-actions.pod:5139
15722 msgid "guestfs_pvs_full"
15727 #: ../src/guestfs-actions.pod:5141
15730 " struct guestfs_lvm_pv_list *\n"
15731 " guestfs_pvs_full (guestfs_h *g);\n"
15737 #: ../src/guestfs-actions.pod:5144 ../fish/guestfish-actions.pod:3438
15739 "List all the physical volumes detected. This is the equivalent of the L<pvs"
15740 "(8)> command. The \"full\" version includes all fields."
15745 #: ../src/guestfs-actions.pod:5147
15747 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
15748 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after use>."
15753 #: ../src/guestfs-actions.pod:5153
15754 msgid "guestfs_pvuuid"
15759 #: ../src/guestfs-actions.pod:5155
15763 " guestfs_pvuuid (guestfs_h *g,\n"
15764 " const char *device);\n"
15770 #: ../src/guestfs-actions.pod:5159 ../fish/guestfish-actions.pod:3445
15771 msgid "This command returns the UUID of the LVM PV C<device>."
15776 #: ../src/guestfs-actions.pod:5166
15777 msgid "guestfs_pwrite"
15782 #: ../src/guestfs-actions.pod:5168
15786 " guestfs_pwrite (guestfs_h *g,\n"
15787 " const char *path,\n"
15788 " const char *content,\n"
15789 " size_t content_size,\n"
15790 " int64_t offset);\n"
15796 #: ../src/guestfs-actions.pod:5175 ../fish/guestfish-actions.pod:3451
15798 "This command writes to part of a file. It writes the data buffer C<content> "
15799 "to the file C<path> starting at offset C<offset>."
15804 #: ../src/guestfs-actions.pod:5178 ../fish/guestfish-actions.pod:3454
15806 "This command implements the L<pwrite(2)> system call, and like that system "
15807 "call it may not write the full data requested. The return value is the "
15808 "number of bytes that were actually written to the file. This could even be "
15809 "0, although short writes are unlikely for regular files in ordinary "
15815 #: ../src/guestfs-actions.pod:5184
15816 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
15821 #: ../src/guestfs-actions.pod:5193
15822 msgid "guestfs_pwrite_device"
15827 #: ../src/guestfs-actions.pod:5195
15831 " guestfs_pwrite_device (guestfs_h *g,\n"
15832 " const char *device,\n"
15833 " const char *content,\n"
15834 " size_t content_size,\n"
15835 " int64_t offset);\n"
15841 #: ../src/guestfs-actions.pod:5202 ../fish/guestfish-actions.pod:3469
15843 "This command writes to part of a device. It writes the data buffer "
15844 "C<content> to C<device> starting at offset C<offset>."
15849 #: ../src/guestfs-actions.pod:5205 ../fish/guestfish-actions.pod:3472
15851 "This command implements the L<pwrite(2)> system call, and like that system "
15852 "call it may not write the full data requested (although short writes to disk "
15853 "devices and partitions are probably impossible with standard Linux kernels)."
15858 #: ../src/guestfs-actions.pod:5210
15859 msgid "See also C<guestfs_pwrite>."
15864 #: ../src/guestfs-actions.pod:5217
15865 msgid "(Added in 1.5.20)"
15870 #: ../src/guestfs-actions.pod:5219
15871 msgid "guestfs_read_file"
15876 #: ../src/guestfs-actions.pod:5221
15880 " guestfs_read_file (guestfs_h *g,\n"
15881 " const char *path,\n"
15882 " size_t *size_r);\n"
15888 #: ../src/guestfs-actions.pod:5226 ../fish/guestfish-actions.pod:3486
15889 msgid "This calls returns the contents of the file C<path> as a buffer."
15894 #: ../src/guestfs-actions.pod:5229
15896 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
15897 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
15898 "function is limited in the total size of file that can be handled."
15903 #: ../src/guestfs-actions.pod:5241
15904 msgid "(Added in 1.0.63)"
15909 #: ../src/guestfs-actions.pod:5243
15910 msgid "guestfs_read_lines"
15915 #: ../src/guestfs-actions.pod:5245
15919 " guestfs_read_lines (guestfs_h *g,\n"
15920 " const char *path);\n"
15926 #: ../src/guestfs-actions.pod:5251 ../fish/guestfish-actions.pod:3503
15928 "The file contents are returned as a list of lines. Trailing C<LF> and "
15929 "C<CRLF> character sequences are I<not> returned."
15934 #: ../src/guestfs-actions.pod:5254
15936 "Note that this function cannot correctly handle binary files (specifically, "
15937 "files containing C<\\0> character which is treated as end of line). For "
15938 "those you need to use the C<guestfs_read_file> function which has a more "
15939 "complex interface."
15944 #: ../src/guestfs-actions.pod:5265
15945 msgid "guestfs_readdir"
15950 #: ../src/guestfs-actions.pod:5267
15953 " struct guestfs_dirent_list *\n"
15954 " guestfs_readdir (guestfs_h *g,\n"
15955 " const char *dir);\n"
15961 #: ../src/guestfs-actions.pod:5271 ../fish/guestfish-actions.pod:3515
15962 msgid "This returns the list of directory entries in directory C<dir>."
15967 #: ../src/guestfs-actions.pod:5273 ../fish/guestfish-actions.pod:3517
15969 "All entries in the directory are returned, including C<.> and C<..>. The "
15970 "entries are I<not> sorted, but returned in the same order as the underlying "
15976 #: ../src/guestfs-actions.pod:5277 ../fish/guestfish-actions.pod:3521
15978 "Also this call returns basic file type information about each file. The "
15979 "C<ftyp> field will contain one of the following characters:"
15984 #: ../src/guestfs-actions.pod:5282 ../fish/guestfish-actions.pod:3526
15990 #: ../src/guestfs-actions.pod:5284 ../fish/guestfish-actions.pod:3528
15991 msgid "Block special"
15996 #: ../src/guestfs-actions.pod:5286 ../fish/guestfish-actions.pod:3530
16002 #: ../src/guestfs-actions.pod:5288 ../fish/guestfish-actions.pod:3532
16003 msgid "Char special"
16008 #: ../src/guestfs-actions.pod:5290 ../fish/guestfish-actions.pod:3534
16014 #: ../src/guestfs-actions.pod:5292 ../fish/guestfish-actions.pod:3536
16020 #: ../src/guestfs-actions.pod:5294 ../fish/guestfish-actions.pod:3538
16026 #: ../src/guestfs-actions.pod:5296 ../fish/guestfish-actions.pod:3540
16027 msgid "FIFO (named pipe)"
16032 #: ../src/guestfs-actions.pod:5298 ../fish/guestfish-actions.pod:3542
16038 #: ../src/guestfs-actions.pod:5300 ../fish/guestfish-actions.pod:3544
16039 msgid "Symbolic link"
16044 #: ../src/guestfs-actions.pod:5302 ../fish/guestfish-actions.pod:3546
16050 #: ../src/guestfs-actions.pod:5304 ../fish/guestfish-actions.pod:3548
16051 msgid "Regular file"
16056 #: ../src/guestfs-actions.pod:5306 ../fish/guestfish-actions.pod:3550
16062 #: ../src/guestfs-actions.pod:5308 ../fish/guestfish-actions.pod:3552
16068 #: ../src/guestfs-actions.pod:5310 ../fish/guestfish-actions.pod:3554
16074 #: ../src/guestfs-actions.pod:5312 ../fish/guestfish-actions.pod:3556
16075 msgid "Unknown file type"
16080 #: ../src/guestfs-actions.pod:5314 ../fish/guestfish-actions.pod:3558
16086 #: ../src/guestfs-actions.pod:5316 ../fish/guestfish-actions.pod:3560
16088 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
16093 #: ../src/guestfs-actions.pod:5321
16095 "This function is primarily intended for use by programs. To get a simple "
16096 "list of names, use C<guestfs_ls>. To get a printable directory for human "
16097 "consumption, use C<guestfs_ll>."
16102 #: ../src/guestfs-actions.pod:5325
16104 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
16105 "was an error. I<The caller must call C<guestfs_free_dirent_list> after use>."
16110 #: ../src/guestfs-actions.pod:5331
16111 msgid "guestfs_readlink"
16116 #: ../src/guestfs-actions.pod:5333
16120 " guestfs_readlink (guestfs_h *g,\n"
16121 " const char *path);\n"
16127 #: ../src/guestfs-actions.pod:5337 ../fish/guestfish-actions.pod:3573
16128 msgid "This command reads the target of a symbolic link."
16133 #: ../src/guestfs-actions.pod:5344
16134 msgid "guestfs_readlinklist"
16139 #: ../src/guestfs-actions.pod:5346
16143 " guestfs_readlinklist (guestfs_h *g,\n"
16144 " const char *path,\n"
16145 " char *const *names);\n"
16151 #: ../src/guestfs-actions.pod:5351 ../fish/guestfish-actions.pod:3579
16153 "This call allows you to do a C<readlink> operation on multiple files, where "
16154 "all files are in the directory C<path>. C<names> is the list of files from "
16160 #: ../src/guestfs-actions.pod:5355 ../fish/guestfish-actions.pod:3583
16162 "On return you get a list of strings, with a one-to-one correspondence to the "
16163 "C<names> list. Each string is the value of the symbolic link."
16168 #: ../src/guestfs-actions.pod:5359 ../fish/guestfish-actions.pod:3587
16170 "If the C<readlink(2)> operation fails on any name, then the corresponding "
16171 "result string is the empty string C<\"\">. However the whole operation is "
16172 "completed even if there were C<readlink(2)> errors, and so you can call this "
16173 "function with names where you don't know if they are symbolic links already "
16174 "(albeit slightly less efficient)."
16179 #: ../src/guestfs-actions.pod:5366 ../fish/guestfish-actions.pod:3594
16181 "This call is intended for programs that want to efficiently list a directory "
16182 "contents without making many round-trips. Very long directory listings "
16183 "might cause the protocol message size to be exceeded, causing this call to "
16184 "fail. The caller must split up such requests into smaller groups of names."
16189 #: ../src/guestfs-actions.pod:5379
16190 msgid "guestfs_realpath"
16195 #: ../src/guestfs-actions.pod:5381
16199 " guestfs_realpath (guestfs_h *g,\n"
16200 " const char *path);\n"
16206 #: ../src/guestfs-actions.pod:5385 ../fish/guestfish-actions.pod:3605
16208 "Return the canonicalized absolute pathname of C<path>. The returned path "
16209 "has no C<.>, C<..> or symbolic link path elements."
16214 #: ../src/guestfs-actions.pod:5393
16215 msgid "guestfs_removexattr"
16220 #: ../src/guestfs-actions.pod:5395
16224 " guestfs_removexattr (guestfs_h *g,\n"
16225 " const char *xattr,\n"
16226 " const char *path);\n"
16232 #: ../src/guestfs-actions.pod:5400 ../fish/guestfish-actions.pod:3612
16234 "This call removes the extended attribute named C<xattr> of the file C<path>."
16239 #: ../src/guestfs-actions.pod:5403
16240 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
16245 #: ../src/guestfs-actions.pod:5409
16246 msgid "guestfs_resize2fs"
16251 #: ../src/guestfs-actions.pod:5411
16255 " guestfs_resize2fs (guestfs_h *g,\n"
16256 " const char *device);\n"
16262 #: ../src/guestfs-actions.pod:5415 ../fish/guestfish-actions.pod:3621
16264 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
16265 "underlying device."
16270 #: ../src/guestfs-actions.pod:5418
16272 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
16273 "C<device> before calling this command. For unknown reasons C<resize2fs> "
16274 "sometimes gives an error about this and sometimes not. In any case, it is "
16275 "always safe to call C<guestfs_e2fsck_f> before calling this function."
16280 #: ../src/guestfs-actions.pod:5428
16281 msgid "guestfs_resize2fs_size"
16286 #: ../src/guestfs-actions.pod:5430
16290 " guestfs_resize2fs_size (guestfs_h *g,\n"
16291 " const char *device,\n"
16292 " int64_t size);\n"
16298 #: ../src/guestfs-actions.pod:5435
16300 "This command is the same as C<guestfs_resize2fs> except that it allows you "
16301 "to specify the new size (in bytes) explicitly."
16306 #: ../src/guestfs-actions.pod:5442
16312 #: ../src/guestfs-actions.pod:5444
16316 " guestfs_rm (guestfs_h *g,\n"
16317 " const char *path);\n"
16323 #: ../src/guestfs-actions.pod:5448 ../fish/guestfish-actions.pod:3641
16324 msgid "Remove the single file C<path>."
16329 #: ../src/guestfs-actions.pod:5454
16330 msgid "guestfs_rm_rf"
16335 #: ../src/guestfs-actions.pod:5456
16339 " guestfs_rm_rf (guestfs_h *g,\n"
16340 " const char *path);\n"
16346 #: ../src/guestfs-actions.pod:5460 ../fish/guestfish-actions.pod:3647
16348 "Remove the file or directory C<path>, recursively removing the contents if "
16349 "its a directory. This is like the C<rm -rf> shell command."
16354 #: ../src/guestfs-actions.pod:5468
16355 msgid "guestfs_rmdir"
16360 #: ../src/guestfs-actions.pod:5470
16364 " guestfs_rmdir (guestfs_h *g,\n"
16365 " const char *path);\n"
16371 #: ../src/guestfs-actions.pod:5474 ../fish/guestfish-actions.pod:3655
16372 msgid "Remove the single directory C<path>."
16377 #: ../src/guestfs-actions.pod:5480
16378 msgid "guestfs_rmmountpoint"
16383 #: ../src/guestfs-actions.pod:5482
16387 " guestfs_rmmountpoint (guestfs_h *g,\n"
16388 " const char *exemptpath);\n"
16394 #: ../src/guestfs-actions.pod:5486
16396 "This calls removes a mountpoint that was previously created with "
16397 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
16402 #: ../src/guestfs-actions.pod:5494
16403 msgid "guestfs_scrub_device"
16408 #: ../src/guestfs-actions.pod:5496
16412 " guestfs_scrub_device (guestfs_h *g,\n"
16413 " const char *device);\n"
16419 #: ../src/guestfs-actions.pod:5500 ../fish/guestfish-actions.pod:3669
16421 "This command writes patterns over C<device> to make data retrieval more "
16427 #: ../src/guestfs-actions.pod:5503 ../src/guestfs-actions.pod:5524
16428 #: ../src/guestfs-actions.pod:5543 ../fish/guestfish-actions.pod:3672
16429 #: ../fish/guestfish-actions.pod:3687 ../fish/guestfish-actions.pod:3700
16431 "It is an interface to the L<scrub(1)> program. See that manual page for "
16437 #: ../src/guestfs-actions.pod:5511 ../src/guestfs-actions.pod:5529
16438 #: ../src/guestfs-actions.pod:5548
16439 msgid "(Added in 1.0.52)"
16444 #: ../src/guestfs-actions.pod:5513
16445 msgid "guestfs_scrub_file"
16450 #: ../src/guestfs-actions.pod:5515
16454 " guestfs_scrub_file (guestfs_h *g,\n"
16455 " const char *file);\n"
16461 #: ../src/guestfs-actions.pod:5519 ../fish/guestfish-actions.pod:3682
16463 "This command writes patterns over a file to make data retrieval more "
16469 #: ../src/guestfs-actions.pod:5522 ../fish/guestfish-actions.pod:3685
16470 msgid "The file is I<removed> after scrubbing."
16475 #: ../src/guestfs-actions.pod:5531
16476 msgid "guestfs_scrub_freespace"
16481 #: ../src/guestfs-actions.pod:5533
16485 " guestfs_scrub_freespace (guestfs_h *g,\n"
16486 " const char *dir);\n"
16492 #: ../src/guestfs-actions.pod:5537
16494 "This command creates the directory C<dir> and then fills it with files until "
16495 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
16496 "and deletes them. The intention is to scrub any free space on the partition "
16497 "containing C<dir>."
16502 #: ../src/guestfs-actions.pod:5550
16503 msgid "guestfs_set_append"
16508 #: ../src/guestfs-actions.pod:5552
16512 " guestfs_set_append (guestfs_h *g,\n"
16513 " const char *append);\n"
16519 #: ../src/guestfs-actions.pod:5556 ../fish/guestfish-actions.pod:3709
16521 "This function is used to add additional options to the guest kernel command "
16527 #: ../src/guestfs-actions.pod:5559 ../fish/guestfish-actions.pod:3712
16529 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
16530 "environment variable."
16535 #: ../src/guestfs-actions.pod:5562 ../fish/guestfish-actions.pod:3715
16537 "Setting C<append> to C<NULL> means I<no> additional options are passed "
16538 "(libguestfs always adds a few of its own)."
16543 #: ../src/guestfs-actions.pod:5569
16544 msgid "guestfs_set_autosync"
16549 #: ../src/guestfs-actions.pod:5571
16553 " guestfs_set_autosync (guestfs_h *g,\n"
16554 " int autosync);\n"
16560 #: ../src/guestfs-actions.pod:5575
16562 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
16563 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
16564 "the handle is closed (also if the program exits without closing handles)."
16569 #: ../src/guestfs-actions.pod:5580 ../fish/guestfish-actions.pod:3729
16571 "This is enabled by default (since libguestfs 1.5.24, previously it was "
16572 "disabled by default)."
16577 #: ../src/guestfs-actions.pod:5587
16578 msgid "guestfs_set_direct"
16583 #: ../src/guestfs-actions.pod:5589
16587 " guestfs_set_direct (guestfs_h *g,\n"
16594 #: ../src/guestfs-actions.pod:5593 ../fish/guestfish-actions.pod:3738
16596 "If the direct appliance mode flag is enabled, then stdin and stdout are "
16597 "passed directly through to the appliance once it is launched."
16602 #: ../src/guestfs-actions.pod:5597
16604 "One consequence of this is that log messages aren't caught by the library "
16605 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
16611 #: ../src/guestfs-actions.pod:5601 ../fish/guestfish-actions.pod:3746
16612 msgid "You probably don't want to use this unless you know what you are doing."
16617 #: ../src/guestfs-actions.pod:5604 ../fish/guestfish-actions.pod:3749
16618 msgid "The default is disabled."
16623 #: ../src/guestfs-actions.pod:5610
16624 msgid "guestfs_set_e2label"
16629 #: ../src/guestfs-actions.pod:5612
16633 " guestfs_set_e2label (guestfs_h *g,\n"
16634 " const char *device,\n"
16635 " const char *label);\n"
16641 #: ../src/guestfs-actions.pod:5617 ../fish/guestfish-actions.pod:3755
16643 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
16644 "C<label>. Filesystem labels are limited to 16 characters."
16649 #: ../src/guestfs-actions.pod:5621
16651 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
16652 "the existing label on a filesystem."
16657 #: ../src/guestfs-actions.pod:5628
16658 msgid "guestfs_set_e2uuid"
16663 #: ../src/guestfs-actions.pod:5630
16667 " guestfs_set_e2uuid (guestfs_h *g,\n"
16668 " const char *device,\n"
16669 " const char *uuid);\n"
16675 #: ../src/guestfs-actions.pod:5635 ../fish/guestfish-actions.pod:3766
16677 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
16678 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
16679 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
16684 #: ../src/guestfs-actions.pod:5640
16686 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
16687 "the existing UUID of a filesystem."
16692 #: ../src/guestfs-actions.pod:5647
16693 msgid "guestfs_set_memsize"
16698 #: ../src/guestfs-actions.pod:5649
16702 " guestfs_set_memsize (guestfs_h *g,\n"
16709 #: ../src/guestfs-actions.pod:5653
16711 "This sets the memory size in megabytes allocated to the qemu subprocess. "
16712 "This only has any effect if called before C<guestfs_launch>."
16717 #: ../src/guestfs-actions.pod:5657 ../fish/guestfish-actions.pod:3784
16719 "You can also change this by setting the environment variable "
16720 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
16725 #: ../src/guestfs-actions.pod:5668
16726 msgid "guestfs_set_network"
16731 #: ../src/guestfs-actions.pod:5670
16735 " guestfs_set_network (guestfs_h *g,\n"
16742 #: ../src/guestfs-actions.pod:5674 ../fish/guestfish-actions.pod:3797
16744 "If C<network> is true, then the network is enabled in the libguestfs "
16745 "appliance. The default is false."
16750 #: ../src/guestfs-actions.pod:5677 ../fish/guestfish-actions.pod:3800
16752 "This affects whether commands are able to access the network (see L<guestfs"
16753 "(3)/RUNNING COMMANDS>)."
16758 #: ../src/guestfs-actions.pod:5680
16760 "You must call this before calling C<guestfs_launch>, otherwise it has no "
16766 #: ../src/guestfs-actions.pod:5687
16767 msgid "guestfs_set_path"
16772 #: ../src/guestfs-actions.pod:5689
16776 " guestfs_set_path (guestfs_h *g,\n"
16777 " const char *searchpath);\n"
16783 #: ../src/guestfs-actions.pod:5693 ../fish/guestfish-actions.pod:3812
16784 msgid "Set the path that libguestfs searches for kernel and initrd.img."
16789 #: ../src/guestfs-actions.pod:5695 ../fish/guestfish-actions.pod:3814
16791 "The default is C<$libdir/guestfs> unless overridden by setting "
16792 "C<LIBGUESTFS_PATH> environment variable."
16797 #: ../src/guestfs-actions.pod:5698 ../fish/guestfish-actions.pod:3817
16798 msgid "Setting C<path> to C<NULL> restores the default path."
16803 #: ../src/guestfs-actions.pod:5704
16804 msgid "guestfs_set_qemu"
16809 #: ../src/guestfs-actions.pod:5706
16813 " guestfs_set_qemu (guestfs_h *g,\n"
16814 " const char *qemu);\n"
16820 #: ../src/guestfs-actions.pod:5710 ../fish/guestfish-actions.pod:3825
16821 msgid "Set the qemu binary that we will use."
16826 #: ../src/guestfs-actions.pod:5712 ../fish/guestfish-actions.pod:3827
16828 "The default is chosen when the library was compiled by the configure script."
16833 #: ../src/guestfs-actions.pod:5715 ../fish/guestfish-actions.pod:3830
16835 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
16841 #: ../src/guestfs-actions.pod:5718 ../fish/guestfish-actions.pod:3833
16842 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
16847 #: ../src/guestfs-actions.pod:5720 ../fish/guestfish-actions.pod:3835
16849 "Note that you should call this function as early as possible after creating "
16850 "the handle. This is because some pre-launch operations depend on testing "
16851 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
16852 "don't retest features, and so you might see inconsistent results. Using the "
16853 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
16854 "the qemu binary at the same time as the handle is created."
16859 #: ../src/guestfs-actions.pod:5732
16860 msgid "guestfs_set_recovery_proc"
16865 #: ../src/guestfs-actions.pod:5734
16869 " guestfs_set_recovery_proc (guestfs_h *g,\n"
16870 " int recoveryproc);\n"
16876 #: ../src/guestfs-actions.pod:5738
16878 "If this is called with the parameter C<false> then C<guestfs_launch> does "
16879 "not create a recovery process. The purpose of the recovery process is to "
16880 "stop runaway qemu processes in the case where the main program aborts "
16886 #: ../src/guestfs-actions.pod:5743
16888 "This only has any effect if called before C<guestfs_launch>, and the default "
16894 #: ../src/guestfs-actions.pod:5746 ../fish/guestfish-actions.pod:3857
16896 "About the only time when you would want to disable this is if the main "
16897 "process will fork itself into the background (\"daemonize\" itself). In "
16898 "this case the recovery process thinks that the main program has disappeared "
16899 "and so kills qemu, which is not very helpful."
16904 #: ../src/guestfs-actions.pod:5756
16905 msgid "guestfs_set_selinux"
16910 #: ../src/guestfs-actions.pod:5758
16914 " guestfs_set_selinux (guestfs_h *g,\n"
16921 #: ../src/guestfs-actions.pod:5762 ../fish/guestfish-actions.pod:3869
16923 "This sets the selinux flag that is passed to the appliance at boot time. "
16924 "The default is C<selinux=0> (disabled)."
16929 #: ../src/guestfs-actions.pod:5765 ../fish/guestfish-actions.pod:3872
16931 "Note that if SELinux is enabled, it is always in Permissive mode "
16932 "(C<enforcing=0>)."
16937 #: ../src/guestfs-actions.pod:5775
16938 msgid "guestfs_set_trace"
16943 #: ../src/guestfs-actions.pod:5777
16947 " guestfs_set_trace (guestfs_h *g,\n"
16954 #: ../src/guestfs-actions.pod:5781 ../fish/guestfish-actions.pod:3884
16956 "If the command trace flag is set to 1, then commands are printed on stderr "
16957 "before they are executed in a format which is very similar to the one used "
16958 "by guestfish. In other words, you can run a program with this enabled, and "
16959 "you will get out a script which you can feed to guestfish to perform the "
16960 "same set of actions."
16965 #: ../src/guestfs-actions.pod:5788 ../fish/guestfish-actions.pod:3891
16967 "If you want to trace C API calls into libguestfs (and other libraries) then "
16968 "possibly a better way is to use the external ltrace(1) command."
16973 #: ../src/guestfs-actions.pod:5792 ../fish/guestfish-actions.pod:3895
16975 "Command traces are disabled unless the environment variable "
16976 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
16981 #: ../src/guestfs-actions.pod:5799
16982 msgid "guestfs_set_verbose"
16987 #: ../src/guestfs-actions.pod:5801
16991 " guestfs_set_verbose (guestfs_h *g,\n"
16998 #: ../src/guestfs-actions.pod:5805 ../fish/guestfish-actions.pod:3904
16999 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
17004 #: ../src/guestfs-actions.pod:5807 ../fish/guestfish-actions.pod:3906
17006 "Verbose messages are disabled unless the environment variable "
17007 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
17012 #: ../src/guestfs-actions.pod:5814
17013 msgid "guestfs_setcon"
17018 #: ../src/guestfs-actions.pod:5816
17022 " guestfs_setcon (guestfs_h *g,\n"
17023 " const char *context);\n"
17029 #: ../src/guestfs-actions.pod:5820 ../fish/guestfish-actions.pod:3913
17031 "This sets the SELinux security context of the daemon to the string "
17037 #: ../src/guestfs-actions.pod:5823 ../fish/guestfish-actions.pod:3916
17038 msgid "See the documentation about SELINUX in L<guestfs(3)>."
17043 #: ../src/guestfs-actions.pod:5829
17044 msgid "guestfs_setxattr"
17049 #: ../src/guestfs-actions.pod:5831
17053 " guestfs_setxattr (guestfs_h *g,\n"
17054 " const char *xattr,\n"
17055 " const char *val,\n"
17057 " const char *path);\n"
17063 #: ../src/guestfs-actions.pod:5838 ../fish/guestfish-actions.pod:3922
17065 "This call sets the extended attribute named C<xattr> of the file C<path> to "
17066 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
17071 #: ../src/guestfs-actions.pod:5842
17072 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
17077 #: ../src/guestfs-actions.pod:5848
17078 msgid "guestfs_sfdisk"
17083 #: ../src/guestfs-actions.pod:5850
17087 " guestfs_sfdisk (guestfs_h *g,\n"
17088 " const char *device,\n"
17092 " char *const *lines);\n"
17098 #: ../src/guestfs-actions.pod:5858 ../fish/guestfish-actions.pod:3932
17100 "This is a direct interface to the L<sfdisk(8)> program for creating "
17101 "partitions on block devices."
17106 #: ../src/guestfs-actions.pod:5861 ../fish/guestfish-actions.pod:3935
17107 msgid "C<device> should be a block device, for example C</dev/sda>."
17112 #: ../src/guestfs-actions.pod:5863 ../fish/guestfish-actions.pod:3937
17114 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
17115 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
17116 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
17117 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
17118 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
17119 "the kernel) cannot work out the right geometry and you will need to tell it."
17124 #: ../src/guestfs-actions.pod:5871 ../fish/guestfish-actions.pod:3945
17126 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
17127 "refer to the L<sfdisk(8)> manpage."
17132 #: ../src/guestfs-actions.pod:5874 ../fish/guestfish-actions.pod:3948
17134 "To create a single partition occupying the whole disk, you would pass "
17135 "C<lines> as a single element list, when the single element being the string "
17141 #: ../src/guestfs-actions.pod:5878
17143 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
17148 #: ../src/guestfs-actions.pod:5888
17149 msgid "guestfs_sfdiskM"
17154 #: ../src/guestfs-actions.pod:5890
17158 " guestfs_sfdiskM (guestfs_h *g,\n"
17159 " const char *device,\n"
17160 " char *const *lines);\n"
17166 #: ../src/guestfs-actions.pod:5895
17168 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
17169 "partition sizes are specified in megabytes only (rounded to the nearest "
17170 "cylinder) and you don't need to specify the cyls, heads and sectors "
17171 "parameters which were rarely if ever used anyway."
17176 #: ../src/guestfs-actions.pod:5901
17178 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
17179 "C<guestfs_part_disk>"
17184 #: ../src/guestfs-actions.pod:5911
17185 msgid "guestfs_sfdisk_N"
17190 #: ../src/guestfs-actions.pod:5913
17194 " guestfs_sfdisk_N (guestfs_h *g,\n"
17195 " const char *device,\n"
17200 " const char *line);\n"
17206 #: ../src/guestfs-actions.pod:5922 ../fish/guestfish-actions.pod:3978
17208 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
17209 "(note: C<n> counts from 1)."
17214 #: ../src/guestfs-actions.pod:5925
17216 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
17217 "for the cyls/heads/sectors parameters."
17222 #: ../src/guestfs-actions.pod:5928
17223 msgid "See also: C<guestfs_part_add>"
17228 #: ../src/guestfs-actions.pod:5937
17229 msgid "guestfs_sfdisk_disk_geometry"
17234 #: ../src/guestfs-actions.pod:5939
17238 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
17239 " const char *device);\n"
17245 #: ../src/guestfs-actions.pod:5943
17247 "This displays the disk geometry of C<device> read from the partition table. "
17248 "Especially in the case where the underlying block device has been resized, "
17249 "this can be different from the kernel's idea of the geometry (see "
17250 "C<guestfs_sfdisk_kernel_geometry>)."
17255 #: ../src/guestfs-actions.pod:5948 ../src/guestfs-actions.pod:5964
17256 #: ../fish/guestfish-actions.pod:3998 ../fish/guestfish-actions.pod:4007
17257 msgid "The result is in human-readable format, and not designed to be parsed."
17262 #: ../src/guestfs-actions.pod:5956
17263 msgid "guestfs_sfdisk_kernel_geometry"
17268 #: ../src/guestfs-actions.pod:5958
17272 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
17273 " const char *device);\n"
17279 #: ../src/guestfs-actions.pod:5962 ../fish/guestfish-actions.pod:4005
17280 msgid "This displays the kernel's idea of the geometry of C<device>."
17285 #: ../src/guestfs-actions.pod:5972
17286 msgid "guestfs_sfdisk_l"
17291 #: ../src/guestfs-actions.pod:5974
17295 " guestfs_sfdisk_l (guestfs_h *g,\n"
17296 " const char *device);\n"
17302 #: ../src/guestfs-actions.pod:5978 ../fish/guestfish-actions.pod:4014
17304 "This displays the partition table on C<device>, in the human-readable output "
17305 "of the L<sfdisk(8)> command. It is not intended to be parsed."
17310 #: ../src/guestfs-actions.pod:5982
17311 msgid "See also: C<guestfs_part_list>"
17316 #: ../src/guestfs-actions.pod:5989
17322 #: ../src/guestfs-actions.pod:5991
17326 " guestfs_sh (guestfs_h *g,\n"
17327 " const char *command);\n"
17333 #: ../src/guestfs-actions.pod:5995 ../fish/guestfish-actions.pod:4024
17335 "This call runs a command from the guest filesystem via the guest's C</bin/"
17341 #: ../src/guestfs-actions.pod:5998
17342 msgid "This is like C<guestfs_command>, but passes the command to:"
17347 #: ../src/guestfs-actions.pod:6000 ../fish/guestfish-actions.pod:4029
17350 " /bin/sh -c \"command\"\n"
17356 #: ../src/guestfs-actions.pod:6002 ../fish/guestfish-actions.pod:4031
17358 "Depending on the guest's shell, this usually results in wildcards being "
17359 "expanded, shell expressions being interpolated and so on."
17364 #: ../src/guestfs-actions.pod:6006
17365 msgid "All the provisos about C<guestfs_command> apply to this call."
17370 #: ../src/guestfs-actions.pod:6013
17371 msgid "guestfs_sh_lines"
17376 #: ../src/guestfs-actions.pod:6015
17380 " guestfs_sh_lines (guestfs_h *g,\n"
17381 " const char *command);\n"
17387 #: ../src/guestfs-actions.pod:6019
17389 "This is the same as C<guestfs_sh>, but splits the result into a list of "
17395 #: ../src/guestfs-actions.pod:6022
17396 msgid "See also: C<guestfs_command_lines>"
17401 #: ../src/guestfs-actions.pod:6030
17402 msgid "guestfs_sleep"
17407 #: ../src/guestfs-actions.pod:6032
17411 " guestfs_sleep (guestfs_h *g,\n"
17418 #: ../src/guestfs-actions.pod:6036 ../fish/guestfish-actions.pod:4050
17419 msgid "Sleep for C<secs> seconds."
17424 #: ../src/guestfs-actions.pod:6040
17425 msgid "(Added in 1.0.41)"
17430 #: ../src/guestfs-actions.pod:6042 ../src/guestfs-structs.pod:109
17431 msgid "guestfs_stat"
17436 #: ../src/guestfs-actions.pod:6044
17439 " struct guestfs_stat *\n"
17440 " guestfs_stat (guestfs_h *g,\n"
17441 " const char *path);\n"
17447 #: ../src/guestfs-actions.pod:6050 ../fish/guestfish-actions.pod:4058
17448 msgid "This is the same as the C<stat(2)> system call."
17453 #: ../src/guestfs-actions.pod:6058 ../src/guestfs-structs.pod:135
17454 msgid "guestfs_statvfs"
17459 #: ../src/guestfs-actions.pod:6060
17462 " struct guestfs_statvfs *\n"
17463 " guestfs_statvfs (guestfs_h *g,\n"
17464 " const char *path);\n"
17470 #: ../src/guestfs-actions.pod:6064 ../fish/guestfish-actions.pod:4064
17472 "Returns file system statistics for any mounted file system. C<path> should "
17473 "be a file or directory in the mounted file system (typically it is the mount "
17474 "point itself, but it doesn't need to be)."
17479 #: ../src/guestfs-actions.pod:6068 ../fish/guestfish-actions.pod:4068
17480 msgid "This is the same as the C<statvfs(2)> system call."
17485 #: ../src/guestfs-actions.pod:6070
17487 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
17488 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
17493 #: ../src/guestfs-actions.pod:6076
17494 msgid "guestfs_strings"
17499 #: ../src/guestfs-actions.pod:6078
17503 " guestfs_strings (guestfs_h *g,\n"
17504 " const char *path);\n"
17510 #: ../src/guestfs-actions.pod:6082 ../fish/guestfish-actions.pod:4074
17512 "This runs the L<strings(1)> command on a file and returns the list of "
17513 "printable strings found."
17518 #: ../src/guestfs-actions.pod:6094
17519 msgid "guestfs_strings_e"
17524 #: ../src/guestfs-actions.pod:6096
17528 " guestfs_strings_e (guestfs_h *g,\n"
17529 " const char *encoding,\n"
17530 " const char *path);\n"
17536 #: ../src/guestfs-actions.pod:6101
17538 "This is like the C<guestfs_strings> command, but allows you to specify the "
17539 "encoding of strings that are looked for in the source file C<path>."
17544 #: ../src/guestfs-actions.pod:6105 ../fish/guestfish-actions.pod:4088
17545 msgid "Allowed encodings are:"
17550 #: ../src/guestfs-actions.pod:6109 ../fish/guestfish-actions.pod:4092
17556 #: ../src/guestfs-actions.pod:6111
17558 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
17559 "ISO-8859-X (this is what C<guestfs_strings> uses)."
17564 #: ../src/guestfs-actions.pod:6114 ../fish/guestfish-actions.pod:4097
17570 #: ../src/guestfs-actions.pod:6116 ../fish/guestfish-actions.pod:4099
17571 msgid "Single 8-bit-byte characters."
17576 #: ../src/guestfs-actions.pod:6118 ../fish/guestfish-actions.pod:4101
17582 #: ../src/guestfs-actions.pod:6120 ../fish/guestfish-actions.pod:4103
17583 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
17588 #: ../src/guestfs-actions.pod:6123 ../fish/guestfish-actions.pod:4106
17589 msgid "l (lower case letter L)"
17594 #: ../src/guestfs-actions.pod:6125 ../fish/guestfish-actions.pod:4108
17596 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
17597 "examining binaries in Windows guests."
17602 #: ../src/guestfs-actions.pod:6128 ../fish/guestfish-actions.pod:4111
17608 #: ../src/guestfs-actions.pod:6130 ../fish/guestfish-actions.pod:4113
17609 msgid "32-bit big endian such as UCS-4BE."
17614 #: ../src/guestfs-actions.pod:6132 ../fish/guestfish-actions.pod:4115
17620 #: ../src/guestfs-actions.pod:6134 ../fish/guestfish-actions.pod:4117
17621 msgid "32-bit little endian such as UCS-4LE."
17626 #: ../src/guestfs-actions.pod:6138 ../fish/guestfish-actions.pod:4121
17627 msgid "The returned strings are transcoded to UTF-8."
17632 #: ../src/guestfs-actions.pod:6149
17633 msgid "guestfs_swapoff_device"
17638 #: ../src/guestfs-actions.pod:6151
17642 " guestfs_swapoff_device (guestfs_h *g,\n"
17643 " const char *device);\n"
17649 #: ../src/guestfs-actions.pod:6155
17651 "This command disables the libguestfs appliance swap device or partition "
17652 "named C<device>. See C<guestfs_swapon_device>."
17657 #: ../src/guestfs-actions.pod:6163
17658 msgid "guestfs_swapoff_file"
17663 #: ../src/guestfs-actions.pod:6165
17667 " guestfs_swapoff_file (guestfs_h *g,\n"
17668 " const char *file);\n"
17674 #: ../src/guestfs-actions.pod:6169 ../fish/guestfish-actions.pod:4138
17675 msgid "This command disables the libguestfs appliance swap on file."
17680 #: ../src/guestfs-actions.pod:6175
17681 msgid "guestfs_swapoff_label"
17686 #: ../src/guestfs-actions.pod:6177
17690 " guestfs_swapoff_label (guestfs_h *g,\n"
17691 " const char *label);\n"
17697 #: ../src/guestfs-actions.pod:6181 ../fish/guestfish-actions.pod:4144
17699 "This command disables the libguestfs appliance swap on labeled swap "
17705 #: ../src/guestfs-actions.pod:6188
17706 msgid "guestfs_swapoff_uuid"
17711 #: ../src/guestfs-actions.pod:6190
17715 " guestfs_swapoff_uuid (guestfs_h *g,\n"
17716 " const char *uuid);\n"
17722 #: ../src/guestfs-actions.pod:6194 ../fish/guestfish-actions.pod:4151
17724 "This command disables the libguestfs appliance swap partition with the given "
17730 #: ../src/guestfs-actions.pod:6201
17731 msgid "guestfs_swapon_device"
17736 #: ../src/guestfs-actions.pod:6203
17740 " guestfs_swapon_device (guestfs_h *g,\n"
17741 " const char *device);\n"
17747 #: ../src/guestfs-actions.pod:6207
17749 "This command enables the libguestfs appliance to use the swap device or "
17750 "partition named C<device>. The increased memory is made available for all "
17751 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
17756 #: ../src/guestfs-actions.pod:6212 ../fish/guestfish-actions.pod:4163
17758 "Note that you should not swap to existing guest swap partitions unless you "
17759 "know what you are doing. They may contain hibernation information, or other "
17760 "information that the guest doesn't want you to trash. You also risk leaking "
17761 "information about the host to the guest this way. Instead, attach a new "
17762 "host device to the guest and swap on that."
17767 #: ../src/guestfs-actions.pod:6223
17768 msgid "guestfs_swapon_file"
17773 #: ../src/guestfs-actions.pod:6225
17777 " guestfs_swapon_file (guestfs_h *g,\n"
17778 " const char *file);\n"
17784 #: ../src/guestfs-actions.pod:6229
17786 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
17792 #: ../src/guestfs-actions.pod:6236
17793 msgid "guestfs_swapon_label"
17798 #: ../src/guestfs-actions.pod:6238
17802 " guestfs_swapon_label (guestfs_h *g,\n"
17803 " const char *label);\n"
17809 #: ../src/guestfs-actions.pod:6242
17811 "This command enables swap to a labeled swap partition. See "
17812 "C<guestfs_swapon_device> for other notes."
17817 #: ../src/guestfs-actions.pod:6249
17818 msgid "guestfs_swapon_uuid"
17823 #: ../src/guestfs-actions.pod:6251
17827 " guestfs_swapon_uuid (guestfs_h *g,\n"
17828 " const char *uuid);\n"
17834 #: ../src/guestfs-actions.pod:6255
17836 "This command enables swap to a swap partition with the given UUID. See "
17837 "C<guestfs_swapon_device> for other notes."
17842 #: ../src/guestfs-actions.pod:6262
17843 msgid "guestfs_sync"
17848 #: ../src/guestfs-actions.pod:6264
17852 " guestfs_sync (guestfs_h *g);\n"
17858 #: ../src/guestfs-actions.pod:6267 ../fish/guestfish-actions.pod:4195
17860 "This syncs the disk, so that any writes are flushed through to the "
17861 "underlying disk image."
17866 #: ../src/guestfs-actions.pod:6270 ../fish/guestfish-actions.pod:4198
17868 "You should always call this if you have modified a disk image, before "
17869 "closing the handle."
17874 #: ../src/guestfs-actions.pod:6277
17875 msgid "guestfs_tail"
17880 #: ../src/guestfs-actions.pod:6279
17884 " guestfs_tail (guestfs_h *g,\n"
17885 " const char *path);\n"
17891 #: ../src/guestfs-actions.pod:6283 ../fish/guestfish-actions.pod:4205
17893 "This command returns up to the last 10 lines of a file as a list of strings."
17898 #: ../src/guestfs-actions.pod:6295
17899 msgid "guestfs_tail_n"
17904 #: ../src/guestfs-actions.pod:6297
17908 " guestfs_tail_n (guestfs_h *g,\n"
17910 " const char *path);\n"
17916 #: ../src/guestfs-actions.pod:6302 ../fish/guestfish-actions.pod:4215
17918 "If the parameter C<nrlines> is a positive number, this returns the last "
17919 "C<nrlines> lines of the file C<path>."
17924 #: ../src/guestfs-actions.pod:6305 ../fish/guestfish-actions.pod:4218
17926 "If the parameter C<nrlines> is a negative number, this returns lines from "
17927 "the file C<path>, starting with the C<-nrlines>th line."
17932 #: ../src/guestfs-actions.pod:6319
17933 msgid "guestfs_tar_in"
17938 #: ../src/guestfs-actions.pod:6321
17942 " guestfs_tar_in (guestfs_h *g,\n"
17943 " const char *tarfile,\n"
17944 " const char *directory);\n"
17950 #: ../src/guestfs-actions.pod:6326 ../fish/guestfish-actions.pod:4230
17952 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
17953 "tar file) into C<directory>."
17958 #: ../src/guestfs-actions.pod:6329
17960 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
17965 #: ../src/guestfs-actions.pod:6334 ../src/guestfs-actions.pod:6351
17966 #: ../src/guestfs-actions.pod:6367 ../src/guestfs-actions.pod:6383
17967 msgid "(Added in 1.0.3)"
17972 #: ../src/guestfs-actions.pod:6336
17973 msgid "guestfs_tar_out"
17978 #: ../src/guestfs-actions.pod:6338
17982 " guestfs_tar_out (guestfs_h *g,\n"
17983 " const char *directory,\n"
17984 " const char *tarfile);\n"
17990 #: ../src/guestfs-actions.pod:6343 ../fish/guestfish-actions.pod:4242
17992 "This command packs the contents of C<directory> and downloads it to local "
17998 #: ../src/guestfs-actions.pod:6346
18000 "To download a compressed tarball, use C<guestfs_tgz_out> or "
18001 "C<guestfs_txz_out>."
18006 #: ../src/guestfs-actions.pod:6353
18007 msgid "guestfs_tgz_in"
18012 #: ../src/guestfs-actions.pod:6355
18016 " guestfs_tgz_in (guestfs_h *g,\n"
18017 " const char *tarball,\n"
18018 " const char *directory);\n"
18024 #: ../src/guestfs-actions.pod:6360 ../fish/guestfish-actions.pod:4254
18026 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
18027 "tar file) into C<directory>."
18032 #: ../src/guestfs-actions.pod:6363
18033 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
18038 #: ../src/guestfs-actions.pod:6369
18039 msgid "guestfs_tgz_out"
18044 #: ../src/guestfs-actions.pod:6371
18048 " guestfs_tgz_out (guestfs_h *g,\n"
18049 " const char *directory,\n"
18050 " const char *tarball);\n"
18056 #: ../src/guestfs-actions.pod:6376 ../fish/guestfish-actions.pod:4265
18058 "This command packs the contents of C<directory> and downloads it to local "
18064 #: ../src/guestfs-actions.pod:6379
18065 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
18070 #: ../src/guestfs-actions.pod:6385
18071 msgid "guestfs_touch"
18076 #: ../src/guestfs-actions.pod:6387
18080 " guestfs_touch (guestfs_h *g,\n"
18081 " const char *path);\n"
18087 #: ../src/guestfs-actions.pod:6391 ../fish/guestfish-actions.pod:4276
18089 "Touch acts like the L<touch(1)> command. It can be used to update the "
18090 "timestamps on a file, or, if the file does not exist, to create a new zero-"
18096 #: ../src/guestfs-actions.pod:6395 ../fish/guestfish-actions.pod:4280
18098 "This command only works on regular files, and will fail on other file types "
18099 "such as directories, symbolic links, block special etc."
18104 #: ../src/guestfs-actions.pod:6402
18105 msgid "guestfs_truncate"
18110 #: ../src/guestfs-actions.pod:6404
18114 " guestfs_truncate (guestfs_h *g,\n"
18115 " const char *path);\n"
18121 #: ../src/guestfs-actions.pod:6408 ../fish/guestfish-actions.pod:4287
18123 "This command truncates C<path> to a zero-length file. The file must exist "
18129 #: ../src/guestfs-actions.pod:6415
18130 msgid "guestfs_truncate_size"
18135 #: ../src/guestfs-actions.pod:6417
18139 " guestfs_truncate_size (guestfs_h *g,\n"
18140 " const char *path,\n"
18141 " int64_t size);\n"
18147 #: ../src/guestfs-actions.pod:6422 ../fish/guestfish-actions.pod:4294
18149 "This command truncates C<path> to size C<size> bytes. The file must exist "
18155 #: ../src/guestfs-actions.pod:6425
18157 "If the current file size is less than C<size> then the file is extended to "
18158 "the required size with zero bytes. This creates a sparse file (ie. disk "
18159 "blocks are not allocated for the file until you write to it). To create a "
18160 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
18165 #: ../src/guestfs-actions.pod:6435
18166 msgid "guestfs_tune2fs_l"
18171 #: ../src/guestfs-actions.pod:6437
18175 " guestfs_tune2fs_l (guestfs_h *g,\n"
18176 " const char *device);\n"
18182 #: ../src/guestfs-actions.pod:6441 ../fish/guestfish-actions.pod:4307
18184 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
18190 #: ../src/guestfs-actions.pod:6444 ../fish/guestfish-actions.pod:4310
18192 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
18193 "for more details. The list of fields returned isn't clearly defined, and "
18194 "depends on both the version of C<tune2fs> that libguestfs was built against, "
18195 "and the filesystem itself."
18200 #: ../src/guestfs-actions.pod:6457
18201 msgid "guestfs_txz_in"
18206 #: ../src/guestfs-actions.pod:6459
18210 " guestfs_txz_in (guestfs_h *g,\n"
18211 " const char *tarball,\n"
18212 " const char *directory);\n"
18218 #: ../src/guestfs-actions.pod:6464 ../fish/guestfish-actions.pod:4319
18220 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
18221 "tar file) into C<directory>."
18226 #: ../src/guestfs-actions.pod:6471
18227 msgid "guestfs_txz_out"
18232 #: ../src/guestfs-actions.pod:6473
18236 " guestfs_txz_out (guestfs_h *g,\n"
18237 " const char *directory,\n"
18238 " const char *tarball);\n"
18244 #: ../src/guestfs-actions.pod:6478 ../fish/guestfish-actions.pod:4328
18246 "This command packs the contents of C<directory> and downloads it to local "
18247 "file C<tarball> (as an xz compressed tar archive)."
18252 #: ../src/guestfs-actions.pod:6485
18253 msgid "guestfs_umask"
18258 #: ../src/guestfs-actions.pod:6487
18262 " guestfs_umask (guestfs_h *g,\n"
18269 #: ../src/guestfs-actions.pod:6491 ../fish/guestfish-actions.pod:4337
18271 "This function sets the mask used for creating new files and device nodes to "
18277 #: ../src/guestfs-actions.pod:6494 ../fish/guestfish-actions.pod:4340
18279 "Typical umask values would be C<022> which creates new files with "
18280 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
18281 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
18286 #: ../src/guestfs-actions.pod:6499 ../fish/guestfish-actions.pod:4345
18288 "The default umask is C<022>. This is important because it means that "
18289 "directories and device nodes will be created with C<0644> or C<0755> mode "
18290 "even if you specify C<0777>."
18295 #: ../src/guestfs-actions.pod:6503
18297 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
18298 "C<guestfs_mkdir>."
18303 #: ../src/guestfs-actions.pod:6506 ../fish/guestfish-actions.pod:4352
18304 msgid "This call returns the previous umask."
18309 #: ../src/guestfs-actions.pod:6512
18310 msgid "guestfs_umount"
18315 #: ../src/guestfs-actions.pod:6514
18319 " guestfs_umount (guestfs_h *g,\n"
18320 " const char *pathordevice);\n"
18326 #: ../src/guestfs-actions.pod:6518 ../fish/guestfish-actions.pod:4360
18328 "This unmounts the given filesystem. The filesystem may be specified either "
18329 "by its mountpoint (path) or the device which contains the filesystem."
18334 #: ../src/guestfs-actions.pod:6526
18335 msgid "guestfs_umount_all"
18340 #: ../src/guestfs-actions.pod:6528
18344 " guestfs_umount_all (guestfs_h *g);\n"
18350 #: ../src/guestfs-actions.pod:6531 ../fish/guestfish-actions.pod:4370
18351 msgid "This unmounts all mounted filesystems."
18356 #: ../src/guestfs-actions.pod:6533 ../fish/guestfish-actions.pod:4372
18357 msgid "Some internal mounts are not unmounted by this call."
18362 #: ../src/guestfs-actions.pod:6539
18363 msgid "guestfs_upload"
18368 #: ../src/guestfs-actions.pod:6541
18372 " guestfs_upload (guestfs_h *g,\n"
18373 " const char *filename,\n"
18374 " const char *remotefilename);\n"
18380 #: ../src/guestfs-actions.pod:6546 ../src/guestfs-actions.pod:6570
18381 #: ../fish/guestfish-actions.pod:4378 ../fish/guestfish-actions.pod:4391
18382 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
18387 #: ../src/guestfs-actions.pod:6551
18388 msgid "See also C<guestfs_download>."
18393 #: ../src/guestfs-actions.pod:6562
18394 msgid "guestfs_upload_offset"
18399 #: ../src/guestfs-actions.pod:6564
18403 " guestfs_upload_offset (guestfs_h *g,\n"
18404 " const char *filename,\n"
18405 " const char *remotefilename,\n"
18406 " int64_t offset);\n"
18412 #: ../src/guestfs-actions.pod:6573 ../fish/guestfish-actions.pod:4394
18414 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
18415 "The intention is to overwrite parts of existing files or devices, although "
18416 "if a non-existant file is specified then it is created with a \"hole\" "
18417 "before C<offset>. The size of the data written is implicit in the size of "
18418 "the source C<filename>."
18423 #: ../src/guestfs-actions.pod:6580
18425 "Note that there is no limit on the amount of data that can be uploaded with "
18426 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
18427 "full amount unless an error occurs."
18432 #: ../src/guestfs-actions.pod:6585
18433 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
18438 #: ../src/guestfs-actions.pod:6596
18439 msgid "guestfs_utimens"
18444 #: ../src/guestfs-actions.pod:6598
18448 " guestfs_utimens (guestfs_h *g,\n"
18449 " const char *path,\n"
18450 " int64_t atsecs,\n"
18451 " int64_t atnsecs,\n"
18452 " int64_t mtsecs,\n"
18453 " int64_t mtnsecs);\n"
18459 #: ../src/guestfs-actions.pod:6606 ../fish/guestfish-actions.pod:4414
18460 msgid "This command sets the timestamps of a file with nanosecond precision."
18465 #: ../src/guestfs-actions.pod:6609 ../fish/guestfish-actions.pod:4417
18467 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
18473 #: ../src/guestfs-actions.pod:6612 ../fish/guestfish-actions.pod:4420
18475 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
18476 "nanoseconds from the epoch."
18481 #: ../src/guestfs-actions.pod:6615 ../fish/guestfish-actions.pod:4423
18483 "If the C<*nsecs> field contains the special value C<-1> then the "
18484 "corresponding timestamp is set to the current time. (The C<*secs> field is "
18485 "ignored in this case)."
18490 #: ../src/guestfs-actions.pod:6619 ../fish/guestfish-actions.pod:4427
18492 "If the C<*nsecs> field contains the special value C<-2> then the "
18493 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
18499 #: ../src/guestfs-actions.pod:6627 ../src/guestfs-structs.pod:175
18500 msgid "guestfs_version"
18505 #: ../src/guestfs-actions.pod:6629
18508 " struct guestfs_version *\n"
18509 " guestfs_version (guestfs_h *g);\n"
18515 #: ../src/guestfs-actions.pod:6632 ../fish/guestfish-actions.pod:4435
18517 "Return the libguestfs version number that the program is linked against."
18522 #: ../src/guestfs-actions.pod:6635 ../fish/guestfish-actions.pod:4438
18524 "Note that because of dynamic linking this is not necessarily the version of "
18525 "libguestfs that you compiled against. You can compile the program, and then "
18526 "at runtime dynamically link against a completely different C<libguestfs.so> "
18532 #: ../src/guestfs-actions.pod:6640 ../fish/guestfish-actions.pod:4443
18534 "This call was added in version C<1.0.58>. In previous versions of "
18535 "libguestfs there was no way to get the version number. From C code you can "
18536 "use dynamic linker functions to find out if this symbol exists (if it "
18537 "doesn't, then it's an earlier version)."
18542 #: ../src/guestfs-actions.pod:6646 ../fish/guestfish-actions.pod:4449
18544 "The call returns a structure with four elements. The first three (C<major>, "
18545 "C<minor> and C<release>) are numbers and correspond to the usual version "
18546 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
18547 "but may be used for distro-specific information."
18552 #: ../src/guestfs-actions.pod:6652 ../fish/guestfish-actions.pod:4455
18554 "To construct the original version string: C<$major.$minor.$release$extra>"
18559 #: ../src/guestfs-actions.pod:6655 ../fish/guestfish-actions.pod:4458
18560 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
18565 #: ../src/guestfs-actions.pod:6657
18567 "I<Note:> Don't use this call to test for availability of features. In "
18568 "enterprise distributions we backport features from later versions into "
18569 "earlier versions, making this an unreliable way to test for features. Use "
18570 "C<guestfs_available> instead."
18575 #: ../src/guestfs-actions.pod:6663
18577 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
18578 "error. I<The caller must call C<guestfs_free_version> after use>."
18583 #: ../src/guestfs-actions.pod:6667
18584 msgid "(Added in 1.0.58)"
18589 #: ../src/guestfs-actions.pod:6669
18590 msgid "guestfs_vfs_label"
18595 #: ../src/guestfs-actions.pod:6671
18599 " guestfs_vfs_label (guestfs_h *g,\n"
18600 " const char *device);\n"
18606 #: ../src/guestfs-actions.pod:6675 ../fish/guestfish-actions.pod:4470
18607 msgid "This returns the filesystem label of the filesystem on C<device>."
18612 #: ../src/guestfs-actions.pod:6678 ../fish/guestfish-actions.pod:4473
18613 msgid "If the filesystem is unlabeled, this returns the empty string."
18618 #: ../src/guestfs-actions.pod:6680
18619 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
18624 #: ../src/guestfs-actions.pod:6685 ../src/guestfs-actions.pod:6722
18625 msgid "(Added in 1.3.18)"
18630 #: ../src/guestfs-actions.pod:6687
18631 msgid "guestfs_vfs_type"
18636 #: ../src/guestfs-actions.pod:6689
18640 " guestfs_vfs_type (guestfs_h *g,\n"
18641 " const char *device);\n"
18647 #: ../src/guestfs-actions.pod:6693 ../fish/guestfish-actions.pod:4481
18649 "This command gets the filesystem type corresponding to the filesystem on "
18655 #: ../src/guestfs-actions.pod:6696 ../fish/guestfish-actions.pod:4484
18657 "For most filesystems, the result is the name of the Linux VFS module which "
18658 "would be used to mount this filesystem if you mounted it without specifying "
18659 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
18664 #: ../src/guestfs-actions.pod:6706
18665 msgid "guestfs_vfs_uuid"
18670 #: ../src/guestfs-actions.pod:6708
18674 " guestfs_vfs_uuid (guestfs_h *g,\n"
18675 " const char *device);\n"
18681 #: ../src/guestfs-actions.pod:6712 ../fish/guestfish-actions.pod:4493
18682 msgid "This returns the filesystem UUID of the filesystem on C<device>."
18687 #: ../src/guestfs-actions.pod:6715 ../fish/guestfish-actions.pod:4496
18688 msgid "If the filesystem does not have a UUID, this returns the empty string."
18693 #: ../src/guestfs-actions.pod:6717
18694 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
18699 #: ../src/guestfs-actions.pod:6724
18700 msgid "guestfs_vg_activate"
18705 #: ../src/guestfs-actions.pod:6726
18709 " guestfs_vg_activate (guestfs_h *g,\n"
18711 " char *const *volgroups);\n"
18717 #: ../src/guestfs-actions.pod:6731 ../fish/guestfish-actions.pod:4504
18719 "This command activates or (if C<activate> is false) deactivates all logical "
18720 "volumes in the listed volume groups C<volgroups>. If activated, then they "
18721 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
18722 "deactivated, then those devices disappear."
18727 #: ../src/guestfs-actions.pod:6737 ../fish/guestfish-actions.pod:4510
18728 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
18733 #: ../src/guestfs-actions.pod:6739 ../fish/guestfish-actions.pod:4512
18735 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
18736 "activated or deactivated."
18741 #: ../src/guestfs-actions.pod:6746
18742 msgid "guestfs_vg_activate_all"
18747 #: ../src/guestfs-actions.pod:6748
18751 " guestfs_vg_activate_all (guestfs_h *g,\n"
18752 " int activate);\n"
18758 #: ../src/guestfs-actions.pod:6752 ../fish/guestfish-actions.pod:4519
18760 "This command activates or (if C<activate> is false) deactivates all logical "
18761 "volumes in all volume groups. If activated, then they are made known to the "
18762 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
18763 "those devices disappear."
18768 #: ../src/guestfs-actions.pod:6758 ../fish/guestfish-actions.pod:4525
18769 msgid "This command is the same as running C<vgchange -a y|n>"
18774 #: ../src/guestfs-actions.pod:6764
18775 msgid "guestfs_vgcreate"
18780 #: ../src/guestfs-actions.pod:6766
18784 " guestfs_vgcreate (guestfs_h *g,\n"
18785 " const char *volgroup,\n"
18786 " char *const *physvols);\n"
18792 #: ../src/guestfs-actions.pod:6771 ../fish/guestfish-actions.pod:4531
18794 "This creates an LVM volume group called C<volgroup> from the non-empty list "
18795 "of physical volumes C<physvols>."
18800 #: ../src/guestfs-actions.pod:6778
18801 msgid "guestfs_vglvuuids"
18806 #: ../src/guestfs-actions.pod:6780
18810 " guestfs_vglvuuids (guestfs_h *g,\n"
18811 " const char *vgname);\n"
18817 #: ../src/guestfs-actions.pod:6784 ../fish/guestfish-actions.pod:4538
18819 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
18820 "volumes created in this volume group."
18825 #: ../src/guestfs-actions.pod:6787
18827 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
18828 "associate logical volumes and volume groups."
18833 #: ../src/guestfs-actions.pod:6790
18834 msgid "See also C<guestfs_vgpvuuids>."
18839 #: ../src/guestfs-actions.pod:6798
18840 msgid "guestfs_vgpvuuids"
18845 #: ../src/guestfs-actions.pod:6800
18849 " guestfs_vgpvuuids (guestfs_h *g,\n"
18850 " const char *vgname);\n"
18856 #: ../src/guestfs-actions.pod:6804 ../fish/guestfish-actions.pod:4550
18858 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
18859 "volumes that this volume group resides on."
18864 #: ../src/guestfs-actions.pod:6807
18866 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
18867 "associate physical volumes and volume groups."
18872 #: ../src/guestfs-actions.pod:6810
18873 msgid "See also C<guestfs_vglvuuids>."
18878 #: ../src/guestfs-actions.pod:6818
18879 msgid "guestfs_vgremove"
18884 #: ../src/guestfs-actions.pod:6820
18888 " guestfs_vgremove (guestfs_h *g,\n"
18889 " const char *vgname);\n"
18895 #: ../src/guestfs-actions.pod:6824 ../fish/guestfish-actions.pod:4562
18896 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
18901 #: ../src/guestfs-actions.pod:6826 ../fish/guestfish-actions.pod:4564
18903 "This also forcibly removes all logical volumes in the volume group (if any)."
18908 #: ../src/guestfs-actions.pod:6833
18909 msgid "guestfs_vgrename"
18914 #: ../src/guestfs-actions.pod:6835
18918 " guestfs_vgrename (guestfs_h *g,\n"
18919 " const char *volgroup,\n"
18920 " const char *newvolgroup);\n"
18926 #: ../src/guestfs-actions.pod:6840 ../fish/guestfish-actions.pod:4571
18927 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
18932 #: ../src/guestfs-actions.pod:6846
18933 msgid "guestfs_vgs"
18938 #: ../src/guestfs-actions.pod:6848
18942 " guestfs_vgs (guestfs_h *g);\n"
18948 #: ../src/guestfs-actions.pod:6851 ../fish/guestfish-actions.pod:4577
18950 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
18956 #: ../src/guestfs-actions.pod:6854 ../fish/guestfish-actions.pod:4580
18958 "This returns a list of just the volume group names that were detected (eg. "
18964 #: ../src/guestfs-actions.pod:6857
18965 msgid "See also C<guestfs_vgs_full>."
18970 #: ../src/guestfs-actions.pod:6865
18971 msgid "guestfs_vgs_full"
18976 #: ../src/guestfs-actions.pod:6867
18979 " struct guestfs_lvm_vg_list *\n"
18980 " guestfs_vgs_full (guestfs_h *g);\n"
18986 #: ../src/guestfs-actions.pod:6870 ../fish/guestfish-actions.pod:4589
18988 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
18989 "> command. The \"full\" version includes all fields."
18994 #: ../src/guestfs-actions.pod:6873
18996 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
18997 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after use>."
19002 #: ../src/guestfs-actions.pod:6879
19003 msgid "guestfs_vgscan"
19008 #: ../src/guestfs-actions.pod:6881
19012 " guestfs_vgscan (guestfs_h *g);\n"
19018 #: ../src/guestfs-actions.pod:6884 ../fish/guestfish-actions.pod:4596
19020 "This rescans all block devices and rebuilds the list of LVM physical "
19021 "volumes, volume groups and logical volumes."
19026 #: ../src/guestfs-actions.pod:6891
19027 msgid "guestfs_vguuid"
19032 #: ../src/guestfs-actions.pod:6893
19036 " guestfs_vguuid (guestfs_h *g,\n"
19037 " const char *vgname);\n"
19043 #: ../src/guestfs-actions.pod:6897 ../fish/guestfish-actions.pod:4603
19044 msgid "This command returns the UUID of the LVM VG named C<vgname>."
19049 #: ../src/guestfs-actions.pod:6904
19050 msgid "guestfs_wait_ready"
19055 #: ../src/guestfs-actions.pod:6906
19059 " guestfs_wait_ready (guestfs_h *g);\n"
19065 #: ../src/guestfs-actions.pod:6909
19066 msgid "This function is a no op."
19071 #: ../src/guestfs-actions.pod:6911
19073 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
19074 "calling C<guestfs_launch> to wait for the launch to complete. However this "
19075 "is no longer necessary because C<guestfs_launch> now does the waiting."
19080 #: ../src/guestfs-actions.pod:6916
19082 "If you see any calls to this function in code then you can just remove them, "
19083 "unless you want to retain compatibility with older versions of the API."
19088 #: ../src/guestfs-actions.pod:6924
19089 msgid "guestfs_wc_c"
19094 #: ../src/guestfs-actions.pod:6926
19098 " guestfs_wc_c (guestfs_h *g,\n"
19099 " const char *path);\n"
19105 #: ../src/guestfs-actions.pod:6930 ../fish/guestfish-actions.pod:4609
19107 "This command counts the characters in a file, using the C<wc -c> external "
19113 #: ../src/guestfs-actions.pod:6937
19114 msgid "guestfs_wc_l"
19119 #: ../src/guestfs-actions.pod:6939
19123 " guestfs_wc_l (guestfs_h *g,\n"
19124 " const char *path);\n"
19130 #: ../src/guestfs-actions.pod:6943 ../fish/guestfish-actions.pod:4616
19132 "This command counts the lines in a file, using the C<wc -l> external command."
19137 #: ../src/guestfs-actions.pod:6950
19138 msgid "guestfs_wc_w"
19143 #: ../src/guestfs-actions.pod:6952
19147 " guestfs_wc_w (guestfs_h *g,\n"
19148 " const char *path);\n"
19154 #: ../src/guestfs-actions.pod:6956 ../fish/guestfish-actions.pod:4623
19156 "This command counts the words in a file, using the C<wc -w> external command."
19161 #: ../src/guestfs-actions.pod:6963
19162 msgid "guestfs_write"
19167 #: ../src/guestfs-actions.pod:6965
19171 " guestfs_write (guestfs_h *g,\n"
19172 " const char *path,\n"
19173 " const char *content,\n"
19174 " size_t content_size);\n"
19180 #: ../src/guestfs-actions.pod:6971 ../fish/guestfish-actions.pod:4630
19182 "This call creates a file called C<path>. The content of the file is the "
19183 "string C<content> (which can contain any 8 bit data)."
19188 #: ../src/guestfs-actions.pod:6981
19189 msgid "guestfs_write_file"
19194 #: ../src/guestfs-actions.pod:6983
19198 " guestfs_write_file (guestfs_h *g,\n"
19199 " const char *path,\n"
19200 " const char *content,\n"
19207 #: ../src/guestfs-actions.pod:6989 ../fish/guestfish-actions.pod:4640
19209 "This call creates a file called C<path>. The contents of the file is the "
19210 "string C<content> (which can contain any 8 bit data), with length C<size>."
19215 #: ../src/guestfs-actions.pod:6993 ../fish/guestfish-actions.pod:4644
19217 "As a special case, if C<size> is C<0> then the length is calculated using "
19218 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
19223 #: ../src/guestfs-actions.pod:6997 ../fish/guestfish-actions.pod:4648
19225 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
19226 "I<not> work, even if the length is specified."
19230 #: ../src/guestfs-actions.pod:7005
19232 "This function is deprecated. In new code, use the L</guestfs_write> call "
19238 #: ../src/guestfs-actions.pod:7014
19239 msgid "guestfs_zegrep"
19244 #: ../src/guestfs-actions.pod:7016
19248 " guestfs_zegrep (guestfs_h *g,\n"
19249 " const char *regex,\n"
19250 " const char *path);\n"
19256 #: ../src/guestfs-actions.pod:7021 ../fish/guestfish-actions.pod:4665
19258 "This calls the external C<zegrep> program and returns the matching lines."
19263 #: ../src/guestfs-actions.pod:7033
19264 msgid "guestfs_zegrepi"
19269 #: ../src/guestfs-actions.pod:7035
19273 " guestfs_zegrepi (guestfs_h *g,\n"
19274 " const char *regex,\n"
19275 " const char *path);\n"
19281 #: ../src/guestfs-actions.pod:7040 ../fish/guestfish-actions.pod:4675
19283 "This calls the external C<zegrep -i> program and returns the matching lines."
19288 #: ../src/guestfs-actions.pod:7052
19289 msgid "guestfs_zero"
19294 #: ../src/guestfs-actions.pod:7054
19298 " guestfs_zero (guestfs_h *g,\n"
19299 " const char *device);\n"
19305 #: ../src/guestfs-actions.pod:7058 ../fish/guestfish-actions.pod:4685
19306 msgid "This command writes zeroes over the first few blocks of C<device>."
19311 #: ../src/guestfs-actions.pod:7060 ../fish/guestfish-actions.pod:4687
19313 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
19314 "securely wipe the device). It should be sufficient to remove any partition "
19315 "tables, filesystem superblocks and so on."
19320 #: ../src/guestfs-actions.pod:7064
19321 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
19326 #: ../src/guestfs-actions.pod:7075
19327 msgid "guestfs_zero_device"
19332 #: ../src/guestfs-actions.pod:7077
19336 " guestfs_zero_device (guestfs_h *g,\n"
19337 " const char *device);\n"
19343 #: ../src/guestfs-actions.pod:7081
19345 "This command writes zeroes over the entire C<device>. Compare with "
19346 "C<guestfs_zero> which just zeroes the first few blocks of a device."
19351 #: ../src/guestfs-actions.pod:7095
19352 msgid "(Added in 1.3.1)"
19357 #: ../src/guestfs-actions.pod:7097
19358 msgid "guestfs_zerofree"
19363 #: ../src/guestfs-actions.pod:7099
19367 " guestfs_zerofree (guestfs_h *g,\n"
19368 " const char *device);\n"
19374 #: ../src/guestfs-actions.pod:7103 ../fish/guestfish-actions.pod:4708
19376 "This runs the I<zerofree> program on C<device>. This program claims to zero "
19377 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
19378 "possible to compress the filesystem more effectively."
19383 #: ../src/guestfs-actions.pod:7108 ../fish/guestfish-actions.pod:4713
19384 msgid "You should B<not> run this program if the filesystem is mounted."
19389 #: ../src/guestfs-actions.pod:7111 ../fish/guestfish-actions.pod:4716
19391 "It is possible that using this program can damage the filesystem or data on "
19397 #: ../src/guestfs-actions.pod:7118
19398 msgid "guestfs_zfgrep"
19403 #: ../src/guestfs-actions.pod:7120
19407 " guestfs_zfgrep (guestfs_h *g,\n"
19408 " const char *pattern,\n"
19409 " const char *path);\n"
19415 #: ../src/guestfs-actions.pod:7125 ../fish/guestfish-actions.pod:4723
19417 "This calls the external C<zfgrep> program and returns the matching lines."
19422 #: ../src/guestfs-actions.pod:7137
19423 msgid "guestfs_zfgrepi"
19428 #: ../src/guestfs-actions.pod:7139
19432 " guestfs_zfgrepi (guestfs_h *g,\n"
19433 " const char *pattern,\n"
19434 " const char *path);\n"
19440 #: ../src/guestfs-actions.pod:7144 ../fish/guestfish-actions.pod:4733
19442 "This calls the external C<zfgrep -i> program and returns the matching lines."
19447 #: ../src/guestfs-actions.pod:7156
19448 msgid "guestfs_zfile"
19453 #: ../src/guestfs-actions.pod:7158
19457 " guestfs_zfile (guestfs_h *g,\n"
19458 " const char *meth,\n"
19459 " const char *path);\n"
19465 #: ../src/guestfs-actions.pod:7163 ../fish/guestfish-actions.pod:4743
19467 "This command runs C<file> after first decompressing C<path> using C<method>."
19472 #: ../src/guestfs-actions.pod:7166 ../fish/guestfish-actions.pod:4746
19473 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
19478 #: ../src/guestfs-actions.pod:7168
19480 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
19485 #: ../src/guestfs-actions.pod:7174
19487 "This function is deprecated. In new code, use the L</guestfs_file> call "
19493 #: ../src/guestfs-actions.pod:7183
19494 msgid "guestfs_zgrep"
19499 #: ../src/guestfs-actions.pod:7185
19503 " guestfs_zgrep (guestfs_h *g,\n"
19504 " const char *regex,\n"
19505 " const char *path);\n"
19511 #: ../src/guestfs-actions.pod:7190 ../fish/guestfish-actions.pod:4762
19513 "This calls the external C<zgrep> program and returns the matching lines."
19518 #: ../src/guestfs-actions.pod:7202
19519 msgid "guestfs_zgrepi"
19524 #: ../src/guestfs-actions.pod:7204
19528 " guestfs_zgrepi (guestfs_h *g,\n"
19529 " const char *regex,\n"
19530 " const char *path);\n"
19536 #: ../src/guestfs-actions.pod:7209 ../fish/guestfish-actions.pod:4772
19538 "This calls the external C<zgrep -i> program and returns the matching lines."
19543 #: ../src/guestfs-availability.pod:3
19549 #: ../src/guestfs-availability.pod:5
19551 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
19552 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
19553 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
19554 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
19555 "L</guestfs_aug_save> L</guestfs_aug_set>"
19559 #: ../src/guestfs-availability.pod:21
19564 #: ../src/guestfs-availability.pod:23
19565 msgid "The following functions: L</guestfs_grub_install>"
19570 #: ../src/guestfs-availability.pod:26
19576 #: ../src/guestfs-availability.pod:28
19578 "The following functions: L</guestfs_inotify_add_watch> L</"
19579 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
19580 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
19585 #: ../src/guestfs-availability.pod:36
19586 msgid "B<linuxfsuuid>"
19591 #: ../src/guestfs-availability.pod:38
19593 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
19594 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
19599 #: ../src/guestfs-availability.pod:45
19600 msgid "B<linuxmodules>"
19605 #: ../src/guestfs-availability.pod:47
19606 msgid "The following functions: L</guestfs_modprobe>"
19611 #: ../src/guestfs-availability.pod:50
19612 msgid "B<linuxxattrs>"
19617 #: ../src/guestfs-availability.pod:52
19619 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> L</"
19620 "guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> L</"
19621 "guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> L</"
19622 "guestfs_setxattr>"
19627 #: ../src/guestfs-availability.pod:63
19633 #: ../src/guestfs-availability.pod:65
19635 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
19636 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
19637 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
19642 #: ../src/guestfs-availability.pod:74
19648 #: ../src/guestfs-availability.pod:76
19650 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
19651 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
19652 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
19653 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
19654 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
19655 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
19656 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
19661 #: ../src/guestfs-availability.pod:99
19667 #: ../src/guestfs-availability.pod:101
19669 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
19670 "guestfs_mknod_b> L</guestfs_mknod_c>"
19675 #: ../src/guestfs-availability.pod:107
19681 #: ../src/guestfs-availability.pod:109
19682 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
19687 #: ../src/guestfs-availability.pod:112
19688 msgid "B<ntfsprogs>"
19693 #: ../src/guestfs-availability.pod:114
19695 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
19700 #: ../src/guestfs-availability.pod:118
19701 msgid "B<realpath>"
19706 #: ../src/guestfs-availability.pod:120
19707 msgid "The following functions: L</guestfs_realpath>"
19712 #: ../src/guestfs-availability.pod:123
19718 #: ../src/guestfs-availability.pod:125
19720 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
19721 "guestfs_scrub_freespace>"
19726 #: ../src/guestfs-availability.pod:130
19732 #: ../src/guestfs-availability.pod:132
19733 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
19738 #: ../src/guestfs-availability.pod:136
19744 #: ../src/guestfs-availability.pod:138
19745 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
19750 #: ../src/guestfs-availability.pod:142
19751 msgid "B<zerofree>"
19756 #: ../src/guestfs-availability.pod:144
19757 msgid "The following functions: L</guestfs_zerofree>"
19762 #: ../src/guestfs-structs.pod:1
19763 msgid "guestfs_int_bool"
19768 #: ../src/guestfs-structs.pod:3
19771 " struct guestfs_int_bool {\n"
19780 #: ../src/guestfs-structs.pod:8
19783 " struct guestfs_int_bool_list {\n"
19784 " uint32_t len; /* Number of elements in list. */\n"
19785 " struct guestfs_int_bool *val; /* Elements. */\n"
19792 #: ../src/guestfs-structs.pod:13
19795 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
19796 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
19802 #: ../src/guestfs-structs.pod:16
19803 msgid "guestfs_lvm_pv"
19808 #: ../src/guestfs-structs.pod:18
19811 " struct guestfs_lvm_pv {\n"
19812 " char *pv_name;\n"
19813 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
19814 " char pv_uuid[32];\n"
19816 " uint64_t pv_size;\n"
19817 " uint64_t dev_size;\n"
19818 " uint64_t pv_free;\n"
19819 " uint64_t pv_used;\n"
19820 " char *pv_attr;\n"
19821 " int64_t pv_pe_count;\n"
19822 " int64_t pv_pe_alloc_count;\n"
19823 " char *pv_tags;\n"
19824 " uint64_t pe_start;\n"
19825 " int64_t pv_mda_count;\n"
19826 " uint64_t pv_mda_free;\n"
19833 #: ../src/guestfs-structs.pod:36
19836 " struct guestfs_lvm_pv_list {\n"
19837 " uint32_t len; /* Number of elements in list. */\n"
19838 " struct guestfs_lvm_pv *val; /* Elements. */\n"
19845 #: ../src/guestfs-structs.pod:41
19848 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
19849 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
19855 #: ../src/guestfs-structs.pod:44
19856 msgid "guestfs_lvm_vg"
19861 #: ../src/guestfs-structs.pod:46
19864 " struct guestfs_lvm_vg {\n"
19865 " char *vg_name;\n"
19866 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
19867 " char vg_uuid[32];\n"
19869 " char *vg_attr;\n"
19870 " uint64_t vg_size;\n"
19871 " uint64_t vg_free;\n"
19872 " char *vg_sysid;\n"
19873 " uint64_t vg_extent_size;\n"
19874 " int64_t vg_extent_count;\n"
19875 " int64_t vg_free_count;\n"
19876 " int64_t max_lv;\n"
19877 " int64_t max_pv;\n"
19878 " int64_t pv_count;\n"
19879 " int64_t lv_count;\n"
19880 " int64_t snap_count;\n"
19881 " int64_t vg_seqno;\n"
19882 " char *vg_tags;\n"
19883 " int64_t vg_mda_count;\n"
19884 " uint64_t vg_mda_free;\n"
19891 #: ../src/guestfs-structs.pod:69
19894 " struct guestfs_lvm_vg_list {\n"
19895 " uint32_t len; /* Number of elements in list. */\n"
19896 " struct guestfs_lvm_vg *val; /* Elements. */\n"
19903 #: ../src/guestfs-structs.pod:74
19906 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
19907 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
19913 #: ../src/guestfs-structs.pod:77
19914 msgid "guestfs_lvm_lv"
19919 #: ../src/guestfs-structs.pod:79
19922 " struct guestfs_lvm_lv {\n"
19923 " char *lv_name;\n"
19924 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
19925 " char lv_uuid[32];\n"
19926 " char *lv_attr;\n"
19927 " int64_t lv_major;\n"
19928 " int64_t lv_minor;\n"
19929 " int64_t lv_kernel_major;\n"
19930 " int64_t lv_kernel_minor;\n"
19931 " uint64_t lv_size;\n"
19932 " int64_t seg_count;\n"
19934 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
19935 " float snap_percent;\n"
19936 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
19937 " float copy_percent;\n"
19938 " char *move_pv;\n"
19939 " char *lv_tags;\n"
19940 " char *mirror_log;\n"
19941 " char *modules;\n"
19948 #: ../src/guestfs-structs.pod:101
19951 " struct guestfs_lvm_lv_list {\n"
19952 " uint32_t len; /* Number of elements in list. */\n"
19953 " struct guestfs_lvm_lv *val; /* Elements. */\n"
19960 #: ../src/guestfs-structs.pod:106
19963 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
19964 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
19970 #: ../src/guestfs-structs.pod:111
19973 " struct guestfs_stat {\n"
19977 " int64_t nlink;\n"
19982 " int64_t blksize;\n"
19983 " int64_t blocks;\n"
19984 " int64_t atime;\n"
19985 " int64_t mtime;\n"
19986 " int64_t ctime;\n"
19993 #: ../src/guestfs-structs.pod:127
19996 " struct guestfs_stat_list {\n"
19997 " uint32_t len; /* Number of elements in list. */\n"
19998 " struct guestfs_stat *val; /* Elements. */\n"
20005 #: ../src/guestfs-structs.pod:132
20008 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
20009 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
20015 #: ../src/guestfs-structs.pod:137
20018 " struct guestfs_statvfs {\n"
20019 " int64_t bsize;\n"
20020 " int64_t frsize;\n"
20021 " int64_t blocks;\n"
20022 " int64_t bfree;\n"
20023 " int64_t bavail;\n"
20024 " int64_t files;\n"
20025 " int64_t ffree;\n"
20026 " int64_t favail;\n"
20029 " int64_t namemax;\n"
20036 #: ../src/guestfs-structs.pod:151
20039 " struct guestfs_statvfs_list {\n"
20040 " uint32_t len; /* Number of elements in list. */\n"
20041 " struct guestfs_statvfs *val; /* Elements. */\n"
20048 #: ../src/guestfs-structs.pod:156
20051 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
20052 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
20058 #: ../src/guestfs-structs.pod:159
20059 msgid "guestfs_dirent"
20064 #: ../src/guestfs-structs.pod:161
20067 " struct guestfs_dirent {\n"
20077 #: ../src/guestfs-structs.pod:167
20080 " struct guestfs_dirent_list {\n"
20081 " uint32_t len; /* Number of elements in list. */\n"
20082 " struct guestfs_dirent *val; /* Elements. */\n"
20089 #: ../src/guestfs-structs.pod:172
20092 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
20093 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
20099 #: ../src/guestfs-structs.pod:177
20102 " struct guestfs_version {\n"
20103 " int64_t major;\n"
20104 " int64_t minor;\n"
20105 " int64_t release;\n"
20113 #: ../src/guestfs-structs.pod:184
20116 " struct guestfs_version_list {\n"
20117 " uint32_t len; /* Number of elements in list. */\n"
20118 " struct guestfs_version *val; /* Elements. */\n"
20125 #: ../src/guestfs-structs.pod:189
20128 " void guestfs_free_version (struct guestfs_free_version *);\n"
20129 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
20135 #: ../src/guestfs-structs.pod:192
20136 msgid "guestfs_xattr"
20141 #: ../src/guestfs-structs.pod:194
20144 " struct guestfs_xattr {\n"
20145 " char *attrname;\n"
20146 " /* The next two fields describe a byte array. */\n"
20147 " uint32_t attrval_len;\n"
20148 " char *attrval;\n"
20155 #: ../src/guestfs-structs.pod:201
20158 " struct guestfs_xattr_list {\n"
20159 " uint32_t len; /* Number of elements in list. */\n"
20160 " struct guestfs_xattr *val; /* Elements. */\n"
20167 #: ../src/guestfs-structs.pod:206
20170 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
20171 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
20177 #: ../src/guestfs-structs.pod:209
20178 msgid "guestfs_inotify_event"
20183 #: ../src/guestfs-structs.pod:211
20186 " struct guestfs_inotify_event {\n"
20187 " int64_t in_wd;\n"
20188 " uint32_t in_mask;\n"
20189 " uint32_t in_cookie;\n"
20190 " char *in_name;\n"
20197 #: ../src/guestfs-structs.pod:218
20200 " struct guestfs_inotify_event_list {\n"
20201 " uint32_t len; /* Number of elements in list. */\n"
20202 " struct guestfs_inotify_event *val; /* Elements. */\n"
20209 #: ../src/guestfs-structs.pod:223
20212 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
20213 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
20219 #: ../src/guestfs-structs.pod:226
20220 msgid "guestfs_partition"
20225 #: ../src/guestfs-structs.pod:228
20228 " struct guestfs_partition {\n"
20229 " int32_t part_num;\n"
20230 " uint64_t part_start;\n"
20231 " uint64_t part_end;\n"
20232 " uint64_t part_size;\n"
20239 #: ../src/guestfs-structs.pod:235
20242 " struct guestfs_partition_list {\n"
20243 " uint32_t len; /* Number of elements in list. */\n"
20244 " struct guestfs_partition *val; /* Elements. */\n"
20251 #: ../src/guestfs-structs.pod:240
20254 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
20255 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
20261 #: ../src/guestfs-structs.pod:243
20262 msgid "guestfs_application"
20267 #: ../src/guestfs-structs.pod:245
20270 " struct guestfs_application {\n"
20271 " char *app_name;\n"
20272 " char *app_display_name;\n"
20273 " int32_t app_epoch;\n"
20274 " char *app_version;\n"
20275 " char *app_release;\n"
20276 " char *app_install_path;\n"
20277 " char *app_trans_path;\n"
20278 " char *app_publisher;\n"
20279 " char *app_url;\n"
20280 " char *app_source_package;\n"
20281 " char *app_summary;\n"
20282 " char *app_description;\n"
20289 #: ../src/guestfs-structs.pod:260
20292 " struct guestfs_application_list {\n"
20293 " uint32_t len; /* Number of elements in list. */\n"
20294 " struct guestfs_application *val; /* Elements. */\n"
20301 #: ../src/guestfs-structs.pod:265
20304 " void guestfs_free_application (struct guestfs_free_application *);\n"
20305 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
20311 #: ../fish/guestfish.pod:5
20312 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
20317 #: ../fish/guestfish.pod:9
20320 " guestfish [--options] [commands]\n"
20326 #: ../fish/guestfish.pod:11
20335 #: ../fish/guestfish.pod:13
20338 " guestfish [--ro|--rw] -a disk.img\n"
20344 #: ../fish/guestfish.pod:15
20347 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
20353 #: ../fish/guestfish.pod:17
20356 " guestfish -d libvirt-domain\n"
20362 #: ../fish/guestfish.pod:19
20365 " guestfish [--ro|--rw] -a disk.img -i\n"
20371 #: ../fish/guestfish.pod:21
20374 " guestfish -d libvirt-domain -i\n"
20380 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:15 ../tools/virt-edit.pl:44
20381 #: ../tools/virt-win-reg.pl:51 ../tools/virt-tar.pl:59
20387 #: ../fish/guestfish.pod:25
20389 "Using guestfish in read/write mode on live virtual machines can be "
20390 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
20391 "option to use guestfish safely if the disk image or virtual machine might be "
20397 #: ../fish/guestfish.pod:32
20399 "Guestfish is a shell and command-line tool for examining and modifying "
20400 "virtual machine filesystems. It uses libguestfs and exposes all of the "
20401 "functionality of the guestfs API, see L<guestfs(3)>."
20406 #: ../fish/guestfish.pod:36
20408 "Guestfish gives you structured access to the libguestfs API, from shell "
20409 "scripts or the command line or interactively. If you want to rescue a "
20410 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
20416 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:908
20417 #: ../fuse/guestmount.pod:39 ../tools/virt-edit.pl:63
20418 #: ../tools/virt-resize.pl:64 ../tools/virt-tar.pl:45
20424 #: ../fish/guestfish.pod:43
20425 msgid "As an interactive shell"
20430 #: ../fish/guestfish.pod:45
20439 #: ../fish/guestfish.pod:47
20442 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
20443 " editing virtual machine filesystems.\n"
20449 #: ../fish/guestfish.pod:50
20452 " Type: 'help' for a list of commands\n"
20453 " 'man' to read the manual\n"
20454 " 'quit' to quit the shell\n"
20460 #: ../fish/guestfish.pod:54
20463 " ><fs> add-ro disk.img\n"
20465 " ><fs> list-filesystems\n"
20466 " /dev/sda1: ext4\n"
20467 " /dev/vg_guest/lv_root: ext4\n"
20468 " /dev/vg_guest/lv_swap: swap\n"
20469 " ><fs> mount /dev/vg_guest/lv_root /\n"
20470 " ><fs> cat /etc/fstab\n"
20472 " # Created by anaconda\n"
20480 #: ../fish/guestfish.pod:67
20481 msgid "From shell scripts"
20486 #: ../fish/guestfish.pod:69
20487 msgid "Create a new C</etc/motd> file in a guest or disk image:"
20492 #: ../fish/guestfish.pod:71
20495 " guestfish <<_EOF_\n"
20498 " mount /dev/vg_guest/lv_root /\n"
20499 " write /etc/motd \"Welcome, new users\"\n"
20506 #: ../fish/guestfish.pod:78
20507 msgid "List the LVM logical volumes in a disk image:"
20512 #: ../fish/guestfish.pod:80
20515 " guestfish -a disk.img --ro <<_EOF_\n"
20524 #: ../fish/guestfish.pod:85
20525 msgid "List all the filesystems in a disk image:"
20530 #: ../fish/guestfish.pod:87
20533 " guestfish -a disk.img --ro <<_EOF_\n"
20535 " list-filesystems\n"
20542 #: ../fish/guestfish.pod:92
20543 msgid "On one command line"
20548 #: ../fish/guestfish.pod:94
20549 msgid "Update C</etc/resolv.conf> in a guest:"
20554 #: ../fish/guestfish.pod:96
20558 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
20559 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
20565 #: ../fish/guestfish.pod:100
20566 msgid "Edit C</boot/grub/grub.conf> interactively:"
20571 #: ../fish/guestfish.pod:102
20574 " guestfish --rw --add disk.img \\\n"
20575 " --mount /dev/vg_guest/lv_root \\\n"
20576 " --mount /dev/sda1:/boot \\\n"
20577 " edit /boot/grub/grub.conf\n"
20583 #: ../fish/guestfish.pod:107
20584 msgid "Mount disks automatically"
20589 #: ../fish/guestfish.pod:109
20591 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
20596 #: ../fish/guestfish.pod:112
20599 " guestfish --ro -a disk.img -i cat /etc/group\n"
20605 #: ../fish/guestfish.pod:114
20608 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
20614 #: ../fish/guestfish.pod:116
20615 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
20620 #: ../fish/guestfish.pod:118
20623 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
20629 #: ../fish/guestfish.pod:120
20630 msgid "As a script interpreter"
20635 #: ../fish/guestfish.pod:122
20636 msgid "Create a 100MB disk containing an ext2-formatted partition:"
20641 #: ../fish/guestfish.pod:124
20644 " #!/usr/bin/guestfish -f\n"
20645 " sparse test1.img 100M\n"
20647 " part-disk /dev/sda mbr\n"
20648 " mkfs ext2 /dev/sda1\n"
20654 #: ../fish/guestfish.pod:130
20655 msgid "Start with a prepared disk"
20660 #: ../fish/guestfish.pod:132
20662 "An alternate way to create a 100MB disk called C<test1.img> containing a "
20663 "single ext2-formatted partition:"
20668 #: ../fish/guestfish.pod:135
20671 " guestfish -N fs\n"
20677 #: ../fish/guestfish.pod:137
20678 msgid "To list what is available do:"
20683 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:899
20686 " guestfish -N help | less\n"
20692 #: ../fish/guestfish.pod:141
20693 msgid "Remote control"
20698 #: ../fish/guestfish.pod:143
20701 " eval \"`guestfish --listen`\"\n"
20702 " guestfish --remote add-ro disk.img\n"
20703 " guestfish --remote run\n"
20704 " guestfish --remote lvs\n"
20710 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37
20711 #: ../fuse/guestmount.pod:73 ../tools/virt-edit.pl:77
20712 #: ../tools/virt-win-reg.pl:96 ../tools/virt-resize.pl:254
20713 #: ../tools/virt-list-filesystems.pl:53 ../tools/virt-tar.pl:98
20714 #: ../tools/virt-make-fs.pl:153 ../tools/virt-list-partitions.pl:54
20720 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:131
20721 #: ../tools/virt-edit.pl:85 ../tools/virt-win-reg.pl:104
20722 #: ../tools/virt-resize.pl:262 ../tools/virt-list-filesystems.pl:61
20723 #: ../tools/virt-tar.pl:106 ../tools/virt-make-fs.pl:161
20724 #: ../tools/virt-list-partitions.pl:62
20730 #: ../fish/guestfish.pod:154
20731 msgid "Displays general help on options."
20736 #: ../fish/guestfish.pod:156
20742 #: ../fish/guestfish.pod:158
20743 msgid "B<--cmd-help>"
20748 #: ../fish/guestfish.pod:160
20749 msgid "Lists all available guestfish commands."
20754 #: ../fish/guestfish.pod:162
20760 #: ../fish/guestfish.pod:164
20761 msgid "B<--cmd-help cmd>"
20766 #: ../fish/guestfish.pod:166
20767 msgid "Displays detailed help on a single command C<cmd>."
20772 #: ../fish/guestfish.pod:168
20773 msgid "B<-a image>"
20778 #: ../fish/guestfish.pod:170
20779 msgid "B<--add image>"
20784 #: ../fish/guestfish.pod:172
20785 msgid "Add a block device or virtual machine image to the shell."
20790 #: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:81
20792 "The format of the disk image is auto-detected. To override this and force a "
20793 "particular format use the I<--format=..> option."
20797 #: ../fish/guestfish.pod:177
20799 "Using this flag is mostly equivalent to using the C<add> command, with "
20800 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
20801 "the I<--format=...> flag was given."
20806 #: ../fish/guestfish.pod:181
20812 #: ../fish/guestfish.pod:183
20813 msgid "B<--connect URI>"
20818 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:86
20820 "When used in conjunction with the I<-d> option, this specifies the libvirt "
20821 "URI to use. The default is to use the default libvirt connection."
20826 #: ../fish/guestfish.pod:189
20832 #: ../fish/guestfish.pod:191
20834 "If using the I<--listen> option and a csh-like shell, use this option. See "
20835 "section L</REMOTE CONTROL AND CSH> below."
20840 #: ../fish/guestfish.pod:194
20841 msgid "B<-d libvirt-domain>"
20846 #: ../fish/guestfish.pod:196
20847 msgid "B<--domain libvirt-domain>"
20852 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:92
20854 "Add disks from the named libvirt domain. If the I<--ro> option is also "
20855 "used, then any libvirt domain can be used. However in write mode, only "
20856 "libvirt domains which are shut down can be named here."
20861 #: ../fish/guestfish.pod:202
20863 "Using this flag is mostly equivalent to using the C<add-domain> command, "
20864 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
20865 "if the I<--format:...> flag was given."
20870 #: ../fish/guestfish.pod:206
20876 #: ../fish/guestfish.pod:208
20877 msgid "B<--no-dest-paths>"
20882 #: ../fish/guestfish.pod:210
20884 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
20885 "to hit the tab key to complete paths on the guest filesystem, but this "
20886 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
20887 "allow this feature to be disabled."
20892 #: ../fish/guestfish.pod:215 ../fuse/guestmount.pod:108
20893 msgid "B<--echo-keys>"
20898 #: ../fish/guestfish.pod:217 ../fuse/guestmount.pod:110
20900 "When prompting for keys and passphrases, guestfish normally turns echoing "
20901 "off so you cannot see what you are typing. If you are not worried about "
20902 "Tempest attacks and there is no one else in the room you can specify this "
20903 "flag to see what you are typing."
20908 #: ../fish/guestfish.pod:222
20914 #: ../fish/guestfish.pod:224
20915 msgid "B<--file file>"
20920 #: ../fish/guestfish.pod:226
20921 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
20926 #: ../fish/guestfish.pod:229
20929 " #!/usr/bin/guestfish -f\n"
20935 #: ../fish/guestfish.pod:231
20936 msgid "B<--format=raw|qcow2|..>"
20941 #: ../fish/guestfish.pod:233
20942 msgid "B<--format>"
20947 #: ../fish/guestfish.pod:235 ../fuse/guestmount.pod:117
20949 "The default for the I<-a> option is to auto-detect the format of the disk "
20950 "image. Using this forces the disk format for I<-a> options which follow on "
20951 "the command line. Using I<--format> with no argument switches back to auto-"
20952 "detection for subsequent I<-a> options."
20957 #: ../fish/guestfish.pod:242
20960 " guestfish --format=raw -a disk.img\n"
20966 #: ../fish/guestfish.pod:244
20967 msgid "forces raw format (no auto-detection) for C<disk.img>."
20972 #: ../fish/guestfish.pod:246
20975 " guestfish --format=raw -a disk.img --format -a another.img\n"
20981 #: ../fish/guestfish.pod:248
20983 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
20984 "detection for C<another.img>."
20989 #: ../fish/guestfish.pod:251
20991 "If you have untrusted raw-format guest disk images, you should use this "
20992 "option to specify the disk format. This avoids a possible security problem "
20993 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
20998 #: ../fish/guestfish.pod:256
21004 #: ../fish/guestfish.pod:258
21005 msgid "B<--inspector>"
21010 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:137
21012 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
21013 "system and mount filesystems as they would be mounted on the real virtual "
21019 #: ../fish/guestfish.pod:264
21020 msgid "Typical usage is either:"
21025 #: ../fish/guestfish.pod:266
21028 " guestfish -d myguest -i\n"
21034 #: ../fish/guestfish.pod:268
21035 msgid "(for an inactive libvirt domain called I<myguest>), or:"
21040 #: ../fish/guestfish.pod:270
21043 " guestfish --ro -d myguest -i\n"
21049 #: ../fish/guestfish.pod:272
21050 msgid "(for active domains, readonly), or specify the block device directly:"
21055 #: ../fish/guestfish.pod:274
21058 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
21064 #: ../fish/guestfish.pod:276
21066 "Note that the command line syntax changed slightly over older versions of "
21067 "guestfish. You can still use the old syntax:"
21072 #: ../fish/guestfish.pod:279
21075 " guestfish [--ro] -i disk.img\n"
21081 #: ../fish/guestfish.pod:281
21084 " guestfish [--ro] -i libvirt-domain\n"
21090 #: ../fish/guestfish.pod:283
21092 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
21093 "then using other commands to mount the filesystems that were found."
21098 #: ../fish/guestfish.pod:287 ../fuse/guestmount.pod:141
21099 msgid "B<--keys-from-stdin>"
21104 #: ../fish/guestfish.pod:289 ../fuse/guestmount.pod:143
21106 "Read key or passphrase parameters from stdin. The default is to try to read "
21107 "passphrases from the user by opening C</dev/tty>."
21112 #: ../fish/guestfish.pod:292
21113 msgid "B<--listen>"
21118 #: ../fish/guestfish.pod:294
21120 "Fork into the background and listen for remote commands. See section L</"
21121 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
21126 #: ../fish/guestfish.pod:297
21127 msgid "B<-m dev[:mountpoint]>"
21132 #: ../fish/guestfish.pod:299
21133 msgid "B<--mount dev[:mountpoint]>"
21138 #: ../fish/guestfish.pod:301
21139 msgid "Mount the named partition or logical volume on the given mountpoint."
21144 #: ../fish/guestfish.pod:303
21145 msgid "If the mountpoint is omitted, it defaults to C</>."
21150 #: ../fish/guestfish.pod:305
21151 msgid "You have to mount something on C</> before most commands will work."
21156 #: ../fish/guestfish.pod:307
21158 "If any I<-m> or I<--mount> options are given, the guest is automatically "
21164 #: ../fish/guestfish.pod:310
21166 "If you don't know what filesystems a disk image contains, you can either run "
21167 "guestfish without this option, then list the partitions, filesystems and LVs "
21168 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
21169 "commands), or you can use the L<virt-filesystems(1)> program."
21174 #: ../fish/guestfish.pod:316
21176 "Using this flag is mostly equivalent to using the C<mount-options> command "
21177 "or the C<mount-ro> command if the I<--ro> flag was given."
21182 #: ../fish/guestfish.pod:319
21188 #: ../fish/guestfish.pod:321
21189 msgid "B<--no-sync>"
21194 #: ../fish/guestfish.pod:323
21196 "Disable autosync. This is enabled by default. See the discussion of "
21197 "autosync in the L<guestfs(3)> manpage."
21202 #: ../fish/guestfish.pod:326
21208 #: ../fish/guestfish.pod:328
21209 msgid "B<--new type>"
21214 #: ../fish/guestfish.pod:330
21220 #: ../fish/guestfish.pod:332
21222 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
21223 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
21224 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
21230 #: ../fish/guestfish.pod:337
21231 msgid "B<--progress-bars>"
21236 #: ../fish/guestfish.pod:339
21237 msgid "Enable progress bars, even when guestfish is used non-interactively."
21242 #: ../fish/guestfish.pod:341
21244 "Progress bars are enabled by default when guestfish is used as an "
21245 "interactive shell."
21250 #: ../fish/guestfish.pod:344
21251 msgid "B<--no-progress-bars>"
21256 #: ../fish/guestfish.pod:346
21257 msgid "Disable progress bars."
21262 #: ../fish/guestfish.pod:348
21263 msgid "B<--remote[=pid]>"
21268 #: ../fish/guestfish.pod:350
21270 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
21271 "CONTROL GUESTFISH OVER A SOCKET> below."
21276 #: ../fish/guestfish.pod:353
21282 #: ../fish/guestfish.pod:355
21288 #: ../fish/guestfish.pod:357
21290 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
21291 "mounts are done read-only."
21296 #: ../fish/guestfish.pod:360
21298 "The option must always be used if the disk image or virtual machine might be "
21299 "running, and is generally recommended in cases where you don't need write "
21300 "access to the disk."
21305 #: ../fish/guestfish.pod:364
21307 "Note that prepared disk images created with I<-N> are not affected by this "
21308 "option. Also commands like C<add> are not affected - you have to specify "
21309 "the C<readonly:true> option explicitly if you need it."
21314 #: ../fish/guestfish.pod:368
21315 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
21320 #: ../fish/guestfish.pod:370 ../fuse/guestmount.pod:208
21321 msgid "B<--selinux>"
21326 #: ../fish/guestfish.pod:372
21327 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
21332 #: ../fish/guestfish.pod:374
21338 #: ../fish/guestfish.pod:376
21339 msgid "B<--verbose>"
21344 #: ../fish/guestfish.pod:378
21346 "Enable very verbose messages. This is particularly useful if you find a bug."
21351 #: ../fish/guestfish.pod:381
21357 #: ../fish/guestfish.pod:383 ../tools/virt-edit.pl:93
21358 #: ../tools/virt-win-reg.pl:112 ../tools/virt-resize.pl:270
21359 #: ../tools/virt-list-filesystems.pl:69 ../tools/virt-tar.pl:114
21360 #: ../tools/virt-make-fs.pl:169 ../tools/virt-list-partitions.pl:70
21361 msgid "B<--version>"
21366 #: ../fish/guestfish.pod:385
21367 msgid "Display the guestfish / libguestfs version number and exit."
21372 #: ../fish/guestfish.pod:387
21378 #: ../fish/guestfish.pod:389
21384 #: ../fish/guestfish.pod:391
21386 "This option does nothing at the moment. See L</OPENING DISKS FOR READ AND "
21392 #: ../fish/guestfish.pod:394
21398 #: ../fish/guestfish.pod:396
21399 msgid "Echo each command before executing it."
21404 #: ../fish/guestfish.pod:400
21405 msgid "COMMANDS ON COMMAND LINE"
21410 #: ../fish/guestfish.pod:402
21412 "Any additional (non-option) arguments are treated as commands to execute."
21417 #: ../fish/guestfish.pod:405
21419 "Commands to execute should be separated by a colon (C<:>), where the colon "
21420 "is a separate parameter. Thus:"
21425 #: ../fish/guestfish.pod:408
21428 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
21434 #: ../fish/guestfish.pod:410
21436 "If there are no additional arguments, then we enter a shell, either an "
21437 "interactive shell with a prompt (if the input is a terminal) or a non-"
21438 "interactive shell."
21443 #: ../fish/guestfish.pod:414
21445 "In either command line mode or non-interactive shell, the first command that "
21446 "gives an error causes the whole shell to exit. In interactive mode (with a "
21447 "prompt) if a command fails, you can continue to enter commands."
21452 #: ../fish/guestfish.pod:419
21453 msgid "USING launch (OR run)"
21458 #: ../fish/guestfish.pod:421
21460 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
21461 "then launch it, then mount any disks you need, and finally issue actions/"
21462 "commands. So the general order of the day is:"
21467 #: ../fish/guestfish.pod:429
21468 msgid "add or -a/--add"
21473 #: ../fish/guestfish.pod:433
21474 msgid "launch (aka run)"
21479 #: ../fish/guestfish.pod:437
21480 msgid "mount or -m/--mount"
21485 #: ../fish/guestfish.pod:441
21486 msgid "any other commands"
21491 #: ../fish/guestfish.pod:445
21493 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
21494 "guest before mounting or performing any other commands."
21499 #: ../fish/guestfish.pod:448
21501 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
21502 "I<--new> options were given then C<run> is done automatically, simply "
21503 "because guestfish can't perform the action you asked for without doing this."
21508 #: ../fish/guestfish.pod:453
21509 msgid "OPENING DISKS FOR READ AND WRITE"
21514 #: ../fish/guestfish.pod:455
21516 "The guestfish (and L<guestmount(1)>) options I<--ro> and I<--rw> affect "
21517 "whether the other command line options I<-a>, I<-c>, I<-d>, I<-i> and I<-m> "
21518 "open disk images read-only or for writing."
21523 #: ../fish/guestfish.pod:459
21525 "In libguestfs E<lt> 1.6.2, guestfish and guestmount defaulted to opening "
21526 "disk images supplied on the command line for write. To open a disk image "
21527 "read-only you have to do I<-a image --ro>."
21532 #: ../fish/guestfish.pod:463
21534 "This matters: If you accidentally open a live VM disk image writable then "
21535 "you will cause irreversible disk corruption."
21539 #: ../fish/guestfish.pod:466
21541 "By libguestfs 1.10 we intend to change the default the other way. Disk "
21542 "images will be opened read-only. You will have to either specify "
21543 "I<guestfish --rw> or change a configuration file in order to get write "
21544 "access for disk images specified by those other command line options."
21549 #: ../fish/guestfish.pod:471
21551 "This version of guestfish has a I<--rw> option which does nothing (it is "
21552 "already the default). However it is highly recommended that you use this "
21553 "option to indicate that guestfish needs write access, and to prepare your "
21554 "scripts for the day when this option will be required for write access."
21559 #: ../fish/guestfish.pod:477
21561 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
21562 "other libguestfs program apart from guestfish and guestmount."
21567 #: ../fish/guestfish.pod:480
21573 #: ../fish/guestfish.pod:482
21575 "You can quote ordinary parameters using either single or double quotes. For "
21581 #: ../fish/guestfish.pod:485
21584 " add \"file with a space.img\"\n"
21590 #: ../fish/guestfish.pod:487
21593 " rm '/file name'\n"
21599 #: ../fish/guestfish.pod:489
21608 #: ../fish/guestfish.pod:491
21610 "A few commands require a list of strings to be passed. For these, use a "
21611 "whitespace-separated list, enclosed in quotes. Strings containing "
21612 "whitespace to be passed through must be enclosed in single quotes. A "
21613 "literal single quote must be escaped with a backslash."
21618 #: ../fish/guestfish.pod:496
21621 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
21622 " command \"/bin/echo 'foo bar'\"\n"
21623 " command \"/bin/echo \\'foo\\'\"\n"
21629 #: ../fish/guestfish.pod:500
21630 msgid "OPTIONAL ARGUMENTS"
21635 #: ../fish/guestfish.pod:502
21637 "Some commands take optional arguments. These arguments appear in this "
21638 "documentation as C<[argname:..]>. You can use them as in these examples:"
21643 #: ../fish/guestfish.pod:506
21646 " add-drive-opts filename\n"
21652 #: ../fish/guestfish.pod:508
21655 " add-drive-opts filename readonly:true\n"
21661 #: ../fish/guestfish.pod:510
21664 " add-drive-opts filename format:qcow2 readonly:false\n"
21670 #: ../fish/guestfish.pod:512
21672 "Each optional argument can appear at most once. All optional arguments must "
21673 "appear after the required ones."
21678 #: ../fish/guestfish.pod:515
21684 #: ../fish/guestfish.pod:517
21686 "This section applies to all commands which can take integers as parameters."
21691 #: ../fish/guestfish.pod:520
21692 msgid "SIZE SUFFIX"
21697 #: ../fish/guestfish.pod:522
21699 "When the command takes a parameter measured in bytes, you can use one of the "
21700 "following suffixes to specify kilobytes, megabytes and larger sizes:"
21705 #: ../fish/guestfish.pod:528
21706 msgid "B<k> or B<K> or B<KiB>"
21711 #: ../fish/guestfish.pod:530
21712 msgid "The size in kilobytes (multiplied by 1024)."
21717 #: ../fish/guestfish.pod:532
21723 #: ../fish/guestfish.pod:534
21724 msgid "The size in SI 1000 byte units."
21729 #: ../fish/guestfish.pod:536
21730 msgid "B<M> or B<MiB>"
21735 #: ../fish/guestfish.pod:538
21736 msgid "The size in megabytes (multiplied by 1048576)."
21741 #: ../fish/guestfish.pod:540
21747 #: ../fish/guestfish.pod:542
21748 msgid "The size in SI 1000000 byte units."
21753 #: ../fish/guestfish.pod:544
21754 msgid "B<G> or B<GiB>"
21759 #: ../fish/guestfish.pod:546
21760 msgid "The size in gigabytes (multiplied by 2**30)."
21765 #: ../fish/guestfish.pod:548
21771 #: ../fish/guestfish.pod:550
21772 msgid "The size in SI 10**9 byte units."
21777 #: ../fish/guestfish.pod:552
21778 msgid "B<T> or B<TiB>"
21783 #: ../fish/guestfish.pod:554
21784 msgid "The size in terabytes (multiplied by 2**40)."
21789 #: ../fish/guestfish.pod:556
21795 #: ../fish/guestfish.pod:558
21796 msgid "The size in SI 10**12 byte units."
21801 #: ../fish/guestfish.pod:560
21802 msgid "B<P> or B<PiB>"
21807 #: ../fish/guestfish.pod:562
21808 msgid "The size in petabytes (multiplied by 2**50)."
21813 #: ../fish/guestfish.pod:564
21819 #: ../fish/guestfish.pod:566
21820 msgid "The size in SI 10**15 byte units."
21825 #: ../fish/guestfish.pod:568
21826 msgid "B<E> or B<EiB>"
21831 #: ../fish/guestfish.pod:570
21832 msgid "The size in exabytes (multiplied by 2**60)."
21837 #: ../fish/guestfish.pod:572
21843 #: ../fish/guestfish.pod:574
21844 msgid "The size in SI 10**18 byte units."
21849 #: ../fish/guestfish.pod:576
21850 msgid "B<Z> or B<ZiB>"
21855 #: ../fish/guestfish.pod:578
21856 msgid "The size in zettabytes (multiplied by 2**70)."
21861 #: ../fish/guestfish.pod:580
21867 #: ../fish/guestfish.pod:582
21868 msgid "The size in SI 10**21 byte units."
21873 #: ../fish/guestfish.pod:584
21874 msgid "B<Y> or B<YiB>"
21879 #: ../fish/guestfish.pod:586
21880 msgid "The size in yottabytes (multiplied by 2**80)."
21885 #: ../fish/guestfish.pod:588
21891 #: ../fish/guestfish.pod:590
21892 msgid "The size in SI 10**24 byte units."
21897 #: ../fish/guestfish.pod:596
21900 " truncate-size /file 1G\n"
21906 #: ../fish/guestfish.pod:598
21907 msgid "would truncate the file to 1 gigabyte."
21912 #: ../fish/guestfish.pod:600
21914 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
21915 "the parameter to L</memsize> is specified in megabytes already). Adding a "
21916 "suffix will probably not do what you expect."
21921 #: ../fish/guestfish.pod:604
21922 msgid "OCTAL AND HEXADECIMAL NUMBERS"
21927 #: ../fish/guestfish.pod:606
21929 "For specifying the radix (base) use the C convention: C<0> to prefix an "
21930 "octal number or C<0x> to prefix a hexadecimal number. For example:"
21935 #: ../fish/guestfish.pod:609
21938 " 1234 decimal number 1234\n"
21939 " 02322 octal number, equivalent to decimal 1234\n"
21940 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
21946 #: ../fish/guestfish.pod:613
21948 "When using the C<chmod> command, you almost always want to specify an octal "
21949 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
21950 "L<chmod(1)> program):"
21955 #: ../fish/guestfish.pod:617
21958 " chmod 0777 /public # OK\n"
21959 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
21965 #: ../fish/guestfish.pod:620
21967 "Commands that return numbers usually print them in decimal, but some "
21968 "commands print numbers in other radices (eg. C<umask> prints the mode in "
21969 "octal, preceeded by C<0>)."
21974 #: ../fish/guestfish.pod:624
21975 msgid "WILDCARDS AND GLOBBING"
21980 #: ../fish/guestfish.pod:626
21982 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
21983 "(globbing) by default. So for example the following will not do what you "
21989 #: ../fish/guestfish.pod:630
21998 #: ../fish/guestfish.pod:632
22000 "Assuming you don't have a directory called literally C</home/*> then the "
22001 "above command will return an error."
22006 #: ../fish/guestfish.pod:635
22007 msgid "To perform wildcard expansion, use the C<glob> command."
22012 #: ../fish/guestfish.pod:637
22015 " glob rm-rf /home/*\n"
22021 #: ../fish/guestfish.pod:639
22023 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
22024 "many times), equivalent to:"
22029 #: ../fish/guestfish.pod:642
22032 " rm-rf /home/jim\n"
22033 " rm-rf /home/joe\n"
22034 " rm-rf /home/mary\n"
22040 #: ../fish/guestfish.pod:646
22041 msgid "C<glob> only works on simple guest paths and not on device names."
22046 #: ../fish/guestfish.pod:648
22048 "If you have several parameters, each containing a wildcard, then glob will "
22049 "perform a Cartesian product."
22054 #: ../fish/guestfish.pod:651
22060 #: ../fish/guestfish.pod:653
22062 "Any line which starts with a I<#> character is treated as a comment and "
22063 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
22064 "a command. For example:"
22069 #: ../fish/guestfish.pod:657
22072 " # this is a comment\n"
22073 " # this is a comment\n"
22074 " foo # NOT a comment\n"
22080 #: ../fish/guestfish.pod:661
22081 msgid "Blank lines are also ignored."
22086 #: ../fish/guestfish.pod:663
22087 msgid "RUNNING COMMANDS LOCALLY"
22092 #: ../fish/guestfish.pod:665
22094 "Any line which starts with a I<!> character is treated as a command sent to "
22095 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
22100 #: ../fish/guestfish.pod:669
22104 " tgz-out /remote local/remote-data.tar.gz\n"
22110 #: ../fish/guestfish.pod:672
22112 "will create a directory C<local> on the host, and then export the contents "
22113 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
22114 "(See C<tgz-out>)."
22119 #: ../fish/guestfish.pod:676
22121 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
22122 "effect, due to the way that subprocesses work in Unix."
22127 #: ../fish/guestfish.pod:679
22133 #: ../fish/guestfish.pod:681
22135 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
22136 "command (a guestfish command) to the second command (any host command). For "
22142 #: ../fish/guestfish.pod:685
22145 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
22151 #: ../fish/guestfish.pod:687
22153 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
22154 "program). The above command would list all accounts in the guest filesystem "
22155 "which have UID 0, ie. root accounts including backdoors. Other examples:"
22160 #: ../fish/guestfish.pod:692
22163 " hexdump /bin/ls | head\n"
22164 " list-devices | tail -1\n"
22165 " tgz-out / - | tar ztf -\n"
22171 #: ../fish/guestfish.pod:696
22173 "The space before the pipe symbol is required, any space after the pipe "
22174 "symbol is optional. Everything after the pipe symbol is just passed "
22175 "straight to the host shell, so it can contain redirections, globs and "
22176 "anything else that makes sense on the host side."
22181 #: ../fish/guestfish.pod:701
22183 "To use a literal argument which begins with a pipe symbol, you have to quote "
22189 #: ../fish/guestfish.pod:704
22198 #: ../fish/guestfish.pod:706
22199 msgid "HOME DIRECTORIES"
22204 #: ../fish/guestfish.pod:708
22206 "If a parameter starts with the character C<~> then the tilde may be expanded "
22207 "as a home directory path (either C<~> for the current user's home directory, "
22208 "or C<~user> for another user)."
22213 #: ../fish/guestfish.pod:712
22215 "Note that home directory expansion happens for users known I<on the host>, "
22216 "not in the guest filesystem."
22221 #: ../fish/guestfish.pod:715
22223 "To use a literal argument which begins with a tilde, you have to quote it, "
22229 #: ../fish/guestfish.pod:718
22238 #: ../fish/guestfish.pod:722
22240 "Libguestfs has some support for Linux guests encrypted according to the "
22241 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
22242 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
22243 "LUKS is supported."
22248 #: ../fish/guestfish.pod:727
22249 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
22254 #: ../fish/guestfish.pod:729
22257 " ><fs> vfs-type /dev/sda2\n"
22264 #: ../fish/guestfish.pod:732
22266 "Then open those devices using L</luks-open>. This creates a device-mapper "
22267 "device called C</dev/mapper/luksdev>."
22272 #: ../fish/guestfish.pod:735
22275 " ><fs> luks-open /dev/sda2 luksdev\n"
22276 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
22282 #: ../fish/guestfish.pod:738
22284 "Finally you have to tell LVM to scan for volume groups on the newly created "
22290 #: ../fish/guestfish.pod:741
22294 " vg-activate-all true\n"
22300 #: ../fish/guestfish.pod:744
22301 msgid "The logical volume(s) can now be mounted in the usual way."
22306 #: ../fish/guestfish.pod:746
22308 "Before closing a LUKS device you must unmount any logical volumes on it and "
22309 "deactivate the volume groups by calling C<vg-activate false VG> on each "
22310 "one. Then you can close the mapper device:"
22315 #: ../fish/guestfish.pod:750
22318 " vg-activate false /dev/VG\n"
22319 " luks-close /dev/mapper/luksdev\n"
22325 #: ../fish/guestfish.pod:753
22326 msgid "WINDOWS PATHS"
22331 #: ../fish/guestfish.pod:755
22333 "If a path is prefixed with C<win:> then you can use Windows-style paths "
22334 "(with some limitations). The following commands are equivalent:"
22339 #: ../fish/guestfish.pod:758
22342 " file /WINDOWS/system32/config/system.LOG\n"
22348 #: ../fish/guestfish.pod:760
22351 " file win:/windows/system32/config/system.log\n"
22357 #: ../fish/guestfish.pod:762
22360 " file win:\\windows\\system32\\config\\system.log\n"
22366 #: ../fish/guestfish.pod:764
22369 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
22375 #: ../fish/guestfish.pod:766
22377 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
22378 "handles case insensitivity like Windows would. This only works in argument "
22379 "positions that expect a path."
22384 #: ../fish/guestfish.pod:770
22385 msgid "UPLOADING AND DOWNLOADING FILES"
22390 #: ../fish/guestfish.pod:772
22392 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
22393 "others which upload from or download to a local file, you can use the "
22394 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
22399 #: ../fish/guestfish.pod:776
22408 #: ../fish/guestfish.pod:778
22410 "reads stdin and creates from that a file C</foo> in the disk image, and:"
22415 #: ../fish/guestfish.pod:781
22418 " tar-out /etc - | tar tf -\n"
22424 #: ../fish/guestfish.pod:783
22426 "writes the tarball to stdout and then pipes that into the external \"tar\" "
22427 "command (see L</PIPES>)."
22432 #: ../fish/guestfish.pod:786
22434 "When using C<-> to read from stdin, the input is read up to the end of "
22435 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
22436 "some arbitrary end marker:"
22441 #: ../fish/guestfish.pod:790
22444 " upload -<<END /foo\n"
22454 #: ../fish/guestfish.pod:796
22456 "Any string of characters can be used instead of C<END>. The end marker must "
22457 "appear on a line of its own, without any preceeding or following characters "
22458 "(not even spaces)."
22463 #: ../fish/guestfish.pod:800
22465 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
22466 "upload local files (so-called \"FileIn\" parameters in the generator)."
22471 #: ../fish/guestfish.pod:803
22472 msgid "EXIT ON ERROR BEHAVIOUR"
22477 #: ../fish/guestfish.pod:805
22479 "By default, guestfish will ignore any errors when in interactive mode (ie. "
22480 "taking commands from a human over a tty), and will exit on the first error "
22481 "in non-interactive mode (scripts, commands given on the command line)."
22486 #: ../fish/guestfish.pod:810
22488 "If you prefix a command with a I<-> character, then that command will not "
22489 "cause guestfish to exit, even if that (one) command returns an error."
22494 #: ../fish/guestfish.pod:814
22495 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
22500 #: ../fish/guestfish.pod:816
22502 "Guestfish can be remote-controlled over a socket. This is useful "
22503 "particularly in shell scripts where you want to make several different "
22504 "changes to a filesystem, but you don't want the overhead of starting up a "
22505 "guestfish process each time."
22510 #: ../fish/guestfish.pod:821
22511 msgid "Start a guestfish server process using:"
22516 #: ../fish/guestfish.pod:823
22519 " eval \"`guestfish --listen`\"\n"
22525 #: ../fish/guestfish.pod:825
22526 msgid "and then send it commands by doing:"
22531 #: ../fish/guestfish.pod:827
22534 " guestfish --remote cmd [...]\n"
22540 #: ../fish/guestfish.pod:829
22541 msgid "To cause the server to exit, send it the exit command:"
22546 #: ../fish/guestfish.pod:831
22549 " guestfish --remote exit\n"
22555 #: ../fish/guestfish.pod:833
22557 "Note that the server will normally exit if there is an error in a command. "
22558 "You can change this in the usual way. See section L</EXIT ON ERROR "
22564 #: ../fish/guestfish.pod:837
22565 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
22570 #: ../fish/guestfish.pod:839
22572 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
22573 "is how the I<--remote> option knows where to send the commands. You can "
22574 "have several guestfish listener processes running using:"
22579 #: ../fish/guestfish.pod:843
22582 " eval \"`guestfish --listen`\"\n"
22583 " pid1=$GUESTFISH_PID\n"
22584 " eval \"`guestfish --listen`\"\n"
22585 " pid2=$GUESTFISH_PID\n"
22587 " guestfish --remote=$pid1 cmd\n"
22588 " guestfish --remote=$pid2 cmd\n"
22594 #: ../fish/guestfish.pod:851
22595 msgid "REMOTE CONTROL AND CSH"
22600 #: ../fish/guestfish.pod:853
22602 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
22608 #: ../fish/guestfish.pod:856
22611 " eval \"`guestfish --listen --csh`\"\n"
22617 #: ../fish/guestfish.pod:858
22618 msgid "REMOTE CONTROL DETAILS"
22623 #: ../fish/guestfish.pod:860
22625 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
22626 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
22627 "and C<$PID> is the process ID of the server."
22632 #: ../fish/guestfish.pod:864
22633 msgid "Guestfish client and server versions must match exactly."
22637 #: ../fish/guestfish.pod:866
22638 msgid "REMOTE CONTROL RUN COMMAND HANGING"
22642 #: ../fish/guestfish.pod:868
22644 "Using the C<run> (or C<launch>) command remotely in a command substitution "
22645 "context hangs, ie. don't do (note the backquotes):"
22649 #: ../fish/guestfish.pod:871
22652 " a=`guestfish --remote run`\n"
22657 #: ../fish/guestfish.pod:873
22659 "Since the C<run> command produces no output on stdout, this is not useful "
22660 "anyway. For further information see L<https://bugzilla.redhat.com/show_bug."
22666 #: ../fish/guestfish.pod:877
22667 msgid "PREPARED DISK IMAGES"
22672 #: ../fish/guestfish.pod:879
22674 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
22675 "preformatted disk images that guestfish can make for you to save typing. "
22676 "This is particularly useful for testing purposes. This option is used "
22677 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
22678 "can be mixed with I<-a>)."
22683 #: ../fish/guestfish.pod:885
22685 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
22686 "the second and so on. Existing files in the current directory are "
22692 #: ../fish/guestfish.pod:889
22694 "The type briefly describes how the disk should be sized, partitioned, how "
22695 "filesystem(s) should be created, and how content should be added. "
22696 "Optionally the type can be followed by extra parameters, separated by C<:> "
22697 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
22698 "allocated disk, containing a single partition, with the partition formatted "
22699 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
22705 #: ../fish/guestfish.pod:897
22706 msgid "To list the available types and any extra parameters they take, run:"
22711 #: ../fish/guestfish.pod:901
22713 "Note that the prepared filesystem is not mounted. You would usually have to "
22714 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
22719 #: ../fish/guestfish.pod:905
22721 "If any I<-N> or I<--new> options are given, the guest is automatically "
22727 #: ../fish/guestfish.pod:910
22728 msgid "Create a 100MB disk with an ext4-formatted partition:"
22733 #: ../fish/guestfish.pod:912
22736 " guestfish -N fs:ext4\n"
22742 #: ../fish/guestfish.pod:914
22743 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
22748 #: ../fish/guestfish.pod:916
22751 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
22757 #: ../fish/guestfish.pod:918
22758 msgid "Create a blank 200MB disk:"
22763 #: ../fish/guestfish.pod:920
22766 " guestfish -N disk:200M\n"
22772 #: ../fish/guestfish.pod:922
22773 msgid "PROGRESS BARS"
22778 #: ../fish/guestfish.pod:924
22780 "Some (not all) long-running commands send progress notification messages as "
22781 "they are running. Guestfish turns these messages into progress bars."
22786 #: ../fish/guestfish.pod:928
22788 "When a command that supports progress bars takes longer than two seconds to "
22789 "run, and if progress bars are enabled, then you will see one appearing below "
22795 #: ../fish/guestfish.pod:932
22798 " ><fs> copy-size /large-file /another-file 2048M\n"
22799 " / 10% [#####-----------------------------------------] 00:30\n"
22805 #: ../fish/guestfish.pod:935
22807 "The spinner on the left hand side moves round once for every progress "
22808 "notification received from the backend. This is a (reasonably) golden "
22809 "assurance that the command is \"doing something\" even if the progress bar "
22810 "is not moving, because the command is able to send the progress "
22811 "notifications. When the bar reaches 100% and the command finishes, the "
22812 "spinner disappears."
22817 #: ../fish/guestfish.pod:942
22819 "Progress bars are enabled by default when guestfish is used interactively. "
22820 "You can enable them even for non-interactive modes using I<--progress-bars>, "
22821 "and you can disable them completely using I<--no-progress-bars>."
22826 #: ../fish/guestfish.pod:947
22827 msgid "GUESTFISH COMMANDS"
22832 #: ../fish/guestfish.pod:949
22834 "The commands in this section are guestfish convenience commands, in other "
22835 "words, they are not part of the L<guestfs(3)> API."
22840 #: ../fish/guestfish.pod:952
22846 #: ../fish/guestfish.pod:954
22856 #: ../fish/guestfish.pod:957
22857 msgid "Without any parameter, this provides general help."
22862 #: ../fish/guestfish.pod:959
22863 msgid "With a C<cmd> parameter, this displays detailed help for that command."
22868 #: ../fish/guestfish.pod:961
22869 msgid "quit | exit"
22874 #: ../fish/guestfish.pod:963
22875 msgid "This exits guestfish. You can also use C<^D> key."
22880 #: ../fish/guestfish.pod:965
22881 msgid "@FISH_COMMANDS@"
22886 #: ../fish/guestfish.pod:967
22892 #: ../fish/guestfish.pod:971 ../test-tool/libguestfs-test-tool.pod:83
22898 #: ../fish/guestfish.pod:973
22900 "guestfish returns 0 if the commands completed without error, or 1 if there "
22906 #: ../fish/guestfish.pod:980
22912 #: ../fish/guestfish.pod:982
22914 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
22920 #: ../fish/guestfish.pod:985
22921 msgid "GUESTFISH_PID"
22926 #: ../fish/guestfish.pod:987
22928 "Used with the I<--remote> option to specify the remote guestfish process to "
22929 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
22934 #: ../fish/guestfish.pod:991
22940 #: ../fish/guestfish.pod:993
22942 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
22943 "not specified, the external L<hexedit(1)> program is used."
22948 #: ../fish/guestfish.pod:997
22954 #: ../fish/guestfish.pod:999
22956 "If compiled with GNU readline support, various files in the home directory "
22957 "can be used. See L</FILES>."
22962 #: ../fish/guestfish.pod:1008
22964 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
22965 "effect as using the B<-v> option."
22970 #: ../fish/guestfish.pod:1020
22972 "Set the path that guestfish uses to search for kernel and initrd.img. See "
22973 "the discussion of paths in L<guestfs(3)>."
22978 #: ../fish/guestfish.pod:1031
22979 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
22984 #: ../fish/guestfish.pod:1033
22990 #: ../fish/guestfish.pod:1035
22992 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
22998 #: ../fish/guestfish.pod:1050 ../test-tool/libguestfs-test-tool.pod:88
23004 #: ../fish/guestfish.pod:1054
23005 msgid "$HOME/.guestfish"
23010 #: ../fish/guestfish.pod:1056
23012 "If compiled with GNU readline support, then the command history is saved in "
23018 #: ../fish/guestfish.pod:1059
23019 msgid "$HOME/.inputrc"
23024 #: ../fish/guestfish.pod:1061
23025 msgid "/etc/inputrc"
23030 #: ../fish/guestfish.pod:1063
23032 "If compiled with GNU readline support, then these files can be used to "
23033 "configure readline. For further information, please see L<readline(3)/"
23034 "INITIALIZATION FILE>."
23039 #: ../fish/guestfish.pod:1067
23040 msgid "To write rules which only apply to guestfish, use:"
23045 #: ../fish/guestfish.pod:1069
23056 #: ../fish/guestfish.pod:1073
23058 "Variables that you can set in inputrc that change the behaviour of guestfish "
23059 "in useful ways include:"
23064 #: ../fish/guestfish.pod:1078
23065 msgid "completion-ignore-case (default: on)"
23070 #: ../fish/guestfish.pod:1080
23072 "By default, guestfish will ignore case when tab-completing paths on the "
23078 #: ../fish/guestfish.pod:1083
23081 " set completion-ignore-case off\n"
23087 #: ../fish/guestfish.pod:1085
23088 msgid "to make guestfish case sensitive."
23093 #: ../fish/guestfish.pod:1089
23099 #: ../fish/guestfish.pod:1091
23100 msgid "test2.img (etc)"
23105 #: ../fish/guestfish.pod:1093
23107 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
23108 "will be created in the file C<test1.img> in the current directory. The "
23109 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
23110 "the same name will be overwritten."
23115 #: ../fish/guestfish.pod:1102
23117 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-df(1)>, "
23118 "L<virt-edit(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-"
23119 "filesystems(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)"
23120 ">, L<virt-rescue(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<virt-win-reg(1)>, "
23126 #: ../fish/guestfish.pod:1128 ../test-tool/libguestfs-test-tool.pod:124
23127 #: ../fuse/guestmount.pod:253 ../tools/virt-edit.pl:415
23128 #: ../tools/virt-win-reg.pl:606 ../tools/virt-resize.pl:1512
23129 #: ../tools/virt-list-filesystems.pl:210 ../tools/virt-tar.pl:300
23130 #: ../tools/virt-make-fs.pl:572 ../tools/virt-list-partitions.pl:277
23132 "This program is free software; you can redistribute it and/or modify it "
23133 "under the terms of the GNU General Public License as published by the Free "
23134 "Software Foundation; either version 2 of the License, or (at your option) "
23135 "any later version."
23140 #: ../fish/guestfish.pod:1133 ../test-tool/libguestfs-test-tool.pod:129
23141 #: ../fuse/guestmount.pod:258 ../tools/virt-edit.pl:420
23142 #: ../tools/virt-win-reg.pl:611 ../tools/virt-resize.pl:1517
23143 #: ../tools/virt-list-filesystems.pl:215 ../tools/virt-tar.pl:305
23144 #: ../tools/virt-make-fs.pl:577 ../tools/virt-list-partitions.pl:282
23146 "This program is distributed in the hope that it will be useful, but WITHOUT "
23147 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
23148 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
23154 #: ../fish/guestfish.pod:1138 ../test-tool/libguestfs-test-tool.pod:134
23155 #: ../fuse/guestmount.pod:263 ../tools/virt-edit.pl:425
23156 #: ../tools/virt-win-reg.pl:616 ../tools/virt-resize.pl:1522
23157 #: ../tools/virt-list-filesystems.pl:220 ../tools/virt-tar.pl:310
23158 #: ../tools/virt-make-fs.pl:582 ../tools/virt-list-partitions.pl:287
23160 "You should have received a copy of the GNU General Public License along with "
23161 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
23162 "Ave, Cambridge, MA 02139, USA."
23167 #: ../fish/guestfish-actions.pod:1
23173 #: ../fish/guestfish-actions.pod:3
23176 " add-cdrom filename\n"
23182 #: ../fish/guestfish-actions.pod:15
23184 "This call checks for the existence of C<filename>. This stops you from "
23185 "specifying other types of drive which are supported by qemu such as C<nbd:> "
23186 "and C<http:> URLs. To specify those, use the general L</config> call "
23192 #: ../fish/guestfish-actions.pod:22
23194 "If you just want to add an ISO file (often you use this as an efficient way "
23195 "to transfer large files into the guest), then you should probably use L</add-"
23196 "drive-ro> instead."
23200 #: ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:151
23201 #: ../fish/guestfish-actions.pod:165
23203 "This function is deprecated. In new code, use the L</add_drive_opts> call "
23209 #: ../fish/guestfish-actions.pod:35
23215 #: ../fish/guestfish-actions.pod:37
23221 #: ../fish/guestfish-actions.pod:39
23224 " add-domain dom [libvirturi:..] [readonly:..] [iface:..]\n"
23230 #: ../fish/guestfish-actions.pod:41
23232 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
23233 "It works by connecting to libvirt, requesting the domain and domain XML from "
23234 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
23239 #: ../fish/guestfish-actions.pod:64
23241 "The other optional parameters are passed directly through to L</add-drive-"
23247 #: ../fish/guestfish-actions.pod:67 ../fish/guestfish-actions.pod:131
23248 #: ../fish/guestfish-actions.pod:2872
23250 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
23255 #: ../fish/guestfish-actions.pod:69
23261 #: ../fish/guestfish-actions.pod:71
23264 " add-drive filename\n"
23270 #: ../fish/guestfish-actions.pod:73
23272 "This function is the equivalent of calling L</add-drive-opts> with no "
23273 "optional parameters, so the disk is added writable, with the format being "
23274 "detected automatically."
23279 #: ../fish/guestfish-actions.pod:77
23281 "Automatic detection of the format opens you up to a potential security hole "
23282 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
23283 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
23284 "you should think about replacing calls to this function with calls to L</add-"
23285 "drive-opts>, and specifying the format."
23290 #: ../fish/guestfish-actions.pod:84
23291 msgid "add-drive-opts"
23296 #: ../fish/guestfish-actions.pod:86
23302 #: ../fish/guestfish-actions.pod:88
23305 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
23311 #: ../fish/guestfish-actions.pod:115
23313 "This forces the image format. If you omit this (or use L</add-drive> or L</"
23314 "add-drive-ro>) then the format is automatically detected. Possible formats "
23315 "include C<raw> and C<qcow2>."
23320 #: ../fish/guestfish-actions.pod:126
23322 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
23323 "add-drive-with-if> call (q.v.)"
23328 #: ../fish/guestfish-actions.pod:133
23329 msgid "add-drive-ro"
23334 #: ../fish/guestfish-actions.pod:135
23340 #: ../fish/guestfish-actions.pod:137
23343 " add-drive-ro filename\n"
23349 #: ../fish/guestfish-actions.pod:139
23351 "This function is the equivalent of calling L</add-drive-opts> with the "
23352 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
23353 "is added read-only, with the format being detected automatically."
23358 #: ../fish/guestfish-actions.pod:144
23359 msgid "add-drive-ro-with-if"
23364 #: ../fish/guestfish-actions.pod:146
23367 " add-drive-ro-with-if filename iface\n"
23373 #: ../fish/guestfish-actions.pod:148
23375 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
23376 "interface emulation to use at run time."
23381 #: ../fish/guestfish-actions.pod:158
23382 msgid "add-drive-with-if"
23387 #: ../fish/guestfish-actions.pod:160
23390 " add-drive-with-if filename iface\n"
23396 #: ../fish/guestfish-actions.pod:162
23398 "This is the same as L</add-drive> but it allows you to specify the QEMU "
23399 "interface emulation to use at run time."
23404 #: ../fish/guestfish-actions.pod:172
23410 #: ../fish/guestfish-actions.pod:174
23413 " aug-clear augpath\n"
23419 #: ../fish/guestfish-actions.pod:179
23425 #: ../fish/guestfish-actions.pod:181
23434 #: ../fish/guestfish-actions.pod:183
23436 "Close the current Augeas handle and free up any resources used by it. After "
23437 "calling this, you have to call L</aug-init> again before you can use any "
23438 "other Augeas functions."
23443 #: ../fish/guestfish-actions.pod:188
23444 msgid "aug-defnode"
23449 #: ../fish/guestfish-actions.pod:190
23452 " aug-defnode name expr val\n"
23458 #: ../fish/guestfish-actions.pod:195
23460 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
23461 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
23462 "containing that single node."
23467 #: ../fish/guestfish-actions.pod:203
23473 #: ../fish/guestfish-actions.pod:205
23476 " aug-defvar name expr\n"
23482 #: ../fish/guestfish-actions.pod:214
23488 #: ../fish/guestfish-actions.pod:216
23491 " aug-get augpath\n"
23497 #: ../fish/guestfish-actions.pod:221
23503 #: ../fish/guestfish-actions.pod:223
23506 " aug-init root flags\n"
23512 #: ../fish/guestfish-actions.pod:229
23513 msgid "You must call this before using any other L</aug-*> commands."
23517 #: ../fish/guestfish-actions.pod:254
23519 "This option is only useful when debugging Augeas lenses. Use of this option "
23520 "may require additional memory for the libguestfs appliance. You may need to "
23521 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call L</set-memsize>."
23526 #: ../fish/guestfish-actions.pod:269
23527 msgid "Do not load the tree in L</aug-init>."
23532 #: ../fish/guestfish-actions.pod:273
23533 msgid "To close the handle, you can call L</aug-close>."
23538 #: ../fish/guestfish-actions.pod:277
23544 #: ../fish/guestfish-actions.pod:279
23547 " aug-insert augpath label true|false\n"
23553 #: ../fish/guestfish-actions.pod:289
23559 #: ../fish/guestfish-actions.pod:291
23568 #: ../fish/guestfish-actions.pod:298
23574 #: ../fish/guestfish-actions.pod:300
23577 " aug-ls augpath\n"
23583 #: ../fish/guestfish-actions.pod:302
23585 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
23586 "resulting nodes into alphabetical order."
23591 #: ../fish/guestfish-actions.pod:305
23597 #: ../fish/guestfish-actions.pod:307
23600 " aug-match augpath\n"
23606 #: ../fish/guestfish-actions.pod:313
23612 #: ../fish/guestfish-actions.pod:315
23615 " aug-mv src dest\n"
23621 #: ../fish/guestfish-actions.pod:320
23627 #: ../fish/guestfish-actions.pod:322
23630 " aug-rm augpath\n"
23636 #: ../fish/guestfish-actions.pod:328
23642 #: ../fish/guestfish-actions.pod:330
23651 #: ../fish/guestfish-actions.pod:334
23653 "The flags which were passed to L</aug-init> affect exactly how files are "
23659 #: ../fish/guestfish-actions.pod:337
23665 #: ../fish/guestfish-actions.pod:339
23668 " aug-set augpath val\n"
23674 #: ../fish/guestfish-actions.pod:343
23676 "In the Augeas API, it is possible to clear a node by setting the value to "
23677 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
23678 "this call. Instead you must use the L</aug-clear> call."
23683 #: ../fish/guestfish-actions.pod:348
23689 #: ../fish/guestfish-actions.pod:350
23692 " available 'groups ...'\n"
23698 #: ../fish/guestfish-actions.pod:356
23700 "The libguestfs groups, and the functions that those groups correspond to, "
23701 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
23702 "runtime by calling L</available-all-groups>."
23707 #: ../fish/guestfish-actions.pod:380
23708 msgid "You must call L</launch> before calling this function."
23713 #: ../fish/guestfish-actions.pod:402
23715 "This call was added in version C<1.0.80>. In previous versions of "
23716 "libguestfs all you could do would be to speculatively execute a command to "
23717 "find out if the daemon implemented it. See also L</version>."
23722 #: ../fish/guestfish-actions.pod:409
23723 msgid "available-all-groups"
23728 #: ../fish/guestfish-actions.pod:411
23731 " available-all-groups\n"
23737 #: ../fish/guestfish-actions.pod:413
23739 "This command returns a list of all optional groups that this daemon knows "
23740 "about. Note this returns both supported and unsupported groups. To find "
23741 "out which ones the daemon can actually support you have to call L</"
23742 "available> on each member of the returned list."
23747 #: ../fish/guestfish-actions.pod:419
23748 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
23753 #: ../fish/guestfish-actions.pod:421
23759 #: ../fish/guestfish-actions.pod:423
23762 " base64-in (base64file|-) filename\n"
23768 #: ../fish/guestfish-actions.pod:428 ../fish/guestfish-actions.pod:437
23769 #: ../fish/guestfish-actions.pod:661 ../fish/guestfish-actions.pod:830
23770 #: ../fish/guestfish-actions.pod:849 ../fish/guestfish-actions.pod:1223
23771 #: ../fish/guestfish-actions.pod:4236 ../fish/guestfish-actions.pod:4248
23772 #: ../fish/guestfish-actions.pod:4259 ../fish/guestfish-actions.pod:4270
23773 #: ../fish/guestfish-actions.pod:4322 ../fish/guestfish-actions.pod:4331
23774 #: ../fish/guestfish-actions.pod:4385 ../fish/guestfish-actions.pod:4408
23775 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
23780 #: ../fish/guestfish-actions.pod:430
23786 #: ../fish/guestfish-actions.pod:432
23789 " base64-out filename (base64file|-)\n"
23795 #: ../fish/guestfish-actions.pod:439
23796 msgid "blockdev-flushbufs"
23801 #: ../fish/guestfish-actions.pod:441
23804 " blockdev-flushbufs device\n"
23810 #: ../fish/guestfish-actions.pod:448
23811 msgid "blockdev-getbsz"
23816 #: ../fish/guestfish-actions.pod:450
23819 " blockdev-getbsz device\n"
23825 #: ../fish/guestfish-actions.pod:459
23826 msgid "blockdev-getro"
23831 #: ../fish/guestfish-actions.pod:461
23834 " blockdev-getro device\n"
23840 #: ../fish/guestfish-actions.pod:468
23841 msgid "blockdev-getsize64"
23846 #: ../fish/guestfish-actions.pod:470
23849 " blockdev-getsize64 device\n"
23855 #: ../fish/guestfish-actions.pod:474
23856 msgid "See also L</blockdev-getsz>."
23861 #: ../fish/guestfish-actions.pod:478
23862 msgid "blockdev-getss"
23867 #: ../fish/guestfish-actions.pod:480
23870 " blockdev-getss device\n"
23876 #: ../fish/guestfish-actions.pod:485
23878 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
23883 #: ../fish/guestfish-actions.pod:490
23884 msgid "blockdev-getsz"
23889 #: ../fish/guestfish-actions.pod:492
23892 " blockdev-getsz device\n"
23898 #: ../fish/guestfish-actions.pod:497
23900 "See also L</blockdev-getss> for the real sector size of the device, and L</"
23901 "blockdev-getsize64> for the more useful I<size in bytes>."
23906 #: ../fish/guestfish-actions.pod:503
23907 msgid "blockdev-rereadpt"
23912 #: ../fish/guestfish-actions.pod:505
23915 " blockdev-rereadpt device\n"
23921 #: ../fish/guestfish-actions.pod:511
23922 msgid "blockdev-setbsz"
23927 #: ../fish/guestfish-actions.pod:513
23930 " blockdev-setbsz device blocksize\n"
23936 #: ../fish/guestfish-actions.pod:522
23937 msgid "blockdev-setro"
23942 #: ../fish/guestfish-actions.pod:524
23945 " blockdev-setro device\n"
23951 #: ../fish/guestfish-actions.pod:530
23952 msgid "blockdev-setrw"
23957 #: ../fish/guestfish-actions.pod:532
23960 " blockdev-setrw device\n"
23966 #: ../fish/guestfish-actions.pod:538
23967 msgid "case-sensitive-path"
23972 #: ../fish/guestfish-actions.pod:540
23975 " case-sensitive-path path\n"
23981 #: ../fish/guestfish-actions.pod:564
23983 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
23984 "WINDOWS/system32\"> (the exact return value would depend on details of how "
23985 "the directories were originally created under Windows)."
23990 #: ../fish/guestfish-actions.pod:572
23991 msgid "See also L</realpath>."
23996 #: ../fish/guestfish-actions.pod:574
24002 #: ../fish/guestfish-actions.pod:576
24011 #: ../fish/guestfish-actions.pod:580
24013 "Note that this function cannot correctly handle binary files (specifically, "
24014 "files containing C<\\0> character which is treated as end of string). For "
24015 "those you need to use the L</read-file> or L</download> functions which have "
24016 "a more complex interface."
24021 #: ../fish/guestfish-actions.pod:588
24027 #: ../fish/guestfish-actions.pod:590
24030 " checksum csumtype path\n"
24036 #: ../fish/guestfish-actions.pod:633
24037 msgid "To get the checksum for a device, use L</checksum-device>."
24042 #: ../fish/guestfish-actions.pod:635
24043 msgid "To get the checksums for many files, use L</checksums-out>."
24048 #: ../fish/guestfish-actions.pod:637
24049 msgid "checksum-device"
24054 #: ../fish/guestfish-actions.pod:639
24057 " checksum-device csumtype device\n"
24063 #: ../fish/guestfish-actions.pod:641
24065 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
24066 "device named C<device>. For the types of checksums supported see the L</"
24067 "checksum> command."
24072 #: ../fish/guestfish-actions.pod:645
24073 msgid "checksums-out"
24078 #: ../fish/guestfish-actions.pod:647
24081 " checksums-out csumtype directory (sumsfile|-)\n"
24087 #: ../fish/guestfish-actions.pod:663
24093 #: ../fish/guestfish-actions.pod:665
24096 " chmod mode path\n"
24102 #: ../fish/guestfish-actions.pod:676
24108 #: ../fish/guestfish-actions.pod:678
24111 " chown owner group path\n"
24117 #: ../fish/guestfish-actions.pod:686
24123 #: ../fish/guestfish-actions.pod:688
24126 " command 'arguments ...'\n"
24132 #: ../fish/guestfish-actions.pod:695
24134 "The single parameter is an argv-style list of arguments. The first element "
24135 "is the name of the program to run. Subsequent elements are parameters. The "
24136 "list must be non-empty (ie. must contain a program name). Note that the "
24137 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
24142 #: ../fish/guestfish-actions.pod:723
24143 msgid "command-lines"
24148 #: ../fish/guestfish-actions.pod:725
24151 " command-lines 'arguments ...'\n"
24157 #: ../fish/guestfish-actions.pod:727
24159 "This is the same as L</command>, but splits the result into a list of lines."
24164 #: ../fish/guestfish-actions.pod:730
24165 msgid "See also: L</sh-lines>"
24170 #: ../fish/guestfish-actions.pod:735
24176 #: ../fish/guestfish-actions.pod:737
24179 " config qemuparam qemuvalue\n"
24185 #: ../fish/guestfish-actions.pod:748
24191 #: ../fish/guestfish-actions.pod:750
24194 " copy-size src dest size\n"
24200 #: ../fish/guestfish-actions.pod:758
24206 #: ../fish/guestfish-actions.pod:760
24215 #: ../fish/guestfish-actions.pod:765
24221 #: ../fish/guestfish-actions.pod:767
24230 #: ../fish/guestfish-actions.pod:772
24236 #: ../fish/guestfish-actions.pod:774
24245 #: ../fish/guestfish-actions.pod:781
24247 "If the destination is a device, it must be as large or larger than the "
24248 "source file or device, otherwise the copy will fail. This command cannot do "
24249 "partial copies (see L</copy-size>)."
24254 #: ../fish/guestfish-actions.pod:785
24260 #: ../fish/guestfish-actions.pod:787
24269 #: ../fish/guestfish-actions.pod:791 ../fish/guestfish-actions.pod:802
24271 "This command is mostly useful for interactive sessions. It is I<not> "
24272 "intended that you try to parse the output string. Use L</statvfs> from "
24278 #: ../fish/guestfish-actions.pod:795
24284 #: ../fish/guestfish-actions.pod:797
24293 #: ../fish/guestfish-actions.pod:806
24299 #: ../fish/guestfish-actions.pod:808
24308 #: ../fish/guestfish-actions.pod:814
24310 "Another way to get the same information is to enable verbose messages with "
24311 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
24312 "before running the program."
24317 #: ../fish/guestfish-actions.pod:819
24323 #: ../fish/guestfish-actions.pod:821
24326 " download remotefilename (filename|-)\n"
24332 #: ../fish/guestfish-actions.pod:828
24333 msgid "See also L</upload>, L</cat>."
24338 #: ../fish/guestfish-actions.pod:832
24339 msgid "download-offset"
24344 #: ../fish/guestfish-actions.pod:834
24347 " download-offset remotefilename (filename|-) offset size\n"
24353 #: ../fish/guestfish-actions.pod:842
24355 "Note that there is no limit on the amount of data that can be downloaded "
24356 "with this call, unlike with L</pread>, and this call always reads the full "
24357 "amount unless an error occurs."
24362 #: ../fish/guestfish-actions.pod:847
24363 msgid "See also L</download>, L</pread>."
24368 #: ../fish/guestfish-actions.pod:851
24369 msgid "drop-caches"
24374 #: ../fish/guestfish-actions.pod:853
24377 " drop-caches whattodrop\n"
24383 #: ../fish/guestfish-actions.pod:865
24389 #: ../fish/guestfish-actions.pod:867
24398 #: ../fish/guestfish-actions.pod:879
24404 #: ../fish/guestfish-actions.pod:881
24407 " e2fsck-f device\n"
24413 #: ../fish/guestfish-actions.pod:887
24415 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
24416 "should use L</fsck>."
24421 #: ../fish/guestfish-actions.pod:890
24422 msgid "echo-daemon"
24427 #: ../fish/guestfish-actions.pod:892
24430 " echo-daemon 'words ...'\n"
24436 #: ../fish/guestfish-actions.pod:899
24437 msgid "See also L</ping-daemon>."
24442 #: ../fish/guestfish-actions.pod:901
24448 #: ../fish/guestfish-actions.pod:903
24451 " egrep regex path\n"
24457 #: ../fish/guestfish-actions.pod:911
24463 #: ../fish/guestfish-actions.pod:913
24466 " egrepi regex path\n"
24472 #: ../fish/guestfish-actions.pod:921
24478 #: ../fish/guestfish-actions.pod:923
24481 " equal file1 file2\n"
24487 #: ../fish/guestfish-actions.pod:930
24493 #: ../fish/guestfish-actions.pod:932
24502 #: ../fish/guestfish-actions.pod:937
24503 msgid "See also L</is-file>, L</is-dir>, L</stat>."
24508 #: ../fish/guestfish-actions.pod:939
24514 #: ../fish/guestfish-actions.pod:941
24517 " fallocate path len\n"
24522 #: ../fish/guestfish-actions.pod:951
24524 "This function is deprecated. In new code, use the L</fallocate64> call "
24530 #: ../fish/guestfish-actions.pod:958
24531 msgid "fallocate64"
24536 #: ../fish/guestfish-actions.pod:960
24539 " fallocate64 path len\n"
24545 #: ../fish/guestfish-actions.pod:966
24547 "Note that this call allocates disk blocks for the file. To create a sparse "
24548 "file use L</truncate-size> instead."
24553 #: ../fish/guestfish-actions.pod:969
24555 "The deprecated call L</fallocate> does the same, but owing to an oversight "
24556 "it only allowed 30 bit lengths to be specified, effectively limiting the "
24557 "maximum size of files created through that call to 1GB."
24562 #: ../fish/guestfish-actions.pod:978
24568 #: ../fish/guestfish-actions.pod:980
24571 " fgrep pattern path\n"
24577 #: ../fish/guestfish-actions.pod:988
24583 #: ../fish/guestfish-actions.pod:990
24586 " fgrepi pattern path\n"
24592 #: ../fish/guestfish-actions.pod:998
24598 #: ../fish/guestfish-actions.pod:1000
24606 #: ../fish/guestfish-actions.pod:1016
24608 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
24614 #: ../fish/guestfish-actions.pod:1019
24615 msgid "file-architecture"
24620 #: ../fish/guestfish-actions.pod:1021
24623 " file-architecture filename\n"
24629 #: ../fish/guestfish-actions.pod:1124
24635 #: ../fish/guestfish-actions.pod:1126
24644 #: ../fish/guestfish-actions.pod:1130
24646 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
24647 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
24652 #: ../fish/guestfish-actions.pod:1134
24658 #: ../fish/guestfish-actions.pod:1136
24661 " fill c len path\n"
24667 #: ../fish/guestfish-actions.pod:1142
24669 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
24670 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
24671 "L</fill-pattern>."
24676 #: ../fish/guestfish-actions.pod:1147
24677 msgid "fill-pattern"
24682 #: ../fish/guestfish-actions.pod:1149
24685 " fill-pattern pattern len path\n"
24691 #: ../fish/guestfish-actions.pod:1151
24693 "This function is like L</fill> except that it creates a new file of length "
24694 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
24695 "is truncated if necessary to ensure the length of the file is exactly C<len> "
24701 #: ../fish/guestfish-actions.pod:1156
24707 #: ../fish/guestfish-actions.pod:1158
24710 " find directory\n"
24716 #: ../fish/guestfish-actions.pod:1172
24717 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
24722 #: ../fish/guestfish-actions.pod:1185
24723 msgid "See also L</find0>."
24728 #: ../fish/guestfish-actions.pod:1190
24734 #: ../fish/guestfish-actions.pod:1192
24737 " find0 directory (files|-)\n"
24743 #: ../fish/guestfish-actions.pod:1198
24745 "This command works the same way as L</find> with the following exceptions:"
24750 #: ../fish/guestfish-actions.pod:1225
24751 msgid "findfs-label"
24756 #: ../fish/guestfish-actions.pod:1227
24759 " findfs-label label\n"
24765 #: ../fish/guestfish-actions.pod:1233
24766 msgid "To find the label of a filesystem, use L</vfs-label>."
24771 #: ../fish/guestfish-actions.pod:1235
24772 msgid "findfs-uuid"
24777 #: ../fish/guestfish-actions.pod:1237
24780 " findfs-uuid uuid\n"
24786 #: ../fish/guestfish-actions.pod:1243
24787 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
24792 #: ../fish/guestfish-actions.pod:1245
24798 #: ../fish/guestfish-actions.pod:1247
24801 " fsck fstype device\n"
24807 #: ../fish/guestfish-actions.pod:1277
24813 #: ../fish/guestfish-actions.pod:1279
24822 #: ../fish/guestfish-actions.pod:1286
24823 msgid "get-autosync"
24828 #: ../fish/guestfish-actions.pod:1288
24837 #: ../fish/guestfish-actions.pod:1292
24843 #: ../fish/guestfish-actions.pod:1294
24852 #: ../fish/guestfish-actions.pod:1298
24853 msgid "get-e2label"
24858 #: ../fish/guestfish-actions.pod:1300
24861 " get-e2label device\n"
24866 #: ../fish/guestfish-actions.pod:1305
24868 "This function is deprecated. In new code, use the L</vfs_label> call "
24874 #: ../fish/guestfish-actions.pod:1312
24880 #: ../fish/guestfish-actions.pod:1314
24883 " get-e2uuid device\n"
24888 #: ../fish/guestfish-actions.pod:1319
24890 "This function is deprecated. In new code, use the L</vfs_uuid> call instead."
24895 #: ../fish/guestfish-actions.pod:1326
24896 msgid "get-memsize"
24901 #: ../fish/guestfish-actions.pod:1328
24910 #: ../fish/guestfish-actions.pod:1333
24912 "If L</set-memsize> was not called on this handle, and if "
24913 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
24914 "value for memsize."
24919 #: ../fish/guestfish-actions.pod:1340
24920 msgid "get-network"
24925 #: ../fish/guestfish-actions.pod:1342
24934 #: ../fish/guestfish-actions.pod:1346
24940 #: ../fish/guestfish-actions.pod:1348
24949 #: ../fish/guestfish-actions.pod:1355
24955 #: ../fish/guestfish-actions.pod:1357
24961 #: ../fish/guestfish-actions.pod:1359
24970 #: ../fish/guestfish-actions.pod:1366
24976 #: ../fish/guestfish-actions.pod:1368
24985 #: ../fish/guestfish-actions.pod:1375
24986 msgid "get-recovery-proc"
24991 #: ../fish/guestfish-actions.pod:1377
24994 " get-recovery-proc\n"
25000 #: ../fish/guestfish-actions.pod:1381
25001 msgid "get-selinux"
25006 #: ../fish/guestfish-actions.pod:1383
25015 #: ../fish/guestfish-actions.pod:1385
25017 "This returns the current setting of the selinux flag which is passed to the "
25018 "appliance at boot time. See L</set-selinux>."
25023 #: ../fish/guestfish-actions.pod:1391
25029 #: ../fish/guestfish-actions.pod:1393
25038 #: ../fish/guestfish-actions.pod:1400
25044 #: ../fish/guestfish-actions.pod:1402
25053 #: ../fish/guestfish-actions.pod:1406
25059 #: ../fish/guestfish-actions.pod:1408
25068 #: ../fish/guestfish-actions.pod:1410
25070 "Return the current umask. By default the umask is C<022> unless it has been "
25071 "set by calling L</umask>."
25076 #: ../fish/guestfish-actions.pod:1413
25077 msgid "get-verbose"
25082 #: ../fish/guestfish-actions.pod:1415
25091 #: ../fish/guestfish-actions.pod:1419
25097 #: ../fish/guestfish-actions.pod:1421
25106 #: ../fish/guestfish-actions.pod:1425
25107 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
25112 #: ../fish/guestfish-actions.pod:1428
25118 #: ../fish/guestfish-actions.pod:1430
25121 " getxattr path name\n"
25127 #: ../fish/guestfish-actions.pod:1432
25129 "Get a single extended attribute from file C<path> named C<name>. This call "
25130 "follows symlinks. If you want to lookup an extended attribute for the "
25131 "symlink itself, use L</lgetxattr>."
25136 #: ../fish/guestfish-actions.pod:1436 ../fish/guestfish-actions.pod:2289
25138 "Normally it is better to get all extended attributes from a file in one go "
25139 "by calling L</getxattrs>. However some Linux filesystem implementations are "
25140 "buggy and do not provide a way to list out attributes. For these "
25141 "filesystems (notably ntfs-3g) you have to know the names of the extended "
25142 "attributes you want in advance and call this function."
25147 #: ../fish/guestfish-actions.pod:1446
25148 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
25153 #: ../fish/guestfish-actions.pod:1448
25159 #: ../fish/guestfish-actions.pod:1450
25162 " getxattrs path\n"
25168 #: ../fish/guestfish-actions.pod:1458
25169 msgid "See also: L</lgetxattrs>, L<attr(5)>."
25174 #: ../fish/guestfish-actions.pod:1460
25175 msgid "glob-expand"
25180 #: ../fish/guestfish-actions.pod:1462
25183 " glob-expand pattern\n"
25189 #: ../fish/guestfish-actions.pod:1475
25195 #: ../fish/guestfish-actions.pod:1477
25198 " grep regex path\n"
25204 #: ../fish/guestfish-actions.pod:1485
25210 #: ../fish/guestfish-actions.pod:1487
25213 " grepi regex path\n"
25219 #: ../fish/guestfish-actions.pod:1495
25220 msgid "grub-install"
25225 #: ../fish/guestfish-actions.pod:1497
25228 " grub-install root device\n"
25234 #: ../fish/guestfish-actions.pod:1535
25240 #: ../fish/guestfish-actions.pod:1537
25249 #: ../fish/guestfish-actions.pod:1545
25255 #: ../fish/guestfish-actions.pod:1547
25258 " head-n nrlines path\n"
25264 #: ../fish/guestfish-actions.pod:1560
25270 #: ../fish/guestfish-actions.pod:1562
25279 #: ../fish/guestfish-actions.pod:1570
25285 #: ../fish/guestfish-actions.pod:1572
25288 " initrd-cat initrdpath filename\n"
25294 #: ../fish/guestfish-actions.pod:1584
25295 msgid "See also L</initrd-list>."
25300 #: ../fish/guestfish-actions.pod:1589
25301 msgid "initrd-list"
25306 #: ../fish/guestfish-actions.pod:1591
25309 " initrd-list path\n"
25315 #: ../fish/guestfish-actions.pod:1603
25316 msgid "inotify-add-watch"
25321 #: ../fish/guestfish-actions.pod:1605
25324 " inotify-add-watch path mask\n"
25330 #: ../fish/guestfish-actions.pod:1617
25331 msgid "inotify-close"
25336 #: ../fish/guestfish-actions.pod:1619
25345 #: ../fish/guestfish-actions.pod:1625
25346 msgid "inotify-files"
25351 #: ../fish/guestfish-actions.pod:1627
25360 #: ../fish/guestfish-actions.pod:1629
25362 "This function is a helpful wrapper around L</inotify-read> which just "
25363 "returns a list of pathnames of objects that were touched. The returned "
25364 "pathnames are sorted and deduplicated."
25369 #: ../fish/guestfish-actions.pod:1633
25370 msgid "inotify-init"
25375 #: ../fish/guestfish-actions.pod:1635
25378 " inotify-init maxevents\n"
25384 #: ../fish/guestfish-actions.pod:1641
25386 "C<maxevents> is the maximum number of events which will be queued up between "
25387 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
25388 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
25389 "default was 16384 events. Beyond this limit, the kernel throws away events, "
25390 "but records the fact that it threw them away by setting a flag "
25391 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
25396 #: ../fish/guestfish-actions.pod:1651
25398 "Before any events are generated, you have to add some watches to the "
25399 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
25400 "L</inotify-watch-all>."
25405 #: ../fish/guestfish-actions.pod:1657
25407 "Queued up events should be read periodically by calling L</inotify-read> (or "
25408 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
25409 "If you don't read the events out often enough then you risk the internal "
25410 "queue overflowing."
25415 #: ../fish/guestfish-actions.pod:1664
25417 "The handle should be closed after use by calling L</inotify-close>. This "
25418 "also removes any watches automatically."
25423 #: ../fish/guestfish-actions.pod:1673
25424 msgid "inotify-read"
25429 #: ../fish/guestfish-actions.pod:1675
25438 #: ../fish/guestfish-actions.pod:1688
25439 msgid "inotify-rm-watch"
25444 #: ../fish/guestfish-actions.pod:1690
25447 " inotify-rm-watch wd\n"
25453 #: ../fish/guestfish-actions.pod:1692
25454 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
25459 #: ../fish/guestfish-actions.pod:1695
25460 msgid "inspect-get-arch"
25465 #: ../fish/guestfish-actions.pod:1697
25468 " inspect-get-arch root\n"
25474 #: ../fish/guestfish-actions.pod:1699 ../fish/guestfish-actions.pod:1715
25475 #: ../fish/guestfish-actions.pod:1789 ../fish/guestfish-actions.pod:1807
25476 #: ../fish/guestfish-actions.pod:1822 ../fish/guestfish-actions.pod:1843
25477 #: ../fish/guestfish-actions.pod:1858 ../fish/guestfish-actions.pod:1885
25478 #: ../fish/guestfish-actions.pod:1907 ../fish/guestfish-actions.pod:1931
25479 #: ../fish/guestfish-actions.pod:1961 ../fish/guestfish-actions.pod:1996
25480 #: ../fish/guestfish-actions.pod:2012
25482 "This function should only be called with a root device string as returned by "
25488 #: ../fish/guestfish-actions.pod:1702
25490 "This returns the architecture of the inspected operating system. The "
25491 "possible return values are listed under L</file-architecture>."
25496 #: ../fish/guestfish-actions.pod:1711
25497 msgid "inspect-get-distro"
25502 #: ../fish/guestfish-actions.pod:1713
25505 " inspect-get-distro root\n"
25511 #: ../fish/guestfish-actions.pod:1785
25512 msgid "inspect-get-filesystems"
25517 #: ../fish/guestfish-actions.pod:1787
25520 " inspect-get-filesystems root\n"
25526 #: ../fish/guestfish-actions.pod:1800
25528 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
25529 "get-mountpoints>."
25534 #: ../fish/guestfish-actions.pod:1803
25535 msgid "inspect-get-hostname"
25540 #: ../fish/guestfish-actions.pod:1805
25543 " inspect-get-hostname root\n"
25549 #: ../fish/guestfish-actions.pod:1818
25550 msgid "inspect-get-major-version"
25555 #: ../fish/guestfish-actions.pod:1820
25558 " inspect-get-major-version root\n"
25564 #: ../fish/guestfish-actions.pod:1839
25565 msgid "inspect-get-minor-version"
25570 #: ../fish/guestfish-actions.pod:1841
25573 " inspect-get-minor-version root\n"
25579 #: ../fish/guestfish-actions.pod:1851
25581 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
25582 "get-major-version>."
25587 #: ../fish/guestfish-actions.pod:1854
25588 msgid "inspect-get-mountpoints"
25593 #: ../fish/guestfish-actions.pod:1856
25596 " inspect-get-mountpoints root\n"
25602 #: ../fish/guestfish-actions.pod:1878
25604 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
25605 "get-filesystems>."
25610 #: ../fish/guestfish-actions.pod:1881
25611 msgid "inspect-get-package-format"
25616 #: ../fish/guestfish-actions.pod:1883
25619 " inspect-get-package-format root\n"
25625 #: ../fish/guestfish-actions.pod:1888
25627 "This function and L</inspect-get-package-management> return the package "
25628 "format and package management tool used by the inspected operating system. "
25629 "For example for Fedora these functions would return C<rpm> (package format) "
25630 "and C<yum> (package management)."
25635 #: ../fish/guestfish-actions.pod:1903
25636 msgid "inspect-get-package-management"
25641 #: ../fish/guestfish-actions.pod:1905
25644 " inspect-get-package-management root\n"
25650 #: ../fish/guestfish-actions.pod:1910
25652 "L</inspect-get-package-format> and this function return the package format "
25653 "and package management tool used by the inspected operating system. For "
25654 "example for Fedora these functions would return C<rpm> (package format) and "
25655 "C<yum> (package management)."
25660 #: ../fish/guestfish-actions.pod:1927
25661 msgid "inspect-get-product-name"
25666 #: ../fish/guestfish-actions.pod:1929
25669 " inspect-get-product-name root\n"
25675 #: ../fish/guestfish-actions.pod:1944
25676 msgid "inspect-get-roots"
25681 #: ../fish/guestfish-actions.pod:1946
25684 " inspect-get-roots\n"
25690 #: ../fish/guestfish-actions.pod:1948
25692 "This function is a convenient way to get the list of root devices, as "
25693 "returned from a previous call to L</inspect-os>, but without redoing the "
25694 "whole inspection process."
25699 #: ../fish/guestfish-actions.pod:1952
25701 "This returns an empty list if either no root devices were found or the "
25702 "caller has not called L</inspect-os>."
25707 #: ../fish/guestfish-actions.pod:1957
25708 msgid "inspect-get-type"
25713 #: ../fish/guestfish-actions.pod:1959
25716 " inspect-get-type root\n"
25722 #: ../fish/guestfish-actions.pod:1992
25723 msgid "inspect-get-windows-systemroot"
25728 #: ../fish/guestfish-actions.pod:1994
25731 " inspect-get-windows-systemroot root\n"
25737 #: ../fish/guestfish-actions.pod:2008
25738 msgid "inspect-list-applications"
25743 #: ../fish/guestfish-actions.pod:2010
25746 " inspect-list-applications root\n"
25752 #: ../fish/guestfish-actions.pod:2017
25754 "I<Note:> This call works differently from other parts of the inspection "
25755 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
25756 "then mount up the disks, before calling this. Listing applications is a "
25757 "significantly more difficult operation which requires access to the full "
25758 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
25759 "are just returning data cached in the libguestfs handle, this call actually "
25760 "reads parts of the mounted filesystems during the call."
25765 #: ../fish/guestfish-actions.pod:2107
25771 #: ../fish/guestfish-actions.pod:2109
25780 #: ../fish/guestfish-actions.pod:2124
25782 "You can pass the root string(s) returned to other L</inspect-get-*> "
25783 "functions in order to query further information about each operating system, "
25784 "such as the name and version."
25789 #: ../fish/guestfish-actions.pod:2129
25791 "This function uses other libguestfs features such as L</mount-ro> and L</"
25792 "umount-all> in order to mount and unmount filesystems and look at the "
25793 "contents. This should be called with no disks currently mounted. The "
25794 "function may also use Augeas, so any existing Augeas handle will be closed."
25799 #: ../fish/guestfish-actions.pod:2141 ../fish/guestfish-actions.pod:2317
25800 #: ../fish/guestfish-actions.pod:2363
25801 msgid "See also L</list-filesystems>."
25806 #: ../fish/guestfish-actions.pod:2143
25807 msgid "is-blockdev"
25812 #: ../fish/guestfish-actions.pod:2145
25815 " is-blockdev path\n"
25821 #: ../fish/guestfish-actions.pod:2150 ../fish/guestfish-actions.pod:2168
25822 #: ../fish/guestfish-actions.pod:2187 ../fish/guestfish-actions.pod:2196
25823 #: ../fish/guestfish-actions.pod:2206 ../fish/guestfish-actions.pod:2240
25824 #: ../fish/guestfish-actions.pod:2249
25825 msgid "See also L</stat>."
25830 #: ../fish/guestfish-actions.pod:2152
25836 #: ../fish/guestfish-actions.pod:2154
25845 #: ../fish/guestfish-actions.pod:2161
25851 #: ../fish/guestfish-actions.pod:2163
25854 " is-chardev path\n"
25860 #: ../fish/guestfish-actions.pod:2170
25866 #: ../fish/guestfish-actions.pod:2172
25875 #: ../fish/guestfish-actions.pod:2179
25881 #: ../fish/guestfish-actions.pod:2181
25890 #: ../fish/guestfish-actions.pod:2189
25896 #: ../fish/guestfish-actions.pod:2191
25905 #: ../fish/guestfish-actions.pod:2198
25911 #: ../fish/guestfish-actions.pod:2200
25920 #: ../fish/guestfish-actions.pod:2208
25921 msgid "is-launching"
25926 #: ../fish/guestfish-actions.pod:2210
25935 #: ../fish/guestfish-actions.pod:2217
25941 #: ../fish/guestfish-actions.pod:2219
25950 #: ../fish/guestfish-actions.pod:2224
25956 #: ../fish/guestfish-actions.pod:2226
25965 #: ../fish/guestfish-actions.pod:2233
25971 #: ../fish/guestfish-actions.pod:2235
25974 " is-socket path\n"
25980 #: ../fish/guestfish-actions.pod:2242
25986 #: ../fish/guestfish-actions.pod:2244
25989 " is-symlink path\n"
25995 #: ../fish/guestfish-actions.pod:2251
25996 msgid "kill-subprocess"
26001 #: ../fish/guestfish-actions.pod:2253
26004 " kill-subprocess\n"
26010 #: ../fish/guestfish-actions.pod:2257
26016 #: ../fish/guestfish-actions.pod:2259
26022 #: ../fish/guestfish-actions.pod:2261
26031 #: ../fish/guestfish-actions.pod:2269
26037 #: ../fish/guestfish-actions.pod:2271
26040 " lchown owner group path\n"
26046 #: ../fish/guestfish-actions.pod:2273
26048 "Change the file owner to C<owner> and group to C<group>. This is like L</"
26049 "chown> but if C<path> is a symlink then the link itself is changed, not the "
26055 #: ../fish/guestfish-actions.pod:2281
26061 #: ../fish/guestfish-actions.pod:2283
26064 " lgetxattr path name\n"
26070 #: ../fish/guestfish-actions.pod:2299
26071 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
26076 #: ../fish/guestfish-actions.pod:2301
26082 #: ../fish/guestfish-actions.pod:2303
26085 " lgetxattrs path\n"
26091 #: ../fish/guestfish-actions.pod:2305
26093 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
26094 "it returns the extended attributes of the link itself."
26099 #: ../fish/guestfish-actions.pod:2309
26100 msgid "list-devices"
26105 #: ../fish/guestfish-actions.pod:2311
26114 #: ../fish/guestfish-actions.pod:2319
26115 msgid "list-filesystems"
26120 #: ../fish/guestfish-actions.pod:2321
26123 " list-filesystems\n"
26129 #: ../fish/guestfish-actions.pod:2340
26131 "This command runs other libguestfs commands, which might include L</mount> "
26132 "and L</umount>, and therefore you should use this soon after launch and only "
26133 "when nothing is mounted."
26138 #: ../fish/guestfish-actions.pod:2344
26140 "Not all of the filesystems returned will be mountable. In particular, swap "
26141 "partitions are returned in the list. Also this command does not check that "
26142 "each filesystem found is valid and mountable, and some filesystems might be "
26143 "mountable but require special options. Filesystems may not all belong to a "
26144 "single logical operating system (use L</inspect-os> to look for OSes)."
26149 #: ../fish/guestfish-actions.pod:2352
26150 msgid "list-partitions"
26155 #: ../fish/guestfish-actions.pod:2354
26158 " list-partitions\n"
26164 #: ../fish/guestfish-actions.pod:2360
26166 "This does not return logical volumes. For that you will need to call L</"
26172 #: ../fish/guestfish-actions.pod:2365
26178 #: ../fish/guestfish-actions.pod:2367
26187 #: ../fish/guestfish-actions.pod:2375
26193 #: ../fish/guestfish-actions.pod:2377
26196 " ln target linkname\n"
26202 #: ../fish/guestfish-actions.pod:2381
26208 #: ../fish/guestfish-actions.pod:2383
26211 " ln-f target linkname\n"
26217 #: ../fish/guestfish-actions.pod:2388
26223 #: ../fish/guestfish-actions.pod:2390
26226 " ln-s target linkname\n"
26232 #: ../fish/guestfish-actions.pod:2394
26238 #: ../fish/guestfish-actions.pod:2396
26241 " ln-sf target linkname\n"
26247 #: ../fish/guestfish-actions.pod:2401
26248 msgid "lremovexattr"
26253 #: ../fish/guestfish-actions.pod:2403
26256 " lremovexattr xattr path\n"
26262 #: ../fish/guestfish-actions.pod:2405
26264 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
26265 "it removes an extended attribute of the link itself."
26270 #: ../fish/guestfish-actions.pod:2409
26276 #: ../fish/guestfish-actions.pod:2411
26285 #: ../fish/guestfish-actions.pod:2417
26287 "This command is mostly useful for interactive sessions. Programs should "
26288 "probably use L</readdir> instead."
26293 #: ../fish/guestfish-actions.pod:2420
26299 #: ../fish/guestfish-actions.pod:2422
26302 " lsetxattr xattr val vallen path\n"
26308 #: ../fish/guestfish-actions.pod:2424
26310 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
26311 "sets an extended attribute of the link itself."
26316 #: ../fish/guestfish-actions.pod:2428
26322 #: ../fish/guestfish-actions.pod:2430
26331 #: ../fish/guestfish-actions.pod:2434
26333 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
26334 "the link is stat-ed, not the file it refers to."
26339 #: ../fish/guestfish-actions.pod:2440
26345 #: ../fish/guestfish-actions.pod:2442
26348 " lstatlist path 'names ...'\n"
26354 #: ../fish/guestfish-actions.pod:2444
26356 "This call allows you to perform the L</lstat> operation on multiple files, "
26357 "where all files are in the directory C<path>. C<names> is the list of files "
26358 "from this directory."
26363 #: ../fish/guestfish-actions.pod:2453
26365 "This call is intended for programs that want to efficiently list a directory "
26366 "contents without making many round-trips. See also L</lxattrlist> for a "
26367 "similarly efficient call for getting extended attributes. Very long "
26368 "directory listings might cause the protocol message size to be exceeded, "
26369 "causing this call to fail. The caller must split up such requests into "
26370 "smaller groups of names."
26375 #: ../fish/guestfish-actions.pod:2461
26376 msgid "luks-add-key"
26381 #: ../fish/guestfish-actions.pod:2463
26384 " luks-add-key device keyslot\n"
26390 #: ../fish/guestfish-actions.pod:2470
26392 "Note that if C<keyslot> already contains a key, then this command will "
26393 "fail. You have to use L</luks-kill-slot> first to remove that key."
26398 #: ../fish/guestfish-actions.pod:2474 ../fish/guestfish-actions.pod:2496
26399 #: ../fish/guestfish-actions.pod:2509 ../fish/guestfish-actions.pod:2523
26400 #: ../fish/guestfish-actions.pod:2546 ../fish/guestfish-actions.pod:2556
26402 "This command has one or more key or passphrase parameters. Guestfish will "
26403 "prompt for these separately."
26408 #: ../fish/guestfish-actions.pod:2477
26414 #: ../fish/guestfish-actions.pod:2479
26417 " luks-close device\n"
26423 #: ../fish/guestfish-actions.pod:2481
26425 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
26426 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
26427 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
26433 #: ../fish/guestfish-actions.pod:2487
26434 msgid "luks-format"
26439 #: ../fish/guestfish-actions.pod:2489
26442 " luks-format device keyslot\n"
26448 #: ../fish/guestfish-actions.pod:2502
26449 msgid "luks-format-cipher"
26454 #: ../fish/guestfish-actions.pod:2504
26457 " luks-format-cipher device keyslot cipher\n"
26463 #: ../fish/guestfish-actions.pod:2506
26465 "This command is the same as L</luks-format> but it also allows you to set "
26466 "the C<cipher> used."
26471 #: ../fish/guestfish-actions.pod:2515
26472 msgid "luks-kill-slot"
26477 #: ../fish/guestfish-actions.pod:2517
26480 " luks-kill-slot device keyslot\n"
26486 #: ../fish/guestfish-actions.pod:2526
26492 #: ../fish/guestfish-actions.pod:2528
26495 " luks-open device mapname\n"
26501 #: ../fish/guestfish-actions.pod:2542
26503 "If this block device contains LVM volume groups, then calling L</vgscan> "
26504 "followed by L</vg-activate-all> will make them visible."
26509 #: ../fish/guestfish-actions.pod:2549
26510 msgid "luks-open-ro"
26515 #: ../fish/guestfish-actions.pod:2551
26518 " luks-open-ro device mapname\n"
26524 #: ../fish/guestfish-actions.pod:2553
26526 "This is the same as L</luks-open> except that a read-only mapping is created."
26531 #: ../fish/guestfish-actions.pod:2559
26537 #: ../fish/guestfish-actions.pod:2561
26540 " lvcreate logvol volgroup mbytes\n"
26546 #: ../fish/guestfish-actions.pod:2566
26547 msgid "lvm-canonical-lv-name"
26552 #: ../fish/guestfish-actions.pod:2568
26555 " lvm-canonical-lv-name lvname\n"
26561 #: ../fish/guestfish-actions.pod:2577
26562 msgid "See also L</is-lv>."
26567 #: ../fish/guestfish-actions.pod:2579
26568 msgid "lvm-clear-filter"
26573 #: ../fish/guestfish-actions.pod:2581
26576 " lvm-clear-filter\n"
26582 #: ../fish/guestfish-actions.pod:2583
26584 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
26590 #: ../fish/guestfish-actions.pod:2589
26591 msgid "lvm-remove-all"
26596 #: ../fish/guestfish-actions.pod:2591
26599 " lvm-remove-all\n"
26605 #: ../fish/guestfish-actions.pod:2599
26606 msgid "lvm-set-filter"
26611 #: ../fish/guestfish-actions.pod:2601
26614 " lvm-set-filter 'devices ...'\n"
26620 #: ../fish/guestfish-actions.pod:2626
26626 #: ../fish/guestfish-actions.pod:2628
26629 " lvremove device\n"
26635 #: ../fish/guestfish-actions.pod:2636
26641 #: ../fish/guestfish-actions.pod:2638
26644 " lvrename logvol newlogvol\n"
26650 #: ../fish/guestfish-actions.pod:2642
26656 #: ../fish/guestfish-actions.pod:2644
26659 " lvresize device mbytes\n"
26665 #: ../fish/guestfish-actions.pod:2650
26666 msgid "lvresize-free"
26671 #: ../fish/guestfish-actions.pod:2652
26674 " lvresize-free lv percent\n"
26680 #: ../fish/guestfish-actions.pod:2660
26686 #: ../fish/guestfish-actions.pod:2662
26695 #: ../fish/guestfish-actions.pod:2670
26696 msgid "See also L</lvs-full>, L</list-filesystems>."
26701 #: ../fish/guestfish-actions.pod:2672
26707 #: ../fish/guestfish-actions.pod:2674
26716 #: ../fish/guestfish-actions.pod:2679
26722 #: ../fish/guestfish-actions.pod:2681
26731 #: ../fish/guestfish-actions.pod:2685
26737 #: ../fish/guestfish-actions.pod:2687
26740 " lxattrlist path 'names ...'\n"
26746 #: ../fish/guestfish-actions.pod:2703
26748 "This call is intended for programs that want to efficiently list a directory "
26749 "contents without making many round-trips. See also L</lstatlist> for a "
26750 "similarly efficient call for getting standard stats. Very long directory "
26751 "listings might cause the protocol message size to be exceeded, causing this "
26752 "call to fail. The caller must split up such requests into smaller groups of "
26758 #: ../fish/guestfish-actions.pod:2711
26764 #: ../fish/guestfish-actions.pod:2713
26773 #: ../fish/guestfish-actions.pod:2717
26779 #: ../fish/guestfish-actions.pod:2719
26782 " mkdir-mode path mode\n"
26788 #: ../fish/guestfish-actions.pod:2728
26789 msgid "See also L</mkdir>, L</umask>"
26794 #: ../fish/guestfish-actions.pod:2730
26800 #: ../fish/guestfish-actions.pod:2732
26809 #: ../fish/guestfish-actions.pod:2737
26815 #: ../fish/guestfish-actions.pod:2739
26818 " mkdtemp template\n"
26824 #: ../fish/guestfish-actions.pod:2760
26830 #: ../fish/guestfish-actions.pod:2762
26833 " mke2fs-J fstype blocksize device journal\n"
26839 #: ../fish/guestfish-actions.pod:2770
26840 msgid "See also L</mke2journal>."
26845 #: ../fish/guestfish-actions.pod:2772
26851 #: ../fish/guestfish-actions.pod:2774
26854 " mke2fs-JL fstype blocksize device label\n"
26860 #: ../fish/guestfish-actions.pod:2779
26861 msgid "See also L</mke2journal-L>."
26866 #: ../fish/guestfish-actions.pod:2781
26872 #: ../fish/guestfish-actions.pod:2783
26875 " mke2fs-JU fstype blocksize device uuid\n"
26881 #: ../fish/guestfish-actions.pod:2788
26882 msgid "See also L</mke2journal-U>."
26887 #: ../fish/guestfish-actions.pod:2790
26888 msgid "mke2journal"
26893 #: ../fish/guestfish-actions.pod:2792
26896 " mke2journal blocksize device\n"
26902 #: ../fish/guestfish-actions.pod:2799
26903 msgid "mke2journal-L"
26908 #: ../fish/guestfish-actions.pod:2801
26911 " mke2journal-L blocksize label device\n"
26917 #: ../fish/guestfish-actions.pod:2805
26918 msgid "mke2journal-U"
26923 #: ../fish/guestfish-actions.pod:2807
26926 " mke2journal-U blocksize uuid device\n"
26932 #: ../fish/guestfish-actions.pod:2811
26938 #: ../fish/guestfish-actions.pod:2813
26941 " mkfifo mode path\n"
26947 #: ../fish/guestfish-actions.pod:2815
26949 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
26950 "is just a convenient wrapper around L</mknod>."
26955 #: ../fish/guestfish-actions.pod:2821
26961 #: ../fish/guestfish-actions.pod:2823
26964 " mkfs fstype device\n"
26970 #: ../fish/guestfish-actions.pod:2829
26976 #: ../fish/guestfish-actions.pod:2831
26979 " mkfs-b fstype blocksize device\n"
26985 #: ../fish/guestfish-actions.pod:2833
26987 "This call is similar to L</mkfs>, but it allows you to control the block "
26988 "size of the resulting filesystem. Supported block sizes depend on the "
26989 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
26993 #: ../fish/guestfish-actions.pod:2841
26995 "This function is deprecated. In new code, use the L</mkfs_opts> call "
27001 #: ../fish/guestfish-actions.pod:2848
27007 #: ../fish/guestfish-actions.pod:2850
27010 " mkfs-opts fstype device [blocksize:..]\n"
27016 #: ../fish/guestfish-actions.pod:2874
27017 msgid "mkmountpoint"
27022 #: ../fish/guestfish-actions.pod:2876
27025 " mkmountpoint exemptpath\n"
27031 #: ../fish/guestfish-actions.pod:2878
27033 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
27034 "to create extra mountpoints before mounting the first filesystem."
27039 #: ../fish/guestfish-actions.pod:2902
27041 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
27042 "unexpected errors if you try to mix these calls. It is safest to manually "
27043 "unmount filesystems and remove mountpoints after use."
27048 #: ../fish/guestfish-actions.pod:2906
27050 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
27051 "for this to work for manual mountpoints, you must ensure that the innermost "
27052 "mountpoints have the longest pathnames, as in the example code above."
27057 #: ../fish/guestfish-actions.pod:2913
27059 "Autosync [see L</set-autosync>, this is set by default on handles] means "
27060 "that L</umount-all> is called when the handle is closed which can also "
27061 "trigger these issues."
27066 #: ../fish/guestfish-actions.pod:2917
27072 #: ../fish/guestfish-actions.pod:2919
27075 " mknod mode devmajor devminor path\n"
27081 #: ../fish/guestfish-actions.pod:2929
27083 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
27084 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
27085 "regular file). These constants are available in the standard Linux header "
27086 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
27087 "wrappers around this command which bitwise OR in the appropriate constant "
27093 #: ../fish/guestfish-actions.pod:2939
27099 #: ../fish/guestfish-actions.pod:2941
27102 " mknod-b mode devmajor devminor path\n"
27108 #: ../fish/guestfish-actions.pod:2943
27110 "This call creates a block device node called C<path> with mode C<mode> and "
27111 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
27112 "wrapper around L</mknod>."
27117 #: ../fish/guestfish-actions.pod:2949
27123 #: ../fish/guestfish-actions.pod:2951
27126 " mknod-c mode devmajor devminor path\n"
27132 #: ../fish/guestfish-actions.pod:2953
27134 "This call creates a char device node called C<path> with mode C<mode> and "
27135 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
27136 "wrapper around L</mknod>."
27141 #: ../fish/guestfish-actions.pod:2959
27147 #: ../fish/guestfish-actions.pod:2961
27156 #: ../fish/guestfish-actions.pod:2965
27162 #: ../fish/guestfish-actions.pod:2967
27165 " mkswap-L label device\n"
27171 #: ../fish/guestfish-actions.pod:2975
27177 #: ../fish/guestfish-actions.pod:2977
27180 " mkswap-U uuid device\n"
27186 #: ../fish/guestfish-actions.pod:2981
27187 msgid "mkswap-file"
27192 #: ../fish/guestfish-actions.pod:2983
27195 " mkswap-file path\n"
27201 #: ../fish/guestfish-actions.pod:2987
27203 "This command just writes a swap file signature to an existing file. To "
27204 "create the file itself, use something like L</fallocate>."
27209 #: ../fish/guestfish-actions.pod:2990
27215 #: ../fish/guestfish-actions.pod:2992
27218 " modprobe modulename\n"
27224 #: ../fish/guestfish-actions.pod:2999
27230 #: ../fish/guestfish-actions.pod:3001
27233 " mount device mountpoint\n"
27239 #: ../fish/guestfish-actions.pod:3017
27241 "B<Important note:> When you use this call, the filesystem options C<sync> "
27242 "and C<noatime> are set implicitly. This was originally done because we "
27243 "thought it would improve reliability, but it turns out that I<-o sync> has a "
27244 "very large negative performance impact and negligible effect on "
27245 "reliability. Therefore we recommend that you avoid using L</mount> in any "
27246 "code that needs performance, and instead use L</mount-options> (use an empty "
27247 "string for the first parameter if you don't want any options)."
27252 #: ../fish/guestfish-actions.pod:3027
27258 #: ../fish/guestfish-actions.pod:3029
27261 " mount-loop file mountpoint\n"
27267 #: ../fish/guestfish-actions.pod:3035
27268 msgid "mount-options"
27273 #: ../fish/guestfish-actions.pod:3037
27276 " mount-options options device mountpoint\n"
27282 #: ../fish/guestfish-actions.pod:3039
27284 "This is the same as the L</mount> command, but it allows you to set the "
27285 "mount options as for the L<mount(8)> I<-o> flag."
27290 #: ../fish/guestfish-actions.pod:3047
27296 #: ../fish/guestfish-actions.pod:3049
27299 " mount-ro device mountpoint\n"
27305 #: ../fish/guestfish-actions.pod:3051
27307 "This is the same as the L</mount> command, but it mounts the filesystem with "
27308 "the read-only (I<-o ro>) flag."
27313 #: ../fish/guestfish-actions.pod:3054
27319 #: ../fish/guestfish-actions.pod:3056
27322 " mount-vfs options vfstype device mountpoint\n"
27328 #: ../fish/guestfish-actions.pod:3058
27330 "This is the same as the L</mount> command, but it allows you to set both the "
27331 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
27336 #: ../fish/guestfish-actions.pod:3062
27337 msgid "mountpoints"
27342 #: ../fish/guestfish-actions.pod:3064
27351 #: ../fish/guestfish-actions.pod:3066
27353 "This call is similar to L</mounts>. That call returns a list of devices. "
27354 "This one returns a hash table (map) of device name to directory where the "
27355 "device is mounted."
27360 #: ../fish/guestfish-actions.pod:3070
27366 #: ../fish/guestfish-actions.pod:3072
27375 #: ../fish/guestfish-actions.pod:3079
27376 msgid "See also: L</mountpoints>"
27381 #: ../fish/guestfish-actions.pod:3081
27387 #: ../fish/guestfish-actions.pod:3083
27396 #: ../fish/guestfish-actions.pod:3088
27397 msgid "ntfs-3g-probe"
27402 #: ../fish/guestfish-actions.pod:3090
27405 " ntfs-3g-probe true|false device\n"
27411 #: ../fish/guestfish-actions.pod:3104
27417 #: ../fish/guestfish-actions.pod:3106
27420 " ntfsresize device\n"
27426 #: ../fish/guestfish-actions.pod:3121
27427 msgid "ntfsresize-size"
27432 #: ../fish/guestfish-actions.pod:3123
27435 " ntfsresize-size device size\n"
27441 #: ../fish/guestfish-actions.pod:3125
27443 "This command is the same as L</ntfsresize> except that it allows you to "
27444 "specify the new size (in bytes) explicitly."
27449 #: ../fish/guestfish-actions.pod:3128
27455 #: ../fish/guestfish-actions.pod:3130
27458 " part-add device prlogex startsect endsect\n"
27464 #: ../fish/guestfish-actions.pod:3132
27466 "This command adds a partition to C<device>. If there is no partition table "
27467 "on the device, call L</part-init> first."
27472 #: ../fish/guestfish-actions.pod:3144
27474 "Creating a partition which covers the whole disk is not so easy. Use L</"
27475 "part-disk> to do that."
27480 #: ../fish/guestfish-actions.pod:3147
27486 #: ../fish/guestfish-actions.pod:3149
27489 " part-del device partnum\n"
27495 #: ../fish/guestfish-actions.pod:3157
27501 #: ../fish/guestfish-actions.pod:3159
27504 " part-disk device parttype\n"
27510 #: ../fish/guestfish-actions.pod:3161
27512 "This command is simply a combination of L</part-init> followed by L</part-"
27513 "add> to create a single primary partition covering the whole disk."
27518 #: ../fish/guestfish-actions.pod:3165
27520 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
27521 "possible values are described in L</part-init>."
27526 #: ../fish/guestfish-actions.pod:3171
27527 msgid "part-get-bootable"
27532 #: ../fish/guestfish-actions.pod:3173
27535 " part-get-bootable device partnum\n"
27541 #: ../fish/guestfish-actions.pod:3178
27542 msgid "See also L</part-set-bootable>."
27547 #: ../fish/guestfish-actions.pod:3180
27548 msgid "part-get-mbr-id"
27553 #: ../fish/guestfish-actions.pod:3182
27556 " part-get-mbr-id device partnum\n"
27562 #: ../fish/guestfish-actions.pod:3187 ../fish/guestfish-actions.pod:3325
27564 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
27565 "undefined results for other partition table types (see L</part-get-"
27571 #: ../fish/guestfish-actions.pod:3191
27572 msgid "part-get-parttype"
27577 #: ../fish/guestfish-actions.pod:3193
27580 " part-get-parttype device\n"
27586 #: ../fish/guestfish-actions.pod:3198
27588 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
27589 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
27590 "possible, although unusual. See L</part-init> for a full list."
27595 #: ../fish/guestfish-actions.pod:3203
27601 #: ../fish/guestfish-actions.pod:3205
27604 " part-init device parttype\n"
27610 #: ../fish/guestfish-actions.pod:3211
27612 "Initially there are no partitions. Following this, you should call L</part-"
27613 "add> for each partition required."
27618 #: ../fish/guestfish-actions.pod:3274
27624 #: ../fish/guestfish-actions.pod:3276
27627 " part-list device\n"
27633 #: ../fish/guestfish-actions.pod:3291
27635 "Start of the partition I<in bytes>. To get sectors you have to divide by "
27636 "the device's sector size, see L</blockdev-getss>."
27641 #: ../fish/guestfish-actions.pod:3304
27642 msgid "part-set-bootable"
27647 #: ../fish/guestfish-actions.pod:3306
27650 " part-set-bootable device partnum true|false\n"
27656 #: ../fish/guestfish-actions.pod:3315
27657 msgid "part-set-mbr-id"
27662 #: ../fish/guestfish-actions.pod:3317
27665 " part-set-mbr-id device partnum idbyte\n"
27671 #: ../fish/guestfish-actions.pod:3329
27672 msgid "part-set-name"
27677 #: ../fish/guestfish-actions.pod:3331
27680 " part-set-name device partnum name\n"
27686 #: ../fish/guestfish-actions.pod:3339
27687 msgid "part-to-dev"
27692 #: ../fish/guestfish-actions.pod:3341
27695 " part-to-dev partition\n"
27701 #: ../fish/guestfish-actions.pod:3347
27703 "The named partition must exist, for example as a string returned from L</"
27704 "list-partitions>."
27709 #: ../fish/guestfish-actions.pod:3350
27710 msgid "ping-daemon"
27715 #: ../fish/guestfish-actions.pod:3352
27724 #: ../fish/guestfish-actions.pod:3359
27730 #: ../fish/guestfish-actions.pod:3361
27733 " pread path count offset\n"
27739 #: ../fish/guestfish-actions.pod:3369
27740 msgid "See also L</pwrite>, L</pread-device>."
27745 #: ../fish/guestfish-actions.pod:3374
27746 msgid "pread-device"
27751 #: ../fish/guestfish-actions.pod:3376
27754 " pread-device device count offset\n"
27760 #: ../fish/guestfish-actions.pod:3384
27761 msgid "See also L</pread>."
27766 #: ../fish/guestfish-actions.pod:3389
27772 #: ../fish/guestfish-actions.pod:3391
27775 " pvcreate device\n"
27781 #: ../fish/guestfish-actions.pod:3397
27787 #: ../fish/guestfish-actions.pod:3399
27790 " pvremove device\n"
27796 #: ../fish/guestfish-actions.pod:3408
27802 #: ../fish/guestfish-actions.pod:3410
27805 " pvresize device\n"
27811 #: ../fish/guestfish-actions.pod:3415
27812 msgid "pvresize-size"
27817 #: ../fish/guestfish-actions.pod:3417
27820 " pvresize-size device size\n"
27826 #: ../fish/guestfish-actions.pod:3419
27828 "This command is the same as L</pvresize> except that it allows you to "
27829 "specify the new size (in bytes) explicitly."
27834 #: ../fish/guestfish-actions.pod:3422
27840 #: ../fish/guestfish-actions.pod:3424
27849 #: ../fish/guestfish-actions.pod:3432
27850 msgid "See also L</pvs-full>."
27855 #: ../fish/guestfish-actions.pod:3434
27861 #: ../fish/guestfish-actions.pod:3436
27870 #: ../fish/guestfish-actions.pod:3441
27876 #: ../fish/guestfish-actions.pod:3443
27885 #: ../fish/guestfish-actions.pod:3447
27891 #: ../fish/guestfish-actions.pod:3449
27894 " pwrite path content offset\n"
27900 #: ../fish/guestfish-actions.pod:3460
27901 msgid "See also L</pread>, L</pwrite-device>."
27906 #: ../fish/guestfish-actions.pod:3465
27907 msgid "pwrite-device"
27912 #: ../fish/guestfish-actions.pod:3467
27915 " pwrite-device device content offset\n"
27921 #: ../fish/guestfish-actions.pod:3477
27922 msgid "See also L</pwrite>."
27927 #: ../fish/guestfish-actions.pod:3482
27933 #: ../fish/guestfish-actions.pod:3484
27936 " read-file path\n"
27942 #: ../fish/guestfish-actions.pod:3489
27944 "Unlike L</cat>, this function can correctly handle files that contain "
27945 "embedded ASCII NUL characters. However unlike L</download>, this function "
27946 "is limited in the total size of file that can be handled."
27951 #: ../fish/guestfish-actions.pod:3497
27957 #: ../fish/guestfish-actions.pod:3499
27960 " read-lines path\n"
27966 #: ../fish/guestfish-actions.pod:3506
27968 "Note that this function cannot correctly handle binary files (specifically, "
27969 "files containing C<\\0> character which is treated as end of line). For "
27970 "those you need to use the L</read-file> function which has a more complex "
27976 #: ../fish/guestfish-actions.pod:3511
27982 #: ../fish/guestfish-actions.pod:3513
27991 #: ../fish/guestfish-actions.pod:3565
27993 "This function is primarily intended for use by programs. To get a simple "
27994 "list of names, use L</ls>. To get a printable directory for human "
27995 "consumption, use L</ll>."
28000 #: ../fish/guestfish-actions.pod:3569
28006 #: ../fish/guestfish-actions.pod:3571
28015 #: ../fish/guestfish-actions.pod:3575
28016 msgid "readlinklist"
28021 #: ../fish/guestfish-actions.pod:3577
28024 " readlinklist path 'names ...'\n"
28030 #: ../fish/guestfish-actions.pod:3601
28036 #: ../fish/guestfish-actions.pod:3603
28045 #: ../fish/guestfish-actions.pod:3608
28046 msgid "removexattr"
28051 #: ../fish/guestfish-actions.pod:3610
28054 " removexattr xattr path\n"
28060 #: ../fish/guestfish-actions.pod:3615
28061 msgid "See also: L</lremovexattr>, L<attr(5)>."
28066 #: ../fish/guestfish-actions.pod:3617
28072 #: ../fish/guestfish-actions.pod:3619
28075 " resize2fs device\n"
28081 #: ../fish/guestfish-actions.pod:3624
28083 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
28084 "before calling this command. For unknown reasons C<resize2fs> sometimes "
28085 "gives an error about this and sometimes not. In any case, it is always safe "
28086 "to call L</e2fsck-f> before calling this function."
28091 #: ../fish/guestfish-actions.pod:3630
28092 msgid "resize2fs-size"
28097 #: ../fish/guestfish-actions.pod:3632
28100 " resize2fs-size device size\n"
28106 #: ../fish/guestfish-actions.pod:3634
28108 "This command is the same as L</resize2fs> except that it allows you to "
28109 "specify the new size (in bytes) explicitly."
28114 #: ../fish/guestfish-actions.pod:3637
28120 #: ../fish/guestfish-actions.pod:3639
28129 #: ../fish/guestfish-actions.pod:3643
28135 #: ../fish/guestfish-actions.pod:3645
28144 #: ../fish/guestfish-actions.pod:3651
28150 #: ../fish/guestfish-actions.pod:3653
28159 #: ../fish/guestfish-actions.pod:3657
28160 msgid "rmmountpoint"
28165 #: ../fish/guestfish-actions.pod:3659
28168 " rmmountpoint exemptpath\n"
28174 #: ../fish/guestfish-actions.pod:3661
28176 "This calls removes a mountpoint that was previously created with L</"
28177 "mkmountpoint>. See L</mkmountpoint> for full details."
28182 #: ../fish/guestfish-actions.pod:3665
28183 msgid "scrub-device"
28188 #: ../fish/guestfish-actions.pod:3667
28191 " scrub-device device\n"
28197 #: ../fish/guestfish-actions.pod:3678
28203 #: ../fish/guestfish-actions.pod:3680
28206 " scrub-file file\n"
28212 #: ../fish/guestfish-actions.pod:3690
28213 msgid "scrub-freespace"
28218 #: ../fish/guestfish-actions.pod:3692
28221 " scrub-freespace dir\n"
28227 #: ../fish/guestfish-actions.pod:3694
28229 "This command creates the directory C<dir> and then fills it with files until "
28230 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
28231 "deletes them. The intention is to scrub any free space on the partition "
28232 "containing C<dir>."
28237 #: ../fish/guestfish-actions.pod:3703
28243 #: ../fish/guestfish-actions.pod:3705
28249 #: ../fish/guestfish-actions.pod:3707
28252 " set-append append\n"
28258 #: ../fish/guestfish-actions.pod:3718
28259 msgid "set-autosync"
28264 #: ../fish/guestfish-actions.pod:3720
28270 #: ../fish/guestfish-actions.pod:3722
28273 " set-autosync true|false\n"
28279 #: ../fish/guestfish-actions.pod:3724
28281 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
28282 "effort attempt to run L</umount-all> followed by L</sync> when the handle is "
28283 "closed (also if the program exits without closing handles)."
28288 #: ../fish/guestfish-actions.pod:3732
28294 #: ../fish/guestfish-actions.pod:3734
28300 #: ../fish/guestfish-actions.pod:3736
28303 " set-direct true|false\n"
28309 #: ../fish/guestfish-actions.pod:3742
28311 "One consequence of this is that log messages aren't caught by the library "
28312 "and handled by L</set-log-message-callback>, but go straight to stdout."
28317 #: ../fish/guestfish-actions.pod:3751
28318 msgid "set-e2label"
28323 #: ../fish/guestfish-actions.pod:3753
28326 " set-e2label device label\n"
28332 #: ../fish/guestfish-actions.pod:3759
28334 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
28335 "label on a filesystem."
28340 #: ../fish/guestfish-actions.pod:3762
28346 #: ../fish/guestfish-actions.pod:3764
28349 " set-e2uuid device uuid\n"
28355 #: ../fish/guestfish-actions.pod:3771
28357 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
28358 "UUID of a filesystem."
28363 #: ../fish/guestfish-actions.pod:3774
28364 msgid "set-memsize"
28369 #: ../fish/guestfish-actions.pod:3776
28375 #: ../fish/guestfish-actions.pod:3778
28378 " set-memsize memsize\n"
28384 #: ../fish/guestfish-actions.pod:3780
28386 "This sets the memory size in megabytes allocated to the qemu subprocess. "
28387 "This only has any effect if called before L</launch>."
28392 #: ../fish/guestfish-actions.pod:3791
28393 msgid "set-network"
28398 #: ../fish/guestfish-actions.pod:3793
28404 #: ../fish/guestfish-actions.pod:3795
28407 " set-network true|false\n"
28413 #: ../fish/guestfish-actions.pod:3803
28415 "You must call this before calling L</launch>, otherwise it has no effect."
28420 #: ../fish/guestfish-actions.pod:3806
28426 #: ../fish/guestfish-actions.pod:3808
28432 #: ../fish/guestfish-actions.pod:3810
28435 " set-path searchpath\n"
28441 #: ../fish/guestfish-actions.pod:3819
28447 #: ../fish/guestfish-actions.pod:3821
28453 #: ../fish/guestfish-actions.pod:3823
28462 #: ../fish/guestfish-actions.pod:3843
28463 msgid "set-recovery-proc"
28468 #: ../fish/guestfish-actions.pod:3845
28469 msgid "recovery-proc"
28474 #: ../fish/guestfish-actions.pod:3847
28477 " set-recovery-proc true|false\n"
28483 #: ../fish/guestfish-actions.pod:3849
28485 "If this is called with the parameter C<false> then L</launch> does not "
28486 "create a recovery process. The purpose of the recovery process is to stop "
28487 "runaway qemu processes in the case where the main program aborts abruptly."
28492 #: ../fish/guestfish-actions.pod:3854
28494 "This only has any effect if called before L</launch>, and the default is "
28500 #: ../fish/guestfish-actions.pod:3863
28501 msgid "set-selinux"
28506 #: ../fish/guestfish-actions.pod:3865
28512 #: ../fish/guestfish-actions.pod:3867
28515 " set-selinux true|false\n"
28521 #: ../fish/guestfish-actions.pod:3878
28527 #: ../fish/guestfish-actions.pod:3880
28533 #: ../fish/guestfish-actions.pod:3882
28536 " set-trace true|false\n"
28542 #: ../fish/guestfish-actions.pod:3898
28543 msgid "set-verbose"
28548 #: ../fish/guestfish-actions.pod:3900
28554 #: ../fish/guestfish-actions.pod:3902
28557 " set-verbose true|false\n"
28563 #: ../fish/guestfish-actions.pod:3909
28569 #: ../fish/guestfish-actions.pod:3911
28572 " setcon context\n"
28578 #: ../fish/guestfish-actions.pod:3918
28584 #: ../fish/guestfish-actions.pod:3920
28587 " setxattr xattr val vallen path\n"
28593 #: ../fish/guestfish-actions.pod:3926
28594 msgid "See also: L</lsetxattr>, L<attr(5)>."
28599 #: ../fish/guestfish-actions.pod:3928
28605 #: ../fish/guestfish-actions.pod:3930
28608 " sfdisk device cyls heads sectors 'lines ...'\n"
28614 #: ../fish/guestfish-actions.pod:3952
28615 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
28620 #: ../fish/guestfish-actions.pod:3958
28626 #: ../fish/guestfish-actions.pod:3960
28629 " sfdiskM device 'lines ...'\n"
28635 #: ../fish/guestfish-actions.pod:3962
28637 "This is a simplified interface to the L</sfdisk> command, where partition "
28638 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
28639 "you don't need to specify the cyls, heads and sectors parameters which were "
28640 "rarely if ever used anyway."
28645 #: ../fish/guestfish-actions.pod:3968
28646 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
28651 #: ../fish/guestfish-actions.pod:3974
28657 #: ../fish/guestfish-actions.pod:3976
28660 " sfdisk-N device partnum cyls heads sectors line\n"
28666 #: ../fish/guestfish-actions.pod:3981
28668 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
28669 "cyls/heads/sectors parameters."
28674 #: ../fish/guestfish-actions.pod:3984
28675 msgid "See also: L</part-add>"
28680 #: ../fish/guestfish-actions.pod:3989
28681 msgid "sfdisk-disk-geometry"
28686 #: ../fish/guestfish-actions.pod:3991
28689 " sfdisk-disk-geometry device\n"
28695 #: ../fish/guestfish-actions.pod:3993
28697 "This displays the disk geometry of C<device> read from the partition table. "
28698 "Especially in the case where the underlying block device has been resized, "
28699 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
28700 "kernel-geometry>)."
28705 #: ../fish/guestfish-actions.pod:4001
28706 msgid "sfdisk-kernel-geometry"
28711 #: ../fish/guestfish-actions.pod:4003
28714 " sfdisk-kernel-geometry device\n"
28720 #: ../fish/guestfish-actions.pod:4010
28726 #: ../fish/guestfish-actions.pod:4012
28729 " sfdisk-l device\n"
28735 #: ../fish/guestfish-actions.pod:4018
28736 msgid "See also: L</part-list>"
28741 #: ../fish/guestfish-actions.pod:4020
28747 #: ../fish/guestfish-actions.pod:4022
28756 #: ../fish/guestfish-actions.pod:4027
28757 msgid "This is like L</command>, but passes the command to:"
28762 #: ../fish/guestfish-actions.pod:4035
28763 msgid "All the provisos about L</command> apply to this call."
28768 #: ../fish/guestfish-actions.pod:4037
28774 #: ../fish/guestfish-actions.pod:4039
28777 " sh-lines command\n"
28783 #: ../fish/guestfish-actions.pod:4041
28784 msgid "This is the same as L</sh>, but splits the result into a list of lines."
28789 #: ../fish/guestfish-actions.pod:4044
28790 msgid "See also: L</command-lines>"
28795 #: ../fish/guestfish-actions.pod:4046
28801 #: ../fish/guestfish-actions.pod:4048
28810 #: ../fish/guestfish-actions.pod:4052
28816 #: ../fish/guestfish-actions.pod:4054
28825 #: ../fish/guestfish-actions.pod:4060
28831 #: ../fish/guestfish-actions.pod:4062
28840 #: ../fish/guestfish-actions.pod:4070
28846 #: ../fish/guestfish-actions.pod:4072
28855 #: ../fish/guestfish-actions.pod:4080
28861 #: ../fish/guestfish-actions.pod:4082
28864 " strings-e encoding path\n"
28870 #: ../fish/guestfish-actions.pod:4084
28872 "This is like the L</strings> command, but allows you to specify the encoding "
28873 "of strings that are looked for in the source file C<path>."
28878 #: ../fish/guestfish-actions.pod:4094
28880 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
28881 "ISO-8859-X (this is what L</strings> uses)."
28886 #: ../fish/guestfish-actions.pod:4126
28887 msgid "swapoff-device"
28892 #: ../fish/guestfish-actions.pod:4128
28895 " swapoff-device device\n"
28901 #: ../fish/guestfish-actions.pod:4130
28903 "This command disables the libguestfs appliance swap device or partition "
28904 "named C<device>. See L</swapon-device>."
28909 #: ../fish/guestfish-actions.pod:4134
28910 msgid "swapoff-file"
28915 #: ../fish/guestfish-actions.pod:4136
28918 " swapoff-file file\n"
28924 #: ../fish/guestfish-actions.pod:4140
28925 msgid "swapoff-label"
28930 #: ../fish/guestfish-actions.pod:4142
28933 " swapoff-label label\n"
28939 #: ../fish/guestfish-actions.pod:4147
28940 msgid "swapoff-uuid"
28945 #: ../fish/guestfish-actions.pod:4149
28948 " swapoff-uuid uuid\n"
28954 #: ../fish/guestfish-actions.pod:4154
28955 msgid "swapon-device"
28960 #: ../fish/guestfish-actions.pod:4156
28963 " swapon-device device\n"
28969 #: ../fish/guestfish-actions.pod:4158
28971 "This command enables the libguestfs appliance to use the swap device or "
28972 "partition named C<device>. The increased memory is made available for all "
28973 "commands, for example those run using L</command> or L</sh>."
28978 #: ../fish/guestfish-actions.pod:4170
28979 msgid "swapon-file"
28984 #: ../fish/guestfish-actions.pod:4172
28987 " swapon-file file\n"
28993 #: ../fish/guestfish-actions.pod:4174
28995 "This command enables swap to a file. See L</swapon-device> for other notes."
29000 #: ../fish/guestfish-actions.pod:4177
29001 msgid "swapon-label"
29006 #: ../fish/guestfish-actions.pod:4179
29009 " swapon-label label\n"
29015 #: ../fish/guestfish-actions.pod:4181
29017 "This command enables swap to a labeled swap partition. See L</swapon-"
29018 "device> for other notes."
29023 #: ../fish/guestfish-actions.pod:4184
29024 msgid "swapon-uuid"
29029 #: ../fish/guestfish-actions.pod:4186
29032 " swapon-uuid uuid\n"
29038 #: ../fish/guestfish-actions.pod:4188
29040 "This command enables swap to a swap partition with the given UUID. See L</"
29041 "swapon-device> for other notes."
29046 #: ../fish/guestfish-actions.pod:4191
29052 #: ../fish/guestfish-actions.pod:4193
29061 #: ../fish/guestfish-actions.pod:4201
29067 #: ../fish/guestfish-actions.pod:4203
29076 #: ../fish/guestfish-actions.pod:4211
29082 #: ../fish/guestfish-actions.pod:4213
29085 " tail-n nrlines path\n"
29091 #: ../fish/guestfish-actions.pod:4226
29097 #: ../fish/guestfish-actions.pod:4228
29100 " tar-in (tarfile|-) directory\n"
29106 #: ../fish/guestfish-actions.pod:4233
29107 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
29112 #: ../fish/guestfish-actions.pod:4238
29118 #: ../fish/guestfish-actions.pod:4240
29121 " tar-out directory (tarfile|-)\n"
29127 #: ../fish/guestfish-actions.pod:4245
29128 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
29133 #: ../fish/guestfish-actions.pod:4250
29139 #: ../fish/guestfish-actions.pod:4252
29142 " tgz-in (tarball|-) directory\n"
29148 #: ../fish/guestfish-actions.pod:4257
29149 msgid "To upload an uncompressed tarball, use L</tar-in>."
29154 #: ../fish/guestfish-actions.pod:4261
29160 #: ../fish/guestfish-actions.pod:4263
29163 " tgz-out directory (tarball|-)\n"
29169 #: ../fish/guestfish-actions.pod:4268
29170 msgid "To download an uncompressed tarball, use L</tar-out>."
29175 #: ../fish/guestfish-actions.pod:4272
29181 #: ../fish/guestfish-actions.pod:4274
29190 #: ../fish/guestfish-actions.pod:4283
29196 #: ../fish/guestfish-actions.pod:4285
29205 #: ../fish/guestfish-actions.pod:4290
29206 msgid "truncate-size"
29211 #: ../fish/guestfish-actions.pod:4292
29214 " truncate-size path size\n"
29220 #: ../fish/guestfish-actions.pod:4297
29222 "If the current file size is less than C<size> then the file is extended to "
29223 "the required size with zero bytes. This creates a sparse file (ie. disk "
29224 "blocks are not allocated for the file until you write to it). To create a "
29225 "non-sparse file of zeroes, use L</fallocate64> instead."
29230 #: ../fish/guestfish-actions.pod:4303
29236 #: ../fish/guestfish-actions.pod:4305
29239 " tune2fs-l device\n"
29245 #: ../fish/guestfish-actions.pod:4315
29251 #: ../fish/guestfish-actions.pod:4317
29254 " txz-in (tarball|-) directory\n"
29260 #: ../fish/guestfish-actions.pod:4324
29266 #: ../fish/guestfish-actions.pod:4326
29269 " txz-out directory (tarball|-)\n"
29275 #: ../fish/guestfish-actions.pod:4333
29281 #: ../fish/guestfish-actions.pod:4335
29290 #: ../fish/guestfish-actions.pod:4349
29291 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
29296 #: ../fish/guestfish-actions.pod:4354
29302 #: ../fish/guestfish-actions.pod:4356
29308 #: ../fish/guestfish-actions.pod:4358
29311 " umount pathordevice\n"
29317 #: ../fish/guestfish-actions.pod:4364
29323 #: ../fish/guestfish-actions.pod:4366
29324 msgid "unmount-all"
29329 #: ../fish/guestfish-actions.pod:4368
29338 #: ../fish/guestfish-actions.pod:4374
29344 #: ../fish/guestfish-actions.pod:4376
29347 " upload (filename|-) remotefilename\n"
29353 #: ../fish/guestfish-actions.pod:4383
29354 msgid "See also L</download>."
29359 #: ../fish/guestfish-actions.pod:4387
29360 msgid "upload-offset"
29365 #: ../fish/guestfish-actions.pod:4389
29368 " upload-offset (filename|-) remotefilename offset\n"
29374 #: ../fish/guestfish-actions.pod:4401
29376 "Note that there is no limit on the amount of data that can be uploaded with "
29377 "this call, unlike with L</pwrite>, and this call always writes the full "
29378 "amount unless an error occurs."
29383 #: ../fish/guestfish-actions.pod:4406
29384 msgid "See also L</upload>, L</pwrite>."
29389 #: ../fish/guestfish-actions.pod:4410
29395 #: ../fish/guestfish-actions.pod:4412
29398 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
29404 #: ../fish/guestfish-actions.pod:4431
29410 #: ../fish/guestfish-actions.pod:4433
29419 #: ../fish/guestfish-actions.pod:4460
29421 "I<Note:> Don't use this call to test for availability of features. In "
29422 "enterprise distributions we backport features from later versions into "
29423 "earlier versions, making this an unreliable way to test for features. Use "
29424 "L</available> instead."
29429 #: ../fish/guestfish-actions.pod:4466
29435 #: ../fish/guestfish-actions.pod:4468
29438 " vfs-label device\n"
29444 #: ../fish/guestfish-actions.pod:4475
29445 msgid "To find a filesystem from the label, use L</findfs-label>."
29450 #: ../fish/guestfish-actions.pod:4477
29456 #: ../fish/guestfish-actions.pod:4479
29459 " vfs-type device\n"
29465 #: ../fish/guestfish-actions.pod:4489
29471 #: ../fish/guestfish-actions.pod:4491
29474 " vfs-uuid device\n"
29480 #: ../fish/guestfish-actions.pod:4498
29481 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
29486 #: ../fish/guestfish-actions.pod:4500
29487 msgid "vg-activate"
29492 #: ../fish/guestfish-actions.pod:4502
29495 " vg-activate true|false 'volgroups ...'\n"
29501 #: ../fish/guestfish-actions.pod:4515
29502 msgid "vg-activate-all"
29507 #: ../fish/guestfish-actions.pod:4517
29510 " vg-activate-all true|false\n"
29516 #: ../fish/guestfish-actions.pod:4527
29522 #: ../fish/guestfish-actions.pod:4529
29525 " vgcreate volgroup 'physvols ...'\n"
29531 #: ../fish/guestfish-actions.pod:4534
29537 #: ../fish/guestfish-actions.pod:4536
29540 " vglvuuids vgname\n"
29546 #: ../fish/guestfish-actions.pod:4541
29548 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
29549 "logical volumes and volume groups."
29554 #: ../fish/guestfish-actions.pod:4544
29555 msgid "See also L</vgpvuuids>."
29560 #: ../fish/guestfish-actions.pod:4546
29566 #: ../fish/guestfish-actions.pod:4548
29569 " vgpvuuids vgname\n"
29575 #: ../fish/guestfish-actions.pod:4553
29577 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
29578 "physical volumes and volume groups."
29583 #: ../fish/guestfish-actions.pod:4556
29584 msgid "See also L</vglvuuids>."
29589 #: ../fish/guestfish-actions.pod:4558
29595 #: ../fish/guestfish-actions.pod:4560
29598 " vgremove vgname\n"
29604 #: ../fish/guestfish-actions.pod:4567
29610 #: ../fish/guestfish-actions.pod:4569
29613 " vgrename volgroup newvolgroup\n"
29619 #: ../fish/guestfish-actions.pod:4573
29625 #: ../fish/guestfish-actions.pod:4575
29634 #: ../fish/guestfish-actions.pod:4583
29635 msgid "See also L</vgs-full>."
29640 #: ../fish/guestfish-actions.pod:4585
29646 #: ../fish/guestfish-actions.pod:4587
29655 #: ../fish/guestfish-actions.pod:4592
29661 #: ../fish/guestfish-actions.pod:4594
29670 #: ../fish/guestfish-actions.pod:4599
29676 #: ../fish/guestfish-actions.pod:4601
29685 #: ../fish/guestfish-actions.pod:4605
29691 #: ../fish/guestfish-actions.pod:4607
29700 #: ../fish/guestfish-actions.pod:4612
29706 #: ../fish/guestfish-actions.pod:4614
29715 #: ../fish/guestfish-actions.pod:4619
29721 #: ../fish/guestfish-actions.pod:4621
29730 #: ../fish/guestfish-actions.pod:4626
29736 #: ../fish/guestfish-actions.pod:4628
29739 " write path content\n"
29745 #: ../fish/guestfish-actions.pod:4636
29751 #: ../fish/guestfish-actions.pod:4638
29754 " write-file path content size\n"
29759 #: ../fish/guestfish-actions.pod:4654
29761 "This function is deprecated. In new code, use the L</write> call instead."
29766 #: ../fish/guestfish-actions.pod:4661
29772 #: ../fish/guestfish-actions.pod:4663
29775 " zegrep regex path\n"
29781 #: ../fish/guestfish-actions.pod:4671
29787 #: ../fish/guestfish-actions.pod:4673
29790 " zegrepi regex path\n"
29796 #: ../fish/guestfish-actions.pod:4681
29802 #: ../fish/guestfish-actions.pod:4683
29811 #: ../fish/guestfish-actions.pod:4691
29812 msgid "See also: L</zero-device>, L</scrub-device>."
29817 #: ../fish/guestfish-actions.pod:4693
29818 msgid "zero-device"
29823 #: ../fish/guestfish-actions.pod:4695
29826 " zero-device device\n"
29832 #: ../fish/guestfish-actions.pod:4697
29834 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
29835 "which just zeroes the first few blocks of a device."
29840 #: ../fish/guestfish-actions.pod:4704
29846 #: ../fish/guestfish-actions.pod:4706
29849 " zerofree device\n"
29855 #: ../fish/guestfish-actions.pod:4719
29861 #: ../fish/guestfish-actions.pod:4721
29864 " zfgrep pattern path\n"
29870 #: ../fish/guestfish-actions.pod:4729
29876 #: ../fish/guestfish-actions.pod:4731
29879 " zfgrepi pattern path\n"
29885 #: ../fish/guestfish-actions.pod:4739
29891 #: ../fish/guestfish-actions.pod:4741
29894 " zfile meth path\n"
29900 #: ../fish/guestfish-actions.pod:4748
29902 "Since 1.0.63, use L</file> instead which can now process compressed files."
29906 #: ../fish/guestfish-actions.pod:4751
29908 "This function is deprecated. In new code, use the L</file> call instead."
29913 #: ../fish/guestfish-actions.pod:4758
29919 #: ../fish/guestfish-actions.pod:4760
29922 " zgrep regex path\n"
29928 #: ../fish/guestfish-actions.pod:4768
29934 #: ../fish/guestfish-actions.pod:4770
29937 " zgrepi regex path\n"
29943 #: ../fish/guestfish-commands.pod:1
29949 #: ../fish/guestfish-commands.pod:3
29955 #: ../fish/guestfish-commands.pod:5
29958 " alloc filename size\n"
29964 #: ../fish/guestfish-commands.pod:7
29966 "This creates an empty (zeroed) file of the given size, and then adds so it "
29967 "can be further examined."
29972 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
29973 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
29978 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
29979 msgid "Size can be specified using standard suffixes, eg. C<1M>."
29984 #: ../fish/guestfish-commands.pod:14
29986 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
29987 "image, see L</PREPARED DISK IMAGES>."
29992 #: ../fish/guestfish-commands.pod:17
29998 #: ../fish/guestfish-commands.pod:19
30001 " copy-in local [local ...] /remotedir\n"
30007 #: ../fish/guestfish-commands.pod:21
30009 "C<copy-in> copies local files or directories recursively into the disk "
30010 "image, placing them in the directory called C</remotedir> (which must "
30011 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
30012 "other commands as necessary."
30017 #: ../fish/guestfish-commands.pod:26
30019 "Multiple local files and directories can be specified, but the last "
30020 "parameter must always be a remote directory. Wildcards cannot be used."
30025 #: ../fish/guestfish-commands.pod:30
30031 #: ../fish/guestfish-commands.pod:32
30034 " copy-out remote [remote ...] localdir\n"
30040 #: ../fish/guestfish-commands.pod:34
30042 "C<copy-out> copies remote files or directories recursively out of the disk "
30043 "image, placing them on the host disk in a local directory called C<localdir> "
30044 "(which must exist). This guestfish meta-command turns into a sequence of L</"
30045 "download>, L</tar-out> and other commands as necessary."
30050 #: ../fish/guestfish-commands.pod:40
30052 "Multiple remote files and directories can be specified, but the last "
30053 "parameter must always be a local directory. To download to the current "
30054 "directory, use C<.> as in:"
30059 #: ../fish/guestfish-commands.pod:44
30062 " copy-out /home .\n"
30068 #: ../fish/guestfish-commands.pod:46
30070 "Wildcards cannot be used in the ordinary command, but you can use them with "
30071 "the help of L</glob> like this:"
30076 #: ../fish/guestfish-commands.pod:49
30079 " glob copy-out /home/* .\n"
30085 #: ../fish/guestfish-commands.pod:51
30091 #: ../fish/guestfish-commands.pod:53
30094 " echo [params ...]\n"
30100 #: ../fish/guestfish-commands.pod:55
30101 msgid "This echos the parameters to the terminal."
30106 #: ../fish/guestfish-commands.pod:57
30112 #: ../fish/guestfish-commands.pod:59
30118 #: ../fish/guestfish-commands.pod:61
30124 #: ../fish/guestfish-commands.pod:63
30133 #: ../fish/guestfish-commands.pod:65
30135 "This is used to edit a file. It downloads the file, edits it locally using "
30136 "your editor, then uploads the result."
30141 #: ../fish/guestfish-commands.pod:68
30143 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
30144 "or C<emacs> you will get those corresponding editors."
30149 #: ../fish/guestfish-commands.pod:72
30155 #: ../fish/guestfish-commands.pod:74
30158 " glob command args...\n"
30164 #: ../fish/guestfish-commands.pod:76
30166 "Expand wildcards in any paths in the args list, and run C<command> "
30167 "repeatedly on each matching path."
30172 #: ../fish/guestfish-commands.pod:79
30173 msgid "See L</WILDCARDS AND GLOBBING>."
30178 #: ../fish/guestfish-commands.pod:81
30184 #: ../fish/guestfish-commands.pod:83
30187 " hexedit <filename|device>\n"
30188 " hexedit <filename|device> <max>\n"
30189 " hexedit <filename|device> <start> <max>\n"
30195 #: ../fish/guestfish-commands.pod:87
30197 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
30203 #: ../fish/guestfish-commands.pod:90
30205 "This command works by downloading potentially the whole file or device, "
30206 "editing it locally, then uploading it. If the file or device is large, you "
30207 "have to specify which part you wish to edit by using C<max> and/or C<start> "
30208 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
30209 "usual modifiers allowed such as C<1M> (1 megabyte)."
30214 #: ../fish/guestfish-commands.pod:97
30215 msgid "For example to edit the first few sectors of a disk you might do:"
30220 #: ../fish/guestfish-commands.pod:100
30223 " hexedit /dev/sda 1M\n"
30229 #: ../fish/guestfish-commands.pod:102
30231 "which would allow you to edit anywhere within the first megabyte of the disk."
30236 #: ../fish/guestfish-commands.pod:105
30237 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
30242 #: ../fish/guestfish-commands.pod:107
30245 " hexedit /dev/sda1 0x400 0x400\n"
30251 #: ../fish/guestfish-commands.pod:109
30252 msgid "(assuming the superblock is in the standard location)."
30257 #: ../fish/guestfish-commands.pod:111
30259 "This command requires the external L<hexedit(1)> program. You can specify "
30260 "another program to use by setting the C<HEXEDITOR> environment variable."
30265 #: ../fish/guestfish-commands.pod:115
30266 msgid "See also L</hexdump>."
30271 #: ../fish/guestfish-commands.pod:117
30277 #: ../fish/guestfish-commands.pod:119
30286 #: ../fish/guestfish-commands.pod:121
30288 "Change the local directory, ie. the current directory of guestfish itself."
30293 #: ../fish/guestfish-commands.pod:124
30294 msgid "Note that C<!cd> won't do what you might expect."
30299 #: ../fish/guestfish-commands.pod:126
30305 #: ../fish/guestfish-commands.pod:128
30311 #: ../fish/guestfish-commands.pod:130
30320 #: ../fish/guestfish-commands.pod:132
30321 msgid "Opens the manual page for guestfish."
30326 #: ../fish/guestfish-commands.pod:134
30332 #: ../fish/guestfish-commands.pod:136
30338 #: ../fish/guestfish-commands.pod:138
30347 #: ../fish/guestfish-commands.pod:140
30356 #: ../fish/guestfish-commands.pod:142
30357 msgid "This is used to view a file."
30362 #: ../fish/guestfish-commands.pod:144
30364 "The default viewer is C<$PAGER>. However if you use the alternate command "
30365 "C<less> you will get the C<less> command specifically."
30370 #: ../fish/guestfish-commands.pod:147
30376 #: ../fish/guestfish-commands.pod:149
30385 #: ../fish/guestfish-commands.pod:151
30387 "Close and reopen the libguestfs handle. It is not necessary to use this "
30388 "normally, because the handle is closed properly when guestfish exits. "
30389 "However this is occasionally useful for testing."
30394 #: ../fish/guestfish-commands.pod:155
30400 #: ../fish/guestfish-commands.pod:157
30403 " sparse filename size\n"
30409 #: ../fish/guestfish-commands.pod:159
30411 "This creates an empty sparse file of the given size, and then adds so it can "
30412 "be further examined."
30417 #: ../fish/guestfish-commands.pod:162
30419 "In all respects it works the same as the L</alloc> command, except that the "
30420 "image file is allocated sparsely, which means that disk blocks are not "
30421 "assigned to the file until they are needed. Sparse disk files only use "
30422 "space when written to, but they are slower and there is a danger you could "
30423 "run out of real disk space during a write operation."
30428 #: ../fish/guestfish-commands.pod:172
30434 #: ../fish/guestfish-commands.pod:174
30443 #: ../fish/guestfish-commands.pod:176
30445 "This command returns a list of the optional groups known to the daemon, and "
30446 "indicates which ones are supported by this build of the libguestfs appliance."
30451 #: ../fish/guestfish-commands.pod:180
30452 msgid "See also L<guestfs(3)/AVAILABILITY>."
30457 #: ../fish/guestfish-commands.pod:182
30463 #: ../fish/guestfish-commands.pod:184
30466 " time command args...\n"
30472 #: ../fish/guestfish-commands.pod:186
30474 "Run the command as usual, but print the elapsed time afterwards. This can "
30475 "be useful for benchmarking operations."
30480 #: ../test-tool/libguestfs-test-tool.pod:5
30481 msgid "libguestfs-test-tool - End user tests for libguestfs"
30486 #: ../test-tool/libguestfs-test-tool.pod:9
30489 " libguestfs-test-tool [--options]\n"
30495 #: ../test-tool/libguestfs-test-tool.pod:13
30497 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
30498 "and developers, to allow them to check basic libguestfs functionality is "
30499 "working. This is needed because libguestfs occasionally breaks for reasons "
30500 "beyond our control: usually because of changes in the underlying qemu or "
30501 "kernel packages, or the host environment."
30506 #: ../test-tool/libguestfs-test-tool.pod:20
30507 msgid "If you suspect a problem in libguestfs, then just run:"
30512 #: ../test-tool/libguestfs-test-tool.pod:22
30515 " libguestfs-test-tool\n"
30521 #: ../test-tool/libguestfs-test-tool.pod:24
30522 msgid "It will print lots of diagnostic messages."
30527 #: ../test-tool/libguestfs-test-tool.pod:26
30528 msgid "If it runs to completion successfully, you will see this near the end:"
30533 #: ../test-tool/libguestfs-test-tool.pod:28
30536 " ===== TEST FINISHED OK =====\n"
30542 #: ../test-tool/libguestfs-test-tool.pod:30
30543 msgid "and the test tool will exit with code 0."
30548 #: ../test-tool/libguestfs-test-tool.pod:32
30550 "If it fails (and/or exits with non-zero error code), please paste the "
30551 "B<complete, unedited> output of the test tool into a bug report. More "
30552 "information about reporting bugs can be found on the L<http://libguestfs.org/"
30558 #: ../test-tool/libguestfs-test-tool.pod:41
30564 #: ../test-tool/libguestfs-test-tool.pod:43
30565 msgid "Display short usage information and exit."
30570 #: ../test-tool/libguestfs-test-tool.pod:45
30571 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
30576 #: ../test-tool/libguestfs-test-tool.pod:47
30578 "Pass an alternate name for the helper program. libguestfs-test-tool will "
30579 "normally look in the C<$libexec> directory that was configured when the tool "
30585 #: ../test-tool/libguestfs-test-tool.pod:51
30586 msgid "I<--qemu qemu_binary>"
30591 #: ../test-tool/libguestfs-test-tool.pod:53
30593 "If you have downloaded another qemu binary, point this option at the full "
30594 "path of the binary to try it."
30599 #: ../test-tool/libguestfs-test-tool.pod:56
30600 msgid "I<--qemudir qemu_source_dir>"
30605 #: ../test-tool/libguestfs-test-tool.pod:58
30607 "If you have compiled qemu from source, point this option at the source "
30608 "directory to try it."
30613 #: ../test-tool/libguestfs-test-tool.pod:61
30614 msgid "I<--timeout N>"
30619 #: ../test-tool/libguestfs-test-tool.pod:63
30621 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
30622 "does not usually need to be adjusted unless your machine is very slow."
30627 #: ../test-tool/libguestfs-test-tool.pod:69
30628 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
30633 #: ../test-tool/libguestfs-test-tool.pod:71
30635 "If you have compiled another version of qemu from source and would like to "
30636 "try that, then you can use the I<--qemudir> option to point to the qemu "
30637 "source directory."
30642 #: ../test-tool/libguestfs-test-tool.pod:75
30644 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
30645 "option to point to the binary."
30650 #: ../test-tool/libguestfs-test-tool.pod:78
30652 "When using an alternate qemu with libguestfs, usually you would need to "
30653 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in L<guestfs(3)"
30654 ">). libguestfs-test-tool writes a temporary qemu wrapper script when you "
30655 "use either of the I<--qemudir> or I<--qemu> options."
30660 #: ../test-tool/libguestfs-test-tool.pod:85
30662 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
30663 "I<1> if there was an error."
30668 #: ../test-tool/libguestfs-test-tool.pod:92
30669 msgid "/usr/libexec/libguestfs-test-tool-helper"
30674 #: ../test-tool/libguestfs-test-tool.pod:94
30676 "This helper program is run inside the appliance and provides additional "
30682 #: ../test-tool/libguestfs-test-tool.pod:97
30683 msgid "/usr/bin/mkisofs"
30688 #: ../test-tool/libguestfs-test-tool.pod:99
30690 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
30691 "which is used as part of the tests."
30696 #: ../test-tool/libguestfs-test-tool.pod:106
30698 "For the full list of environment variables which may affect libguestfs, "
30699 "please see the L<guestfs(3)> manual page."
30704 #: ../test-tool/libguestfs-test-tool.pod:111
30705 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
30710 #: ../test-tool/libguestfs-test-tool.pod:121
30711 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
30716 #: ../fuse/guestmount.pod:5
30718 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
30723 #: ../fuse/guestmount.pod:9
30726 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
30732 #: ../fuse/guestmount.pod:11
30735 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
30741 #: ../fuse/guestmount.pod:13
30744 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
30750 #: ../fuse/guestmount.pod:17
30752 "You must I<not> use C<guestmount> in read-write mode on live virtual "
30753 "machines. If you do this, you risk disk corruption in the VM."
30758 #: ../fuse/guestmount.pod:22
30760 "The guestmount program can be used to mount virtual machine filesystems and "
30761 "other disk images on the host. It uses libguestfs for access to the guest "
30762 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
30763 "a mountable device."
30768 #: ../fuse/guestmount.pod:27
30770 "Along with other options, you have to give at least one device (I<-a> "
30771 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
30772 "option) or use the I<-i> inspection option. How this works is better "
30773 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
30779 #: ../fuse/guestmount.pod:33
30781 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
30782 "by you, and the filesystem will not be visible to any other users unless you "
30783 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
30784 "the filesystem, use the C<fusermount -u> command."
30789 #: ../fuse/guestmount.pod:41
30791 "For a typical Windows guest which has its main filesystem on the first "
30797 #: ../fuse/guestmount.pod:44
30800 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
30806 #: ../fuse/guestmount.pod:46
30808 "For a typical Linux guest which has a /boot filesystem on the first "
30809 "partition, and the root filesystem on a logical volume:"
30814 #: ../fuse/guestmount.pod:49
30817 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
30823 #: ../fuse/guestmount.pod:51
30824 msgid "To get libguestfs to detect guest mountpoints for you:"
30829 #: ../fuse/guestmount.pod:53
30832 " guestmount -a guest.img -i --ro /mnt\n"
30838 #: ../fuse/guestmount.pod:55
30839 msgid "For a libvirt guest called \"Guest\" you could do:"
30844 #: ../fuse/guestmount.pod:57
30847 " guestmount -d Guest -i --ro /mnt\n"
30853 #: ../fuse/guestmount.pod:59
30855 "If you don't know what filesystems are contained in a guest or disk image, "
30856 "use L<virt-filesystems(1)> first:"
30861 #: ../fuse/guestmount.pod:62
30864 " virt-filesystems MyGuest\n"
30870 #: ../fuse/guestmount.pod:64
30872 "If you want to trace the libguestfs calls but without excessive debugging "
30873 "information, we recommend:"
30878 #: ../fuse/guestmount.pod:67
30881 " guestmount [...] --trace /mnt\n"
30887 #: ../fuse/guestmount.pod:69
30888 msgid "If you want to debug the program, we recommend:"
30893 #: ../fuse/guestmount.pod:71
30896 " guestmount [...] --trace --verbose /mnt\n"
30902 #: ../fuse/guestmount.pod:77
30903 msgid "B<-a image> | B<--add image>"
30908 #: ../fuse/guestmount.pod:79
30909 msgid "Add a block device or virtual machine image."
30914 #: ../fuse/guestmount.pod:84
30915 msgid "B<-c URI> | B<--connect URI>"
30920 #: ../fuse/guestmount.pod:90
30921 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
30926 #: ../fuse/guestmount.pod:96
30927 msgid "B<--dir-cache-timeout N>"
30932 #: ../fuse/guestmount.pod:98
30934 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
30935 "seconds. The readdir cache [actually, there are several semi-independent "
30936 "caches] is populated after a readdir(2) call with the stat and extended "
30937 "attributes of the files in the directory, in anticipation that they will be "
30938 "requested soon after."
30943 #: ../fuse/guestmount.pod:104
30945 "There is also a different attribute cache implemented by FUSE (see the FUSE "
30946 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
30947 "requests, only cache existing ones."
30952 #: ../fuse/guestmount.pod:115
30953 msgid "B<--format=raw|qcow2|..> | B<--format>"
30958 #: ../fuse/guestmount.pod:122
30960 "If you have untrusted raw-format guest disk images, you should use this "
30961 "option to specify the disk format. This avoids a possible security problem "
30962 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
30963 "guestfs_add_drive_opts>."
30968 #: ../fuse/guestmount.pod:127
30969 msgid "B<--fuse-help>"
30974 #: ../fuse/guestmount.pod:129
30975 msgid "Display help on special FUSE options (see I<-o> below)."
30980 #: ../fuse/guestmount.pod:133
30981 msgid "Display brief help and exit."
30986 #: ../fuse/guestmount.pod:135
30987 msgid "B<-i> | B<--inspector>"
30992 #: ../fuse/guestmount.pod:146
30993 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
30998 #: ../fuse/guestmount.pod:148
31000 "Mount the named partition or logical volume on the given mountpoint B<in the "
31001 "guest> (this has nothing to do with mountpoints in the host)."
31006 #: ../fuse/guestmount.pod:151
31008 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
31009 "something on C</>."
31014 #: ../fuse/guestmount.pod:154
31015 msgid "B<-n> | B<--no-sync>"
31020 #: ../fuse/guestmount.pod:156
31022 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
31023 "unmounted. If you specify this option, then we don't attempt to sync the "
31024 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
31029 #: ../fuse/guestmount.pod:161
31030 msgid "B<-o option> | B<--option option>"
31035 #: ../fuse/guestmount.pod:163
31036 msgid "Pass extra options to FUSE."
31041 #: ../fuse/guestmount.pod:165
31043 "To get a list of all the extra options supported by FUSE, use the command "
31044 "below. Note that only the FUSE I<-o> options can be passed, and only some "
31045 "of them are a good idea."
31050 #: ../fuse/guestmount.pod:169
31053 " guestmount --fuse-help\n"
31059 #: ../fuse/guestmount.pod:171
31060 msgid "Some potentially useful FUSE options:"
31065 #: ../fuse/guestmount.pod:175
31066 msgid "B<-o allow_other>"
31071 #: ../fuse/guestmount.pod:177
31072 msgid "Allow other users to see the filesystem."
31077 #: ../fuse/guestmount.pod:179
31078 msgid "B<-o attr_timeout=N>"
31083 #: ../fuse/guestmount.pod:181
31084 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
31089 #: ../fuse/guestmount.pod:183
31090 msgid "B<-o kernel_cache>"
31095 #: ../fuse/guestmount.pod:185
31097 "Allow the kernel to cache files (reduces the number of reads that have to go "
31098 "through the L<guestfs(3)> API). This is generally a good idea if you can "
31099 "afford the extra memory usage."
31104 #: ../fuse/guestmount.pod:189
31105 msgid "B<-o uid=N> B<-o gid=N>"
31110 #: ../fuse/guestmount.pod:191
31112 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
31113 "the chosen values."
31118 #: ../fuse/guestmount.pod:196
31119 msgid "B<-r> | B<--ro>"
31124 #: ../fuse/guestmount.pod:198
31126 "Add devices and mount everything read-only. Also disallow writes and make "
31127 "the disk appear read-only to FUSE."
31132 #: ../fuse/guestmount.pod:201
31134 "This is highly recommended if you are not going to edit the guest disk. If "
31135 "the guest is running and this option is I<not> supplied, then there is a "
31136 "strong risk of disk corruption in the guest. We try to prevent this from "
31137 "happening, but it is not always possible."
31142 #: ../fuse/guestmount.pod:206
31143 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
31148 #: ../fuse/guestmount.pod:210
31149 msgid "Enable SELinux support for the guest."
31154 #: ../fuse/guestmount.pod:212
31155 msgid "B<-v> | B<--verbose>"
31160 #: ../fuse/guestmount.pod:214
31161 msgid "Enable verbose messages from underlying libguestfs."
31166 #: ../fuse/guestmount.pod:216
31167 msgid "B<-V> | B<--version>"
31172 #: ../fuse/guestmount.pod:218
31173 msgid "Display the program version and exit."
31178 #: ../fuse/guestmount.pod:220
31179 msgid "B<-w> | B<--rw>"
31184 #: ../fuse/guestmount.pod:222
31186 "This option does nothing at the moment. See L<guestfish(1)/OPENING DISKS "
31187 "FOR READ AND WRITE>."
31192 #: ../fuse/guestmount.pod:225
31193 msgid "B<-x> | B<--trace>"
31198 #: ../fuse/guestmount.pod:227
31199 msgid "Trace libguestfs calls and entry into each FUSE function."
31204 #: ../fuse/guestmount.pod:229
31205 msgid "This also stops the daemon from forking into the background."
31210 #: ../fuse/guestmount.pod:235
31212 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
31213 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
31218 #: ../tools/virt-edit.pl:34
31219 msgid "virt-edit - Edit a file in a virtual machine"
31223 #: ../tools/virt-edit.pl:38
31226 " virt-edit [--options] domname file\n"
31231 #: ../tools/virt-edit.pl:40
31234 " virt-edit [--options] disk.img [disk.img ...] file\n"
31239 #: ../tools/virt-edit.pl:42
31242 " virt-edit [domname|disk.img] file -e 'expr'\n"
31247 #: ../tools/virt-edit.pl:46
31249 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
31250 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
31251 "doing this, but doesn't catch all cases."
31255 #: ../tools/virt-edit.pl:52
31257 "C<virt-edit> is a command line tool to edit C<file> where C<file> exists in "
31258 "the named virtual machine (or disk image)."
31262 #: ../tools/virt-edit.pl:55
31263 msgid "If you want to just view a file, use L<virt-cat(1)>."
31267 #: ../tools/virt-edit.pl:57
31269 "For more complex cases you should look at the L<guestfish(1)> tool (see L</"
31270 "USING GUESTFISH> below)."
31274 #: ../tools/virt-edit.pl:60
31276 "C<virt-edit> cannot be used to create a new file, nor to edit multiple "
31277 "files. L<guestfish(1)> can do that and much more."
31281 #: ../tools/virt-edit.pl:65
31282 msgid "Edit the named files interactively:"
31286 #: ../tools/virt-edit.pl:67
31289 " virt-edit mydomain /boot/grub/grub.conf\n"
31294 #: ../tools/virt-edit.pl:69
31297 " virt-edit mydomain /etc/passwd\n"
31302 #: ../tools/virt-edit.pl:71
31304 "You can also edit files non-interactively (see L</NON-INTERACTIVE EDITING> "
31305 "below). To change the init default level to 5:"
31309 #: ../tools/virt-edit.pl:75
31312 " virt-edit mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
31317 #: ../tools/virt-edit.pl:87 ../tools/virt-win-reg.pl:106
31318 #: ../tools/virt-list-filesystems.pl:63 ../tools/virt-tar.pl:108
31319 #: ../tools/virt-make-fs.pl:163 ../tools/virt-list-partitions.pl:64
31320 msgid "Display brief help."
31324 #: ../tools/virt-edit.pl:95 ../tools/virt-win-reg.pl:114
31325 #: ../tools/virt-resize.pl:272 ../tools/virt-list-filesystems.pl:71
31326 #: ../tools/virt-tar.pl:116 ../tools/virt-make-fs.pl:171
31327 #: ../tools/virt-list-partitions.pl:72
31328 msgid "Display version number and exit."
31332 #: ../tools/virt-edit.pl:101
31333 msgid "B<--backup extension> | B<-b extension>"
31337 #: ../tools/virt-edit.pl:103
31339 "Create a backup of the original file I<in the guest disk image>. The backup "
31340 "has the original filename with C<extension> added."
31344 #: ../tools/virt-edit.pl:106
31346 "Usually the first character of C<extension> would be a dot C<.> so you would "
31351 #: ../tools/virt-edit.pl:109
31354 " virt-edit -b .orig [etc]\n"
31359 #: ../tools/virt-edit.pl:111
31360 msgid "By default, no backup file is made."
31364 #: ../tools/virt-edit.pl:117 ../tools/virt-win-reg.pl:128
31365 #: ../tools/virt-list-filesystems.pl:77 ../tools/virt-tar.pl:122
31366 #: ../tools/virt-list-partitions.pl:78
31367 msgid "B<--connect URI> | B<-c URI>"
31371 #: ../tools/virt-edit.pl:119 ../tools/virt-win-reg.pl:130
31372 #: ../tools/virt-list-filesystems.pl:79 ../tools/virt-tar.pl:124
31373 #: ../tools/virt-list-partitions.pl:80
31375 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
31376 "to the default libvirt hypervisor."
31380 #: ../tools/virt-edit.pl:122 ../tools/virt-win-reg.pl:133
31381 #: ../tools/virt-list-filesystems.pl:82 ../tools/virt-tar.pl:127
31382 #: ../tools/virt-list-partitions.pl:83
31384 "If you specify guest block devices directly, then libvirt is not used at all."
31388 #: ../tools/virt-edit.pl:129 ../tools/virt-win-reg.pl:140
31389 #: ../tools/virt-resize.pl:520 ../tools/virt-list-filesystems.pl:89
31390 #: ../tools/virt-tar.pl:134 ../tools/virt-list-partitions.pl:90
31391 msgid "B<--format> raw"
31395 #: ../tools/virt-edit.pl:131 ../tools/virt-win-reg.pl:142
31396 #: ../tools/virt-list-filesystems.pl:91 ../tools/virt-tar.pl:136
31397 #: ../tools/virt-list-partitions.pl:92
31399 "Specify the format of disk images given on the command line. If this is "
31400 "omitted then the format is autodetected from the content of the disk image."
31404 #: ../tools/virt-edit.pl:135 ../tools/virt-win-reg.pl:146
31405 #: ../tools/virt-list-filesystems.pl:95 ../tools/virt-tar.pl:140
31406 #: ../tools/virt-list-partitions.pl:96
31408 "If disk images are requested from libvirt, then this program asks libvirt "
31409 "for this information. In this case, the value of the format parameter is "
31414 #: ../tools/virt-edit.pl:139 ../tools/virt-win-reg.pl:150
31415 #: ../tools/virt-resize.pl:525 ../tools/virt-resize.pl:540
31416 #: ../tools/virt-list-filesystems.pl:99 ../tools/virt-tar.pl:144
31417 #: ../tools/virt-list-partitions.pl:100
31419 "If working with untrusted raw-format guest disk images, you should ensure "
31420 "the format is always specified."
31424 #: ../tools/virt-edit.pl:146
31425 msgid "B<--expr EXPR> | B<-e EXPR>"
31429 #: ../tools/virt-edit.pl:148
31431 "Instead of launching the external editor, non-interactively apply the Perl "
31432 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
31437 #: ../tools/virt-edit.pl:152
31439 "Be careful to properly quote the expression to prevent it from being altered "
31444 #: ../tools/virt-edit.pl:272
31445 msgid "NON-INTERACTIVE EDITING"
31449 #: ../tools/virt-edit.pl:274
31451 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
31452 "administrator can interactively edit the file."
31456 #: ../tools/virt-edit.pl:277
31458 "There are two ways also to use C<virt-edit> from scripts in order to make "
31459 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
31460 "like this, it's less error-prone to write scripts directly using the "
31461 "libguestfs API and Augeas for configuration file editing.)"
31465 #: ../tools/virt-edit.pl:283
31467 "The first method is to temporarily set C<$EDITOR> to any script or program "
31468 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
31469 "update C<tmpfile> in place however it likes."
31473 #: ../tools/virt-edit.pl:287
31475 "The second method is to use the C<-e> parameter of C<virt-edit> to run a "
31476 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
31477 "instances of C<foo> with C<bar> in a file:"
31481 #: ../tools/virt-edit.pl:291
31484 " virt-edit domname filename -e 's/foo/bar/'\n"
31489 #: ../tools/virt-edit.pl:293
31491 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
31492 "For example to delete root's password you could do:"
31496 #: ../tools/virt-edit.pl:296
31499 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
31504 #: ../tools/virt-edit.pl:298
31506 "What really happens is that the snippet is evaluated as a Perl expression "
31507 "for each line of the file. The line, including the final C<\\n>, is passed "
31508 "in C<$_> and the expression should update C<$_> or leave it unchanged."
31512 #: ../tools/virt-edit.pl:303
31514 "To delete a line, set C<$_> to the empty string. For example, to delete the "
31515 "C<apache> user account from the password file you can do:"
31519 #: ../tools/virt-edit.pl:306
31522 " virt-edit mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
31527 #: ../tools/virt-edit.pl:308
31529 "To insert a line, prepend or append it to C<$_>. However appending lines to "
31530 "the end of the file is rather difficult this way since there is no concept "
31531 "of \"last line of the file\" - your expression just doesn't get called "
31532 "again. You might want to use the first method (setting C<$EDITOR>) if you "
31537 #: ../tools/virt-edit.pl:314
31539 "The variable C<$lineno> contains the current line number. As is "
31540 "traditional, the first line in the file is number C<1>."
31544 #: ../tools/virt-edit.pl:317
31546 "The return value from the expression is ignored, but the expression may call "
31547 "C<die> in order to abort the whole program, leaving the original file "
31552 #: ../tools/virt-edit.pl:321
31554 "Remember when matching the end of a line that C<$_> may contain the final C<"
31555 "\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
31556 "newline then neither of these. Thus to match or substitute some text at the "
31557 "end of a line, use this regular expression:"
31561 #: ../tools/virt-edit.pl:326
31564 " /some text(\\r?\\n)?$/\n"
31569 #: ../tools/virt-edit.pl:328
31571 "Alternately, use the perl C<chomp> function, being careful not to chomp C<"
31572 "$_> itself (since that would remove all newlines from the file):"
31576 #: ../tools/virt-edit.pl:332
31579 " my $m = $_; chomp $m; $m =~ /some text$/\n"
31584 #: ../tools/virt-edit.pl:334
31585 msgid "USING GUESTFISH"
31589 #: ../tools/virt-edit.pl:336
31591 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
31592 "C<virt-edit> doesn't work."
31596 #: ../tools/virt-edit.pl:339
31597 msgid "Using C<virt-edit> is approximately equivalent to doing:"
31601 #: ../tools/virt-edit.pl:341
31604 " guestfish --rw -i -d domname edit /file\n"
31609 #: ../tools/virt-edit.pl:343
31611 "where C<domname> is the name of the libvirt guest, and C</file> is the full "
31612 "path to the file."
31616 #: ../tools/virt-edit.pl:346
31618 "The command above uses libguestfs's guest inspection feature and so does not "
31619 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
31620 "disk images that don't contain guests. To edit a file on a disk image "
31625 #: ../tools/virt-edit.pl:351
31628 " guestfish --rw -a disk.img -m /dev/sda1 edit /file\n"
31633 #: ../tools/virt-edit.pl:353
31635 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
31636 "the disk image to edit, and C</file> is the full path to the file."
31640 #: ../tools/virt-edit.pl:357
31642 "C<virt-edit> cannot create new files. Use the guestfish commands C<touch>, "
31643 "C<write> or C<upload> instead:"
31647 #: ../tools/virt-edit.pl:360
31650 " guestfish --rw -i -d domname touch /newfile\n"
31655 #: ../tools/virt-edit.pl:362
31658 " guestfish --rw -i -d domname write /newfile \"new content\"\n"
31663 #: ../tools/virt-edit.pl:364
31666 " guestfish --rw -i -d domname upload localfile /newfile\n"
31671 #: ../tools/virt-edit.pl:366
31673 "C<virt-edit> cannot edit multiple files, but guestfish can do it like this:"
31677 #: ../tools/virt-edit.pl:369
31680 " guestfish --rw -i -d domname edit /file1 : edit /file2\n"
31685 #: ../tools/virt-edit.pl:379
31690 #: ../tools/virt-edit.pl:381
31692 "If set, this string is used as the editor. It may contain arguments, eg. C<"
31697 #: ../tools/virt-edit.pl:384
31698 msgid "If not set, C<vi> is used."
31702 #: ../tools/virt-edit.pl:388 ../tools/virt-win-reg.pl:559
31703 #: ../tools/virt-resize.pl:1476 ../tools/virt-list-filesystems.pl:182
31704 #: ../tools/virt-tar.pl:274 ../tools/virt-make-fs.pl:532
31705 #: ../tools/virt-list-partitions.pl:250
31706 msgid "SHELL QUOTING"
31710 #: ../tools/virt-edit.pl:390 ../tools/virt-win-reg.pl:567
31711 #: ../tools/virt-resize.pl:1478 ../tools/virt-list-filesystems.pl:184
31712 #: ../tools/virt-tar.pl:276 ../tools/virt-make-fs.pl:534
31713 #: ../tools/virt-list-partitions.pl:252
31715 "Libvirt guest names can contain arbitrary characters, some of which have "
31716 "meaning to the shell such as C<#> and space. You may need to quote or "
31717 "escape these characters on the command line. See the shell manual page L<sh"
31718 "(1)> for details."
31722 #: ../tools/virt-edit.pl:397
31724 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::"
31725 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>, L<perl(1)>, "
31730 #: ../tools/virt-edit.pl:407 ../tools/virt-win-reg.pl:598
31731 #: ../tools/virt-resize.pl:1504 ../tools/virt-list-filesystems.pl:202
31732 #: ../tools/virt-tar.pl:292 ../tools/virt-make-fs.pl:564
31733 #: ../tools/virt-list-partitions.pl:269
31738 #: ../tools/virt-edit.pl:409 ../tools/virt-win-reg.pl:600
31739 #: ../tools/virt-resize.pl:1506 ../tools/virt-list-filesystems.pl:204
31740 #: ../tools/virt-tar.pl:294 ../tools/virt-make-fs.pl:566
31741 #: ../tools/virt-list-partitions.pl:271
31742 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
31746 #: ../tools/virt-edit.pl:413
31747 msgid "Copyright (C) 2009-2011 Red Hat Inc."
31751 #: ../tools/virt-win-reg.pl:37
31753 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
31757 #: ../tools/virt-win-reg.pl:41
31760 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
31765 #: ../tools/virt-win-reg.pl:43
31768 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
31773 #: ../tools/virt-win-reg.pl:45
31776 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
31781 #: ../tools/virt-win-reg.pl:47
31784 " virt-win-reg --merge domname [input.reg ...]\n"
31789 #: ../tools/virt-win-reg.pl:49
31792 " virt-win-reg [--options] disk.img ... # instead of domname\n"
31797 #: ../tools/virt-win-reg.pl:53
31799 "You must I<not> use C<virt-win-reg> with the C<--merge> option on live "
31800 "virtual machines. If you do this, you I<will> get irreversible disk "
31801 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
31802 "but doesn't catch all cases."
31806 #: ../tools/virt-win-reg.pl:58
31808 "Modifying the Windows Registry is an inherently risky operation. The format "
31809 "is deliberately obscure and undocumented, and Registry changes can leave the "
31810 "system unbootable. Therefore when using the C<--merge> option, make sure "
31811 "you have a reliable backup first."
31815 #: ../tools/virt-win-reg.pl:65
31817 "This program can export and merge Windows Registry entries from a Windows "
31822 #: ../tools/virt-win-reg.pl:68
31824 "The first parameter is the libvirt guest name or the raw disk image of a "
31829 #: ../tools/virt-win-reg.pl:71
31831 "If C<--merge> is I<not> specified, then the chosen registry key is displayed/"
31832 "exported (recursively). For example:"
31836 #: ../tools/virt-win-reg.pl:74
31839 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
31844 #: ../tools/virt-win-reg.pl:76
31846 "You can also display single values from within registry keys, for example:"
31850 #: ../tools/virt-win-reg.pl:79
31853 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
31854 " $ virt-win-reg Windows7 $cvkey ProductName\n"
31855 " Windows 7 Enterprise\n"
31860 #: ../tools/virt-win-reg.pl:83
31862 "With C<--merge>, you can merge a textual regedit file into the Windows "
31867 #: ../tools/virt-win-reg.pl:86
31870 " $ virt-win-reg --merge Windows7 changes.reg\n"
31875 #: ../tools/virt-win-reg.pl:88
31880 #: ../tools/virt-win-reg.pl:90
31882 "This program is only meant for simple access to the registry. If you want "
31883 "to do complicated things with the registry, we suggest you download the "
31884 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
31885 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
31886 "L<hivexregedit(1)>."
31890 #: ../tools/virt-win-reg.pl:120 ../tools/virt-make-fs.pl:177
31895 #: ../tools/virt-win-reg.pl:122 ../tools/virt-resize.pl:498
31896 msgid "Enable debugging messages."
31900 #: ../tools/virt-win-reg.pl:157
31905 #: ../tools/virt-win-reg.pl:159
31907 "In merge mode, this merges a textual regedit file into the Windows Registry "
31908 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
31909 "displays or exports Registry entries instead."
31913 #: ../tools/virt-win-reg.pl:163
31915 "Note that C<--merge> is I<unsafe> to use on live virtual machines, and will "
31916 "result in disk corruption. However exporting (without this flag) is always "
31921 #: ../tools/virt-win-reg.pl:171
31922 msgid "B<--encoding> UTF-16LE|ASCII"
31926 #: ../tools/virt-win-reg.pl:173
31928 "When merging (only), you may need to specify the encoding for strings to be "
31929 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
31930 "(3)/ENCODING STRINGS>."
31934 #: ../tools/virt-win-reg.pl:177
31936 "The default is to use UTF-16LE, which should work with recent versions of "
31941 #: ../tools/virt-win-reg.pl:402
31942 msgid "SUPPORTED SYSTEMS"
31946 #: ../tools/virt-win-reg.pl:404
31948 "The program currently supports Windows NT-derived guests starting with "
31949 "Windows XP through to at least Windows 7."
31953 #: ../tools/virt-win-reg.pl:407
31955 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, C<HKEY_LOCAL_MACHINE"
31956 "\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, C<HKEY_LOCAL_MACHINE\\SYSTEM> "
31957 "and C<HKEY_USERS\\.DEFAULT>."
31961 #: ../tools/virt-win-reg.pl:411
31963 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
31968 #: ../tools/virt-win-reg.pl:414
31970 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
31975 #: ../tools/virt-win-reg.pl:417
31980 #: ../tools/virt-win-reg.pl:419
31982 "C<virt-win-reg> expects that regedit files have already been reencoded in "
31983 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
31984 "style line endings. Since Windows regedit files are often in UTF-16LE with "
31985 "Windows-style line endings, you may need to reencode the whole file before "
31986 "or after processing."
31990 #: ../tools/virt-win-reg.pl:425
31992 "To reencode a file from Windows format to Linux (before processing it with "
31993 "the C<--merge> option), you would do something like this:"
31997 #: ../tools/virt-win-reg.pl:428
32000 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
32005 #: ../tools/virt-win-reg.pl:430
32007 "To go in the opposite direction, after exporting and before sending the file "
32008 "to a Windows user, do something like this:"
32012 #: ../tools/virt-win-reg.pl:433
32015 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
32020 #: ../tools/virt-win-reg.pl:435
32021 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
32025 #: ../tools/virt-win-reg.pl:437
32027 "If you are unsure about the current encoding, use the L<file(1)> command. "
32028 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
32029 "style (CRLF) line endings, like this:"
32033 #: ../tools/virt-win-reg.pl:441
32036 " $ file software.reg\n"
32037 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
32038 " with CRLF line terminators\n"
32043 #: ../tools/virt-win-reg.pl:445
32044 msgid "This file would need conversion before you could C<--merge> it."
32048 #: ../tools/virt-win-reg.pl:447
32049 msgid "CurrentControlSet etc."
32053 #: ../tools/virt-win-reg.pl:449
32055 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
32056 "Registry at the level of the hive file, and therefore you cannot modify "
32061 #: ../tools/virt-win-reg.pl:453
32063 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
32064 "circumstances it might refer to another control set. The way to find out is "
32065 "to look at the C<HKLM\\SYSTEM\\Select> key:"
32069 #: ../tools/virt-win-reg.pl:457
32072 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
32073 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
32074 " \"Current\"=dword:00000001\n"
32075 " \"Default\"=dword:00000001\n"
32076 " \"Failed\"=dword:00000000\n"
32077 " \"LastKnownGood\"=dword:00000002\n"
32082 #: ../tools/virt-win-reg.pl:464
32083 msgid "\"Current\" is the one which Windows will choose when it boots."
32087 #: ../tools/virt-win-reg.pl:466
32089 "Similarly, other C<Current...> keys in the path may need to be replaced."
32093 #: ../tools/virt-win-reg.pl:469
32094 msgid "WINDOWS TIPS"
32098 #: ../tools/virt-win-reg.pl:471
32100 "Note that some of these tips modify the guest disk image. The guest I<must> "
32101 "be shut off, else you will get disk corruption."
32105 #: ../tools/virt-win-reg.pl:474
32106 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
32110 #: ../tools/virt-win-reg.pl:476
32112 "Prepare a DOS batch script, VBScript or executable. Upload this using "
32113 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
32114 "is uploaded into C<C:\\>:"
32118 #: ../tools/virt-win-reg.pl:480
32121 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
32126 #: ../tools/virt-win-reg.pl:482
32127 msgid "Prepare a regedit file containing the registry change:"
32131 #: ../tools/virt-win-reg.pl:484
32134 " cat > test.reg <<'EOF'\n"
32135 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
32136 " \"Test\"=\"c:\\\\test.bat\"\n"
32142 #: ../tools/virt-win-reg.pl:489
32144 "In this example we use the key C<RunOnce> which means that the script will "
32145 "run precisely once when the first user logs in. If you want it to run every "
32146 "time a user logs in, replace C<RunOnce> with C<Run>."
32150 #: ../tools/virt-win-reg.pl:493
32151 msgid "Now update the registry:"
32155 #: ../tools/virt-win-reg.pl:495
32158 " virt-win-reg --merge WindowsGuest test.reg\n"
32163 #: ../tools/virt-win-reg.pl:497
32164 msgid "INSTALLING A SERVICE"
32168 #: ../tools/virt-win-reg.pl:499
32170 "This section assumes you are familiar with Windows services, and you either "
32171 "have a program which handles the Windows Service Control Protocol directly "
32172 "or you want to run any program using a service wrapper like SrvAny or the "
32177 #: ../tools/virt-win-reg.pl:504
32179 "First upload the program and optionally the service wrapper. In this case "
32180 "the test program is called C<test.exe> and we are using the RHSrvAny wrapper:"
32184 #: ../tools/virt-win-reg.pl:508
32187 " guestfish -i -d WindowsGuest <<EOF\n"
32188 " upload rhsrvany.exe /rhsrvany.exe\n"
32189 " upload test.exe /test.exe\n"
32195 #: ../tools/virt-win-reg.pl:513
32197 "Prepare a regedit file containing the registry changes. In this example, "
32198 "the first registry change is needed for the service itself or the service "
32199 "wrapper (if used). The second registry change is only needed because I am "
32200 "using the RHSrvAny service wrapper."
32204 #: ../tools/virt-win-reg.pl:518
32207 " cat > service.reg <<'EOF'\n"
32208 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
32209 " \"Type\"=dword:00000010\n"
32210 " \"Start\"=dword:00000002\n"
32211 " \"ErrorControl\"=dword:00000001\n"
32212 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
32213 " \"DisplayName\"=\"RHSrvAny\"\n"
32214 " \"ObjectName\"=\"NetworkService\"\n"
32219 #: ../tools/virt-win-reg.pl:527
32222 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
32223 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
32224 " \"PWD\"=\"c:\\\\Temp\"\n"
32230 #: ../tools/virt-win-reg.pl:538
32232 "For use of C<ControlSet001> see the section above in this manual page. You "
32233 "may need to adjust this according to the control set that is in use by the "
32238 #: ../tools/virt-win-reg.pl:544
32240 "C<\"ObjectName\"> controls the privileges that the service will have. An "
32241 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
32242 "privileged account."
32246 #: ../tools/virt-win-reg.pl:550
32248 "For the meaning of the magic numbers, see this Microsoft KB article: "
32249 "L<http://support.microsoft.com/kb/103000>."
32253 #: ../tools/virt-win-reg.pl:555
32254 msgid "Update the registry:"
32258 #: ../tools/virt-win-reg.pl:557
32261 " virt-win-reg --merge WindowsGuest service.reg\n"
32266 #: ../tools/virt-win-reg.pl:561
32268 "Be careful when passing parameters containing C<\\> (backslash) in the "
32269 "shell. Usually you will have to use 'single quotes' or double backslashes "
32270 "(but not both) to protect them from the shell."
32274 #: ../tools/virt-win-reg.pl:565
32275 msgid "Paths and value names are case-insensitive."
32279 #: ../tools/virt-win-reg.pl:574
32281 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
32282 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
32283 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
32287 #: ../tools/virt-win-reg.pl:589 ../tools/virt-make-fs.pl:555
32289 "When reporting bugs, please enable debugging and capture the I<complete> "
32294 #: ../tools/virt-win-reg.pl:592
32297 " export LIBGUESTFS_DEBUG=1\n"
32298 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
32303 #: ../tools/virt-win-reg.pl:595
32305 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."
32310 #: ../tools/virt-win-reg.pl:604 ../tools/virt-resize.pl:1510
32311 #: ../tools/virt-make-fs.pl:570
32312 msgid "Copyright (C) 2010 Red Hat Inc."
32316 #: ../tools/virt-resize.pl:42
32317 msgid "virt-resize - Resize a virtual machine disk"
32321 #: ../tools/virt-resize.pl:46
32324 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
32325 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
32326 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
32331 #: ../tools/virt-resize.pl:52
32333 "Virt-resize is a tool which can resize a virtual machine disk, making it "
32334 "larger or smaller overall, and resizing or deleting any partitions contained "
32339 #: ../tools/virt-resize.pl:56
32341 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
32342 "not> be used on live virtual machines - for consistent results, shut the "
32343 "virtual machine down before resizing it."
32347 #: ../tools/virt-resize.pl:60
32349 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
32350 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
32354 #: ../tools/virt-resize.pl:66
32356 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
32357 "fill the extra 5GB of space."
32361 #: ../tools/virt-resize.pl:69
32364 " truncate -r olddisk newdisk; truncate -s +5G newdisk\n"
32365 " virt-filesystems --long -h --all -a olddisk\n"
32366 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
32367 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
32372 #: ../tools/virt-resize.pl:74
32374 "As above, but make the /boot partition 200MB bigger, while giving the "
32375 "remaining space to /dev/sda2:"
32379 #: ../tools/virt-resize.pl:77
32382 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk\n"
32387 #: ../tools/virt-resize.pl:79
32388 msgid "As above, but the output format will be uncompressed qcow2:"
32392 #: ../tools/virt-resize.pl:81
32395 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
32396 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
32401 #: ../tools/virt-resize.pl:84
32402 msgid "DETAILED USAGE"
32406 #: ../tools/virt-resize.pl:86
32407 msgid "EXPANDING A VIRTUAL MACHINE DISK"
32411 #: ../tools/virt-resize.pl:90
32412 msgid "1. Shut down the virtual machine"
32416 #: ../tools/virt-resize.pl:92
32417 msgid "2. Locate input disk image"
32421 #: ../tools/virt-resize.pl:94
32423 "Locate the input disk image (ie. the file or device on the host containing "
32424 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
32425 "dumpxml> like this to find the disk image name:"
32429 #: ../tools/virt-resize.pl:98
32432 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
32433 " Found 1 nodes:\n"
32435 " <source dev=\"/dev/vg/lv_guest\" />\n"
32440 #: ../tools/virt-resize.pl:103
32441 msgid "3. Look at current sizing"
32445 #: ../tools/virt-resize.pl:105
32446 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
32450 #: ../tools/virt-resize.pl:108
32453 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
32454 " Name Type Size Parent\n"
32455 " /dev/sda1 partition 101M /dev/sda\n"
32456 " /dev/sda2 partition 7.9G /dev/sda\n"
32457 " /dev/sda device 8.0G -\n"
32462 #: ../tools/virt-resize.pl:114
32464 "(This example is a virtual machine with an 8 GB disk which we would like to "
32465 "expand up to 10 GB)."
32469 #: ../tools/virt-resize.pl:117
32470 msgid "4. Create output disk"
32474 #: ../tools/virt-resize.pl:119
32476 "Virt-resize cannot do in-place disk modifications. You have to have space "
32477 "to store the resized output disk."
32481 #: ../tools/virt-resize.pl:122
32483 "To store the resized disk image in a file, create a file of a suitable size:"
32487 #: ../tools/virt-resize.pl:125
32490 " # rm -f outdisk\n"
32491 " # truncate -s 10G outdisk\n"
32496 #: ../tools/virt-resize.pl:128
32497 msgid "Or use L<lvcreate(1)> to create a logical volume:"
32501 #: ../tools/virt-resize.pl:130
32504 " # lvcreate -L 10G -n lv_name vg_name\n"
32509 #: ../tools/virt-resize.pl:132
32510 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
32514 #: ../tools/virt-resize.pl:134
32517 " # virsh pool-list\n"
32518 " # virsh vol-create-as poolname newvol 10G\n"
32523 #: ../tools/virt-resize.pl:137
32528 #: ../tools/virt-resize.pl:139
32530 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
32531 "file) and the output disk. The output disk is the one created in the "
32536 #: ../tools/virt-resize.pl:143
32539 " # virt-resize indisk outdisk\n"
32544 #: ../tools/virt-resize.pl:145
32546 "This command just copies disk image C<indisk> to disk image C<outdisk> "
32547 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
32548 "larger, then an extra, empty partition is created at the end of the disk "
32549 "covering the extra space. If C<outdisk> is smaller, then it will give an "
32554 #: ../tools/virt-resize.pl:151
32556 "More realistically you'd want to expand existing partitions in the disk "
32557 "image by passing extra options (for the full list see the L</OPTIONS> "
32562 #: ../tools/virt-resize.pl:155
32564 "L</--expand> is the most useful option. It expands the named partition "
32565 "within the disk to fill any extra space:"
32569 #: ../tools/virt-resize.pl:158
32572 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
32577 #: ../tools/virt-resize.pl:160
32579 "(In this case, an extra partition is I<not> created at the end of the disk, "
32580 "because there will be no unused space)."
32584 #: ../tools/virt-resize.pl:163
32586 "L</--resize> is the other commonly used option. The following would "
32587 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
32588 "rest of the available space:"
32592 #: ../tools/virt-resize.pl:167
32595 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
32596 " indisk outdisk\n"
32601 #: ../tools/virt-resize.pl:170
32603 "If the expanded partition in the image contains a filesystem or LVM PV, then "
32604 "if virt-resize knows how, it will resize the contents, the equivalent of "
32605 "calling a command such as L<pvresize(8)>, L<resize2fs(8)> or L<ntfsresize(8)"
32606 ">. However virt-resize does not know how to resize some filesystems, so you "
32607 "would have to online resize them after booting the guest."
32611 #: ../tools/virt-resize.pl:177
32612 msgid "Other options are covered below."
32616 #: ../tools/virt-resize.pl:179
32621 #: ../tools/virt-resize.pl:181
32622 msgid "Thoroughly test the new disk image I<before> discarding the old one."
32626 #: ../tools/virt-resize.pl:183
32627 msgid "If you are using libvirt, edit the XML to point at the new disk:"
32631 #: ../tools/virt-resize.pl:185
32634 " # virsh edit guestname\n"
32639 #: ../tools/virt-resize.pl:187
32641 "Change E<lt>source ...E<gt>, see L<http://libvirt.org/formatdomain."
32642 "html#elementsDisks>"
32646 #: ../tools/virt-resize.pl:190
32647 msgid "Then start up the domain with the new, resized disk:"
32651 #: ../tools/virt-resize.pl:192
32654 " # virsh start guestname\n"
32659 #: ../tools/virt-resize.pl:194
32661 "and check that it still works. See also the L</NOTES> section below for "
32662 "additional information."
32666 #: ../tools/virt-resize.pl:197
32667 msgid "7. Resize LVs etc inside the guest"
32671 #: ../tools/virt-resize.pl:199
32672 msgid "(This can also be done offline using L<guestfish(1)>)"
32676 #: ../tools/virt-resize.pl:201
32678 "Once the guest has booted you should see the new space available, at least "
32679 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
32680 "may need to resize LVs inside PVs, and also resize filesystem types that "
32681 "virt-resize does not know how to expand."
32685 #: ../tools/virt-resize.pl:208
32686 msgid "SHRINKING A VIRTUAL MACHINE DISK"
32690 #: ../tools/virt-resize.pl:210
32692 "Shrinking is somewhat more complex than expanding, and only an overview is "
32697 #: ../tools/virt-resize.pl:213
32699 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
32700 "filesystems). The user has to shrink content before passing the disk image "
32701 "to virt-resize, and virt-resize will check that the content has been shrunk "
32706 #: ../tools/virt-resize.pl:218
32707 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
32711 #: ../tools/virt-resize.pl:220
32713 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
32714 "steps 3 and 4 above to allocate a new disk image."
32718 #: ../tools/virt-resize.pl:223
32720 "Then run virt-resize with any of the C<--shrink> and/or C<--resize> options."
32724 #: ../tools/virt-resize.pl:226
32725 msgid "IGNORING OR DELETING PARTITIONS"
32729 #: ../tools/virt-resize.pl:228
32731 "virt-resize also gives a convenient way to ignore or delete partitions when "
32732 "copying from the input disk to the output disk. Ignoring a partition speeds "
32733 "up the copy where you don't care about the existing contents of a "
32734 "partition. Deleting a partition removes it completely, but note that it "
32735 "also renumbers any partitions after the one which is deleted, which can "
32736 "leave some guests unbootable."
32740 #: ../tools/virt-resize.pl:235
32741 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
32745 #: ../tools/virt-resize.pl:237
32747 "If the input disk is in qcow2 format, then you may prefer that the output is "
32748 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
32749 "the fly. The output format is simply determined by the format of the empty "
32750 "output container that you provide. Thus to create qcow2 output, use:"
32754 #: ../tools/virt-resize.pl:243
32757 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
32762 #: ../tools/virt-resize.pl:245
32763 msgid "instead of the truncate command (use C<-c> for a compressed disk)."
32767 #: ../tools/virt-resize.pl:247
32768 msgid "Similarly, to get non-sparse raw output use:"
32772 #: ../tools/virt-resize.pl:249
32775 " fallocate -l size outdisk\n"
32780 #: ../tools/virt-resize.pl:251
32782 "(on older systems that don't have the L<fallocate(1)> command use C<dd if=/"
32783 "dev/zero of=outdisk bs=1M count=..>)"
32787 #: ../tools/virt-resize.pl:264
32788 msgid "Display help."
32792 #: ../tools/virt-resize.pl:278
32793 msgid "B<--resize part=size>"
32797 #: ../tools/virt-resize.pl:280
32799 "Resize the named partition (expanding or shrinking it) so that it has the "
32804 #: ../tools/virt-resize.pl:283
32806 "C<size> can be expressed as an absolute number followed by b/K/M/G/T/P/E to "
32807 "mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or "
32808 "Exabytes; or as a percentage of the current size; or as a relative number or "
32809 "percentage. For example:"
32813 #: ../tools/virt-resize.pl:288
32816 " --resize /dev/sda2=10G\n"
32821 #: ../tools/virt-resize.pl:290
32824 " --resize /dev/sda4=90%\n"
32829 #: ../tools/virt-resize.pl:292
32832 " --resize /dev/sda2=+1G\n"
32837 #: ../tools/virt-resize.pl:294
32840 " --resize /dev/sda2=-200M\n"
32845 #: ../tools/virt-resize.pl:296
32848 " --resize /dev/sda1=+128K\n"
32853 #: ../tools/virt-resize.pl:298
32856 " --resize /dev/sda1=+10%\n"
32861 #: ../tools/virt-resize.pl:300
32864 " --resize /dev/sda1=-10%\n"
32869 #: ../tools/virt-resize.pl:302
32871 "You can increase the size of any partition. Virt-resize will expand the "
32872 "direct content of the partition if it knows how (see C<--expand> below)."
32876 #: ../tools/virt-resize.pl:306
32878 "You can only I<decrease> the size of partitions that contain filesystems or "
32879 "PVs which have already been shrunk. Virt-resize will check this has been "
32880 "done before proceeding, or else will print an error (see also C<--resize-"
32885 #: ../tools/virt-resize.pl:311 ../tools/virt-resize.pl:403
32886 #: ../tools/virt-resize.pl:420
32887 msgid "You can give this option multiple times."
32891 #: ../tools/virt-resize.pl:317
32892 msgid "B<--resize-force part=size>"
32896 #: ../tools/virt-resize.pl:319
32898 "This is the same as C<--resize> except that it will let you decrease the "
32899 "size of any partition. Generally this means you will lose any data which "
32900 "was at the end of the partition you shrink, but you may not care about that "
32901 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
32902 "as a swap partition)."
32906 #: ../tools/virt-resize.pl:325
32907 msgid "See also the C<--ignore> option."
32911 #: ../tools/virt-resize.pl:331
32912 msgid "B<--expand part>"
32916 #: ../tools/virt-resize.pl:333
32918 "Expand the named partition so it uses up all extra space (space left over "
32919 "after any other resize changes that you request have been done)."
32923 #: ../tools/virt-resize.pl:336
32925 "If virt-resize knows how, it will expand the direct content of the "
32926 "partition. For example, if the partition is an LVM PV, it will expand the "
32927 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
32928 "content it doesn't know about alone."
32932 #: ../tools/virt-resize.pl:341
32933 msgid "Currently virt-resize can resize:"
32937 #: ../tools/virt-resize.pl:347
32939 "ext2, ext3 and ext4 filesystems when they are contained directly inside a "
32944 #: ../tools/virt-resize.pl:352
32946 "NTFS filesystems contained directly in a partition, if libguestfs was "
32947 "compiled with support for NTFS."
32951 #: ../tools/virt-resize.pl:355
32953 "The filesystem must have been shut down consistently last time it was used. "
32954 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
32955 "consistency check, so at the first boot after resizing Windows will check "
32960 #: ../tools/virt-resize.pl:362
32962 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
32963 "inside the PV, but see the C<--LV-expand> option. The user could also "
32964 "resize LVs as desired after boot."
32968 #: ../tools/virt-resize.pl:368 ../tools/virt-resize.pl:390
32969 msgid "Note that you cannot use C<--expand> and C<--shrink> together."
32973 #: ../tools/virt-resize.pl:374
32974 msgid "B<--shrink part>"
32978 #: ../tools/virt-resize.pl:376
32980 "Shrink the named partition until the overall disk image fits in the "
32981 "destination. The named partition B<must> contain a filesystem or PV which "
32982 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
32983 "online tools). Virt-resize will check this and give an error if it has not "
32988 #: ../tools/virt-resize.pl:382
32990 "The amount by which the overall disk must be shrunk (after carrying out all "
32991 "other operations requested by the user) is called the \"deficit\". For "
32992 "example, a straight copy (assume no other operations) from a 5GB disk image "
32993 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
32994 "would give an error unless the user specified a partition to shrink and that "
32995 "partition had more than a gigabyte of free space."
32999 #: ../tools/virt-resize.pl:396
33000 msgid "B<--ignore part>"
33004 #: ../tools/virt-resize.pl:398
33006 "Ignore the named partition. Effectively this means the partition is "
33007 "allocated on the destination disk, but the content is not copied across from "
33008 "the source disk. The content of the partition will be blank (all zero "
33013 #: ../tools/virt-resize.pl:409
33014 msgid "B<--delete part>"
33018 #: ../tools/virt-resize.pl:411
33020 "Delete the named partition. It would be more accurate to describe this as "
33021 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
33022 "the original disk image is left intact."
33026 #: ../tools/virt-resize.pl:415
33028 "Note that when you delete a partition, then anything contained in the "
33029 "partition is also deleted. Furthermore, this causes any partitions that "
33030 "come after to be I<renumbered>, which can easily make your guest unbootable."
33034 #: ../tools/virt-resize.pl:426
33035 msgid "B<--LV-expand logvol>"
33039 #: ../tools/virt-resize.pl:428
33041 "This takes the logical volume and, as a final step, expands it to fill all "
33042 "the space available in its volume group. A typical usage, assuming a Linux "
33043 "guest with a single PV C</dev/sda2> and a root device called C</dev/vg_guest/"
33044 "lv_root> would be:"
33048 #: ../tools/virt-resize.pl:433
33051 " virt-resize indisk outdisk \\\n"
33052 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
33057 #: ../tools/virt-resize.pl:436
33059 "This would first expand the partition (and PV), and then expand the root "
33060 "device to fill the extra space in the PV."
33064 #: ../tools/virt-resize.pl:439
33066 "The contents of the LV are also resized if virt-resize knows how to do "
33067 "that. You can stop virt-resize from trying to expand the content by using "
33068 "the option C<--no-expand-content>."
33072 #: ../tools/virt-resize.pl:443
33073 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
33077 #: ../tools/virt-resize.pl:446
33079 "You can give this option multiple times, I<but> it doesn't make sense to do "
33080 "this unless the logical volumes you specify are all in different volume "
33085 #: ../tools/virt-resize.pl:454
33086 msgid "B<--no-copy-boot-loader>"
33090 #: ../tools/virt-resize.pl:456
33092 "By default, virt-resize copies over some sectors at the start of the disk "
33093 "(up to the beginning of the first partition). Commonly these sectors "
33094 "contain the Master Boot Record (MBR) and the boot loader, and are required "
33095 "in order for the guest to boot correctly."
33099 #: ../tools/virt-resize.pl:461
33101 "If you specify this flag, then this initial copy is not done. You may need "
33102 "to reinstall the boot loader in this case."
33106 #: ../tools/virt-resize.pl:469
33107 msgid "B<--no-extra-partition>"
33111 #: ../tools/virt-resize.pl:471
33113 "By default, virt-resize creates an extra partition if there is any extra, "
33114 "unused space after all resizing has happened. Use this option to prevent "
33115 "the extra partition from being created. If you do this then the extra space "
33116 "will be inaccessible until you run fdisk, parted, or some other partitioning "
33117 "tool in the guest."
33121 #: ../tools/virt-resize.pl:477
33123 "Note that if the surplus space is smaller than 10 MB, no extra partition "
33128 #: ../tools/virt-resize.pl:484
33129 msgid "B<--no-expand-content>"
33133 #: ../tools/virt-resize.pl:486
33135 "By default, virt-resize will try to expand the direct contents of "
33136 "partitions, if it knows how (see C<--expand> option above)."
33140 #: ../tools/virt-resize.pl:489
33142 "If you give the C<--no-expand-content> option then virt-resize will not "
33147 #: ../tools/virt-resize.pl:496
33148 msgid "B<-d> | B<--debug>"
33152 #: ../tools/virt-resize.pl:504
33153 msgid "B<-n> | B<--dryrun>"
33157 #: ../tools/virt-resize.pl:506
33158 msgid "Print a summary of what would be done, but don't do anything."
33162 #: ../tools/virt-resize.pl:512
33163 msgid "B<-q> | B<--quiet>"
33167 #: ../tools/virt-resize.pl:514
33168 msgid "Don't print the summary."
33172 #: ../tools/virt-resize.pl:522
33174 "Specify the format of the input disk image. If this flag is not given then "
33175 "it is auto-detected from the image itself."
33179 #: ../tools/virt-resize.pl:528
33181 "Note that this option I<does not> affect the output format. See L</QCOW2 "
33182 "AND NON-SPARSE RAW FORMATS>."
33186 #: ../tools/virt-resize.pl:535
33187 msgid "B<--output-format> raw"
33191 #: ../tools/virt-resize.pl:537
33193 "Specify the format of the output disk image. If this flag is not given then "
33194 "it is auto-detected from the image itself."
33198 #: ../tools/virt-resize.pl:543
33200 "Note that you still need to create the output disk with the right format. "
33201 "See L</QCOW2 AND NON-SPARSE RAW FORMATS>."
33205 #: ../tools/virt-resize.pl:1419
33210 #: ../tools/virt-resize.pl:1421
33211 msgid "\"Partition 1 does not end on cylinder boundary.\""
33215 #: ../tools/virt-resize.pl:1423
33217 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
33218 "means the partitions will not be aligned to the ancient CHS geometry. "
33219 "However CHS geometry is meaningless for disks manufactured since the early "
33220 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
33221 "cylinders is not required by any modern operating system."
33225 #: ../tools/virt-resize.pl:1430
33226 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
33230 #: ../tools/virt-resize.pl:1432
33232 "In Windows Vista and later versions, Microsoft switched to using a separate "
33233 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
33234 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
33235 "the boot partition. Doing so seems to break the guest completely. However "
33236 "expanding the second partition (ie. C: drive) should work."
33240 #: ../tools/virt-resize.pl:1439
33242 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
33243 "NTFS partitions have been expanded. This is just a safety check and (unless "
33244 "it find errors) is nothing to worry about."
33248 #: ../tools/virt-resize.pl:1443
33249 msgid "GUEST BOOT STUCK AT \"GRUB\""
33253 #: ../tools/virt-resize.pl:1445
33255 "If a Linux guest does not boot after resizing, and the boot is stuck after "
33256 "printing C<GRUB> on the console, try reinstalling grub. This sometimes "
33257 "happens on older (RHEL 5-era) guests, for reasons we don't fully understand, "
33258 "although we think is to do with partition alignment."
33262 #: ../tools/virt-resize.pl:1450
33265 " guestfish -i -a newdisk\n"
33266 " ><fs> cat /boot/grub/device.map\n"
33267 " # check the contents of this file are sensible or\n"
33268 " # edit the file if necessary\n"
33269 " ><fs> grub-install / /dev/vda\n"
33275 #: ../tools/virt-resize.pl:1457
33277 "For more flexible guest reconfiguration, including if you need to specify "
33278 "other parameters to grub-install, use L<virt-rescue(1)>."
33282 #: ../tools/virt-resize.pl:1460
33283 msgid "ALTERNATIVE TOOLS"
33287 #: ../tools/virt-resize.pl:1462
33289 "There are several proprietary tools for resizing partitions. We won't "
33290 "mention any here."
33294 #: ../tools/virt-resize.pl:1465
33296 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
33297 "operations on disk images. They can resize and move partitions, but I don't "
33298 "think they can do anything with the contents, and they certainly don't "
33303 #: ../tools/virt-resize.pl:1470
33305 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
33306 "but at a much lower level. You will probably end up hand-calculating sector "
33307 "offsets, which is something that virt-resize was designed to avoid. If you "
33308 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
33313 #: ../tools/virt-resize.pl:1485
33315 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<lvm"
33316 "(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)>, "
33317 "L<virsh(1)>, L<parted(8)>, L<truncate(1)>, L<fallocate(1)>, L<grub(8)>, "
33318 "L<grub-install(8)>, L<virt-rescue(1)>, L<Sys::Guestfs(3)>, L<http://"
33319 "libguestfs.org/>."
33323 #: ../tools/virt-list-filesystems.pl:32
33325 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
33329 #: ../tools/virt-list-filesystems.pl:36
33332 " virt-list-filesystems [--options] domname\n"
33337 #: ../tools/virt-list-filesystems.pl:38
33340 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
33345 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
33347 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
33352 #: ../tools/virt-list-filesystems.pl:45
33354 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
33355 "are contained in a virtual machine or disk image."
33359 #: ../tools/virt-list-filesystems.pl:49
33361 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
33362 "functionality. For more complex cases you should look at the L<guestfish(1)"
33367 #: ../tools/virt-list-filesystems.pl:106 ../tools/virt-list-partitions.pl:115
33368 msgid "B<-l> | B<--long>"
33372 #: ../tools/virt-list-filesystems.pl:108
33374 "With this option, C<virt-list-filesystems> displays the type of each "
33375 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
33379 #: ../tools/virt-list-filesystems.pl:115
33380 msgid "B<-a> | B<--all>"
33384 #: ../tools/virt-list-filesystems.pl:117
33386 "Normally we only show mountable filesystems. If this option is given then "
33387 "swap devices are shown too."
33391 #: ../tools/virt-list-filesystems.pl:191
33393 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-"
33394 "filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::"
33395 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
33399 #: ../tools/virt-list-filesystems.pl:208 ../tools/virt-tar.pl:298
33400 msgid "Copyright (C) 2009 Red Hat Inc."
33404 #: ../tools/virt-tar.pl:33
33405 msgid "virt-tar - Extract or upload files to a virtual machine"
33409 #: ../tools/virt-tar.pl:37
33412 " virt-tar [--options] -x domname directory tarball\n"
33417 #: ../tools/virt-tar.pl:39
33420 " virt-tar [--options] -u domname tarball directory\n"
33425 #: ../tools/virt-tar.pl:41
33428 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
33433 #: ../tools/virt-tar.pl:43
33436 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
33441 #: ../tools/virt-tar.pl:47
33442 msgid "Download C</home> from the VM into a local tarball:"
33446 #: ../tools/virt-tar.pl:49
33449 " virt-tar -x domname /home home.tar\n"
33454 #: ../tools/virt-tar.pl:51
33457 " virt-tar -zx domname /home home.tar.gz\n"
33462 #: ../tools/virt-tar.pl:53
33463 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
33467 #: ../tools/virt-tar.pl:55
33470 " virt-tar -u domname uploadstuff.tar /tmp\n"
33475 #: ../tools/virt-tar.pl:57
33478 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
33483 #: ../tools/virt-tar.pl:61
33485 "You must I<not> use C<virt-tar> with the C<-u> option (upload) on live "
33486 "virtual machines. If you do this, you risk disk corruption in the VM. "
33487 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
33491 #: ../tools/virt-tar.pl:66
33493 "You can use C<-x> (extract) on live virtual machines, but you might get "
33494 "inconsistent results or errors if there is filesystem activity inside the "
33495 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
33496 "work, but the only way to guarantee consistent results is if the virtual "
33497 "machine is shut down."
33501 #: ../tools/virt-tar.pl:74
33503 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
33504 "parts of a guest filesystem. There are many possibilities: making backups, "
33505 "uploading data files, snooping on guest activity, fixing or customizing "
33510 #: ../tools/virt-tar.pl:79
33512 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
33513 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
33514 "should look at the L<guestfish(1)> tool."
33518 #: ../tools/virt-tar.pl:83
33520 "There are two modes of operation: C<-x> (eXtract) downloads a directory and "
33521 "its contents (recursively) from the virtual machine into a local tarball. "
33522 "C<-u> uploads from a local tarball, unpacking it into a directory inside the "
33523 "virtual machine. You cannot use these two options together."
33527 #: ../tools/virt-tar.pl:89
33529 "In addition, you may need to use the C<-z> (gZip) option to enable "
33530 "compression. When uploading, you have to specify C<-z> if the upload file "
33531 "is compressed because virt-tar won't detect this on its own."
33535 #: ../tools/virt-tar.pl:93
33537 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
33538 "example it cannot do PKZip files or bzip2 compression. If you want that "
33539 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
33540 "the L<libguestfs(3)> API)."
33544 #: ../tools/virt-tar.pl:151
33545 msgid "B<-x> | B<--extract> | B<--download>"
33549 #: ../tools/virt-tar.pl:153
33550 msgid "B<-u> | B<--upload>"
33554 #: ../tools/virt-tar.pl:155
33556 "Use C<-x> to extract (download) a directory from a virtual machine to a "
33561 #: ../tools/virt-tar.pl:158
33563 "Use C<-u> to upload and unpack from a local tarball into a virtual machine. "
33564 "Please read the L</WARNING> section above before using this option."
33568 #: ../tools/virt-tar.pl:162
33569 msgid "You must specify exactly one of these options."
33573 #: ../tools/virt-tar.pl:168
33574 msgid "B<-z> | B<--gzip>"
33578 #: ../tools/virt-tar.pl:170
33579 msgid "Specify that the input or output tarball is gzip-compressed."
33583 #: ../tools/virt-tar.pl:283
33585 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<Sys::"
33586 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
33591 #: ../tools/virt-make-fs.pl:37
33592 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
33596 #: ../tools/virt-make-fs.pl:41
33599 " virt-make-fs [--options] input.tar output.img\n"
33604 #: ../tools/virt-make-fs.pl:43
33607 " virt-make-fs [--options] input.tar.gz output.img\n"
33612 #: ../tools/virt-make-fs.pl:45
33615 " virt-make-fs [--options] directory output.img\n"
33620 #: ../tools/virt-make-fs.pl:49
33622 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
33623 "archive or some files in a directory. It is similar to tools like L<mkisofs"
33624 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
33625 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
33626 "you want to attach these filesystems to existing virtual machines (eg. to "
33627 "import large amounts of read-only data to a VM)."
33631 #: ../tools/virt-make-fs.pl:57
33632 msgid "Basic usage is:"
33636 #: ../tools/virt-make-fs.pl:59
33639 " virt-make-fs input output\n"
33644 #: ../tools/virt-make-fs.pl:61
33646 "where C<input> is either a directory containing files that you want to add, "
33647 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
33648 "C<output> is a disk image. The input type is detected automatically. The "
33649 "output disk image defaults to a raw ext2 image unless you specify extra "
33650 "flags (see L</OPTIONS> below)."
33654 #: ../tools/virt-make-fs.pl:67
33655 msgid "EXTRA SPACE"
33659 #: ../tools/virt-make-fs.pl:69
33661 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
33662 "the files that it contains, but might have extra space. Depending on how "
33663 "you are going to use the output, you might think this extra space is wasted "
33664 "and want to minimize it, or you might want to leave space so that more files "
33665 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
33666 "but you can use the C<--size> flag to leave space in the filesystem if you "
33671 #: ../tools/virt-make-fs.pl:77
33673 "An alternative way to leave extra space but not make the output image any "
33674 "bigger is to use an alternative disk image format (instead of the default "
33675 "\"raw\" format). Using C<--format=qcow2> will use the native QEmu/KVM qcow2 "
33676 "image format (check your hypervisor supports this before using it). This "
33677 "allows you to choose a large C<--size> but the extra space won't actually be "
33678 "allocated in the image until you try to store something in it."
33682 #: ../tools/virt-make-fs.pl:85
33684 "Don't forget that you can also use local commands including L<resize2fs(8)> "
33685 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
33686 "to build another image from scratch."
33690 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123
33691 #: ../tools/virt-make-fs.pl:142
33696 #: ../tools/virt-make-fs.pl:91
33699 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
33704 #: ../tools/virt-make-fs.pl:93
33705 msgid "FILESYSTEM TYPE"
33709 #: ../tools/virt-make-fs.pl:95
33711 "The default filesystem type is C<ext2>. Just about any filesystem type that "
33712 "libguestfs supports can be used (but I<not> read-only formats like "
33713 "ISO9660). Here are some of the more common choices:"
33717 #: ../tools/virt-make-fs.pl:101
33722 #: ../tools/virt-make-fs.pl:103
33724 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
33725 "you are not going to use the filesystem in a way that requires the journal, "
33726 "then this is just wasted overhead."
33730 #: ../tools/virt-make-fs.pl:107
33731 msgid "I<ntfs> or I<vfat>"
33735 #: ../tools/virt-make-fs.pl:109
33736 msgid "Useful if exporting data to a Windows guest."
33740 #: ../tools/virt-make-fs.pl:111
33742 "I<Note for vfat>: The tar archive or local directory must only contain files "
33743 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
33744 "program running within libguestfs is unable to change the ownership of non-"
33745 "root files, since vfat itself does not support this."
33749 #: ../tools/virt-make-fs.pl:116
33754 #: ../tools/virt-make-fs.pl:118
33756 "Lower overhead than C<ext2>, but certain limitations on filename length and "
33757 "total filesystem size."
33761 #: ../tools/virt-make-fs.pl:125
33764 " virt-make-fs --type=minix input minixfs.img\n"
33769 #: ../tools/virt-make-fs.pl:127
33770 msgid "TO PARTITION OR NOT TO PARTITION"
33774 #: ../tools/virt-make-fs.pl:129
33775 msgid "Optionally virt-make-fs can add a partition table to the output disk."
33779 #: ../tools/virt-make-fs.pl:131
33781 "Adding a partition can make the disk image more compatible with certain "
33782 "virtualized operating systems which don't expect to see a filesystem "
33783 "directly located on a block device (Linux doesn't care and will happily "
33784 "handle both types)."
33788 #: ../tools/virt-make-fs.pl:136
33790 "On the other hand, if you have a partition table then the output image is no "
33791 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
33792 "directly on a partitioned disk image. (However libguestfs tools such as "
33793 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
33797 #: ../tools/virt-make-fs.pl:144
33798 msgid "Add an MBR partition:"
33802 #: ../tools/virt-make-fs.pl:146
33805 " virt-make-fs --partition -- input disk.img\n"
33810 #: ../tools/virt-make-fs.pl:148
33812 "If the output disk image could be terabyte-sized or larger, it's better to "
33813 "use an EFI/GPT-compatible partition table:"
33817 #: ../tools/virt-make-fs.pl:151
33820 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
33825 #: ../tools/virt-make-fs.pl:179
33826 msgid "Enable debugging information."
33830 #: ../tools/virt-make-fs.pl:185
33831 msgid "B<--size=E<lt>NE<gt>>"
33835 #: ../tools/virt-make-fs.pl:187
33836 msgid "B<--size=+E<lt>NE<gt>>"
33840 #: ../tools/virt-make-fs.pl:189
33841 msgid "B<-s E<lt>NE<gt>>"
33845 #: ../tools/virt-make-fs.pl:191
33846 msgid "B<-s +E<lt>NE<gt>>"
33850 #: ../tools/virt-make-fs.pl:193
33852 "Use the C<--size> (or C<-s>) option to choose the size of the output image."
33856 #: ../tools/virt-make-fs.pl:196
33858 "If this option is I<not> given, then the output image will be just large "
33859 "enough to contain all the files, with not much wasted space."
33863 #: ../tools/virt-make-fs.pl:199
33865 "To choose a fixed size output disk, specify an absolute number followed by b/"
33866 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
33867 "Petabytes or Exabytes. This must be large enough to contain all the input "
33868 "files, else you will get an error."
33872 #: ../tools/virt-make-fs.pl:204
33874 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
33875 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
33876 "Petabytes or Exabytes. For example: C<--size=+200M> means enough space for "
33877 "the input files, and (approximately) an extra 200 MB free space."
33881 #: ../tools/virt-make-fs.pl:210
33883 "Note that virt-make-fs estimates free space, and therefore will not produce "
33884 "filesystems containing precisely the free space requested. (It is much more "
33885 "expensive and time-consuming to produce a filesystem which has precisely the "
33886 "desired free space)."
33890 #: ../tools/virt-make-fs.pl:219
33891 msgid "B<--format=E<lt>fmtE<gt>>"
33895 #: ../tools/virt-make-fs.pl:221
33896 msgid "B<-F E<lt>fmtE<gt>>"
33900 #: ../tools/virt-make-fs.pl:223
33901 msgid "Choose the output disk image format."
33905 #: ../tools/virt-make-fs.pl:225
33906 msgid "The default is C<raw> (raw disk image)."
33910 #: ../tools/virt-make-fs.pl:227
33912 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
33913 "that would really make sense here is C<qcow2>."
33917 #: ../tools/virt-make-fs.pl:234
33918 msgid "B<--type=E<lt>fsE<gt>>"
33922 #: ../tools/virt-make-fs.pl:236
33923 msgid "B<-t E<lt>fsE<gt>>"
33927 #: ../tools/virt-make-fs.pl:238
33928 msgid "Choose the output filesystem type."
33932 #: ../tools/virt-make-fs.pl:240
33933 msgid "The default is C<ext2>."
33937 #: ../tools/virt-make-fs.pl:242
33939 "Any filesystem which is supported read-write by libguestfs can be used here."
33943 #: ../tools/virt-make-fs.pl:249
33944 msgid "B<--partition>"
33948 #: ../tools/virt-make-fs.pl:251
33949 msgid "B<--partition=E<lt>parttypeE<gt>>"
33953 #: ../tools/virt-make-fs.pl:253
33955 "If specified, this flag adds an MBR partition table to the output disk image."
33959 #: ../tools/virt-make-fs.pl:256
33961 "You can change the partition table type, eg. C<--partition=gpt> for large "
33966 #: ../tools/virt-make-fs.pl:259
33968 "Note that if you just use a lonesome C<--partition>, the Perl option parser "
33969 "might consider the next parameter to be the partition type. For example:"
33973 #: ../tools/virt-make-fs.pl:263
33976 " virt-make-fs --partition input.tar ...\n"
33981 #: ../tools/virt-make-fs.pl:265
33983 "would cause virt-make-fs to think you wanted to use a partition type of "
33984 "C<input.tar> which is completely wrong. To avoid this, use C<--> (a double "
33985 "dash) between options and the input file argument:"
33989 #: ../tools/virt-make-fs.pl:269
33992 " virt-make-fs --partition -- input.tar ...\n"
33997 #: ../tools/virt-make-fs.pl:541
33999 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<mkisofs(1)>, "
34000 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
34001 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
34005 #: ../tools/virt-make-fs.pl:558
34008 " export LIBGUESTFS_DEBUG=1\n"
34009 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
34014 #: ../tools/virt-make-fs.pl:561
34016 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
34021 #: ../tools/virt-list-partitions.pl:32
34023 "virt-list-partitions - List partitions in a virtual machine or disk image"
34027 #: ../tools/virt-list-partitions.pl:36
34030 " virt-list-partitions [--options] domname\n"
34035 #: ../tools/virt-list-partitions.pl:38
34038 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
34043 #: ../tools/virt-list-partitions.pl:45
34045 "C<virt-list-partitions> is a command line tool to list the partitions that "
34046 "are contained in a virtual machine or disk image. It is mainly useful as a "
34047 "first step to using L<virt-resize(1)>."
34051 #: ../tools/virt-list-partitions.pl:50
34053 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
34054 "functionality. For more complex cases you should look at the L<guestfish(1)"
34059 #: ../tools/virt-list-partitions.pl:107
34060 msgid "B<-h> | B<--human-readable>"
34064 #: ../tools/virt-list-partitions.pl:109
34065 msgid "Show sizes in human-readable form (eg. \"1G\")."
34069 #: ../tools/virt-list-partitions.pl:117
34071 "With this option, C<virt-list-partitions> displays the type and size of each "
34072 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
34076 #: ../tools/virt-list-partitions.pl:124
34077 msgid "B<-t> | B<--total>"
34081 #: ../tools/virt-list-partitions.pl:126
34083 "Display the total size of each block device (as a separate row or rows)."
34087 #: ../tools/virt-list-partitions.pl:259
34089 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-list-"
34090 "filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib"
34091 "(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
34095 #: ../tools/virt-list-partitions.pl:275
34096 msgid "Copyright (C) 2009-2010 Red Hat Inc."