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-05-18 10:02+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-win-reg.pl:35 ../tools/virt-list-filesystems.pl:30
24 #: ../tools/virt-tar.pl:31 ../tools/virt-make-fs.pl:35
25 #: ../tools/virt-list-partitions.pl:30
31 #: ../src/guestfs.pod:5
32 msgid "guestfs - Library for accessing and modifying virtual machine images"
37 #: ../src/guestfs.pod:7 ../fish/guestfish.pod:7
38 #: ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7
39 #: ../tools/virt-win-reg.pl:39 ../tools/virt-list-filesystems.pl:34
40 #: ../tools/virt-tar.pl:35 ../tools/virt-make-fs.pl:39
41 #: ../tools/virt-list-partitions.pl:34
47 #: ../src/guestfs.pod:9
50 " #include <guestfs.h>\n"
56 #: ../src/guestfs.pod:11
59 " guestfs_h *g = guestfs_create ();\n"
60 " guestfs_add_drive (g, \"guest.img\");\n"
61 " guestfs_launch (g);\n"
62 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
63 " guestfs_touch (g, \"/hello\");\n"
64 " guestfs_umount (g, \"/\");\n"
65 " guestfs_close (g);\n"
71 #: ../src/guestfs.pod:19
74 " cc prog.c -o prog -lguestfs\n"
76 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
82 #: ../src/guestfs.pod:23 ../fish/guestfish.pod:30
83 #: ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:20
84 #: ../tools/virt-win-reg.pl:63 ../tools/virt-list-filesystems.pl:40
85 #: ../tools/virt-tar.pl:77 ../tools/virt-make-fs.pl:47
86 #: ../tools/virt-list-partitions.pl:40
92 #: ../src/guestfs.pod:25
94 "Libguestfs is a library for accessing and modifying guest disk images. "
95 "Amongst the things this is good for: making batch configuration changes to "
96 "guests, getting disk used/free statistics (see also: virt-df), migrating "
97 "between virtualization systems (see also: virt-p2v), performing partial "
98 "backups, performing partial guest clones, cloning guests and changing "
99 "registry/UUID/hostname info, and much else besides."
104 #: ../src/guestfs.pod:33
106 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
107 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
108 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
114 #: ../src/guestfs.pod:38
116 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
117 "what filesystem is in each LV, etc.). It can also run commands in the "
118 "context of the guest. Also you can access filesystems over FUSE."
123 #: ../src/guestfs.pod:43
125 "Libguestfs is a library that can be linked with C and C++ management "
126 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
127 "PHP, Haskell or C#). You can also use it from shell scripts or the command "
133 #: ../src/guestfs.pod:48
135 "You don't need to be root to use libguestfs, although obviously you do need "
136 "enough permissions to access the disk images."
141 #: ../src/guestfs.pod:51
143 "Libguestfs is a large API because it can do many things. For a gentle "
144 "introduction, please read the L</API OVERVIEW> section next."
149 #: ../src/guestfs.pod:54
151 "There are also some example programs in the L<guestfs-examples(3)> manual "
157 #: ../src/guestfs.pod:57
163 #: ../src/guestfs.pod:59
165 "This section provides a gentler overview of the libguestfs API. We also try "
166 "to group API calls together, where that may not be obvious from reading "
167 "about the individual calls in the main section of this manual."
172 #: ../src/guestfs.pod:64
178 #: ../src/guestfs.pod:66
180 "Before you can use libguestfs calls, you have to create a handle. Then you "
181 "must add at least one disk image to the handle, followed by launching the "
182 "handle, then performing whatever operations you want, and finally closing "
183 "the handle. By convention we use the single letter C<g> for the name of the "
184 "handle variable, although of course you can use any name you want."
189 #: ../src/guestfs.pod:73
190 msgid "The general structure of all libguestfs-using programs looks like this:"
195 #: ../src/guestfs.pod:76
198 " guestfs_h *g = guestfs_create ();\n"
204 #: ../src/guestfs.pod:78
207 " /* Call guestfs_add_drive additional times if there are\n"
208 " * multiple disk images.\n"
210 " guestfs_add_drive (g, \"guest.img\");\n"
216 #: ../src/guestfs.pod:83
219 " /* Most manipulation calls won't work until you've launched\n"
220 " * the handle 'g'. You have to do this _after_ adding drives\n"
221 " * and _before_ other commands.\n"
223 " guestfs_launch (g);\n"
229 #: ../src/guestfs.pod:89
232 " /* Now you can examine what partitions, LVs etc are available.\n"
234 " char **partitions = guestfs_list_partitions (g);\n"
235 " char **logvols = guestfs_lvs (g);\n"
241 #: ../src/guestfs.pod:94
244 " /* To access a filesystem in the image, you must mount it.\n"
246 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
251 #: ../src/guestfs.pod:98
254 " /* Now you can perform filesystem actions on the guest\n"
257 " guestfs_touch (g, \"/hello\");\n"
263 #: ../src/guestfs.pod:103
266 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
267 " * it is done automatically when you close the handle. See\n"
268 " * discussion of autosync in this page.\n"
270 " guestfs_sync (g);\n"
276 #: ../src/guestfs.pod:109
279 " /* Close the handle 'g'. */\n"
280 " guestfs_close (g);\n"
286 #: ../src/guestfs.pod:112
288 "The code above doesn't include any error checking. In real code you should "
289 "check return values carefully for errors. In general all functions that "
290 "return integers return C<-1> on error, and all functions that return "
291 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
292 "how to handle errors, and consult the documentation for each function call "
293 "below to see precisely how they return error indications. See L<guestfs-"
294 "examples(3)> for fully worked examples."
299 #: ../src/guestfs.pod:121
305 #: ../src/guestfs.pod:123
307 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
308 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
309 "actual block device, or simply an empty file of zeroes that you have created "
310 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
316 #: ../src/guestfs.pod:129
318 "The call you should use in modern code for adding drives is L</"
319 "guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
320 "specifying that the format is raw, do:"
325 #: ../src/guestfs.pod:133
328 " guestfs_add_drive_opts (g, filename,\n"
329 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
336 #: ../src/guestfs.pod:137
337 msgid "You can add a disk read-only using:"
342 #: ../src/guestfs.pod:139
345 " guestfs_add_drive_opts (g, filename,\n"
346 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
347 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
354 #: ../src/guestfs.pod:144
356 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
357 "libguestfs won't modify the file."
362 #: ../src/guestfs.pod:147
364 "Be extremely cautious if the disk image is in use, eg. if it is being used "
365 "by a virtual machine. Adding it read-write will almost certainly cause disk "
366 "corruption, but adding it read-only is safe."
371 #: ../src/guestfs.pod:151
373 "You must add at least one disk image, and you may add multiple disk images. "
374 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
375 "first one you added), C</dev/sdb> (for the second one you added), etc."
380 #: ../src/guestfs.pod:156
382 "Once L</guestfs_launch> has been called you cannot add any more images. You "
383 "can call L</guestfs_list_devices> to get a list of the device names, in the "
384 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
389 #: ../src/guestfs.pod:161
394 #: ../src/guestfs.pod:163
396 "Before you can read or write files, create directories and so on in a disk "
397 "image that contains filesystems, you have to mount those filesystems using "
398 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
399 "a disk image contains (for example) one partition with a filesystem on that "
400 "partition, then you can mount it directly:"
404 #: ../src/guestfs.pod:170
407 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
412 #: ../src/guestfs.pod:172
414 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
415 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
416 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
417 "that these are libguestfs virtual devices, and are nothing to do with host "
422 #: ../src/guestfs.pod:178
424 "If you are given a disk image and you don't know what it contains then you "
425 "have to find out. Libguestfs can do that too: use L</"
426 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
427 "LVs, and either try mounting each to see what is mountable, or else examine "
428 "them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
429 "filesystems, use L</guestfs_list_filesystems>."
433 #: ../src/guestfs.pod:186
435 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
436 "L</INSPECTION> below). But you might find it easier to look at higher level "
437 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
441 #: ../src/guestfs.pod:191
443 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
444 "several other variations of the C<guestfs_mount_*> call."
449 #: ../src/guestfs.pod:194
450 msgid "FILESYSTEM ACCESS AND MODIFICATION"
455 #: ../src/guestfs.pod:196
457 "The majority of the libguestfs API consists of fairly low-level calls for "
458 "accessing and modifying the files, directories, symlinks etc on mounted "
459 "filesystems. There are over a hundred such calls which you can find listed "
460 "in detail below in this man page, and we don't even pretend to cover them "
461 "all in this overview."
466 #: ../src/guestfs.pod:202
468 "Specify filenames as full paths, starting with C<\"/\"> and including the "
474 #: ../src/guestfs.pod:205
476 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
477 "the file called C<\"etc/passwd\"> then you could do:"
482 #: ../src/guestfs.pod:208
485 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
491 #: ../src/guestfs.pod:210
493 "This would return C<data> as a newly allocated buffer containing the full "
494 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
495 "or C<NULL> if there was an error."
500 #: ../src/guestfs.pod:214
502 "As another example, to create a top-level directory on that filesystem "
503 "called C<\"var\"> you would do:"
508 #: ../src/guestfs.pod:217
511 " guestfs_mkdir (g, \"/var\");\n"
517 #: ../src/guestfs.pod:219
518 msgid "To create a symlink you could do:"
523 #: ../src/guestfs.pod:221
526 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
527 " \"/etc/rc3.d/S30portmap\");\n"
533 #: ../src/guestfs.pod:224
535 "Libguestfs will reject attempts to use relative paths and there is no "
536 "concept of a current working directory."
541 #: ../src/guestfs.pod:227
543 "Libguestfs can return errors in many situations: for example if the "
544 "filesystem isn't writable, or if a file or directory that you requested "
545 "doesn't exist. If you are using the C API (documented here) you have to "
546 "check for those error conditions after each call. (Other language bindings "
547 "turn these errors into exceptions)."
552 #: ../src/guestfs.pod:233
554 "File writes are affected by the per-handle umask, set by calling L</"
555 "guestfs_umask> and defaulting to 022. See L</UMASK>."
560 #: ../src/guestfs.pod:236
566 #: ../src/guestfs.pod:238
568 "Libguestfs contains API calls to read, create and modify partition tables on "
574 #: ../src/guestfs.pod:241
576 "In the common case where you want to create a single partition covering the "
577 "whole disk, you should use the L</guestfs_part_disk> call:"
582 #: ../src/guestfs.pod:245
585 " const char *parttype = \"mbr\";\n"
586 " if (disk_is_larger_than_2TB)\n"
587 " parttype = \"gpt\";\n"
588 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
594 #: ../src/guestfs.pod:250
596 "Obviously this effectively wipes anything that was on that disk image before."
601 #: ../src/guestfs.pod:253
607 #: ../src/guestfs.pod:255
609 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
610 "guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense unless "
611 "you familiarize yourself with the concepts of physical volumes, volume "
612 "groups and logical volumes."
617 #: ../src/guestfs.pod:260
619 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
620 "tldp.org/HOWTO/LVM-HOWTO/>."
625 #: ../src/guestfs.pod:263
630 #: ../src/guestfs.pod:265
632 "Use L</guestfs_cat> to download small, text only files. This call is "
633 "limited to files which are less than 2 MB and which cannot contain any ASCII "
634 "NUL (C<\\0>) characters. However the API is very simple to use."
639 #: ../src/guestfs.pod:269
641 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
642 "bit data, since it returns a (pointer, size) pair. However it is still "
643 "limited to \"small\" files, less than 2 MB."
648 #: ../src/guestfs.pod:273
650 "L</guestfs_download> can be used to download any file, with no limits on "
651 "content or size (even files larger than 4 GB)."
656 #: ../src/guestfs.pod:276
658 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
663 #: ../src/guestfs.pod:279
669 #: ../src/guestfs.pod:281
671 "It's often the case that you want to write a file or files to the disk image."
676 #: ../src/guestfs.pod:284
678 "To write a small file with fixed content, use L</guestfs_write>. To create "
679 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
680 "guestfs_fallocate64> (with all disk blocks allocated). There are a variety "
681 "of other functions for creating test files, for example L</guestfs_fill> and "
682 "L</guestfs_fill_pattern>."
687 #: ../src/guestfs.pod:290
689 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
690 "file content or size (even files larger than 4 GB)."
695 #: ../src/guestfs.pod:293
697 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
702 #: ../src/guestfs.pod:295
704 "However the fastest way to upload I<large numbers of arbitrary files> is to "
705 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
706 ">), then attach this using L</guestfs_add_drive_ro>. If you add the drive "
707 "in a predictable way (eg. adding it last after all other drives) then you "
708 "can get the device name from L</guestfs_list_devices> and mount it directly "
709 "using L</guestfs_mount_ro>. Note that squashfs images are sometimes non-"
710 "portable between kernel versions, and they don't support labels or UUIDs. "
711 "If you want to pre-build an image or you need to mount it using a label or "
712 "UUID, use an ISO image instead."
717 #: ../src/guestfs.pod:306
723 #: ../src/guestfs.pod:308
725 "There are various different commands for copying between files and devices "
726 "and in and out of the guest filesystem. These are summarised in the table "
732 #: ../src/guestfs.pod:314
733 msgid "B<file> to B<file>"
738 #: ../src/guestfs.pod:316
740 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
741 "directories recursively."
746 #: ../src/guestfs.pod:319
747 msgid "B<file or device> to B<file or device>"
752 #: ../src/guestfs.pod:321
754 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
755 "devices in the guest."
760 #: ../src/guestfs.pod:324
761 msgid "Example: duplicate the contents of an LV:"
766 #: ../src/guestfs.pod:326
769 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
775 #: ../src/guestfs.pod:328
777 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
778 "(C</dev/VG/Original>). To copy less than the whole source device, use L</"
779 "guestfs_copy_size>."
784 #: ../src/guestfs.pod:332
785 msgid "B<file on the host> to B<file or device>"
790 #: ../src/guestfs.pod:334
791 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
796 #: ../src/guestfs.pod:336
797 msgid "B<file or device> to B<file on the host>"
802 #: ../src/guestfs.pod:338
803 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
808 #: ../src/guestfs.pod:342
809 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
814 #: ../src/guestfs.pod:344
816 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, L</"
817 "guestfs_tar_out> etc appear to only take filenames as arguments, so it "
818 "appears you can only upload and download to files. However many Un*x-like "
819 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, C</"
820 "dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, stderr, "
821 "and arbitrary file descriptor N."
826 #: ../src/guestfs.pod:352
827 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
831 #: ../src/guestfs.pod:355
834 " guestfs_download (g, filename, \"/dev/stdout\");\n"
839 #: ../src/guestfs.pod:357
840 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
844 #: ../src/guestfs.pod:359
848 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
849 " guestfs_tar_out (g, \"/\", devfd);\n"
855 #: ../src/guestfs.pod:363
856 msgid "LISTING FILES"
861 #: ../src/guestfs.pod:365
863 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
864 "L<guestfish(1)>-equivalent command C<ll>)."
869 #: ../src/guestfs.pod:368
871 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
872 "programs, as a flat list of strings."
877 #: ../src/guestfs.pod:371
879 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
880 "directory, plus additional information about each one. It is more "
881 "equivalent to using the L<readdir(3)> call on a local filesystem."
886 #: ../src/guestfs.pod:375
888 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
893 #: ../src/guestfs.pod:378
894 msgid "RUNNING COMMANDS"
899 #: ../src/guestfs.pod:380
901 "Although libguestfs is primarily an API for manipulating files inside guest "
902 "images, we also provide some limited facilities for running commands inside "
908 #: ../src/guestfs.pod:384
909 msgid "There are many limitations to this:"
914 #: ../src/guestfs.pod:388 ../src/guestfs.pod:393 ../src/guestfs.pod:398
915 #: ../src/guestfs.pod:402 ../src/guestfs.pod:407 ../src/guestfs.pod:411
916 #: ../src/guestfs.pod:416 ../src/guestfs.pod:421 ../src/guestfs.pod:1064
917 #: ../src/guestfs.pod:1068 ../src/guestfs.pod:1072 ../src/guestfs.pod:1077
918 #: ../src/guestfs.pod:1085 ../src/guestfs.pod:1104 ../src/guestfs.pod:1112
919 #: ../src/guestfs.pod:1134 ../src/guestfs.pod:1138 ../src/guestfs.pod:1142
920 #: ../src/guestfs.pod:1146 ../src/guestfs.pod:1150 ../src/guestfs.pod:1154
921 #: ../src/guestfs.pod:1643 ../src/guestfs.pod:1648 ../src/guestfs.pod:1652
922 #: ../src/guestfs.pod:1754 ../src/guestfs.pod:1759 ../src/guestfs.pod:1763
923 #: ../src/guestfs.pod:1773 ../src/guestfs.pod:2008 ../src/guestfs.pod:2013
924 #: ../src/guestfs.pod:2019 ../src/guestfs.pod:2027 ../src/guestfs.pod:2381
925 #: ../src/guestfs.pod:2387 ../src/guestfs.pod:2392 ../src/guestfs.pod:2398
926 #: ../src/guestfs.pod:2967 ../src/guestfs.pod:2971 ../src/guestfs.pod:2975
927 #: ../src/guestfs.pod:2979 ../src/guestfs-actions.pod:15
928 #: ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:583
929 #: ../src/guestfs-actions.pod:591 ../src/guestfs-actions.pod:598
930 #: ../src/guestfs-actions.pod:605 ../src/guestfs-actions.pod:1603
931 #: ../src/guestfs-actions.pod:1607 ../src/guestfs-actions.pod:1611
932 #: ../src/guestfs-actions.pod:1615 ../src/guestfs-actions.pod:1623
933 #: ../src/guestfs-actions.pod:1627 ../src/guestfs-actions.pod:1631
934 #: ../src/guestfs-actions.pod:1641 ../src/guestfs-actions.pod:1645
935 #: ../src/guestfs-actions.pod:1649 ../src/guestfs-actions.pod:1787
936 #: ../src/guestfs-actions.pod:1791 ../src/guestfs-actions.pod:1796
937 #: ../src/guestfs-actions.pod:1801 ../src/guestfs-actions.pod:1862
938 #: ../src/guestfs-actions.pod:1866 ../src/guestfs-actions.pod:1871
939 #: ../fish/guestfish.pod:445 ../fish/guestfish.pod:449
940 #: ../fish/guestfish.pod:453 ../fish/guestfish.pod:457
941 #: ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20
942 #: ../fish/guestfish-actions.pod:385 ../fish/guestfish-actions.pod:393
943 #: ../fish/guestfish-actions.pod:400 ../fish/guestfish-actions.pod:407
944 #: ../fish/guestfish-actions.pod:1074 ../fish/guestfish-actions.pod:1078
945 #: ../fish/guestfish-actions.pod:1082 ../fish/guestfish-actions.pod:1086
946 #: ../fish/guestfish-actions.pod:1094 ../fish/guestfish-actions.pod:1098
947 #: ../fish/guestfish-actions.pod:1102 ../fish/guestfish-actions.pod:1112
948 #: ../fish/guestfish-actions.pod:1116 ../fish/guestfish-actions.pod:1120
949 #: ../fish/guestfish-actions.pod:1210 ../fish/guestfish-actions.pod:1214
950 #: ../fish/guestfish-actions.pod:1219 ../fish/guestfish-actions.pod:1224
951 #: ../fish/guestfish-actions.pod:1266 ../fish/guestfish-actions.pod:1270
952 #: ../fish/guestfish-actions.pod:1275 ../tools/virt-win-reg.pl:195
953 #: ../tools/virt-win-reg.pl:200 ../tools/virt-win-reg.pl:206
954 #: ../tools/virt-win-reg.pl:708 ../tools/virt-win-reg.pl:714
955 #: ../tools/virt-win-reg.pl:720
961 #: ../src/guestfs.pod:390
963 "The kernel version that the command runs under will be different from what "
969 #: ../src/guestfs.pod:395
971 "If the command needs to communicate with daemons, then most likely they "
977 #: ../src/guestfs.pod:400
978 msgid "The command will be running in limited memory."
983 #: ../src/guestfs.pod:404
985 "The network may not be available unless you enable it (see L</"
986 "guestfs_set_network>)."
991 #: ../src/guestfs.pod:409
992 msgid "Only supports Linux guests (not Windows, BSD, etc)."
997 #: ../src/guestfs.pod:413
999 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
1004 #: ../src/guestfs.pod:418
1006 "For SELinux guests, you may need to enable SELinux and load policy first. "
1007 "See L</SELINUX> in this manpage."
1012 #: ../src/guestfs.pod:423
1014 "I<Security:> It is not safe to run commands from untrusted, possibly "
1015 "malicious guests. These commands may attempt to exploit your program by "
1016 "sending unexpected output. They could also try to exploit the Linux kernel "
1017 "or qemu provided by the libguestfs appliance. They could use the network "
1018 "provided by the libguestfs appliance to bypass ordinary network partitions "
1019 "and firewalls. They could use the elevated privileges or different SELinux "
1020 "context of your program to their advantage."
1025 #: ../src/guestfs.pod:432
1027 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
1028 "(a script which runs when the guest next boots normally), and to have this "
1029 "script run the commands you want in the normal context of the running guest, "
1030 "network security and so on. For information about other security issues, "
1036 #: ../src/guestfs.pod:440
1038 "The two main API calls to run commands are L</guestfs_command> and L</"
1039 "guestfs_sh> (there are also variations)."
1044 #: ../src/guestfs.pod:443
1046 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
1047 "shell globs, redirections, etc will work."
1052 #: ../src/guestfs.pod:446
1053 msgid "CONFIGURATION FILES"
1058 #: ../src/guestfs.pod:448
1060 "To read and write configuration files in Linux guest filesystems, we "
1061 "strongly recommend using Augeas. For example, Augeas understands how to "
1062 "read and write, say, a Linux shadow password file or X.org configuration "
1063 "file, and so avoids you having to write that code."
1068 #: ../src/guestfs.pod:453
1070 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
1071 "document Augeas itself here because there is excellent documentation on the "
1072 "L<http://augeas.net/> website."
1077 #: ../src/guestfs.pod:457
1079 "If you don't want to use Augeas (you fool!) then try calling L</"
1080 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
1086 #: ../src/guestfs.pod:461
1092 #: ../src/guestfs.pod:463
1094 "We support SELinux guests. To ensure that labeling happens correctly in "
1095 "SELinux guests, you need to enable SELinux and load the guest's policy:"
1100 #: ../src/guestfs.pod:469 ../src/guestfs.pod:1257 ../src/guestfs.pod:1395
1101 #: ../src/guestfs.pod:2426
1107 #: ../src/guestfs.pod:471
1108 msgid "Before launching, do:"
1113 #: ../src/guestfs.pod:473
1116 " guestfs_set_selinux (g, 1);\n"
1122 #: ../src/guestfs.pod:475 ../src/guestfs.pod:1261 ../src/guestfs.pod:1399
1123 #: ../src/guestfs.pod:2451
1129 #: ../src/guestfs.pod:477
1131 "After mounting the guest's filesystem(s), load the policy. This is best "
1132 "done by running the L<load_policy(8)> command in the guest itself:"
1137 #: ../src/guestfs.pod:481
1140 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
1146 #: ../src/guestfs.pod:483
1148 "(Older versions of C<load_policy> require you to specify the name of the "
1154 #: ../src/guestfs.pod:486 ../src/guestfs.pod:1405
1160 #: ../src/guestfs.pod:488
1162 "Optionally, set the security context for the API. The correct security "
1163 "context to use can only be known by inspecting the guest. As an example:"
1168 #: ../src/guestfs.pod:492
1171 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
1177 #: ../src/guestfs.pod:496
1178 msgid "This will work for running commands and editing existing files."
1183 #: ../src/guestfs.pod:498
1185 "When new files are created, you may need to label them explicitly, for "
1186 "example by running the external command C<restorecon pathname>."
1191 #: ../src/guestfs.pod:502
1197 #: ../src/guestfs.pod:504
1199 "Certain calls are affected by the current file mode creation mask (the "
1200 "\"umask\"). In particular ones which create files or directories, such as "
1201 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
1202 "either the default mode that the file is created with or modifies the mode "
1208 #: ../src/guestfs.pod:510
1210 "The default umask is C<022>, so files are created with modes such as C<0644> "
1211 "and directories with C<0755>."
1216 #: ../src/guestfs.pod:513
1218 "There are two ways to avoid being affected by umask. Either set umask to 0 "
1219 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
1220 "guestfs_chmod> after creating each file or directory."
1225 #: ../src/guestfs.pod:517
1226 msgid "For more information about umask, see L<umask(2)>."
1231 #: ../src/guestfs.pod:519 ../fish/guestfish.pod:767
1232 msgid "ENCRYPTED DISKS"
1237 #: ../src/guestfs.pod:521
1239 "Libguestfs allows you to access Linux guests which have been encrypted using "
1240 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1241 "standard. This includes nearly all whole disk encryption systems used by "
1242 "modern Linux guests."
1247 #: ../src/guestfs.pod:527
1249 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1250 "returns the string C<crypto_LUKS>)."
1255 #: ../src/guestfs.pod:530
1257 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
1258 "will require the passphrase!"
1263 #: ../src/guestfs.pod:533
1265 "Opening a LUKS device creates a new device mapper device called C</dev/"
1266 "mapper/mapname> (where C<mapname> is the string you supply to L</"
1267 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
1268 "from and encrypted to the underlying block device respectively."
1273 #: ../src/guestfs.pod:539
1275 "LVM volume groups on the device can be made visible by calling L</"
1276 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
1277 "(s) can now be mounted in the usual way."
1282 #: ../src/guestfs.pod:543
1284 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1285 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1286 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
1287 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1288 "underlying encrypted block device)."
1293 #: ../src/guestfs.pod:550
1298 #: ../src/guestfs.pod:552
1300 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1301 "contains operating systems, an install CD or a live CD. (These APIs used to "
1302 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
1303 "version 1.5.3 the most frequently used part of this library has been "
1304 "rewritten in C and moved into the core code)."
1309 #: ../src/guestfs.pod:559
1311 "Add all disks belonging to the unknown virtual machine and call L</"
1312 "guestfs_launch> in the usual way."
1317 #: ../src/guestfs.pod:562
1319 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1320 "and certain heuristics, and returns a list of operating systems that were "
1321 "found. An empty list means none were found. A single element is the root "
1322 "filesystem of the operating system. For dual- or multi-boot guests, "
1323 "multiple roots can be returned, each one corresponding to a separate "
1324 "operating system. (Multi-boot virtual machines are extremely rare in the "
1325 "world of virtualization, but since this scenario can happen, we have built "
1326 "libguestfs to deal with it.)"
1331 #: ../src/guestfs.pod:571
1333 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1334 "to get additional details about that operating system. For example, call L</"
1335 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1336 "Windows and Linux-based operating systems respectively."
1341 #: ../src/guestfs.pod:577
1343 "Un*x-like and Linux-based operating systems usually consist of several "
1344 "filesystems which are mounted at boot time (for example, a separate boot "
1345 "partition mounted on C</boot>). The inspection rules are able to detect how "
1346 "filesystems correspond to mount points. Call "
1347 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1348 "hash table like this example:"
1353 #: ../src/guestfs.pod:584
1356 " /boot => /dev/sda1\n"
1357 " / => /dev/vg_guest/lv_root\n"
1358 " /usr => /dev/vg_guest/lv_usr\n"
1364 #: ../src/guestfs.pod:588
1366 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1367 "filesystems as suggested."
1372 #: ../src/guestfs.pod:591
1374 "Be careful to mount filesystems in the right order (eg. C</> before C</"
1375 "usr>). Sorting the keys of the hash by length, shortest first, should work."
1380 #: ../src/guestfs.pod:595
1382 "Inspection currently only works for some common operating systems. "
1383 "Contributors are welcome to send patches for other operating systems that we "
1384 "currently cannot detect."
1389 #: ../src/guestfs.pod:599
1391 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1392 "for more details. The L</guestfs_inspect_os> function just ignores any "
1393 "encrypted devices."
1398 #: ../src/guestfs.pod:603
1400 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1401 "inspection and caches the results in the guest handle. Subsequent calls to "
1402 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
1403 "read the disks. If you change the content of the guest disks, you can redo "
1404 "inspection by calling L</guestfs_inspect_os> again. (L</"
1405 "guestfs_inspect_list_applications> works a little differently from the other "
1406 "calls and does read the disks. See documentation for that function for "
1411 #: ../src/guestfs.pod:612
1412 msgid "INSPECTING INSTALL DISKS"
1416 #: ../src/guestfs.pod:614
1418 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
1423 #: ../src/guestfs.pod:617
1425 "Call L</guestfs_inspect_get_format> to return the format of the operating "
1426 "system, which currently can be C<installed> (a regular operating system) or "
1427 "C<installer> (some sort of install disk)."
1431 #: ../src/guestfs.pod:621
1433 "Further information is available about the operating system that can be "
1434 "installed using the regular inspection APIs like L</"
1435 "guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> etc."
1439 #: ../src/guestfs.pod:626
1441 "Some additional information specific to installer disks is also available "
1442 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and L</"
1443 "guestfs_inspect_is_multipart> calls."
1448 #: ../src/guestfs.pod:631
1449 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1454 #: ../src/guestfs.pod:633
1456 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
1457 "ntfs-3g.org/> driver."
1462 #: ../src/guestfs.pod:636
1463 msgid "DRIVE LETTERS AND PATHS"
1468 #: ../src/guestfs.pod:638
1470 "DOS and Windows still use drive letters, and the filesystems are always "
1471 "treated as case insensitive by Windows itself, and therefore you might find "
1472 "a Windows configuration file referring to a path like C<c:\\windows"
1473 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
1474 "might be referred to as C</WINDOWS/System32>."
1478 #: ../src/guestfs.pod:644
1480 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
1481 "L</guestfs_inspect_get_drive_mappings>)"
1485 #: ../src/guestfs.pod:647
1487 "Dealing with separator characters (backslash vs forward slash) is outside "
1488 "the scope of libguestfs, but usually a simple character replacement will "
1493 #: ../src/guestfs.pod:651
1495 "To resolve the case insensitivity of paths, call L</"
1496 "guestfs_case_sensitive_path>."
1501 #: ../src/guestfs.pod:654
1502 msgid "ACCESSING THE WINDOWS REGISTRY"
1507 #: ../src/guestfs.pod:656
1509 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1510 "files, through the library C<hivex> which is part of the libguestfs project "
1511 "although ships as a separate tarball. You have to locate and download the "
1512 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1513 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
1514 "reg(1)> for more help on this issue."
1519 #: ../src/guestfs.pod:664
1520 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
1525 #: ../src/guestfs.pod:666
1527 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
1528 "provide something which looks like a Linux symlink. The way it tries to do "
1529 "the rewriting is described here:"
1534 #: ../src/guestfs.pod:670
1536 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
1542 #: ../src/guestfs.pod:672
1544 "The essential problem is that ntfs-3g simply does not have enough "
1545 "information to do a correct job. NTFS links can contain drive letters and "
1546 "references to external device GUIDs that ntfs-3g has no way of resolving. "
1547 "It is almost certainly the case that libguestfs callers should ignore what "
1548 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
1553 #: ../src/guestfs.pod:679
1555 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use L</"
1556 "guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
1557 "attribute, and read the raw reparse data from that (you can find the format "
1558 "documented in various places around the web)."
1563 #: ../src/guestfs.pod:684
1564 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
1569 #: ../src/guestfs.pod:686
1571 "There are other useful extended attributes that can be read from ntfs-3g "
1572 "filesystems (using L</guestfs_getxattr>). See:"
1577 #: ../src/guestfs.pod:689
1579 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
1584 #: ../src/guestfs.pod:691
1585 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1590 #: ../src/guestfs.pod:693
1592 "Although we don't want to discourage you from using the C API, we will "
1593 "mention here that the same API is also available in other languages."
1597 #: ../src/guestfs.pod:696
1599 "The API is broadly identical in all supported languages. This means that "
1600 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
1601 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
1602 "OCaml. In other words, a straightforward, predictable isomorphism between "
1608 #: ../src/guestfs.pod:702
1610 "Error messages are automatically transformed into exceptions if the language "
1616 #: ../src/guestfs.pod:705
1618 "We don't try to \"object orientify\" parts of the API in OO languages, "
1619 "although contributors are welcome to write higher level APIs above what we "
1620 "provide in their favourite languages if they wish."
1625 #: ../src/guestfs.pod:711
1631 #: ../src/guestfs.pod:713
1633 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1634 "identical to the C API. C++ classes and exceptions are not used."
1639 #: ../src/guestfs.pod:717
1645 #: ../src/guestfs.pod:719
1647 "The C# bindings are highly experimental. Please read the warnings at the "
1648 "top of C<csharp/Libguestfs.cs>."
1653 #: ../src/guestfs.pod:722
1659 #: ../src/guestfs.pod:724
1661 "This is the only language binding that is working but incomplete. Only "
1662 "calls which return simple integers have been bound in Haskell, and we are "
1663 "looking for help to complete this binding."
1668 #: ../src/guestfs.pod:728
1674 #: ../src/guestfs.pod:730
1676 "Full documentation is contained in the Javadoc which is distributed with "
1682 #: ../src/guestfs.pod:733
1687 #: ../src/guestfs.pod:735
1688 msgid "See L<guestfs-ocaml(3)>."
1693 #: ../src/guestfs.pod:737
1698 #: ../src/guestfs.pod:739
1699 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
1704 #: ../src/guestfs.pod:741
1710 #: ../src/guestfs.pod:743
1712 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1713 "the php-libguestfs package for your distribution."
1718 #: ../src/guestfs.pod:746
1719 msgid "The PHP binding only works correctly on 64 bit machines."
1724 #: ../src/guestfs.pod:748
1729 #: ../src/guestfs.pod:750
1730 msgid "See L<guestfs-python(3)>."
1735 #: ../src/guestfs.pod:752
1740 #: ../src/guestfs.pod:754
1741 msgid "See L<guestfs-ruby(3)>."
1746 #: ../src/guestfs.pod:756
1747 msgid "B<shell scripts>"
1751 #: ../src/guestfs.pod:758
1752 msgid "See L<guestfish(1)>."
1757 #: ../src/guestfs.pod:762
1758 msgid "LIBGUESTFS GOTCHAS"
1763 #: ../src/guestfs.pod:764
1765 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1766 "system [...] that works in the way it is documented but is counterintuitive "
1767 "and almost invites mistakes.\""
1772 #: ../src/guestfs.pod:768
1774 "Since we developed libguestfs and the associated tools, there are several "
1775 "things we would have designed differently, but are now stuck with for "
1776 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1777 "release, you can expect these to change. Beware of them."
1782 #: ../src/guestfs.pod:776
1783 msgid "Autosync / forgetting to sync."
1787 #: ../src/guestfs.pod:778
1789 "I<Update:> Autosync is enabled by default for all API users starting from "
1790 "libguestfs 1.5.24. This section only applies to older versions."
1795 #: ../src/guestfs.pod:781
1797 "When modifying a filesystem from C or another language, you B<must> unmount "
1798 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1799 "libguestfs handle. You can also call:"
1804 #: ../src/guestfs.pod:785
1807 " guestfs_set_autosync (g, 1);\n"
1813 #: ../src/guestfs.pod:787
1815 "to have the unmount/sync done automatically for you when the handle 'g' is "
1816 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
1821 #: ../src/guestfs.pod:791
1823 "If you forget to do this, then it is entirely possible that your changes "
1824 "won't be written out, or will be partially written, or (very rarely) that "
1825 "you'll get disk corruption."
1830 #: ../src/guestfs.pod:795
1832 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1833 "guestfish scripts that forget to sync will work just fine, which can make "
1834 "this very puzzling if you are trying to debug a problem."
1839 #: ../src/guestfs.pod:799
1840 msgid "Mount option C<-o sync> should not be the default."
1845 #: ../src/guestfs.pod:801
1847 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1848 "However C<-o sync> does not add any reliability benefit, but does have a "
1849 "very large performance impact."
1854 #: ../src/guestfs.pod:805
1856 "The work around is to use L</guestfs_mount_options> and set the mount "
1857 "options that you actually want to use."
1862 #: ../src/guestfs.pod:808
1863 msgid "Read-only should be the default."
1868 #: ../src/guestfs.pod:810
1870 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1871 "specify I<--rw> if you want to make changes to the image."
1876 #: ../src/guestfs.pod:813
1877 msgid "This would reduce the potential to corrupt live VM images."
1882 #: ../src/guestfs.pod:815
1884 "Note that many filesystems change the disk when you just mount and unmount, "
1885 "even if you didn't perform any writes. You need to use L</"
1886 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
1891 #: ../src/guestfs.pod:819
1892 msgid "guestfish command line is hard to use."
1897 #: ../src/guestfs.pod:821
1899 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1900 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1901 "exist, so it fails. In earlier versions of guestfish the error message was "
1902 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1903 "we should have used C<guestfish -c command> to run commands."
1908 #: ../src/guestfs.pod:828
1909 msgid "guestfish megabyte modifiers don't work right on all commands"
1914 #: ../src/guestfs.pod:830
1916 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1917 "other modifiers). What guestfish actually does is to multiply the number "
1918 "part by the modifier part and pass the result to the C API. However this "
1919 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1920 "expecting some other unit (eg. megabytes)."
1925 #: ../src/guestfs.pod:837
1926 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1931 #: ../src/guestfs.pod:839
1934 " lvcreate LV VG 100M\n"
1940 #: ../src/guestfs.pod:841
1942 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1943 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1944 "megabytes * megabytes) logical volume. The error message you get from this "
1945 "is also a little obscure."
1950 #: ../src/guestfs.pod:846
1952 "This could be fixed in the generator by specially marking parameters and "
1953 "return values which take bytes or other units."
1958 #: ../src/guestfs.pod:849
1959 msgid "Ambiguity between devices and paths"
1964 #: ../src/guestfs.pod:851
1966 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
1967 "sdb2>) and a similar pathname. A file might just happen to be called "
1968 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1973 #: ../src/guestfs.pod:856
1975 "In the current API we usually resolve this ambiguity by having two separate "
1976 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1977 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1978 "detecting if the path supplied begins with C</dev/>."
1983 #: ../src/guestfs.pod:862
1985 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1986 "make paths/devices into structured names. One way to do this would be to "
1987 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1988 "aspect of grub. Another way would be to use a structured type, equivalent "
1989 "to this OCaml type:"
1994 #: ../src/guestfs.pod:868
1997 " type path = Path of string | Device of int | Partition of int * int\n"
2003 #: ../src/guestfs.pod:870
2004 msgid "which would allow you to pass arguments like:"
2009 #: ../src/guestfs.pod:872
2012 " Path \"/foo/bar\"\n"
2013 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
2014 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
2015 " Path \"/dev/sdb2\" (* not a device *)\n"
2021 #: ../src/guestfs.pod:877
2023 "As you can see there are still problems to resolve even with this "
2024 "representation. Also consider how it might work in guestfish."
2029 #: ../src/guestfs.pod:882
2030 msgid "KEYS AND PASSPHRASES"
2035 #: ../src/guestfs.pod:884
2037 "Certain libguestfs calls take a parameter that contains sensitive key "
2038 "material, passed in as a C string."
2043 #: ../src/guestfs.pod:887
2045 "In the future we would hope to change the libguestfs implementation so that "
2046 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
2047 "swap. However this is I<not> done at the moment, because of the complexity "
2048 "of such an implementation."
2053 #: ../src/guestfs.pod:892
2055 "Therefore you should be aware that any key parameter you pass to libguestfs "
2056 "might end up being written out to the swap partition. If this is a concern, "
2057 "scrub the swap partition or don't use libguestfs on encrypted devices."
2062 #: ../src/guestfs.pod:897
2063 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
2068 #: ../src/guestfs.pod:899
2070 "All high-level libguestfs actions are synchronous. If you want to use "
2071 "libguestfs asynchronously then you must create a thread."
2076 #: ../src/guestfs.pod:902
2078 "Only use the handle from a single thread. Either use the handle exclusively "
2079 "from one thread, or provide your own mutex so that two threads cannot issue "
2080 "calls on the same handle at the same time."
2085 #: ../src/guestfs.pod:906
2087 "See the graphical program guestfs-browser for one possible architecture for "
2088 "multithreaded programs using libvirt and libguestfs."
2093 #: ../src/guestfs.pod:909
2098 #: ../src/guestfs.pod:911
2100 "Libguestfs needs a supermin appliance, which it finds by looking along an "
2106 #: ../src/guestfs.pod:914
2108 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
2109 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
2114 #: ../src/guestfs.pod:917
2116 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
2117 "to change the directories that libguestfs will search in. The value is a "
2118 "colon-separated list of paths. The current directory is I<not> searched "
2119 "unless the path contains an empty element or C<.>. For example "
2120 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
2121 "then C</usr/lib/guestfs>."
2126 #: ../src/guestfs.pod:924
2127 msgid "QEMU WRAPPERS"
2132 #: ../src/guestfs.pod:926
2134 "If you want to compile your own qemu, run qemu from a non-standard location, "
2135 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
2141 #: ../src/guestfs.pod:930
2143 "There is one important rule to remember: you I<must C<exec qemu>> as the "
2144 "last command in the shell script (so that qemu replaces the shell and "
2145 "becomes the direct child of the libguestfs-using program). If you don't do "
2146 "this, then the qemu process won't be cleaned up correctly."
2151 #: ../src/guestfs.pod:935
2153 "Here is an example of a wrapper, where I have built my own copy of qemu from "
2159 #: ../src/guestfs.pod:938
2163 " qemudir=/home/rjones/d/qemu\n"
2164 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
2170 #: ../src/guestfs.pod:942
2172 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
2173 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
2179 #: ../src/guestfs.pod:946
2182 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
2188 #: ../src/guestfs.pod:948
2190 "Note that libguestfs also calls qemu with the -help and -version options in "
2191 "order to determine features."
2195 #: ../src/guestfs.pod:951
2196 msgid "ATTACHING TO RUNNING DAEMONS"
2200 #: ../src/guestfs.pod:953
2202 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
2203 "babies. Use with caution."
2207 #: ../src/guestfs.pod:956
2209 "I<Note (2):> This section explains how to attach to a running daemon from a "
2210 "low level perspective. For most users, simply using virt tools such as "
2211 "L<guestfish(1)> with the I<--live> option will \"just work\"."
2215 #: ../src/guestfs.pod:960
2216 msgid "Using guestfs_set_attach_method"
2220 #: ../src/guestfs.pod:962
2222 "By calling L</guestfs_set_attach_method> you can change how the library "
2223 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read L</"
2224 "ARCHITECTURE> for some background)."
2228 #: ../src/guestfs.pod:966
2230 "The normal attach method is C<appliance>, where a small appliance is created "
2231 "containing the daemon, and then the library connects to this."
2235 #: ../src/guestfs.pod:969
2237 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
2238 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
2239 "daemon over the Unix domain socket."
2243 #: ../src/guestfs.pod:973
2245 "The normal use for this is to connect to a running virtual machine that "
2246 "contains a C<guestfsd> daemon, and send commands so you can read and write "
2247 "files inside the live virtual machine."
2251 #: ../src/guestfs.pod:977
2252 msgid "Using guestfs_add_domain with live flag"
2256 #: ../src/guestfs.pod:979
2258 "L</guestfs_add_domain> provides some help for getting the correct attach "
2259 "method. If you pass the C<live> option to this function, then (if the "
2260 "virtual machine is running) it will examine the libvirt XML looking for a "
2261 "virtio-serial channel to connect to:"
2265 #: ../src/guestfs.pod:985
2272 " <channel type='unix'>\n"
2273 " <source mode='bind' path='/path/to/socket'/>\n"
2274 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
2283 #: ../src/guestfs.pod:997
2285 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
2286 "method to C<unix:/path/to/socket>."
2290 #: ../src/guestfs.pod:1000
2292 "Some of the libguestfs tools (including guestfish) support a I<--live> "
2293 "option which is passed through to L</guestfs_add_domain> thus allowing you "
2294 "to attach to and modify live virtual machines."
2298 #: ../src/guestfs.pod:1004
2300 "The virtual machine needs to have been set up beforehand so that it has the "
2301 "virtio-serial channel and so that guestfsd is running inside it."
2306 #: ../src/guestfs.pod:1008
2307 msgid "ABI GUARANTEE"
2312 #: ../src/guestfs.pod:1010
2314 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
2315 "actions as outlined in this section. Although we will deprecate some "
2316 "actions, for example if they get replaced by newer calls, we will keep the "
2317 "old actions forever. This allows you the developer to program in confidence "
2318 "against the libguestfs API."
2323 #: ../src/guestfs.pod:1016
2324 msgid "BLOCK DEVICE NAMING"
2329 #: ../src/guestfs.pod:1018
2331 "In the kernel there is now quite a profusion of schemata for naming block "
2332 "devices (in this context, by I<block device> I mean a physical or virtual "
2333 "hard drive). The original Linux IDE driver used names starting with C</dev/"
2334 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
2335 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
2336 "for the old IDE driver (particularly for SATA devices) those devices also "
2337 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
2338 "paravirtualized drivers. This has created several different naming systems, "
2339 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
2344 #: ../src/guestfs.pod:1030
2346 "As discussed above, libguestfs uses a qemu appliance running an embedded "
2347 "Linux kernel to access block devices. We can run a variety of appliances "
2348 "based on a variety of Linux kernels."
2353 #: ../src/guestfs.pod:1034
2355 "This causes a problem for libguestfs because many API calls use device or "
2356 "partition names. Working scripts and the recipe (example) scripts that we "
2357 "make available over the internet could fail if the naming scheme changes."
2362 #: ../src/guestfs.pod:1039
2364 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2365 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2366 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2367 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2372 #: ../src/guestfs.pod:1045
2374 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2375 "L</guestfs_list_partitions> and similar calls return the true names of the "
2376 "devices and partitions as known to the appliance."
2381 #: ../src/guestfs.pod:1050
2382 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2387 #: ../src/guestfs.pod:1052
2389 "Usually this translation is transparent. However in some (very rare) cases "
2390 "you may need to know the exact algorithm. Such cases include where you use "
2391 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
2392 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
2397 #: ../src/guestfs.pod:1058
2399 "The algorithm is applied only to I<parameters> which are known to be either "
2400 "device or partition names. Return values from functions such as L</"
2401 "guestfs_list_devices> are never changed."
2406 #: ../src/guestfs.pod:1066
2407 msgid "Is the string a parameter which is a device or partition name?"
2412 #: ../src/guestfs.pod:1070
2413 msgid "Does the string begin with C</dev/sd>?"
2418 #: ../src/guestfs.pod:1074
2420 "Does the named device exist? If so, we use that device. However if I<not> "
2421 "then we continue with this algorithm."
2426 #: ../src/guestfs.pod:1079
2427 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
2432 #: ../src/guestfs.pod:1081
2433 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
2438 #: ../src/guestfs.pod:1083
2439 msgid "If that named device exists, use it. If not, continue."
2444 #: ../src/guestfs.pod:1087
2445 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
2450 #: ../src/guestfs.pod:1089
2451 msgid "If that named device exists, use it. If not, return an error."
2456 #: ../src/guestfs.pod:1093
2457 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
2462 #: ../src/guestfs.pod:1095
2464 "Although the standard naming scheme and automatic translation is useful for "
2465 "simple programs and guestfish scripts, for larger programs it is best not to "
2466 "rely on this mechanism."
2471 #: ../src/guestfs.pod:1099
2473 "Where possible for maximum future portability programs using libguestfs "
2474 "should use these future-proof techniques:"
2479 #: ../src/guestfs.pod:1106
2481 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2482 "device names, and then use those names directly."
2487 #: ../src/guestfs.pod:1109
2489 "Since those device names exist by definition, they will never be translated."
2494 #: ../src/guestfs.pod:1114
2496 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2497 "filesystem labels."
2502 #: ../src/guestfs.pod:1119
2508 #: ../src/guestfs.pod:1121
2510 "This section discusses security implications of using libguestfs, "
2511 "particularly with untrusted or malicious guests or disk images."
2516 #: ../src/guestfs.pod:1124
2517 msgid "GENERAL SECURITY CONSIDERATIONS"
2522 #: ../src/guestfs.pod:1126
2524 "Be careful with any files or data that you download from a guest (by "
2525 "\"download\" we mean not just the L</guestfs_download> command but any "
2526 "command that reads files, filenames, directories or anything else from a "
2527 "disk image). An attacker could manipulate the data to fool your program "
2528 "into doing the wrong thing. Consider cases such as:"
2533 #: ../src/guestfs.pod:1136
2534 msgid "the data (file etc) not being present"
2539 #: ../src/guestfs.pod:1140
2540 msgid "being present but empty"
2545 #: ../src/guestfs.pod:1144
2546 msgid "being much larger than normal"
2551 #: ../src/guestfs.pod:1148
2552 msgid "containing arbitrary 8 bit data"
2557 #: ../src/guestfs.pod:1152
2558 msgid "being in an unexpected character encoding"
2563 #: ../src/guestfs.pod:1156
2564 msgid "containing homoglyphs."
2569 #: ../src/guestfs.pod:1160
2570 msgid "SECURITY OF MOUNTING FILESYSTEMS"
2575 #: ../src/guestfs.pod:1162
2577 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
2578 "(VFS) module can sometimes be escalated into exploits by deliberately "
2579 "creating a malicious, malformed filesystem. These exploits are very severe "
2580 "for two reasons. Firstly there are very many filesystem drivers in the "
2581 "kernel, and many of them are infrequently used and not much developer "
2582 "attention has been paid to the code. Linux userspace helps potential "
2583 "crackers by detecting the filesystem type and automatically choosing the "
2584 "right VFS driver, even if that filesystem type is obscure or unexpected for "
2585 "the administrator. Secondly, a kernel-level exploit is like a local root "
2586 "exploit (worse in some ways), giving immediate and total access to the "
2587 "system right down to the hardware level."
2592 #: ../src/guestfs.pod:1175
2594 "That explains why you should never mount a filesystem from an untrusted "
2595 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
2596 "inside a qemu virtual machine, usually running as a non-root user. The "
2597 "attacker would need to write a filesystem which first exploited the kernel, "
2598 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
2599 "the libguestfs protocol, and finally to be as serious as the host kernel "
2600 "exploit it would need to escalate its privileges to root. This multi-step "
2601 "escalation, performed by a static piece of data, is thought to be extremely "
2602 "hard to do, although we never say 'never' about security issues."
2607 #: ../src/guestfs.pod:1186
2609 "In any case callers can reduce the attack surface by forcing the filesystem "
2610 "type when mounting (use L</guestfs_mount_vfs>)."
2615 #: ../src/guestfs.pod:1189
2616 msgid "PROTOCOL SECURITY"
2621 #: ../src/guestfs.pod:1191
2623 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
2624 "defined upper message size. However a program that uses libguestfs must "
2625 "also take care - for example you can write a program that downloads a binary "
2626 "from a disk image and executes it locally, and no amount of protocol "
2627 "security will save you from the consequences."
2632 #: ../src/guestfs.pod:1197
2633 msgid "INSPECTION SECURITY"
2638 #: ../src/guestfs.pod:1199
2640 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
2641 "directly from the guest, and these could contain any 8 bit data. Callers "
2642 "should be careful to escape these before printing them to a structured file "
2643 "(for example, use HTML escaping if creating a web page)."
2648 #: ../src/guestfs.pod:1205
2650 "Guest configuration may be altered in unusual ways by the administrator of "
2651 "the virtual machine, and may not reflect reality (particularly for untrusted "
2652 "or actively malicious guests). For example we parse the hostname from "
2653 "configuration files like C</etc/sysconfig/network> that we find in the "
2654 "guest, but the guest administrator can easily manipulate these files to "
2655 "provide the wrong hostname."
2660 #: ../src/guestfs.pod:1213
2662 "The inspection API parses guest configuration using two external libraries: "
2663 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
2664 "designed to be robust in the face of malicious data, although denial of "
2665 "service attacks are still possible, for example with oversized configuration "
2671 #: ../src/guestfs.pod:1219
2672 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
2677 #: ../src/guestfs.pod:1221
2679 "Be very cautious about running commands from the guest. By running a "
2680 "command in the guest, you are giving CPU time to a binary that you do not "
2681 "control, under the same user account as the library, albeit wrapped in qemu "
2682 "virtualization. More information and alternatives can be found in the "
2683 "section L</RUNNING COMMANDS>."
2688 #: ../src/guestfs.pod:1227
2689 msgid "CVE-2010-3851"
2694 #: ../src/guestfs.pod:1229
2695 msgid "https://bugzilla.redhat.com/642934"
2700 #: ../src/guestfs.pod:1231
2702 "This security bug concerns the automatic disk format detection that qemu "
2703 "does on disk images."
2708 #: ../src/guestfs.pod:1234
2710 "A raw disk image is just the raw bytes, there is no header. Other disk "
2711 "images like qcow2 contain a special header. Qemu deals with this by looking "
2712 "for one of the known headers, and if none is found then assuming the disk "
2713 "image must be raw."
2718 #: ../src/guestfs.pod:1239
2720 "This allows a guest which has been given a raw disk image to write some "
2721 "other header. At next boot (or when the disk image is accessed by "
2722 "libguestfs) qemu would do autodetection and think the disk image format was, "
2723 "say, qcow2 based on the header written by the guest."
2728 #: ../src/guestfs.pod:1244
2730 "This in itself would not be a problem, but qcow2 offers many features, one "
2731 "of which is to allow a disk image to refer to another image (called the "
2732 "\"backing disk\"). It does this by placing the path to the backing disk "
2733 "into the qcow2 header. This path is not validated and could point to any "
2734 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
2735 "\"holes\" in the qcow2 disk image, which of course is completely under the "
2736 "control of the attacker."
2741 #: ../src/guestfs.pod:1252
2743 "In libguestfs this is rather hard to exploit except under two circumstances:"
2748 #: ../src/guestfs.pod:1259
2749 msgid "You have enabled the network or have opened the disk in write mode."
2754 #: ../src/guestfs.pod:1263
2756 "You are also running untrusted code from the guest (see L</RUNNING "
2762 #: ../src/guestfs.pod:1268
2764 "The way to avoid this is to specify the expected disk format when adding "
2765 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
2766 "should always do this if the disk is raw format, and it's a good idea for "
2772 #: ../src/guestfs.pod:1273
2774 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
2775 "format is fetched from libvirt and passed through."
2780 #: ../src/guestfs.pod:1276
2782 "For libguestfs tools, use the I<--format> command line parameter as "
2788 #: ../src/guestfs.pod:1279
2789 msgid "CONNECTION MANAGEMENT"
2794 #: ../src/guestfs.pod:1281
2800 #: ../src/guestfs.pod:1283
2802 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
2803 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
2804 "handle and release all resources used."
2808 #: ../src/guestfs.pod:1287
2810 "For information on using multiple handles and threads, see the section L</"
2811 "MULTIPLE HANDLES AND MULTIPLE THREADS> above."
2816 #: ../src/guestfs.pod:1290
2817 msgid "guestfs_create"
2822 #: ../src/guestfs.pod:1292
2825 " guestfs_h *guestfs_create (void);\n"
2831 #: ../src/guestfs.pod:1294
2832 msgid "Create a connection handle."
2836 #: ../src/guestfs.pod:1296
2838 "On success this returns a non-NULL pointer to a handle. On error it returns "
2843 #: ../src/guestfs.pod:1299
2845 "You have to \"configure\" the handle after creating it. This includes "
2846 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
2847 "handle at least once."
2852 #: ../src/guestfs.pod:1303
2853 msgid "After configuring the handle, you have to call L</guestfs_launch>."
2857 #: ../src/guestfs.pod:1305
2859 "You may also want to configure error handling for the handle. See the L</"
2860 "ERROR HANDLING> section below."
2865 #: ../src/guestfs.pod:1308
2866 msgid "guestfs_close"
2871 #: ../src/guestfs.pod:1310
2874 " void guestfs_close (guestfs_h *g);\n"
2880 #: ../src/guestfs.pod:1312
2881 msgid "This closes the connection handle and frees up all resources used."
2885 #: ../src/guestfs.pod:1314
2887 "If autosync was set on the handle and the handle was launched, then this "
2888 "implicitly calls various functions to unmount filesystems and sync the "
2889 "disk. See L</guestfs_set_autosync> for more details."
2893 #: ../src/guestfs.pod:1318
2894 msgid "If a close callback was set on the handle, then it is called."
2899 #: ../src/guestfs.pod:1320
2900 msgid "ERROR HANDLING"
2905 #: ../src/guestfs.pod:1322
2907 "API functions can return errors. For example, almost all functions that "
2908 "return C<int> will return C<-1> to indicate an error."
2913 #: ../src/guestfs.pod:1325
2915 "Additional information is available for errors: an error message string and "
2916 "optionally an error number (errno) if the thing that failed was a system "
2922 #: ../src/guestfs.pod:1329
2924 "You can get at the additional information about the last error on the handle "
2925 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
2926 "up an error handler with L</guestfs_set_error_handler>."
2931 #: ../src/guestfs.pod:1334
2933 "When the handle is created, a default error handler is installed which "
2934 "prints the error message string to C<stderr>. For small short-running "
2935 "command line programs it is sufficient to do:"
2940 #: ../src/guestfs.pod:1338
2943 " if (guestfs_launch (g) == -1)\n"
2944 " exit (EXIT_FAILURE);\n"
2950 #: ../src/guestfs.pod:1341
2952 "since the default error handler will ensure that an error message has been "
2953 "printed to C<stderr> before the program exits."
2958 #: ../src/guestfs.pod:1344
2960 "For other programs the caller will almost certainly want to install an "
2961 "alternate error handler or do error handling in-line like this:"
2966 #: ../src/guestfs.pod:1347
2969 " g = guestfs_create ();\n"
2975 #: ../src/guestfs.pod:1349
2978 " /* This disables the default behaviour of printing errors\n"
2980 " guestfs_set_error_handler (g, NULL, NULL);\n"
2986 #: ../src/guestfs.pod:1353
2989 " if (guestfs_launch (g) == -1) {\n"
2990 " /* Examine the error message and print it etc. */\n"
2991 " char *msg = guestfs_last_error (g);\n"
2992 " int errnum = guestfs_last_errno (g);\n"
2993 " fprintf (stderr, \"%s\\n\", msg);\n"
3001 #: ../src/guestfs.pod:1361
3003 "Out of memory errors are handled differently. The default action is to call "
3004 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
3005 "guestfs_set_out_of_memory_handler>."
3010 #: ../src/guestfs.pod:1365
3012 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
3013 "because there is no handle if this happens there is no way to get additional "
3014 "error information. However L</guestfs_create> is supposed to be a "
3015 "lightweight operation which can only fail because of insufficient memory (it "
3016 "returns NULL in this case)."
3021 #: ../src/guestfs.pod:1371
3022 msgid "guestfs_last_error"
3027 #: ../src/guestfs.pod:1373
3030 " const char *guestfs_last_error (guestfs_h *g);\n"
3036 #: ../src/guestfs.pod:1375
3038 "This returns the last error message that happened on C<g>. If there has not "
3039 "been an error since the handle was created, then this returns C<NULL>."
3044 #: ../src/guestfs.pod:1379
3046 "The lifetime of the returned string is until the next error occurs, or L</"
3047 "guestfs_close> is called."
3052 #: ../src/guestfs.pod:1382
3053 msgid "guestfs_last_errno"
3058 #: ../src/guestfs.pod:1384
3061 " int guestfs_last_errno (guestfs_h *g);\n"
3067 #: ../src/guestfs.pod:1386
3068 msgid "This returns the last error number (errno) that happened on C<g>."
3073 #: ../src/guestfs.pod:1388
3074 msgid "If successful, an errno integer not equal to zero is returned."
3079 #: ../src/guestfs.pod:1390
3081 "If no error, this returns 0. This call can return 0 in three situations:"
3086 #: ../src/guestfs.pod:1397
3087 msgid "There has not been any error on the handle."
3092 #: ../src/guestfs.pod:1401
3094 "There has been an error but the errno was meaningless. This corresponds to "
3095 "the case where the error did not come from a failed system call, but for "
3096 "some other reason."
3101 #: ../src/guestfs.pod:1407
3103 "There was an error from a failed system call, but for some reason the errno "
3104 "was not captured and returned. This usually indicates a bug in libguestfs."
3109 #: ../src/guestfs.pod:1413
3111 "Libguestfs tries to convert the errno from inside the applicance into a "
3112 "corresponding errno for the caller (not entirely trivial: the appliance "
3113 "might be running a completely different operating system from the library "
3114 "and error numbers are not standardized across Un*xen). If this could not be "
3115 "done, then the error is translated to C<EINVAL>. In practice this should "
3116 "only happen in very rare circumstances."
3121 #: ../src/guestfs.pod:1421
3122 msgid "guestfs_set_error_handler"
3127 #: ../src/guestfs.pod:1423
3130 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
3132 " const char *msg);\n"
3133 " void guestfs_set_error_handler (guestfs_h *g,\n"
3134 " guestfs_error_handler_cb cb,\n"
3141 #: ../src/guestfs.pod:1430
3143 "The callback C<cb> will be called if there is an error. The parameters "
3144 "passed to the callback are an opaque data pointer and the error message "
3150 #: ../src/guestfs.pod:1434
3152 "C<errno> is not passed to the callback. To get that the callback must call "
3153 "L</guestfs_last_errno>."
3158 #: ../src/guestfs.pod:1437
3160 "Note that the message string C<msg> is freed as soon as the callback "
3161 "function returns, so if you want to stash it somewhere you must make your "
3167 #: ../src/guestfs.pod:1441
3168 msgid "The default handler prints messages on C<stderr>."
3173 #: ../src/guestfs.pod:1443
3174 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
3179 #: ../src/guestfs.pod:1445
3180 msgid "guestfs_get_error_handler"
3185 #: ../src/guestfs.pod:1447
3188 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
3189 " void **opaque_rtn);\n"
3195 #: ../src/guestfs.pod:1450
3196 msgid "Returns the current error handler callback."
3201 #: ../src/guestfs.pod:1452
3202 msgid "guestfs_set_out_of_memory_handler"
3207 #: ../src/guestfs.pod:1454
3210 " typedef void (*guestfs_abort_cb) (void);\n"
3211 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
3212 " guestfs_abort_cb);\n"
3218 #: ../src/guestfs.pod:1458
3220 "The callback C<cb> will be called if there is an out of memory situation. "
3221 "I<Note this callback must not return>."
3226 #: ../src/guestfs.pod:1461
3227 msgid "The default is to call L<abort(3)>."
3232 #: ../src/guestfs.pod:1463
3234 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
3239 #: ../src/guestfs.pod:1466
3240 msgid "guestfs_get_out_of_memory_handler"
3245 #: ../src/guestfs.pod:1468
3248 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
3254 #: ../src/guestfs.pod:1470
3255 msgid "This returns the current out of memory handler."
3260 #: ../src/guestfs.pod:1472
3266 #: ../src/guestfs.pod:1474 ../fish/guestfish.pod:1010
3272 #: ../src/guestfs.pod:1476
3278 #: ../src/guestfs.pod:1478
3284 #: ../src/guestfs.pod:1480
3285 msgid "AVAILABILITY"
3290 #: ../src/guestfs.pod:1482
3291 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
3296 #: ../src/guestfs.pod:1484
3298 "Using L</guestfs_available> you can test availability of the following "
3299 "groups of functions. This test queries the appliance to see if the "
3300 "appliance you are currently using supports the functionality."
3305 #: ../src/guestfs.pod:1489
3306 msgid "@AVAILABILITY@"
3311 #: ../src/guestfs.pod:1491
3312 msgid "GUESTFISH supported COMMAND"
3317 #: ../src/guestfs.pod:1493
3319 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
3320 "prints out the available groups and whether they are supported by this build "
3321 "of libguestfs. Note however that you have to do C<run> first."
3326 #: ../src/guestfs.pod:1498
3327 msgid "SINGLE CALLS AT COMPILE TIME"
3332 #: ../src/guestfs.pod:1500
3334 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
3335 "function, such as:"
3340 #: ../src/guestfs.pod:1503
3343 " #define LIBGUESTFS_HAVE_DD 1\n"
3349 #: ../src/guestfs.pod:1505
3350 msgid "if L</guestfs_dd> is available."
3355 #: ../src/guestfs.pod:1507
3357 "Before version 1.5.8, if you needed to test whether a single libguestfs "
3358 "function is available at compile time, we recommended using build tools such "
3359 "as autoconf or cmake. For example in autotools you could use:"
3364 #: ../src/guestfs.pod:1512
3367 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
3368 " AC_CHECK_FUNCS([guestfs_dd])\n"
3374 #: ../src/guestfs.pod:1515
3376 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
3382 #: ../src/guestfs.pod:1518
3383 msgid "SINGLE CALLS AT RUN TIME"
3388 #: ../src/guestfs.pod:1520
3390 "Testing at compile time doesn't guarantee that a function really exists in "
3391 "the library. The reason is that you might be dynamically linked against a "
3392 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
3393 "This situation unfortunately results in a segmentation fault, which is a "
3394 "shortcoming of the C dynamic linking system itself."
3399 #: ../src/guestfs.pod:1527
3401 "You can use L<dlopen(3)> to test if a function is available at run time, as "
3402 "in this example program (note that you still need the compile time check as "
3408 #: ../src/guestfs.pod:1531
3411 " #include <stdio.h>\n"
3412 " #include <stdlib.h>\n"
3413 " #include <unistd.h>\n"
3414 " #include <dlfcn.h>\n"
3415 " #include <guestfs.h>\n"
3421 #: ../src/guestfs.pod:1537
3426 " #ifdef LIBGUESTFS_HAVE_DD\n"
3428 " int has_function;\n"
3434 #: ../src/guestfs.pod:1543
3437 " /* Test if the function guestfs_dd is really available. */\n"
3438 " dl = dlopen (NULL, RTLD_LAZY);\n"
3440 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
3441 " exit (EXIT_FAILURE);\n"
3443 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
3450 #: ../src/guestfs.pod:1552
3453 " if (!has_function)\n"
3454 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
3456 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
3457 " /* Now it's safe to call\n"
3458 " guestfs_dd (g, \"foo\", \"bar\");\n"
3462 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
3470 #: ../src/guestfs.pod:1565
3472 "You may think the above is an awful lot of hassle, and it is. There are "
3473 "other ways outside of the C linking system to ensure that this kind of "
3474 "incompatibility never arises, such as using package versioning:"
3479 #: ../src/guestfs.pod:1570
3482 " Requires: libguestfs >= 1.0.80\n"
3488 #: ../src/guestfs.pod:1572
3489 msgid "CALLS WITH OPTIONAL ARGUMENTS"
3494 #: ../src/guestfs.pod:1574
3496 "A recent feature of the API is the introduction of calls which take optional "
3497 "arguments. In C these are declared 3 ways. The main way is as a call which "
3498 "takes variable arguments (ie. C<...>), as in this example:"
3503 #: ../src/guestfs.pod:1579
3506 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
3512 #: ../src/guestfs.pod:1581
3514 "Call this with a list of optional arguments, terminated by C<-1>. So to "
3515 "call with no optional arguments specified:"
3520 #: ../src/guestfs.pod:1584
3523 " guestfs_add_drive_opts (g, filename, -1);\n"
3529 #: ../src/guestfs.pod:1586
3530 msgid "With a single optional argument:"
3535 #: ../src/guestfs.pod:1588
3538 " guestfs_add_drive_opts (g, filename,\n"
3539 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3546 #: ../src/guestfs.pod:1592
3552 #: ../src/guestfs.pod:1594
3555 " guestfs_add_drive_opts (g, filename,\n"
3556 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3557 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
3564 #: ../src/guestfs.pod:1599
3566 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
3572 #: ../src/guestfs.pod:1602
3573 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
3578 #: ../src/guestfs.pod:1604
3580 "The second variant has the same name with the suffix C<_va>, which works the "
3581 "same way but takes a C<va_list>. See the C manual for details. For the "
3582 "example function, this is declared:"
3587 #: ../src/guestfs.pod:1608
3590 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
3597 #: ../src/guestfs.pod:1611
3598 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
3603 #: ../src/guestfs.pod:1613
3605 "The third variant is useful where you need to construct these calls. You "
3606 "pass in a structure where you fill in the optional fields. The structure "
3607 "has a bitmask as the first element which you must set to indicate which "
3608 "fields you have filled in. For our example function the structure and call "
3614 #: ../src/guestfs.pod:1619
3617 " struct guestfs_add_drive_opts_argv {\n"
3618 " uint64_t bitmask;\n"
3620 " const char *format;\n"
3623 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
3624 " const struct guestfs_add_drive_opts_argv *optargs);\n"
3630 #: ../src/guestfs.pod:1628
3631 msgid "You could call it like this:"
3636 #: ../src/guestfs.pod:1630
3639 " struct guestfs_add_drive_opts_argv optargs = {\n"
3640 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
3641 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
3643 " .format = \"qcow2\"\n"
3650 #: ../src/guestfs.pod:1637
3653 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
3659 #: ../src/guestfs.pod:1639 ../src/guestfs-actions.pod:11
3660 #: ../src/guestfs-actions.pod:1858 ../fish/guestfish-actions.pod:9
3661 #: ../fish/guestfish-actions.pod:1262 ../tools/virt-win-reg.pl:704
3667 #: ../src/guestfs.pod:1645
3668 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
3673 #: ../src/guestfs.pod:1650
3674 msgid "You do not need to fill in all fields of the structure."
3679 #: ../src/guestfs.pod:1654
3681 "There must be a one-to-one correspondence between fields of the structure "
3682 "that are filled in, and bits set in the bitmask."
3687 #: ../src/guestfs.pod:1659
3688 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
3693 #: ../src/guestfs.pod:1661
3695 "In other languages, optional arguments are expressed in the way that is "
3696 "natural for that language. We refer you to the language-specific "
3697 "documentation for more details on that."
3702 #: ../src/guestfs.pod:1665
3703 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
3708 #: ../src/guestfs.pod:1667
3709 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
3713 #: ../src/guestfs.pod:1669
3715 "B<Note:> This section documents the generic event mechanism introduced in "
3716 "libguestfs 1.10, which you should use in new code if possible. The old "
3717 "functions C<guestfs_set_log_message_callback>, "
3718 "C<guestfs_set_subprocess_quit_callback>, "
3719 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
3720 "C<guestfs_set_progress_callback> are no longer documented in this manual "
3721 "page. Because of the ABI guarantee, the old functions continue to work."
3725 #: ../src/guestfs.pod:1678
3727 "Handles generate events when certain things happen, such as log messages "
3728 "being generated, progress messages during long-running operations, or the "
3729 "handle being closed. The API calls described below let you register a "
3730 "callback to be called when events happen. You can register multiple "
3731 "callbacks (for the same, different or overlapping sets of events), and "
3732 "individually remove callbacks. If callbacks are not removed, then they "
3733 "remain in force until the handle is closed."
3737 #: ../src/guestfs.pod:1686
3739 "In the current implementation, events are only generated synchronously: that "
3740 "means that events (and hence callbacks) can only happen while you are in the "
3741 "middle of making another libguestfs call. The callback is called in the "
3746 #: ../src/guestfs.pod:1691
3748 "Events may contain a payload, usually nothing (void), an array of 64 bit "
3749 "unsigned integers, or a message buffer. Payloads are discussed later on."
3753 #: ../src/guestfs.pod:1695
3754 msgid "CLASSES OF EVENTS"
3758 #: ../src/guestfs.pod:1699
3759 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
3763 #: ../src/guestfs.pod:1702
3765 "The callback function will be called while the handle is being closed "
3766 "(synchronously from L</guestfs_close>)."
3771 #: ../src/guestfs.pod:1705
3773 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
3774 "handles that are open when the program exits. This means that this callback "
3775 "might be called indirectly from L<exit(3)>, which can cause unexpected "
3776 "problems in higher-level languages (eg. if your HLL interpreter has already "
3777 "been cleaned up by the time this is called, and if your callback then jumps "
3778 "into some HLL function)."
3782 #: ../src/guestfs.pod:1712
3784 "If no callback is registered: the handle is closed without any callback "
3789 #: ../src/guestfs.pod:1715
3790 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
3794 #: ../src/guestfs.pod:1718
3796 "The callback function will be called when the child process quits, either "
3797 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
3798 "corresponds to a transition from any state to the CONFIG state)."
3802 #: ../src/guestfs.pod:1722 ../src/guestfs.pod:1731
3803 msgid "If no callback is registered: the event is ignored."
3807 #: ../src/guestfs.pod:1724
3808 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
3812 #: ../src/guestfs.pod:1727
3814 "The callback function will be called when the child process becomes ready "
3815 "first time after it has been launched. (This corresponds to a transition "
3816 "from LAUNCHING to the READY state)."
3820 #: ../src/guestfs.pod:1733
3821 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
3826 #: ../src/guestfs.pod:1736
3828 "Some long-running operations can generate progress messages. If this "
3829 "callback is registered, then it will be called each time a progress message "
3830 "is generated (usually two seconds after the operation started, and three "
3831 "times per second thereafter until it completes, although the frequency may "
3832 "change in future versions)."
3836 #: ../src/guestfs.pod:1742
3838 "The callback receives in the payload four unsigned 64 bit numbers which are "
3839 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
3843 #: ../src/guestfs.pod:1745
3845 "The units of C<total> are not defined, although for some operations C<total> "
3846 "may relate in some way to the amount of data to be transferred (eg. in bytes "
3847 "or megabytes), and C<position> may be the portion which has been transferred."
3852 #: ../src/guestfs.pod:1750
3853 msgid "The only defined and stable parts of the API are:"
3858 #: ../src/guestfs.pod:1756
3860 "The callback can display to the user some type of progress bar or indicator "
3861 "which shows the ratio of C<position>:C<total>."
3866 #: ../src/guestfs.pod:1761
3867 msgid "0 E<lt>= C<position> E<lt>= C<total>"
3871 #: ../src/guestfs.pod:1765
3873 "If any progress notification is sent during a call, then a final progress "
3874 "notification is always sent when C<position> = C<total> (I<unless> the call "
3875 "fails with an error)."
3880 #: ../src/guestfs.pod:1769
3882 "This is to simplify caller code, so callers can easily set the progress "
3883 "indicator to \"100%\" at the end of the operation, without requiring special "
3884 "code to detect this case."
3888 #: ../src/guestfs.pod:1775
3890 "For some calls we are unable to estimate the progress of the call, but we "
3891 "can still generate progress messages to indicate activity. This is known as "
3892 "\"pulse mode\", and is directly supported by certain progress bar "
3893 "implementations (eg. GtkProgressBar)."
3897 #: ../src/guestfs.pod:1780
3899 "For these calls, zero or more progress messages are generated with "
3900 "C<position = 0> and C<total = 1>, followed by a final message with "
3901 "C<position = total = 1>."
3905 #: ../src/guestfs.pod:1784
3907 "As noted above, if the call fails with an error then the final message may "
3912 #: ../src/guestfs.pod:1789
3914 "The callback also receives the procedure number (C<proc_nr>) and serial "
3915 "number (C<serial>) of the call. These are only useful for debugging "
3916 "protocol issues, and the callback can normally ignore them. The callback "
3917 "may want to print these numbers in error messages or debugging messages."
3921 #: ../src/guestfs.pod:1795
3922 msgid "If no callback is registered: progress messages are discarded."
3926 #: ../src/guestfs.pod:1797
3927 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
3931 #: ../src/guestfs.pod:1800
3933 "The callback function is called whenever a log message is generated by qemu, "
3934 "the appliance kernel, guestfsd (daemon), or utility programs."
3938 #: ../src/guestfs.pod:1803
3940 "If the verbose flag (L</guestfs_set_verbose>) is set before launch (L</"
3941 "guestfs_launch>) then additional debug messages are generated."
3945 #: ../src/guestfs.pod:1806 ../src/guestfs.pod:1820
3947 "If no callback is registered: the messages are discarded unless the verbose "
3948 "flag is set in which case they are sent to stderr. You can override the "
3949 "printing of verbose messages to stderr by setting up a callback."
3953 #: ../src/guestfs.pod:1811
3954 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
3958 #: ../src/guestfs.pod:1814
3960 "The callback function is called whenever a log message is generated by the "
3961 "library part of libguestfs."
3965 #: ../src/guestfs.pod:1817
3967 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
3968 "messages are generated."
3972 #: ../src/guestfs.pod:1825
3973 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
3977 #: ../src/guestfs.pod:1828
3979 "The callback function is called whenever a trace message is generated. This "
3980 "only applies if the trace flag (L</guestfs_set_trace>) is set."
3984 #: ../src/guestfs.pod:1831
3986 "If no callback is registered: the messages are sent to stderr. You can "
3987 "override the printing of trace messages to stderr by setting up a callback."
3991 #: ../src/guestfs.pod:1837
3992 msgid "guestfs_set_event_callback"
3996 #: ../src/guestfs.pod:1839
3999 " int guestfs_set_event_callback (guestfs_h *g,\n"
4000 " guestfs_event_callback cb,\n"
4001 " uint64_t event_bitmask,\n"
4008 #: ../src/guestfs.pod:1845
4010 "This function registers a callback (C<cb>) for all event classes in the "
4015 #: ../src/guestfs.pod:1848
4017 "For example, to register for all log message events, you could call this "
4018 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
4019 "To register a single callback for all possible classes of events, use "
4020 "C<GUESTFS_EVENT_ALL>."
4024 #: ../src/guestfs.pod:1854
4025 msgid "C<flags> should always be passed as 0."
4029 #: ../src/guestfs.pod:1856
4031 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
4032 "it for any purpose."
4036 #: ../src/guestfs.pod:1859
4038 "The return value is the event handle (an integer) which you can use to "
4039 "delete the callback (see below)."
4043 #: ../src/guestfs.pod:1862
4045 "If there is an error, this function returns C<-1>, and sets the error in the "
4046 "handle in the usual way (see L</guestfs_last_error> etc.)"
4050 #: ../src/guestfs.pod:1865
4052 "Callbacks remain in effect until they are deleted, or until the handle is "
4057 #: ../src/guestfs.pod:1868
4059 "In the case where multiple callbacks are registered for a particular event "
4060 "class, all of the callbacks are called. The order in which multiple "
4061 "callbacks are called is not defined."
4065 #: ../src/guestfs.pod:1872
4066 msgid "guestfs_delete_event_callback"
4070 #: ../src/guestfs.pod:1874
4073 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
4078 #: ../src/guestfs.pod:1876
4080 "Delete a callback that was previously registered. C<event_handle> should be "
4081 "the integer that was returned by a previous call to "
4082 "C<guestfs_set_event_callback> on the same handle."
4086 #: ../src/guestfs.pod:1880
4087 msgid "guestfs_event_callback"
4091 #: ../src/guestfs.pod:1882
4094 " typedef void (*guestfs_event_callback) (\n"
4097 " uint64_t event,\n"
4098 " int event_handle,\n"
4100 " const char *buf, size_t buf_len,\n"
4101 " const uint64_t *array, size_t array_len);\n"
4106 #: ../src/guestfs.pod:1891
4108 "This is the type of the event callback function that you have to provide."
4112 #: ../src/guestfs.pod:1894
4114 "The basic parameters are: the handle (C<g>), the opaque user pointer "
4115 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
4116 "handle, and C<flags> which in the current API you should ignore."
4120 #: ../src/guestfs.pod:1898
4122 "The remaining parameters contain the event payload (if any). Each event may "
4123 "contain a payload, which usually relates to the event class, but for future "
4124 "proofing your code should be written to handle any payload for any event "
4129 #: ../src/guestfs.pod:1903
4131 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
4132 "there is no message buffer). Note that this message buffer can contain "
4133 "arbitrary 8 bit data, including NUL bytes."
4137 #: ../src/guestfs.pod:1907
4139 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
4140 "moment this is only used for progress messages."
4144 #: ../src/guestfs.pod:1910
4145 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
4149 #: ../src/guestfs.pod:1912
4151 "One motivation for the generic event API was to allow GUI programs to "
4152 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
4153 "unconditionally to C<stderr>."
4157 #: ../src/guestfs.pod:1916
4159 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
4160 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
4161 "messages are not events; you must capture error messages separately)."
4165 #: ../src/guestfs.pod:1921
4167 "Programs have to set up a callback to capture the classes of events of "
4172 #: ../src/guestfs.pod:1924
4176 " guestfs_set_event_callback\n"
4177 " (g, message_callback,\n"
4178 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
4179 " GUESTFS_EVENT_TRACE,\n"
4180 " 0, NULL) == -1)\n"
4181 " if (eh == -1) {\n"
4182 " // handle error in the usual way\n"
4188 #: ../src/guestfs.pod:1934
4190 "The callback can then direct messages to the appropriate place. In this "
4191 "example, messages are directed to syslog:"
4195 #: ../src/guestfs.pod:1937
4199 " message_callback (\n"
4202 " uint64_t event,\n"
4203 " int event_handle,\n"
4205 " const char *buf, size_t buf_len,\n"
4206 " const uint64_t *array, size_t array_len)\n"
4208 " const int priority = LOG_USER|LOG_INFO;\n"
4209 " if (buf_len > 0)\n"
4210 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
4217 #: ../src/guestfs.pod:1952
4218 msgid "PRIVATE DATA AREA"
4222 #: ../src/guestfs.pod:1954
4224 "You can attach named pieces of private data to the libguestfs handle, fetch "
4225 "them by name, and walk over them, for the lifetime of the handle. This is "
4226 "called the private data area and is only available from the C API."
4231 #: ../src/guestfs.pod:1959
4232 msgid "To attach a named piece of data, use the following call:"
4237 #: ../src/guestfs.pod:1961
4240 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
4245 #: ../src/guestfs.pod:1963
4247 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
4248 "pointer (which can be C<NULL>). Any previous item with the same key is "
4253 #: ../src/guestfs.pod:1967
4255 "You can use any C<key> you want, but your key should I<not> start with an "
4256 "underscore character. Keys beginning with an underscore character are "
4257 "reserved for internal libguestfs purposes (eg. for implementing language "
4258 "bindings). It is recommended that you prefix the key with some unique "
4259 "string to avoid collisions with other users."
4264 #: ../src/guestfs.pod:1973
4265 msgid "To retrieve the pointer, use:"
4270 #: ../src/guestfs.pod:1975
4273 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
4279 #: ../src/guestfs.pod:1977
4281 "This function returns C<NULL> if either no data is found associated with "
4282 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
4287 #: ../src/guestfs.pod:1981
4289 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
4290 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
4291 "all. In particular, libguestfs does I<not> try to free the data when the "
4292 "handle is closed. If the data must be freed, then the caller must either "
4293 "free it before calling L</guestfs_close> or must set up a close callback to "
4294 "do it (see L</GUESTFS_EVENT_CLOSE>)."
4298 #: ../src/guestfs.pod:1988
4299 msgid "To walk over all entries, use these two functions:"
4303 #: ../src/guestfs.pod:1990
4306 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
4311 #: ../src/guestfs.pod:1992
4314 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
4319 #: ../src/guestfs.pod:1994
4321 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
4322 "not have any particular meaning -- keys are not returned in any defined "
4323 "order). A pointer to the key is returned in C<*key_rtn> and the "
4324 "corresponding data pointer is returned from the function. C<NULL> is "
4325 "returned if there are no keys stored in the handle."
4329 #: ../src/guestfs.pod:2000
4331 "C<guestfs_next_private> returns the next key, pointer pair. The return "
4332 "value of this function is also C<NULL> is there are no further entries to "
4337 #: ../src/guestfs.pod:2004
4338 msgid "Notes about walking over entries:"
4342 #: ../src/guestfs.pod:2010
4344 "You must not call C<guestfs_set_private> while walking over the entries."
4348 #: ../src/guestfs.pod:2015
4350 "The handle maintains an internal iterator which is reset when you call "
4351 "C<guestfs_first_private>. This internal iterator is invalidated when you "
4352 "call C<guestfs_set_private>."
4356 #: ../src/guestfs.pod:2021
4357 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
4361 #: ../src/guestfs.pod:2023
4364 " guestfs_set_private (g, key, NULL);\n"
4369 #: ../src/guestfs.pod:2025
4370 msgid "then that C<key> is not returned when walking."
4374 #: ../src/guestfs.pod:2029
4376 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
4377 "C<guestfs_next_private> or C<guestfs_set_private>."
4381 #: ../src/guestfs.pod:2035
4383 "The following example code shows how to print all keys and data pointers "
4384 "that are associated with the handle C<g>:"
4388 #: ../src/guestfs.pod:2038
4391 " const char *key;\n"
4392 " void *data = guestfs_first_private (g, &key);\n"
4393 " while (data != NULL)\n"
4395 " printf (\"key = %s, data = %p\\n\", key, data);\n"
4396 " data = guestfs_next_private (g, &key);\n"
4402 #: ../src/guestfs.pod:2046
4404 "More commonly you are only interested in keys that begin with an application-"
4405 "specific prefix C<foo_>. Modify the loop like so:"
4409 #: ../src/guestfs.pod:2049
4412 " const char *key;\n"
4413 " void *data = guestfs_first_private (g, &key);\n"
4414 " while (data != NULL)\n"
4416 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
4417 " printf (\"key = %s, data = %p\\n\", key, data);\n"
4418 " data = guestfs_next_private (g, &key);\n"
4424 #: ../src/guestfs.pod:2058
4426 "If you need to modify keys while walking, then you have to jump back to the "
4427 "beginning of the loop. For example, to delete all keys prefixed with "
4432 #: ../src/guestfs.pod:2062
4435 " const char *key;\n"
4438 " data = guestfs_first_private (g, &key);\n"
4439 " while (data != NULL)\n"
4441 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
4443 " guestfs_set_private (g, key, NULL);\n"
4444 " /* note that 'key' pointer is now invalid, and so is\n"
4445 " the internal iterator */\n"
4448 " data = guestfs_next_private (g, &key);\n"
4454 #: ../src/guestfs.pod:2078
4456 "Note that the above loop is guaranteed to terminate because the keys are "
4457 "being deleted, but other manipulations of keys within the loop might not "
4458 "terminate unless you also maintain an indication of which keys have been "
4464 #: ../src/guestfs.pod:2083 ../src/guestfs.pod:2088
4470 #: ../src/guestfs.pod:2085
4472 "<!-- old anchor for the next section --> <a name="
4473 "\"state_machine_and_low_level_event_api\"/>"
4478 #: ../src/guestfs.pod:2090
4479 msgid "ARCHITECTURE"
4484 #: ../src/guestfs.pod:2092
4486 "Internally, libguestfs is implemented by running an appliance (a special "
4487 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
4488 "process of the main program."
4493 #: ../src/guestfs.pod:2096
4496 " ___________________\n"
4498 " | main program |\n"
4500 " | | child process / appliance\n"
4501 " | | __________________________\n"
4503 " +-------------------+ RPC | +-----------------+ |\n"
4504 " | libguestfs <--------------------> guestfsd | |\n"
4505 " | | | +-----------------+ |\n"
4506 " \\___________________/ | | Linux kernel | |\n"
4507 " | +--^--------------+ |\n"
4508 " \\_________|________________/\n"
4514 " \\______________/\n"
4520 #: ../src/guestfs.pod:2116
4522 "The library, linked to the main program, creates the child process and hence "
4523 "the appliance in the L</guestfs_launch> function."
4528 #: ../src/guestfs.pod:2119
4530 "Inside the appliance is a Linux kernel and a complete stack of userspace "
4531 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
4532 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
4533 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
4534 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
4535 "attached to the qemu process which translates device access by the "
4536 "appliance's Linux kernel into accesses to the image."
4541 #: ../src/guestfs.pod:2128
4543 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
4544 "Although the disk image you are attached to might also be used by some "
4545 "virtual machine, libguestfs doesn't know or care about this. (But you will "
4546 "care if both libguestfs's qemu process and your virtual machine are trying "
4547 "to update the disk image at the same time, since these usually results in "
4548 "massive disk corruption)."
4553 #: ../src/guestfs.pod:2135
4554 msgid "STATE MACHINE"
4559 #: ../src/guestfs.pod:2137
4560 msgid "libguestfs uses a state machine to model the child process:"
4565 #: ../src/guestfs.pod:2139
4577 " / | \\ \\ guestfs_launch\n"
4578 " / | _\\__V______\n"
4580 " / | | LAUNCHING |\n"
4581 " / | \\___________/\n"
4583 " / | guestfs_launch\n"
4585 " ______ / __|____V\n"
4586 " / \\ ------> / \\\n"
4587 " | BUSY | | READY |\n"
4588 " \\______/ <------ \\________/\n"
4594 #: ../src/guestfs.pod:2161
4596 "The normal transitions are (1) CONFIG (when the handle is created, but there "
4597 "is no child process), (2) LAUNCHING (when the child process is booting up), "
4598 "(3) alternating between READY and BUSY as commands are issued to, and "
4599 "carried out by, the child process."
4604 #: ../src/guestfs.pod:2166
4606 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
4607 "asynchronously at any time (eg. due to some internal error), and that causes "
4608 "the state to transition back to CONFIG."
4613 #: ../src/guestfs.pod:2170
4615 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
4616 "issued when in the CONFIG state."
4621 #: ../src/guestfs.pod:2173
4623 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
4624 "L</guestfs_launch> blocks until the child process is READY to accept "
4625 "commands (or until some failure or timeout). L</guestfs_launch> internally "
4626 "moves the state from CONFIG to LAUNCHING while it is running."
4631 #: ../src/guestfs.pod:2179
4633 "API actions such as L</guestfs_mount> can only be issued when in the READY "
4634 "state. These API calls block waiting for the command to be carried out (ie. "
4635 "the state to transition to BUSY and then back to READY). There are no non-"
4636 "blocking versions, and no way to issue more than one command per handle at "
4642 #: ../src/guestfs.pod:2185
4644 "Finally, the child process sends asynchronous messages back to the main "
4645 "program, such as kernel log messages. You can register a callback to "
4646 "receive these messages."
4651 #: ../src/guestfs.pod:2189
4657 #: ../src/guestfs.pod:2191
4658 msgid "COMMUNICATION PROTOCOL"
4663 #: ../src/guestfs.pod:2193
4665 "Don't rely on using this protocol directly. This section documents how it "
4666 "currently works, but it may change at any time."
4671 #: ../src/guestfs.pod:2196
4673 "The protocol used to talk between the library and the daemon running inside "
4674 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
4675 "1014, RFC 1832, RFC 4506)."
4680 #: ../src/guestfs.pod:2200
4682 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
4683 "this file is automatically generated)."
4688 #: ../src/guestfs.pod:2203
4690 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
4691 "and C<FileOut> parameters, which are handled with very simple request/reply "
4692 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
4693 "parameters, which use the same request and reply messages, but they may also "
4694 "be followed by files sent using a chunked encoding."
4699 #: ../src/guestfs.pod:2210
4700 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
4705 #: ../src/guestfs.pod:2212
4706 msgid "For ordinary functions, the request message is:"
4711 #: ../src/guestfs.pod:2214
4714 " total length (header + arguments,\n"
4715 " but not including the length word itself)\n"
4716 " struct guestfs_message_header (encoded as XDR)\n"
4717 " struct guestfs_<foo>_args (encoded as XDR)\n"
4723 #: ../src/guestfs.pod:2219
4725 "The total length field allows the daemon to allocate a fixed size buffer "
4726 "into which it slurps the rest of the message. As a result, the total length "
4727 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
4728 "effective size of any request is limited to somewhere under this size."
4733 #: ../src/guestfs.pod:2225
4735 "Note also that many functions don't take any arguments, in which case the "
4736 "C<guestfs_I<foo>_args> is completely omitted."
4741 #: ../src/guestfs.pod:2228
4743 "The header contains the procedure number (C<guestfs_proc>) which is how the "
4744 "receiver knows what type of args structure to expect, or none at all."
4749 #: ../src/guestfs.pod:2232
4751 "For functions that take optional arguments, the optional arguments are "
4752 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
4753 "arguments. A bitmask in the header indicates which optional arguments are "
4754 "meaningful. The bitmask is also checked to see if it contains bits set "
4755 "which the daemon does not know about (eg. if more optional arguments were "
4756 "added in a later version of the library), and this causes the call to be "
4762 #: ../src/guestfs.pod:2240
4763 msgid "The reply message for ordinary functions is:"
4768 #: ../src/guestfs.pod:2242
4771 " total length (header + ret,\n"
4772 " but not including the length word itself)\n"
4773 " struct guestfs_message_header (encoded as XDR)\n"
4774 " struct guestfs_<foo>_ret (encoded as XDR)\n"
4780 #: ../src/guestfs.pod:2247
4782 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
4783 "functions that return no formal return values."
4788 #: ../src/guestfs.pod:2250
4790 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
4795 #: ../src/guestfs.pod:2253
4797 "In the case of an error, a flag is set in the header, and the reply message "
4798 "is slightly changed:"
4803 #: ../src/guestfs.pod:2256
4806 " total length (header + error,\n"
4807 " but not including the length word itself)\n"
4808 " struct guestfs_message_header (encoded as XDR)\n"
4809 " struct guestfs_message_error (encoded as XDR)\n"
4815 #: ../src/guestfs.pod:2261
4817 "The C<guestfs_message_error> structure contains the error message as a "
4823 #: ../src/guestfs.pod:2264
4824 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
4829 #: ../src/guestfs.pod:2266
4831 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
4832 "The normal request message is sent (see above). However this is followed by "
4833 "a sequence of file chunks."
4838 #: ../src/guestfs.pod:2270
4841 " total length (header + arguments,\n"
4842 " but not including the length word itself,\n"
4843 " and not including the chunks)\n"
4844 " struct guestfs_message_header (encoded as XDR)\n"
4845 " struct guestfs_<foo>_args (encoded as XDR)\n"
4846 " sequence of chunks for FileIn param #0\n"
4847 " sequence of chunks for FileIn param #1 etc.\n"
4853 #: ../src/guestfs.pod:2278
4854 msgid "The \"sequence of chunks\" is:"
4859 #: ../src/guestfs.pod:2280
4862 " length of chunk (not including length word itself)\n"
4863 " struct guestfs_chunk (encoded as XDR)\n"
4864 " length of chunk\n"
4865 " struct guestfs_chunk (encoded as XDR)\n"
4867 " length of chunk\n"
4868 " struct guestfs_chunk (with data.data_len == 0)\n"
4874 #: ../src/guestfs.pod:2288
4876 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
4877 "is set in the final chunk to indicate either successful completion or early "
4883 #: ../src/guestfs.pod:2292
4885 "At time of writing there are no functions that have more than one FileIn "
4886 "parameter. However this is (theoretically) supported, by sending the "
4887 "sequence of chunks for each FileIn parameter one after another (from left to "
4893 #: ../src/guestfs.pod:2297
4895 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
4896 "transfer. The library does this by sending a chunk with a special flag set "
4897 "to indicate cancellation. When the daemon sees this, it cancels the whole "
4898 "RPC, does I<not> send any reply, and goes back to reading the next request."
4903 #: ../src/guestfs.pod:2303
4905 "The daemon may also cancel. It does this by writing a special word "
4906 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
4907 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
4908 "cancel chunk). The special word is chosen so that even if cancellation "
4909 "happens right at the end of the transfer (after the library has finished "
4910 "writing and has started listening for the reply), the \"spurious\" cancel "
4911 "flag will not be confused with the reply message."
4916 #: ../src/guestfs.pod:2312
4918 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
4919 "limit), and also files where the size is not known in advance (eg. from "
4920 "pipes or sockets). However the chunks are rather small "
4921 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
4922 "to keep much in memory."
4927 #: ../src/guestfs.pod:2318
4928 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
4933 #: ../src/guestfs.pod:2320
4935 "The protocol for FileOut parameters is exactly the same as for FileIn "
4936 "parameters, but with the roles of daemon and library reversed."
4941 #: ../src/guestfs.pod:2323
4944 " total length (header + ret,\n"
4945 " but not including the length word itself,\n"
4946 " and not including the chunks)\n"
4947 " struct guestfs_message_header (encoded as XDR)\n"
4948 " struct guestfs_<foo>_ret (encoded as XDR)\n"
4949 " sequence of chunks for FileOut param #0\n"
4950 " sequence of chunks for FileOut param #1 etc.\n"
4956 #: ../src/guestfs.pod:2331
4957 msgid "INITIAL MESSAGE"
4962 #: ../src/guestfs.pod:2333
4964 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
4965 "which indicates that the guest and daemon is alive. This is what L</"
4966 "guestfs_launch> waits for."
4971 #: ../src/guestfs.pod:2337
4972 msgid "PROGRESS NOTIFICATION MESSAGES"
4977 #: ../src/guestfs.pod:2339
4979 "The daemon may send progress notification messages at any time. These are "
4980 "distinguished by the normal length word being replaced by "
4981 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
4985 #: ../src/guestfs.pod:2343
4987 "The library turns them into progress callbacks (see L</"
4988 "GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards them "
4994 #: ../src/guestfs.pod:2347
4996 "The daemon self-limits the frequency of progress messages it sends (see "
4997 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
5003 #: ../src/guestfs.pod:2351
5004 msgid "LIBGUESTFS VERSION NUMBERS"
5009 #: ../src/guestfs.pod:2353
5011 "Since April 2010, libguestfs has started to make separate development and "
5012 "stable releases, along with corresponding branches in our git repository. "
5013 "These separate releases can be identified by version number:"
5018 #: ../src/guestfs.pod:2358
5021 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
5022 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
5028 " | `-------- sub-version\n"
5030 " `------ always '1' because we don't change the ABI\n"
5036 #: ../src/guestfs.pod:2369
5037 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
5042 #: ../src/guestfs.pod:2371
5044 "As time passes we cherry pick fixes from the development branch and backport "
5045 "those into the stable branch, the effect being that the stable branch should "
5046 "get more stable and less buggy over time. So the stable releases are ideal "
5047 "for people who don't need new features but would just like the software to "
5053 #: ../src/guestfs.pod:2377
5054 msgid "Our criteria for backporting changes are:"
5059 #: ../src/guestfs.pod:2383
5061 "Documentation changes which don't affect any code are backported unless the "
5062 "documentation refers to a future feature which is not in stable."
5067 #: ../src/guestfs.pod:2389
5069 "Bug fixes which are not controversial, fix obvious problems, and have been "
5070 "well tested are backported."
5075 #: ../src/guestfs.pod:2394
5077 "Simple rearrangements of code which shouldn't affect how it works get "
5078 "backported. This is so that the code in the two branches doesn't get too "
5079 "far out of step, allowing us to backport future fixes more easily."
5084 #: ../src/guestfs.pod:2400
5086 "We I<don't> backport new features, new APIs, new tools etc, except in one "
5087 "exceptional case: the new feature is required in order to implement an "
5088 "important bug fix."
5093 #: ../src/guestfs.pod:2406
5095 "A new stable branch starts when we think the new features in development are "
5096 "substantial and compelling enough over the current stable branch to warrant "
5097 "it. When that happens we create new stable and development versions 1.N.0 "
5098 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
5099 "stable at this point, but by backporting fixes from development, that branch "
5100 "will stabilize over time."
5104 #: ../src/guestfs.pod:2414
5105 msgid "EXTENDING LIBGUESTFS"
5109 #: ../src/guestfs.pod:2416
5110 msgid "ADDING A NEW API ACTION"
5114 #: ../src/guestfs.pod:2418
5116 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
5117 "documentation) are generated, and this makes it easy to extend the "
5122 #: ../src/guestfs.pod:2422
5123 msgid "To add a new API action there are two changes:"
5127 #: ../src/guestfs.pod:2428
5129 "You need to add a description of the call (name, parameters, return type, "
5130 "tests, documentation) to C<generator/generator_actions.ml>."
5134 #: ../src/guestfs.pod:2431
5136 "There are two sorts of API action, depending on whether the call goes "
5137 "through to the daemon in the appliance, or is serviced entirely by the "
5138 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
5139 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
5140 "an example of the latter, since a trace flag is maintained in the handle and "
5141 "all tracing is done on the library side."
5145 #: ../src/guestfs.pod:2439
5147 "Most new actions are of the first type, and get added to the "
5148 "C<daemon_functions> list. Each function has a unique procedure number used "
5149 "in the RPC protocol which is assigned to that action when we publish "
5150 "libguestfs and cannot be reused. Take the latest procedure number and "
5155 #: ../src/guestfs.pod:2445
5157 "For library-only actions of the second type, add to the "
5158 "C<non_daemon_functions> list. Since these functions are serviced by the "
5159 "library and do not travel over the RPC mechanism to the daemon, these "
5160 "functions do not need a procedure number, and so the procedure number is set "
5165 #: ../src/guestfs.pod:2453
5166 msgid "Implement the action (in C):"
5170 #: ../src/guestfs.pod:2455
5172 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
5173 "C<daemon/> directory."
5177 #: ../src/guestfs.pod:2458
5179 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
5180 "(note: double underscore) in the C<src/> directory."
5184 #: ../src/guestfs.pod:2461
5185 msgid "In either case, use another function as an example of what to do."
5189 #: ../src/guestfs.pod:2465
5190 msgid "After making these changes, use C<make> to compile."
5194 #: ../src/guestfs.pod:2467
5196 "Note that you don't need to implement the RPC, language bindings, manual "
5197 "pages or anything else. It's all automatically generated from the OCaml "
5202 #: ../src/guestfs.pod:2471
5203 msgid "ADDING TESTS FOR AN API ACTION"
5207 #: ../src/guestfs.pod:2473
5209 "You can supply zero or as many tests as you want per API call. The tests "
5210 "can either be added as part of the API description (C<generator/"
5211 "generator_actions.ml>), or in some rarer cases you may want to drop a script "
5212 "into C<regressions/>. Note that adding a script to C<regressions/> is "
5213 "slower, so if possible use the first method."
5217 #: ../src/guestfs.pod:2479
5219 "The following describes the test environment used when you add an API test "
5220 "in C<generator_actions.ml>."
5224 #: ../src/guestfs.pod:2482
5225 msgid "The test environment has 4 block devices:"
5229 #: ../src/guestfs.pod:2486
5230 msgid "C</dev/sda> 500MB"
5234 #: ../src/guestfs.pod:2488
5235 msgid "General block device for testing."
5239 #: ../src/guestfs.pod:2490
5240 msgid "C</dev/sdb> 50MB"
5244 #: ../src/guestfs.pod:2492
5246 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
5251 #: ../src/guestfs.pod:2495
5252 msgid "C</dev/sdc> 10MB"
5256 #: ../src/guestfs.pod:2497
5257 msgid "Used in a few tests where two block devices are needed."
5261 #: ../src/guestfs.pod:2499
5266 #: ../src/guestfs.pod:2501
5267 msgid "ISO with fixed content (see C<images/test.iso>)."
5271 #: ../src/guestfs.pod:2505
5273 "To be able to run the tests in a reasonable amount of time, the libguestfs "
5274 "appliance and block devices are reused between tests. So don't try testing "
5275 "L</guestfs_kill_subprocess> :-x"
5279 #: ../src/guestfs.pod:2509
5281 "Each test starts with an initial scenario, selected using one of the "
5282 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
5283 "initialize the disks mentioned above in a particular way as documented in "
5284 "C<generator_types.ml>. You should not assume anything about the previous "
5285 "contents of other disks that are not initialized."
5289 #: ../src/guestfs.pod:2515
5291 "You can add a prerequisite clause to any individual test. This is a run-"
5292 "time check, which, if it fails, causes the test to be skipped. Useful if "
5293 "testing a command which might not work on all variations of libguestfs "
5294 "builds. A test that has prerequisite of C<Always> means to run "
5299 #: ../src/guestfs.pod:2521
5301 "In addition, packagers can skip individual tests by setting environment "
5302 "variables before running C<make check>."
5306 #: ../src/guestfs.pod:2524
5309 " SKIP_TEST_<CMD>_<NUM>=1\n"
5314 #: ../src/guestfs.pod:2526
5315 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
5319 #: ../src/guestfs.pod:2528
5324 #: ../src/guestfs.pod:2530
5327 " SKIP_TEST_<CMD>=1\n"
5332 #: ../src/guestfs.pod:2532
5333 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
5337 #: ../src/guestfs.pod:2534
5338 msgid "Packagers can run only certain tests by setting for example:"
5342 #: ../src/guestfs.pod:2536
5345 " TEST_ONLY=\"vfs_type zerofree\"\n"
5350 #: ../src/guestfs.pod:2538
5352 "See C<capitests/tests.c> for more details of how these environment variables "
5357 #: ../src/guestfs.pod:2541
5358 msgid "DEBUGGING NEW API ACTIONS"
5362 #: ../src/guestfs.pod:2543
5363 msgid "Test new actions work before submitting them."
5367 #: ../src/guestfs.pod:2545
5368 msgid "You can use guestfish to try out new commands."
5372 #: ../src/guestfs.pod:2547
5374 "Debugging the daemon is a problem because it runs inside a minimal "
5375 "environment. However you can fprintf messages in the daemon to stderr, and "
5376 "they will show up if you use C<guestfish -v>."
5380 #: ../src/guestfs.pod:2551
5381 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
5385 #: ../src/guestfs.pod:2553
5387 "Our C source code generally adheres to some basic code-formatting "
5388 "conventions. The existing code base is not totally consistent on this "
5389 "front, but we do prefer that contributed code be formatted similarly. In "
5390 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
5391 "indentation level, and other than that, follow the K&R style."
5395 #: ../src/guestfs.pod:2559
5397 "If you use Emacs, add the following to one of one of your start-up files (e."
5398 "g., ~/.emacs), to help ensure that you get indentation right:"
5402 #: ../src/guestfs.pod:2562
5405 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
5406 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
5407 " (add-hook 'find-file-hook\n"
5408 " '(lambda () (if (and buffer-file-name\n"
5409 " (string-match \"/libguestfs\\\\>\"\n"
5410 " (buffer-file-name))\n"
5411 " (not (string-equal mode-name \"Change Log\"))\n"
5412 " (not (string-equal mode-name \"Makefile\")))\n"
5413 " (setq indent-tabs-mode nil))))\n"
5418 #: ../src/guestfs.pod:2572
5421 " ;;; When editing C sources in libguestfs, use this style.\n"
5422 " (defun libguestfs-c-mode ()\n"
5423 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
5425 " (c-set-style \"K&R\")\n"
5426 " (setq c-indent-level 2)\n"
5427 " (setq c-basic-offset 2))\n"
5428 " (add-hook 'c-mode-hook\n"
5429 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
5430 " (buffer-file-name))\n"
5431 " (libguestfs-c-mode))))\n"
5436 #: ../src/guestfs.pod:2584
5437 msgid "Enable warnings when compiling (and fix any problems this finds):"
5441 #: ../src/guestfs.pod:2587
5444 " ./configure --enable-gcc-warnings\n"
5449 #: ../src/guestfs.pod:2589
5450 msgid "Useful targets are:"
5454 #: ../src/guestfs.pod:2591
5457 " make syntax-check # checks the syntax of the C code\n"
5458 " make check # runs the test suite\n"
5463 #: ../src/guestfs.pod:2594
5464 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
5468 #: ../src/guestfs.pod:2596
5470 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
5471 "which are used to do shell quoting."
5475 #: ../src/guestfs.pod:2601
5480 #: ../src/guestfs.pod:2603
5482 "Simple shell quoted string. Any spaces or other shell characters are "
5487 #: ../src/guestfs.pod:2606
5492 #: ../src/guestfs.pod:2608
5494 "Same as C<%Q> except the string is treated as a path which is prefixed by "
5500 #: ../src/guestfs.pod:2613 ../fish/guestfish.pod:242 ../fish/guestfish.pod:615
5501 msgid "For example:"
5505 #: ../src/guestfs.pod:2615
5508 " asprintf (&cmd, \"cat %R\", path);\n"
5513 #: ../src/guestfs.pod:2617
5514 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
5518 #: ../src/guestfs.pod:2619
5520 "I<Note:> Do I<not> use these when you are passing parameters to the C<command"
5521 "{,r,v,rv}()> functions. These parameters do NOT need to be quoted because "
5522 "they are not passed via the shell (instead, straight to exec). You probably "
5523 "want to use the C<sysroot_path()> function however."
5527 #: ../src/guestfs.pod:2625
5528 msgid "SUBMITTING YOUR NEW API ACTIONS"
5532 #: ../src/guestfs.pod:2627
5534 "Submit patches to the mailing list: L<http://www.redhat.com/mailman/listinfo/"
5535 "libguestfs> and CC to L<rjones@redhat.com>."
5539 #: ../src/guestfs.pod:2631
5540 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
5544 #: ../src/guestfs.pod:2633
5545 msgid "We support i18n (gettext anyhow) in the library."
5549 #: ../src/guestfs.pod:2635
5551 "However many messages come from the daemon, and we don't translate those at "
5552 "the moment. One reason is that the appliance generally has all locale files "
5553 "removed from it, because they take up a lot of space. So we'd have to readd "
5554 "some of those, as well as copying our PO files into the appliance."
5558 #: ../src/guestfs.pod:2641
5560 "Debugging messages are never translated, since they are intended for the "
5565 #: ../src/guestfs.pod:2644
5566 msgid "SOURCE CODE SUBDIRECTORIES"
5570 #: ../src/guestfs.pod:2648 ../src/guestfs-actions.pod:5847
5571 #: ../fish/guestfish-actions.pod:3932
5572 msgid "C<appliance>"
5576 #: ../src/guestfs.pod:2650
5577 msgid "The libguestfs appliance, build scripts and so on."
5581 #: ../src/guestfs.pod:2652
5582 msgid "C<capitests>"
5586 #: ../src/guestfs.pod:2654
5587 msgid "Automated tests of the C API."
5591 #: ../src/guestfs.pod:2656
5596 #: ../src/guestfs.pod:2658
5598 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
5603 #: ../src/guestfs.pod:2661
5608 #: ../src/guestfs.pod:2663
5609 msgid "Outside contributions, experimental parts."
5613 #: ../src/guestfs.pod:2665
5618 #: ../src/guestfs.pod:2667
5620 "The daemon that runs inside the libguestfs appliance and carries out actions."
5624 #: ../src/guestfs.pod:2670
5629 #: ../src/guestfs.pod:2672
5630 msgid "L<virt-df(1)> command and documentation."
5634 #: ../src/guestfs.pod:2674
5639 #: ../src/guestfs.pod:2676
5640 msgid "L<virt-edit(1)> command and documentation."
5644 #: ../src/guestfs.pod:2678
5649 #: ../src/guestfs.pod:2680
5650 msgid "C API example code."
5654 #: ../src/guestfs.pod:2682
5659 #: ../src/guestfs.pod:2684
5661 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
5662 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
5663 "L<virt-tar-out(1)>."
5667 #: ../src/guestfs.pod:2688
5672 #: ../src/guestfs.pod:2690
5674 "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
5678 #: ../src/guestfs.pod:2692
5679 msgid "C<generator>"
5683 #: ../src/guestfs.pod:2694
5685 "The crucially important generator, used to automatically generate large "
5686 "amounts of boilerplate C code for things like RPC and bindings."
5690 #: ../src/guestfs.pod:2697
5695 #: ../src/guestfs.pod:2699
5696 msgid "Files used by the test suite."
5700 #: ../src/guestfs.pod:2701
5701 msgid "Some \"phony\" guest images which we test against."
5705 #: ../src/guestfs.pod:2703
5706 msgid "C<inspector>"
5710 #: ../src/guestfs.pod:2705
5711 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
5715 #: ../src/guestfs.pod:2707
5720 #: ../src/guestfs.pod:2709
5721 msgid "Logo used on the website. The fish is called Arthur by the way."
5725 #: ../src/guestfs.pod:2711
5730 #: ../src/guestfs.pod:2713
5731 msgid "M4 macros used by autoconf."
5735 #: ../src/guestfs.pod:2715
5740 #: ../src/guestfs.pod:2717
5741 msgid "Translations of simple gettext strings."
5745 #: ../src/guestfs.pod:2719
5750 #: ../src/guestfs.pod:2721
5752 "The build infrastructure and PO files for translations of manpages and POD "
5753 "files. Eventually this will be combined with the C<po> directory, but that "
5754 "is rather complicated."
5758 #: ../src/guestfs.pod:2725
5759 msgid "C<regressions>"
5763 #: ../src/guestfs.pod:2727
5764 msgid "Regression tests."
5768 #: ../src/guestfs.pod:2729
5773 #: ../src/guestfs.pod:2731
5774 msgid "L<virt-rescue(1)> command and documentation."
5778 #: ../src/guestfs.pod:2733
5783 #: ../src/guestfs.pod:2735
5784 msgid "Source code to the C library."
5788 #: ../src/guestfs.pod:2737
5793 #: ../src/guestfs.pod:2739
5794 msgid "Command line tools written in Perl (L<virt-resize(1)> and many others)."
5798 #: ../src/guestfs.pod:2741
5799 msgid "C<test-tool>"
5803 #: ../src/guestfs.pod:2743
5805 "Test tool for end users to test if their qemu/kernel combination will work "
5810 #: ../src/guestfs.pod:2746
5815 #: ../src/guestfs.pod:2748
5820 #: ../src/guestfs.pod:2750
5825 #: ../src/guestfs.pod:2752
5830 #: ../src/guestfs.pod:2754
5835 #: ../src/guestfs.pod:2756
5840 #: ../src/guestfs.pod:2758
5845 #: ../src/guestfs.pod:2760
5850 #: ../src/guestfs.pod:2762
5851 msgid "Language bindings."
5855 #: ../src/guestfs.pod:2766
5861 #: ../src/guestfs.pod:2768
5862 msgid "PROTOCOL LIMITS"
5867 #: ../src/guestfs.pod:2770
5869 "Internally libguestfs uses a message-based protocol to pass API calls and "
5870 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
5871 "plenty more detail about this). The maximum message size used by the "
5872 "protocol is slightly less than 4 MB. For some API calls you may need to be "
5873 "aware of this limit. The API calls which may be affected are individually "
5874 "documented, with a link back to this section of the documentation."
5879 #: ../src/guestfs.pod:2778
5881 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
5882 "a simple string. Because this string is at some point internally encoded as "
5883 "a message, the maximum size that it can return is slightly under 4 MB. If "
5884 "the requested file is larger than this then you will get an error."
5889 #: ../src/guestfs.pod:2784
5891 "In order to transfer large files into and out of the guest filesystem, you "
5892 "need to use particular calls that support this. The sections L</UPLOADING> "
5893 "and L</DOWNLOADING> document how to do this."
5898 #: ../src/guestfs.pod:2788
5900 "You might also consider mounting the disk image using our FUSE filesystem "
5901 "support (L<guestmount(1)>)."
5905 #: ../src/guestfs.pod:2791
5906 msgid "MAXIMUM NUMBER OF DISKS"
5910 #: ../src/guestfs.pod:2793
5911 msgid "When using virtio disks (the default) the current limit is B<25> disks."
5915 #: ../src/guestfs.pod:2796
5917 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
5918 "slots. However febootstrap only understands disks with names C</dev/vda> "
5919 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
5924 #: ../src/guestfs.pod:2801
5926 "We are working to substantially raise this limit in future versions but it "
5927 "requires complex changes to qemu."
5931 #: ../src/guestfs.pod:2804
5933 "In future versions of libguestfs it should also be possible to \"hot plug\" "
5934 "disks (add and remove disks after calling L</guestfs_launch>). This also "
5935 "requires changes to qemu."
5939 #: ../src/guestfs.pod:2808
5940 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
5944 #: ../src/guestfs.pod:2810
5945 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
5949 #: ../src/guestfs.pod:2812
5951 "This is because it reserves 4 bits for the minor device number (thus C</dev/"
5952 "vda>, and C</dev/vda1> through C</dev/vda15>)."
5956 #: ../src/guestfs.pod:2815
5958 "If you attach a disk with more than 15 partitions, the extra partitions are "
5959 "ignored by libguestfs."
5963 #: ../src/guestfs.pod:2818
5964 msgid "MAXIMUM SIZE OF A DISK"
5968 #: ../src/guestfs.pod:2820
5969 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
5973 #: ../src/guestfs.pod:2822
5975 "We have tested block devices up to 1 exabyte (2**60 or "
5976 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
5981 #: ../src/guestfs.pod:2826
5983 "Although libguestfs probably does not impose any limit, the underlying host "
5984 "storage will. If you store disk images on a host ext4 filesystem, then the "
5985 "maximum size will be limited by the maximum ext4 file size (currently 16 "
5986 "TB). If you store disk images as host logical volumes then you are limited "
5987 "by the maximum size of an LV."
5991 #: ../src/guestfs.pod:2832
5993 "For the hugest disk image files, we recommend using XFS on the host for "
5998 #: ../src/guestfs.pod:2835
5999 msgid "MAXIMUM SIZE OF A PARTITION"
6003 #: ../src/guestfs.pod:2837
6005 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
6006 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
6007 "address a partition located beyond 2 TB on the disk."
6011 #: ../src/guestfs.pod:2841
6013 "It is recommended that you use GPT partitions on disks which are larger than "
6014 "this size. GPT uses 64 bit sector numbers and so can address partitions "
6015 "which are theoretically larger than the largest disk we could support."
6019 #: ../src/guestfs.pod:2846
6020 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
6024 #: ../src/guestfs.pod:2848
6026 "This depends on the filesystem type. libguestfs itself does not impose any "
6027 "known limit. Consult Wikipedia or the filesystem documentation to find out "
6028 "what these limits are."
6032 #: ../src/guestfs.pod:2852
6033 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
6037 #: ../src/guestfs.pod:2854
6039 "The API functions L</guestfs_upload>, L</guestfs_download>, L</"
6040 "guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
6041 "uploads and downloads."
6045 #: ../src/guestfs.pod:2858
6046 msgid "INSPECTION LIMITS"
6050 #: ../src/guestfs.pod:2860
6052 "The inspection code has several arbitrary limits on things like the size of "
6053 "Windows Registry hive it will read, and the length of product name. These "
6054 "are intended to stop a malicious guest from consuming arbitrary amounts of "
6055 "memory and disk space on the host, and should not be reached in practice. "
6056 "See the source code for more information."
6061 #: ../src/guestfs.pod:2866 ../fish/guestfish.pod:1017
6062 #: ../test-tool/libguestfs-test-tool.pod:82
6063 msgid "ENVIRONMENT VARIABLES"
6068 #: ../src/guestfs.pod:2870 ../fish/guestfish.pod:1043
6069 msgid "LIBGUESTFS_APPEND"
6074 #: ../src/guestfs.pod:2872 ../fish/guestfish.pod:1045
6075 msgid "Pass additional options to the guest kernel."
6080 #: ../src/guestfs.pod:2874 ../fish/guestfish.pod:1047
6081 msgid "LIBGUESTFS_DEBUG"
6086 #: ../src/guestfs.pod:2876
6088 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
6089 "effect as calling C<guestfs_set_verbose (g, 1)>."
6094 #: ../src/guestfs.pod:2879 ../fish/guestfish.pod:1052
6095 msgid "LIBGUESTFS_MEMSIZE"
6100 #: ../src/guestfs.pod:2881 ../fish/guestfish.pod:1054
6102 "Set the memory allocated to the qemu process, in megabytes. For example:"
6107 #: ../src/guestfs.pod:2884 ../fish/guestfish.pod:1057
6110 " LIBGUESTFS_MEMSIZE=700\n"
6116 #: ../src/guestfs.pod:2886 ../fish/guestfish.pod:1059
6117 msgid "LIBGUESTFS_PATH"
6121 #: ../src/guestfs.pod:2888
6123 "Set the path that libguestfs uses to search for a supermin appliance. See "
6124 "the discussion of paths in section L</PATH> above."
6129 #: ../src/guestfs.pod:2891 ../fish/guestfish.pod:1064
6130 msgid "LIBGUESTFS_QEMU"
6135 #: ../src/guestfs.pod:2893 ../fish/guestfish.pod:1066
6137 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
6138 "which was found at compile time by the configure script is used."
6143 #: ../src/guestfs.pod:2897
6144 msgid "See also L</QEMU WRAPPERS> above."
6149 #: ../src/guestfs.pod:2899 ../fish/guestfish.pod:1070
6150 msgid "LIBGUESTFS_TRACE"
6155 #: ../src/guestfs.pod:2901
6157 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
6158 "effect as calling C<guestfs_set_trace (g, 1)>."
6163 #: ../src/guestfs.pod:2904 ../fish/guestfish.pod:1079
6168 #: ../src/guestfs.pod:2906 ../fish/guestfish.pod:1081
6170 "Location of temporary directory, defaults to C</tmp> except for the cached "
6171 "supermin appliance which defaults to C</var/tmp>."
6175 #: ../src/guestfs.pod:2909 ../fish/guestfish.pod:1084
6177 "If libguestfs was compiled to use the supermin appliance then the real "
6178 "appliance is cached in this directory, shared between all handles belonging "
6179 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
6180 "use in case C</var/tmp> is not large enough."
6185 #: ../src/guestfs.pod:2917 ../fish/guestfish.pod:1151
6186 #: ../test-tool/libguestfs-test-tool.pod:87 ../fuse/guestmount.pod:279
6187 #: ../tools/virt-win-reg.pl:744 ../tools/virt-list-filesystems.pl:189
6188 #: ../tools/virt-tar.pl:286 ../tools/virt-make-fs.pl:539
6189 #: ../tools/virt-list-partitions.pl:257
6194 #: ../src/guestfs.pod:2919
6196 "L<guestfs-examples(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, L<guestfs-"
6197 "ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-copy-in"
6198 "(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems"
6199 "(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-"
6200 "partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-"
6201 "tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<qemu(1)"
6202 ">, L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
6207 #: ../src/guestfs.pod:2946
6209 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
6210 "(8)>, L<disktype(1)>."
6215 #: ../src/guestfs.pod:2953 ../tools/virt-win-reg.pl:759
6216 #: ../tools/virt-make-fs.pl:553
6222 #: ../src/guestfs.pod:2955
6223 msgid "To get a list of bugs against libguestfs use this link:"
6228 #: ../src/guestfs.pod:2957
6230 "L<https://bugzilla.redhat.com/buglist.cgi?"
6231 "component=libguestfs&product=Virtualization+Tools>"
6236 #: ../src/guestfs.pod:2959
6237 msgid "To report a new bug against libguestfs use this link:"
6242 #: ../src/guestfs.pod:2961
6244 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
6245 "component=libguestfs&product=Virtualization+Tools>"
6250 #: ../src/guestfs.pod:2963
6251 msgid "When reporting a bug, please check:"
6256 #: ../src/guestfs.pod:2969
6257 msgid "That the bug hasn't been reported already."
6262 #: ../src/guestfs.pod:2973
6263 msgid "That you are testing a recent version."
6268 #: ../src/guestfs.pod:2977
6269 msgid "Describe the bug accurately, and give a way to reproduce it."
6274 #: ../src/guestfs.pod:2981
6276 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
6282 #: ../src/guestfs.pod:2986 ../fish/guestfish.pod:1174
6283 #: ../test-tool/libguestfs-test-tool.pod:93 ../fuse/guestmount.pod:290
6289 #: ../src/guestfs.pod:2988 ../fish/guestfish.pod:1176
6290 #: ../test-tool/libguestfs-test-tool.pod:95 ../fuse/guestmount.pod:292
6291 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
6296 #: ../src/guestfs.pod:2990 ../fish/guestfish.pod:1178
6297 #: ../test-tool/libguestfs-test-tool.pod:97 ../fuse/guestmount.pod:294
6298 #: ../tools/virt-win-reg.pl:774 ../tools/virt-list-filesystems.pl:206
6299 #: ../tools/virt-tar.pl:305 ../tools/virt-make-fs.pl:568
6300 #: ../tools/virt-list-partitions.pl:273
6305 #: ../src/guestfs.pod:2992 ../fish/guestfish.pod:1180
6306 #: ../test-tool/libguestfs-test-tool.pod:99
6307 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
6312 #: ../src/guestfs.pod:2995
6314 "This library is free software; you can redistribute it and/or modify it "
6315 "under the terms of the GNU Lesser General Public License as published by the "
6316 "Free Software Foundation; either version 2 of the License, or (at your "
6317 "option) any later version."
6322 #: ../src/guestfs.pod:3000
6324 "This library is distributed in the hope that it will be useful, but WITHOUT "
6325 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
6326 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
6332 #: ../src/guestfs.pod:3005
6334 "You should have received a copy of the GNU Lesser General Public License "
6335 "along with this library; if not, write to the Free Software Foundation, "
6336 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
6341 #: ../src/guestfs-actions.pod:1
6342 msgid "guestfs_add_cdrom"
6347 #: ../src/guestfs-actions.pod:3
6351 " guestfs_add_cdrom (guestfs_h *g,\n"
6352 " const char *filename);\n"
6358 #: ../src/guestfs-actions.pod:7 ../fish/guestfish-actions.pod:5
6359 msgid "This function adds a virtual CD-ROM disk image to the guest."
6363 #: ../src/guestfs-actions.pod:9 ../fish/guestfish-actions.pod:7
6364 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
6369 #: ../src/guestfs-actions.pod:17
6371 "This call checks for the existence of C<filename>. This stops you from "
6372 "specifying other types of drive which are supported by qemu such as C<nbd:> "
6373 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
6379 #: ../src/guestfs-actions.pod:24
6381 "If you just want to add an ISO file (often you use this as an efficient way "
6382 "to transfer large files into the guest), then you should probably use "
6383 "C<guestfs_add_drive_ro> instead."
6388 #: ../src/guestfs-actions.pod:30 ../src/guestfs-actions.pod:140
6389 #: ../src/guestfs-actions.pod:201 ../src/guestfs-actions.pod:238
6390 #: ../src/guestfs-actions.pod:252 ../src/guestfs-actions.pod:273
6391 #: ../src/guestfs-actions.pod:293 ../src/guestfs-actions.pod:307
6392 #: ../src/guestfs-actions.pod:422 ../src/guestfs-actions.pod:442
6393 #: ../src/guestfs-actions.pod:456 ../src/guestfs-actions.pod:501
6394 #: ../src/guestfs-actions.pod:529 ../src/guestfs-actions.pod:547
6395 #: ../src/guestfs-actions.pod:614 ../src/guestfs-actions.pod:647
6396 #: ../src/guestfs-actions.pod:661 ../src/guestfs-actions.pod:676
6397 #: ../src/guestfs-actions.pod:775 ../src/guestfs-actions.pod:793
6398 #: ../src/guestfs-actions.pod:807 ../src/guestfs-actions.pod:821
6399 #: ../src/guestfs-actions.pod:982 ../src/guestfs-actions.pod:1002
6400 #: ../src/guestfs-actions.pod:1020 ../src/guestfs-actions.pod:1104
6401 #: ../src/guestfs-actions.pod:1122 ../src/guestfs-actions.pod:1141
6402 #: ../src/guestfs-actions.pod:1155 ../src/guestfs-actions.pod:1175
6403 #: ../src/guestfs-actions.pod:1245 ../src/guestfs-actions.pod:1276
6404 #: ../src/guestfs-actions.pod:1301 ../src/guestfs-actions.pod:1343
6405 #: ../src/guestfs-actions.pod:1449 ../src/guestfs-actions.pod:1483
6406 #: ../src/guestfs-actions.pod:1698 ../src/guestfs-actions.pod:1720
6407 #: ../src/guestfs-actions.pod:1807 ../src/guestfs-actions.pod:2269
6408 #: ../src/guestfs-actions.pod:2413 ../src/guestfs-actions.pod:2474
6409 #: ../src/guestfs-actions.pod:2509 ../src/guestfs-actions.pod:3485
6410 #: ../src/guestfs-actions.pod:3500 ../src/guestfs-actions.pod:3525
6411 #: ../src/guestfs-actions.pod:3680 ../src/guestfs-actions.pod:3694
6412 #: ../src/guestfs-actions.pod:3707 ../src/guestfs-actions.pod:3721
6413 #: ../src/guestfs-actions.pod:3736 ../src/guestfs-actions.pod:3772
6414 #: ../src/guestfs-actions.pod:3844 ../src/guestfs-actions.pod:3864
6415 #: ../src/guestfs-actions.pod:3881 ../src/guestfs-actions.pod:3904
6416 #: ../src/guestfs-actions.pod:3927 ../src/guestfs-actions.pod:3959
6417 #: ../src/guestfs-actions.pod:3978 ../src/guestfs-actions.pod:3997
6418 #: ../src/guestfs-actions.pod:4032 ../src/guestfs-actions.pod:4044
6419 #: ../src/guestfs-actions.pod:4080 ../src/guestfs-actions.pod:4096
6420 #: ../src/guestfs-actions.pod:4109 ../src/guestfs-actions.pod:4124
6421 #: ../src/guestfs-actions.pod:4141 ../src/guestfs-actions.pod:4234
6422 #: ../src/guestfs-actions.pod:4254 ../src/guestfs-actions.pod:4267
6423 #: ../src/guestfs-actions.pod:4318 ../src/guestfs-actions.pod:4336
6424 #: ../src/guestfs-actions.pod:4354 ../src/guestfs-actions.pod:4370
6425 #: ../src/guestfs-actions.pod:4384 ../src/guestfs-actions.pod:4398
6426 #: ../src/guestfs-actions.pod:4415 ../src/guestfs-actions.pod:4430
6427 #: ../src/guestfs-actions.pod:4450 ../src/guestfs-actions.pod:4508
6428 #: ../src/guestfs-actions.pod:4581 ../src/guestfs-actions.pod:4612
6429 #: ../src/guestfs-actions.pod:4631 ../src/guestfs-actions.pod:4650
6430 #: ../src/guestfs-actions.pod:4662 ../src/guestfs-actions.pod:4679
6431 #: ../src/guestfs-actions.pod:4692 ../src/guestfs-actions.pod:4707
6432 #: ../src/guestfs-actions.pod:4722 ../src/guestfs-actions.pod:4757
6433 #: ../src/guestfs-actions.pod:4779 ../src/guestfs-actions.pod:4799
6434 #: ../src/guestfs-actions.pod:4813 ../src/guestfs-actions.pod:4830
6435 #: ../src/guestfs-actions.pod:4879 ../src/guestfs-actions.pod:4916
6436 #: ../src/guestfs-actions.pod:4930 ../src/guestfs-actions.pod:4958
6437 #: ../src/guestfs-actions.pod:4975 ../src/guestfs-actions.pod:4993
6438 #: ../src/guestfs-actions.pod:5127 ../src/guestfs-actions.pod:5184
6439 #: ../src/guestfs-actions.pod:5206 ../src/guestfs-actions.pod:5224
6440 #: ../src/guestfs-actions.pod:5256 ../src/guestfs-actions.pod:5322
6441 #: ../src/guestfs-actions.pod:5339 ../src/guestfs-actions.pod:5352
6442 #: ../src/guestfs-actions.pod:5366 ../src/guestfs-actions.pod:5655
6443 #: ../src/guestfs-actions.pod:5674 ../src/guestfs-actions.pod:5693
6444 #: ../src/guestfs-actions.pod:5705 ../src/guestfs-actions.pod:5717
6445 #: ../src/guestfs-actions.pod:5731 ../src/guestfs-actions.pod:5743
6446 #: ../src/guestfs-actions.pod:5757 ../src/guestfs-actions.pod:5773
6447 #: ../src/guestfs-actions.pod:5794 ../src/guestfs-actions.pod:5813
6448 #: ../src/guestfs-actions.pod:5832 ../src/guestfs-actions.pod:5862
6449 #: ../src/guestfs-actions.pod:5878 ../src/guestfs-actions.pod:5901
6450 #: ../src/guestfs-actions.pod:5919 ../src/guestfs-actions.pod:5938
6451 #: ../src/guestfs-actions.pod:5959 ../src/guestfs-actions.pod:5978
6452 #: ../src/guestfs-actions.pod:5995 ../src/guestfs-actions.pod:6023
6453 #: ../src/guestfs-actions.pod:6047 ../src/guestfs-actions.pod:6066
6454 #: ../src/guestfs-actions.pod:6090 ../src/guestfs-actions.pod:6109
6455 #: ../src/guestfs-actions.pod:6124 ../src/guestfs-actions.pod:6143
6456 #: ../src/guestfs-actions.pod:6180 ../src/guestfs-actions.pod:6210
6457 #: ../src/guestfs-actions.pod:6243 ../src/guestfs-actions.pod:6365
6458 #: ../src/guestfs-actions.pod:6486 ../src/guestfs-actions.pod:6498
6459 #: ../src/guestfs-actions.pod:6511 ../src/guestfs-actions.pod:6524
6460 #: ../src/guestfs-actions.pod:6546 ../src/guestfs-actions.pod:6559
6461 #: ../src/guestfs-actions.pod:6572 ../src/guestfs-actions.pod:6585
6462 #: ../src/guestfs-actions.pod:6600 ../src/guestfs-actions.pod:6659
6463 #: ../src/guestfs-actions.pod:6676 ../src/guestfs-actions.pod:6692
6464 #: ../src/guestfs-actions.pod:6708 ../src/guestfs-actions.pod:6725
6465 #: ../src/guestfs-actions.pod:6738 ../src/guestfs-actions.pod:6758
6466 #: ../src/guestfs-actions.pod:6794 ../src/guestfs-actions.pod:6808
6467 #: ../src/guestfs-actions.pod:6849 ../src/guestfs-actions.pod:6862
6468 #: ../src/guestfs-actions.pod:6880 ../src/guestfs-actions.pod:6914
6469 #: ../src/guestfs-actions.pod:6950 ../src/guestfs-actions.pod:7069
6470 #: ../src/guestfs-actions.pod:7087 ../src/guestfs-actions.pod:7101
6471 #: ../src/guestfs-actions.pod:7156 ../src/guestfs-actions.pod:7169
6472 #: ../src/guestfs-actions.pod:7214 ../src/guestfs-actions.pod:7247
6473 #: ../src/guestfs-actions.pod:7308 ../src/guestfs-actions.pod:7334
6474 #: ../src/guestfs-actions.pod:7401 ../src/guestfs-actions.pod:7420
6475 #: ../src/guestfs-actions.pod:7449
6476 msgid "This function returns 0 on success or -1 on error."
6481 #: ../src/guestfs-actions.pod:32 ../src/guestfs-actions.pod:254
6482 #: ../src/guestfs-actions.pod:275 ../fish/guestfish-actions.pod:28
6483 #: ../fish/guestfish-actions.pod:163 ../fish/guestfish-actions.pod:177
6485 "This function is deprecated. In new code, use the C<add_drive_opts> call "
6491 #: ../src/guestfs-actions.pod:35 ../src/guestfs-actions.pod:257
6492 #: ../src/guestfs-actions.pod:278 ../src/guestfs-actions.pod:1454
6493 #: ../src/guestfs-actions.pod:1947 ../src/guestfs-actions.pod:1968
6494 #: ../src/guestfs-actions.pod:4455 ../src/guestfs-actions.pod:4762
6495 #: ../src/guestfs-actions.pod:6188 ../src/guestfs-actions.pod:6218
6496 #: ../src/guestfs-actions.pod:6251 ../src/guestfs-actions.pod:6310
6497 #: ../src/guestfs-actions.pod:7252 ../src/guestfs-actions.pod:7342
6498 #: ../src/guestfs-actions.pod:7512 ../fish/guestfish-actions.pod:31
6499 #: ../fish/guestfish-actions.pod:166 ../fish/guestfish-actions.pod:180
6500 #: ../fish/guestfish-actions.pod:961 ../fish/guestfish-actions.pod:1321
6501 #: ../fish/guestfish-actions.pod:1335 ../fish/guestfish-actions.pod:3025
6502 #: ../fish/guestfish-actions.pod:3222 ../fish/guestfish-actions.pod:4194
6503 #: ../fish/guestfish-actions.pod:4217 ../fish/guestfish-actions.pod:4239
6504 #: ../fish/guestfish-actions.pod:4277 ../fish/guestfish-actions.pod:4918
6505 #: ../fish/guestfish-actions.pod:5016
6507 "Deprecated functions will not be removed from the API, but the fact that "
6508 "they are deprecated indicates that there are problems with correct use of "
6514 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:142
6515 #: ../src/guestfs-actions.pod:1106 ../src/guestfs-actions.pod:1919
6516 #: ../src/guestfs-actions.pod:2017 ../src/guestfs-actions.pod:2120
6517 #: ../src/guestfs-actions.pod:3487 ../src/guestfs-actions.pod:3507
6518 #: ../src/guestfs-actions.pod:4766 ../src/guestfs-actions.pod:5880
6519 #: ../src/guestfs-actions.pod:5997 ../src/guestfs-actions.pod:6111
6520 #: ../src/guestfs-actions.pod:6602 ../src/guestfs-actions.pod:6727
6521 #: ../src/guestfs-actions.pod:7256
6522 msgid "(Added in 0.3)"
6527 #: ../src/guestfs-actions.pod:41
6528 msgid "guestfs_add_domain"
6533 #: ../src/guestfs-actions.pod:43
6537 " guestfs_add_domain (guestfs_h *g,\n"
6538 " const char *dom,\n"
6545 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:151
6546 #: ../src/guestfs-actions.pod:4469
6548 "You may supply a list of optional arguments to this call. Use zero or more "
6549 "of the following pairs of parameters, and terminate the list with C<-1> on "
6550 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
6554 #: ../src/guestfs-actions.pod:53
6557 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
6558 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
6559 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
6560 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
6561 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
6567 #: ../src/guestfs-actions.pod:59
6569 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
6570 "It works by connecting to libvirt, requesting the domain and domain XML from "
6571 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
6577 #: ../src/guestfs-actions.pod:64 ../fish/guestfish-actions.pod:46
6579 "The number of disks added is returned. This operation is atomic: if an "
6580 "error is returned, then no disks are added."
6585 #: ../src/guestfs-actions.pod:67 ../fish/guestfish-actions.pod:49
6587 "This function does some minimal checks to make sure the libvirt domain is "
6588 "not running (unless C<readonly> is true). In a future version we will try "
6589 "to acquire the libvirt lock on each disk."
6594 #: ../src/guestfs-actions.pod:71 ../fish/guestfish-actions.pod:53
6596 "Disks must be accessible locally. This often means that adding disks from a "
6597 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
6598 "unless those disks are accessible via the same device path locally too."
6602 #: ../src/guestfs-actions.pod:76 ../fish/guestfish-actions.pod:58
6604 "The optional C<libvirturi> parameter sets the libvirt URI (see L<http://"
6605 "libvirt.org/uri.html>). If this is not set then we connect to the default "
6606 "libvirt URI (or one set through an environment variable, see the libvirt "
6607 "documentation for full details)."
6611 #: ../src/guestfs-actions.pod:82 ../fish/guestfish-actions.pod:64
6613 "The optional C<live> flag controls whether this call will try to connect to "
6614 "a running virtual machine C<guestfsd> process if it sees a suitable "
6615 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
6616 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
6617 "DAEMONS> for more information."
6621 #: ../src/guestfs-actions.pod:89 ../fish/guestfish-actions.pod:71
6623 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
6624 "passed instead of the domain name. The C<dom> string is treated as a UUID "
6625 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
6631 #: ../src/guestfs-actions.pod:94
6633 "The other optional parameters are passed directly through to "
6634 "C<guestfs_add_drive_opts>."
6639 #: ../src/guestfs-actions.pod:97 ../src/guestfs-actions.pod:350
6640 #: ../src/guestfs-actions.pod:515 ../src/guestfs-actions.pod:693
6641 #: ../src/guestfs-actions.pod:724 ../src/guestfs-actions.pod:742
6642 #: ../src/guestfs-actions.pod:761 ../src/guestfs-actions.pod:1321
6643 #: ../src/guestfs-actions.pod:1677 ../src/guestfs-actions.pod:1880
6644 #: ../src/guestfs-actions.pod:1989 ../src/guestfs-actions.pod:2029
6645 #: ../src/guestfs-actions.pod:2084 ../src/guestfs-actions.pod:2107
6646 #: ../src/guestfs-actions.pod:2400 ../src/guestfs-actions.pod:2783
6647 #: ../src/guestfs-actions.pod:2804 ../src/guestfs-actions.pod:4902
6648 #: ../src/guestfs-actions.pod:5030 ../src/guestfs-actions.pod:5436
6649 #: ../src/guestfs-actions.pod:5462 ../src/guestfs-actions.pod:6835
6650 #: ../src/guestfs-actions.pod:7267 ../src/guestfs-actions.pod:7280
6651 #: ../src/guestfs-actions.pod:7293
6652 msgid "On error this function returns -1."
6657 #: ../src/guestfs-actions.pod:99
6658 msgid "(Added in 1.7.4)"
6663 #: ../src/guestfs-actions.pod:101
6664 msgid "guestfs_add_domain_va"
6669 #: ../src/guestfs-actions.pod:103
6673 " guestfs_add_domain_va (guestfs_h *g,\n"
6674 " const char *dom,\n"
6681 #: ../src/guestfs-actions.pod:108
6682 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
6687 #: ../src/guestfs-actions.pod:110 ../src/guestfs-actions.pod:121
6688 #: ../src/guestfs-actions.pod:214 ../src/guestfs-actions.pod:225
6689 #: ../src/guestfs-actions.pod:4522 ../src/guestfs-actions.pod:4534
6690 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
6695 #: ../src/guestfs-actions.pod:112
6696 msgid "guestfs_add_domain_argv"
6701 #: ../src/guestfs-actions.pod:114
6705 " guestfs_add_domain_argv (guestfs_h *g,\n"
6706 " const char *dom,\n"
6707 " const struct guestfs_add_domain_argv *optargs);\n"
6713 #: ../src/guestfs-actions.pod:119
6714 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
6719 #: ../src/guestfs-actions.pod:123
6720 msgid "guestfs_add_drive"
6725 #: ../src/guestfs-actions.pod:125
6729 " guestfs_add_drive (guestfs_h *g,\n"
6730 " const char *filename);\n"
6736 #: ../src/guestfs-actions.pod:129
6738 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
6739 "optional parameters, so the disk is added writable, with the format being "
6740 "detected automatically."
6745 #: ../src/guestfs-actions.pod:133
6747 "Automatic detection of the format opens you up to a potential security hole "
6748 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6749 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
6750 "you should think about replacing calls to this function with calls to "
6751 "C<guestfs_add_drive_opts>, and specifying the format."
6756 #: ../src/guestfs-actions.pod:144
6757 msgid "guestfs_add_drive_opts"
6762 #: ../src/guestfs-actions.pod:146
6766 " guestfs_add_drive_opts (guestfs_h *g,\n"
6767 " const char *filename,\n"
6774 #: ../src/guestfs-actions.pod:156
6777 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
6778 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
6779 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
6785 #: ../src/guestfs-actions.pod:160 ../fish/guestfish-actions.pod:102
6787 "This function adds a virtual machine disk image C<filename> to libguestfs. "
6788 "The first time you call this function, the disk appears as C</dev/sda>, the "
6789 "second time as C</dev/sdb>, and so on."
6794 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:107
6796 "You don't necessarily need to be root when using libguestfs. However you "
6797 "obviously do need sufficient permissions to access the filename for whatever "
6798 "operations you want to perform (ie. read access if you just want to read the "
6799 "image or write access if you want to modify the image)."
6804 #: ../src/guestfs-actions.pod:171 ../fish/guestfish-actions.pod:113
6805 msgid "This call checks that C<filename> exists."
6810 #: ../src/guestfs-actions.pod:173 ../src/guestfs-actions.pod:4480
6811 #: ../fish/guestfish-actions.pod:115 ../fish/guestfish-actions.pod:3036
6812 msgid "The optional arguments are:"
6817 #: ../src/guestfs-actions.pod:177 ../fish/guestfish-actions.pod:119
6823 #: ../src/guestfs-actions.pod:179 ../fish/guestfish-actions.pod:121
6825 "If true then the image is treated as read-only. Writes are still allowed, "
6826 "but they are stored in a temporary snapshot overlay which is discarded at "
6827 "the end. The disk that you add is not modified."
6832 #: ../src/guestfs-actions.pod:183 ../fish/guestfish-actions.pod:125
6838 #: ../src/guestfs-actions.pod:185
6840 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
6841 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
6842 "Possible formats include C<raw> and C<qcow2>."
6847 #: ../src/guestfs-actions.pod:189 ../fish/guestfish-actions.pod:131
6849 "Automatic detection of the format opens you up to a potential security hole "
6850 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6851 "RHBZ#642934. Specifying the format closes this security hole."
6856 #: ../src/guestfs-actions.pod:194 ../fish/guestfish-actions.pod:136
6862 #: ../src/guestfs-actions.pod:196
6864 "This rarely-used option lets you emulate the behaviour of the deprecated "
6865 "C<guestfs_add_drive_with_if> call (q.v.)"
6870 #: ../src/guestfs-actions.pod:203
6871 msgid "(Added in 1.5.23)"
6876 #: ../src/guestfs-actions.pod:205
6877 msgid "guestfs_add_drive_opts_va"
6882 #: ../src/guestfs-actions.pod:207
6886 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
6887 " const char *filename,\n"
6894 #: ../src/guestfs-actions.pod:212
6895 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
6900 #: ../src/guestfs-actions.pod:216
6901 msgid "guestfs_add_drive_opts_argv"
6906 #: ../src/guestfs-actions.pod:218
6910 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
6911 " const char *filename,\n"
6912 " const struct guestfs_add_drive_opts_argv *optargs);\n"
6918 #: ../src/guestfs-actions.pod:223
6919 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
6924 #: ../src/guestfs-actions.pod:227
6925 msgid "guestfs_add_drive_ro"
6930 #: ../src/guestfs-actions.pod:229
6934 " guestfs_add_drive_ro (guestfs_h *g,\n"
6935 " const char *filename);\n"
6941 #: ../src/guestfs-actions.pod:233
6943 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
6944 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
6945 "disk is added read-only, with the format being detected automatically."
6950 #: ../src/guestfs-actions.pod:240
6951 msgid "(Added in 1.0.38)"
6956 #: ../src/guestfs-actions.pod:242
6957 msgid "guestfs_add_drive_ro_with_if"
6962 #: ../src/guestfs-actions.pod:244
6966 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
6967 " const char *filename,\n"
6968 " const char *iface);\n"
6974 #: ../src/guestfs-actions.pod:249
6976 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
6977 "QEMU interface emulation to use at run time."
6982 #: ../src/guestfs-actions.pod:261 ../src/guestfs-actions.pod:282
6983 #: ../src/guestfs-actions.pod:2359
6984 msgid "(Added in 1.0.84)"
6989 #: ../src/guestfs-actions.pod:263
6990 msgid "guestfs_add_drive_with_if"
6995 #: ../src/guestfs-actions.pod:265
6999 " guestfs_add_drive_with_if (guestfs_h *g,\n"
7000 " const char *filename,\n"
7001 " const char *iface);\n"
7007 #: ../src/guestfs-actions.pod:270
7009 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
7010 "QEMU interface emulation to use at run time."
7015 #: ../src/guestfs-actions.pod:284
7016 msgid "guestfs_aug_clear"
7021 #: ../src/guestfs-actions.pod:286
7025 " guestfs_aug_clear (guestfs_h *g,\n"
7026 " const char *augpath);\n"
7032 #: ../src/guestfs-actions.pod:290 ../fish/guestfish-actions.pod:188
7034 "Set the value associated with C<path> to C<NULL>. This is the same as the "
7035 "L<augtool(1)> C<clear> command."
7040 #: ../src/guestfs-actions.pod:295 ../src/guestfs-actions.pod:2109
7041 msgid "(Added in 1.3.4)"
7046 #: ../src/guestfs-actions.pod:297
7047 msgid "guestfs_aug_close"
7052 #: ../src/guestfs-actions.pod:299
7056 " guestfs_aug_close (guestfs_h *g);\n"
7062 #: ../src/guestfs-actions.pod:302
7064 "Close the current Augeas handle and free up any resources used by it. After "
7065 "calling this, you have to call C<guestfs_aug_init> again before you can use "
7066 "any other Augeas functions."
7071 #: ../src/guestfs-actions.pod:309 ../src/guestfs-actions.pod:334
7072 #: ../src/guestfs-actions.pod:352 ../src/guestfs-actions.pod:366
7073 #: ../src/guestfs-actions.pod:424 ../src/guestfs-actions.pod:444
7074 #: ../src/guestfs-actions.pod:458 ../src/guestfs-actions.pod:489
7075 #: ../src/guestfs-actions.pod:503 ../src/guestfs-actions.pod:517
7076 #: ../src/guestfs-actions.pod:531 ../src/guestfs-actions.pod:549
7077 #: ../src/guestfs-actions.pod:5513
7078 msgid "(Added in 0.7)"
7083 #: ../src/guestfs-actions.pod:311
7084 msgid "guestfs_aug_defnode"
7089 #: ../src/guestfs-actions.pod:313
7092 " struct guestfs_int_bool *\n"
7093 " guestfs_aug_defnode (guestfs_h *g,\n"
7094 " const char *name,\n"
7095 " const char *expr,\n"
7096 " const char *val);\n"
7102 #: ../src/guestfs-actions.pod:319 ../fish/guestfish-actions.pod:204
7104 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
7109 #: ../src/guestfs-actions.pod:322
7111 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
7112 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
7113 "containing that single node."
7118 #: ../src/guestfs-actions.pod:326 ../fish/guestfish-actions.pod:211
7120 "On success this returns a pair containing the number of nodes in the "
7121 "nodeset, and a boolean flag if a node was created."
7126 #: ../src/guestfs-actions.pod:330
7128 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
7129 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
7134 #: ../src/guestfs-actions.pod:336
7135 msgid "guestfs_aug_defvar"
7140 #: ../src/guestfs-actions.pod:338
7144 " guestfs_aug_defvar (guestfs_h *g,\n"
7145 " const char *name,\n"
7146 " const char *expr);\n"
7152 #: ../src/guestfs-actions.pod:343 ../fish/guestfish-actions.pod:219
7154 "Defines an Augeas variable C<name> whose value is the result of evaluating "
7155 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
7160 #: ../src/guestfs-actions.pod:347 ../fish/guestfish-actions.pod:223
7162 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
7163 "evaluates to something which is not a nodeset."
7168 #: ../src/guestfs-actions.pod:354
7169 msgid "guestfs_aug_get"
7174 #: ../src/guestfs-actions.pod:356
7178 " guestfs_aug_get (guestfs_h *g,\n"
7179 " const char *augpath);\n"
7185 #: ../src/guestfs-actions.pod:360 ../fish/guestfish-actions.pod:230
7187 "Look up the value associated with C<path>. If C<path> matches exactly one "
7188 "node, the C<value> is returned."
7193 #: ../src/guestfs-actions.pod:363 ../src/guestfs-actions.pod:863
7194 #: ../src/guestfs-actions.pod:881 ../src/guestfs-actions.pod:941
7195 #: ../src/guestfs-actions.pod:957 ../src/guestfs-actions.pod:1060
7196 #: ../src/guestfs-actions.pod:1190 ../src/guestfs-actions.pod:1207
7197 #: ../src/guestfs-actions.pod:1226 ../src/guestfs-actions.pod:1360
7198 #: ../src/guestfs-actions.pod:1548 ../src/guestfs-actions.pod:1660
7199 #: ../src/guestfs-actions.pod:1823 ../src/guestfs-actions.pod:1840
7200 #: ../src/guestfs-actions.pod:1907 ../src/guestfs-actions.pod:1941
7201 #: ../src/guestfs-actions.pod:1962 ../src/guestfs-actions.pod:2132
7202 #: ../src/guestfs-actions.pod:2324 ../src/guestfs-actions.pod:2531
7203 #: ../src/guestfs-actions.pod:2624 ../src/guestfs-actions.pod:2735
7204 #: ../src/guestfs-actions.pod:2755 ../src/guestfs-actions.pod:2875
7205 #: ../src/guestfs-actions.pod:2906 ../src/guestfs-actions.pod:2930
7206 #: ../src/guestfs-actions.pod:2967 ../src/guestfs-actions.pod:3027
7207 #: ../src/guestfs-actions.pod:3050 ../src/guestfs-actions.pod:3071
7208 #: ../src/guestfs-actions.pod:3666 ../src/guestfs-actions.pod:4016
7209 #: ../src/guestfs-actions.pod:4186 ../src/guestfs-actions.pod:4296
7210 #: ../src/guestfs-actions.pod:5048 ../src/guestfs-actions.pod:5241
7211 #: ../src/guestfs-actions.pod:5411 ../src/guestfs-actions.pod:5589
7212 #: ../src/guestfs-actions.pod:5638 ../src/guestfs-actions.pod:6271
7213 #: ../src/guestfs-actions.pod:6287 ../src/guestfs-actions.pod:6304
7214 #: ../src/guestfs-actions.pod:6335 ../src/guestfs-actions.pod:7009
7215 #: ../src/guestfs-actions.pod:7028 ../src/guestfs-actions.pod:7046
7216 #: ../src/guestfs-actions.pod:7226 ../src/guestfs-actions.pod:7506
7218 "This function returns a string, or NULL on error. I<The caller must free "
7219 "the returned string after use>."
7224 #: ../src/guestfs-actions.pod:368
7225 msgid "guestfs_aug_init"
7230 #: ../src/guestfs-actions.pod:370
7234 " guestfs_aug_init (guestfs_h *g,\n"
7235 " const char *root,\n"
7242 #: ../src/guestfs-actions.pod:375 ../fish/guestfish-actions.pod:237
7244 "Create a new Augeas handle for editing configuration files. If there was "
7245 "any previous Augeas handle associated with this guestfs session, then it is "
7251 #: ../src/guestfs-actions.pod:379
7252 msgid "You must call this before using any other C<guestfs_aug_*> commands."
7257 #: ../src/guestfs-actions.pod:382 ../fish/guestfish-actions.pod:244
7259 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
7264 #: ../src/guestfs-actions.pod:385 ../fish/guestfish-actions.pod:247
7266 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
7267 "logical I<or> of the following integers:"
7272 #: ../src/guestfs-actions.pod:391 ../fish/guestfish-actions.pod:253
7273 msgid "C<AUG_SAVE_BACKUP> = 1"
7278 #: ../src/guestfs-actions.pod:393 ../fish/guestfish-actions.pod:255
7279 msgid "Keep the original file with a C<.augsave> extension."
7284 #: ../src/guestfs-actions.pod:395 ../fish/guestfish-actions.pod:257
7285 msgid "C<AUG_SAVE_NEWFILE> = 2"
7290 #: ../src/guestfs-actions.pod:397 ../fish/guestfish-actions.pod:259
7292 "Save changes into a file with extension C<.augnew>, and do not overwrite "
7293 "original. Overrides C<AUG_SAVE_BACKUP>."
7298 #: ../src/guestfs-actions.pod:400 ../fish/guestfish-actions.pod:262
7299 msgid "C<AUG_TYPE_CHECK> = 4"
7304 #: ../src/guestfs-actions.pod:402 ../fish/guestfish-actions.pod:264
7305 msgid "Typecheck lenses (can be expensive)."
7310 #: ../src/guestfs-actions.pod:404 ../fish/guestfish-actions.pod:266
7311 msgid "C<AUG_NO_STDINC> = 8"
7316 #: ../src/guestfs-actions.pod:406 ../fish/guestfish-actions.pod:268
7317 msgid "Do not use standard load path for modules."
7322 #: ../src/guestfs-actions.pod:408 ../fish/guestfish-actions.pod:270
7323 msgid "C<AUG_SAVE_NOOP> = 16"
7328 #: ../src/guestfs-actions.pod:410 ../fish/guestfish-actions.pod:272
7329 msgid "Make save a no-op, just record what would have been changed."
7334 #: ../src/guestfs-actions.pod:412 ../fish/guestfish-actions.pod:274
7335 msgid "C<AUG_NO_LOAD> = 32"
7340 #: ../src/guestfs-actions.pod:414
7341 msgid "Do not load the tree in C<guestfs_aug_init>."
7346 #: ../src/guestfs-actions.pod:418
7347 msgid "To close the handle, you can call C<guestfs_aug_close>."
7352 #: ../src/guestfs-actions.pod:420 ../fish/guestfish-actions.pod:282
7353 msgid "To find out more about Augeas, see L<http://augeas.net/>."
7358 #: ../src/guestfs-actions.pod:426
7359 msgid "guestfs_aug_insert"
7364 #: ../src/guestfs-actions.pod:428
7368 " guestfs_aug_insert (guestfs_h *g,\n"
7369 " const char *augpath,\n"
7370 " const char *label,\n"
7377 #: ../src/guestfs-actions.pod:434 ../fish/guestfish-actions.pod:288
7379 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
7380 "or after C<path> (depending on the boolean flag C<before>)."
7385 #: ../src/guestfs-actions.pod:438 ../fish/guestfish-actions.pod:292
7387 "C<path> must match exactly one existing node in the tree, and C<label> must "
7388 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
7393 #: ../src/guestfs-actions.pod:446
7394 msgid "guestfs_aug_load"
7399 #: ../src/guestfs-actions.pod:448
7403 " guestfs_aug_load (guestfs_h *g);\n"
7409 #: ../src/guestfs-actions.pod:451 ../fish/guestfish-actions.pod:300
7410 msgid "Load files into the tree."
7415 #: ../src/guestfs-actions.pod:453 ../fish/guestfish-actions.pod:302
7416 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
7421 #: ../src/guestfs-actions.pod:460
7422 msgid "guestfs_aug_ls"
7427 #: ../src/guestfs-actions.pod:462
7431 " guestfs_aug_ls (guestfs_h *g,\n"
7432 " const char *augpath);\n"
7438 #: ../src/guestfs-actions.pod:466
7440 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
7441 "sorting the resulting nodes into alphabetical order."
7446 #: ../src/guestfs-actions.pod:469 ../src/guestfs-actions.pod:485
7447 #: ../src/guestfs-actions.pod:631 ../src/guestfs-actions.pod:1079
7448 #: ../src/guestfs-actions.pod:1375 ../src/guestfs-actions.pod:1394
7449 #: ../src/guestfs-actions.pod:1497 ../src/guestfs-actions.pod:1516
7450 #: ../src/guestfs-actions.pod:1762 ../src/guestfs-actions.pod:2204
7451 #: ../src/guestfs-actions.pod:2220 ../src/guestfs-actions.pod:2239
7452 #: ../src/guestfs-actions.pod:2282 ../src/guestfs-actions.pod:2306
7453 #: ../src/guestfs-actions.pod:2377 ../src/guestfs-actions.pod:2426
7454 #: ../src/guestfs-actions.pod:2693 ../src/guestfs-actions.pod:2984
7455 #: ../src/guestfs-actions.pod:3273 ../src/guestfs-actions.pod:3586
7456 #: ../src/guestfs-actions.pod:3648 ../src/guestfs-actions.pod:3753
7457 #: ../src/guestfs-actions.pod:4158 ../src/guestfs-actions.pod:4863
7458 #: ../src/guestfs-actions.pod:5383 ../src/guestfs-actions.pod:5509
7459 #: ../src/guestfs-actions.pod:5623 ../src/guestfs-actions.pod:6351
7460 #: ../src/guestfs-actions.pod:6412 ../src/guestfs-actions.pod:6467
7461 #: ../src/guestfs-actions.pod:6613 ../src/guestfs-actions.pod:6637
7462 #: ../src/guestfs-actions.pod:7119 ../src/guestfs-actions.pod:7139
7463 #: ../src/guestfs-actions.pod:7186 ../src/guestfs-actions.pod:7358
7464 #: ../src/guestfs-actions.pod:7377 ../src/guestfs-actions.pod:7463
7465 #: ../src/guestfs-actions.pod:7482 ../src/guestfs-actions.pod:7528
7466 #: ../src/guestfs-actions.pod:7547
7468 "This function returns a NULL-terminated array of strings (like L<environ(3)"
7469 ">), or NULL if there was an error. I<The caller must free the strings and "
7470 "the array after use>."
7475 #: ../src/guestfs-actions.pod:473 ../src/guestfs-actions.pod:1004
7476 #: ../src/guestfs-actions.pod:1022 ../src/guestfs-actions.pod:1432
7477 #: ../src/guestfs-actions.pod:3351 ../src/guestfs-actions.pod:3382
7478 #: ../src/guestfs-actions.pod:3999 ../src/guestfs-actions.pod:4049
7479 #: ../src/guestfs-actions.pod:4236 ../src/guestfs-actions.pod:4269
7480 #: ../src/guestfs-actions.pod:4432 ../src/guestfs-actions.pod:4867
7481 #: ../src/guestfs-actions.pod:5324 ../src/guestfs-actions.pod:5719
7482 #: ../src/guestfs-actions.pod:5733 ../src/guestfs-actions.pod:5745
7483 #: ../src/guestfs-actions.pod:6192 ../src/guestfs-actions.pod:6851
7484 #: ../src/guestfs-actions.pod:6864 ../src/guestfs-actions.pod:7103
7485 #: ../src/guestfs-actions.pod:7346
7486 msgid "(Added in 0.8)"
7491 #: ../src/guestfs-actions.pod:475
7492 msgid "guestfs_aug_match"
7497 #: ../src/guestfs-actions.pod:477
7501 " guestfs_aug_match (guestfs_h *g,\n"
7502 " const char *augpath);\n"
7508 #: ../src/guestfs-actions.pod:481 ../fish/guestfish-actions.pod:316
7510 "Returns a list of paths which match the path expression C<path>. The "
7511 "returned paths are sufficiently qualified so that they match exactly one "
7512 "node in the current tree."
7517 #: ../src/guestfs-actions.pod:491
7518 msgid "guestfs_aug_mv"
7523 #: ../src/guestfs-actions.pod:493
7527 " guestfs_aug_mv (guestfs_h *g,\n"
7528 " const char *src,\n"
7529 " const char *dest);\n"
7535 #: ../src/guestfs-actions.pod:498 ../fish/guestfish-actions.pod:324
7537 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
7538 "C<dest> is overwritten if it exists."
7543 #: ../src/guestfs-actions.pod:505
7544 msgid "guestfs_aug_rm"
7549 #: ../src/guestfs-actions.pod:507
7553 " guestfs_aug_rm (guestfs_h *g,\n"
7554 " const char *augpath);\n"
7560 #: ../src/guestfs-actions.pod:511 ../fish/guestfish-actions.pod:331
7561 msgid "Remove C<path> and all of its children."
7566 #: ../src/guestfs-actions.pod:513 ../fish/guestfish-actions.pod:333
7567 msgid "On success this returns the number of entries which were removed."
7572 #: ../src/guestfs-actions.pod:519
7573 msgid "guestfs_aug_save"
7578 #: ../src/guestfs-actions.pod:521
7582 " guestfs_aug_save (guestfs_h *g);\n"
7588 #: ../src/guestfs-actions.pod:524 ../fish/guestfish-actions.pod:339
7589 msgid "This writes all pending changes to disk."
7594 #: ../src/guestfs-actions.pod:526
7596 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
7602 #: ../src/guestfs-actions.pod:533
7603 msgid "guestfs_aug_set"
7608 #: ../src/guestfs-actions.pod:535
7612 " guestfs_aug_set (guestfs_h *g,\n"
7613 " const char *augpath,\n"
7614 " const char *val);\n"
7620 #: ../src/guestfs-actions.pod:540 ../fish/guestfish-actions.pod:348
7621 msgid "Set the value associated with C<path> to C<val>."
7626 #: ../src/guestfs-actions.pod:542
7628 "In the Augeas API, it is possible to clear a node by setting the value to "
7629 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
7630 "this call. Instead you must use the C<guestfs_aug_clear> call."
7635 #: ../src/guestfs-actions.pod:551
7636 msgid "guestfs_available"
7641 #: ../src/guestfs-actions.pod:553
7645 " guestfs_available (guestfs_h *g,\n"
7646 " char *const *groups);\n"
7652 #: ../src/guestfs-actions.pod:557 ../fish/guestfish-actions.pod:359
7654 "This command is used to check the availability of some groups of "
7655 "functionality in the appliance, which not all builds of the libguestfs "
7656 "appliance will be able to provide."
7661 #: ../src/guestfs-actions.pod:561
7663 "The libguestfs groups, and the functions that those groups correspond to, "
7664 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
7665 "runtime by calling C<guestfs_available_all_groups>."
7670 #: ../src/guestfs-actions.pod:566 ../fish/guestfish-actions.pod:368
7672 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
7673 "\"]> would check for the availability of the Linux inotify functions and "
7674 "Augeas (configuration file editing) functions."
7679 #: ../src/guestfs-actions.pod:571 ../fish/guestfish-actions.pod:373
7680 msgid "The command returns no error if I<all> requested groups are available."
7685 #: ../src/guestfs-actions.pod:573 ../fish/guestfish-actions.pod:375
7687 "It fails with an error if one or more of the requested groups is unavailable "
7693 #: ../src/guestfs-actions.pod:576 ../fish/guestfish-actions.pod:378
7695 "If an unknown group name is included in the list of groups then an error is "
7701 #: ../src/guestfs-actions.pod:579 ../fish/guestfish-actions.pod:381
7707 #: ../src/guestfs-actions.pod:585
7708 msgid "You must call C<guestfs_launch> before calling this function."
7713 #: ../src/guestfs-actions.pod:587 ../fish/guestfish-actions.pod:389
7715 "The reason is because we don't know what groups are supported by the "
7716 "appliance/daemon until it is running and can be queried."
7721 #: ../src/guestfs-actions.pod:593 ../fish/guestfish-actions.pod:395
7723 "If a group of functions is available, this does not necessarily mean that "
7724 "they will work. You still have to check for errors when calling individual "
7725 "API functions even if they are available."
7730 #: ../src/guestfs-actions.pod:600 ../fish/guestfish-actions.pod:402
7732 "It is usually the job of distro packagers to build complete functionality "
7733 "into the libguestfs appliance. Upstream libguestfs, if built from source "
7734 "with all requirements satisfied, will support everything."
7739 #: ../src/guestfs-actions.pod:607
7741 "This call was added in version C<1.0.80>. In previous versions of "
7742 "libguestfs all you could do would be to speculatively execute a command to "
7743 "find out if the daemon implemented it. See also C<guestfs_version>."
7748 #: ../src/guestfs-actions.pod:616 ../src/guestfs-actions.pod:1177
7749 msgid "(Added in 1.0.80)"
7754 #: ../src/guestfs-actions.pod:618
7755 msgid "guestfs_available_all_groups"
7760 #: ../src/guestfs-actions.pod:620
7764 " guestfs_available_all_groups (guestfs_h *g);\n"
7770 #: ../src/guestfs-actions.pod:623
7772 "This command returns a list of all optional groups that this daemon knows "
7773 "about. Note this returns both supported and unsupported groups. To find "
7774 "out which ones the daemon can actually support you have to call "
7775 "C<guestfs_available> on each member of the returned list."
7780 #: ../src/guestfs-actions.pod:629
7781 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
7786 #: ../src/guestfs-actions.pod:635
7787 msgid "(Added in 1.3.15)"
7792 #: ../src/guestfs-actions.pod:637
7793 msgid "guestfs_base64_in"
7798 #: ../src/guestfs-actions.pod:639
7802 " guestfs_base64_in (guestfs_h *g,\n"
7803 " const char *base64file,\n"
7804 " const char *filename);\n"
7810 #: ../src/guestfs-actions.pod:644 ../fish/guestfish-actions.pod:432
7812 "This command uploads base64-encoded data from C<base64file> to C<filename>."
7817 #: ../src/guestfs-actions.pod:649 ../src/guestfs-actions.pod:663
7818 msgid "(Added in 1.3.5)"
7823 #: ../src/guestfs-actions.pod:651
7824 msgid "guestfs_base64_out"
7829 #: ../src/guestfs-actions.pod:653
7833 " guestfs_base64_out (guestfs_h *g,\n"
7834 " const char *filename,\n"
7835 " const char *base64file);\n"
7841 #: ../src/guestfs-actions.pod:658 ../fish/guestfish-actions.pod:441
7843 "This command downloads the contents of C<filename>, writing it out to local "
7844 "file C<base64file> encoded as base64."
7849 #: ../src/guestfs-actions.pod:665
7850 msgid "guestfs_blockdev_flushbufs"
7855 #: ../src/guestfs-actions.pod:667
7859 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
7860 " const char *device);\n"
7866 #: ../src/guestfs-actions.pod:671 ../fish/guestfish-actions.pod:450
7868 "This tells the kernel to flush internal buffers associated with C<device>."
7873 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:691
7874 #: ../src/guestfs-actions.pod:706 ../src/guestfs-actions.pod:722
7875 #: ../src/guestfs-actions.pod:740 ../src/guestfs-actions.pod:759
7876 #: ../src/guestfs-actions.pod:773 ../src/guestfs-actions.pod:791
7877 #: ../src/guestfs-actions.pod:805 ../src/guestfs-actions.pod:819
7878 #: ../fish/guestfish-actions.pod:453 ../fish/guestfish-actions.pod:464
7879 #: ../fish/guestfish-actions.pod:473 ../fish/guestfish-actions.pod:483
7880 #: ../fish/guestfish-actions.pod:495 ../fish/guestfish-actions.pod:508
7881 #: ../fish/guestfish-actions.pod:516 ../fish/guestfish-actions.pod:527
7882 #: ../fish/guestfish-actions.pod:535 ../fish/guestfish-actions.pod:543
7883 msgid "This uses the L<blockdev(8)> command."
7888 #: ../src/guestfs-actions.pod:678 ../src/guestfs-actions.pod:695
7889 #: ../src/guestfs-actions.pod:710 ../src/guestfs-actions.pod:726
7890 #: ../src/guestfs-actions.pod:744 ../src/guestfs-actions.pod:763
7891 #: ../src/guestfs-actions.pod:777 ../src/guestfs-actions.pod:795
7892 #: ../src/guestfs-actions.pod:809 ../src/guestfs-actions.pod:823
7893 msgid "(Added in 0.9.3)"
7898 #: ../src/guestfs-actions.pod:680
7899 msgid "guestfs_blockdev_getbsz"
7904 #: ../src/guestfs-actions.pod:682
7908 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
7909 " const char *device);\n"
7915 #: ../src/guestfs-actions.pod:686 ../fish/guestfish-actions.pod:459
7916 msgid "This returns the block size of a device."
7921 #: ../src/guestfs-actions.pod:688 ../src/guestfs-actions.pod:788
7922 #: ../fish/guestfish-actions.pod:461 ../fish/guestfish-actions.pod:524
7924 "(Note this is different from both I<size in blocks> and I<filesystem block "
7930 #: ../src/guestfs-actions.pod:697
7931 msgid "guestfs_blockdev_getro"
7936 #: ../src/guestfs-actions.pod:699
7940 " guestfs_blockdev_getro (guestfs_h *g,\n"
7941 " const char *device);\n"
7947 #: ../src/guestfs-actions.pod:703 ../fish/guestfish-actions.pod:470
7949 "Returns a boolean indicating if the block device is read-only (true if read-"
7950 "only, false if not)."
7955 #: ../src/guestfs-actions.pod:708 ../src/guestfs-actions.pod:1415
7956 #: ../src/guestfs-actions.pod:1430 ../src/guestfs-actions.pod:1917
7957 #: ../src/guestfs-actions.pod:1928 ../src/guestfs-actions.pod:2000
7958 #: ../src/guestfs-actions.pod:2055 ../src/guestfs-actions.pod:2070
7959 #: ../src/guestfs-actions.pod:2095 ../src/guestfs-actions.pod:2118
7960 #: ../src/guestfs-actions.pod:3091 ../src/guestfs-actions.pod:3108
7961 #: ../src/guestfs-actions.pod:3127 ../src/guestfs-actions.pod:3290
7962 #: ../src/guestfs-actions.pod:3304 ../src/guestfs-actions.pod:3319
7963 #: ../src/guestfs-actions.pod:3333 ../src/guestfs-actions.pod:3349
7964 #: ../src/guestfs-actions.pod:3364 ../src/guestfs-actions.pod:3380
7965 #: ../src/guestfs-actions.pod:3394 ../src/guestfs-actions.pod:3407
7966 #: ../src/guestfs-actions.pod:3421 ../src/guestfs-actions.pod:3436
7967 #: ../src/guestfs-actions.pod:3451 ../src/guestfs-actions.pod:3464
7968 #: ../src/guestfs-actions.pod:3476 ../src/guestfs-actions.pod:5012
7969 msgid "This function returns a C truth value on success or -1 on error."
7974 #: ../src/guestfs-actions.pod:712
7975 msgid "guestfs_blockdev_getsize64"
7980 #: ../src/guestfs-actions.pod:714
7984 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
7985 " const char *device);\n"
7991 #: ../src/guestfs-actions.pod:718 ../fish/guestfish-actions.pod:479
7992 msgid "This returns the size of the device in bytes."
7997 #: ../src/guestfs-actions.pod:720
7998 msgid "See also C<guestfs_blockdev_getsz>."
8003 #: ../src/guestfs-actions.pod:728
8004 msgid "guestfs_blockdev_getss"
8009 #: ../src/guestfs-actions.pod:730
8013 " guestfs_blockdev_getss (guestfs_h *g,\n"
8014 " const char *device);\n"
8020 #: ../src/guestfs-actions.pod:734 ../fish/guestfish-actions.pod:489
8022 "This returns the size of sectors on a block device. Usually 512, but can be "
8023 "larger for modern devices."
8028 #: ../src/guestfs-actions.pod:737
8030 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
8036 #: ../src/guestfs-actions.pod:746
8037 msgid "guestfs_blockdev_getsz"
8042 #: ../src/guestfs-actions.pod:748
8046 " guestfs_blockdev_getsz (guestfs_h *g,\n"
8047 " const char *device);\n"
8053 #: ../src/guestfs-actions.pod:752 ../fish/guestfish-actions.pod:501
8055 "This returns the size of the device in units of 512-byte sectors (even if "
8056 "the sectorsize isn't 512 bytes ... weird)."
8061 #: ../src/guestfs-actions.pod:755
8063 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
8064 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
8069 #: ../src/guestfs-actions.pod:765
8070 msgid "guestfs_blockdev_rereadpt"
8075 #: ../src/guestfs-actions.pod:767
8079 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
8080 " const char *device);\n"
8086 #: ../src/guestfs-actions.pod:771 ../fish/guestfish-actions.pod:514
8087 msgid "Reread the partition table on C<device>."
8092 #: ../src/guestfs-actions.pod:779
8093 msgid "guestfs_blockdev_setbsz"
8098 #: ../src/guestfs-actions.pod:781
8102 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
8103 " const char *device,\n"
8104 " int blocksize);\n"
8110 #: ../src/guestfs-actions.pod:786 ../fish/guestfish-actions.pod:522
8111 msgid "This sets the block size of a device."
8116 #: ../src/guestfs-actions.pod:797
8117 msgid "guestfs_blockdev_setro"
8122 #: ../src/guestfs-actions.pod:799
8126 " guestfs_blockdev_setro (guestfs_h *g,\n"
8127 " const char *device);\n"
8133 #: ../src/guestfs-actions.pod:803 ../fish/guestfish-actions.pod:533
8134 msgid "Sets the block device named C<device> to read-only."
8139 #: ../src/guestfs-actions.pod:811
8140 msgid "guestfs_blockdev_setrw"
8145 #: ../src/guestfs-actions.pod:813
8149 " guestfs_blockdev_setrw (guestfs_h *g,\n"
8150 " const char *device);\n"
8156 #: ../src/guestfs-actions.pod:817 ../fish/guestfish-actions.pod:541
8157 msgid "Sets the block device named C<device> to read-write."
8162 #: ../src/guestfs-actions.pod:825
8163 msgid "guestfs_case_sensitive_path"
8168 #: ../src/guestfs-actions.pod:827
8172 " guestfs_case_sensitive_path (guestfs_h *g,\n"
8173 " const char *path);\n"
8179 #: ../src/guestfs-actions.pod:831 ../fish/guestfish-actions.pod:549
8181 "This can be used to resolve case insensitive paths on a filesystem which is "
8182 "case sensitive. The use case is to resolve paths which you have read from "
8183 "Windows configuration files or the Windows Registry, to the true path."
8188 #: ../src/guestfs-actions.pod:836 ../fish/guestfish-actions.pod:554
8190 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
8191 "(and probably others), which is that although the underlying filesystem is "
8192 "case-insensitive, the driver exports the filesystem to Linux as case-"
8198 #: ../src/guestfs-actions.pod:841 ../fish/guestfish-actions.pod:559
8200 "One consequence of this is that special directories such as C<c:\\windows> "
8201 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
8202 "precise details of how they were created. In Windows itself this would not "
8208 #: ../src/guestfs-actions.pod:847 ../fish/guestfish-actions.pod:565
8210 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
8216 #: ../src/guestfs-actions.pod:850 ../fish/guestfish-actions.pod:568
8218 "This function resolves the true case of each element in the path and returns "
8219 "the case-sensitive path."
8224 #: ../src/guestfs-actions.pod:853
8226 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
8227 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
8228 "how the directories were originally created under Windows)."
8233 #: ../src/guestfs-actions.pod:858 ../fish/guestfish-actions.pod:576
8234 msgid "I<Note>: This function does not handle drive names, backslashes etc."
8239 #: ../src/guestfs-actions.pod:861
8240 msgid "See also C<guestfs_realpath>."
8245 #: ../src/guestfs-actions.pod:866 ../src/guestfs-actions.pod:7031
8246 msgid "(Added in 1.0.75)"
8251 #: ../src/guestfs-actions.pod:868
8257 #: ../src/guestfs-actions.pod:870
8261 " guestfs_cat (guestfs_h *g,\n"
8262 " const char *path);\n"
8268 #: ../src/guestfs-actions.pod:874 ../src/guestfs-actions.pod:5499
8269 #: ../fish/guestfish-actions.pod:585 ../fish/guestfish-actions.pod:3691
8270 msgid "Return the contents of the file named C<path>."
8275 #: ../src/guestfs-actions.pod:876
8277 "Note that this function cannot correctly handle binary files (specifically, "
8278 "files containing C<\\0> character which is treated as end of string). For "
8279 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
8280 "functions which have a more complex interface."
8285 #: ../src/guestfs-actions.pod:884 ../src/guestfs-actions.pod:1063
8286 #: ../src/guestfs-actions.pod:1083 ../src/guestfs-actions.pod:1379
8287 #: ../src/guestfs-actions.pod:1398 ../src/guestfs-actions.pod:1501
8288 #: ../src/guestfs-actions.pod:1520 ../src/guestfs-actions.pod:1766
8289 #: ../src/guestfs-actions.pod:2224 ../src/guestfs-actions.pod:2243
8290 #: ../src/guestfs-actions.pod:2286 ../src/guestfs-actions.pod:2310
8291 #: ../src/guestfs-actions.pod:2327 ../src/guestfs-actions.pod:2356
8292 #: ../src/guestfs-actions.pod:5281 ../src/guestfs-actions.pod:5307
8293 #: ../src/guestfs-actions.pod:5438 ../src/guestfs-actions.pod:5464
8294 #: ../src/guestfs-actions.pod:5488 ../src/guestfs-actions.pod:6416
8295 #: ../src/guestfs-actions.pod:6471 ../src/guestfs-actions.pod:6617
8296 #: ../src/guestfs-actions.pod:6641 ../src/guestfs-actions.pod:7310
8297 #: ../src/guestfs-actions.pod:7336 ../src/guestfs-actions.pod:7362
8298 #: ../src/guestfs-actions.pod:7381 ../src/guestfs-actions.pod:7467
8299 #: ../src/guestfs-actions.pod:7486 ../src/guestfs-actions.pod:7532
8300 #: ../src/guestfs-actions.pod:7551 ../fish/guestfish-actions.pod:592
8301 #: ../fish/guestfish-actions.pod:727 ../fish/guestfish-actions.pod:739
8302 #: ../fish/guestfish-actions.pod:915 ../fish/guestfish-actions.pod:925
8303 #: ../fish/guestfish-actions.pod:992 ../fish/guestfish-actions.pod:1002
8304 #: ../fish/guestfish-actions.pod:1194 ../fish/guestfish-actions.pod:1495
8305 #: ../fish/guestfish-actions.pod:1505 ../fish/guestfish-actions.pod:1533
8306 #: ../fish/guestfish-actions.pod:1548 ../fish/guestfish-actions.pod:1558
8307 #: ../fish/guestfish-actions.pod:1577 ../fish/guestfish-actions.pod:3561
8308 #: ../fish/guestfish-actions.pod:3576 ../fish/guestfish-actions.pod:3652
8309 #: ../fish/guestfish-actions.pod:3669 ../fish/guestfish-actions.pod:3684
8310 #: ../fish/guestfish-actions.pod:4338 ../fish/guestfish-actions.pod:4384
8311 #: ../fish/guestfish-actions.pod:4469 ../fish/guestfish-actions.pod:4484
8312 #: ../fish/guestfish-actions.pod:4894 ../fish/guestfish-actions.pod:4912
8313 #: ../fish/guestfish-actions.pod:4929 ../fish/guestfish-actions.pod:4939
8314 #: ../fish/guestfish-actions.pod:4988 ../fish/guestfish-actions.pod:4998
8315 #: ../fish/guestfish-actions.pod:5027 ../fish/guestfish-actions.pod:5037
8317 "Because of the message protocol, there is a transfer limit of somewhere "
8318 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
8323 #: ../src/guestfs-actions.pod:887 ../src/guestfs-actions.pod:3590
8324 #: ../src/guestfs-actions.pod:3652 ../src/guestfs-actions.pod:3669
8325 #: ../src/guestfs-actions.pod:3757 ../src/guestfs-actions.pod:4162
8326 #: ../src/guestfs-actions.pod:4176 ../src/guestfs-actions.pod:5387
8327 #: ../src/guestfs-actions.pod:5401 ../src/guestfs-actions.pod:7190
8328 #: ../src/guestfs-actions.pod:7204
8329 msgid "(Added in 0.4)"
8334 #: ../src/guestfs-actions.pod:889
8335 msgid "guestfs_checksum"
8340 #: ../src/guestfs-actions.pod:891
8344 " guestfs_checksum (guestfs_h *g,\n"
8345 " const char *csumtype,\n"
8346 " const char *path);\n"
8352 #: ../src/guestfs-actions.pod:896 ../fish/guestfish-actions.pod:599
8354 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
8359 #: ../src/guestfs-actions.pod:899 ../fish/guestfish-actions.pod:602
8361 "The type of checksum to compute is given by the C<csumtype> parameter which "
8362 "must have one of the following values:"
8367 #: ../src/guestfs-actions.pod:904 ../fish/guestfish-actions.pod:607
8373 #: ../src/guestfs-actions.pod:906 ../fish/guestfish-actions.pod:609
8375 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
8381 #: ../src/guestfs-actions.pod:909 ../fish/guestfish-actions.pod:612
8387 #: ../src/guestfs-actions.pod:911 ../fish/guestfish-actions.pod:614
8388 msgid "Compute the MD5 hash (using the C<md5sum> program)."
8393 #: ../src/guestfs-actions.pod:913 ../fish/guestfish-actions.pod:616
8399 #: ../src/guestfs-actions.pod:915 ../fish/guestfish-actions.pod:618
8400 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
8405 #: ../src/guestfs-actions.pod:917 ../fish/guestfish-actions.pod:620
8411 #: ../src/guestfs-actions.pod:919 ../fish/guestfish-actions.pod:622
8412 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
8417 #: ../src/guestfs-actions.pod:921 ../fish/guestfish-actions.pod:624
8423 #: ../src/guestfs-actions.pod:923 ../fish/guestfish-actions.pod:626
8424 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
8429 #: ../src/guestfs-actions.pod:925 ../fish/guestfish-actions.pod:628
8435 #: ../src/guestfs-actions.pod:927 ../fish/guestfish-actions.pod:630
8436 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
8441 #: ../src/guestfs-actions.pod:929 ../fish/guestfish-actions.pod:632
8447 #: ../src/guestfs-actions.pod:931 ../fish/guestfish-actions.pod:634
8448 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
8453 #: ../src/guestfs-actions.pod:935 ../fish/guestfish-actions.pod:638
8454 msgid "The checksum is returned as a printable string."
8459 #: ../src/guestfs-actions.pod:937
8460 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
8465 #: ../src/guestfs-actions.pod:939
8466 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
8471 #: ../src/guestfs-actions.pod:944 ../src/guestfs-actions.pod:1252
8472 #: ../src/guestfs-actions.pod:2086 ../src/guestfs-actions.pod:3306
8473 #: ../src/guestfs-actions.pod:3335 ../src/guestfs-actions.pod:3396
8474 #: ../src/guestfs-actions.pod:3423 ../src/guestfs-actions.pod:6887
8475 msgid "(Added in 1.0.2)"
8480 #: ../src/guestfs-actions.pod:946
8481 msgid "guestfs_checksum_device"
8486 #: ../src/guestfs-actions.pod:948
8490 " guestfs_checksum_device (guestfs_h *g,\n"
8491 " const char *csumtype,\n"
8492 " const char *device);\n"
8498 #: ../src/guestfs-actions.pod:953
8500 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
8501 "device named C<device>. For the types of checksums supported see the "
8502 "C<guestfs_checksum> command."
8507 #: ../src/guestfs-actions.pod:960 ../src/guestfs-actions.pod:4918
8508 #: ../src/guestfs-actions.pod:4977 ../src/guestfs-actions.pod:5014
8509 #: ../src/guestfs-actions.pod:5032 ../src/guestfs-actions.pod:5208
8510 #: ../src/guestfs-actions.pod:6796 ../src/guestfs-actions.pod:6810
8511 #: ../src/guestfs-actions.pod:7216
8512 msgid "(Added in 1.3.2)"
8517 #: ../src/guestfs-actions.pod:962
8518 msgid "guestfs_checksums_out"
8523 #: ../src/guestfs-actions.pod:964
8527 " guestfs_checksums_out (guestfs_h *g,\n"
8528 " const char *csumtype,\n"
8529 " const char *directory,\n"
8530 " const char *sumsfile);\n"
8536 #: ../src/guestfs-actions.pod:970 ../fish/guestfish-actions.pod:656
8538 "This command computes the checksums of all regular files in C<directory> and "
8539 "then emits a list of those checksums to the local output file C<sumsfile>."
8544 #: ../src/guestfs-actions.pod:974 ../fish/guestfish-actions.pod:660
8546 "This can be used for verifying the integrity of a virtual machine. However "
8547 "to be properly secure you should pay attention to the output of the checksum "
8548 "command (it uses the ones from GNU coreutils). In particular when the "
8549 "filename is not printable, coreutils uses a special backslash syntax. For "
8550 "more information, see the GNU coreutils info file."
8555 #: ../src/guestfs-actions.pod:984
8556 msgid "(Added in 1.3.7)"
8561 #: ../src/guestfs-actions.pod:986
8562 msgid "guestfs_chmod"
8567 #: ../src/guestfs-actions.pod:988
8571 " guestfs_chmod (guestfs_h *g,\n"
8573 " const char *path);\n"
8579 #: ../src/guestfs-actions.pod:993 ../fish/guestfish-actions.pod:674
8581 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
8587 #: ../src/guestfs-actions.pod:996 ../fish/guestfish-actions.pod:677
8589 "I<Note>: When using this command from guestfish, C<mode> by default would be "
8590 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
8596 #: ../src/guestfs-actions.pod:1000 ../src/guestfs-actions.pod:4413
8597 #: ../src/guestfs-actions.pod:4610 ../src/guestfs-actions.pod:4629
8598 #: ../src/guestfs-actions.pod:4648 ../fish/guestfish-actions.pod:681
8599 #: ../fish/guestfish-actions.pod:3000 ../fish/guestfish-actions.pod:3129
8600 #: ../fish/guestfish-actions.pod:3139 ../fish/guestfish-actions.pod:3149
8601 msgid "The mode actually set is affected by the umask."
8606 #: ../src/guestfs-actions.pod:1006
8607 msgid "guestfs_chown"
8612 #: ../src/guestfs-actions.pod:1008
8616 " guestfs_chown (guestfs_h *g,\n"
8619 " const char *path);\n"
8625 #: ../src/guestfs-actions.pod:1014 ../fish/guestfish-actions.pod:687
8626 msgid "Change the file owner to C<owner> and group to C<group>."
8631 #: ../src/guestfs-actions.pod:1016 ../src/guestfs-actions.pod:3521
8632 #: ../fish/guestfish-actions.pod:689 ../fish/guestfish-actions.pod:2458
8634 "Only numeric uid and gid are supported. If you want to use names, you will "
8635 "need to locate and parse the password file yourself (Augeas support makes "
8636 "this relatively easy)."
8641 #: ../src/guestfs-actions.pod:1024
8642 msgid "guestfs_command"
8647 #: ../src/guestfs-actions.pod:1026
8651 " guestfs_command (guestfs_h *g,\n"
8652 " char *const *arguments);\n"
8658 #: ../src/guestfs-actions.pod:1030 ../fish/guestfish-actions.pod:697
8660 "This call runs a command from the guest filesystem. The filesystem must be "
8661 "mounted, and must contain a compatible operating system (ie. something "
8662 "Linux, with the same or compatible processor architecture)."
8667 #: ../src/guestfs-actions.pod:1035
8669 "The single parameter is an argv-style list of arguments. The first element "
8670 "is the name of the program to run. Subsequent elements are parameters. The "
8671 "list must be non-empty (ie. must contain a program name). Note that the "
8672 "command runs directly, and is I<not> invoked via the shell (see "
8678 #: ../src/guestfs-actions.pod:1042 ../fish/guestfish-actions.pod:709
8679 msgid "The return value is anything printed to I<stdout> by the command."
8684 #: ../src/guestfs-actions.pod:1045 ../fish/guestfish-actions.pod:712
8686 "If the command returns a non-zero exit status, then this function returns an "
8687 "error message. The error message string is the content of I<stderr> from "
8693 #: ../src/guestfs-actions.pod:1049 ../fish/guestfish-actions.pod:716
8695 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
8696 "bin>. If you require a program from another location, you should provide "
8697 "the full path in the first parameter."
8702 #: ../src/guestfs-actions.pod:1054 ../fish/guestfish-actions.pod:721
8704 "Shared libraries and data files required by the program must be available on "
8705 "filesystems which are mounted in the correct places. It is the caller's "
8706 "responsibility to ensure all filesystems that are needed are mounted at the "
8712 #: ../src/guestfs-actions.pod:1066 ../src/guestfs-actions.pod:1086
8713 #: ../src/guestfs-actions.pod:1551
8714 msgid "(Added in 0.9.1)"
8719 #: ../src/guestfs-actions.pod:1068
8720 msgid "guestfs_command_lines"
8725 #: ../src/guestfs-actions.pod:1070
8729 " guestfs_command_lines (guestfs_h *g,\n"
8730 " char *const *arguments);\n"
8736 #: ../src/guestfs-actions.pod:1074
8738 "This is the same as C<guestfs_command>, but splits the result into a list of "
8744 #: ../src/guestfs-actions.pod:1077
8745 msgid "See also: C<guestfs_sh_lines>"
8750 #: ../src/guestfs-actions.pod:1088
8751 msgid "guestfs_config"
8756 #: ../src/guestfs-actions.pod:1090
8760 " guestfs_config (guestfs_h *g,\n"
8761 " const char *qemuparam,\n"
8762 " const char *qemuvalue);\n"
8767 #: ../src/guestfs-actions.pod:1095 ../fish/guestfish-actions.pod:746
8769 "This can be used to add arbitrary qemu command line parameters of the form "
8770 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
8771 "setting some parameters which would interfere with parameters that we use."
8776 #: ../src/guestfs-actions.pod:1100 ../fish/guestfish-actions.pod:751
8777 msgid "The first character of C<param> string must be a C<-> (dash)."
8782 #: ../src/guestfs-actions.pod:1102 ../fish/guestfish-actions.pod:753
8783 msgid "C<value> can be NULL."
8788 #: ../src/guestfs-actions.pod:1108
8789 msgid "guestfs_copy_size"
8794 #: ../src/guestfs-actions.pod:1110
8798 " guestfs_copy_size (guestfs_h *g,\n"
8799 " const char *src,\n"
8800 " const char *dest,\n"
8807 #: ../src/guestfs-actions.pod:1116 ../fish/guestfish-actions.pod:759
8809 "This command copies exactly C<size> bytes from one source device or file "
8810 "C<src> to another destination device or file C<dest>."
8815 #: ../src/guestfs-actions.pod:1119 ../fish/guestfish-actions.pod:762
8817 "Note this will fail if the source is too short or if the destination is not "
8822 #: ../src/guestfs-actions.pod:1124 ../src/guestfs-actions.pod:1247
8823 #: ../src/guestfs-actions.pod:1278 ../src/guestfs-actions.pod:1323
8824 #: ../src/guestfs-actions.pod:1700 ../src/guestfs-actions.pod:1722
8825 #: ../src/guestfs-actions.pod:3502 ../src/guestfs-actions.pod:6882
8826 #: ../src/guestfs-actions.pod:6916 ../src/guestfs-actions.pod:7403
8827 #: ../src/guestfs-actions.pod:7422
8829 "This long-running command can generate progress notification messages so "
8830 "that the caller can display a progress bar or indicator. To receive these "
8831 "messages, the caller must register a progress event callback. See L<guestfs"
8832 "(3)/GUESTFS_EVENT_PROGRESS>."
8837 #: ../src/guestfs-actions.pod:1129 ../src/guestfs-actions.pod:4189
8838 #: ../src/guestfs-actions.pod:5414 ../src/guestfs-actions.pod:7123
8839 #: ../src/guestfs-actions.pod:7143 ../src/guestfs-actions.pod:7229
8840 msgid "(Added in 1.0.87)"
8845 #: ../src/guestfs-actions.pod:1131
8851 #: ../src/guestfs-actions.pod:1133
8855 " guestfs_cp (guestfs_h *g,\n"
8856 " const char *src,\n"
8857 " const char *dest);\n"
8863 #: ../src/guestfs-actions.pod:1138 ../fish/guestfish-actions.pod:769
8865 "This copies a file from C<src> to C<dest> where C<dest> is either a "
8866 "destination filename or destination directory."
8871 #: ../src/guestfs-actions.pod:1143 ../src/guestfs-actions.pod:1157
8872 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:1303
8873 #: ../src/guestfs-actions.pod:1417 ../src/guestfs-actions.pod:4881
8874 #: ../src/guestfs-actions.pod:5258
8875 msgid "(Added in 1.0.18)"
8880 #: ../src/guestfs-actions.pod:1145
8881 msgid "guestfs_cp_a"
8886 #: ../src/guestfs-actions.pod:1147
8890 " guestfs_cp_a (guestfs_h *g,\n"
8891 " const char *src,\n"
8892 " const char *dest);\n"
8898 #: ../src/guestfs-actions.pod:1152 ../fish/guestfish-actions.pod:776
8900 "This copies a file or directory from C<src> to C<dest> recursively using the "
8906 #: ../src/guestfs-actions.pod:1159
8912 #: ../src/guestfs-actions.pod:1161
8916 " guestfs_dd (guestfs_h *g,\n"
8917 " const char *src,\n"
8918 " const char *dest);\n"
8924 #: ../src/guestfs-actions.pod:1166 ../fish/guestfish-actions.pod:783
8926 "This command copies from one source device or file C<src> to another "
8927 "destination device or file C<dest>. Normally you would use this to copy to "
8928 "or from a device or partition, for example to duplicate a filesystem."
8933 #: ../src/guestfs-actions.pod:1171
8935 "If the destination is a device, it must be as large or larger than the "
8936 "source file or device, otherwise the copy will fail. This command cannot do "
8937 "partial copies (see C<guestfs_copy_size>)."
8942 #: ../src/guestfs-actions.pod:1179
8948 #: ../src/guestfs-actions.pod:1181
8952 " guestfs_df (guestfs_h *g);\n"
8958 #: ../src/guestfs-actions.pod:1184 ../fish/guestfish-actions.pod:796
8959 msgid "This command runs the C<df> command to report disk space used."
8964 #: ../src/guestfs-actions.pod:1186 ../src/guestfs-actions.pod:1203
8966 "This command is mostly useful for interactive sessions. It is I<not> "
8967 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
8973 #: ../src/guestfs-actions.pod:1193 ../src/guestfs-actions.pod:1210
8974 #: ../src/guestfs-actions.pod:1328 ../src/guestfs-actions.pod:2289
8975 #: ../src/guestfs-actions.pod:2313 ../src/guestfs-actions.pod:2381
8976 #: ../src/guestfs-actions.pod:4299 ../src/guestfs-actions.pod:4781
8977 #: ../src/guestfs-actions.pod:6620 ../src/guestfs-actions.pod:6644
8978 #: ../src/guestfs-actions.pod:7269 ../src/guestfs-actions.pod:7282
8979 #: ../src/guestfs-actions.pod:7295
8980 msgid "(Added in 1.0.54)"
8985 #: ../src/guestfs-actions.pod:1195
8986 msgid "guestfs_df_h"
8991 #: ../src/guestfs-actions.pod:1197
8995 " guestfs_df_h (guestfs_h *g);\n"
9001 #: ../src/guestfs-actions.pod:1200 ../fish/guestfish-actions.pod:806
9003 "This command runs the C<df -h> command to report disk space used in human-"
9009 #: ../src/guestfs-actions.pod:1212
9010 msgid "guestfs_dmesg"
9015 #: ../src/guestfs-actions.pod:1214
9019 " guestfs_dmesg (guestfs_h *g);\n"
9025 #: ../src/guestfs-actions.pod:1217 ../fish/guestfish-actions.pod:817
9027 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
9028 "This is sometimes useful for extended debugging of problems."
9033 #: ../src/guestfs-actions.pod:1221
9035 "Another way to get the same information is to enable verbose messages with "
9036 "C<guestfs_set_verbose> or by setting the environment variable "
9037 "C<LIBGUESTFS_DEBUG=1> before running the program."
9042 #: ../src/guestfs-actions.pod:1231
9043 msgid "guestfs_download"
9048 #: ../src/guestfs-actions.pod:1233
9052 " guestfs_download (guestfs_h *g,\n"
9053 " const char *remotefilename,\n"
9054 " const char *filename);\n"
9060 #: ../src/guestfs-actions.pod:1238 ../src/guestfs-actions.pod:1263
9061 #: ../fish/guestfish-actions.pod:830 ../fish/guestfish-actions.pod:843
9063 "Download file C<remotefilename> and save it as C<filename> on the local "
9069 #: ../src/guestfs-actions.pod:1241 ../src/guestfs-actions.pod:6876
9070 #: ../fish/guestfish-actions.pod:833 ../fish/guestfish-actions.pod:4642
9071 msgid "C<filename> can also be a named pipe."
9076 #: ../src/guestfs-actions.pod:1243
9077 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
9082 #: ../src/guestfs-actions.pod:1254
9083 msgid "guestfs_download_offset"
9088 #: ../src/guestfs-actions.pod:1256
9092 " guestfs_download_offset (guestfs_h *g,\n"
9093 " const char *remotefilename,\n"
9094 " const char *filename,\n"
9095 " int64_t offset,\n"
9102 #: ../src/guestfs-actions.pod:1266 ../fish/guestfish-actions.pod:846
9104 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
9105 "region must be within the file or device)."
9110 #: ../src/guestfs-actions.pod:1269
9112 "Note that there is no limit on the amount of data that can be downloaded "
9113 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
9114 "full amount unless an error occurs."
9119 #: ../src/guestfs-actions.pod:1274
9120 msgid "See also C<guestfs_download>, C<guestfs_pread>."
9125 #: ../src/guestfs-actions.pod:1283 ../src/guestfs-actions.pod:6921
9126 msgid "(Added in 1.5.17)"
9131 #: ../src/guestfs-actions.pod:1285
9132 msgid "guestfs_drop_caches"
9137 #: ../src/guestfs-actions.pod:1287
9141 " guestfs_drop_caches (guestfs_h *g,\n"
9142 " int whattodrop);\n"
9148 #: ../src/guestfs-actions.pod:1291 ../fish/guestfish-actions.pod:862
9150 "This instructs the guest kernel to drop its page cache, and/or dentries and "
9151 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
9152 "to drop, see L<http://linux-mm.org/Drop_Caches>"
9157 #: ../src/guestfs-actions.pod:1296 ../fish/guestfish-actions.pod:867
9158 msgid "Setting C<whattodrop> to 3 should drop everything."
9163 #: ../src/guestfs-actions.pod:1298 ../fish/guestfish-actions.pod:869
9165 "This automatically calls L<sync(2)> before the operation, so that the "
9166 "maximum guest memory is freed."
9171 #: ../src/guestfs-actions.pod:1305
9177 #: ../src/guestfs-actions.pod:1307
9181 " guestfs_du (guestfs_h *g,\n"
9182 " const char *path);\n"
9188 #: ../src/guestfs-actions.pod:1311 ../fish/guestfish-actions.pod:876
9190 "This command runs the C<du -s> command to estimate file space usage for "
9196 #: ../src/guestfs-actions.pod:1314 ../fish/guestfish-actions.pod:879
9198 "C<path> can be a file or a directory. If C<path> is a directory then the "
9199 "estimate includes the contents of the directory and all subdirectories "
9205 #: ../src/guestfs-actions.pod:1318 ../fish/guestfish-actions.pod:883
9207 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
9212 #: ../src/guestfs-actions.pod:1330
9213 msgid "guestfs_e2fsck_f"
9218 #: ../src/guestfs-actions.pod:1332
9222 " guestfs_e2fsck_f (guestfs_h *g,\n"
9223 " const char *device);\n"
9228 #: ../src/guestfs-actions.pod:1336 ../fish/guestfish-actions.pod:890
9230 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
9231 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
9237 #: ../src/guestfs-actions.pod:1340
9239 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
9240 "Normally you should use C<guestfs_fsck>."
9245 #: ../src/guestfs-actions.pod:1345
9246 msgid "(Added in 1.0.29)"
9251 #: ../src/guestfs-actions.pod:1347
9252 msgid "guestfs_echo_daemon"
9257 #: ../src/guestfs-actions.pod:1349
9261 " guestfs_echo_daemon (guestfs_h *g,\n"
9262 " char *const *words);\n"
9268 #: ../src/guestfs-actions.pod:1353 ../fish/guestfish-actions.pod:901
9270 "This command concatenates the list of C<words> passed with single spaces "
9271 "between them and returns the resulting string."
9276 #: ../src/guestfs-actions.pod:1356 ../fish/guestfish-actions.pod:904
9277 msgid "You can use this command to test the connection through to the daemon."
9282 #: ../src/guestfs-actions.pod:1358
9283 msgid "See also C<guestfs_ping_daemon>."
9288 #: ../src/guestfs-actions.pod:1363 ../src/guestfs-actions.pod:2097
9289 #: ../src/guestfs-actions.pod:6092
9290 msgid "(Added in 1.0.69)"
9295 #: ../src/guestfs-actions.pod:1365
9296 msgid "guestfs_egrep"
9301 #: ../src/guestfs-actions.pod:1367
9305 " guestfs_egrep (guestfs_h *g,\n"
9306 " const char *regex,\n"
9307 " const char *path);\n"
9313 #: ../src/guestfs-actions.pod:1372 ../fish/guestfish-actions.pod:912
9315 "This calls the external C<egrep> program and returns the matching lines."
9320 #: ../src/guestfs-actions.pod:1382 ../src/guestfs-actions.pod:1401
9321 #: ../src/guestfs-actions.pod:1458 ../src/guestfs-actions.pod:1504
9322 #: ../src/guestfs-actions.pod:1523 ../src/guestfs-actions.pod:2227
9323 #: ../src/guestfs-actions.pod:2246 ../src/guestfs-actions.pod:2402
9324 #: ../src/guestfs-actions.pod:2415 ../src/guestfs-actions.pod:2430
9325 #: ../src/guestfs-actions.pod:2476 ../src/guestfs-actions.pod:2498
9326 #: ../src/guestfs-actions.pod:2511 ../src/guestfs-actions.pod:3682
9327 #: ../src/guestfs-actions.pod:3696 ../src/guestfs-actions.pod:3709
9328 #: ../src/guestfs-actions.pod:3723 ../src/guestfs-actions.pod:4709
9329 #: ../src/guestfs-actions.pod:5592 ../src/guestfs-actions.pod:5641
9330 #: ../src/guestfs-actions.pod:6488 ../src/guestfs-actions.pod:6500
9331 #: ../src/guestfs-actions.pod:6513 ../src/guestfs-actions.pod:6526
9332 #: ../src/guestfs-actions.pod:6548 ../src/guestfs-actions.pod:6561
9333 #: ../src/guestfs-actions.pod:6574 ../src/guestfs-actions.pod:6587
9334 #: ../src/guestfs-actions.pod:7365 ../src/guestfs-actions.pod:7384
9335 #: ../src/guestfs-actions.pod:7470 ../src/guestfs-actions.pod:7489
9336 #: ../src/guestfs-actions.pod:7535 ../src/guestfs-actions.pod:7554
9337 msgid "(Added in 1.0.66)"
9342 #: ../src/guestfs-actions.pod:1384
9343 msgid "guestfs_egrepi"
9348 #: ../src/guestfs-actions.pod:1386
9352 " guestfs_egrepi (guestfs_h *g,\n"
9353 " const char *regex,\n"
9354 " const char *path);\n"
9360 #: ../src/guestfs-actions.pod:1391 ../fish/guestfish-actions.pod:922
9362 "This calls the external C<egrep -i> program and returns the matching lines."
9367 #: ../src/guestfs-actions.pod:1403
9368 msgid "guestfs_equal"
9373 #: ../src/guestfs-actions.pod:1405
9377 " guestfs_equal (guestfs_h *g,\n"
9378 " const char *file1,\n"
9379 " const char *file2);\n"
9385 #: ../src/guestfs-actions.pod:1410 ../fish/guestfish-actions.pod:932
9387 "This compares the two files C<file1> and C<file2> and returns true if their "
9388 "content is exactly equal, or false otherwise."
9393 #: ../src/guestfs-actions.pod:1413 ../fish/guestfish-actions.pod:935
9394 msgid "The external L<cmp(1)> program is used for the comparison."
9399 #: ../src/guestfs-actions.pod:1419
9400 msgid "guestfs_exists"
9405 #: ../src/guestfs-actions.pod:1421
9409 " guestfs_exists (guestfs_h *g,\n"
9410 " const char *path);\n"
9416 #: ../src/guestfs-actions.pod:1425 ../fish/guestfish-actions.pod:941
9418 "This returns C<true> if and only if there is a file, directory (or anything) "
9419 "with the given C<path> name."
9424 #: ../src/guestfs-actions.pod:1428
9425 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
9430 #: ../src/guestfs-actions.pod:1434
9431 msgid "guestfs_fallocate"
9436 #: ../src/guestfs-actions.pod:1436
9440 " guestfs_fallocate (guestfs_h *g,\n"
9441 " const char *path,\n"
9448 #: ../src/guestfs-actions.pod:1441 ../src/guestfs-actions.pod:1467
9449 #: ../fish/guestfish-actions.pod:950 ../fish/guestfish-actions.pod:969
9451 "This command preallocates a file (containing zero bytes) named C<path> of "
9452 "size C<len> bytes. If the file exists already, it is overwritten."
9457 #: ../src/guestfs-actions.pod:1445 ../fish/guestfish-actions.pod:954
9459 "Do not confuse this with the guestfish-specific C<alloc> command which "
9460 "allocates a file in the host and attaches it as a device."
9465 #: ../src/guestfs-actions.pod:1451 ../fish/guestfish-actions.pod:958
9467 "This function is deprecated. In new code, use the C<fallocate64> call "
9473 #: ../src/guestfs-actions.pod:1460
9474 msgid "guestfs_fallocate64"
9479 #: ../src/guestfs-actions.pod:1462
9483 " guestfs_fallocate64 (guestfs_h *g,\n"
9484 " const char *path,\n"
9491 #: ../src/guestfs-actions.pod:1471
9493 "Note that this call allocates disk blocks for the file. To create a sparse "
9494 "file use C<guestfs_truncate_size> instead."
9499 #: ../src/guestfs-actions.pod:1474
9501 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
9502 "oversight it only allowed 30 bit lengths to be specified, effectively "
9503 "limiting the maximum size of files created through that call to 1GB."
9508 #: ../src/guestfs-actions.pod:1479 ../fish/guestfish-actions.pod:981
9510 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
9511 "commands which create a file in the host and attach it as a device."
9516 #: ../src/guestfs-actions.pod:1485
9517 msgid "(Added in 1.3.17)"
9522 #: ../src/guestfs-actions.pod:1487
9523 msgid "guestfs_fgrep"
9528 #: ../src/guestfs-actions.pod:1489
9532 " guestfs_fgrep (guestfs_h *g,\n"
9533 " const char *pattern,\n"
9534 " const char *path);\n"
9540 #: ../src/guestfs-actions.pod:1494 ../fish/guestfish-actions.pod:989
9542 "This calls the external C<fgrep> program and returns the matching lines."
9547 #: ../src/guestfs-actions.pod:1506
9548 msgid "guestfs_fgrepi"
9553 #: ../src/guestfs-actions.pod:1508
9557 " guestfs_fgrepi (guestfs_h *g,\n"
9558 " const char *pattern,\n"
9559 " const char *path);\n"
9565 #: ../src/guestfs-actions.pod:1513 ../fish/guestfish-actions.pod:999
9567 "This calls the external C<fgrep -i> program and returns the matching lines."
9572 #: ../src/guestfs-actions.pod:1525
9573 msgid "guestfs_file"
9578 #: ../src/guestfs-actions.pod:1527
9582 " guestfs_file (guestfs_h *g,\n"
9583 " const char *path);\n"
9589 #: ../src/guestfs-actions.pod:1531 ../fish/guestfish-actions.pod:1009
9591 "This call uses the standard L<file(1)> command to determine the type or "
9592 "contents of the file."
9597 #: ../src/guestfs-actions.pod:1534 ../fish/guestfish-actions.pod:1012
9599 "This call will also transparently look inside various types of compressed "
9604 #: ../src/guestfs-actions.pod:1537 ../fish/guestfish-actions.pod:1015
9606 "The exact command which runs is C<file -zb path>. Note in particular that "
9607 "the filename is not prepended to the output (the I<-b> option)."
9611 #: ../src/guestfs-actions.pod:1541 ../fish/guestfish-actions.pod:1019
9613 "The output depends on the output of the underlying L<file(1)> command and it "
9614 "can change in future in ways beyond our control. In other words, the output "
9615 "is not guaranteed by the ABI."
9619 #: ../src/guestfs-actions.pod:1545
9621 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
9622 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
9627 #: ../src/guestfs-actions.pod:1553
9628 msgid "guestfs_file_architecture"
9633 #: ../src/guestfs-actions.pod:1555
9637 " guestfs_file_architecture (guestfs_h *g,\n"
9638 " const char *filename);\n"
9644 #: ../src/guestfs-actions.pod:1559 ../fish/guestfish-actions.pod:1030
9646 "This detects the architecture of the binary C<filename>, and returns it if "
9652 #: ../src/guestfs-actions.pod:1562 ../fish/guestfish-actions.pod:1033
9653 msgid "Currently defined architectures are:"
9658 #: ../src/guestfs-actions.pod:1566 ../fish/guestfish-actions.pod:1037
9664 #: ../src/guestfs-actions.pod:1568 ../fish/guestfish-actions.pod:1039
9666 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
9667 "irrespective of the precise processor requirements of the binary."
9672 #: ../src/guestfs-actions.pod:1571 ../fish/guestfish-actions.pod:1042
9678 #: ../src/guestfs-actions.pod:1573 ../fish/guestfish-actions.pod:1044
9679 msgid "64 bit x86-64."
9684 #: ../src/guestfs-actions.pod:1575 ../fish/guestfish-actions.pod:1046
9690 #: ../src/guestfs-actions.pod:1577 ../fish/guestfish-actions.pod:1048
9691 msgid "32 bit SPARC."
9696 #: ../src/guestfs-actions.pod:1579 ../fish/guestfish-actions.pod:1050
9702 #: ../src/guestfs-actions.pod:1581 ../fish/guestfish-actions.pod:1052
9703 msgid "64 bit SPARC V9 and above."
9708 #: ../src/guestfs-actions.pod:1583 ../fish/guestfish-actions.pod:1054
9714 #: ../src/guestfs-actions.pod:1585 ../fish/guestfish-actions.pod:1056
9715 msgid "Intel Itanium."
9720 #: ../src/guestfs-actions.pod:1587 ../fish/guestfish-actions.pod:1058
9726 #: ../src/guestfs-actions.pod:1589 ../fish/guestfish-actions.pod:1060
9727 msgid "32 bit Power PC."
9732 #: ../src/guestfs-actions.pod:1591 ../fish/guestfish-actions.pod:1062
9738 #: ../src/guestfs-actions.pod:1593 ../fish/guestfish-actions.pod:1064
9739 msgid "64 bit Power PC."
9744 #: ../src/guestfs-actions.pod:1597 ../fish/guestfish-actions.pod:1068
9745 msgid "Libguestfs may return other architecture strings in future."
9750 #: ../src/guestfs-actions.pod:1599 ../fish/guestfish-actions.pod:1070
9751 msgid "The function works on at least the following types of files:"
9756 #: ../src/guestfs-actions.pod:1605 ../fish/guestfish-actions.pod:1076
9757 msgid "many types of Un*x and Linux binary"
9762 #: ../src/guestfs-actions.pod:1609 ../fish/guestfish-actions.pod:1080
9763 msgid "many types of Un*x and Linux shared library"
9768 #: ../src/guestfs-actions.pod:1613 ../fish/guestfish-actions.pod:1084
9769 msgid "Windows Win32 and Win64 binaries"
9774 #: ../src/guestfs-actions.pod:1617 ../fish/guestfish-actions.pod:1088
9775 msgid "Windows Win32 and Win64 DLLs"
9780 #: ../src/guestfs-actions.pod:1619 ../fish/guestfish-actions.pod:1090
9781 msgid "Win32 binaries and DLLs return C<i386>."
9786 #: ../src/guestfs-actions.pod:1621 ../fish/guestfish-actions.pod:1092
9787 msgid "Win64 binaries and DLLs return C<x86_64>."
9792 #: ../src/guestfs-actions.pod:1625 ../fish/guestfish-actions.pod:1096
9793 msgid "Linux kernel modules"
9798 #: ../src/guestfs-actions.pod:1629 ../fish/guestfish-actions.pod:1100
9799 msgid "Linux new-style initrd images"
9804 #: ../src/guestfs-actions.pod:1633 ../fish/guestfish-actions.pod:1104
9805 msgid "some non-x86 Linux vmlinuz kernels"
9810 #: ../src/guestfs-actions.pod:1637 ../fish/guestfish-actions.pod:1108
9811 msgid "What it can't do currently:"
9816 #: ../src/guestfs-actions.pod:1643 ../fish/guestfish-actions.pod:1114
9817 msgid "static libraries (libfoo.a)"
9822 #: ../src/guestfs-actions.pod:1647 ../fish/guestfish-actions.pod:1118
9823 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
9828 #: ../src/guestfs-actions.pod:1651 ../fish/guestfish-actions.pod:1122
9829 msgid "x86 Linux vmlinuz kernels"
9834 #: ../src/guestfs-actions.pod:1653 ../fish/guestfish-actions.pod:1124
9836 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
9837 "compressed code, and are horribly hard to unpack. If you want to find the "
9838 "architecture of a kernel, use the architecture of the associated initrd or "
9839 "kernel module(s) instead."
9844 #: ../src/guestfs-actions.pod:1663 ../src/guestfs-actions.pod:1826
9845 #: ../src/guestfs-actions.pod:1843 ../src/guestfs-actions.pod:2534
9846 #: ../src/guestfs-actions.pod:2627 ../src/guestfs-actions.pod:2697
9847 #: ../src/guestfs-actions.pod:2785 ../src/guestfs-actions.pod:2806
9848 #: ../src/guestfs-actions.pod:2849 ../src/guestfs-actions.pod:2933
9849 #: ../src/guestfs-actions.pod:3030 ../src/guestfs-actions.pod:3277
9850 #: ../src/guestfs-actions.pod:3409
9851 msgid "(Added in 1.5.3)"
9856 #: ../src/guestfs-actions.pod:1665
9857 msgid "guestfs_filesize"
9862 #: ../src/guestfs-actions.pod:1667
9866 " guestfs_filesize (guestfs_h *g,\n"
9867 " const char *file);\n"
9873 #: ../src/guestfs-actions.pod:1671 ../fish/guestfish-actions.pod:1135
9874 msgid "This command returns the size of C<file> in bytes."
9879 #: ../src/guestfs-actions.pod:1673
9881 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
9882 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
9883 "devices, use C<guestfs_blockdev_getsize64>."
9888 #: ../src/guestfs-actions.pod:1679
9889 msgid "(Added in 1.0.82)"
9894 #: ../src/guestfs-actions.pod:1681
9895 msgid "guestfs_fill"
9900 #: ../src/guestfs-actions.pod:1683
9904 " guestfs_fill (guestfs_h *g,\n"
9907 " const char *path);\n"
9913 #: ../src/guestfs-actions.pod:1689 ../fish/guestfish-actions.pod:1145
9915 "This command creates a new file called C<path>. The initial content of the "
9916 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
9922 #: ../src/guestfs-actions.pod:1693
9924 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
9925 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
9926 "bytes use C<guestfs_fill_pattern>."
9931 #: ../src/guestfs-actions.pod:1705
9932 msgid "(Added in 1.0.79)"
9937 #: ../src/guestfs-actions.pod:1707
9938 msgid "guestfs_fill_pattern"
9943 #: ../src/guestfs-actions.pod:1709
9947 " guestfs_fill_pattern (guestfs_h *g,\n"
9948 " const char *pattern,\n"
9950 " const char *path);\n"
9956 #: ../src/guestfs-actions.pod:1715
9958 "This function is like C<guestfs_fill> except that it creates a new file of "
9959 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
9960 "pattern is truncated if necessary to ensure the length of the file is "
9961 "exactly C<len> bytes."
9966 #: ../src/guestfs-actions.pod:1727
9967 msgid "(Added in 1.3.12)"
9972 #: ../src/guestfs-actions.pod:1729
9973 msgid "guestfs_find"
9978 #: ../src/guestfs-actions.pod:1731
9982 " guestfs_find (guestfs_h *g,\n"
9983 " const char *directory);\n"
9989 #: ../src/guestfs-actions.pod:1735 ../fish/guestfish-actions.pod:1167
9991 "This command lists out all files and directories, recursively, starting at "
9992 "C<directory>. It is essentially equivalent to running the shell command "
9993 "C<find directory -print> but some post-processing happens on the output, "
9999 #: ../src/guestfs-actions.pod:1740 ../fish/guestfish-actions.pod:1172
10001 "This returns a list of strings I<without any prefix>. Thus if the directory "
10007 #: ../src/guestfs-actions.pod:1743 ../fish/guestfish-actions.pod:1175
10018 #: ../src/guestfs-actions.pod:1747
10020 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
10025 #: ../src/guestfs-actions.pod:1750 ../fish/guestfish-actions.pod:1182
10037 #: ../src/guestfs-actions.pod:1755 ../fish/guestfish-actions.pod:1187
10038 msgid "If C<directory> is not a directory, then this command returns an error."
10043 #: ../src/guestfs-actions.pod:1758 ../fish/guestfish-actions.pod:1190
10044 msgid "The returned list is sorted."
10049 #: ../src/guestfs-actions.pod:1760
10050 msgid "See also C<guestfs_find0>."
10055 #: ../src/guestfs-actions.pod:1769 ../src/guestfs-actions.pod:4126
10056 #: ../src/guestfs-actions.pod:5676
10057 msgid "(Added in 1.0.27)"
10062 #: ../src/guestfs-actions.pod:1771
10063 msgid "guestfs_find0"
10068 #: ../src/guestfs-actions.pod:1773
10072 " guestfs_find0 (guestfs_h *g,\n"
10073 " const char *directory,\n"
10074 " const char *files);\n"
10080 #: ../src/guestfs-actions.pod:1778 ../fish/guestfish-actions.pod:1201
10082 "This command lists out all files and directories, recursively, starting at "
10083 "C<directory>, placing the resulting list in the external file called "
10089 #: ../src/guestfs-actions.pod:1782
10091 "This command works the same way as C<guestfs_find> with the following "
10097 #: ../src/guestfs-actions.pod:1789 ../fish/guestfish-actions.pod:1212
10098 msgid "The resulting list is written to an external file."
10103 #: ../src/guestfs-actions.pod:1793 ../fish/guestfish-actions.pod:1216
10105 "Items (filenames) in the result are separated by C<\\0> characters. See "
10106 "L<find(1)> option I<-print0>."
10111 #: ../src/guestfs-actions.pod:1798 ../fish/guestfish-actions.pod:1221
10112 msgid "This command is not limited in the number of names that it can return."
10117 #: ../src/guestfs-actions.pod:1803 ../fish/guestfish-actions.pod:1226
10118 msgid "The result list is not sorted."
10123 #: ../src/guestfs-actions.pod:1809
10124 msgid "(Added in 1.0.74)"
10129 #: ../src/guestfs-actions.pod:1811
10130 msgid "guestfs_findfs_label"
10135 #: ../src/guestfs-actions.pod:1813
10139 " guestfs_findfs_label (guestfs_h *g,\n"
10140 " const char *label);\n"
10146 #: ../src/guestfs-actions.pod:1817 ../fish/guestfish-actions.pod:1236
10148 "This command searches the filesystems and returns the one which has the "
10149 "given label. An error is returned if no such filesystem can be found."
10154 #: ../src/guestfs-actions.pod:1821
10155 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
10160 #: ../src/guestfs-actions.pod:1828
10161 msgid "guestfs_findfs_uuid"
10166 #: ../src/guestfs-actions.pod:1830
10170 " guestfs_findfs_uuid (guestfs_h *g,\n"
10171 " const char *uuid);\n"
10177 #: ../src/guestfs-actions.pod:1834 ../fish/guestfish-actions.pod:1246
10179 "This command searches the filesystems and returns the one which has the "
10180 "given UUID. An error is returned if no such filesystem can be found."
10185 #: ../src/guestfs-actions.pod:1838
10186 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
10191 #: ../src/guestfs-actions.pod:1845
10192 msgid "guestfs_fsck"
10197 #: ../src/guestfs-actions.pod:1847
10201 " guestfs_fsck (guestfs_h *g,\n"
10202 " const char *fstype,\n"
10203 " const char *device);\n"
10209 #: ../src/guestfs-actions.pod:1852 ../fish/guestfish-actions.pod:1256
10211 "This runs the filesystem checker (fsck) on C<device> which should have "
10212 "filesystem type C<fstype>."
10217 #: ../src/guestfs-actions.pod:1855 ../fish/guestfish-actions.pod:1259
10219 "The returned integer is the status. See L<fsck(8)> for the list of status "
10220 "codes from C<fsck>."
10225 #: ../src/guestfs-actions.pod:1864 ../fish/guestfish-actions.pod:1268
10226 msgid "Multiple status codes can be summed together."
10231 #: ../src/guestfs-actions.pod:1868 ../fish/guestfish-actions.pod:1272
10233 "A non-zero return code can mean \"success\", for example if errors have been "
10234 "corrected on the filesystem."
10239 #: ../src/guestfs-actions.pod:1873 ../fish/guestfish-actions.pod:1277
10240 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
10245 #: ../src/guestfs-actions.pod:1878 ../fish/guestfish-actions.pod:1282
10247 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
10252 #: ../src/guestfs-actions.pod:1882 ../src/guestfs-actions.pod:7408
10253 msgid "(Added in 1.0.16)"
10258 #: ../src/guestfs-actions.pod:1884
10259 msgid "guestfs_get_append"
10264 #: ../src/guestfs-actions.pod:1886
10268 " guestfs_get_append (guestfs_h *g);\n"
10274 #: ../src/guestfs-actions.pod:1889 ../fish/guestfish-actions.pod:1288
10276 "Return the additional kernel options which are added to the guest kernel "
10282 #: ../src/guestfs-actions.pod:1892 ../fish/guestfish-actions.pod:1291
10283 msgid "If C<NULL> then no options are added."
10288 #: ../src/guestfs-actions.pod:1894
10290 "This function returns a string which may be NULL. There is no way to return "
10291 "an error from this function. The string is owned by the guest handle and "
10292 "must I<not> be freed."
10297 #: ../src/guestfs-actions.pod:1898 ../src/guestfs-actions.pod:5354
10298 #: ../src/guestfs-actions.pod:5834 ../src/guestfs-actions.pod:6255
10299 #: ../src/guestfs-actions.pod:6274 ../src/guestfs-actions.pod:6290
10300 #: ../src/guestfs-actions.pod:6314 ../src/guestfs-actions.pod:7071
10301 #: ../src/guestfs-actions.pod:7089 ../src/guestfs-actions.pod:7451
10302 msgid "(Added in 1.0.26)"
10306 #: ../src/guestfs-actions.pod:1900
10307 msgid "guestfs_get_attach_method"
10311 #: ../src/guestfs-actions.pod:1902
10315 " guestfs_get_attach_method (guestfs_h *g);\n"
10320 #: ../src/guestfs-actions.pod:1905
10321 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
10326 #: ../src/guestfs-actions.pod:1910
10327 msgid "guestfs_get_autosync"
10332 #: ../src/guestfs-actions.pod:1912
10336 " guestfs_get_autosync (guestfs_h *g);\n"
10342 #: ../src/guestfs-actions.pod:1915 ../fish/guestfish-actions.pod:1303
10343 msgid "Get the autosync flag."
10348 #: ../src/guestfs-actions.pod:1921
10349 msgid "guestfs_get_direct"
10354 #: ../src/guestfs-actions.pod:1923
10358 " guestfs_get_direct (guestfs_h *g);\n"
10364 #: ../src/guestfs-actions.pod:1926 ../fish/guestfish-actions.pod:1309
10365 msgid "Return the direct appliance mode flag."
10370 #: ../src/guestfs-actions.pod:1930 ../src/guestfs-actions.pod:5903
10371 msgid "(Added in 1.0.72)"
10376 #: ../src/guestfs-actions.pod:1932
10377 msgid "guestfs_get_e2label"
10382 #: ../src/guestfs-actions.pod:1934
10386 " guestfs_get_e2label (guestfs_h *g,\n"
10387 " const char *device);\n"
10393 #: ../src/guestfs-actions.pod:1938 ../fish/guestfish-actions.pod:1315
10395 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
10400 #: ../src/guestfs-actions.pod:1944 ../fish/guestfish-actions.pod:1318
10402 "This function is deprecated. In new code, use the C<vfs_label> call instead."
10407 #: ../src/guestfs-actions.pod:1951 ../src/guestfs-actions.pod:1972
10408 #: ../src/guestfs-actions.pod:5921 ../src/guestfs-actions.pod:5940
10409 msgid "(Added in 1.0.15)"
10414 #: ../src/guestfs-actions.pod:1953
10415 msgid "guestfs_get_e2uuid"
10420 #: ../src/guestfs-actions.pod:1955
10424 " guestfs_get_e2uuid (guestfs_h *g,\n"
10425 " const char *device);\n"
10431 #: ../src/guestfs-actions.pod:1959 ../fish/guestfish-actions.pod:1329
10433 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
10438 #: ../src/guestfs-actions.pod:1965 ../fish/guestfish-actions.pod:1332
10440 "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
10445 #: ../src/guestfs-actions.pod:1974
10446 msgid "guestfs_get_memsize"
10451 #: ../src/guestfs-actions.pod:1976
10455 " guestfs_get_memsize (guestfs_h *g);\n"
10461 #: ../src/guestfs-actions.pod:1979 ../fish/guestfish-actions.pod:1343
10463 "This gets the memory size in megabytes allocated to the qemu subprocess."
10468 #: ../src/guestfs-actions.pod:1982
10470 "If C<guestfs_set_memsize> was not called on this handle, and if "
10471 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
10472 "value for memsize."
10477 #: ../src/guestfs-actions.pod:1986 ../src/guestfs-actions.pod:2067
10478 #: ../src/guestfs-actions.pod:5956 ../src/guestfs-actions.pod:6063
10479 #: ../fish/guestfish-actions.pod:1350 ../fish/guestfish-actions.pod:1401
10480 #: ../fish/guestfish-actions.pod:4017 ../fish/guestfish-actions.pod:4104
10482 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
10487 #: ../src/guestfs-actions.pod:1991 ../src/guestfs-actions.pod:4417
10488 #: ../src/guestfs-actions.pod:4614 ../src/guestfs-actions.pod:4633
10489 #: ../src/guestfs-actions.pod:4652 ../src/guestfs-actions.pod:4664
10490 #: ../src/guestfs-actions.pod:4681 ../src/guestfs-actions.pod:4694
10491 #: ../src/guestfs-actions.pod:5579 ../src/guestfs-actions.pod:5961
10492 #: ../src/guestfs-actions.pod:6222 ../src/guestfs-actions.pod:6837
10493 msgid "(Added in 1.0.55)"
10498 #: ../src/guestfs-actions.pod:1993
10499 msgid "guestfs_get_network"
10504 #: ../src/guestfs-actions.pod:1995
10508 " guestfs_get_network (guestfs_h *g);\n"
10514 #: ../src/guestfs-actions.pod:1998 ../fish/guestfish-actions.pod:1357
10515 msgid "This returns the enable network flag."
10520 #: ../src/guestfs-actions.pod:2002 ../src/guestfs-actions.pod:5980
10521 msgid "(Added in 1.5.4)"
10526 #: ../src/guestfs-actions.pod:2004
10527 msgid "guestfs_get_path"
10532 #: ../src/guestfs-actions.pod:2006
10536 " guestfs_get_path (guestfs_h *g);\n"
10542 #: ../src/guestfs-actions.pod:2009 ../fish/guestfish-actions.pod:1363
10543 msgid "Return the current search path."
10548 #: ../src/guestfs-actions.pod:2011 ../fish/guestfish-actions.pod:1365
10550 "This is always non-NULL. If it wasn't set already, then this will return "
10551 "the default path."
10556 #: ../src/guestfs-actions.pod:2014 ../src/guestfs-actions.pod:2043
10558 "This function returns a string, or NULL on error. The string is owned by "
10559 "the guest handle and must I<not> be freed."
10564 #: ../src/guestfs-actions.pod:2019
10565 msgid "guestfs_get_pid"
10570 #: ../src/guestfs-actions.pod:2021
10574 " guestfs_get_pid (guestfs_h *g);\n"
10580 #: ../src/guestfs-actions.pod:2024 ../fish/guestfish-actions.pod:1374
10582 "Return the process ID of the qemu subprocess. If there is no qemu "
10583 "subprocess, then this will return an error."
10588 #: ../src/guestfs-actions.pod:2027 ../fish/guestfish-actions.pod:1377
10589 msgid "This is an internal call used for debugging and testing."
10594 #: ../src/guestfs-actions.pod:2031
10595 msgid "(Added in 1.0.56)"
10600 #: ../src/guestfs-actions.pod:2033
10601 msgid "guestfs_get_qemu"
10606 #: ../src/guestfs-actions.pod:2035
10610 " guestfs_get_qemu (guestfs_h *g);\n"
10616 #: ../src/guestfs-actions.pod:2038 ../fish/guestfish-actions.pod:1383
10617 msgid "Return the current qemu binary."
10622 #: ../src/guestfs-actions.pod:2040 ../fish/guestfish-actions.pod:1385
10624 "This is always non-NULL. If it wasn't set already, then this will return "
10625 "the default qemu binary name."
10630 #: ../src/guestfs-actions.pod:2046 ../src/guestfs-actions.pod:6025
10631 msgid "(Added in 1.0.6)"
10636 #: ../src/guestfs-actions.pod:2048
10637 msgid "guestfs_get_recovery_proc"
10642 #: ../src/guestfs-actions.pod:2050
10646 " guestfs_get_recovery_proc (guestfs_h *g);\n"
10652 #: ../src/guestfs-actions.pod:2053 ../fish/guestfish-actions.pod:1392
10653 msgid "Return the recovery process enabled flag."
10658 #: ../src/guestfs-actions.pod:2057 ../src/guestfs-actions.pod:3527
10659 #: ../src/guestfs-actions.pod:3824 ../src/guestfs-actions.pod:4224
10660 #: ../src/guestfs-actions.pod:4256 ../src/guestfs-actions.pod:5284
10661 #: ../src/guestfs-actions.pod:5627 ../src/guestfs-actions.pod:6049
10662 #: ../src/guestfs-actions.pod:6740 ../src/guestfs-actions.pod:6760
10663 #: ../src/guestfs-actions.pod:6952
10664 msgid "(Added in 1.0.77)"
10669 #: ../src/guestfs-actions.pod:2059
10670 msgid "guestfs_get_selinux"
10675 #: ../src/guestfs-actions.pod:2061
10679 " guestfs_get_selinux (guestfs_h *g);\n"
10685 #: ../src/guestfs-actions.pod:2064
10687 "This returns the current setting of the selinux flag which is passed to the "
10688 "appliance at boot time. See C<guestfs_set_selinux>."
10693 #: ../src/guestfs-actions.pod:2072 ../src/guestfs-actions.pod:2135
10694 #: ../src/guestfs-actions.pod:6068 ../src/guestfs-actions.pod:6126
10695 msgid "(Added in 1.0.67)"
10700 #: ../src/guestfs-actions.pod:2074
10701 msgid "guestfs_get_state"
10706 #: ../src/guestfs-actions.pod:2076
10710 " guestfs_get_state (guestfs_h *g);\n"
10716 #: ../src/guestfs-actions.pod:2079 ../fish/guestfish-actions.pod:1408
10718 "This returns the current state as an opaque integer. This is only useful "
10719 "for printing debug and internal error messages."
10724 #: ../src/guestfs-actions.pod:2082 ../src/guestfs-actions.pod:3302
10725 #: ../src/guestfs-actions.pod:3331 ../src/guestfs-actions.pod:3392
10726 #: ../src/guestfs-actions.pod:3419 ../fish/guestfish-actions.pod:1411
10727 #: ../fish/guestfish-actions.pod:2325 ../fish/guestfish-actions.pod:2343
10728 #: ../fish/guestfish-actions.pod:2381 ../fish/guestfish-actions.pod:2397
10729 msgid "For more information on states, see L<guestfs(3)>."
10734 #: ../src/guestfs-actions.pod:2088
10735 msgid "guestfs_get_trace"
10740 #: ../src/guestfs-actions.pod:2090
10744 " guestfs_get_trace (guestfs_h *g);\n"
10750 #: ../src/guestfs-actions.pod:2093 ../fish/guestfish-actions.pod:1417
10751 msgid "Return the command trace flag."
10756 #: ../src/guestfs-actions.pod:2099
10757 msgid "guestfs_get_umask"
10762 #: ../src/guestfs-actions.pod:2101
10766 " guestfs_get_umask (guestfs_h *g);\n"
10772 #: ../src/guestfs-actions.pod:2104
10774 "Return the current umask. By default the umask is C<022> unless it has been "
10775 "set by calling C<guestfs_umask>."
10780 #: ../src/guestfs-actions.pod:2111
10781 msgid "guestfs_get_verbose"
10786 #: ../src/guestfs-actions.pod:2113
10790 " guestfs_get_verbose (guestfs_h *g);\n"
10796 #: ../src/guestfs-actions.pod:2116 ../fish/guestfish-actions.pod:1430
10797 msgid "This returns the verbose messages flag."
10802 #: ../src/guestfs-actions.pod:2122
10803 msgid "guestfs_getcon"
10808 #: ../src/guestfs-actions.pod:2124
10812 " guestfs_getcon (guestfs_h *g);\n"
10818 #: ../src/guestfs-actions.pod:2127 ../fish/guestfish-actions.pod:1436
10819 msgid "This gets the SELinux security context of the daemon."
10824 #: ../src/guestfs-actions.pod:2129
10826 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
10831 #: ../src/guestfs-actions.pod:2137
10832 msgid "guestfs_getxattr"
10837 #: ../src/guestfs-actions.pod:2139
10841 " guestfs_getxattr (guestfs_h *g,\n"
10842 " const char *path,\n"
10843 " const char *name,\n"
10844 " size_t *size_r);\n"
10850 #: ../src/guestfs-actions.pod:2145
10852 "Get a single extended attribute from file C<path> named C<name>. This call "
10853 "follows symlinks. If you want to lookup an extended attribute for the "
10854 "symlink itself, use C<guestfs_lgetxattr>."
10859 #: ../src/guestfs-actions.pod:2149 ../src/guestfs-actions.pod:3541
10861 "Normally it is better to get all extended attributes from a file in one go "
10862 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
10863 "implementations are buggy and do not provide a way to list out attributes. "
10864 "For these filesystems (notably ntfs-3g) you have to know the names of the "
10865 "extended attributes you want in advance and call this function."
10870 #: ../src/guestfs-actions.pod:2156 ../src/guestfs-actions.pod:3548
10871 #: ../fish/guestfish-actions.pod:1456 ../fish/guestfish-actions.pod:2477
10873 "Extended attribute values are blobs of binary data. If there is no extended "
10874 "attribute named C<name>, this returns an error."
10879 #: ../src/guestfs-actions.pod:2159
10880 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
10885 #: ../src/guestfs-actions.pod:2161 ../src/guestfs-actions.pod:2352
10886 #: ../src/guestfs-actions.pod:3553 ../src/guestfs-actions.pod:5277
10887 #: ../src/guestfs-actions.pod:5303 ../src/guestfs-actions.pod:5484
10889 "This function returns a buffer, or NULL on error. The size of the returned "
10890 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
10895 #: ../src/guestfs-actions.pod:2165 ../src/guestfs-actions.pod:3557
10896 msgid "(Added in 1.7.24)"
10901 #: ../src/guestfs-actions.pod:2167
10902 msgid "guestfs_getxattrs"
10907 #: ../src/guestfs-actions.pod:2169
10910 " struct guestfs_xattr_list *\n"
10911 " guestfs_getxattrs (guestfs_h *g,\n"
10912 " const char *path);\n"
10918 #: ../src/guestfs-actions.pod:2173 ../fish/guestfish-actions.pod:1465
10920 "This call lists the extended attributes of the file or directory C<path>."
10925 #: ../src/guestfs-actions.pod:2176 ../fish/guestfish-actions.pod:1468
10927 "At the system call level, this is a combination of the L<listxattr(2)> and "
10928 "L<getxattr(2)> calls."
10933 #: ../src/guestfs-actions.pod:2179
10934 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
10939 #: ../src/guestfs-actions.pod:2181 ../src/guestfs-actions.pod:3569
10940 #: ../src/guestfs-actions.pod:4220
10942 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
10943 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
10948 #: ../src/guestfs-actions.pod:2185 ../src/guestfs-actions.pod:3573
10949 #: ../src/guestfs-actions.pod:3738 ../src/guestfs-actions.pod:3774
10950 #: ../src/guestfs-actions.pod:5657 ../src/guestfs-actions.pod:6145
10951 #: ../src/guestfs-actions.pod:7516
10952 msgid "(Added in 1.0.59)"
10957 #: ../src/guestfs-actions.pod:2187
10958 msgid "guestfs_glob_expand"
10963 #: ../src/guestfs-actions.pod:2189
10967 " guestfs_glob_expand (guestfs_h *g,\n"
10968 " const char *pattern);\n"
10974 #: ../src/guestfs-actions.pod:2193 ../fish/guestfish-actions.pod:1477
10976 "This command searches for all the pathnames matching C<pattern> according to "
10977 "the wildcard expansion rules used by the shell."
10982 #: ../src/guestfs-actions.pod:2197 ../fish/guestfish-actions.pod:1481
10984 "If no paths match, then this returns an empty list (note: not an error)."
10989 #: ../src/guestfs-actions.pod:2200 ../fish/guestfish-actions.pod:1484
10991 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
10992 "GLOB_BRACE>. See that manual page for more details."
10997 #: ../src/guestfs-actions.pod:2208 ../src/guestfs-actions.pod:6338
10998 #: ../src/guestfs-actions.pod:6355
10999 msgid "(Added in 1.0.50)"
11004 #: ../src/guestfs-actions.pod:2210
11005 msgid "guestfs_grep"
11010 #: ../src/guestfs-actions.pod:2212
11014 " guestfs_grep (guestfs_h *g,\n"
11015 " const char *regex,\n"
11016 " const char *path);\n"
11022 #: ../src/guestfs-actions.pod:2217 ../fish/guestfish-actions.pod:1492
11023 msgid "This calls the external C<grep> program and returns the matching lines."
11028 #: ../src/guestfs-actions.pod:2229
11029 msgid "guestfs_grepi"
11034 #: ../src/guestfs-actions.pod:2231
11038 " guestfs_grepi (guestfs_h *g,\n"
11039 " const char *regex,\n"
11040 " const char *path);\n"
11046 #: ../src/guestfs-actions.pod:2236 ../fish/guestfish-actions.pod:1502
11048 "This calls the external C<grep -i> program and returns the matching lines."
11053 #: ../src/guestfs-actions.pod:2248
11054 msgid "guestfs_grub_install"
11059 #: ../src/guestfs-actions.pod:2250
11063 " guestfs_grub_install (guestfs_h *g,\n"
11064 " const char *root,\n"
11065 " const char *device);\n"
11071 #: ../src/guestfs-actions.pod:2255 ../fish/guestfish-actions.pod:1512
11073 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
11074 "the root directory being C<root>."
11079 #: ../src/guestfs-actions.pod:2258 ../fish/guestfish-actions.pod:1515
11081 "Note: If grub-install reports the error \"No suitable drive was found in the "
11082 "generated device map.\" it may be that you need to create a C</boot/grub/"
11083 "device.map> file first that contains the mapping between grub device names "
11084 "and Linux device names. It is usually sufficient to create a file "
11090 #: ../src/guestfs-actions.pod:2265 ../fish/guestfish-actions.pod:1522
11093 " (hd0) /dev/vda\n"
11099 #: ../src/guestfs-actions.pod:2267 ../fish/guestfish-actions.pod:1524
11100 msgid "replacing C</dev/vda> with the name of the installation device."
11105 #: ../src/guestfs-actions.pod:2271
11106 msgid "(Added in 1.0.17)"
11111 #: ../src/guestfs-actions.pod:2273
11112 msgid "guestfs_head"
11117 #: ../src/guestfs-actions.pod:2275
11121 " guestfs_head (guestfs_h *g,\n"
11122 " const char *path);\n"
11128 #: ../src/guestfs-actions.pod:2279 ../fish/guestfish-actions.pod:1530
11130 "This command returns up to the first 10 lines of a file as a list of strings."
11135 #: ../src/guestfs-actions.pod:2291
11136 msgid "guestfs_head_n"
11141 #: ../src/guestfs-actions.pod:2293
11145 " guestfs_head_n (guestfs_h *g,\n"
11147 " const char *path);\n"
11153 #: ../src/guestfs-actions.pod:2298 ../fish/guestfish-actions.pod:1540
11155 "If the parameter C<nrlines> is a positive number, this returns the first "
11156 "C<nrlines> lines of the file C<path>."
11161 #: ../src/guestfs-actions.pod:2301 ../fish/guestfish-actions.pod:1543
11163 "If the parameter C<nrlines> is a negative number, this returns lines from "
11164 "the file C<path>, excluding the last C<nrlines> lines."
11169 #: ../src/guestfs-actions.pod:2304 ../src/guestfs-actions.pod:6635
11170 #: ../fish/guestfish-actions.pod:1546 ../fish/guestfish-actions.pod:4482
11171 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
11176 #: ../src/guestfs-actions.pod:2315
11177 msgid "guestfs_hexdump"
11182 #: ../src/guestfs-actions.pod:2317
11186 " guestfs_hexdump (guestfs_h *g,\n"
11187 " const char *path);\n"
11193 #: ../src/guestfs-actions.pod:2321 ../fish/guestfish-actions.pod:1555
11195 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
11196 "readable, canonical hex dump of the file."
11201 #: ../src/guestfs-actions.pod:2330 ../src/guestfs-actions.pod:6419
11202 #: ../src/guestfs-actions.pod:6474
11203 msgid "(Added in 1.0.22)"
11208 #: ../src/guestfs-actions.pod:2332
11209 msgid "guestfs_initrd_cat"
11214 #: ../src/guestfs-actions.pod:2334
11218 " guestfs_initrd_cat (guestfs_h *g,\n"
11219 " const char *initrdpath,\n"
11220 " const char *filename,\n"
11221 " size_t *size_r);\n"
11227 #: ../src/guestfs-actions.pod:2340 ../fish/guestfish-actions.pod:1565
11229 "This command unpacks the file C<filename> from the initrd file called "
11230 "C<initrdpath>. The filename must be given I<without> the initial C</> "
11236 #: ../src/guestfs-actions.pod:2344 ../fish/guestfish-actions.pod:1569
11238 "For example, in guestfish you could use the following command to examine the "
11239 "boot script (usually called C</init>) contained in a Linux initrd or "
11245 #: ../src/guestfs-actions.pod:2348 ../fish/guestfish-actions.pod:1573
11248 " initrd-cat /boot/initrd-<version>.img init\n"
11254 #: ../src/guestfs-actions.pod:2350
11255 msgid "See also C<guestfs_initrd_list>."
11260 #: ../src/guestfs-actions.pod:2361
11261 msgid "guestfs_initrd_list"
11266 #: ../src/guestfs-actions.pod:2363
11270 " guestfs_initrd_list (guestfs_h *g,\n"
11271 " const char *path);\n"
11277 #: ../src/guestfs-actions.pod:2367 ../fish/guestfish-actions.pod:1584
11278 msgid "This command lists out files contained in an initrd."
11283 #: ../src/guestfs-actions.pod:2369 ../fish/guestfish-actions.pod:1586
11285 "The files are listed without any initial C</> character. The files are "
11286 "listed in the order they appear (not necessarily alphabetical). Directory "
11287 "names are listed as separate items."
11292 #: ../src/guestfs-actions.pod:2373 ../fish/guestfish-actions.pod:1590
11294 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
11295 "initrd. We I<only> support the newer initramfs format (compressed cpio "
11301 #: ../src/guestfs-actions.pod:2383
11302 msgid "guestfs_inotify_add_watch"
11307 #: ../src/guestfs-actions.pod:2385
11311 " guestfs_inotify_add_watch (guestfs_h *g,\n"
11312 " const char *path,\n"
11319 #: ../src/guestfs-actions.pod:2390 ../fish/guestfish-actions.pod:1598
11320 msgid "Watch C<path> for the events listed in C<mask>."
11325 #: ../src/guestfs-actions.pod:2392 ../fish/guestfish-actions.pod:1600
11327 "Note that if C<path> is a directory then events within that directory are "
11328 "watched, but this does I<not> happen recursively (in subdirectories)."
11333 #: ../src/guestfs-actions.pod:2396 ../fish/guestfish-actions.pod:1604
11335 "Note for non-C or non-Linux callers: the inotify events are defined by the "
11336 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
11341 #: ../src/guestfs-actions.pod:2404
11342 msgid "guestfs_inotify_close"
11347 #: ../src/guestfs-actions.pod:2406
11351 " guestfs_inotify_close (guestfs_h *g);\n"
11357 #: ../src/guestfs-actions.pod:2409 ../fish/guestfish-actions.pod:1612
11359 "This closes the inotify handle which was previously opened by inotify_init. "
11360 "It removes all watches, throws away any pending events, and deallocates all "
11366 #: ../src/guestfs-actions.pod:2417
11367 msgid "guestfs_inotify_files"
11372 #: ../src/guestfs-actions.pod:2419
11376 " guestfs_inotify_files (guestfs_h *g);\n"
11382 #: ../src/guestfs-actions.pod:2422
11384 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
11385 "returns a list of pathnames of objects that were touched. The returned "
11386 "pathnames are sorted and deduplicated."
11391 #: ../src/guestfs-actions.pod:2432
11392 msgid "guestfs_inotify_init"
11397 #: ../src/guestfs-actions.pod:2434
11401 " guestfs_inotify_init (guestfs_h *g,\n"
11402 " int maxevents);\n"
11408 #: ../src/guestfs-actions.pod:2438 ../fish/guestfish-actions.pod:1628
11410 "This command creates a new inotify handle. The inotify subsystem can be "
11411 "used to notify events which happen to objects in the guest filesystem."
11416 #: ../src/guestfs-actions.pod:2442
11418 "C<maxevents> is the maximum number of events which will be queued up between "
11419 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
11420 "passed as C<0>, then the kernel (or previously set) default is used. For "
11421 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
11422 "throws away events, but records the fact that it threw them away by setting "
11423 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
11424 "C<guestfs_inotify_read>)."
11429 #: ../src/guestfs-actions.pod:2452
11431 "Before any events are generated, you have to add some watches to the "
11432 "internal watch list. See: C<guestfs_inotify_add_watch>, "
11433 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
11438 #: ../src/guestfs-actions.pod:2458
11440 "Queued up events should be read periodically by calling "
11441 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
11442 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
11443 "often enough then you risk the internal queue overflowing."
11448 #: ../src/guestfs-actions.pod:2465
11450 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
11451 "This also removes any watches automatically."
11456 #: ../src/guestfs-actions.pod:2469 ../fish/guestfish-actions.pod:1659
11458 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
11459 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
11460 "that there is one global inotify handle per libguestfs instance."
11465 #: ../src/guestfs-actions.pod:2478
11466 msgid "guestfs_inotify_read"
11471 #: ../src/guestfs-actions.pod:2480
11474 " struct guestfs_inotify_event_list *\n"
11475 " guestfs_inotify_read (guestfs_h *g);\n"
11481 #: ../src/guestfs-actions.pod:2483 ../fish/guestfish-actions.pod:1668
11483 "Return the complete queue of events that have happened since the previous "
11489 #: ../src/guestfs-actions.pod:2486 ../fish/guestfish-actions.pod:1671
11490 msgid "If no events have happened, this returns an empty list."
11495 #: ../src/guestfs-actions.pod:2488 ../fish/guestfish-actions.pod:1673
11497 "I<Note>: In order to make sure that all events have been read, you must call "
11498 "this function repeatedly until it returns an empty list. The reason is that "
11499 "the call will read events up to the maximum appliance-to-host message size "
11500 "and leave remaining events in the queue."
11505 #: ../src/guestfs-actions.pod:2494
11507 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
11508 "there was an error. I<The caller must call "
11509 "C<guestfs_free_inotify_event_list> after use>."
11514 #: ../src/guestfs-actions.pod:2500
11515 msgid "guestfs_inotify_rm_watch"
11520 #: ../src/guestfs-actions.pod:2502
11524 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
11531 #: ../src/guestfs-actions.pod:2506
11533 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
11538 #: ../src/guestfs-actions.pod:2513
11539 msgid "guestfs_inspect_get_arch"
11544 #: ../src/guestfs-actions.pod:2515
11548 " guestfs_inspect_get_arch (guestfs_h *g,\n"
11549 " const char *root);\n"
11555 #: ../src/guestfs-actions.pod:2519 ../src/guestfs-actions.pod:2542
11556 #: ../src/guestfs-actions.pod:2635 ../src/guestfs-actions.pod:2679
11557 #: ../src/guestfs-actions.pod:2705 ../src/guestfs-actions.pod:2744
11558 #: ../src/guestfs-actions.pod:2766 ../src/guestfs-actions.pod:2793
11559 #: ../src/guestfs-actions.pod:2814 ../src/guestfs-actions.pod:2857
11560 #: ../src/guestfs-actions.pod:2886 ../src/guestfs-actions.pod:2917
11561 #: ../src/guestfs-actions.pod:2941 ../src/guestfs-actions.pod:2996
11562 #: ../src/guestfs-actions.pod:3038 ../src/guestfs-actions.pod:3059
11563 #: ../src/guestfs-actions.pod:3082 ../src/guestfs-actions.pod:3099
11564 #: ../src/guestfs-actions.pod:3116 ../src/guestfs-actions.pod:3135
11566 "This function should only be called with a root device string as returned by "
11567 "C<guestfs_inspect_os>."
11572 #: ../src/guestfs-actions.pod:2522
11574 "This returns the architecture of the inspected operating system. The "
11575 "possible return values are listed under C<guestfs_file_architecture>."
11580 #: ../src/guestfs-actions.pod:2526 ../fish/guestfish-actions.pod:1697
11582 "If the architecture could not be determined, then the string C<unknown> is "
11588 #: ../src/guestfs-actions.pod:2529 ../src/guestfs-actions.pod:2622
11589 #: ../src/guestfs-actions.pod:2733 ../src/guestfs-actions.pod:2753
11590 #: ../src/guestfs-actions.pod:2781 ../src/guestfs-actions.pod:2873
11591 #: ../src/guestfs-actions.pod:2904 ../src/guestfs-actions.pod:2928
11592 #: ../src/guestfs-actions.pod:2982 ../src/guestfs-actions.pod:3025
11593 #: ../src/guestfs-actions.pod:3048 ../src/guestfs-actions.pod:3069
11594 #: ../src/guestfs-actions.pod:3089 ../src/guestfs-actions.pod:3106
11595 #: ../src/guestfs-actions.pod:3125 ../src/guestfs-actions.pod:3228
11596 #: ../src/guestfs-actions.pod:3269 ../fish/guestfish-actions.pod:1700
11597 #: ../fish/guestfish-actions.pod:1786 ../fish/guestfish-actions.pod:1874
11598 #: ../fish/guestfish-actions.pod:1889 ../fish/guestfish-actions.pod:1910
11599 #: ../fish/guestfish-actions.pod:1980 ../fish/guestfish-actions.pod:2004
11600 #: ../fish/guestfish-actions.pod:2021 ../fish/guestfish-actions.pod:2064
11601 #: ../fish/guestfish-actions.pod:2099 ../fish/guestfish-actions.pod:2115
11602 #: ../fish/guestfish-actions.pod:2131 ../fish/guestfish-actions.pod:2144
11603 #: ../fish/guestfish-actions.pod:2157 ../fish/guestfish-actions.pod:2172
11604 #: ../fish/guestfish-actions.pod:2271 ../fish/guestfish-actions.pod:2305
11605 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
11610 #: ../src/guestfs-actions.pod:2536
11611 msgid "guestfs_inspect_get_distro"
11616 #: ../src/guestfs-actions.pod:2538
11620 " guestfs_inspect_get_distro (guestfs_h *g,\n"
11621 " const char *root);\n"
11627 #: ../src/guestfs-actions.pod:2545 ../fish/guestfish-actions.pod:1709
11629 "This returns the distro (distribution) of the inspected operating system."
11634 #: ../src/guestfs-actions.pod:2548 ../fish/guestfish-actions.pod:1712
11635 msgid "Currently defined distros are:"
11640 #: ../src/guestfs-actions.pod:2552 ../fish/guestfish-actions.pod:1716
11641 msgid "\"archlinux\""
11646 #: ../src/guestfs-actions.pod:2554 ../fish/guestfish-actions.pod:1718
11647 msgid "Arch Linux."
11651 #: ../src/guestfs-actions.pod:2556 ../fish/guestfish-actions.pod:1720
11656 #: ../src/guestfs-actions.pod:2558 ../fish/guestfish-actions.pod:1722
11662 #: ../src/guestfs-actions.pod:2560 ../fish/guestfish-actions.pod:1724
11668 #: ../src/guestfs-actions.pod:2562 ../fish/guestfish-actions.pod:1726
11674 #: ../src/guestfs-actions.pod:2564 ../fish/guestfish-actions.pod:1728
11680 #: ../src/guestfs-actions.pod:2566 ../fish/guestfish-actions.pod:1730
11686 #: ../src/guestfs-actions.pod:2568 ../fish/guestfish-actions.pod:1732
11692 #: ../src/guestfs-actions.pod:2570 ../fish/guestfish-actions.pod:1734
11698 #: ../src/guestfs-actions.pod:2572 ../fish/guestfish-actions.pod:1736
11699 msgid "\"linuxmint\""
11704 #: ../src/guestfs-actions.pod:2574 ../fish/guestfish-actions.pod:1738
11705 msgid "Linux Mint."
11710 #: ../src/guestfs-actions.pod:2576 ../fish/guestfish-actions.pod:1740
11711 msgid "\"mandriva\""
11716 #: ../src/guestfs-actions.pod:2578 ../fish/guestfish-actions.pod:1742
11722 #: ../src/guestfs-actions.pod:2580 ../fish/guestfish-actions.pod:1744
11728 #: ../src/guestfs-actions.pod:2582 ../fish/guestfish-actions.pod:1746
11734 #: ../src/guestfs-actions.pod:2584 ../fish/guestfish-actions.pod:1748
11740 #: ../src/guestfs-actions.pod:2586 ../fish/guestfish-actions.pod:1750
11746 #: ../src/guestfs-actions.pod:2588 ../fish/guestfish-actions.pod:1752
11747 msgid "\"redhat-based\""
11752 #: ../src/guestfs-actions.pod:2590 ../fish/guestfish-actions.pod:1754
11753 msgid "Some Red Hat-derived distro."
11758 #: ../src/guestfs-actions.pod:2592 ../fish/guestfish-actions.pod:1756
11763 #: ../src/guestfs-actions.pod:2594 ../fish/guestfish-actions.pod:1758
11764 msgid "Red Hat Enterprise Linux."
11768 #: ../src/guestfs-actions.pod:2596 ../fish/guestfish-actions.pod:1760
11769 msgid "\"scientificlinux\""
11773 #: ../src/guestfs-actions.pod:2598 ../fish/guestfish-actions.pod:1762
11774 msgid "Scientific Linux."
11778 #: ../src/guestfs-actions.pod:2600 ../fish/guestfish-actions.pod:1764
11779 msgid "\"slackware\""
11783 #: ../src/guestfs-actions.pod:2602 ../fish/guestfish-actions.pod:1766
11789 #: ../src/guestfs-actions.pod:2604 ../fish/guestfish-actions.pod:1768
11795 #: ../src/guestfs-actions.pod:2606 ../fish/guestfish-actions.pod:1770
11801 #: ../src/guestfs-actions.pod:2608 ../src/guestfs-actions.pod:2724
11802 #: ../src/guestfs-actions.pod:3016 ../fish/guestfish-actions.pod:1772
11803 #: ../fish/guestfish-actions.pod:1865 ../fish/guestfish-actions.pod:2090
11804 msgid "\"unknown\""
11809 #: ../src/guestfs-actions.pod:2610 ../fish/guestfish-actions.pod:1774
11810 msgid "The distro could not be determined."
11815 #: ../src/guestfs-actions.pod:2612 ../src/guestfs-actions.pod:3008
11816 #: ../fish/guestfish-actions.pod:1776 ../fish/guestfish-actions.pod:2082
11817 msgid "\"windows\""
11822 #: ../src/guestfs-actions.pod:2614 ../fish/guestfish-actions.pod:1778
11824 "Windows does not have distributions. This string is returned if the OS type "
11830 #: ../src/guestfs-actions.pod:2619 ../src/guestfs-actions.pod:2730
11831 #: ../src/guestfs-actions.pod:3022 ../fish/guestfish-actions.pod:1783
11832 #: ../fish/guestfish-actions.pod:1871 ../fish/guestfish-actions.pod:2096
11834 "Future versions of libguestfs may return other strings here. The caller "
11835 "should be prepared to handle any string."
11839 #: ../src/guestfs-actions.pod:2629
11840 msgid "guestfs_inspect_get_drive_mappings"
11844 #: ../src/guestfs-actions.pod:2631
11848 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
11849 " const char *root);\n"
11854 #: ../src/guestfs-actions.pod:2638 ../fish/guestfish-actions.pod:1795
11856 "This call is useful for Windows which uses a primitive system of assigning "
11857 "drive letters (like \"C:\") to partitions. This inspection API examines the "
11858 "Windows Registry to find out how disks/partitions are mapped to drive "
11859 "letters, and returns a hash table as in the example below:"
11863 #: ../src/guestfs-actions.pod:2644 ../fish/guestfish-actions.pod:1801
11866 " C => /dev/vda2\n"
11867 " E => /dev/vdb1\n"
11868 " F => /dev/vdc1\n"
11873 #: ../src/guestfs-actions.pod:2648 ../fish/guestfish-actions.pod:1805
11875 "Note that keys are drive letters. For Windows, the key is case insensitive "
11876 "and just contains the drive letter, without the customary colon separator "
11881 #: ../src/guestfs-actions.pod:2652 ../fish/guestfish-actions.pod:1809
11883 "In future we may support other operating systems that also used drive "
11884 "letters, but the keys for those might not be case insensitive and might be "
11885 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
11890 #: ../src/guestfs-actions.pod:2657 ../fish/guestfish-actions.pod:1814
11892 "For Windows guests, currently only hard drive mappings are returned. "
11893 "Removable disks (eg. DVD-ROMs) are ignored."
11897 #: ../src/guestfs-actions.pod:2660 ../fish/guestfish-actions.pod:1817
11899 "For guests that do not use drive mappings, or if the drive mappings could "
11900 "not be determined, this returns an empty hash table."
11904 #: ../src/guestfs-actions.pod:2663
11906 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
11907 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
11912 #: ../src/guestfs-actions.pod:2667 ../src/guestfs-actions.pod:2843
11913 #: ../src/guestfs-actions.pod:3626 ../src/guestfs-actions.pod:4843
11914 #: ../src/guestfs-actions.pod:6776
11916 "This function returns a NULL-terminated array of strings, or NULL if there "
11917 "was an error. The array of strings will always have length C<2n+1>, where "
11918 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
11919 "caller must free the strings and the array after use>."
11924 #: ../src/guestfs-actions.pod:2673
11925 msgid "guestfs_inspect_get_filesystems"
11930 #: ../src/guestfs-actions.pod:2675
11934 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
11935 " const char *root);\n"
11941 #: ../src/guestfs-actions.pod:2682 ../fish/guestfish-actions.pod:1831
11943 "This returns a list of all the filesystems that we think are associated with "
11944 "this operating system. This includes the root filesystem, other ordinary "
11945 "filesystems, and non-mounted devices like swap partitions."
11950 #: ../src/guestfs-actions.pod:2687 ../fish/guestfish-actions.pod:1836
11952 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
11953 "to be shared between operating systems."
11958 #: ../src/guestfs-actions.pod:2690
11960 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
11961 "C<guestfs_inspect_get_mountpoints>."
11965 #: ../src/guestfs-actions.pod:2699
11966 msgid "guestfs_inspect_get_format"
11970 #: ../src/guestfs-actions.pod:2701
11974 " guestfs_inspect_get_format (guestfs_h *g,\n"
11975 " const char *root);\n"
11980 #: ../src/guestfs-actions.pod:2708 ../fish/guestfish-actions.pod:1849
11982 "This returns the format of the inspected operating system. You can use it "
11983 "to detect install images, live CDs and similar."
11987 #: ../src/guestfs-actions.pod:2711 ../fish/guestfish-actions.pod:1852
11988 msgid "Currently defined formats are:"
11992 #: ../src/guestfs-actions.pod:2715 ../fish/guestfish-actions.pod:1856
11993 msgid "\"installed\""
11997 #: ../src/guestfs-actions.pod:2717 ../fish/guestfish-actions.pod:1858
11998 msgid "This is an installed operating system."
12002 #: ../src/guestfs-actions.pod:2719 ../fish/guestfish-actions.pod:1860
12003 msgid "\"installer\""
12007 #: ../src/guestfs-actions.pod:2721 ../fish/guestfish-actions.pod:1862
12009 "The disk image being inspected is not an installed operating system, but a "
12010 "I<bootable> install disk, live CD, or similar."
12014 #: ../src/guestfs-actions.pod:2726 ../fish/guestfish-actions.pod:1867
12015 msgid "The format of this disk image is not known."
12020 #: ../src/guestfs-actions.pod:2738
12021 msgid "guestfs_inspect_get_hostname"
12026 #: ../src/guestfs-actions.pod:2740
12030 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
12031 " const char *root);\n"
12037 #: ../src/guestfs-actions.pod:2747 ../fish/guestfish-actions.pod:1883
12039 "This function returns the hostname of the operating system as found by "
12040 "inspection of the guest's configuration files."
12045 #: ../src/guestfs-actions.pod:2750 ../fish/guestfish-actions.pod:1886
12047 "If the hostname could not be determined, then the string C<unknown> is "
12053 #: ../src/guestfs-actions.pod:2758
12054 msgid "(Added in 1.7.9)"
12059 #: ../src/guestfs-actions.pod:2760
12060 msgid "guestfs_inspect_get_major_version"
12065 #: ../src/guestfs-actions.pod:2762
12069 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
12070 " const char *root);\n"
12076 #: ../src/guestfs-actions.pod:2769 ../fish/guestfish-actions.pod:1898
12078 "This returns the major version number of the inspected operating system."
12083 #: ../src/guestfs-actions.pod:2772 ../fish/guestfish-actions.pod:1901
12085 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
12086 "popular public names used by the operating system. Notably the operating "
12087 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
12088 "1). You can find out the real versions corresponding to releases of Windows "
12089 "by consulting Wikipedia or MSDN."
12094 #: ../src/guestfs-actions.pod:2779 ../src/guestfs-actions.pod:2799
12095 #: ../fish/guestfish-actions.pod:1908 ../fish/guestfish-actions.pod:1922
12096 msgid "If the version could not be determined, then C<0> is returned."
12101 #: ../src/guestfs-actions.pod:2787
12102 msgid "guestfs_inspect_get_minor_version"
12107 #: ../src/guestfs-actions.pod:2789
12111 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
12112 " const char *root);\n"
12118 #: ../src/guestfs-actions.pod:2796 ../fish/guestfish-actions.pod:1919
12120 "This returns the minor version number of the inspected operating system."
12125 #: ../src/guestfs-actions.pod:2801
12127 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
12128 "C<guestfs_inspect_get_major_version>."
12133 #: ../src/guestfs-actions.pod:2808
12134 msgid "guestfs_inspect_get_mountpoints"
12139 #: ../src/guestfs-actions.pod:2810
12143 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
12144 " const char *root);\n"
12149 #: ../src/guestfs-actions.pod:2817 ../fish/guestfish-actions.pod:1934
12151 "This returns a hash of where we think the filesystems associated with this "
12152 "operating system should be mounted. Callers should note that this is at "
12153 "best an educated guess made by reading configuration files such as C</etc/"
12154 "fstab>. I<In particular note> that this may return filesystems which are "
12155 "non-existent or not mountable and callers should be prepared to handle or "
12156 "ignore failures if they try to mount them."
12161 #: ../src/guestfs-actions.pod:2826 ../fish/guestfish-actions.pod:1943
12163 "Each element in the returned hashtable has a key which is the path of the "
12164 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
12165 "mounted there (eg. C</dev/sda1>)."
12170 #: ../src/guestfs-actions.pod:2831 ../fish/guestfish-actions.pod:1948
12172 "Non-mounted devices such as swap devices are I<not> returned in this list."
12176 #: ../src/guestfs-actions.pod:2834
12178 "For operating systems like Windows which still use drive letters, this call "
12179 "will only return an entry for the first drive \"mounted on\" C</>. For "
12180 "information about the mapping of drive letters to partitions, see "
12181 "C<guestfs_inspect_get_drive_mappings>."
12186 #: ../src/guestfs-actions.pod:2840
12188 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
12189 "C<guestfs_inspect_get_filesystems>."
12194 #: ../src/guestfs-actions.pod:2851
12195 msgid "guestfs_inspect_get_package_format"
12200 #: ../src/guestfs-actions.pod:2853
12204 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
12205 " const char *root);\n"
12211 #: ../src/guestfs-actions.pod:2860
12213 "This function and C<guestfs_inspect_get_package_management> return the "
12214 "package format and package management tool used by the inspected operating "
12215 "system. For example for Fedora these functions would return C<rpm> (package "
12216 "format) and C<yum> (package management)."
12221 #: ../src/guestfs-actions.pod:2866 ../fish/guestfish-actions.pod:1973
12223 "This returns the string C<unknown> if we could not determine the package "
12224 "format I<or> if the operating system does not have a real packaging system "
12230 #: ../src/guestfs-actions.pod:2870 ../fish/guestfish-actions.pod:1977
12232 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>. "
12233 "Future versions of libguestfs may return other strings."
12238 #: ../src/guestfs-actions.pod:2878 ../src/guestfs-actions.pod:2909
12239 msgid "(Added in 1.7.5)"
12244 #: ../src/guestfs-actions.pod:2880
12245 msgid "guestfs_inspect_get_package_management"
12250 #: ../src/guestfs-actions.pod:2882
12254 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
12255 " const char *root);\n"
12261 #: ../src/guestfs-actions.pod:2889
12263 "C<guestfs_inspect_get_package_format> and this function return the package "
12264 "format and package management tool used by the inspected operating system. "
12265 "For example for Fedora these functions would return C<rpm> (package format) "
12266 "and C<yum> (package management)."
12271 #: ../src/guestfs-actions.pod:2895 ../fish/guestfish-actions.pod:1995
12273 "This returns the string C<unknown> if we could not determine the package "
12274 "management tool I<or> if the operating system does not have a real packaging "
12275 "system (eg. Windows)."
12280 #: ../src/guestfs-actions.pod:2899 ../fish/guestfish-actions.pod:1999
12282 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
12283 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>. Future versions of "
12284 "libguestfs may return other strings."
12289 #: ../src/guestfs-actions.pod:2911
12290 msgid "guestfs_inspect_get_product_name"
12295 #: ../src/guestfs-actions.pod:2913
12299 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
12300 " const char *root);\n"
12306 #: ../src/guestfs-actions.pod:2920 ../fish/guestfish-actions.pod:2013
12308 "This returns the product name of the inspected operating system. The "
12309 "product name is generally some freeform string which can be displayed to the "
12310 "user, but should not be parsed by programs."
12315 #: ../src/guestfs-actions.pod:2925 ../fish/guestfish-actions.pod:2018
12317 "If the product name could not be determined, then the string C<unknown> is "
12322 #: ../src/guestfs-actions.pod:2935
12323 msgid "guestfs_inspect_get_product_variant"
12327 #: ../src/guestfs-actions.pod:2937
12331 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
12332 " const char *root);\n"
12337 #: ../src/guestfs-actions.pod:2944 ../fish/guestfish-actions.pod:2030
12338 msgid "This returns the product variant of the inspected operating system."
12342 #: ../src/guestfs-actions.pod:2947 ../fish/guestfish-actions.pod:2033
12344 "For Windows guests, this returns the contents of the Registry key C<HKLM"
12345 "\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> which "
12346 "is usually a string such as C<Client> or C<Server> (other values are "
12347 "possible). This can be used to distinguish consumer and enterprise versions "
12348 "of Windows that have the same version number (for example, Windows 7 and "
12349 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
12350 "the latter is C<Server>)."
12354 #: ../src/guestfs-actions.pod:2956 ../fish/guestfish-actions.pod:2042
12356 "For enterprise Linux guests, in future we intend this to return the product "
12357 "variant such as C<Desktop>, C<Server> and so on. But this is not "
12358 "implemented at present."
12362 #: ../src/guestfs-actions.pod:2960 ../fish/guestfish-actions.pod:2046
12364 "If the product variant could not be determined, then the string C<unknown> "
12369 #: ../src/guestfs-actions.pod:2963
12371 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
12372 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
12377 #: ../src/guestfs-actions.pod:2970
12378 msgid "guestfs_inspect_get_roots"
12383 #: ../src/guestfs-actions.pod:2972
12387 " guestfs_inspect_get_roots (guestfs_h *g);\n"
12393 #: ../src/guestfs-actions.pod:2975
12395 "This function is a convenient way to get the list of root devices, as "
12396 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
12397 "the whole inspection process."
12402 #: ../src/guestfs-actions.pod:2979
12404 "This returns an empty list if either no root devices were found or the "
12405 "caller has not called C<guestfs_inspect_os>."
12410 #: ../src/guestfs-actions.pod:2988
12411 msgid "(Added in 1.7.3)"
12416 #: ../src/guestfs-actions.pod:2990
12417 msgid "guestfs_inspect_get_type"
12422 #: ../src/guestfs-actions.pod:2992
12426 " guestfs_inspect_get_type (guestfs_h *g,\n"
12427 " const char *root);\n"
12433 #: ../src/guestfs-actions.pod:2999 ../fish/guestfish-actions.pod:2073
12435 "This returns the type of the inspected operating system. Currently defined "
12441 #: ../src/guestfs-actions.pod:3004 ../fish/guestfish-actions.pod:2078
12447 #: ../src/guestfs-actions.pod:3006 ../fish/guestfish-actions.pod:2080
12448 msgid "Any Linux-based operating system."
12453 #: ../src/guestfs-actions.pod:3010 ../fish/guestfish-actions.pod:2084
12454 msgid "Any Microsoft Windows operating system."
12459 #: ../src/guestfs-actions.pod:3012 ../fish/guestfish-actions.pod:2086
12460 msgid "\"freebsd\""
12465 #: ../src/guestfs-actions.pod:3014 ../fish/guestfish-actions.pod:2088
12471 #: ../src/guestfs-actions.pod:3018 ../fish/guestfish-actions.pod:2092
12472 msgid "The operating system type could not be determined."
12476 #: ../src/guestfs-actions.pod:3032
12477 msgid "guestfs_inspect_get_windows_current_control_set"
12481 #: ../src/guestfs-actions.pod:3034
12485 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
12486 " const char *root);\n"
12491 #: ../src/guestfs-actions.pod:3041 ../fish/guestfish-actions.pod:2108
12493 "This returns the Windows CurrentControlSet of the inspected guest. The "
12494 "CurrentControlSet is a registry key name such as C<ControlSet001>."
12498 #: ../src/guestfs-actions.pod:3044 ../fish/guestfish-actions.pod:2111
12500 "This call assumes that the guest is Windows and that the Registry could be "
12501 "examined by inspection. If this is not the case then an error is returned."
12506 #: ../src/guestfs-actions.pod:3053
12507 msgid "guestfs_inspect_get_windows_systemroot"
12512 #: ../src/guestfs-actions.pod:3055
12516 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
12517 " const char *root);\n"
12523 #: ../src/guestfs-actions.pod:3062 ../fish/guestfish-actions.pod:2124
12525 "This returns the Windows systemroot of the inspected guest. The systemroot "
12526 "is a directory path such as C</WINDOWS>."
12531 #: ../src/guestfs-actions.pod:3065 ../fish/guestfish-actions.pod:2127
12533 "This call assumes that the guest is Windows and that the systemroot could be "
12534 "determined by inspection. If this is not the case then an error is returned."
12539 #: ../src/guestfs-actions.pod:3074
12540 msgid "(Added in 1.5.25)"
12544 #: ../src/guestfs-actions.pod:3076
12545 msgid "guestfs_inspect_is_live"
12549 #: ../src/guestfs-actions.pod:3078
12553 " guestfs_inspect_is_live (guestfs_h *g,\n"
12554 " const char *root);\n"
12559 #: ../src/guestfs-actions.pod:3085
12561 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
12562 "disk), then this returns true if a live image was detected on the disk."
12566 #: ../src/guestfs-actions.pod:3093
12567 msgid "guestfs_inspect_is_multipart"
12571 #: ../src/guestfs-actions.pod:3095
12575 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
12576 " const char *root);\n"
12581 #: ../src/guestfs-actions.pod:3102
12583 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
12584 "disk), then this returns true if the disk is part of a set."
12588 #: ../src/guestfs-actions.pod:3110
12589 msgid "guestfs_inspect_is_netinst"
12593 #: ../src/guestfs-actions.pod:3112
12597 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
12598 " const char *root);\n"
12603 #: ../src/guestfs-actions.pod:3119
12605 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
12606 "disk), then this returns true if the disk is a network installer, ie. not a "
12607 "self-contained install CD but one which is likely to require network access "
12608 "to complete the install."
12613 #: ../src/guestfs-actions.pod:3129
12614 msgid "guestfs_inspect_list_applications"
12619 #: ../src/guestfs-actions.pod:3131
12622 " struct guestfs_application_list *\n"
12623 " guestfs_inspect_list_applications (guestfs_h *g,\n"
12624 " const char *root);\n"
12630 #: ../src/guestfs-actions.pod:3138 ../fish/guestfish-actions.pod:2181
12631 msgid "Return the list of applications installed in the operating system."
12636 #: ../src/guestfs-actions.pod:3140
12638 "I<Note:> This call works differently from other parts of the inspection "
12639 "API. You have to call C<guestfs_inspect_os>, then "
12640 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
12641 "this. Listing applications is a significantly more difficult operation "
12642 "which requires access to the full filesystem. Also note that unlike the "
12643 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
12644 "the libguestfs handle, this call actually reads parts of the mounted "
12645 "filesystems during the call."
12650 #: ../src/guestfs-actions.pod:3150 ../fish/guestfish-actions.pod:2193
12652 "This returns an empty list if the inspection code was not able to determine "
12653 "the list of applications."
12658 #: ../src/guestfs-actions.pod:3153 ../fish/guestfish-actions.pod:2196
12659 msgid "The application structure contains the following fields:"
12664 #: ../src/guestfs-actions.pod:3157 ../fish/guestfish-actions.pod:2200
12665 msgid "C<app_name>"
12670 #: ../src/guestfs-actions.pod:3159 ../fish/guestfish-actions.pod:2202
12672 "The name of the application. For Red Hat-derived and Debian-derived Linux "
12673 "guests, this is the package name."
12678 #: ../src/guestfs-actions.pod:3162 ../fish/guestfish-actions.pod:2205
12679 msgid "C<app_display_name>"
12684 #: ../src/guestfs-actions.pod:3164 ../fish/guestfish-actions.pod:2207
12686 "The display name of the application, sometimes localized to the install "
12687 "language of the guest operating system."
12692 #: ../src/guestfs-actions.pod:3167 ../fish/guestfish-actions.pod:2210
12694 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
12695 "to display something can use C<app_name> instead."
12700 #: ../src/guestfs-actions.pod:3170 ../fish/guestfish-actions.pod:2213
12701 msgid "C<app_epoch>"
12706 #: ../src/guestfs-actions.pod:3172 ../fish/guestfish-actions.pod:2215
12708 "For package managers which use epochs, this contains the epoch of the "
12709 "package (an integer). If unavailable, this is returned as C<0>."
12714 #: ../src/guestfs-actions.pod:3175 ../fish/guestfish-actions.pod:2218
12715 msgid "C<app_version>"
12720 #: ../src/guestfs-actions.pod:3177 ../fish/guestfish-actions.pod:2220
12722 "The version string of the application or package. If unavailable this is "
12723 "returned as an empty string C<\"\">."
12728 #: ../src/guestfs-actions.pod:3180 ../fish/guestfish-actions.pod:2223
12729 msgid "C<app_release>"
12734 #: ../src/guestfs-actions.pod:3182 ../fish/guestfish-actions.pod:2225
12736 "The release string of the application or package, for package managers that "
12737 "use this. If unavailable this is returned as an empty string C<\"\">."
12742 #: ../src/guestfs-actions.pod:3186 ../fish/guestfish-actions.pod:2229
12743 msgid "C<app_install_path>"
12748 #: ../src/guestfs-actions.pod:3188 ../fish/guestfish-actions.pod:2231
12750 "The installation path of the application (on operating systems such as "
12751 "Windows which use installation paths). This path is in the format used by "
12752 "the guest operating system, it is not a libguestfs path."
12757 #: ../src/guestfs-actions.pod:3193 ../fish/guestfish-actions.pod:2236
12758 msgid "If unavailable this is returned as an empty string C<\"\">."
12763 #: ../src/guestfs-actions.pod:3195 ../fish/guestfish-actions.pod:2238
12764 msgid "C<app_trans_path>"
12769 #: ../src/guestfs-actions.pod:3197 ../fish/guestfish-actions.pod:2240
12771 "The install path translated into a libguestfs path. If unavailable this is "
12772 "returned as an empty string C<\"\">."
12777 #: ../src/guestfs-actions.pod:3200 ../fish/guestfish-actions.pod:2243
12778 msgid "C<app_publisher>"
12783 #: ../src/guestfs-actions.pod:3202 ../fish/guestfish-actions.pod:2245
12785 "The name of the publisher of the application, for package managers that use "
12786 "this. If unavailable this is returned as an empty string C<\"\">."
12791 #: ../src/guestfs-actions.pod:3206 ../fish/guestfish-actions.pod:2249
12797 #: ../src/guestfs-actions.pod:3208 ../fish/guestfish-actions.pod:2251
12799 "The URL (eg. upstream URL) of the application. If unavailable this is "
12800 "returned as an empty string C<\"\">."
12805 #: ../src/guestfs-actions.pod:3211 ../fish/guestfish-actions.pod:2254
12806 msgid "C<app_source_package>"
12811 #: ../src/guestfs-actions.pod:3213 ../fish/guestfish-actions.pod:2256
12813 "For packaging systems which support this, the name of the source package. "
12814 "If unavailable this is returned as an empty string C<\"\">."
12819 #: ../src/guestfs-actions.pod:3216 ../fish/guestfish-actions.pod:2259
12820 msgid "C<app_summary>"
12825 #: ../src/guestfs-actions.pod:3218 ../fish/guestfish-actions.pod:2261
12827 "A short (usually one line) description of the application or package. If "
12828 "unavailable this is returned as an empty string C<\"\">."
12833 #: ../src/guestfs-actions.pod:3221 ../fish/guestfish-actions.pod:2264
12834 msgid "C<app_description>"
12839 #: ../src/guestfs-actions.pod:3223 ../fish/guestfish-actions.pod:2266
12841 "A longer description of the application or package. If unavailable this is "
12842 "returned as an empty string C<\"\">."
12847 #: ../src/guestfs-actions.pod:3230
12849 "This function returns a C<struct guestfs_application_list *>, or NULL if "
12850 "there was an error. I<The caller must call C<guestfs_free_application_list> "
12856 #: ../src/guestfs-actions.pod:3234
12857 msgid "(Added in 1.7.8)"
12862 #: ../src/guestfs-actions.pod:3236
12863 msgid "guestfs_inspect_os"
12868 #: ../src/guestfs-actions.pod:3238
12872 " guestfs_inspect_os (guestfs_h *g);\n"
12878 #: ../src/guestfs-actions.pod:3241 ../fish/guestfish-actions.pod:2277
12880 "This function uses other libguestfs functions and certain heuristics to "
12881 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
12882 "for operating systems."
12887 #: ../src/guestfs-actions.pod:3245 ../fish/guestfish-actions.pod:2281
12888 msgid "The list returned is empty if no operating systems were found."
12893 #: ../src/guestfs-actions.pod:3247 ../fish/guestfish-actions.pod:2283
12895 "If one operating system was found, then this returns a list with a single "
12896 "element, which is the name of the root filesystem of this operating system. "
12897 "It is also possible for this function to return a list containing more than "
12898 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
12899 "element being the root filesystem of one of the operating systems."
12904 #: ../src/guestfs-actions.pod:3254
12906 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
12907 "functions in order to query further information about each operating system, "
12908 "such as the name and version."
12913 #: ../src/guestfs-actions.pod:3259
12915 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
12916 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
12917 "the contents. This should be called with no disks currently mounted. The "
12918 "function may also use Augeas, so any existing Augeas handle will be closed."
12923 #: ../src/guestfs-actions.pod:3265 ../fish/guestfish-actions.pod:2301
12925 "This function cannot decrypt encrypted disks. The caller must do that first "
12926 "(supplying the necessary keys) if the disk is encrypted."
12931 #: ../src/guestfs-actions.pod:3271 ../src/guestfs-actions.pod:3584
12932 #: ../src/guestfs-actions.pod:3646
12933 msgid "See also C<guestfs_list_filesystems>."
12938 #: ../src/guestfs-actions.pod:3279
12939 msgid "guestfs_is_blockdev"
12944 #: ../src/guestfs-actions.pod:3281
12948 " guestfs_is_blockdev (guestfs_h *g,\n"
12949 " const char *path);\n"
12955 #: ../src/guestfs-actions.pod:3285 ../fish/guestfish-actions.pod:2313
12957 "This returns C<true> if and only if there is a block device with the given "
12963 #: ../src/guestfs-actions.pod:3288 ../src/guestfs-actions.pod:3317
12964 #: ../src/guestfs-actions.pod:3347 ../src/guestfs-actions.pod:3362
12965 #: ../src/guestfs-actions.pod:3378 ../src/guestfs-actions.pod:3434
12966 #: ../src/guestfs-actions.pod:3449
12967 msgid "See also C<guestfs_stat>."
12972 #: ../src/guestfs-actions.pod:3292 ../src/guestfs-actions.pod:3321
12973 #: ../src/guestfs-actions.pod:3366 ../src/guestfs-actions.pod:3438
12974 #: ../src/guestfs-actions.pod:3453
12975 msgid "(Added in 1.5.10)"
12980 #: ../src/guestfs-actions.pod:3294
12981 msgid "guestfs_is_busy"
12986 #: ../src/guestfs-actions.pod:3296
12990 " guestfs_is_busy (guestfs_h *g);\n"
12996 #: ../src/guestfs-actions.pod:3299 ../fish/guestfish-actions.pod:2322
12998 "This returns true iff this handle is busy processing a command (in the "
13004 #: ../src/guestfs-actions.pod:3308
13005 msgid "guestfs_is_chardev"
13010 #: ../src/guestfs-actions.pod:3310
13014 " guestfs_is_chardev (guestfs_h *g,\n"
13015 " const char *path);\n"
13021 #: ../src/guestfs-actions.pod:3314 ../fish/guestfish-actions.pod:2331
13023 "This returns C<true> if and only if there is a character device with the "
13024 "given C<path> name."
13029 #: ../src/guestfs-actions.pod:3323
13030 msgid "guestfs_is_config"
13035 #: ../src/guestfs-actions.pod:3325
13039 " guestfs_is_config (guestfs_h *g);\n"
13045 #: ../src/guestfs-actions.pod:3328 ../fish/guestfish-actions.pod:2340
13047 "This returns true iff this handle is being configured (in the C<CONFIG> "
13053 #: ../src/guestfs-actions.pod:3337
13054 msgid "guestfs_is_dir"
13059 #: ../src/guestfs-actions.pod:3339
13063 " guestfs_is_dir (guestfs_h *g,\n"
13064 " const char *path);\n"
13070 #: ../src/guestfs-actions.pod:3343 ../fish/guestfish-actions.pod:2349
13072 "This returns C<true> if and only if there is a directory with the given "
13073 "C<path> name. Note that it returns false for other objects like files."
13078 #: ../src/guestfs-actions.pod:3353
13079 msgid "guestfs_is_fifo"
13084 #: ../src/guestfs-actions.pod:3355
13088 " guestfs_is_fifo (guestfs_h *g,\n"
13089 " const char *path);\n"
13095 #: ../src/guestfs-actions.pod:3359 ../fish/guestfish-actions.pod:2359
13097 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
13098 "given C<path> name."
13103 #: ../src/guestfs-actions.pod:3368
13104 msgid "guestfs_is_file"
13109 #: ../src/guestfs-actions.pod:3370
13113 " guestfs_is_file (guestfs_h *g,\n"
13114 " const char *path);\n"
13120 #: ../src/guestfs-actions.pod:3374 ../fish/guestfish-actions.pod:2368
13122 "This returns C<true> if and only if there is a regular file with the given "
13123 "C<path> name. Note that it returns false for other objects like directories."
13128 #: ../src/guestfs-actions.pod:3384
13129 msgid "guestfs_is_launching"
13134 #: ../src/guestfs-actions.pod:3386
13138 " guestfs_is_launching (guestfs_h *g);\n"
13144 #: ../src/guestfs-actions.pod:3389 ../fish/guestfish-actions.pod:2378
13146 "This returns true iff this handle is launching the subprocess (in the "
13147 "C<LAUNCHING> state)."
13152 #: ../src/guestfs-actions.pod:3398
13153 msgid "guestfs_is_lv"
13158 #: ../src/guestfs-actions.pod:3400
13162 " guestfs_is_lv (guestfs_h *g,\n"
13163 " const char *device);\n"
13169 #: ../src/guestfs-actions.pod:3404 ../fish/guestfish-actions.pod:2387
13171 "This command tests whether C<device> is a logical volume, and returns true "
13172 "iff this is the case."
13177 #: ../src/guestfs-actions.pod:3411
13178 msgid "guestfs_is_ready"
13183 #: ../src/guestfs-actions.pod:3413
13187 " guestfs_is_ready (guestfs_h *g);\n"
13193 #: ../src/guestfs-actions.pod:3416 ../fish/guestfish-actions.pod:2394
13195 "This returns true iff this handle is ready to accept commands (in the "
13201 #: ../src/guestfs-actions.pod:3425
13202 msgid "guestfs_is_socket"
13207 #: ../src/guestfs-actions.pod:3427
13211 " guestfs_is_socket (guestfs_h *g,\n"
13212 " const char *path);\n"
13218 #: ../src/guestfs-actions.pod:3431 ../fish/guestfish-actions.pod:2403
13220 "This returns C<true> if and only if there is a Unix domain socket with the "
13221 "given C<path> name."
13226 #: ../src/guestfs-actions.pod:3440
13227 msgid "guestfs_is_symlink"
13232 #: ../src/guestfs-actions.pod:3442
13236 " guestfs_is_symlink (guestfs_h *g,\n"
13237 " const char *path);\n"
13243 #: ../src/guestfs-actions.pod:3446 ../fish/guestfish-actions.pod:2412
13245 "This returns C<true> if and only if there is a symbolic link with the given "
13250 #: ../src/guestfs-actions.pod:3455
13251 msgid "guestfs_is_zero"
13255 #: ../src/guestfs-actions.pod:3457
13259 " guestfs_is_zero (guestfs_h *g,\n"
13260 " const char *path);\n"
13265 #: ../src/guestfs-actions.pod:3461 ../fish/guestfish-actions.pod:2421
13267 "This returns true iff the file exists and the file is empty or it contains "
13272 #: ../src/guestfs-actions.pod:3466
13273 msgid "guestfs_is_zero_device"
13277 #: ../src/guestfs-actions.pod:3468
13281 " guestfs_is_zero_device (guestfs_h *g,\n"
13282 " const char *device);\n"
13287 #: ../src/guestfs-actions.pod:3472 ../fish/guestfish-actions.pod:2428
13288 msgid "This returns true iff the device exists and contains all zero bytes."
13292 #: ../src/guestfs-actions.pod:3474 ../fish/guestfish-actions.pod:2430
13293 msgid "Note that for large devices this can take a long time to run."
13298 #: ../src/guestfs-actions.pod:3478
13299 msgid "guestfs_kill_subprocess"
13304 #: ../src/guestfs-actions.pod:3480
13308 " guestfs_kill_subprocess (guestfs_h *g);\n"
13314 #: ../src/guestfs-actions.pod:3483 ../fish/guestfish-actions.pod:2436
13315 msgid "This kills the qemu subprocess. You should never need to call this."
13320 #: ../src/guestfs-actions.pod:3489
13321 msgid "guestfs_launch"
13326 #: ../src/guestfs-actions.pod:3491
13330 " guestfs_launch (guestfs_h *g);\n"
13336 #: ../src/guestfs-actions.pod:3494 ../fish/guestfish-actions.pod:2444
13338 "Internally libguestfs is implemented by running a virtual machine using "
13344 #: ../src/guestfs-actions.pod:3497 ../fish/guestfish-actions.pod:2447
13346 "You should call this after configuring the handle (eg. adding drives) but "
13347 "before performing any actions."
13352 #: ../src/guestfs-actions.pod:3509
13353 msgid "guestfs_lchown"
13358 #: ../src/guestfs-actions.pod:3511
13362 " guestfs_lchown (guestfs_h *g,\n"
13365 " const char *path);\n"
13371 #: ../src/guestfs-actions.pod:3517
13373 "Change the file owner to C<owner> and group to C<group>. This is like "
13374 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
13375 "changed, not the target."
13380 #: ../src/guestfs-actions.pod:3529
13381 msgid "guestfs_lgetxattr"
13386 #: ../src/guestfs-actions.pod:3531
13390 " guestfs_lgetxattr (guestfs_h *g,\n"
13391 " const char *path,\n"
13392 " const char *name,\n"
13393 " size_t *size_r);\n"
13399 #: ../src/guestfs-actions.pod:3537 ../fish/guestfish-actions.pod:2466
13401 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
13402 "is a symlink, then this call returns an extended attribute from the symlink."
13407 #: ../src/guestfs-actions.pod:3551
13408 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
13413 #: ../src/guestfs-actions.pod:3559
13414 msgid "guestfs_lgetxattrs"
13419 #: ../src/guestfs-actions.pod:3561
13422 " struct guestfs_xattr_list *\n"
13423 " guestfs_lgetxattrs (guestfs_h *g,\n"
13424 " const char *path);\n"
13430 #: ../src/guestfs-actions.pod:3565
13432 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
13433 "then it returns the extended attributes of the link itself."
13438 #: ../src/guestfs-actions.pod:3575
13439 msgid "guestfs_list_devices"
13444 #: ../src/guestfs-actions.pod:3577
13448 " guestfs_list_devices (guestfs_h *g);\n"
13454 #: ../src/guestfs-actions.pod:3580 ../fish/guestfish-actions.pod:2494
13455 msgid "List all the block devices."
13460 #: ../src/guestfs-actions.pod:3582 ../fish/guestfish-actions.pod:2496
13461 msgid "The full block device names are returned, eg. C</dev/sda>."
13466 #: ../src/guestfs-actions.pod:3592
13467 msgid "guestfs_list_filesystems"
13472 #: ../src/guestfs-actions.pod:3594
13476 " guestfs_list_filesystems (guestfs_h *g);\n"
13482 #: ../src/guestfs-actions.pod:3597 ../fish/guestfish-actions.pod:2504
13484 "This inspection command looks for filesystems on partitions, block devices "
13485 "and logical volumes, returning a list of devices containing filesystems and "
13491 #: ../src/guestfs-actions.pod:3601 ../fish/guestfish-actions.pod:2508
13493 "The return value is a hash, where the keys are the devices containing "
13494 "filesystems, and the values are the filesystem types. For example:"
13499 #: ../src/guestfs-actions.pod:3605 ../fish/guestfish-actions.pod:2512
13502 " \"/dev/sda1\" => \"ntfs\"\n"
13503 " \"/dev/sda2\" => \"ext2\"\n"
13504 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
13505 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
13511 #: ../src/guestfs-actions.pod:3610 ../fish/guestfish-actions.pod:2517
13513 "The value can have the special value \"unknown\", meaning the content of the "
13514 "device is undetermined or empty. \"swap\" means a Linux swap partition."
13519 #: ../src/guestfs-actions.pod:3614
13521 "This command runs other libguestfs commands, which might include "
13522 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
13523 "soon after launch and only when nothing is mounted."
13528 #: ../src/guestfs-actions.pod:3618
13530 "Not all of the filesystems returned will be mountable. In particular, swap "
13531 "partitions are returned in the list. Also this command does not check that "
13532 "each filesystem found is valid and mountable, and some filesystems might be "
13533 "mountable but require special options. Filesystems may not all belong to a "
13534 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
13539 #: ../src/guestfs-actions.pod:3632 ../src/guestfs-actions.pod:5244
13540 msgid "(Added in 1.5.15)"
13545 #: ../src/guestfs-actions.pod:3634
13546 msgid "guestfs_list_partitions"
13551 #: ../src/guestfs-actions.pod:3636
13555 " guestfs_list_partitions (guestfs_h *g);\n"
13561 #: ../src/guestfs-actions.pod:3639 ../fish/guestfish-actions.pod:2537
13562 msgid "List all the partitions detected on all block devices."
13567 #: ../src/guestfs-actions.pod:3641 ../fish/guestfish-actions.pod:2539
13568 msgid "The full partition device names are returned, eg. C</dev/sda1>"
13573 #: ../src/guestfs-actions.pod:3643
13575 "This does not return logical volumes. For that you will need to call "
13581 #: ../src/guestfs-actions.pod:3654
13587 #: ../src/guestfs-actions.pod:3656
13591 " guestfs_ll (guestfs_h *g,\n"
13592 " const char *directory);\n"
13598 #: ../src/guestfs-actions.pod:3660 ../fish/guestfish-actions.pod:2550
13600 "List the files in C<directory> (relative to the root directory, there is no "
13601 "cwd) in the format of 'ls -la'."
13606 #: ../src/guestfs-actions.pod:3663 ../fish/guestfish-actions.pod:2553
13608 "This command is mostly useful for interactive sessions. It is I<not> "
13609 "intended that you try to parse the output string."
13614 #: ../src/guestfs-actions.pod:3671
13620 #: ../src/guestfs-actions.pod:3673
13624 " guestfs_ln (guestfs_h *g,\n"
13625 " const char *target,\n"
13626 " const char *linkname);\n"
13632 #: ../src/guestfs-actions.pod:3678 ../fish/guestfish-actions.pod:2560
13633 msgid "This command creates a hard link using the C<ln> command."
13638 #: ../src/guestfs-actions.pod:3684
13639 msgid "guestfs_ln_f"
13644 #: ../src/guestfs-actions.pod:3686
13648 " guestfs_ln_f (guestfs_h *g,\n"
13649 " const char *target,\n"
13650 " const char *linkname);\n"
13655 #: ../src/guestfs-actions.pod:3691 ../fish/guestfish-actions.pod:2566
13657 "This command creates a hard link using the C<ln -f> command. The I<-f> "
13658 "option removes the link (C<linkname>) if it exists already."
13663 #: ../src/guestfs-actions.pod:3698
13664 msgid "guestfs_ln_s"
13669 #: ../src/guestfs-actions.pod:3700
13673 " guestfs_ln_s (guestfs_h *g,\n"
13674 " const char *target,\n"
13675 " const char *linkname);\n"
13681 #: ../src/guestfs-actions.pod:3705 ../fish/guestfish-actions.pod:2573
13682 msgid "This command creates a symbolic link using the C<ln -s> command."
13687 #: ../src/guestfs-actions.pod:3711
13688 msgid "guestfs_ln_sf"
13693 #: ../src/guestfs-actions.pod:3713
13697 " guestfs_ln_sf (guestfs_h *g,\n"
13698 " const char *target,\n"
13699 " const char *linkname);\n"
13704 #: ../src/guestfs-actions.pod:3718 ../fish/guestfish-actions.pod:2579
13706 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
13707 "option removes the link (C<linkname>) if it exists already."
13712 #: ../src/guestfs-actions.pod:3725
13713 msgid "guestfs_lremovexattr"
13718 #: ../src/guestfs-actions.pod:3727
13722 " guestfs_lremovexattr (guestfs_h *g,\n"
13723 " const char *xattr,\n"
13724 " const char *path);\n"
13730 #: ../src/guestfs-actions.pod:3732
13732 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
13733 "link, then it removes an extended attribute of the link itself."
13738 #: ../src/guestfs-actions.pod:3740
13744 #: ../src/guestfs-actions.pod:3742
13748 " guestfs_ls (guestfs_h *g,\n"
13749 " const char *directory);\n"
13755 #: ../src/guestfs-actions.pod:3746 ../fish/guestfish-actions.pod:2594
13757 "List the files in C<directory> (relative to the root directory, there is no "
13758 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
13763 #: ../src/guestfs-actions.pod:3750
13765 "This command is mostly useful for interactive sessions. Programs should "
13766 "probably use C<guestfs_readdir> instead."
13771 #: ../src/guestfs-actions.pod:3759
13772 msgid "guestfs_lsetxattr"
13777 #: ../src/guestfs-actions.pod:3761
13781 " guestfs_lsetxattr (guestfs_h *g,\n"
13782 " const char *xattr,\n"
13783 " const char *val,\n"
13785 " const char *path);\n"
13791 #: ../src/guestfs-actions.pod:3768
13793 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
13794 "then it sets an extended attribute of the link itself."
13799 #: ../src/guestfs-actions.pod:3776
13800 msgid "guestfs_lstat"
13805 #: ../src/guestfs-actions.pod:3778
13808 " struct guestfs_stat *\n"
13809 " guestfs_lstat (guestfs_h *g,\n"
13810 " const char *path);\n"
13816 #: ../src/guestfs-actions.pod:3782 ../src/guestfs-actions.pod:6375
13817 #: ../fish/guestfish-actions.pod:2613 ../fish/guestfish-actions.pod:4317
13818 msgid "Returns file information for the given C<path>."
13823 #: ../src/guestfs-actions.pod:3784
13825 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
13826 "link, then the link is stat-ed, not the file it refers to."
13831 #: ../src/guestfs-actions.pod:3788 ../fish/guestfish-actions.pod:2619
13832 msgid "This is the same as the C<lstat(2)> system call."
13837 #: ../src/guestfs-actions.pod:3790 ../src/guestfs-actions.pod:6379
13839 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
13840 "error. I<The caller must call C<guestfs_free_stat> after use>."
13845 #: ../src/guestfs-actions.pod:3794 ../src/guestfs-actions.pod:6383
13846 #: ../src/guestfs-actions.pod:6401 ../src/guestfs-actions.pod:6782
13847 msgid "(Added in 0.9.2)"
13852 #: ../src/guestfs-actions.pod:3796
13853 msgid "guestfs_lstatlist"
13858 #: ../src/guestfs-actions.pod:3798
13861 " struct guestfs_stat_list *\n"
13862 " guestfs_lstatlist (guestfs_h *g,\n"
13863 " const char *path,\n"
13864 " char *const *names);\n"
13870 #: ../src/guestfs-actions.pod:3803
13872 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
13873 "files, where all files are in the directory C<path>. C<names> is the list "
13874 "of files from this directory."
13879 #: ../src/guestfs-actions.pod:3807 ../fish/guestfish-actions.pod:2629
13881 "On return you get a list of stat structs, with a one-to-one correspondence "
13882 "to the C<names> list. If any name did not exist or could not be lstat'd, "
13883 "then the C<ino> field of that structure is set to C<-1>."
13888 #: ../src/guestfs-actions.pod:3812
13890 "This call is intended for programs that want to efficiently list a directory "
13891 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
13892 "for a similarly efficient call for getting extended attributes. Very long "
13893 "directory listings might cause the protocol message size to be exceeded, "
13894 "causing this call to fail. The caller must split up such requests into "
13895 "smaller groups of names."
13900 #: ../src/guestfs-actions.pod:3820
13902 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
13903 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
13908 #: ../src/guestfs-actions.pod:3826
13909 msgid "guestfs_luks_add_key"
13914 #: ../src/guestfs-actions.pod:3828
13918 " guestfs_luks_add_key (guestfs_h *g,\n"
13919 " const char *device,\n"
13920 " const char *key,\n"
13921 " const char *newkey,\n"
13928 #: ../src/guestfs-actions.pod:3835 ../fish/guestfish-actions.pod:2646
13930 "This command adds a new key on LUKS device C<device>. C<key> is any "
13931 "existing key, and is used to access the device. C<newkey> is the new key to "
13932 "add. C<keyslot> is the key slot that will be replaced."
13937 #: ../src/guestfs-actions.pod:3840
13939 "Note that if C<keyslot> already contains a key, then this command will "
13940 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
13945 #: ../src/guestfs-actions.pod:3846 ../src/guestfs-actions.pod:3886
13946 #: ../src/guestfs-actions.pod:3909 ../src/guestfs-actions.pod:3929
13947 #: ../src/guestfs-actions.pod:3961 ../src/guestfs-actions.pod:3980
13949 "This function takes a key or passphrase parameter which could contain "
13950 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
13956 #: ../src/guestfs-actions.pod:3850 ../src/guestfs-actions.pod:3890
13957 #: ../src/guestfs-actions.pod:3913 ../src/guestfs-actions.pod:3933
13958 msgid "(Added in 1.5.2)"
13963 #: ../src/guestfs-actions.pod:3852
13964 msgid "guestfs_luks_close"
13969 #: ../src/guestfs-actions.pod:3854
13973 " guestfs_luks_close (guestfs_h *g,\n"
13974 " const char *device);\n"
13980 #: ../src/guestfs-actions.pod:3858
13982 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
13983 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
13984 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
13985 "underlying block device."
13990 #: ../src/guestfs-actions.pod:3866 ../src/guestfs-actions.pod:3965
13991 #: ../src/guestfs-actions.pod:3984 ../src/guestfs-actions.pod:4034
13992 #: ../src/guestfs-actions.pod:4082
13993 msgid "(Added in 1.5.1)"
13998 #: ../src/guestfs-actions.pod:3868
13999 msgid "guestfs_luks_format"
14004 #: ../src/guestfs-actions.pod:3870
14008 " guestfs_luks_format (guestfs_h *g,\n"
14009 " const char *device,\n"
14010 " const char *key,\n"
14017 #: ../src/guestfs-actions.pod:3876 ../fish/guestfish-actions.pod:2672
14019 "This command erases existing data on C<device> and formats the device as a "
14020 "LUKS encrypted device. C<key> is the initial key, which is added to key "
14021 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
14026 #: ../src/guestfs-actions.pod:3883 ../src/guestfs-actions.pod:3906
14027 #: ../src/guestfs-actions.pod:4046 ../src/guestfs-actions.pod:4995
14028 #: ../src/guestfs-actions.pod:5775 ../src/guestfs-actions.pod:6182
14029 #: ../src/guestfs-actions.pod:6212 ../src/guestfs-actions.pod:6245
14030 #: ../src/guestfs-actions.pod:7427 ../fish/guestfish-actions.pod:2680
14031 #: ../fish/guestfish-actions.pod:2693 ../fish/guestfish-actions.pod:2777
14032 #: ../fish/guestfish-actions.pod:3358 ../fish/guestfish-actions.pod:3878
14033 #: ../fish/guestfish-actions.pod:4188 ../fish/guestfish-actions.pod:4211
14034 #: ../fish/guestfish-actions.pod:4233 ../fish/guestfish-actions.pod:4963
14036 "B<This command is dangerous. Without careful use you can easily destroy all "
14042 #: ../src/guestfs-actions.pod:3892
14043 msgid "guestfs_luks_format_cipher"
14048 #: ../src/guestfs-actions.pod:3894
14052 " guestfs_luks_format_cipher (guestfs_h *g,\n"
14053 " const char *device,\n"
14054 " const char *key,\n"
14056 " const char *cipher);\n"
14062 #: ../src/guestfs-actions.pod:3901
14064 "This command is the same as C<guestfs_luks_format> but it also allows you to "
14065 "set the C<cipher> used."
14070 #: ../src/guestfs-actions.pod:3915
14071 msgid "guestfs_luks_kill_slot"
14076 #: ../src/guestfs-actions.pod:3917
14080 " guestfs_luks_kill_slot (guestfs_h *g,\n"
14081 " const char *device,\n"
14082 " const char *key,\n"
14089 #: ../src/guestfs-actions.pod:3923 ../fish/guestfish-actions.pod:2700
14091 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
14092 "device C<device>. C<key> must be one of the I<other> keys."
14097 #: ../src/guestfs-actions.pod:3935
14098 msgid "guestfs_luks_open"
14103 #: ../src/guestfs-actions.pod:3937
14107 " guestfs_luks_open (guestfs_h *g,\n"
14108 " const char *device,\n"
14109 " const char *key,\n"
14110 " const char *mapname);\n"
14116 #: ../src/guestfs-actions.pod:3943 ../fish/guestfish-actions.pod:2711
14118 "This command opens a block device which has been encrypted according to the "
14119 "Linux Unified Key Setup (LUKS) standard."
14124 #: ../src/guestfs-actions.pod:3946 ../fish/guestfish-actions.pod:2714
14125 msgid "C<device> is the encrypted block device or partition."
14130 #: ../src/guestfs-actions.pod:3948 ../fish/guestfish-actions.pod:2716
14132 "The caller must supply one of the keys associated with the LUKS block "
14133 "device, in the C<key> parameter."
14138 #: ../src/guestfs-actions.pod:3951 ../fish/guestfish-actions.pod:2719
14140 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
14141 "writes to this block device are decrypted from and encrypted to the "
14142 "underlying C<device> respectively."
14147 #: ../src/guestfs-actions.pod:3955
14149 "If this block device contains LVM volume groups, then calling "
14150 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
14156 #: ../src/guestfs-actions.pod:3967
14157 msgid "guestfs_luks_open_ro"
14162 #: ../src/guestfs-actions.pod:3969
14166 " guestfs_luks_open_ro (guestfs_h *g,\n"
14167 " const char *device,\n"
14168 " const char *key,\n"
14169 " const char *mapname);\n"
14175 #: ../src/guestfs-actions.pod:3975
14177 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
14183 #: ../src/guestfs-actions.pod:3986
14184 msgid "guestfs_lvcreate"
14189 #: ../src/guestfs-actions.pod:3988
14193 " guestfs_lvcreate (guestfs_h *g,\n"
14194 " const char *logvol,\n"
14195 " const char *volgroup,\n"
14202 #: ../src/guestfs-actions.pod:3994 ../fish/guestfish-actions.pod:2744
14204 "This creates an LVM logical volume called C<logvol> on the volume group "
14205 "C<volgroup>, with C<size> megabytes."
14210 #: ../src/guestfs-actions.pod:4001
14211 msgid "guestfs_lvm_canonical_lv_name"
14216 #: ../src/guestfs-actions.pod:4003
14220 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
14221 " const char *lvname);\n"
14227 #: ../src/guestfs-actions.pod:4007 ../fish/guestfish-actions.pod:2751
14229 "This converts alternative naming schemes for LVs that you might find to the "
14230 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
14236 #: ../src/guestfs-actions.pod:4011 ../fish/guestfish-actions.pod:2755
14238 "This command returns an error if the C<lvname> parameter does not refer to a "
14244 #: ../src/guestfs-actions.pod:4014
14245 msgid "See also C<guestfs_is_lv>."
14250 #: ../src/guestfs-actions.pod:4019
14251 msgid "(Added in 1.5.24)"
14256 #: ../src/guestfs-actions.pod:4021
14257 msgid "guestfs_lvm_clear_filter"
14262 #: ../src/guestfs-actions.pod:4023
14266 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
14272 #: ../src/guestfs-actions.pod:4026
14274 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
14275 "see every block device."
14280 #: ../src/guestfs-actions.pod:4029 ../src/guestfs-actions.pod:4071
14281 #: ../fish/guestfish-actions.pod:2767 ../fish/guestfish-actions.pod:2798
14283 "This command also clears the LVM cache and performs a volume group scan."
14288 #: ../src/guestfs-actions.pod:4036
14289 msgid "guestfs_lvm_remove_all"
14294 #: ../src/guestfs-actions.pod:4038
14298 " guestfs_lvm_remove_all (guestfs_h *g);\n"
14304 #: ../src/guestfs-actions.pod:4041 ../fish/guestfish-actions.pod:2774
14306 "This command removes all LVM logical volumes, volume groups and physical "
14312 #: ../src/guestfs-actions.pod:4051
14313 msgid "guestfs_lvm_set_filter"
14318 #: ../src/guestfs-actions.pod:4053
14322 " guestfs_lvm_set_filter (guestfs_h *g,\n"
14323 " char *const *devices);\n"
14329 #: ../src/guestfs-actions.pod:4057 ../fish/guestfish-actions.pod:2784
14331 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
14332 "block devices in the list C<devices>, and will ignore all other attached "
14338 #: ../src/guestfs-actions.pod:4061 ../fish/guestfish-actions.pod:2788
14340 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
14341 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
14342 "there are two types of duplication possible: either cloned PVs/VGs which "
14343 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
14344 "same name. In normal operation you cannot create this situation, but you "
14345 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
14346 "inside the LVM metadata."
14351 #: ../src/guestfs-actions.pod:4074 ../fish/guestfish-actions.pod:2801
14352 msgid "You can filter whole block devices or individual partitions."
14357 #: ../src/guestfs-actions.pod:4076 ../fish/guestfish-actions.pod:2803
14359 "You cannot use this if any VG is currently in use (eg. contains a mounted "
14360 "filesystem), even if you are not filtering out that VG."
14365 #: ../src/guestfs-actions.pod:4084
14366 msgid "guestfs_lvremove"
14371 #: ../src/guestfs-actions.pod:4086
14375 " guestfs_lvremove (guestfs_h *g,\n"
14376 " const char *device);\n"
14382 #: ../src/guestfs-actions.pod:4090 ../fish/guestfish-actions.pod:2811
14384 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
14385 "LV, such as C</dev/VG/LV>."
14390 #: ../src/guestfs-actions.pod:4093 ../fish/guestfish-actions.pod:2814
14392 "You can also remove all LVs in a volume group by specifying the VG name, C</"
14398 #: ../src/guestfs-actions.pod:4098 ../src/guestfs-actions.pod:5341
14399 #: ../src/guestfs-actions.pod:7158
14400 msgid "(Added in 1.0.13)"
14405 #: ../src/guestfs-actions.pod:4100
14406 msgid "guestfs_lvrename"
14411 #: ../src/guestfs-actions.pod:4102
14415 " guestfs_lvrename (guestfs_h *g,\n"
14416 " const char *logvol,\n"
14417 " const char *newlogvol);\n"
14423 #: ../src/guestfs-actions.pod:4107 ../fish/guestfish-actions.pod:2821
14424 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
14429 #: ../src/guestfs-actions.pod:4111 ../src/guestfs-actions.pod:7171
14430 msgid "(Added in 1.0.83)"
14435 #: ../src/guestfs-actions.pod:4113
14436 msgid "guestfs_lvresize"
14441 #: ../src/guestfs-actions.pod:4115
14445 " guestfs_lvresize (guestfs_h *g,\n"
14446 " const char *device,\n"
14453 #: ../src/guestfs-actions.pod:4120 ../fish/guestfish-actions.pod:2827
14455 "This resizes (expands or shrinks) an existing LVM logical volume to "
14456 "C<mbytes>. When reducing, data in the reduced part is lost."
14461 #: ../src/guestfs-actions.pod:4128
14462 msgid "guestfs_lvresize_free"
14467 #: ../src/guestfs-actions.pod:4130
14471 " guestfs_lvresize_free (guestfs_h *g,\n"
14472 " const char *lv,\n"
14479 #: ../src/guestfs-actions.pod:4135 ../fish/guestfish-actions.pod:2835
14481 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
14482 "remaining free space in the volume group. Commonly you would call this with "
14483 "pc = 100 which expands the logical volume as much as possible, using all "
14484 "remaining free space in the volume group."
14489 #: ../src/guestfs-actions.pod:4143
14490 msgid "(Added in 1.3.3)"
14495 #: ../src/guestfs-actions.pod:4145
14496 msgid "guestfs_lvs"
14501 #: ../src/guestfs-actions.pod:4147
14505 " guestfs_lvs (guestfs_h *g);\n"
14511 #: ../src/guestfs-actions.pod:4150 ../fish/guestfish-actions.pod:2845
14513 "List all the logical volumes detected. This is the equivalent of the L<lvs"
14519 #: ../src/guestfs-actions.pod:4153 ../fish/guestfish-actions.pod:2848
14521 "This returns a list of the logical volume device names (eg. C</dev/"
14522 "VolGroup00/LogVol00>)."
14527 #: ../src/guestfs-actions.pod:4156
14528 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
14533 #: ../src/guestfs-actions.pod:4164
14534 msgid "guestfs_lvs_full"
14539 #: ../src/guestfs-actions.pod:4166
14542 " struct guestfs_lvm_lv_list *\n"
14543 " guestfs_lvs_full (guestfs_h *g);\n"
14549 #: ../src/guestfs-actions.pod:4169 ../fish/guestfish-actions.pod:2857
14551 "List all the logical volumes detected. This is the equivalent of the L<lvs"
14552 "(8)> command. The \"full\" version includes all fields."
14557 #: ../src/guestfs-actions.pod:4172
14559 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
14560 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after use>."
14565 #: ../src/guestfs-actions.pod:4178
14566 msgid "guestfs_lvuuid"
14571 #: ../src/guestfs-actions.pod:4180
14575 " guestfs_lvuuid (guestfs_h *g,\n"
14576 " const char *device);\n"
14582 #: ../src/guestfs-actions.pod:4184 ../fish/guestfish-actions.pod:2864
14583 msgid "This command returns the UUID of the LVM LV C<device>."
14588 #: ../src/guestfs-actions.pod:4191
14589 msgid "guestfs_lxattrlist"
14594 #: ../src/guestfs-actions.pod:4193
14597 " struct guestfs_xattr_list *\n"
14598 " guestfs_lxattrlist (guestfs_h *g,\n"
14599 " const char *path,\n"
14600 " char *const *names);\n"
14606 #: ../src/guestfs-actions.pod:4198 ../fish/guestfish-actions.pod:2870
14608 "This call allows you to get the extended attributes of multiple files, where "
14609 "all files are in the directory C<path>. C<names> is the list of files from "
14615 #: ../src/guestfs-actions.pod:4202 ../fish/guestfish-actions.pod:2874
14617 "On return you get a flat list of xattr structs which must be interpreted "
14618 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
14619 "C<attrval> in this struct is zero-length to indicate there was an error "
14620 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
14621 "number (the number of following attributes for this file, which could be C<"
14622 "\"0\">). Then after the first xattr struct are the zero or more attributes "
14623 "for the first named file. This repeats for the second and subsequent files."
14628 #: ../src/guestfs-actions.pod:4212
14630 "This call is intended for programs that want to efficiently list a directory "
14631 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
14632 "a similarly efficient call for getting standard stats. Very long directory "
14633 "listings might cause the protocol message size to be exceeded, causing this "
14634 "call to fail. The caller must split up such requests into smaller groups of "
14640 #: ../src/guestfs-actions.pod:4226
14641 msgid "guestfs_mkdir"
14646 #: ../src/guestfs-actions.pod:4228
14650 " guestfs_mkdir (guestfs_h *g,\n"
14651 " const char *path);\n"
14657 #: ../src/guestfs-actions.pod:4232 ../fish/guestfish-actions.pod:2896
14658 msgid "Create a directory named C<path>."
14663 #: ../src/guestfs-actions.pod:4238
14664 msgid "guestfs_mkdir_mode"
14669 #: ../src/guestfs-actions.pod:4240
14673 " guestfs_mkdir_mode (guestfs_h *g,\n"
14674 " const char *path,\n"
14681 #: ../src/guestfs-actions.pod:4245 ../fish/guestfish-actions.pod:2902
14683 "This command creates a directory, setting the initial permissions of the "
14684 "directory to C<mode>."
14689 #: ../src/guestfs-actions.pod:4248 ../fish/guestfish-actions.pod:2905
14691 "For common Linux filesystems, the actual mode which is set will be C<mode & "
14692 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
14698 #: ../src/guestfs-actions.pod:4252
14699 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
14704 #: ../src/guestfs-actions.pod:4258
14705 msgid "guestfs_mkdir_p"
14710 #: ../src/guestfs-actions.pod:4260
14714 " guestfs_mkdir_p (guestfs_h *g,\n"
14715 " const char *path);\n"
14721 #: ../src/guestfs-actions.pod:4264 ../fish/guestfish-actions.pod:2915
14723 "Create a directory named C<path>, creating any parent directories as "
14724 "necessary. This is like the C<mkdir -p> shell command."
14729 #: ../src/guestfs-actions.pod:4271
14730 msgid "guestfs_mkdtemp"
14735 #: ../src/guestfs-actions.pod:4273
14739 " guestfs_mkdtemp (guestfs_h *g,\n"
14740 " const char *template);\n"
14746 #: ../src/guestfs-actions.pod:4277 ../fish/guestfish-actions.pod:2922
14748 "This command creates a temporary directory. The C<template> parameter "
14749 "should be a full pathname for the temporary directory name with the final "
14750 "six characters being \"XXXXXX\"."
14755 #: ../src/guestfs-actions.pod:4282 ../fish/guestfish-actions.pod:2927
14757 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
14758 "being suitable for Windows filesystems."
14763 #: ../src/guestfs-actions.pod:4285 ../fish/guestfish-actions.pod:2930
14764 msgid "The name of the temporary directory that was created is returned."
14769 #: ../src/guestfs-actions.pod:4288 ../fish/guestfish-actions.pod:2933
14770 msgid "The temporary directory is created with mode 0700 and is owned by root."
14775 #: ../src/guestfs-actions.pod:4291 ../fish/guestfish-actions.pod:2936
14777 "The caller is responsible for deleting the temporary directory and its "
14778 "contents after use."
14783 #: ../src/guestfs-actions.pod:4294 ../fish/guestfish-actions.pod:2939
14784 msgid "See also: L<mkdtemp(3)>"
14789 #: ../src/guestfs-actions.pod:4301
14790 msgid "guestfs_mke2fs_J"
14795 #: ../src/guestfs-actions.pod:4303
14799 " guestfs_mke2fs_J (guestfs_h *g,\n"
14800 " const char *fstype,\n"
14801 " int blocksize,\n"
14802 " const char *device,\n"
14803 " const char *journal);\n"
14809 #: ../src/guestfs-actions.pod:4310 ../fish/guestfish-actions.pod:2945
14811 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
14812 "C<journal>. It is equivalent to the command:"
14817 #: ../src/guestfs-actions.pod:4314 ../fish/guestfish-actions.pod:2949
14820 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
14826 #: ../src/guestfs-actions.pod:4316
14827 msgid "See also C<guestfs_mke2journal>."
14832 #: ../src/guestfs-actions.pod:4320 ../src/guestfs-actions.pod:4338
14833 #: ../src/guestfs-actions.pod:4356 ../src/guestfs-actions.pod:4372
14834 #: ../src/guestfs-actions.pod:4386 ../src/guestfs-actions.pod:4400
14835 #: ../src/guestfs-actions.pod:4459 ../src/guestfs-actions.pod:4724
14836 msgid "(Added in 1.0.68)"
14841 #: ../src/guestfs-actions.pod:4322
14842 msgid "guestfs_mke2fs_JL"
14847 #: ../src/guestfs-actions.pod:4324
14851 " guestfs_mke2fs_JL (guestfs_h *g,\n"
14852 " const char *fstype,\n"
14853 " int blocksize,\n"
14854 " const char *device,\n"
14855 " const char *label);\n"
14861 #: ../src/guestfs-actions.pod:4331 ../fish/guestfish-actions.pod:2957
14863 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
14864 "the journal labeled C<label>."
14869 #: ../src/guestfs-actions.pod:4334
14870 msgid "See also C<guestfs_mke2journal_L>."
14875 #: ../src/guestfs-actions.pod:4340
14876 msgid "guestfs_mke2fs_JU"
14881 #: ../src/guestfs-actions.pod:4342
14885 " guestfs_mke2fs_JU (guestfs_h *g,\n"
14886 " const char *fstype,\n"
14887 " int blocksize,\n"
14888 " const char *device,\n"
14889 " const char *uuid);\n"
14895 #: ../src/guestfs-actions.pod:4349 ../fish/guestfish-actions.pod:2966
14897 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
14898 "the journal with UUID C<uuid>."
14903 #: ../src/guestfs-actions.pod:4352
14904 msgid "See also C<guestfs_mke2journal_U>."
14909 #: ../src/guestfs-actions.pod:4358
14910 msgid "guestfs_mke2journal"
14915 #: ../src/guestfs-actions.pod:4360
14919 " guestfs_mke2journal (guestfs_h *g,\n"
14920 " int blocksize,\n"
14921 " const char *device);\n"
14927 #: ../src/guestfs-actions.pod:4365 ../fish/guestfish-actions.pod:2975
14929 "This creates an ext2 external journal on C<device>. It is equivalent to the "
14935 #: ../src/guestfs-actions.pod:4368 ../fish/guestfish-actions.pod:2978
14938 " mke2fs -O journal_dev -b blocksize device\n"
14944 #: ../src/guestfs-actions.pod:4374
14945 msgid "guestfs_mke2journal_L"
14950 #: ../src/guestfs-actions.pod:4376
14954 " guestfs_mke2journal_L (guestfs_h *g,\n"
14955 " int blocksize,\n"
14956 " const char *label,\n"
14957 " const char *device);\n"
14963 #: ../src/guestfs-actions.pod:4382 ../fish/guestfish-actions.pod:2984
14964 msgid "This creates an ext2 external journal on C<device> with label C<label>."
14969 #: ../src/guestfs-actions.pod:4388
14970 msgid "guestfs_mke2journal_U"
14975 #: ../src/guestfs-actions.pod:4390
14979 " guestfs_mke2journal_U (guestfs_h *g,\n"
14980 " int blocksize,\n"
14981 " const char *uuid,\n"
14982 " const char *device);\n"
14988 #: ../src/guestfs-actions.pod:4396 ../fish/guestfish-actions.pod:2990
14989 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
14994 #: ../src/guestfs-actions.pod:4402
14995 msgid "guestfs_mkfifo"
15000 #: ../src/guestfs-actions.pod:4404
15004 " guestfs_mkfifo (guestfs_h *g,\n"
15006 " const char *path);\n"
15012 #: ../src/guestfs-actions.pod:4409
15014 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
15015 "is just a convenient wrapper around C<guestfs_mknod>."
15020 #: ../src/guestfs-actions.pod:4419
15021 msgid "guestfs_mkfs"
15026 #: ../src/guestfs-actions.pod:4421
15030 " guestfs_mkfs (guestfs_h *g,\n"
15031 " const char *fstype,\n"
15032 " const char *device);\n"
15038 #: ../src/guestfs-actions.pod:4426 ../fish/guestfish-actions.pod:3006
15040 "This creates a filesystem on C<device> (usually a partition or LVM logical "
15041 "volume). The filesystem type is C<fstype>, for example C<ext3>."
15046 #: ../src/guestfs-actions.pod:4434
15047 msgid "guestfs_mkfs_b"
15052 #: ../src/guestfs-actions.pod:4436
15056 " guestfs_mkfs_b (guestfs_h *g,\n"
15057 " const char *fstype,\n"
15058 " int blocksize,\n"
15059 " const char *device);\n"
15065 #: ../src/guestfs-actions.pod:4442
15067 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
15068 "block size of the resulting filesystem. Supported block sizes depend on the "
15069 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
15074 #: ../src/guestfs-actions.pod:4447 ../src/guestfs-actions.pod:4490
15075 #: ../fish/guestfish-actions.pod:3019 ../fish/guestfish-actions.pod:3046
15077 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
15083 #: ../src/guestfs-actions.pod:4452 ../fish/guestfish-actions.pod:3022
15085 "This function is deprecated. In new code, use the C<mkfs_opts> call instead."
15090 #: ../src/guestfs-actions.pod:4461
15091 msgid "guestfs_mkfs_opts"
15096 #: ../src/guestfs-actions.pod:4463
15100 " guestfs_mkfs_opts (guestfs_h *g,\n"
15101 " const char *fstype,\n"
15102 " const char *device,\n"
15108 #: ../src/guestfs-actions.pod:4474
15111 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
15112 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
15118 #: ../src/guestfs-actions.pod:4477 ../fish/guestfish-actions.pod:3033
15120 "This function creates a filesystem on C<device>. The filesystem type is "
15121 "C<fstype>, for example C<ext3>."
15126 #: ../src/guestfs-actions.pod:4484 ../fish/guestfish-actions.pod:3040
15127 msgid "C<blocksize>"
15132 #: ../src/guestfs-actions.pod:4486 ../fish/guestfish-actions.pod:3042
15134 "The filesystem block size. Supported block sizes depend on the filesystem "
15135 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
15140 #: ../src/guestfs-actions.pod:4493 ../fish/guestfish-actions.pod:3049
15141 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
15145 #: ../src/guestfs-actions.pod:4495 ../fish/guestfish-actions.pod:3051
15146 msgid "C<features>"
15150 #: ../src/guestfs-actions.pod:4497 ../fish/guestfish-actions.pod:3053
15151 msgid "This passes the I<-O> parameter to the external mkfs program."
15155 #: ../src/guestfs-actions.pod:4499 ../fish/guestfish-actions.pod:3055
15157 "For certain filesystem types, this allows extra filesystem features to be "
15158 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
15162 #: ../src/guestfs-actions.pod:4503 ../fish/guestfish-actions.pod:3059
15164 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
15169 #: ../src/guestfs-actions.pod:4510
15170 msgid "(Added in 1.7.19)"
15175 #: ../src/guestfs-actions.pod:4512
15176 msgid "guestfs_mkfs_opts_va"
15181 #: ../src/guestfs-actions.pod:4514
15185 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
15186 " const char *fstype,\n"
15187 " const char *device,\n"
15188 " va_list args);\n"
15194 #: ../src/guestfs-actions.pod:4520
15195 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
15200 #: ../src/guestfs-actions.pod:4524
15201 msgid "guestfs_mkfs_opts_argv"
15206 #: ../src/guestfs-actions.pod:4526
15210 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
15211 " const char *fstype,\n"
15212 " const char *device,\n"
15213 " const struct guestfs_mkfs_opts_argv *optargs);\n"
15219 #: ../src/guestfs-actions.pod:4532
15220 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
15225 #: ../src/guestfs-actions.pod:4536
15226 msgid "guestfs_mkmountpoint"
15231 #: ../src/guestfs-actions.pod:4538
15235 " guestfs_mkmountpoint (guestfs_h *g,\n"
15236 " const char *exemptpath);\n"
15242 #: ../src/guestfs-actions.pod:4542
15244 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
15245 "that can be used to create extra mountpoints before mounting the first "
15251 #: ../src/guestfs-actions.pod:4546 ../fish/guestfish-actions.pod:3074
15253 "These calls are I<only> necessary in some very limited circumstances, mainly "
15254 "the case where you want to mount a mix of unrelated and/or read-only "
15255 "filesystems together."
15260 #: ../src/guestfs-actions.pod:4550 ../fish/guestfish-actions.pod:3078
15262 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
15263 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
15264 "inside that. You can unpack this as follows in guestfish:"
15269 #: ../src/guestfs-actions.pod:4555 ../fish/guestfish-actions.pod:3083
15272 " add-ro Fedora-11-i686-Live.iso\n"
15274 " mkmountpoint /cd\n"
15275 " mkmountpoint /sqsh\n"
15276 " mkmountpoint /ext3fs\n"
15277 " mount /dev/sda /cd\n"
15278 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
15279 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
15285 #: ../src/guestfs-actions.pod:4564 ../fish/guestfish-actions.pod:3092
15286 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
15291 #: ../src/guestfs-actions.pod:4566
15293 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
15294 "may get unexpected errors if you try to mix these calls. It is safest to "
15295 "manually unmount filesystems and remove mountpoints after use."
15300 #: ../src/guestfs-actions.pod:4570
15302 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
15303 "first, so for this to work for manual mountpoints, you must ensure that the "
15304 "innermost mountpoints have the longest pathnames, as in the example code "
15310 #: ../src/guestfs-actions.pod:4575 ../fish/guestfish-actions.pod:3103
15312 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
15316 #: ../src/guestfs-actions.pod:4577
15318 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
15319 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
15320 "can also trigger these issues."
15325 #: ../src/guestfs-actions.pod:4583 ../src/guestfs-actions.pod:4849
15326 #: ../src/guestfs-actions.pod:5759
15327 msgid "(Added in 1.0.62)"
15332 #: ../src/guestfs-actions.pod:4585
15333 msgid "guestfs_mknod"
15338 #: ../src/guestfs-actions.pod:4587
15342 " guestfs_mknod (guestfs_h *g,\n"
15346 " const char *path);\n"
15352 #: ../src/guestfs-actions.pod:4594 ../fish/guestfish-actions.pod:3113
15354 "This call creates block or character special devices, or named pipes (FIFOs)."
15359 #: ../src/guestfs-actions.pod:4597 ../fish/guestfish-actions.pod:3116
15361 "The C<mode> parameter should be the mode, using the standard constants. "
15362 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
15363 "used when creating block and character special devices."
15368 #: ../src/guestfs-actions.pod:4602
15370 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
15371 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
15372 "regular file). These constants are available in the standard Linux header "
15373 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
15374 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
15375 "the appropriate constant for you."
15380 #: ../src/guestfs-actions.pod:4616
15381 msgid "guestfs_mknod_b"
15386 #: ../src/guestfs-actions.pod:4618
15390 " guestfs_mknod_b (guestfs_h *g,\n"
15394 " const char *path);\n"
15400 #: ../src/guestfs-actions.pod:4625
15402 "This call creates a block device node called C<path> with mode C<mode> and "
15403 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
15404 "wrapper around C<guestfs_mknod>."
15409 #: ../src/guestfs-actions.pod:4635
15410 msgid "guestfs_mknod_c"
15415 #: ../src/guestfs-actions.pod:4637
15419 " guestfs_mknod_c (guestfs_h *g,\n"
15423 " const char *path);\n"
15429 #: ../src/guestfs-actions.pod:4644
15431 "This call creates a char device node called C<path> with mode C<mode> and "
15432 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
15433 "wrapper around C<guestfs_mknod>."
15438 #: ../src/guestfs-actions.pod:4654
15439 msgid "guestfs_mkswap"
15444 #: ../src/guestfs-actions.pod:4656
15448 " guestfs_mkswap (guestfs_h *g,\n"
15449 " const char *device);\n"
15455 #: ../src/guestfs-actions.pod:4660 ../fish/guestfish-actions.pod:3155
15456 msgid "Create a swap partition on C<device>."
15461 #: ../src/guestfs-actions.pod:4666
15462 msgid "guestfs_mkswap_L"
15467 #: ../src/guestfs-actions.pod:4668
15471 " guestfs_mkswap_L (guestfs_h *g,\n"
15472 " const char *label,\n"
15473 " const char *device);\n"
15479 #: ../src/guestfs-actions.pod:4673 ../fish/guestfish-actions.pod:3161
15480 msgid "Create a swap partition on C<device> with label C<label>."
15485 #: ../src/guestfs-actions.pod:4675 ../fish/guestfish-actions.pod:3163
15487 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
15488 "sda>), just to a partition. This appears to be a limitation of the kernel "
15494 #: ../src/guestfs-actions.pod:4683
15495 msgid "guestfs_mkswap_U"
15500 #: ../src/guestfs-actions.pod:4685
15504 " guestfs_mkswap_U (guestfs_h *g,\n"
15505 " const char *uuid,\n"
15506 " const char *device);\n"
15512 #: ../src/guestfs-actions.pod:4690 ../fish/guestfish-actions.pod:3171
15513 msgid "Create a swap partition on C<device> with UUID C<uuid>."
15518 #: ../src/guestfs-actions.pod:4696
15519 msgid "guestfs_mkswap_file"
15524 #: ../src/guestfs-actions.pod:4698
15528 " guestfs_mkswap_file (guestfs_h *g,\n"
15529 " const char *path);\n"
15535 #: ../src/guestfs-actions.pod:4702 ../fish/guestfish-actions.pod:3177
15536 msgid "Create a swap file."
15541 #: ../src/guestfs-actions.pod:4704
15543 "This command just writes a swap file signature to an existing file. To "
15544 "create the file itself, use something like C<guestfs_fallocate>."
15549 #: ../src/guestfs-actions.pod:4711
15550 msgid "guestfs_modprobe"
15555 #: ../src/guestfs-actions.pod:4713
15559 " guestfs_modprobe (guestfs_h *g,\n"
15560 " const char *modulename);\n"
15566 #: ../src/guestfs-actions.pod:4717 ../fish/guestfish-actions.pod:3186
15567 msgid "This loads a kernel module in the appliance."
15572 #: ../src/guestfs-actions.pod:4719 ../fish/guestfish-actions.pod:3188
15574 "The kernel module must have been whitelisted when libguestfs was built (see "
15575 "C<appliance/kmod.whitelist.in> in the source)."
15580 #: ../src/guestfs-actions.pod:4726
15581 msgid "guestfs_mount"
15586 #: ../src/guestfs-actions.pod:4728
15590 " guestfs_mount (guestfs_h *g,\n"
15591 " const char *device,\n"
15592 " const char *mountpoint);\n"
15598 #: ../src/guestfs-actions.pod:4733 ../fish/guestfish-actions.pod:3195
15600 "Mount a guest disk at a position in the filesystem. Block devices are named "
15601 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
15602 "those block devices contain partitions, they will have the usual names (eg. "
15603 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
15608 #: ../src/guestfs-actions.pod:4739 ../fish/guestfish-actions.pod:3201
15610 "The rules are the same as for L<mount(2)>: A filesystem must first be "
15611 "mounted on C</> before others can be mounted. Other filesystems can only be "
15612 "mounted on directories which already exist."
15617 #: ../src/guestfs-actions.pod:4744 ../fish/guestfish-actions.pod:3206
15619 "The mounted filesystem is writable, if we have sufficient permissions on the "
15620 "underlying device."
15625 #: ../src/guestfs-actions.pod:4747
15627 "B<Important note:> When you use this call, the filesystem options C<sync> "
15628 "and C<noatime> are set implicitly. This was originally done because we "
15629 "thought it would improve reliability, but it turns out that I<-o sync> has a "
15630 "very large negative performance impact and negligible effect on "
15631 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
15632 "in any code that needs performance, and instead use C<guestfs_mount_options> "
15633 "(use an empty string for the first parameter if you don't want any options)."
15637 #: ../src/guestfs-actions.pod:4759 ../fish/guestfish-actions.pod:3219
15639 "This function is deprecated. In new code, use the C<mount_options> call "
15645 #: ../src/guestfs-actions.pod:4768
15646 msgid "guestfs_mount_loop"
15651 #: ../src/guestfs-actions.pod:4770
15655 " guestfs_mount_loop (guestfs_h *g,\n"
15656 " const char *file,\n"
15657 " const char *mountpoint);\n"
15663 #: ../src/guestfs-actions.pod:4775 ../fish/guestfish-actions.pod:3230
15665 "This command lets you mount C<file> (a filesystem image in a file) on a "
15666 "mount point. It is entirely equivalent to the command C<mount -o loop file "
15672 #: ../src/guestfs-actions.pod:4783
15673 msgid "guestfs_mount_options"
15678 #: ../src/guestfs-actions.pod:4785
15682 " guestfs_mount_options (guestfs_h *g,\n"
15683 " const char *options,\n"
15684 " const char *device,\n"
15685 " const char *mountpoint);\n"
15691 #: ../src/guestfs-actions.pod:4791
15693 "This is the same as the C<guestfs_mount> command, but it allows you to set "
15694 "the mount options as for the L<mount(8)> I<-o> flag."
15699 #: ../src/guestfs-actions.pod:4795 ../fish/guestfish-actions.pod:3242
15701 "If the C<options> parameter is an empty string, then no options are passed "
15702 "(all options default to whatever the filesystem uses)."
15707 #: ../src/guestfs-actions.pod:4801 ../src/guestfs-actions.pod:4815
15708 #: ../src/guestfs-actions.pod:4832
15709 msgid "(Added in 1.0.10)"
15714 #: ../src/guestfs-actions.pod:4803
15715 msgid "guestfs_mount_ro"
15720 #: ../src/guestfs-actions.pod:4805
15724 " guestfs_mount_ro (guestfs_h *g,\n"
15725 " const char *device,\n"
15726 " const char *mountpoint);\n"
15732 #: ../src/guestfs-actions.pod:4810
15734 "This is the same as the C<guestfs_mount> command, but it mounts the "
15735 "filesystem with the read-only (I<-o ro>) flag."
15740 #: ../src/guestfs-actions.pod:4817
15741 msgid "guestfs_mount_vfs"
15746 #: ../src/guestfs-actions.pod:4819
15750 " guestfs_mount_vfs (guestfs_h *g,\n"
15751 " const char *options,\n"
15752 " const char *vfstype,\n"
15753 " const char *device,\n"
15754 " const char *mountpoint);\n"
15760 #: ../src/guestfs-actions.pod:4826
15762 "This is the same as the C<guestfs_mount> command, but it allows you to set "
15763 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
15769 #: ../src/guestfs-actions.pod:4834
15770 msgid "guestfs_mountpoints"
15775 #: ../src/guestfs-actions.pod:4836
15779 " guestfs_mountpoints (guestfs_h *g);\n"
15785 #: ../src/guestfs-actions.pod:4839
15787 "This call is similar to C<guestfs_mounts>. That call returns a list of "
15788 "devices. This one returns a hash table (map) of device name to directory "
15789 "where the device is mounted."
15794 #: ../src/guestfs-actions.pod:4851
15795 msgid "guestfs_mounts"
15800 #: ../src/guestfs-actions.pod:4853
15804 " guestfs_mounts (guestfs_h *g);\n"
15810 #: ../src/guestfs-actions.pod:4856 ../fish/guestfish-actions.pod:3273
15812 "This returns the list of currently mounted filesystems. It returns the list "
15813 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
15818 #: ../src/guestfs-actions.pod:4859 ../fish/guestfish-actions.pod:3276
15819 msgid "Some internal mounts are not shown."
15824 #: ../src/guestfs-actions.pod:4861
15825 msgid "See also: C<guestfs_mountpoints>"
15830 #: ../src/guestfs-actions.pod:4869
15836 #: ../src/guestfs-actions.pod:4871
15840 " guestfs_mv (guestfs_h *g,\n"
15841 " const char *src,\n"
15842 " const char *dest);\n"
15848 #: ../src/guestfs-actions.pod:4876 ../fish/guestfish-actions.pod:3284
15850 "This moves a file from C<src> to C<dest> where C<dest> is either a "
15851 "destination filename or destination directory."
15856 #: ../src/guestfs-actions.pod:4883
15857 msgid "guestfs_ntfs_3g_probe"
15862 #: ../src/guestfs-actions.pod:4885
15866 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
15868 " const char *device);\n"
15874 #: ../src/guestfs-actions.pod:4890 ../fish/guestfish-actions.pod:3291
15876 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
15877 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
15878 "write, and some cannot be mounted at all)."
15883 #: ../src/guestfs-actions.pod:4894 ../fish/guestfish-actions.pod:3295
15885 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
15886 "can be mounted read-write. Set it to false if you want to test if the "
15887 "volume can be mounted read-only."
15892 #: ../src/guestfs-actions.pod:4898 ../fish/guestfish-actions.pod:3299
15894 "The return value is an integer which C<0> if the operation would succeed, or "
15895 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
15900 #: ../src/guestfs-actions.pod:4904
15901 msgid "(Added in 1.0.43)"
15906 #: ../src/guestfs-actions.pod:4906
15907 msgid "guestfs_ntfsresize"
15912 #: ../src/guestfs-actions.pod:4908
15916 " guestfs_ntfsresize (guestfs_h *g,\n"
15917 " const char *device);\n"
15923 #: ../src/guestfs-actions.pod:4912 ../fish/guestfish-actions.pod:3307
15925 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
15926 "size of the underlying device. See also L<ntfsresize(8)>."
15931 #: ../src/guestfs-actions.pod:4920
15932 msgid "guestfs_ntfsresize_size"
15937 #: ../src/guestfs-actions.pod:4922
15941 " guestfs_ntfsresize_size (guestfs_h *g,\n"
15942 " const char *device,\n"
15943 " int64_t size);\n"
15949 #: ../src/guestfs-actions.pod:4927
15951 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
15952 "to specify the new size (in bytes) explicitly."
15957 #: ../src/guestfs-actions.pod:4932 ../src/guestfs-actions.pod:5368
15958 #: ../src/guestfs-actions.pod:5441 ../src/guestfs-actions.pod:5707
15959 #: ../src/guestfs-actions.pod:7313
15960 msgid "(Added in 1.3.14)"
15965 #: ../src/guestfs-actions.pod:4934
15966 msgid "guestfs_part_add"
15971 #: ../src/guestfs-actions.pod:4936
15975 " guestfs_part_add (guestfs_h *g,\n"
15976 " const char *device,\n"
15977 " const char *prlogex,\n"
15978 " int64_t startsect,\n"
15979 " int64_t endsect);\n"
15985 #: ../src/guestfs-actions.pod:4943
15987 "This command adds a partition to C<device>. If there is no partition table "
15988 "on the device, call C<guestfs_part_init> first."
15993 #: ../src/guestfs-actions.pod:4946 ../fish/guestfish-actions.pod:3325
15995 "The C<prlogex> parameter is the type of partition. Normally you should pass "
15996 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
15997 "C<logical>) and C<e> (or C<extended>) partition types."
16002 #: ../src/guestfs-actions.pod:4951 ../fish/guestfish-actions.pod:3330
16004 "C<startsect> and C<endsect> are the start and end of the partition in "
16005 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
16006 "from the end of the disk (C<-1> is the last sector)."
16011 #: ../src/guestfs-actions.pod:4955
16013 "Creating a partition which covers the whole disk is not so easy. Use "
16014 "C<guestfs_part_disk> to do that."
16019 #: ../src/guestfs-actions.pod:4960 ../src/guestfs-actions.pod:4998
16020 #: ../src/guestfs-actions.pod:5051 ../src/guestfs-actions.pod:5129
16021 #: ../src/guestfs-actions.pod:5167 ../src/guestfs-actions.pod:5186
16022 #: ../src/guestfs-actions.pod:5226
16023 msgid "(Added in 1.0.78)"
16028 #: ../src/guestfs-actions.pod:4962
16029 msgid "guestfs_part_del"
16034 #: ../src/guestfs-actions.pod:4964
16038 " guestfs_part_del (guestfs_h *g,\n"
16039 " const char *device,\n"
16046 #: ../src/guestfs-actions.pod:4969 ../fish/guestfish-actions.pod:3341
16047 msgid "This command deletes the partition numbered C<partnum> on C<device>."
16052 #: ../src/guestfs-actions.pod:4971 ../fish/guestfish-actions.pod:3343
16054 "Note that in the case of MBR partitioning, deleting an extended partition "
16055 "also deletes any logical partitions it contains."
16060 #: ../src/guestfs-actions.pod:4979
16061 msgid "guestfs_part_disk"
16066 #: ../src/guestfs-actions.pod:4981
16070 " guestfs_part_disk (guestfs_h *g,\n"
16071 " const char *device,\n"
16072 " const char *parttype);\n"
16078 #: ../src/guestfs-actions.pod:4986
16080 "This command is simply a combination of C<guestfs_part_init> followed by "
16081 "C<guestfs_part_add> to create a single primary partition covering the whole "
16087 #: ../src/guestfs-actions.pod:4990
16089 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
16090 "possible values are described in C<guestfs_part_init>."
16095 #: ../src/guestfs-actions.pod:5000
16096 msgid "guestfs_part_get_bootable"
16101 #: ../src/guestfs-actions.pod:5002
16105 " guestfs_part_get_bootable (guestfs_h *g,\n"
16106 " const char *device,\n"
16113 #: ../src/guestfs-actions.pod:5007 ../fish/guestfish-actions.pod:3365
16115 "This command returns true if the partition C<partnum> on C<device> has the "
16116 "bootable flag set."
16121 #: ../src/guestfs-actions.pod:5010
16122 msgid "See also C<guestfs_part_set_bootable>."
16127 #: ../src/guestfs-actions.pod:5016
16128 msgid "guestfs_part_get_mbr_id"
16133 #: ../src/guestfs-actions.pod:5018
16137 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
16138 " const char *device,\n"
16145 #: ../src/guestfs-actions.pod:5023 ../fish/guestfish-actions.pod:3374
16147 "Returns the MBR type byte (also known as the ID byte) from the numbered "
16148 "partition C<partnum>."
16153 #: ../src/guestfs-actions.pod:5026 ../src/guestfs-actions.pod:5202
16155 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
16156 "undefined results for other partition table types (see "
16157 "C<guestfs_part_get_parttype>)."
16162 #: ../src/guestfs-actions.pod:5034
16163 msgid "guestfs_part_get_parttype"
16168 #: ../src/guestfs-actions.pod:5036
16172 " guestfs_part_get_parttype (guestfs_h *g,\n"
16173 " const char *device);\n"
16179 #: ../src/guestfs-actions.pod:5040 ../fish/guestfish-actions.pod:3385
16181 "This command examines the partition table on C<device> and returns the "
16182 "partition table type (format) being used."
16187 #: ../src/guestfs-actions.pod:5043
16189 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
16190 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
16191 "possible, although unusual. See C<guestfs_part_init> for a full list."
16196 #: ../src/guestfs-actions.pod:5053
16197 msgid "guestfs_part_init"
16202 #: ../src/guestfs-actions.pod:5055
16206 " guestfs_part_init (guestfs_h *g,\n"
16207 " const char *device,\n"
16208 " const char *parttype);\n"
16214 #: ../src/guestfs-actions.pod:5060 ../fish/guestfish-actions.pod:3397
16216 "This creates an empty partition table on C<device> of one of the partition "
16217 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
16218 "(for large disks)."
16223 #: ../src/guestfs-actions.pod:5064
16225 "Initially there are no partitions. Following this, you should call "
16226 "C<guestfs_part_add> for each partition required."
16231 #: ../src/guestfs-actions.pod:5067 ../fish/guestfish-actions.pod:3404
16232 msgid "Possible values for C<parttype> are:"
16237 #: ../src/guestfs-actions.pod:5071 ../fish/guestfish-actions.pod:3408
16238 msgid "B<efi> | B<gpt>"
16243 #: ../src/guestfs-actions.pod:5073 ../fish/guestfish-actions.pod:3410
16244 msgid "Intel EFI / GPT partition table."
16249 #: ../src/guestfs-actions.pod:5075 ../fish/guestfish-actions.pod:3412
16251 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
16252 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
16253 "the C<mbr> format."
16258 #: ../src/guestfs-actions.pod:5079 ../fish/guestfish-actions.pod:3416
16259 msgid "B<mbr> | B<msdos>"
16264 #: ../src/guestfs-actions.pod:5081 ../fish/guestfish-actions.pod:3418
16266 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
16267 "Windows. This partition type will B<only> work for device sizes up to 2 "
16268 "TB. For large disks we recommend using C<gpt>."
16273 #: ../src/guestfs-actions.pod:5088 ../fish/guestfish-actions.pod:3425
16275 "Other partition table types that may work but are not supported include:"
16280 #: ../src/guestfs-actions.pod:5093 ../fish/guestfish-actions.pod:3430
16286 #: ../src/guestfs-actions.pod:5095 ../fish/guestfish-actions.pod:3432
16287 msgid "AIX disk labels."
16292 #: ../src/guestfs-actions.pod:5097 ../fish/guestfish-actions.pod:3434
16293 msgid "B<amiga> | B<rdb>"
16298 #: ../src/guestfs-actions.pod:5099 ../fish/guestfish-actions.pod:3436
16299 msgid "Amiga \"Rigid Disk Block\" format."
16304 #: ../src/guestfs-actions.pod:5101 ../fish/guestfish-actions.pod:3438
16310 #: ../src/guestfs-actions.pod:5103 ../fish/guestfish-actions.pod:3440
16311 msgid "BSD disk labels."
16316 #: ../src/guestfs-actions.pod:5105 ../fish/guestfish-actions.pod:3442
16322 #: ../src/guestfs-actions.pod:5107 ../fish/guestfish-actions.pod:3444
16323 msgid "DASD, used on IBM mainframes."
16328 #: ../src/guestfs-actions.pod:5109 ../fish/guestfish-actions.pod:3446
16334 #: ../src/guestfs-actions.pod:5111 ../fish/guestfish-actions.pod:3448
16335 msgid "MIPS/SGI volumes."
16340 #: ../src/guestfs-actions.pod:5113 ../fish/guestfish-actions.pod:3450
16346 #: ../src/guestfs-actions.pod:5115 ../fish/guestfish-actions.pod:3452
16347 msgid "Old Mac partition format. Modern Macs use C<gpt>."
16352 #: ../src/guestfs-actions.pod:5117 ../fish/guestfish-actions.pod:3454
16358 #: ../src/guestfs-actions.pod:5119 ../fish/guestfish-actions.pod:3456
16359 msgid "NEC PC-98 format, common in Japan apparently."
16364 #: ../src/guestfs-actions.pod:5121 ../fish/guestfish-actions.pod:3458
16370 #: ../src/guestfs-actions.pod:5123 ../fish/guestfish-actions.pod:3460
16371 msgid "Sun disk labels."
16376 #: ../src/guestfs-actions.pod:5131
16377 msgid "guestfs_part_list"
16382 #: ../src/guestfs-actions.pod:5133
16385 " struct guestfs_partition_list *\n"
16386 " guestfs_part_list (guestfs_h *g,\n"
16387 " const char *device);\n"
16393 #: ../src/guestfs-actions.pod:5137 ../fish/guestfish-actions.pod:3468
16395 "This command parses the partition table on C<device> and returns the list of "
16396 "partitions found."
16401 #: ../src/guestfs-actions.pod:5140 ../fish/guestfish-actions.pod:3471
16402 msgid "The fields in the returned structure are:"
16407 #: ../src/guestfs-actions.pod:5144 ../fish/guestfish-actions.pod:3475
16408 msgid "B<part_num>"
16413 #: ../src/guestfs-actions.pod:5146 ../fish/guestfish-actions.pod:3477
16414 msgid "Partition number, counting from 1."
16419 #: ../src/guestfs-actions.pod:5148 ../fish/guestfish-actions.pod:3479
16420 msgid "B<part_start>"
16425 #: ../src/guestfs-actions.pod:5150
16427 "Start of the partition I<in bytes>. To get sectors you have to divide by "
16428 "the device's sector size, see C<guestfs_blockdev_getss>."
16433 #: ../src/guestfs-actions.pod:5153 ../fish/guestfish-actions.pod:3484
16434 msgid "B<part_end>"
16439 #: ../src/guestfs-actions.pod:5155 ../fish/guestfish-actions.pod:3486
16440 msgid "End of the partition in bytes."
16445 #: ../src/guestfs-actions.pod:5157 ../fish/guestfish-actions.pod:3488
16446 msgid "B<part_size>"
16451 #: ../src/guestfs-actions.pod:5159 ../fish/guestfish-actions.pod:3490
16452 msgid "Size of the partition in bytes."
16457 #: ../src/guestfs-actions.pod:5163
16459 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
16460 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
16466 #: ../src/guestfs-actions.pod:5169
16467 msgid "guestfs_part_set_bootable"
16472 #: ../src/guestfs-actions.pod:5171
16476 " guestfs_part_set_bootable (guestfs_h *g,\n"
16477 " const char *device,\n"
16479 " int bootable);\n"
16485 #: ../src/guestfs-actions.pod:5177 ../fish/guestfish-actions.pod:3498
16487 "This sets the bootable flag on partition numbered C<partnum> on device "
16488 "C<device>. Note that partitions are numbered from 1."
16493 #: ../src/guestfs-actions.pod:5180 ../fish/guestfish-actions.pod:3501
16495 "The bootable flag is used by some operating systems (notably Windows) to "
16496 "determine which partition to boot from. It is by no means universally "
16502 #: ../src/guestfs-actions.pod:5188
16503 msgid "guestfs_part_set_mbr_id"
16508 #: ../src/guestfs-actions.pod:5190
16512 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
16513 " const char *device,\n"
16521 #: ../src/guestfs-actions.pod:5196 ../fish/guestfish-actions.pod:3509
16523 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
16524 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
16525 "documentation are in fact hexadecimal numbers, but usually documented "
16526 "without any leading \"0x\" which might be confusing."
16531 #: ../src/guestfs-actions.pod:5210
16532 msgid "guestfs_part_set_name"
16537 #: ../src/guestfs-actions.pod:5212
16541 " guestfs_part_set_name (guestfs_h *g,\n"
16542 " const char *device,\n"
16544 " const char *name);\n"
16550 #: ../src/guestfs-actions.pod:5218 ../fish/guestfish-actions.pod:3523
16552 "This sets the partition name on partition numbered C<partnum> on device "
16553 "C<device>. Note that partitions are numbered from 1."
16558 #: ../src/guestfs-actions.pod:5221 ../fish/guestfish-actions.pod:3526
16560 "The partition name can only be set on certain types of partition table. "
16561 "This works on C<gpt> but not on C<mbr> partitions."
16566 #: ../src/guestfs-actions.pod:5228
16567 msgid "guestfs_part_to_dev"
16572 #: ../src/guestfs-actions.pod:5230
16576 " guestfs_part_to_dev (guestfs_h *g,\n"
16577 " const char *partition);\n"
16583 #: ../src/guestfs-actions.pod:5234 ../fish/guestfish-actions.pod:3533
16585 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
16586 "partition number, returning the device name (eg. \"/dev/sdb\")."
16591 #: ../src/guestfs-actions.pod:5238
16593 "The named partition must exist, for example as a string returned from "
16594 "C<guestfs_list_partitions>."
16599 #: ../src/guestfs-actions.pod:5246
16600 msgid "guestfs_ping_daemon"
16605 #: ../src/guestfs-actions.pod:5248
16609 " guestfs_ping_daemon (guestfs_h *g);\n"
16615 #: ../src/guestfs-actions.pod:5251 ../fish/guestfish-actions.pod:3544
16617 "This is a test probe into the guestfs daemon running inside the qemu "
16618 "subprocess. Calling this function checks that the daemon responds to the "
16619 "ping message, without affecting the daemon or attached block device(s) in "
16625 #: ../src/guestfs-actions.pod:5260
16626 msgid "guestfs_pread"
16631 #: ../src/guestfs-actions.pod:5262
16635 " guestfs_pread (guestfs_h *g,\n"
16636 " const char *path,\n"
16638 " int64_t offset,\n"
16639 " size_t *size_r);\n"
16645 #: ../src/guestfs-actions.pod:5269 ../fish/guestfish-actions.pod:3553
16647 "This command lets you read part of a file. It reads C<count> bytes of the "
16648 "file, starting at C<offset>, from file C<path>."
16653 #: ../src/guestfs-actions.pod:5272 ../src/guestfs-actions.pod:5298
16654 #: ../fish/guestfish-actions.pod:3556 ../fish/guestfish-actions.pod:3571
16656 "This may read fewer bytes than requested. For further details see the "
16657 "L<pread(2)> system call."
16662 #: ../src/guestfs-actions.pod:5275
16663 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
16668 #: ../src/guestfs-actions.pod:5286
16669 msgid "guestfs_pread_device"
16674 #: ../src/guestfs-actions.pod:5288
16678 " guestfs_pread_device (guestfs_h *g,\n"
16679 " const char *device,\n"
16681 " int64_t offset,\n"
16682 " size_t *size_r);\n"
16688 #: ../src/guestfs-actions.pod:5295 ../fish/guestfish-actions.pod:3568
16690 "This command lets you read part of a file. It reads C<count> bytes of "
16691 "C<device>, starting at C<offset>."
16696 #: ../src/guestfs-actions.pod:5301
16697 msgid "See also C<guestfs_pread>."
16702 #: ../src/guestfs-actions.pod:5310
16703 msgid "(Added in 1.5.21)"
16708 #: ../src/guestfs-actions.pod:5312
16709 msgid "guestfs_pvcreate"
16714 #: ../src/guestfs-actions.pod:5314
16718 " guestfs_pvcreate (guestfs_h *g,\n"
16719 " const char *device);\n"
16725 #: ../src/guestfs-actions.pod:5318 ../fish/guestfish-actions.pod:3583
16727 "This creates an LVM physical volume on the named C<device>, where C<device> "
16728 "should usually be a partition name such as C</dev/sda1>."
16733 #: ../src/guestfs-actions.pod:5326
16734 msgid "guestfs_pvremove"
16739 #: ../src/guestfs-actions.pod:5328
16743 " guestfs_pvremove (guestfs_h *g,\n"
16744 " const char *device);\n"
16750 #: ../src/guestfs-actions.pod:5332 ../fish/guestfish-actions.pod:3591
16752 "This wipes a physical volume C<device> so that LVM will no longer recognise "
16758 #: ../src/guestfs-actions.pod:5335 ../fish/guestfish-actions.pod:3594
16760 "The implementation uses the C<pvremove> command which refuses to wipe "
16761 "physical volumes that contain any volume groups, so you have to remove those "
16767 #: ../src/guestfs-actions.pod:5343
16768 msgid "guestfs_pvresize"
16773 #: ../src/guestfs-actions.pod:5345
16777 " guestfs_pvresize (guestfs_h *g,\n"
16778 " const char *device);\n"
16784 #: ../src/guestfs-actions.pod:5349 ../fish/guestfish-actions.pod:3602
16786 "This resizes (expands or shrinks) an existing LVM physical volume to match "
16787 "the new size of the underlying device."
16792 #: ../src/guestfs-actions.pod:5356
16793 msgid "guestfs_pvresize_size"
16798 #: ../src/guestfs-actions.pod:5358
16802 " guestfs_pvresize_size (guestfs_h *g,\n"
16803 " const char *device,\n"
16804 " int64_t size);\n"
16810 #: ../src/guestfs-actions.pod:5363
16812 "This command is the same as C<guestfs_pvresize> except that it allows you to "
16813 "specify the new size (in bytes) explicitly."
16818 #: ../src/guestfs-actions.pod:5370
16819 msgid "guestfs_pvs"
16824 #: ../src/guestfs-actions.pod:5372
16828 " guestfs_pvs (guestfs_h *g);\n"
16834 #: ../src/guestfs-actions.pod:5375 ../fish/guestfish-actions.pod:3616
16836 "List all the physical volumes detected. This is the equivalent of the L<pvs"
16842 #: ../src/guestfs-actions.pod:5378 ../fish/guestfish-actions.pod:3619
16844 "This returns a list of just the device names that contain PVs (eg. C</dev/"
16850 #: ../src/guestfs-actions.pod:5381
16851 msgid "See also C<guestfs_pvs_full>."
16856 #: ../src/guestfs-actions.pod:5389
16857 msgid "guestfs_pvs_full"
16862 #: ../src/guestfs-actions.pod:5391
16865 " struct guestfs_lvm_pv_list *\n"
16866 " guestfs_pvs_full (guestfs_h *g);\n"
16872 #: ../src/guestfs-actions.pod:5394 ../fish/guestfish-actions.pod:3628
16874 "List all the physical volumes detected. This is the equivalent of the L<pvs"
16875 "(8)> command. The \"full\" version includes all fields."
16880 #: ../src/guestfs-actions.pod:5397
16882 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
16883 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after use>."
16888 #: ../src/guestfs-actions.pod:5403
16889 msgid "guestfs_pvuuid"
16894 #: ../src/guestfs-actions.pod:5405
16898 " guestfs_pvuuid (guestfs_h *g,\n"
16899 " const char *device);\n"
16905 #: ../src/guestfs-actions.pod:5409 ../fish/guestfish-actions.pod:3635
16906 msgid "This command returns the UUID of the LVM PV C<device>."
16911 #: ../src/guestfs-actions.pod:5416
16912 msgid "guestfs_pwrite"
16917 #: ../src/guestfs-actions.pod:5418
16921 " guestfs_pwrite (guestfs_h *g,\n"
16922 " const char *path,\n"
16923 " const char *content,\n"
16924 " size_t content_size,\n"
16925 " int64_t offset);\n"
16931 #: ../src/guestfs-actions.pod:5425 ../fish/guestfish-actions.pod:3641
16933 "This command writes to part of a file. It writes the data buffer C<content> "
16934 "to the file C<path> starting at offset C<offset>."
16939 #: ../src/guestfs-actions.pod:5428 ../fish/guestfish-actions.pod:3644
16941 "This command implements the L<pwrite(2)> system call, and like that system "
16942 "call it may not write the full data requested. The return value is the "
16943 "number of bytes that were actually written to the file. This could even be "
16944 "0, although short writes are unlikely for regular files in ordinary "
16950 #: ../src/guestfs-actions.pod:5434
16951 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
16956 #: ../src/guestfs-actions.pod:5443
16957 msgid "guestfs_pwrite_device"
16962 #: ../src/guestfs-actions.pod:5445
16966 " guestfs_pwrite_device (guestfs_h *g,\n"
16967 " const char *device,\n"
16968 " const char *content,\n"
16969 " size_t content_size,\n"
16970 " int64_t offset);\n"
16976 #: ../src/guestfs-actions.pod:5452 ../fish/guestfish-actions.pod:3659
16978 "This command writes to part of a device. It writes the data buffer "
16979 "C<content> to C<device> starting at offset C<offset>."
16984 #: ../src/guestfs-actions.pod:5455 ../fish/guestfish-actions.pod:3662
16986 "This command implements the L<pwrite(2)> system call, and like that system "
16987 "call it may not write the full data requested (although short writes to disk "
16988 "devices and partitions are probably impossible with standard Linux kernels)."
16993 #: ../src/guestfs-actions.pod:5460
16994 msgid "See also C<guestfs_pwrite>."
16999 #: ../src/guestfs-actions.pod:5467
17000 msgid "(Added in 1.5.20)"
17005 #: ../src/guestfs-actions.pod:5469
17006 msgid "guestfs_read_file"
17011 #: ../src/guestfs-actions.pod:5471
17015 " guestfs_read_file (guestfs_h *g,\n"
17016 " const char *path,\n"
17017 " size_t *size_r);\n"
17023 #: ../src/guestfs-actions.pod:5476 ../fish/guestfish-actions.pod:3676
17024 msgid "This calls returns the contents of the file C<path> as a buffer."
17029 #: ../src/guestfs-actions.pod:5479
17031 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
17032 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
17033 "function is limited in the total size of file that can be handled."
17038 #: ../src/guestfs-actions.pod:5491
17039 msgid "(Added in 1.0.63)"
17044 #: ../src/guestfs-actions.pod:5493
17045 msgid "guestfs_read_lines"
17050 #: ../src/guestfs-actions.pod:5495
17054 " guestfs_read_lines (guestfs_h *g,\n"
17055 " const char *path);\n"
17061 #: ../src/guestfs-actions.pod:5501 ../fish/guestfish-actions.pod:3693
17063 "The file contents are returned as a list of lines. Trailing C<LF> and "
17064 "C<CRLF> character sequences are I<not> returned."
17069 #: ../src/guestfs-actions.pod:5504
17071 "Note that this function cannot correctly handle binary files (specifically, "
17072 "files containing C<\\0> character which is treated as end of line). For "
17073 "those you need to use the C<guestfs_read_file> function which has a more "
17074 "complex interface."
17079 #: ../src/guestfs-actions.pod:5515
17080 msgid "guestfs_readdir"
17085 #: ../src/guestfs-actions.pod:5517
17088 " struct guestfs_dirent_list *\n"
17089 " guestfs_readdir (guestfs_h *g,\n"
17090 " const char *dir);\n"
17096 #: ../src/guestfs-actions.pod:5521 ../fish/guestfish-actions.pod:3705
17097 msgid "This returns the list of directory entries in directory C<dir>."
17102 #: ../src/guestfs-actions.pod:5523 ../fish/guestfish-actions.pod:3707
17104 "All entries in the directory are returned, including C<.> and C<..>. The "
17105 "entries are I<not> sorted, but returned in the same order as the underlying "
17111 #: ../src/guestfs-actions.pod:5527 ../fish/guestfish-actions.pod:3711
17113 "Also this call returns basic file type information about each file. The "
17114 "C<ftyp> field will contain one of the following characters:"
17119 #: ../src/guestfs-actions.pod:5532 ../fish/guestfish-actions.pod:3716
17125 #: ../src/guestfs-actions.pod:5534 ../fish/guestfish-actions.pod:3718
17126 msgid "Block special"
17131 #: ../src/guestfs-actions.pod:5536 ../fish/guestfish-actions.pod:3720
17137 #: ../src/guestfs-actions.pod:5538 ../fish/guestfish-actions.pod:3722
17138 msgid "Char special"
17143 #: ../src/guestfs-actions.pod:5540 ../fish/guestfish-actions.pod:3724
17149 #: ../src/guestfs-actions.pod:5542 ../fish/guestfish-actions.pod:3726
17155 #: ../src/guestfs-actions.pod:5544 ../fish/guestfish-actions.pod:3728
17161 #: ../src/guestfs-actions.pod:5546 ../fish/guestfish-actions.pod:3730
17162 msgid "FIFO (named pipe)"
17167 #: ../src/guestfs-actions.pod:5548 ../fish/guestfish-actions.pod:3732
17173 #: ../src/guestfs-actions.pod:5550 ../fish/guestfish-actions.pod:3734
17174 msgid "Symbolic link"
17179 #: ../src/guestfs-actions.pod:5552 ../fish/guestfish-actions.pod:3736
17185 #: ../src/guestfs-actions.pod:5554 ../fish/guestfish-actions.pod:3738
17186 msgid "Regular file"
17191 #: ../src/guestfs-actions.pod:5556 ../fish/guestfish-actions.pod:3740
17197 #: ../src/guestfs-actions.pod:5558 ../fish/guestfish-actions.pod:3742
17203 #: ../src/guestfs-actions.pod:5560 ../fish/guestfish-actions.pod:3744
17209 #: ../src/guestfs-actions.pod:5562 ../fish/guestfish-actions.pod:3746
17210 msgid "Unknown file type"
17215 #: ../src/guestfs-actions.pod:5564 ../fish/guestfish-actions.pod:3748
17221 #: ../src/guestfs-actions.pod:5566 ../fish/guestfish-actions.pod:3750
17223 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
17228 #: ../src/guestfs-actions.pod:5571
17230 "This function is primarily intended for use by programs. To get a simple "
17231 "list of names, use C<guestfs_ls>. To get a printable directory for human "
17232 "consumption, use C<guestfs_ll>."
17237 #: ../src/guestfs-actions.pod:5575
17239 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
17240 "was an error. I<The caller must call C<guestfs_free_dirent_list> after use>."
17245 #: ../src/guestfs-actions.pod:5581
17246 msgid "guestfs_readlink"
17251 #: ../src/guestfs-actions.pod:5583
17255 " guestfs_readlink (guestfs_h *g,\n"
17256 " const char *path);\n"
17262 #: ../src/guestfs-actions.pod:5587 ../fish/guestfish-actions.pod:3763
17263 msgid "This command reads the target of a symbolic link."
17268 #: ../src/guestfs-actions.pod:5594
17269 msgid "guestfs_readlinklist"
17274 #: ../src/guestfs-actions.pod:5596
17278 " guestfs_readlinklist (guestfs_h *g,\n"
17279 " const char *path,\n"
17280 " char *const *names);\n"
17286 #: ../src/guestfs-actions.pod:5601 ../fish/guestfish-actions.pod:3769
17288 "This call allows you to do a C<readlink> operation on multiple files, where "
17289 "all files are in the directory C<path>. C<names> is the list of files from "
17295 #: ../src/guestfs-actions.pod:5605 ../fish/guestfish-actions.pod:3773
17297 "On return you get a list of strings, with a one-to-one correspondence to the "
17298 "C<names> list. Each string is the value of the symbolic link."
17303 #: ../src/guestfs-actions.pod:5609 ../fish/guestfish-actions.pod:3777
17305 "If the C<readlink(2)> operation fails on any name, then the corresponding "
17306 "result string is the empty string C<\"\">. However the whole operation is "
17307 "completed even if there were C<readlink(2)> errors, and so you can call this "
17308 "function with names where you don't know if they are symbolic links already "
17309 "(albeit slightly less efficient)."
17314 #: ../src/guestfs-actions.pod:5616 ../fish/guestfish-actions.pod:3784
17316 "This call is intended for programs that want to efficiently list a directory "
17317 "contents without making many round-trips. Very long directory listings "
17318 "might cause the protocol message size to be exceeded, causing this call to "
17319 "fail. The caller must split up such requests into smaller groups of names."
17324 #: ../src/guestfs-actions.pod:5629
17325 msgid "guestfs_realpath"
17330 #: ../src/guestfs-actions.pod:5631
17334 " guestfs_realpath (guestfs_h *g,\n"
17335 " const char *path);\n"
17341 #: ../src/guestfs-actions.pod:5635 ../fish/guestfish-actions.pod:3795
17343 "Return the canonicalized absolute pathname of C<path>. The returned path "
17344 "has no C<.>, C<..> or symbolic link path elements."
17349 #: ../src/guestfs-actions.pod:5643
17350 msgid "guestfs_removexattr"
17355 #: ../src/guestfs-actions.pod:5645
17359 " guestfs_removexattr (guestfs_h *g,\n"
17360 " const char *xattr,\n"
17361 " const char *path);\n"
17367 #: ../src/guestfs-actions.pod:5650 ../fish/guestfish-actions.pod:3802
17369 "This call removes the extended attribute named C<xattr> of the file C<path>."
17374 #: ../src/guestfs-actions.pod:5653
17375 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
17380 #: ../src/guestfs-actions.pod:5659
17381 msgid "guestfs_resize2fs"
17386 #: ../src/guestfs-actions.pod:5661
17390 " guestfs_resize2fs (guestfs_h *g,\n"
17391 " const char *device);\n"
17397 #: ../src/guestfs-actions.pod:5665 ../fish/guestfish-actions.pod:3811
17399 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
17400 "underlying device."
17405 #: ../src/guestfs-actions.pod:5668
17407 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
17408 "C<device> before calling this command. For unknown reasons C<resize2fs> "
17409 "sometimes gives an error about this and sometimes not. In any case, it is "
17410 "always safe to call C<guestfs_e2fsck_f> before calling this function."
17414 #: ../src/guestfs-actions.pod:5678
17415 msgid "guestfs_resize2fs_M"
17419 #: ../src/guestfs-actions.pod:5680
17423 " guestfs_resize2fs_M (guestfs_h *g,\n"
17424 " const char *device);\n"
17429 #: ../src/guestfs-actions.pod:5684
17431 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
17432 "resized to its minimum size. This works like the I<-M> option to the "
17433 "C<resize2fs> command."
17437 #: ../src/guestfs-actions.pod:5688
17439 "To get the resulting size of the filesystem you should call "
17440 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
17441 "These two numbers, multiplied together, give the resulting size of the "
17442 "minimal filesystem in bytes."
17447 #: ../src/guestfs-actions.pod:5695
17448 msgid "guestfs_resize2fs_size"
17453 #: ../src/guestfs-actions.pod:5697
17457 " guestfs_resize2fs_size (guestfs_h *g,\n"
17458 " const char *device,\n"
17459 " int64_t size);\n"
17465 #: ../src/guestfs-actions.pod:5702
17467 "This command is the same as C<guestfs_resize2fs> except that it allows you "
17468 "to specify the new size (in bytes) explicitly."
17473 #: ../src/guestfs-actions.pod:5709
17479 #: ../src/guestfs-actions.pod:5711
17483 " guestfs_rm (guestfs_h *g,\n"
17484 " const char *path);\n"
17490 #: ../src/guestfs-actions.pod:5715 ../fish/guestfish-actions.pod:3844
17491 msgid "Remove the single file C<path>."
17496 #: ../src/guestfs-actions.pod:5721
17497 msgid "guestfs_rm_rf"
17502 #: ../src/guestfs-actions.pod:5723
17506 " guestfs_rm_rf (guestfs_h *g,\n"
17507 " const char *path);\n"
17513 #: ../src/guestfs-actions.pod:5727 ../fish/guestfish-actions.pod:3850
17515 "Remove the file or directory C<path>, recursively removing the contents if "
17516 "its a directory. This is like the C<rm -rf> shell command."
17521 #: ../src/guestfs-actions.pod:5735
17522 msgid "guestfs_rmdir"
17527 #: ../src/guestfs-actions.pod:5737
17531 " guestfs_rmdir (guestfs_h *g,\n"
17532 " const char *path);\n"
17538 #: ../src/guestfs-actions.pod:5741 ../fish/guestfish-actions.pod:3858
17539 msgid "Remove the single directory C<path>."
17544 #: ../src/guestfs-actions.pod:5747
17545 msgid "guestfs_rmmountpoint"
17550 #: ../src/guestfs-actions.pod:5749
17554 " guestfs_rmmountpoint (guestfs_h *g,\n"
17555 " const char *exemptpath);\n"
17561 #: ../src/guestfs-actions.pod:5753
17563 "This calls removes a mountpoint that was previously created with "
17564 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
17569 #: ../src/guestfs-actions.pod:5761
17570 msgid "guestfs_scrub_device"
17575 #: ../src/guestfs-actions.pod:5763
17579 " guestfs_scrub_device (guestfs_h *g,\n"
17580 " const char *device);\n"
17586 #: ../src/guestfs-actions.pod:5767 ../fish/guestfish-actions.pod:3872
17588 "This command writes patterns over C<device> to make data retrieval more "
17594 #: ../src/guestfs-actions.pod:5770 ../src/guestfs-actions.pod:5791
17595 #: ../src/guestfs-actions.pod:5810 ../fish/guestfish-actions.pod:3875
17596 #: ../fish/guestfish-actions.pod:3890 ../fish/guestfish-actions.pod:3903
17598 "It is an interface to the L<scrub(1)> program. See that manual page for "
17604 #: ../src/guestfs-actions.pod:5778 ../src/guestfs-actions.pod:5796
17605 #: ../src/guestfs-actions.pod:5815
17606 msgid "(Added in 1.0.52)"
17611 #: ../src/guestfs-actions.pod:5780
17612 msgid "guestfs_scrub_file"
17617 #: ../src/guestfs-actions.pod:5782
17621 " guestfs_scrub_file (guestfs_h *g,\n"
17622 " const char *file);\n"
17628 #: ../src/guestfs-actions.pod:5786 ../fish/guestfish-actions.pod:3885
17630 "This command writes patterns over a file to make data retrieval more "
17636 #: ../src/guestfs-actions.pod:5789 ../fish/guestfish-actions.pod:3888
17637 msgid "The file is I<removed> after scrubbing."
17642 #: ../src/guestfs-actions.pod:5798
17643 msgid "guestfs_scrub_freespace"
17648 #: ../src/guestfs-actions.pod:5800
17652 " guestfs_scrub_freespace (guestfs_h *g,\n"
17653 " const char *dir);\n"
17659 #: ../src/guestfs-actions.pod:5804
17661 "This command creates the directory C<dir> and then fills it with files until "
17662 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
17663 "and deletes them. The intention is to scrub any free space on the partition "
17664 "containing C<dir>."
17669 #: ../src/guestfs-actions.pod:5817
17670 msgid "guestfs_set_append"
17675 #: ../src/guestfs-actions.pod:5819
17679 " guestfs_set_append (guestfs_h *g,\n"
17680 " const char *append);\n"
17686 #: ../src/guestfs-actions.pod:5823 ../fish/guestfish-actions.pod:3912
17688 "This function is used to add additional options to the guest kernel command "
17694 #: ../src/guestfs-actions.pod:5826 ../fish/guestfish-actions.pod:3915
17696 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
17697 "environment variable."
17702 #: ../src/guestfs-actions.pod:5829 ../fish/guestfish-actions.pod:3918
17704 "Setting C<append> to C<NULL> means I<no> additional options are passed "
17705 "(libguestfs always adds a few of its own)."
17709 #: ../src/guestfs-actions.pod:5836
17710 msgid "guestfs_set_attach_method"
17714 #: ../src/guestfs-actions.pod:5838
17718 " guestfs_set_attach_method (guestfs_h *g,\n"
17719 " const char *attachmethod);\n"
17724 #: ../src/guestfs-actions.pod:5842 ../fish/guestfish-actions.pod:3927
17726 "Set the method that libguestfs uses to connect to the back end guestfsd "
17727 "daemon. Possible methods are:"
17731 #: ../src/guestfs-actions.pod:5849 ../fish/guestfish-actions.pod:3934
17733 "Launch an appliance and connect to it. This is the ordinary method and the "
17738 #: ../src/guestfs-actions.pod:5852 ../fish/guestfish-actions.pod:3937
17739 msgid "C<unix:I<path>>"
17743 #: ../src/guestfs-actions.pod:5854 ../fish/guestfish-actions.pod:3939
17744 msgid "Connect to the Unix domain socket I<path>."
17748 #: ../src/guestfs-actions.pod:5856 ../fish/guestfish-actions.pod:3941
17750 "This method lets you connect to an existing daemon or (using virtio-serial) "
17751 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
17752 "RUNNING DAEMONS>."
17757 #: ../src/guestfs-actions.pod:5864
17758 msgid "guestfs_set_autosync"
17763 #: ../src/guestfs-actions.pod:5866
17767 " guestfs_set_autosync (guestfs_h *g,\n"
17768 " int autosync);\n"
17773 #: ../src/guestfs-actions.pod:5870 ../fish/guestfish-actions.pod:3953
17775 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
17776 "effort attempt to make filesystems consistent and synchronized when the "
17777 "handle is closed (also if the program exits without closing handles)."
17782 #: ../src/guestfs-actions.pod:5875 ../fish/guestfish-actions.pod:3958
17784 "This is enabled by default (since libguestfs 1.5.24, previously it was "
17785 "disabled by default)."
17790 #: ../src/guestfs-actions.pod:5882
17791 msgid "guestfs_set_direct"
17796 #: ../src/guestfs-actions.pod:5884
17800 " guestfs_set_direct (guestfs_h *g,\n"
17807 #: ../src/guestfs-actions.pod:5888 ../fish/guestfish-actions.pod:3967
17809 "If the direct appliance mode flag is enabled, then stdin and stdout are "
17810 "passed directly through to the appliance once it is launched."
17815 #: ../src/guestfs-actions.pod:5892
17817 "One consequence of this is that log messages aren't caught by the library "
17818 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
17824 #: ../src/guestfs-actions.pod:5896 ../fish/guestfish-actions.pod:3975
17825 msgid "You probably don't want to use this unless you know what you are doing."
17830 #: ../src/guestfs-actions.pod:5899 ../fish/guestfish-actions.pod:3978
17831 msgid "The default is disabled."
17836 #: ../src/guestfs-actions.pod:5905
17837 msgid "guestfs_set_e2label"
17842 #: ../src/guestfs-actions.pod:5907
17846 " guestfs_set_e2label (guestfs_h *g,\n"
17847 " const char *device,\n"
17848 " const char *label);\n"
17854 #: ../src/guestfs-actions.pod:5912 ../fish/guestfish-actions.pod:3984
17856 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
17857 "C<label>. Filesystem labels are limited to 16 characters."
17862 #: ../src/guestfs-actions.pod:5916
17864 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
17865 "the existing label on a filesystem."
17870 #: ../src/guestfs-actions.pod:5923
17871 msgid "guestfs_set_e2uuid"
17876 #: ../src/guestfs-actions.pod:5925
17880 " guestfs_set_e2uuid (guestfs_h *g,\n"
17881 " const char *device,\n"
17882 " const char *uuid);\n"
17888 #: ../src/guestfs-actions.pod:5930 ../fish/guestfish-actions.pod:3995
17890 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
17891 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
17892 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
17897 #: ../src/guestfs-actions.pod:5935
17899 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
17900 "the existing UUID of a filesystem."
17905 #: ../src/guestfs-actions.pod:5942
17906 msgid "guestfs_set_memsize"
17911 #: ../src/guestfs-actions.pod:5944
17915 " guestfs_set_memsize (guestfs_h *g,\n"
17922 #: ../src/guestfs-actions.pod:5948
17924 "This sets the memory size in megabytes allocated to the qemu subprocess. "
17925 "This only has any effect if called before C<guestfs_launch>."
17930 #: ../src/guestfs-actions.pod:5952 ../fish/guestfish-actions.pod:4013
17932 "You can also change this by setting the environment variable "
17933 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
17938 #: ../src/guestfs-actions.pod:5963
17939 msgid "guestfs_set_network"
17944 #: ../src/guestfs-actions.pod:5965
17948 " guestfs_set_network (guestfs_h *g,\n"
17955 #: ../src/guestfs-actions.pod:5969 ../fish/guestfish-actions.pod:4026
17957 "If C<network> is true, then the network is enabled in the libguestfs "
17958 "appliance. The default is false."
17963 #: ../src/guestfs-actions.pod:5972 ../fish/guestfish-actions.pod:4029
17965 "This affects whether commands are able to access the network (see L<guestfs"
17966 "(3)/RUNNING COMMANDS>)."
17971 #: ../src/guestfs-actions.pod:5975
17973 "You must call this before calling C<guestfs_launch>, otherwise it has no "
17979 #: ../src/guestfs-actions.pod:5982
17980 msgid "guestfs_set_path"
17985 #: ../src/guestfs-actions.pod:5984
17989 " guestfs_set_path (guestfs_h *g,\n"
17990 " const char *searchpath);\n"
17996 #: ../src/guestfs-actions.pod:5988 ../fish/guestfish-actions.pod:4041
17997 msgid "Set the path that libguestfs searches for kernel and initrd.img."
18002 #: ../src/guestfs-actions.pod:5990 ../fish/guestfish-actions.pod:4043
18004 "The default is C<$libdir/guestfs> unless overridden by setting "
18005 "C<LIBGUESTFS_PATH> environment variable."
18010 #: ../src/guestfs-actions.pod:5993 ../fish/guestfish-actions.pod:4046
18011 msgid "Setting C<path> to C<NULL> restores the default path."
18016 #: ../src/guestfs-actions.pod:5999
18017 msgid "guestfs_set_qemu"
18022 #: ../src/guestfs-actions.pod:6001
18026 " guestfs_set_qemu (guestfs_h *g,\n"
18027 " const char *qemu);\n"
18033 #: ../src/guestfs-actions.pod:6005 ../fish/guestfish-actions.pod:4054
18034 msgid "Set the qemu binary that we will use."
18039 #: ../src/guestfs-actions.pod:6007 ../fish/guestfish-actions.pod:4056
18041 "The default is chosen when the library was compiled by the configure script."
18046 #: ../src/guestfs-actions.pod:6010 ../fish/guestfish-actions.pod:4059
18048 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
18054 #: ../src/guestfs-actions.pod:6013 ../fish/guestfish-actions.pod:4062
18055 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
18060 #: ../src/guestfs-actions.pod:6015 ../fish/guestfish-actions.pod:4064
18062 "Note that you should call this function as early as possible after creating "
18063 "the handle. This is because some pre-launch operations depend on testing "
18064 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
18065 "don't retest features, and so you might see inconsistent results. Using the "
18066 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
18067 "the qemu binary at the same time as the handle is created."
18072 #: ../src/guestfs-actions.pod:6027
18073 msgid "guestfs_set_recovery_proc"
18078 #: ../src/guestfs-actions.pod:6029
18082 " guestfs_set_recovery_proc (guestfs_h *g,\n"
18083 " int recoveryproc);\n"
18089 #: ../src/guestfs-actions.pod:6033
18091 "If this is called with the parameter C<false> then C<guestfs_launch> does "
18092 "not create a recovery process. The purpose of the recovery process is to "
18093 "stop runaway qemu processes in the case where the main program aborts "
18099 #: ../src/guestfs-actions.pod:6038
18101 "This only has any effect if called before C<guestfs_launch>, and the default "
18107 #: ../src/guestfs-actions.pod:6041 ../fish/guestfish-actions.pod:4086
18109 "About the only time when you would want to disable this is if the main "
18110 "process will fork itself into the background (\"daemonize\" itself). In "
18111 "this case the recovery process thinks that the main program has disappeared "
18112 "and so kills qemu, which is not very helpful."
18117 #: ../src/guestfs-actions.pod:6051
18118 msgid "guestfs_set_selinux"
18123 #: ../src/guestfs-actions.pod:6053
18127 " guestfs_set_selinux (guestfs_h *g,\n"
18134 #: ../src/guestfs-actions.pod:6057 ../fish/guestfish-actions.pod:4098
18136 "This sets the selinux flag that is passed to the appliance at boot time. "
18137 "The default is C<selinux=0> (disabled)."
18142 #: ../src/guestfs-actions.pod:6060 ../fish/guestfish-actions.pod:4101
18144 "Note that if SELinux is enabled, it is always in Permissive mode "
18145 "(C<enforcing=0>)."
18150 #: ../src/guestfs-actions.pod:6070
18151 msgid "guestfs_set_trace"
18156 #: ../src/guestfs-actions.pod:6072
18160 " guestfs_set_trace (guestfs_h *g,\n"
18166 #: ../src/guestfs-actions.pod:6076 ../fish/guestfish-actions.pod:4113
18168 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
18169 "return values are traced."
18174 #: ../src/guestfs-actions.pod:6079 ../fish/guestfish-actions.pod:4116
18176 "If you want to trace C API calls into libguestfs (and other libraries) then "
18177 "possibly a better way is to use the external ltrace(1) command."
18182 #: ../src/guestfs-actions.pod:6083 ../fish/guestfish-actions.pod:4120
18184 "Command traces are disabled unless the environment variable "
18185 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
18189 #: ../src/guestfs-actions.pod:6086
18191 "Trace messages are normally sent to C<stderr>, unless you register a "
18192 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
18197 #: ../src/guestfs-actions.pod:6094
18198 msgid "guestfs_set_verbose"
18203 #: ../src/guestfs-actions.pod:6096
18207 " guestfs_set_verbose (guestfs_h *g,\n"
18213 #: ../src/guestfs-actions.pod:6100 ../fish/guestfish-actions.pod:4133
18214 msgid "If C<verbose> is true, this turns on verbose messages."
18219 #: ../src/guestfs-actions.pod:6102 ../fish/guestfish-actions.pod:4135
18221 "Verbose messages are disabled unless the environment variable "
18222 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
18226 #: ../src/guestfs-actions.pod:6105
18228 "Verbose messages are normally sent to C<stderr>, unless you register a "
18229 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
18234 #: ../src/guestfs-actions.pod:6113
18235 msgid "guestfs_setcon"
18240 #: ../src/guestfs-actions.pod:6115
18244 " guestfs_setcon (guestfs_h *g,\n"
18245 " const char *context);\n"
18251 #: ../src/guestfs-actions.pod:6119 ../fish/guestfish-actions.pod:4146
18253 "This sets the SELinux security context of the daemon to the string "
18259 #: ../src/guestfs-actions.pod:6122 ../fish/guestfish-actions.pod:4149
18260 msgid "See the documentation about SELINUX in L<guestfs(3)>."
18265 #: ../src/guestfs-actions.pod:6128
18266 msgid "guestfs_setxattr"
18271 #: ../src/guestfs-actions.pod:6130
18275 " guestfs_setxattr (guestfs_h *g,\n"
18276 " const char *xattr,\n"
18277 " const char *val,\n"
18279 " const char *path);\n"
18285 #: ../src/guestfs-actions.pod:6137 ../fish/guestfish-actions.pod:4155
18287 "This call sets the extended attribute named C<xattr> of the file C<path> to "
18288 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
18293 #: ../src/guestfs-actions.pod:6141
18294 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
18299 #: ../src/guestfs-actions.pod:6147
18300 msgid "guestfs_sfdisk"
18305 #: ../src/guestfs-actions.pod:6149
18309 " guestfs_sfdisk (guestfs_h *g,\n"
18310 " const char *device,\n"
18314 " char *const *lines);\n"
18320 #: ../src/guestfs-actions.pod:6157 ../fish/guestfish-actions.pod:4165
18322 "This is a direct interface to the L<sfdisk(8)> program for creating "
18323 "partitions on block devices."
18328 #: ../src/guestfs-actions.pod:6160 ../fish/guestfish-actions.pod:4168
18329 msgid "C<device> should be a block device, for example C</dev/sda>."
18334 #: ../src/guestfs-actions.pod:6162 ../fish/guestfish-actions.pod:4170
18336 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
18337 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
18338 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
18339 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
18340 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
18341 "the kernel) cannot work out the right geometry and you will need to tell it."
18346 #: ../src/guestfs-actions.pod:6170 ../fish/guestfish-actions.pod:4178
18348 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
18349 "refer to the L<sfdisk(8)> manpage."
18354 #: ../src/guestfs-actions.pod:6173 ../fish/guestfish-actions.pod:4181
18356 "To create a single partition occupying the whole disk, you would pass "
18357 "C<lines> as a single element list, when the single element being the string "
18363 #: ../src/guestfs-actions.pod:6177
18365 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
18369 #: ../src/guestfs-actions.pod:6185 ../src/guestfs-actions.pod:6215
18370 #: ../src/guestfs-actions.pod:6248 ../fish/guestfish-actions.pod:4191
18371 #: ../fish/guestfish-actions.pod:4214 ../fish/guestfish-actions.pod:4236
18373 "This function is deprecated. In new code, use the C<part_add> call instead."
18378 #: ../src/guestfs-actions.pod:6194
18379 msgid "guestfs_sfdiskM"
18384 #: ../src/guestfs-actions.pod:6196
18388 " guestfs_sfdiskM (guestfs_h *g,\n"
18389 " const char *device,\n"
18390 " char *const *lines);\n"
18396 #: ../src/guestfs-actions.pod:6201
18398 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
18399 "partition sizes are specified in megabytes only (rounded to the nearest "
18400 "cylinder) and you don't need to specify the cyls, heads and sectors "
18401 "parameters which were rarely if ever used anyway."
18406 #: ../src/guestfs-actions.pod:6207
18408 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
18409 "C<guestfs_part_disk>"
18414 #: ../src/guestfs-actions.pod:6224
18415 msgid "guestfs_sfdisk_N"
18420 #: ../src/guestfs-actions.pod:6226
18424 " guestfs_sfdisk_N (guestfs_h *g,\n"
18425 " const char *device,\n"
18430 " const char *line);\n"
18436 #: ../src/guestfs-actions.pod:6235 ../fish/guestfish-actions.pod:4225
18438 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
18439 "(note: C<n> counts from 1)."
18444 #: ../src/guestfs-actions.pod:6238
18446 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
18447 "for the cyls/heads/sectors parameters."
18452 #: ../src/guestfs-actions.pod:6241
18453 msgid "See also: C<guestfs_part_add>"
18458 #: ../src/guestfs-actions.pod:6257
18459 msgid "guestfs_sfdisk_disk_geometry"
18464 #: ../src/guestfs-actions.pod:6259
18468 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
18469 " const char *device);\n"
18475 #: ../src/guestfs-actions.pod:6263
18477 "This displays the disk geometry of C<device> read from the partition table. "
18478 "Especially in the case where the underlying block device has been resized, "
18479 "this can be different from the kernel's idea of the geometry (see "
18480 "C<guestfs_sfdisk_kernel_geometry>)."
18485 #: ../src/guestfs-actions.pod:6268 ../src/guestfs-actions.pod:6284
18486 #: ../fish/guestfish-actions.pod:4252 ../fish/guestfish-actions.pod:4261
18487 msgid "The result is in human-readable format, and not designed to be parsed."
18492 #: ../src/guestfs-actions.pod:6276
18493 msgid "guestfs_sfdisk_kernel_geometry"
18498 #: ../src/guestfs-actions.pod:6278
18502 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
18503 " const char *device);\n"
18509 #: ../src/guestfs-actions.pod:6282 ../fish/guestfish-actions.pod:4259
18510 msgid "This displays the kernel's idea of the geometry of C<device>."
18515 #: ../src/guestfs-actions.pod:6292
18516 msgid "guestfs_sfdisk_l"
18521 #: ../src/guestfs-actions.pod:6294
18525 " guestfs_sfdisk_l (guestfs_h *g,\n"
18526 " const char *device);\n"
18532 #: ../src/guestfs-actions.pod:6298 ../fish/guestfish-actions.pod:4268
18534 "This displays the partition table on C<device>, in the human-readable output "
18535 "of the L<sfdisk(8)> command. It is not intended to be parsed."
18540 #: ../src/guestfs-actions.pod:6302
18541 msgid "See also: C<guestfs_part_list>"
18545 #: ../src/guestfs-actions.pod:6307 ../fish/guestfish-actions.pod:4274
18547 "This function is deprecated. In new code, use the C<part_list> call instead."
18552 #: ../src/guestfs-actions.pod:6316
18558 #: ../src/guestfs-actions.pod:6318
18562 " guestfs_sh (guestfs_h *g,\n"
18563 " const char *command);\n"
18569 #: ../src/guestfs-actions.pod:6322 ../fish/guestfish-actions.pod:4285
18571 "This call runs a command from the guest filesystem via the guest's C</bin/"
18577 #: ../src/guestfs-actions.pod:6325
18578 msgid "This is like C<guestfs_command>, but passes the command to:"
18583 #: ../src/guestfs-actions.pod:6327 ../fish/guestfish-actions.pod:4290
18586 " /bin/sh -c \"command\"\n"
18592 #: ../src/guestfs-actions.pod:6329 ../fish/guestfish-actions.pod:4292
18594 "Depending on the guest's shell, this usually results in wildcards being "
18595 "expanded, shell expressions being interpolated and so on."
18600 #: ../src/guestfs-actions.pod:6333
18601 msgid "All the provisos about C<guestfs_command> apply to this call."
18606 #: ../src/guestfs-actions.pod:6340
18607 msgid "guestfs_sh_lines"
18612 #: ../src/guestfs-actions.pod:6342
18616 " guestfs_sh_lines (guestfs_h *g,\n"
18617 " const char *command);\n"
18623 #: ../src/guestfs-actions.pod:6346
18625 "This is the same as C<guestfs_sh>, but splits the result into a list of "
18631 #: ../src/guestfs-actions.pod:6349
18632 msgid "See also: C<guestfs_command_lines>"
18637 #: ../src/guestfs-actions.pod:6357
18638 msgid "guestfs_sleep"
18643 #: ../src/guestfs-actions.pod:6359
18647 " guestfs_sleep (guestfs_h *g,\n"
18654 #: ../src/guestfs-actions.pod:6363 ../fish/guestfish-actions.pod:4311
18655 msgid "Sleep for C<secs> seconds."
18660 #: ../src/guestfs-actions.pod:6367
18661 msgid "(Added in 1.0.41)"
18666 #: ../src/guestfs-actions.pod:6369 ../src/guestfs-structs.pod:109
18667 msgid "guestfs_stat"
18672 #: ../src/guestfs-actions.pod:6371
18675 " struct guestfs_stat *\n"
18676 " guestfs_stat (guestfs_h *g,\n"
18677 " const char *path);\n"
18683 #: ../src/guestfs-actions.pod:6377 ../fish/guestfish-actions.pod:4319
18684 msgid "This is the same as the C<stat(2)> system call."
18689 #: ../src/guestfs-actions.pod:6385 ../src/guestfs-structs.pod:135
18690 msgid "guestfs_statvfs"
18695 #: ../src/guestfs-actions.pod:6387
18698 " struct guestfs_statvfs *\n"
18699 " guestfs_statvfs (guestfs_h *g,\n"
18700 " const char *path);\n"
18706 #: ../src/guestfs-actions.pod:6391 ../fish/guestfish-actions.pod:4325
18708 "Returns file system statistics for any mounted file system. C<path> should "
18709 "be a file or directory in the mounted file system (typically it is the mount "
18710 "point itself, but it doesn't need to be)."
18715 #: ../src/guestfs-actions.pod:6395 ../fish/guestfish-actions.pod:4329
18716 msgid "This is the same as the C<statvfs(2)> system call."
18721 #: ../src/guestfs-actions.pod:6397
18723 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
18724 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
18729 #: ../src/guestfs-actions.pod:6403
18730 msgid "guestfs_strings"
18735 #: ../src/guestfs-actions.pod:6405
18739 " guestfs_strings (guestfs_h *g,\n"
18740 " const char *path);\n"
18746 #: ../src/guestfs-actions.pod:6409 ../fish/guestfish-actions.pod:4335
18748 "This runs the L<strings(1)> command on a file and returns the list of "
18749 "printable strings found."
18754 #: ../src/guestfs-actions.pod:6421
18755 msgid "guestfs_strings_e"
18760 #: ../src/guestfs-actions.pod:6423
18764 " guestfs_strings_e (guestfs_h *g,\n"
18765 " const char *encoding,\n"
18766 " const char *path);\n"
18772 #: ../src/guestfs-actions.pod:6428
18774 "This is like the C<guestfs_strings> command, but allows you to specify the "
18775 "encoding of strings that are looked for in the source file C<path>."
18780 #: ../src/guestfs-actions.pod:6432 ../fish/guestfish-actions.pod:4349
18781 msgid "Allowed encodings are:"
18786 #: ../src/guestfs-actions.pod:6436 ../fish/guestfish-actions.pod:4353
18792 #: ../src/guestfs-actions.pod:6438
18794 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
18795 "ISO-8859-X (this is what C<guestfs_strings> uses)."
18800 #: ../src/guestfs-actions.pod:6441 ../fish/guestfish-actions.pod:4358
18806 #: ../src/guestfs-actions.pod:6443 ../fish/guestfish-actions.pod:4360
18807 msgid "Single 8-bit-byte characters."
18812 #: ../src/guestfs-actions.pod:6445 ../fish/guestfish-actions.pod:4362
18818 #: ../src/guestfs-actions.pod:6447 ../fish/guestfish-actions.pod:4364
18819 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
18824 #: ../src/guestfs-actions.pod:6450 ../fish/guestfish-actions.pod:4367
18825 msgid "l (lower case letter L)"
18830 #: ../src/guestfs-actions.pod:6452 ../fish/guestfish-actions.pod:4369
18832 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
18833 "examining binaries in Windows guests."
18838 #: ../src/guestfs-actions.pod:6455 ../fish/guestfish-actions.pod:4372
18844 #: ../src/guestfs-actions.pod:6457 ../fish/guestfish-actions.pod:4374
18845 msgid "32-bit big endian such as UCS-4BE."
18850 #: ../src/guestfs-actions.pod:6459 ../fish/guestfish-actions.pod:4376
18856 #: ../src/guestfs-actions.pod:6461 ../fish/guestfish-actions.pod:4378
18857 msgid "32-bit little endian such as UCS-4LE."
18862 #: ../src/guestfs-actions.pod:6465 ../fish/guestfish-actions.pod:4382
18863 msgid "The returned strings are transcoded to UTF-8."
18868 #: ../src/guestfs-actions.pod:6476
18869 msgid "guestfs_swapoff_device"
18874 #: ../src/guestfs-actions.pod:6478
18878 " guestfs_swapoff_device (guestfs_h *g,\n"
18879 " const char *device);\n"
18885 #: ../src/guestfs-actions.pod:6482
18887 "This command disables the libguestfs appliance swap device or partition "
18888 "named C<device>. See C<guestfs_swapon_device>."
18893 #: ../src/guestfs-actions.pod:6490
18894 msgid "guestfs_swapoff_file"
18899 #: ../src/guestfs-actions.pod:6492
18903 " guestfs_swapoff_file (guestfs_h *g,\n"
18904 " const char *file);\n"
18910 #: ../src/guestfs-actions.pod:6496 ../fish/guestfish-actions.pod:4399
18911 msgid "This command disables the libguestfs appliance swap on file."
18916 #: ../src/guestfs-actions.pod:6502
18917 msgid "guestfs_swapoff_label"
18922 #: ../src/guestfs-actions.pod:6504
18926 " guestfs_swapoff_label (guestfs_h *g,\n"
18927 " const char *label);\n"
18933 #: ../src/guestfs-actions.pod:6508 ../fish/guestfish-actions.pod:4405
18935 "This command disables the libguestfs appliance swap on labeled swap "
18941 #: ../src/guestfs-actions.pod:6515
18942 msgid "guestfs_swapoff_uuid"
18947 #: ../src/guestfs-actions.pod:6517
18951 " guestfs_swapoff_uuid (guestfs_h *g,\n"
18952 " const char *uuid);\n"
18958 #: ../src/guestfs-actions.pod:6521 ../fish/guestfish-actions.pod:4412
18960 "This command disables the libguestfs appliance swap partition with the given "
18966 #: ../src/guestfs-actions.pod:6528
18967 msgid "guestfs_swapon_device"
18972 #: ../src/guestfs-actions.pod:6530
18976 " guestfs_swapon_device (guestfs_h *g,\n"
18977 " const char *device);\n"
18983 #: ../src/guestfs-actions.pod:6534
18985 "This command enables the libguestfs appliance to use the swap device or "
18986 "partition named C<device>. The increased memory is made available for all "
18987 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
18992 #: ../src/guestfs-actions.pod:6539 ../fish/guestfish-actions.pod:4424
18994 "Note that you should not swap to existing guest swap partitions unless you "
18995 "know what you are doing. They may contain hibernation information, or other "
18996 "information that the guest doesn't want you to trash. You also risk leaking "
18997 "information about the host to the guest this way. Instead, attach a new "
18998 "host device to the guest and swap on that."
19003 #: ../src/guestfs-actions.pod:6550
19004 msgid "guestfs_swapon_file"
19009 #: ../src/guestfs-actions.pod:6552
19013 " guestfs_swapon_file (guestfs_h *g,\n"
19014 " const char *file);\n"
19020 #: ../src/guestfs-actions.pod:6556
19022 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
19028 #: ../src/guestfs-actions.pod:6563
19029 msgid "guestfs_swapon_label"
19034 #: ../src/guestfs-actions.pod:6565
19038 " guestfs_swapon_label (guestfs_h *g,\n"
19039 " const char *label);\n"
19045 #: ../src/guestfs-actions.pod:6569
19047 "This command enables swap to a labeled swap partition. See "
19048 "C<guestfs_swapon_device> for other notes."
19053 #: ../src/guestfs-actions.pod:6576
19054 msgid "guestfs_swapon_uuid"
19059 #: ../src/guestfs-actions.pod:6578
19063 " guestfs_swapon_uuid (guestfs_h *g,\n"
19064 " const char *uuid);\n"
19070 #: ../src/guestfs-actions.pod:6582
19072 "This command enables swap to a swap partition with the given UUID. See "
19073 "C<guestfs_swapon_device> for other notes."
19078 #: ../src/guestfs-actions.pod:6589
19079 msgid "guestfs_sync"
19084 #: ../src/guestfs-actions.pod:6591
19088 " guestfs_sync (guestfs_h *g);\n"
19094 #: ../src/guestfs-actions.pod:6594 ../fish/guestfish-actions.pod:4456
19096 "This syncs the disk, so that any writes are flushed through to the "
19097 "underlying disk image."
19102 #: ../src/guestfs-actions.pod:6597 ../fish/guestfish-actions.pod:4459
19104 "You should always call this if you have modified a disk image, before "
19105 "closing the handle."
19110 #: ../src/guestfs-actions.pod:6604
19111 msgid "guestfs_tail"
19116 #: ../src/guestfs-actions.pod:6606
19120 " guestfs_tail (guestfs_h *g,\n"
19121 " const char *path);\n"
19127 #: ../src/guestfs-actions.pod:6610 ../fish/guestfish-actions.pod:4466
19129 "This command returns up to the last 10 lines of a file as a list of strings."
19134 #: ../src/guestfs-actions.pod:6622
19135 msgid "guestfs_tail_n"
19140 #: ../src/guestfs-actions.pod:6624
19144 " guestfs_tail_n (guestfs_h *g,\n"
19146 " const char *path);\n"
19152 #: ../src/guestfs-actions.pod:6629 ../fish/guestfish-actions.pod:4476
19154 "If the parameter C<nrlines> is a positive number, this returns the last "
19155 "C<nrlines> lines of the file C<path>."
19160 #: ../src/guestfs-actions.pod:6632 ../fish/guestfish-actions.pod:4479
19162 "If the parameter C<nrlines> is a negative number, this returns lines from "
19163 "the file C<path>, starting with the C<-nrlines>th line."
19168 #: ../src/guestfs-actions.pod:6646
19169 msgid "guestfs_tar_in"
19174 #: ../src/guestfs-actions.pod:6648
19178 " guestfs_tar_in (guestfs_h *g,\n"
19179 " const char *tarfile,\n"
19180 " const char *directory);\n"
19186 #: ../src/guestfs-actions.pod:6653 ../fish/guestfish-actions.pod:4491
19188 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
19189 "tar file) into C<directory>."
19194 #: ../src/guestfs-actions.pod:6656
19196 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
19201 #: ../src/guestfs-actions.pod:6661 ../src/guestfs-actions.pod:6678
19202 #: ../src/guestfs-actions.pod:6694 ../src/guestfs-actions.pod:6710
19203 msgid "(Added in 1.0.3)"
19208 #: ../src/guestfs-actions.pod:6663
19209 msgid "guestfs_tar_out"
19214 #: ../src/guestfs-actions.pod:6665
19218 " guestfs_tar_out (guestfs_h *g,\n"
19219 " const char *directory,\n"
19220 " const char *tarfile);\n"
19226 #: ../src/guestfs-actions.pod:6670 ../fish/guestfish-actions.pod:4503
19228 "This command packs the contents of C<directory> and downloads it to local "
19234 #: ../src/guestfs-actions.pod:6673
19236 "To download a compressed tarball, use C<guestfs_tgz_out> or "
19237 "C<guestfs_txz_out>."
19242 #: ../src/guestfs-actions.pod:6680
19243 msgid "guestfs_tgz_in"
19248 #: ../src/guestfs-actions.pod:6682
19252 " guestfs_tgz_in (guestfs_h *g,\n"
19253 " const char *tarball,\n"
19254 " const char *directory);\n"
19260 #: ../src/guestfs-actions.pod:6687 ../fish/guestfish-actions.pod:4515
19262 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
19263 "tar file) into C<directory>."
19268 #: ../src/guestfs-actions.pod:6690
19269 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
19274 #: ../src/guestfs-actions.pod:6696
19275 msgid "guestfs_tgz_out"
19280 #: ../src/guestfs-actions.pod:6698
19284 " guestfs_tgz_out (guestfs_h *g,\n"
19285 " const char *directory,\n"
19286 " const char *tarball);\n"
19292 #: ../src/guestfs-actions.pod:6703 ../fish/guestfish-actions.pod:4526
19294 "This command packs the contents of C<directory> and downloads it to local "
19300 #: ../src/guestfs-actions.pod:6706
19301 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
19306 #: ../src/guestfs-actions.pod:6712
19307 msgid "guestfs_touch"
19312 #: ../src/guestfs-actions.pod:6714
19316 " guestfs_touch (guestfs_h *g,\n"
19317 " const char *path);\n"
19323 #: ../src/guestfs-actions.pod:6718 ../fish/guestfish-actions.pod:4537
19325 "Touch acts like the L<touch(1)> command. It can be used to update the "
19326 "timestamps on a file, or, if the file does not exist, to create a new zero-"
19332 #: ../src/guestfs-actions.pod:6722 ../fish/guestfish-actions.pod:4541
19334 "This command only works on regular files, and will fail on other file types "
19335 "such as directories, symbolic links, block special etc."
19340 #: ../src/guestfs-actions.pod:6729
19341 msgid "guestfs_truncate"
19346 #: ../src/guestfs-actions.pod:6731
19350 " guestfs_truncate (guestfs_h *g,\n"
19351 " const char *path);\n"
19357 #: ../src/guestfs-actions.pod:6735 ../fish/guestfish-actions.pod:4548
19359 "This command truncates C<path> to a zero-length file. The file must exist "
19365 #: ../src/guestfs-actions.pod:6742
19366 msgid "guestfs_truncate_size"
19371 #: ../src/guestfs-actions.pod:6744
19375 " guestfs_truncate_size (guestfs_h *g,\n"
19376 " const char *path,\n"
19377 " int64_t size);\n"
19383 #: ../src/guestfs-actions.pod:6749 ../fish/guestfish-actions.pod:4555
19385 "This command truncates C<path> to size C<size> bytes. The file must exist "
19391 #: ../src/guestfs-actions.pod:6752
19393 "If the current file size is less than C<size> then the file is extended to "
19394 "the required size with zero bytes. This creates a sparse file (ie. disk "
19395 "blocks are not allocated for the file until you write to it). To create a "
19396 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
19401 #: ../src/guestfs-actions.pod:6762
19402 msgid "guestfs_tune2fs_l"
19407 #: ../src/guestfs-actions.pod:6764
19411 " guestfs_tune2fs_l (guestfs_h *g,\n"
19412 " const char *device);\n"
19418 #: ../src/guestfs-actions.pod:6768 ../fish/guestfish-actions.pod:4568
19420 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
19426 #: ../src/guestfs-actions.pod:6771 ../fish/guestfish-actions.pod:4571
19428 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
19429 "for more details. The list of fields returned isn't clearly defined, and "
19430 "depends on both the version of C<tune2fs> that libguestfs was built against, "
19431 "and the filesystem itself."
19436 #: ../src/guestfs-actions.pod:6784
19437 msgid "guestfs_txz_in"
19442 #: ../src/guestfs-actions.pod:6786
19446 " guestfs_txz_in (guestfs_h *g,\n"
19447 " const char *tarball,\n"
19448 " const char *directory);\n"
19454 #: ../src/guestfs-actions.pod:6791 ../fish/guestfish-actions.pod:4580
19456 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
19457 "tar file) into C<directory>."
19462 #: ../src/guestfs-actions.pod:6798
19463 msgid "guestfs_txz_out"
19468 #: ../src/guestfs-actions.pod:6800
19472 " guestfs_txz_out (guestfs_h *g,\n"
19473 " const char *directory,\n"
19474 " const char *tarball);\n"
19480 #: ../src/guestfs-actions.pod:6805 ../fish/guestfish-actions.pod:4589
19482 "This command packs the contents of C<directory> and downloads it to local "
19483 "file C<tarball> (as an xz compressed tar archive)."
19488 #: ../src/guestfs-actions.pod:6812
19489 msgid "guestfs_umask"
19494 #: ../src/guestfs-actions.pod:6814
19498 " guestfs_umask (guestfs_h *g,\n"
19505 #: ../src/guestfs-actions.pod:6818 ../fish/guestfish-actions.pod:4598
19507 "This function sets the mask used for creating new files and device nodes to "
19513 #: ../src/guestfs-actions.pod:6821 ../fish/guestfish-actions.pod:4601
19515 "Typical umask values would be C<022> which creates new files with "
19516 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
19517 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
19522 #: ../src/guestfs-actions.pod:6826 ../fish/guestfish-actions.pod:4606
19524 "The default umask is C<022>. This is important because it means that "
19525 "directories and device nodes will be created with C<0644> or C<0755> mode "
19526 "even if you specify C<0777>."
19531 #: ../src/guestfs-actions.pod:6830
19533 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
19534 "C<guestfs_mkdir>."
19539 #: ../src/guestfs-actions.pod:6833 ../fish/guestfish-actions.pod:4613
19540 msgid "This call returns the previous umask."
19545 #: ../src/guestfs-actions.pod:6839
19546 msgid "guestfs_umount"
19551 #: ../src/guestfs-actions.pod:6841
19555 " guestfs_umount (guestfs_h *g,\n"
19556 " const char *pathordevice);\n"
19562 #: ../src/guestfs-actions.pod:6845 ../fish/guestfish-actions.pod:4621
19564 "This unmounts the given filesystem. The filesystem may be specified either "
19565 "by its mountpoint (path) or the device which contains the filesystem."
19570 #: ../src/guestfs-actions.pod:6853
19571 msgid "guestfs_umount_all"
19576 #: ../src/guestfs-actions.pod:6855
19580 " guestfs_umount_all (guestfs_h *g);\n"
19586 #: ../src/guestfs-actions.pod:6858 ../fish/guestfish-actions.pod:4631
19587 msgid "This unmounts all mounted filesystems."
19592 #: ../src/guestfs-actions.pod:6860 ../fish/guestfish-actions.pod:4633
19593 msgid "Some internal mounts are not unmounted by this call."
19598 #: ../src/guestfs-actions.pod:6866
19599 msgid "guestfs_upload"
19604 #: ../src/guestfs-actions.pod:6868
19608 " guestfs_upload (guestfs_h *g,\n"
19609 " const char *filename,\n"
19610 " const char *remotefilename);\n"
19616 #: ../src/guestfs-actions.pod:6873 ../src/guestfs-actions.pod:6897
19617 #: ../fish/guestfish-actions.pod:4639 ../fish/guestfish-actions.pod:4652
19618 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
19623 #: ../src/guestfs-actions.pod:6878
19624 msgid "See also C<guestfs_download>."
19629 #: ../src/guestfs-actions.pod:6889
19630 msgid "guestfs_upload_offset"
19635 #: ../src/guestfs-actions.pod:6891
19639 " guestfs_upload_offset (guestfs_h *g,\n"
19640 " const char *filename,\n"
19641 " const char *remotefilename,\n"
19642 " int64_t offset);\n"
19648 #: ../src/guestfs-actions.pod:6900 ../fish/guestfish-actions.pod:4655
19650 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
19651 "The intention is to overwrite parts of existing files or devices, although "
19652 "if a non-existant file is specified then it is created with a \"hole\" "
19653 "before C<offset>. The size of the data written is implicit in the size of "
19654 "the source C<filename>."
19659 #: ../src/guestfs-actions.pod:6907
19661 "Note that there is no limit on the amount of data that can be uploaded with "
19662 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
19663 "full amount unless an error occurs."
19668 #: ../src/guestfs-actions.pod:6912
19669 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
19674 #: ../src/guestfs-actions.pod:6923
19675 msgid "guestfs_utimens"
19680 #: ../src/guestfs-actions.pod:6925
19684 " guestfs_utimens (guestfs_h *g,\n"
19685 " const char *path,\n"
19686 " int64_t atsecs,\n"
19687 " int64_t atnsecs,\n"
19688 " int64_t mtsecs,\n"
19689 " int64_t mtnsecs);\n"
19695 #: ../src/guestfs-actions.pod:6933 ../fish/guestfish-actions.pod:4675
19696 msgid "This command sets the timestamps of a file with nanosecond precision."
19701 #: ../src/guestfs-actions.pod:6936 ../fish/guestfish-actions.pod:4678
19703 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
19709 #: ../src/guestfs-actions.pod:6939 ../fish/guestfish-actions.pod:4681
19711 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
19712 "nanoseconds from the epoch."
19717 #: ../src/guestfs-actions.pod:6942 ../fish/guestfish-actions.pod:4684
19719 "If the C<*nsecs> field contains the special value C<-1> then the "
19720 "corresponding timestamp is set to the current time. (The C<*secs> field is "
19721 "ignored in this case)."
19726 #: ../src/guestfs-actions.pod:6946 ../fish/guestfish-actions.pod:4688
19728 "If the C<*nsecs> field contains the special value C<-2> then the "
19729 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
19735 #: ../src/guestfs-actions.pod:6954 ../src/guestfs-structs.pod:175
19736 msgid "guestfs_version"
19741 #: ../src/guestfs-actions.pod:6956
19744 " struct guestfs_version *\n"
19745 " guestfs_version (guestfs_h *g);\n"
19751 #: ../src/guestfs-actions.pod:6959 ../fish/guestfish-actions.pod:4696
19753 "Return the libguestfs version number that the program is linked against."
19758 #: ../src/guestfs-actions.pod:6962 ../fish/guestfish-actions.pod:4699
19760 "Note that because of dynamic linking this is not necessarily the version of "
19761 "libguestfs that you compiled against. You can compile the program, and then "
19762 "at runtime dynamically link against a completely different C<libguestfs.so> "
19768 #: ../src/guestfs-actions.pod:6967 ../fish/guestfish-actions.pod:4704
19770 "This call was added in version C<1.0.58>. In previous versions of "
19771 "libguestfs there was no way to get the version number. From C code you can "
19772 "use dynamic linker functions to find out if this symbol exists (if it "
19773 "doesn't, then it's an earlier version)."
19778 #: ../src/guestfs-actions.pod:6973 ../fish/guestfish-actions.pod:4710
19780 "The call returns a structure with four elements. The first three (C<major>, "
19781 "C<minor> and C<release>) are numbers and correspond to the usual version "
19782 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
19783 "but may be used for distro-specific information."
19788 #: ../src/guestfs-actions.pod:6979 ../fish/guestfish-actions.pod:4716
19790 "To construct the original version string: C<$major.$minor.$release$extra>"
19795 #: ../src/guestfs-actions.pod:6982 ../fish/guestfish-actions.pod:4719
19796 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
19801 #: ../src/guestfs-actions.pod:6984
19803 "I<Note:> Don't use this call to test for availability of features. In "
19804 "enterprise distributions we backport features from later versions into "
19805 "earlier versions, making this an unreliable way to test for features. Use "
19806 "C<guestfs_available> instead."
19811 #: ../src/guestfs-actions.pod:6990
19813 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
19814 "error. I<The caller must call C<guestfs_free_version> after use>."
19819 #: ../src/guestfs-actions.pod:6994
19820 msgid "(Added in 1.0.58)"
19825 #: ../src/guestfs-actions.pod:6996
19826 msgid "guestfs_vfs_label"
19831 #: ../src/guestfs-actions.pod:6998
19835 " guestfs_vfs_label (guestfs_h *g,\n"
19836 " const char *device);\n"
19842 #: ../src/guestfs-actions.pod:7002 ../fish/guestfish-actions.pod:4731
19843 msgid "This returns the filesystem label of the filesystem on C<device>."
19848 #: ../src/guestfs-actions.pod:7005 ../fish/guestfish-actions.pod:4734
19849 msgid "If the filesystem is unlabeled, this returns the empty string."
19854 #: ../src/guestfs-actions.pod:7007
19855 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
19860 #: ../src/guestfs-actions.pod:7012 ../src/guestfs-actions.pod:7049
19861 msgid "(Added in 1.3.18)"
19866 #: ../src/guestfs-actions.pod:7014
19867 msgid "guestfs_vfs_type"
19872 #: ../src/guestfs-actions.pod:7016
19876 " guestfs_vfs_type (guestfs_h *g,\n"
19877 " const char *device);\n"
19883 #: ../src/guestfs-actions.pod:7020 ../fish/guestfish-actions.pod:4742
19885 "This command gets the filesystem type corresponding to the filesystem on "
19891 #: ../src/guestfs-actions.pod:7023 ../fish/guestfish-actions.pod:4745
19893 "For most filesystems, the result is the name of the Linux VFS module which "
19894 "would be used to mount this filesystem if you mounted it without specifying "
19895 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
19900 #: ../src/guestfs-actions.pod:7033
19901 msgid "guestfs_vfs_uuid"
19906 #: ../src/guestfs-actions.pod:7035
19910 " guestfs_vfs_uuid (guestfs_h *g,\n"
19911 " const char *device);\n"
19917 #: ../src/guestfs-actions.pod:7039 ../fish/guestfish-actions.pod:4754
19918 msgid "This returns the filesystem UUID of the filesystem on C<device>."
19923 #: ../src/guestfs-actions.pod:7042 ../fish/guestfish-actions.pod:4757
19924 msgid "If the filesystem does not have a UUID, this returns the empty string."
19929 #: ../src/guestfs-actions.pod:7044
19930 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
19935 #: ../src/guestfs-actions.pod:7051
19936 msgid "guestfs_vg_activate"
19941 #: ../src/guestfs-actions.pod:7053
19945 " guestfs_vg_activate (guestfs_h *g,\n"
19947 " char *const *volgroups);\n"
19953 #: ../src/guestfs-actions.pod:7058 ../fish/guestfish-actions.pod:4765
19955 "This command activates or (if C<activate> is false) deactivates all logical "
19956 "volumes in the listed volume groups C<volgroups>. If activated, then they "
19957 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
19958 "deactivated, then those devices disappear."
19963 #: ../src/guestfs-actions.pod:7064 ../fish/guestfish-actions.pod:4771
19964 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
19969 #: ../src/guestfs-actions.pod:7066 ../fish/guestfish-actions.pod:4773
19971 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
19972 "activated or deactivated."
19977 #: ../src/guestfs-actions.pod:7073
19978 msgid "guestfs_vg_activate_all"
19983 #: ../src/guestfs-actions.pod:7075
19987 " guestfs_vg_activate_all (guestfs_h *g,\n"
19988 " int activate);\n"
19994 #: ../src/guestfs-actions.pod:7079 ../fish/guestfish-actions.pod:4780
19996 "This command activates or (if C<activate> is false) deactivates all logical "
19997 "volumes in all volume groups. If activated, then they are made known to the "
19998 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
19999 "those devices disappear."
20004 #: ../src/guestfs-actions.pod:7085 ../fish/guestfish-actions.pod:4786
20005 msgid "This command is the same as running C<vgchange -a y|n>"
20010 #: ../src/guestfs-actions.pod:7091
20011 msgid "guestfs_vgcreate"
20016 #: ../src/guestfs-actions.pod:7093
20020 " guestfs_vgcreate (guestfs_h *g,\n"
20021 " const char *volgroup,\n"
20022 " char *const *physvols);\n"
20028 #: ../src/guestfs-actions.pod:7098 ../fish/guestfish-actions.pod:4792
20030 "This creates an LVM volume group called C<volgroup> from the non-empty list "
20031 "of physical volumes C<physvols>."
20036 #: ../src/guestfs-actions.pod:7105
20037 msgid "guestfs_vglvuuids"
20042 #: ../src/guestfs-actions.pod:7107
20046 " guestfs_vglvuuids (guestfs_h *g,\n"
20047 " const char *vgname);\n"
20053 #: ../src/guestfs-actions.pod:7111 ../fish/guestfish-actions.pod:4799
20055 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
20056 "volumes created in this volume group."
20061 #: ../src/guestfs-actions.pod:7114
20063 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
20064 "associate logical volumes and volume groups."
20069 #: ../src/guestfs-actions.pod:7117
20070 msgid "See also C<guestfs_vgpvuuids>."
20075 #: ../src/guestfs-actions.pod:7125
20076 msgid "guestfs_vgpvuuids"
20081 #: ../src/guestfs-actions.pod:7127
20085 " guestfs_vgpvuuids (guestfs_h *g,\n"
20086 " const char *vgname);\n"
20092 #: ../src/guestfs-actions.pod:7131 ../fish/guestfish-actions.pod:4811
20094 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
20095 "volumes that this volume group resides on."
20100 #: ../src/guestfs-actions.pod:7134
20102 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
20103 "associate physical volumes and volume groups."
20108 #: ../src/guestfs-actions.pod:7137
20109 msgid "See also C<guestfs_vglvuuids>."
20114 #: ../src/guestfs-actions.pod:7145
20115 msgid "guestfs_vgremove"
20120 #: ../src/guestfs-actions.pod:7147
20124 " guestfs_vgremove (guestfs_h *g,\n"
20125 " const char *vgname);\n"
20131 #: ../src/guestfs-actions.pod:7151 ../fish/guestfish-actions.pod:4823
20132 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
20137 #: ../src/guestfs-actions.pod:7153 ../fish/guestfish-actions.pod:4825
20139 "This also forcibly removes all logical volumes in the volume group (if any)."
20144 #: ../src/guestfs-actions.pod:7160
20145 msgid "guestfs_vgrename"
20150 #: ../src/guestfs-actions.pod:7162
20154 " guestfs_vgrename (guestfs_h *g,\n"
20155 " const char *volgroup,\n"
20156 " const char *newvolgroup);\n"
20162 #: ../src/guestfs-actions.pod:7167 ../fish/guestfish-actions.pod:4832
20163 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
20168 #: ../src/guestfs-actions.pod:7173
20169 msgid "guestfs_vgs"
20174 #: ../src/guestfs-actions.pod:7175
20178 " guestfs_vgs (guestfs_h *g);\n"
20184 #: ../src/guestfs-actions.pod:7178 ../fish/guestfish-actions.pod:4838
20186 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
20192 #: ../src/guestfs-actions.pod:7181 ../fish/guestfish-actions.pod:4841
20194 "This returns a list of just the volume group names that were detected (eg. "
20200 #: ../src/guestfs-actions.pod:7184
20201 msgid "See also C<guestfs_vgs_full>."
20206 #: ../src/guestfs-actions.pod:7192
20207 msgid "guestfs_vgs_full"
20212 #: ../src/guestfs-actions.pod:7194
20215 " struct guestfs_lvm_vg_list *\n"
20216 " guestfs_vgs_full (guestfs_h *g);\n"
20222 #: ../src/guestfs-actions.pod:7197 ../fish/guestfish-actions.pod:4850
20224 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
20225 "> command. The \"full\" version includes all fields."
20230 #: ../src/guestfs-actions.pod:7200
20232 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
20233 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after use>."
20238 #: ../src/guestfs-actions.pod:7206
20239 msgid "guestfs_vgscan"
20244 #: ../src/guestfs-actions.pod:7208
20248 " guestfs_vgscan (guestfs_h *g);\n"
20254 #: ../src/guestfs-actions.pod:7211 ../fish/guestfish-actions.pod:4857
20256 "This rescans all block devices and rebuilds the list of LVM physical "
20257 "volumes, volume groups and logical volumes."
20262 #: ../src/guestfs-actions.pod:7218
20263 msgid "guestfs_vguuid"
20268 #: ../src/guestfs-actions.pod:7220
20272 " guestfs_vguuid (guestfs_h *g,\n"
20273 " const char *vgname);\n"
20279 #: ../src/guestfs-actions.pod:7224 ../fish/guestfish-actions.pod:4864
20280 msgid "This command returns the UUID of the LVM VG named C<vgname>."
20285 #: ../src/guestfs-actions.pod:7231
20286 msgid "guestfs_wait_ready"
20291 #: ../src/guestfs-actions.pod:7233
20295 " guestfs_wait_ready (guestfs_h *g);\n"
20301 #: ../src/guestfs-actions.pod:7236
20302 msgid "This function is a no op."
20307 #: ../src/guestfs-actions.pod:7238
20309 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
20310 "calling C<guestfs_launch> to wait for the launch to complete. However this "
20311 "is no longer necessary because C<guestfs_launch> now does the waiting."
20316 #: ../src/guestfs-actions.pod:7243
20318 "If you see any calls to this function in code then you can just remove them, "
20319 "unless you want to retain compatibility with older versions of the API."
20323 #: ../src/guestfs-actions.pod:7249
20325 "This function is deprecated. In new code, use the C<launch> call instead."
20330 #: ../src/guestfs-actions.pod:7258
20331 msgid "guestfs_wc_c"
20336 #: ../src/guestfs-actions.pod:7260
20340 " guestfs_wc_c (guestfs_h *g,\n"
20341 " const char *path);\n"
20347 #: ../src/guestfs-actions.pod:7264 ../fish/guestfish-actions.pod:4870
20349 "This command counts the characters in a file, using the C<wc -c> external "
20355 #: ../src/guestfs-actions.pod:7271
20356 msgid "guestfs_wc_l"
20361 #: ../src/guestfs-actions.pod:7273
20365 " guestfs_wc_l (guestfs_h *g,\n"
20366 " const char *path);\n"
20372 #: ../src/guestfs-actions.pod:7277 ../fish/guestfish-actions.pod:4877
20374 "This command counts the lines in a file, using the C<wc -l> external command."
20379 #: ../src/guestfs-actions.pod:7284
20380 msgid "guestfs_wc_w"
20385 #: ../src/guestfs-actions.pod:7286
20389 " guestfs_wc_w (guestfs_h *g,\n"
20390 " const char *path);\n"
20396 #: ../src/guestfs-actions.pod:7290 ../fish/guestfish-actions.pod:4884
20398 "This command counts the words in a file, using the C<wc -w> external command."
20403 #: ../src/guestfs-actions.pod:7297
20404 msgid "guestfs_write"
20409 #: ../src/guestfs-actions.pod:7299
20413 " guestfs_write (guestfs_h *g,\n"
20414 " const char *path,\n"
20415 " const char *content,\n"
20416 " size_t content_size);\n"
20422 #: ../src/guestfs-actions.pod:7305 ../fish/guestfish-actions.pod:4891
20424 "This call creates a file called C<path>. The content of the file is the "
20425 "string C<content> (which can contain any 8 bit data)."
20430 #: ../src/guestfs-actions.pod:7315
20431 msgid "guestfs_write_file"
20436 #: ../src/guestfs-actions.pod:7317
20440 " guestfs_write_file (guestfs_h *g,\n"
20441 " const char *path,\n"
20442 " const char *content,\n"
20449 #: ../src/guestfs-actions.pod:7323 ../fish/guestfish-actions.pod:4901
20451 "This call creates a file called C<path>. The contents of the file is the "
20452 "string C<content> (which can contain any 8 bit data), with length C<size>."
20457 #: ../src/guestfs-actions.pod:7327 ../fish/guestfish-actions.pod:4905
20459 "As a special case, if C<size> is C<0> then the length is calculated using "
20460 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
20465 #: ../src/guestfs-actions.pod:7331 ../fish/guestfish-actions.pod:4909
20467 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
20468 "I<not> work, even if the length is specified."
20473 #: ../src/guestfs-actions.pod:7339 ../fish/guestfish-actions.pod:4915
20475 "This function is deprecated. In new code, use the C<write> call instead."
20480 #: ../src/guestfs-actions.pod:7348
20481 msgid "guestfs_zegrep"
20486 #: ../src/guestfs-actions.pod:7350
20490 " guestfs_zegrep (guestfs_h *g,\n"
20491 " const char *regex,\n"
20492 " const char *path);\n"
20498 #: ../src/guestfs-actions.pod:7355 ../fish/guestfish-actions.pod:4926
20500 "This calls the external C<zegrep> program and returns the matching lines."
20505 #: ../src/guestfs-actions.pod:7367
20506 msgid "guestfs_zegrepi"
20511 #: ../src/guestfs-actions.pod:7369
20515 " guestfs_zegrepi (guestfs_h *g,\n"
20516 " const char *regex,\n"
20517 " const char *path);\n"
20523 #: ../src/guestfs-actions.pod:7374 ../fish/guestfish-actions.pod:4936
20525 "This calls the external C<zegrep -i> program and returns the matching lines."
20530 #: ../src/guestfs-actions.pod:7386
20531 msgid "guestfs_zero"
20536 #: ../src/guestfs-actions.pod:7388
20540 " guestfs_zero (guestfs_h *g,\n"
20541 " const char *device);\n"
20547 #: ../src/guestfs-actions.pod:7392 ../fish/guestfish-actions.pod:4946
20548 msgid "This command writes zeroes over the first few blocks of C<device>."
20553 #: ../src/guestfs-actions.pod:7394 ../fish/guestfish-actions.pod:4948
20555 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
20556 "securely wipe the device). It should be sufficient to remove any partition "
20557 "tables, filesystem superblocks and so on."
20561 #: ../src/guestfs-actions.pod:7398
20563 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
20564 "C<guestfs_is_zero_device>"
20569 #: ../src/guestfs-actions.pod:7410
20570 msgid "guestfs_zero_device"
20575 #: ../src/guestfs-actions.pod:7412
20579 " guestfs_zero_device (guestfs_h *g,\n"
20580 " const char *device);\n"
20586 #: ../src/guestfs-actions.pod:7416
20588 "This command writes zeroes over the entire C<device>. Compare with "
20589 "C<guestfs_zero> which just zeroes the first few blocks of a device."
20594 #: ../src/guestfs-actions.pod:7430
20595 msgid "(Added in 1.3.1)"
20600 #: ../src/guestfs-actions.pod:7432
20601 msgid "guestfs_zerofree"
20606 #: ../src/guestfs-actions.pod:7434
20610 " guestfs_zerofree (guestfs_h *g,\n"
20611 " const char *device);\n"
20617 #: ../src/guestfs-actions.pod:7438 ../fish/guestfish-actions.pod:4970
20619 "This runs the I<zerofree> program on C<device>. This program claims to zero "
20620 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
20621 "possible to compress the filesystem more effectively."
20626 #: ../src/guestfs-actions.pod:7443 ../fish/guestfish-actions.pod:4975
20627 msgid "You should B<not> run this program if the filesystem is mounted."
20632 #: ../src/guestfs-actions.pod:7446 ../fish/guestfish-actions.pod:4978
20634 "It is possible that using this program can damage the filesystem or data on "
20640 #: ../src/guestfs-actions.pod:7453
20641 msgid "guestfs_zfgrep"
20646 #: ../src/guestfs-actions.pod:7455
20650 " guestfs_zfgrep (guestfs_h *g,\n"
20651 " const char *pattern,\n"
20652 " const char *path);\n"
20658 #: ../src/guestfs-actions.pod:7460 ../fish/guestfish-actions.pod:4985
20660 "This calls the external C<zfgrep> program and returns the matching lines."
20665 #: ../src/guestfs-actions.pod:7472
20666 msgid "guestfs_zfgrepi"
20671 #: ../src/guestfs-actions.pod:7474
20675 " guestfs_zfgrepi (guestfs_h *g,\n"
20676 " const char *pattern,\n"
20677 " const char *path);\n"
20683 #: ../src/guestfs-actions.pod:7479 ../fish/guestfish-actions.pod:4995
20685 "This calls the external C<zfgrep -i> program and returns the matching lines."
20690 #: ../src/guestfs-actions.pod:7491
20691 msgid "guestfs_zfile"
20696 #: ../src/guestfs-actions.pod:7493
20700 " guestfs_zfile (guestfs_h *g,\n"
20701 " const char *meth,\n"
20702 " const char *path);\n"
20708 #: ../src/guestfs-actions.pod:7498 ../fish/guestfish-actions.pod:5005
20710 "This command runs C<file> after first decompressing C<path> using C<method>."
20715 #: ../src/guestfs-actions.pod:7501 ../fish/guestfish-actions.pod:5008
20716 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
20721 #: ../src/guestfs-actions.pod:7503
20723 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
20729 #: ../src/guestfs-actions.pod:7509 ../fish/guestfish-actions.pod:5013
20731 "This function is deprecated. In new code, use the C<file> call instead."
20736 #: ../src/guestfs-actions.pod:7518
20737 msgid "guestfs_zgrep"
20742 #: ../src/guestfs-actions.pod:7520
20746 " guestfs_zgrep (guestfs_h *g,\n"
20747 " const char *regex,\n"
20748 " const char *path);\n"
20754 #: ../src/guestfs-actions.pod:7525 ../fish/guestfish-actions.pod:5024
20756 "This calls the external C<zgrep> program and returns the matching lines."
20761 #: ../src/guestfs-actions.pod:7537
20762 msgid "guestfs_zgrepi"
20767 #: ../src/guestfs-actions.pod:7539
20771 " guestfs_zgrepi (guestfs_h *g,\n"
20772 " const char *regex,\n"
20773 " const char *path);\n"
20779 #: ../src/guestfs-actions.pod:7544 ../fish/guestfish-actions.pod:5034
20781 "This calls the external C<zgrep -i> program and returns the matching lines."
20786 #: ../src/guestfs-availability.pod:3
20792 #: ../src/guestfs-availability.pod:5
20794 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
20795 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
20796 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
20797 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
20798 "L</guestfs_aug_save> L</guestfs_aug_set>"
20803 #: ../src/guestfs-availability.pod:21
20809 #: ../src/guestfs-availability.pod:23
20811 "The following functions: L</guestfs_inotify_add_watch> L</"
20812 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
20813 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
20818 #: ../src/guestfs-availability.pod:31
20819 msgid "B<linuxfsuuid>"
20824 #: ../src/guestfs-availability.pod:33
20826 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
20827 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
20832 #: ../src/guestfs-availability.pod:40
20833 msgid "B<linuxmodules>"
20838 #: ../src/guestfs-availability.pod:42
20839 msgid "The following functions: L</guestfs_modprobe>"
20844 #: ../src/guestfs-availability.pod:45
20845 msgid "B<linuxxattrs>"
20850 #: ../src/guestfs-availability.pod:47
20852 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> L</"
20853 "guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> L</"
20854 "guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> L</"
20855 "guestfs_setxattr>"
20860 #: ../src/guestfs-availability.pod:58
20866 #: ../src/guestfs-availability.pod:60
20868 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
20869 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
20870 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
20875 #: ../src/guestfs-availability.pod:69
20881 #: ../src/guestfs-availability.pod:71
20883 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
20884 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
20885 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
20886 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
20887 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
20888 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
20889 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
20894 #: ../src/guestfs-availability.pod:94
20900 #: ../src/guestfs-availability.pod:96
20902 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
20903 "guestfs_mknod_b> L</guestfs_mknod_c>"
20908 #: ../src/guestfs-availability.pod:102
20914 #: ../src/guestfs-availability.pod:104
20915 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
20920 #: ../src/guestfs-availability.pod:107
20921 msgid "B<ntfsprogs>"
20926 #: ../src/guestfs-availability.pod:109
20928 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
20933 #: ../src/guestfs-availability.pod:113
20934 msgid "B<realpath>"
20939 #: ../src/guestfs-availability.pod:115
20940 msgid "The following functions: L</guestfs_realpath>"
20945 #: ../src/guestfs-availability.pod:118
20951 #: ../src/guestfs-availability.pod:120
20953 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
20954 "guestfs_scrub_freespace>"
20959 #: ../src/guestfs-availability.pod:125
20965 #: ../src/guestfs-availability.pod:127
20966 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
20971 #: ../src/guestfs-availability.pod:131
20977 #: ../src/guestfs-availability.pod:133
20978 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
20983 #: ../src/guestfs-availability.pod:137
20984 msgid "B<zerofree>"
20989 #: ../src/guestfs-availability.pod:139
20990 msgid "The following functions: L</guestfs_zerofree>"
20995 #: ../src/guestfs-structs.pod:1
20996 msgid "guestfs_int_bool"
21001 #: ../src/guestfs-structs.pod:3
21004 " struct guestfs_int_bool {\n"
21013 #: ../src/guestfs-structs.pod:8
21016 " struct guestfs_int_bool_list {\n"
21017 " uint32_t len; /* Number of elements in list. */\n"
21018 " struct guestfs_int_bool *val; /* Elements. */\n"
21025 #: ../src/guestfs-structs.pod:13
21028 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
21029 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
21035 #: ../src/guestfs-structs.pod:16
21036 msgid "guestfs_lvm_pv"
21041 #: ../src/guestfs-structs.pod:18
21044 " struct guestfs_lvm_pv {\n"
21045 " char *pv_name;\n"
21046 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
21047 " char pv_uuid[32];\n"
21049 " uint64_t pv_size;\n"
21050 " uint64_t dev_size;\n"
21051 " uint64_t pv_free;\n"
21052 " uint64_t pv_used;\n"
21053 " char *pv_attr;\n"
21054 " int64_t pv_pe_count;\n"
21055 " int64_t pv_pe_alloc_count;\n"
21056 " char *pv_tags;\n"
21057 " uint64_t pe_start;\n"
21058 " int64_t pv_mda_count;\n"
21059 " uint64_t pv_mda_free;\n"
21066 #: ../src/guestfs-structs.pod:36
21069 " struct guestfs_lvm_pv_list {\n"
21070 " uint32_t len; /* Number of elements in list. */\n"
21071 " struct guestfs_lvm_pv *val; /* Elements. */\n"
21078 #: ../src/guestfs-structs.pod:41
21081 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
21082 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
21088 #: ../src/guestfs-structs.pod:44
21089 msgid "guestfs_lvm_vg"
21094 #: ../src/guestfs-structs.pod:46
21097 " struct guestfs_lvm_vg {\n"
21098 " char *vg_name;\n"
21099 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
21100 " char vg_uuid[32];\n"
21102 " char *vg_attr;\n"
21103 " uint64_t vg_size;\n"
21104 " uint64_t vg_free;\n"
21105 " char *vg_sysid;\n"
21106 " uint64_t vg_extent_size;\n"
21107 " int64_t vg_extent_count;\n"
21108 " int64_t vg_free_count;\n"
21109 " int64_t max_lv;\n"
21110 " int64_t max_pv;\n"
21111 " int64_t pv_count;\n"
21112 " int64_t lv_count;\n"
21113 " int64_t snap_count;\n"
21114 " int64_t vg_seqno;\n"
21115 " char *vg_tags;\n"
21116 " int64_t vg_mda_count;\n"
21117 " uint64_t vg_mda_free;\n"
21124 #: ../src/guestfs-structs.pod:69
21127 " struct guestfs_lvm_vg_list {\n"
21128 " uint32_t len; /* Number of elements in list. */\n"
21129 " struct guestfs_lvm_vg *val; /* Elements. */\n"
21136 #: ../src/guestfs-structs.pod:74
21139 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
21140 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
21146 #: ../src/guestfs-structs.pod:77
21147 msgid "guestfs_lvm_lv"
21152 #: ../src/guestfs-structs.pod:79
21155 " struct guestfs_lvm_lv {\n"
21156 " char *lv_name;\n"
21157 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
21158 " char lv_uuid[32];\n"
21159 " char *lv_attr;\n"
21160 " int64_t lv_major;\n"
21161 " int64_t lv_minor;\n"
21162 " int64_t lv_kernel_major;\n"
21163 " int64_t lv_kernel_minor;\n"
21164 " uint64_t lv_size;\n"
21165 " int64_t seg_count;\n"
21167 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
21168 " float snap_percent;\n"
21169 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
21170 " float copy_percent;\n"
21171 " char *move_pv;\n"
21172 " char *lv_tags;\n"
21173 " char *mirror_log;\n"
21174 " char *modules;\n"
21181 #: ../src/guestfs-structs.pod:101
21184 " struct guestfs_lvm_lv_list {\n"
21185 " uint32_t len; /* Number of elements in list. */\n"
21186 " struct guestfs_lvm_lv *val; /* Elements. */\n"
21193 #: ../src/guestfs-structs.pod:106
21196 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
21197 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
21203 #: ../src/guestfs-structs.pod:111
21206 " struct guestfs_stat {\n"
21210 " int64_t nlink;\n"
21215 " int64_t blksize;\n"
21216 " int64_t blocks;\n"
21217 " int64_t atime;\n"
21218 " int64_t mtime;\n"
21219 " int64_t ctime;\n"
21226 #: ../src/guestfs-structs.pod:127
21229 " struct guestfs_stat_list {\n"
21230 " uint32_t len; /* Number of elements in list. */\n"
21231 " struct guestfs_stat *val; /* Elements. */\n"
21238 #: ../src/guestfs-structs.pod:132
21241 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
21242 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
21248 #: ../src/guestfs-structs.pod:137
21251 " struct guestfs_statvfs {\n"
21252 " int64_t bsize;\n"
21253 " int64_t frsize;\n"
21254 " int64_t blocks;\n"
21255 " int64_t bfree;\n"
21256 " int64_t bavail;\n"
21257 " int64_t files;\n"
21258 " int64_t ffree;\n"
21259 " int64_t favail;\n"
21262 " int64_t namemax;\n"
21269 #: ../src/guestfs-structs.pod:151
21272 " struct guestfs_statvfs_list {\n"
21273 " uint32_t len; /* Number of elements in list. */\n"
21274 " struct guestfs_statvfs *val; /* Elements. */\n"
21281 #: ../src/guestfs-structs.pod:156
21284 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
21285 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
21291 #: ../src/guestfs-structs.pod:159
21292 msgid "guestfs_dirent"
21297 #: ../src/guestfs-structs.pod:161
21300 " struct guestfs_dirent {\n"
21310 #: ../src/guestfs-structs.pod:167
21313 " struct guestfs_dirent_list {\n"
21314 " uint32_t len; /* Number of elements in list. */\n"
21315 " struct guestfs_dirent *val; /* Elements. */\n"
21322 #: ../src/guestfs-structs.pod:172
21325 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
21326 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
21332 #: ../src/guestfs-structs.pod:177
21335 " struct guestfs_version {\n"
21336 " int64_t major;\n"
21337 " int64_t minor;\n"
21338 " int64_t release;\n"
21346 #: ../src/guestfs-structs.pod:184
21349 " struct guestfs_version_list {\n"
21350 " uint32_t len; /* Number of elements in list. */\n"
21351 " struct guestfs_version *val; /* Elements. */\n"
21358 #: ../src/guestfs-structs.pod:189
21361 " void guestfs_free_version (struct guestfs_free_version *);\n"
21362 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
21368 #: ../src/guestfs-structs.pod:192
21369 msgid "guestfs_xattr"
21374 #: ../src/guestfs-structs.pod:194
21377 " struct guestfs_xattr {\n"
21378 " char *attrname;\n"
21379 " /* The next two fields describe a byte array. */\n"
21380 " uint32_t attrval_len;\n"
21381 " char *attrval;\n"
21388 #: ../src/guestfs-structs.pod:201
21391 " struct guestfs_xattr_list {\n"
21392 " uint32_t len; /* Number of elements in list. */\n"
21393 " struct guestfs_xattr *val; /* Elements. */\n"
21400 #: ../src/guestfs-structs.pod:206
21403 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
21404 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
21410 #: ../src/guestfs-structs.pod:209
21411 msgid "guestfs_inotify_event"
21416 #: ../src/guestfs-structs.pod:211
21419 " struct guestfs_inotify_event {\n"
21420 " int64_t in_wd;\n"
21421 " uint32_t in_mask;\n"
21422 " uint32_t in_cookie;\n"
21423 " char *in_name;\n"
21430 #: ../src/guestfs-structs.pod:218
21433 " struct guestfs_inotify_event_list {\n"
21434 " uint32_t len; /* Number of elements in list. */\n"
21435 " struct guestfs_inotify_event *val; /* Elements. */\n"
21442 #: ../src/guestfs-structs.pod:223
21445 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
21446 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
21452 #: ../src/guestfs-structs.pod:226
21453 msgid "guestfs_partition"
21458 #: ../src/guestfs-structs.pod:228
21461 " struct guestfs_partition {\n"
21462 " int32_t part_num;\n"
21463 " uint64_t part_start;\n"
21464 " uint64_t part_end;\n"
21465 " uint64_t part_size;\n"
21472 #: ../src/guestfs-structs.pod:235
21475 " struct guestfs_partition_list {\n"
21476 " uint32_t len; /* Number of elements in list. */\n"
21477 " struct guestfs_partition *val; /* Elements. */\n"
21484 #: ../src/guestfs-structs.pod:240
21487 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
21488 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
21494 #: ../src/guestfs-structs.pod:243
21495 msgid "guestfs_application"
21500 #: ../src/guestfs-structs.pod:245
21503 " struct guestfs_application {\n"
21504 " char *app_name;\n"
21505 " char *app_display_name;\n"
21506 " int32_t app_epoch;\n"
21507 " char *app_version;\n"
21508 " char *app_release;\n"
21509 " char *app_install_path;\n"
21510 " char *app_trans_path;\n"
21511 " char *app_publisher;\n"
21512 " char *app_url;\n"
21513 " char *app_source_package;\n"
21514 " char *app_summary;\n"
21515 " char *app_description;\n"
21522 #: ../src/guestfs-structs.pod:260
21525 " struct guestfs_application_list {\n"
21526 " uint32_t len; /* Number of elements in list. */\n"
21527 " struct guestfs_application *val; /* Elements. */\n"
21534 #: ../src/guestfs-structs.pod:265
21537 " void guestfs_free_application (struct guestfs_free_application *);\n"
21538 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
21544 #: ../fish/guestfish.pod:5
21545 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
21550 #: ../fish/guestfish.pod:9
21553 " guestfish [--options] [commands]\n"
21559 #: ../fish/guestfish.pod:11
21568 #: ../fish/guestfish.pod:13
21571 " guestfish [--ro|--rw] -a disk.img\n"
21577 #: ../fish/guestfish.pod:15
21580 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
21586 #: ../fish/guestfish.pod:17
21589 " guestfish -d libvirt-domain\n"
21595 #: ../fish/guestfish.pod:19
21598 " guestfish [--ro|--rw] -a disk.img -i\n"
21604 #: ../fish/guestfish.pod:21
21607 " guestfish -d libvirt-domain -i\n"
21613 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:15
21614 #: ../tools/virt-win-reg.pl:51 ../tools/virt-tar.pl:64
21620 #: ../fish/guestfish.pod:25
21622 "Using guestfish in read/write mode on live virtual machines can be "
21623 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
21624 "option to use guestfish safely if the disk image or virtual machine might be "
21630 #: ../fish/guestfish.pod:32
21632 "Guestfish is a shell and command-line tool for examining and modifying "
21633 "virtual machine filesystems. It uses libguestfs and exposes all of the "
21634 "functionality of the guestfs API, see L<guestfs(3)>."
21639 #: ../fish/guestfish.pod:36
21641 "Guestfish gives you structured access to the libguestfs API, from shell "
21642 "scripts or the command line or interactively. If you want to rescue a "
21643 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
21649 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:949
21650 #: ../fuse/guestmount.pod:39 ../tools/virt-tar.pl:50
21656 #: ../fish/guestfish.pod:43
21657 msgid "As an interactive shell"
21662 #: ../fish/guestfish.pod:45
21671 #: ../fish/guestfish.pod:47
21674 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
21675 " editing virtual machine filesystems.\n"
21681 #: ../fish/guestfish.pod:50
21684 " Type: 'help' for a list of commands\n"
21685 " 'man' to read the manual\n"
21686 " 'quit' to quit the shell\n"
21692 #: ../fish/guestfish.pod:54
21695 " ><fs> add-ro disk.img\n"
21697 " ><fs> list-filesystems\n"
21698 " /dev/sda1: ext4\n"
21699 " /dev/vg_guest/lv_root: ext4\n"
21700 " /dev/vg_guest/lv_swap: swap\n"
21701 " ><fs> mount /dev/vg_guest/lv_root /\n"
21702 " ><fs> cat /etc/fstab\n"
21704 " # Created by anaconda\n"
21712 #: ../fish/guestfish.pod:67
21713 msgid "From shell scripts"
21718 #: ../fish/guestfish.pod:69
21719 msgid "Create a new C</etc/motd> file in a guest or disk image:"
21724 #: ../fish/guestfish.pod:71
21727 " guestfish <<_EOF_\n"
21730 " mount /dev/vg_guest/lv_root /\n"
21731 " write /etc/motd \"Welcome, new users\"\n"
21738 #: ../fish/guestfish.pod:78
21739 msgid "List the LVM logical volumes in a disk image:"
21744 #: ../fish/guestfish.pod:80
21747 " guestfish -a disk.img --ro <<_EOF_\n"
21756 #: ../fish/guestfish.pod:85
21757 msgid "List all the filesystems in a disk image:"
21762 #: ../fish/guestfish.pod:87
21765 " guestfish -a disk.img --ro <<_EOF_\n"
21767 " list-filesystems\n"
21774 #: ../fish/guestfish.pod:92
21775 msgid "On one command line"
21780 #: ../fish/guestfish.pod:94
21781 msgid "Update C</etc/resolv.conf> in a guest:"
21786 #: ../fish/guestfish.pod:96
21790 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
21791 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
21797 #: ../fish/guestfish.pod:100
21798 msgid "Edit C</boot/grub/grub.conf> interactively:"
21803 #: ../fish/guestfish.pod:102
21806 " guestfish --rw --add disk.img \\\n"
21807 " --mount /dev/vg_guest/lv_root \\\n"
21808 " --mount /dev/sda1:/boot \\\n"
21809 " edit /boot/grub/grub.conf\n"
21815 #: ../fish/guestfish.pod:107
21816 msgid "Mount disks automatically"
21821 #: ../fish/guestfish.pod:109
21823 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
21828 #: ../fish/guestfish.pod:112
21831 " guestfish --ro -a disk.img -i cat /etc/group\n"
21837 #: ../fish/guestfish.pod:114
21840 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
21846 #: ../fish/guestfish.pod:116
21847 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
21852 #: ../fish/guestfish.pod:118
21855 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
21861 #: ../fish/guestfish.pod:120
21862 msgid "As a script interpreter"
21867 #: ../fish/guestfish.pod:122
21868 msgid "Create a 100MB disk containing an ext2-formatted partition:"
21873 #: ../fish/guestfish.pod:124
21876 " #!/usr/bin/guestfish -f\n"
21877 " sparse test1.img 100M\n"
21879 " part-disk /dev/sda mbr\n"
21880 " mkfs ext2 /dev/sda1\n"
21886 #: ../fish/guestfish.pod:130
21887 msgid "Start with a prepared disk"
21892 #: ../fish/guestfish.pod:132
21894 "An alternate way to create a 100MB disk called C<test1.img> containing a "
21895 "single ext2-formatted partition:"
21900 #: ../fish/guestfish.pod:135
21903 " guestfish -N fs\n"
21909 #: ../fish/guestfish.pod:137
21910 msgid "To list what is available do:"
21915 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:940
21918 " guestfish -N help | less\n"
21924 #: ../fish/guestfish.pod:141
21925 msgid "Remote control"
21930 #: ../fish/guestfish.pod:143
21933 " eval \"`guestfish --listen`\"\n"
21934 " guestfish --remote add-ro disk.img\n"
21935 " guestfish --remote run\n"
21936 " guestfish --remote lvs\n"
21942 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37
21943 #: ../fuse/guestmount.pod:83 ../tools/virt-win-reg.pl:96
21944 #: ../tools/virt-list-filesystems.pl:53 ../tools/virt-tar.pl:103
21945 #: ../tools/virt-make-fs.pl:153 ../tools/virt-list-partitions.pl:54
21951 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:143
21952 #: ../tools/virt-win-reg.pl:104 ../tools/virt-list-filesystems.pl:61
21953 #: ../tools/virt-tar.pl:111 ../tools/virt-make-fs.pl:161
21954 #: ../tools/virt-list-partitions.pl:62
21960 #: ../fish/guestfish.pod:154
21961 msgid "Displays general help on options."
21966 #: ../fish/guestfish.pod:156
21972 #: ../fish/guestfish.pod:158
21973 msgid "B<--cmd-help>"
21978 #: ../fish/guestfish.pod:160
21979 msgid "Lists all available guestfish commands."
21984 #: ../fish/guestfish.pod:162
21990 #: ../fish/guestfish.pod:164
21991 msgid "B<--cmd-help cmd>"
21996 #: ../fish/guestfish.pod:166
21997 msgid "Displays detailed help on a single command C<cmd>."
22002 #: ../fish/guestfish.pod:168
22003 msgid "B<-a image>"
22008 #: ../fish/guestfish.pod:170
22009 msgid "B<--add image>"
22014 #: ../fish/guestfish.pod:172
22015 msgid "Add a block device or virtual machine image to the shell."
22020 #: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:91
22022 "The format of the disk image is auto-detected. To override this and force a "
22023 "particular format use the I<--format=..> option."
22027 #: ../fish/guestfish.pod:177
22029 "Using this flag is mostly equivalent to using the C<add> command, with "
22030 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
22031 "the I<--format=...> flag was given."
22036 #: ../fish/guestfish.pod:181
22042 #: ../fish/guestfish.pod:183
22043 msgid "B<--connect URI>"
22048 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:96
22050 "When used in conjunction with the I<-d> option, this specifies the libvirt "
22051 "URI to use. The default is to use the default libvirt connection."
22056 #: ../fish/guestfish.pod:189
22062 #: ../fish/guestfish.pod:191
22064 "If using the I<--listen> option and a csh-like shell, use this option. See "
22065 "section L</REMOTE CONTROL AND CSH> below."
22070 #: ../fish/guestfish.pod:194
22071 msgid "B<-d libvirt-domain>"
22076 #: ../fish/guestfish.pod:196
22077 msgid "B<--domain libvirt-domain>"
22082 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:102
22084 "Add disks from the named libvirt domain. If the I<--ro> option is also "
22085 "used, then any libvirt domain can be used. However in write mode, only "
22086 "libvirt domains which are shut down can be named here."
22090 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:106
22091 msgid "Domain UUIDs can be used instead of names."
22096 #: ../fish/guestfish.pod:204
22098 "Using this flag is mostly equivalent to using the C<add-domain> command, "
22099 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
22100 "if the I<--format:...> flag was given."
22105 #: ../fish/guestfish.pod:208
22111 #: ../fish/guestfish.pod:210
22112 msgid "B<--no-dest-paths>"
22117 #: ../fish/guestfish.pod:212
22119 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
22120 "to hit the tab key to complete paths on the guest filesystem, but this "
22121 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
22122 "allow this feature to be disabled."
22127 #: ../fish/guestfish.pod:217 ../fuse/guestmount.pod:120
22128 msgid "B<--echo-keys>"
22133 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:122
22135 "When prompting for keys and passphrases, guestfish normally turns echoing "
22136 "off so you cannot see what you are typing. If you are not worried about "
22137 "Tempest attacks and there is no one else in the room you can specify this "
22138 "flag to see what you are typing."
22143 #: ../fish/guestfish.pod:224
22149 #: ../fish/guestfish.pod:226
22150 msgid "B<--file file>"
22155 #: ../fish/guestfish.pod:228
22156 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
22161 #: ../fish/guestfish.pod:231
22164 " #!/usr/bin/guestfish -f\n"
22170 #: ../fish/guestfish.pod:233
22171 msgid "B<--format=raw|qcow2|..>"
22176 #: ../fish/guestfish.pod:235
22177 msgid "B<--format>"
22182 #: ../fish/guestfish.pod:237 ../fuse/guestmount.pod:129
22184 "The default for the I<-a> option is to auto-detect the format of the disk "
22185 "image. Using this forces the disk format for I<-a> options which follow on "
22186 "the command line. Using I<--format> with no argument switches back to auto-"
22187 "detection for subsequent I<-a> options."
22192 #: ../fish/guestfish.pod:244
22195 " guestfish --format=raw -a disk.img\n"
22201 #: ../fish/guestfish.pod:246
22202 msgid "forces raw format (no auto-detection) for C<disk.img>."
22207 #: ../fish/guestfish.pod:248
22210 " guestfish --format=raw -a disk.img --format -a another.img\n"
22216 #: ../fish/guestfish.pod:250
22218 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
22219 "detection for C<another.img>."
22224 #: ../fish/guestfish.pod:253
22226 "If you have untrusted raw-format guest disk images, you should use this "
22227 "option to specify the disk format. This avoids a possible security problem "
22228 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
22233 #: ../fish/guestfish.pod:258
22239 #: ../fish/guestfish.pod:260
22240 msgid "B<--inspector>"
22245 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:149
22247 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
22248 "system and mount filesystems as they would be mounted on the real virtual "
22254 #: ../fish/guestfish.pod:266
22255 msgid "Typical usage is either:"
22260 #: ../fish/guestfish.pod:268
22263 " guestfish -d myguest -i\n"
22269 #: ../fish/guestfish.pod:270
22270 msgid "(for an inactive libvirt domain called I<myguest>), or:"
22275 #: ../fish/guestfish.pod:272
22278 " guestfish --ro -d myguest -i\n"
22284 #: ../fish/guestfish.pod:274
22285 msgid "(for active domains, readonly), or specify the block device directly:"
22290 #: ../fish/guestfish.pod:276
22293 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
22299 #: ../fish/guestfish.pod:278
22301 "Note that the command line syntax changed slightly over older versions of "
22302 "guestfish. You can still use the old syntax:"
22307 #: ../fish/guestfish.pod:281
22310 " guestfish [--ro] -i disk.img\n"
22316 #: ../fish/guestfish.pod:283
22319 " guestfish [--ro] -i libvirt-domain\n"
22325 #: ../fish/guestfish.pod:285
22327 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
22328 "then using other commands to mount the filesystems that were found."
22333 #: ../fish/guestfish.pod:289 ../fuse/guestmount.pod:153
22334 msgid "B<--keys-from-stdin>"
22339 #: ../fish/guestfish.pod:291 ../fuse/guestmount.pod:155
22341 "Read key or passphrase parameters from stdin. The default is to try to read "
22342 "passphrases from the user by opening C</dev/tty>."
22347 #: ../fish/guestfish.pod:294
22348 msgid "B<--listen>"
22353 #: ../fish/guestfish.pod:296
22355 "Fork into the background and listen for remote commands. See section L</"
22356 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
22360 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:158
22365 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:160
22367 "Connect to a live virtual machine. (Experimental, see L<guestfs(3)/"
22368 "ATTACHING TO RUNNING DAEMONS>)."
22372 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:163
22373 msgid "B<-m dev[:mountpoint[:options]]>"
22377 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:165
22378 msgid "B<--mount dev[:mountpoint[:options]]>"
22383 #: ../fish/guestfish.pod:308
22384 msgid "Mount the named partition or logical volume on the given mountpoint."
22389 #: ../fish/guestfish.pod:310
22390 msgid "If the mountpoint is omitted, it defaults to C</>."
22395 #: ../fish/guestfish.pod:312
22396 msgid "You have to mount something on C</> before most commands will work."
22401 #: ../fish/guestfish.pod:314
22403 "If any I<-m> or I<--mount> options are given, the guest is automatically "
22409 #: ../fish/guestfish.pod:317
22411 "If you don't know what filesystems a disk image contains, you can either run "
22412 "guestfish without this option, then list the partitions, filesystems and LVs "
22413 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
22414 "commands), or you can use the L<virt-filesystems(1)> program."
22418 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:173
22420 "The third (and rarely used) part of the mount parameter is the list of mount "
22421 "options used to mount the underlying filesystem. If this is not given, then "
22422 "the mount options are either the empty string or C<ro> (the latter if the "
22423 "I<--ro> flag is used). By specifying the mount options, you override this "
22424 "default choice. Probably the only time you would use this is to enable ACLs "
22425 "and/or extended attributes if the filesystem can support them:"
22429 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:181
22432 " -m /dev/sda1:/:acl,user_xattr\n"
22437 #: ../fish/guestfish.pod:333
22438 msgid "Using this flag is equivalent to using the C<mount-options> command."
22443 #: ../fish/guestfish.pod:335
22449 #: ../fish/guestfish.pod:337
22450 msgid "B<--no-sync>"
22455 #: ../fish/guestfish.pod:339
22457 "Disable autosync. This is enabled by default. See the discussion of "
22458 "autosync in the L<guestfs(3)> manpage."
22463 #: ../fish/guestfish.pod:342
22469 #: ../fish/guestfish.pod:344
22470 msgid "B<--new type>"
22475 #: ../fish/guestfish.pod:346
22481 #: ../fish/guestfish.pod:348
22483 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
22484 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
22485 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
22491 #: ../fish/guestfish.pod:353
22492 msgid "B<--progress-bars>"
22497 #: ../fish/guestfish.pod:355
22498 msgid "Enable progress bars, even when guestfish is used non-interactively."
22503 #: ../fish/guestfish.pod:357
22505 "Progress bars are enabled by default when guestfish is used as an "
22506 "interactive shell."
22511 #: ../fish/guestfish.pod:360
22512 msgid "B<--no-progress-bars>"
22517 #: ../fish/guestfish.pod:362
22518 msgid "Disable progress bars."
22523 #: ../fish/guestfish.pod:364
22524 msgid "B<--remote[=pid]>"
22529 #: ../fish/guestfish.pod:366
22531 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
22532 "CONTROL GUESTFISH OVER A SOCKET> below."
22537 #: ../fish/guestfish.pod:369
22543 #: ../fish/guestfish.pod:371
22549 #: ../fish/guestfish.pod:373
22551 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
22552 "mounts are done read-only."
22557 #: ../fish/guestfish.pod:376
22559 "The option must always be used if the disk image or virtual machine might be "
22560 "running, and is generally recommended in cases where you don't need write "
22561 "access to the disk."
22566 #: ../fish/guestfish.pod:380
22568 "Note that prepared disk images created with I<-N> are not affected by this "
22569 "option. Also commands like C<add> are not affected - you have to specify "
22570 "the C<readonly:true> option explicitly if you need it."
22575 #: ../fish/guestfish.pod:384
22576 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
22581 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:237
22582 msgid "B<--selinux>"
22587 #: ../fish/guestfish.pod:388
22588 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
22593 #: ../fish/guestfish.pod:390
22599 #: ../fish/guestfish.pod:392
22600 msgid "B<--verbose>"
22605 #: ../fish/guestfish.pod:394
22607 "Enable very verbose messages. This is particularly useful if you find a bug."
22612 #: ../fish/guestfish.pod:397
22618 #: ../fish/guestfish.pod:399 ../tools/virt-win-reg.pl:112
22619 #: ../tools/virt-list-filesystems.pl:69 ../tools/virt-tar.pl:119
22620 #: ../tools/virt-make-fs.pl:169 ../tools/virt-list-partitions.pl:70
22621 msgid "B<--version>"
22626 #: ../fish/guestfish.pod:401
22627 msgid "Display the guestfish / libguestfs version number and exit."
22632 #: ../fish/guestfish.pod:403
22638 #: ../fish/guestfish.pod:405
22643 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:251
22645 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
22646 "mounts are done read-write."
22650 #: ../fish/guestfish.pod:410
22651 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
22656 #: ../fish/guestfish.pod:412
22662 #: ../fish/guestfish.pod:414
22663 msgid "Echo each command before executing it."
22668 #: ../fish/guestfish.pod:418
22669 msgid "COMMANDS ON COMMAND LINE"
22674 #: ../fish/guestfish.pod:420
22676 "Any additional (non-option) arguments are treated as commands to execute."
22681 #: ../fish/guestfish.pod:423
22683 "Commands to execute should be separated by a colon (C<:>), where the colon "
22684 "is a separate parameter. Thus:"
22689 #: ../fish/guestfish.pod:426
22692 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
22698 #: ../fish/guestfish.pod:428
22700 "If there are no additional arguments, then we enter a shell, either an "
22701 "interactive shell with a prompt (if the input is a terminal) or a non-"
22702 "interactive shell."
22707 #: ../fish/guestfish.pod:432
22709 "In either command line mode or non-interactive shell, the first command that "
22710 "gives an error causes the whole shell to exit. In interactive mode (with a "
22711 "prompt) if a command fails, you can continue to enter commands."
22716 #: ../fish/guestfish.pod:437
22717 msgid "USING launch (OR run)"
22722 #: ../fish/guestfish.pod:439
22724 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
22725 "then launch it, then mount any disks you need, and finally issue actions/"
22726 "commands. So the general order of the day is:"
22731 #: ../fish/guestfish.pod:447
22732 msgid "add or -a/--add"
22737 #: ../fish/guestfish.pod:451
22738 msgid "launch (aka run)"
22743 #: ../fish/guestfish.pod:455
22744 msgid "mount or -m/--mount"
22749 #: ../fish/guestfish.pod:459
22750 msgid "any other commands"
22755 #: ../fish/guestfish.pod:463
22757 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
22758 "guest before mounting or performing any other commands."
22763 #: ../fish/guestfish.pod:466
22765 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
22766 "I<--new> options were given then C<run> is done automatically, simply "
22767 "because guestfish can't perform the action you asked for without doing this."
22772 #: ../fish/guestfish.pod:471
22773 msgid "OPENING DISKS FOR READ AND WRITE"
22777 #: ../fish/guestfish.pod:473
22779 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
22780 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
22781 "I<-i> and I<-m> open disk images read-only or for writing."
22785 #: ../fish/guestfish.pod:478
22787 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
22788 "opening disk images supplied on the command line for write. To open a disk "
22789 "image read-only you have to do I<-a image --ro>."
22794 #: ../fish/guestfish.pod:482
22796 "This matters: If you accidentally open a live VM disk image writable then "
22797 "you will cause irreversible disk corruption."
22801 #: ../fish/guestfish.pod:485
22803 "By libguestfs 1.12 we intend to change the default the other way. Disk "
22804 "images will be opened read-only. You will have to either specify "
22805 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
22806 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
22807 "access for disk images specified by those other command line options."
22811 #: ../fish/guestfish.pod:492
22813 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
22814 "which does nothing (it is already the default). However it is highly "
22815 "recommended that you use this option to indicate that you need write access, "
22816 "and prepare your scripts for the day when this option will be required for "
22822 #: ../fish/guestfish.pod:498
22824 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
22825 "other libguestfs program apart from guestfish and guestmount."
22830 #: ../fish/guestfish.pod:501
22836 #: ../fish/guestfish.pod:503
22838 "You can quote ordinary parameters using either single or double quotes. For "
22844 #: ../fish/guestfish.pod:506
22847 " add \"file with a space.img\"\n"
22853 #: ../fish/guestfish.pod:508
22856 " rm '/file name'\n"
22862 #: ../fish/guestfish.pod:510
22871 #: ../fish/guestfish.pod:512
22873 "A few commands require a list of strings to be passed. For these, use a "
22874 "whitespace-separated list, enclosed in quotes. Strings containing "
22875 "whitespace to be passed through must be enclosed in single quotes. A "
22876 "literal single quote must be escaped with a backslash."
22881 #: ../fish/guestfish.pod:517
22884 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
22885 " command \"/bin/echo 'foo bar'\"\n"
22886 " command \"/bin/echo \\'foo\\'\"\n"
22892 #: ../fish/guestfish.pod:521
22893 msgid "OPTIONAL ARGUMENTS"
22898 #: ../fish/guestfish.pod:523
22900 "Some commands take optional arguments. These arguments appear in this "
22901 "documentation as C<[argname:..]>. You can use them as in these examples:"
22906 #: ../fish/guestfish.pod:527
22909 " add-drive-opts filename\n"
22915 #: ../fish/guestfish.pod:529
22918 " add-drive-opts filename readonly:true\n"
22924 #: ../fish/guestfish.pod:531
22927 " add-drive-opts filename format:qcow2 readonly:false\n"
22933 #: ../fish/guestfish.pod:533
22935 "Each optional argument can appear at most once. All optional arguments must "
22936 "appear after the required ones."
22941 #: ../fish/guestfish.pod:536
22947 #: ../fish/guestfish.pod:538
22949 "This section applies to all commands which can take integers as parameters."
22954 #: ../fish/guestfish.pod:541
22955 msgid "SIZE SUFFIX"
22960 #: ../fish/guestfish.pod:543
22962 "When the command takes a parameter measured in bytes, you can use one of the "
22963 "following suffixes to specify kilobytes, megabytes and larger sizes:"
22968 #: ../fish/guestfish.pod:549
22969 msgid "B<k> or B<K> or B<KiB>"
22974 #: ../fish/guestfish.pod:551
22975 msgid "The size in kilobytes (multiplied by 1024)."
22980 #: ../fish/guestfish.pod:553
22986 #: ../fish/guestfish.pod:555
22987 msgid "The size in SI 1000 byte units."
22992 #: ../fish/guestfish.pod:557
22993 msgid "B<M> or B<MiB>"
22998 #: ../fish/guestfish.pod:559
22999 msgid "The size in megabytes (multiplied by 1048576)."
23004 #: ../fish/guestfish.pod:561
23010 #: ../fish/guestfish.pod:563
23011 msgid "The size in SI 1000000 byte units."
23016 #: ../fish/guestfish.pod:565
23017 msgid "B<G> or B<GiB>"
23022 #: ../fish/guestfish.pod:567
23023 msgid "The size in gigabytes (multiplied by 2**30)."
23028 #: ../fish/guestfish.pod:569
23034 #: ../fish/guestfish.pod:571
23035 msgid "The size in SI 10**9 byte units."
23040 #: ../fish/guestfish.pod:573
23041 msgid "B<T> or B<TiB>"
23046 #: ../fish/guestfish.pod:575
23047 msgid "The size in terabytes (multiplied by 2**40)."
23052 #: ../fish/guestfish.pod:577
23058 #: ../fish/guestfish.pod:579
23059 msgid "The size in SI 10**12 byte units."
23064 #: ../fish/guestfish.pod:581
23065 msgid "B<P> or B<PiB>"
23070 #: ../fish/guestfish.pod:583
23071 msgid "The size in petabytes (multiplied by 2**50)."
23076 #: ../fish/guestfish.pod:585
23082 #: ../fish/guestfish.pod:587
23083 msgid "The size in SI 10**15 byte units."
23088 #: ../fish/guestfish.pod:589
23089 msgid "B<E> or B<EiB>"
23094 #: ../fish/guestfish.pod:591
23095 msgid "The size in exabytes (multiplied by 2**60)."
23100 #: ../fish/guestfish.pod:593
23106 #: ../fish/guestfish.pod:595
23107 msgid "The size in SI 10**18 byte units."
23112 #: ../fish/guestfish.pod:597
23113 msgid "B<Z> or B<ZiB>"
23118 #: ../fish/guestfish.pod:599
23119 msgid "The size in zettabytes (multiplied by 2**70)."
23124 #: ../fish/guestfish.pod:601
23130 #: ../fish/guestfish.pod:603
23131 msgid "The size in SI 10**21 byte units."
23136 #: ../fish/guestfish.pod:605
23137 msgid "B<Y> or B<YiB>"
23142 #: ../fish/guestfish.pod:607
23143 msgid "The size in yottabytes (multiplied by 2**80)."
23148 #: ../fish/guestfish.pod:609
23154 #: ../fish/guestfish.pod:611
23155 msgid "The size in SI 10**24 byte units."
23160 #: ../fish/guestfish.pod:617
23163 " truncate-size /file 1G\n"
23169 #: ../fish/guestfish.pod:619
23170 msgid "would truncate the file to 1 gigabyte."
23175 #: ../fish/guestfish.pod:621
23177 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
23178 "the parameter to L</memsize> is specified in megabytes already). Adding a "
23179 "suffix will probably not do what you expect."
23184 #: ../fish/guestfish.pod:625
23185 msgid "OCTAL AND HEXADECIMAL NUMBERS"
23190 #: ../fish/guestfish.pod:627
23192 "For specifying the radix (base) use the C convention: C<0> to prefix an "
23193 "octal number or C<0x> to prefix a hexadecimal number. For example:"
23198 #: ../fish/guestfish.pod:630
23201 " 1234 decimal number 1234\n"
23202 " 02322 octal number, equivalent to decimal 1234\n"
23203 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
23209 #: ../fish/guestfish.pod:634
23211 "When using the C<chmod> command, you almost always want to specify an octal "
23212 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
23213 "L<chmod(1)> program):"
23218 #: ../fish/guestfish.pod:638
23221 " chmod 0777 /public # OK\n"
23222 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
23228 #: ../fish/guestfish.pod:641
23230 "Commands that return numbers usually print them in decimal, but some "
23231 "commands print numbers in other radices (eg. C<umask> prints the mode in "
23232 "octal, preceeded by C<0>)."
23237 #: ../fish/guestfish.pod:645
23238 msgid "WILDCARDS AND GLOBBING"
23243 #: ../fish/guestfish.pod:647
23245 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
23246 "(globbing) by default. So for example the following will not do what you "
23252 #: ../fish/guestfish.pod:651
23261 #: ../fish/guestfish.pod:653
23263 "Assuming you don't have a directory called literally C</home/*> then the "
23264 "above command will return an error."
23269 #: ../fish/guestfish.pod:656
23270 msgid "To perform wildcard expansion, use the C<glob> command."
23275 #: ../fish/guestfish.pod:658
23278 " glob rm-rf /home/*\n"
23284 #: ../fish/guestfish.pod:660
23286 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
23287 "many times), equivalent to:"
23292 #: ../fish/guestfish.pod:663
23295 " rm-rf /home/jim\n"
23296 " rm-rf /home/joe\n"
23297 " rm-rf /home/mary\n"
23303 #: ../fish/guestfish.pod:667
23304 msgid "C<glob> only works on simple guest paths and not on device names."
23309 #: ../fish/guestfish.pod:669
23311 "If you have several parameters, each containing a wildcard, then glob will "
23312 "perform a Cartesian product."
23317 #: ../fish/guestfish.pod:672
23323 #: ../fish/guestfish.pod:674
23325 "Any line which starts with a I<#> character is treated as a comment and "
23326 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
23327 "a command. For example:"
23332 #: ../fish/guestfish.pod:678
23335 " # this is a comment\n"
23336 " # this is a comment\n"
23337 " foo # NOT a comment\n"
23343 #: ../fish/guestfish.pod:682
23344 msgid "Blank lines are also ignored."
23349 #: ../fish/guestfish.pod:684
23350 msgid "RUNNING COMMANDS LOCALLY"
23355 #: ../fish/guestfish.pod:686
23357 "Any line which starts with a I<!> character is treated as a command sent to "
23358 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
23363 #: ../fish/guestfish.pod:690
23367 " tgz-out /remote local/remote-data.tar.gz\n"
23373 #: ../fish/guestfish.pod:693
23375 "will create a directory C<local> on the host, and then export the contents "
23376 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
23377 "(See C<tgz-out>)."
23382 #: ../fish/guestfish.pod:697
23384 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
23385 "effect, due to the way that subprocesses work in Unix."
23389 #: ../fish/guestfish.pod:700
23390 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
23394 #: ../fish/guestfish.pod:702
23396 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
23397 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
23398 "and executed as guestfish commands."
23402 #: ../fish/guestfish.pod:706
23404 "Thus you can use shell script to construct arbitrary guestfish commands "
23405 "which are then parsed by guestfish."
23409 #: ../fish/guestfish.pod:709
23411 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
23412 "through C</foo.100>) using guestfish commands alone. However this is simple "
23413 "if we use a shell script to create the guestfish commands for us:"
23417 #: ../fish/guestfish.pod:714
23420 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
23425 #: ../fish/guestfish.pod:716
23426 msgid "or with names like C</foo.001>:"
23430 #: ../fish/guestfish.pod:718
23433 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
23438 #: ../fish/guestfish.pod:720
23440 "When using guestfish interactively it can be helpful to just run the shell "
23441 "script first (ie. remove the initial C<E<lt>> character so it is just an "
23442 "ordinary I<!> local command), see what guestfish commands it would run, and "
23443 "when you are happy with those prepend the C<E<lt>> character to run the "
23444 "guestfish commands for real."
23449 #: ../fish/guestfish.pod:726
23455 #: ../fish/guestfish.pod:728
23457 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
23458 "command (a guestfish command) to the second command (any host command). For "
23464 #: ../fish/guestfish.pod:732
23467 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
23473 #: ../fish/guestfish.pod:734
23475 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
23476 "program). The above command would list all accounts in the guest filesystem "
23477 "which have UID 0, ie. root accounts including backdoors. Other examples:"
23482 #: ../fish/guestfish.pod:739
23485 " hexdump /bin/ls | head\n"
23486 " list-devices | tail -1\n"
23487 " tgz-out / - | tar ztf -\n"
23493 #: ../fish/guestfish.pod:743
23495 "The space before the pipe symbol is required, any space after the pipe "
23496 "symbol is optional. Everything after the pipe symbol is just passed "
23497 "straight to the host shell, so it can contain redirections, globs and "
23498 "anything else that makes sense on the host side."
23503 #: ../fish/guestfish.pod:748
23505 "To use a literal argument which begins with a pipe symbol, you have to quote "
23511 #: ../fish/guestfish.pod:751
23520 #: ../fish/guestfish.pod:753
23521 msgid "HOME DIRECTORIES"
23526 #: ../fish/guestfish.pod:755
23528 "If a parameter starts with the character C<~> then the tilde may be expanded "
23529 "as a home directory path (either C<~> for the current user's home directory, "
23530 "or C<~user> for another user)."
23535 #: ../fish/guestfish.pod:759
23537 "Note that home directory expansion happens for users known I<on the host>, "
23538 "not in the guest filesystem."
23543 #: ../fish/guestfish.pod:762
23545 "To use a literal argument which begins with a tilde, you have to quote it, "
23551 #: ../fish/guestfish.pod:765
23560 #: ../fish/guestfish.pod:769
23562 "Libguestfs has some support for Linux guests encrypted according to the "
23563 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
23564 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
23565 "LUKS is supported."
23570 #: ../fish/guestfish.pod:774
23571 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
23576 #: ../fish/guestfish.pod:776
23579 " ><fs> vfs-type /dev/sda2\n"
23586 #: ../fish/guestfish.pod:779
23588 "Then open those devices using L</luks-open>. This creates a device-mapper "
23589 "device called C</dev/mapper/luksdev>."
23594 #: ../fish/guestfish.pod:782
23597 " ><fs> luks-open /dev/sda2 luksdev\n"
23598 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
23604 #: ../fish/guestfish.pod:785
23606 "Finally you have to tell LVM to scan for volume groups on the newly created "
23612 #: ../fish/guestfish.pod:788
23616 " vg-activate-all true\n"
23622 #: ../fish/guestfish.pod:791
23623 msgid "The logical volume(s) can now be mounted in the usual way."
23628 #: ../fish/guestfish.pod:793
23630 "Before closing a LUKS device you must unmount any logical volumes on it and "
23631 "deactivate the volume groups by calling C<vg-activate false VG> on each "
23632 "one. Then you can close the mapper device:"
23637 #: ../fish/guestfish.pod:797
23640 " vg-activate false /dev/VG\n"
23641 " luks-close /dev/mapper/luksdev\n"
23647 #: ../fish/guestfish.pod:800
23648 msgid "WINDOWS PATHS"
23652 #: ../fish/guestfish.pod:802
23654 "If a path is prefixed with C<win:> then you can use Windows-style drive "
23655 "letters and paths (with some limitations). The following commands are "
23661 #: ../fish/guestfish.pod:806
23664 " file /WINDOWS/system32/config/system.LOG\n"
23670 #: ../fish/guestfish.pod:808
23673 " file win:\\windows\\system32\\config\\system.log\n"
23678 #: ../fish/guestfish.pod:810
23681 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
23686 #: ../fish/guestfish.pod:812
23688 "The parameter is rewritten \"behind the scenes\" by looking up the position "
23689 "where the drive is mounted, prepending that to the path, changing all "
23690 "backslash characters to forward slash, then resolving the result using L</"
23691 "case-sensitive-path>. For example if the E: drive was mounted on C</e> then "
23692 "the parameter might be rewritten like this:"
23696 #: ../fish/guestfish.pod:818
23699 " win:e:\\foo\\bar => /e/FOO/bar\n"
23704 #: ../fish/guestfish.pod:820
23705 msgid "This only works in argument positions that expect a path."
23710 #: ../fish/guestfish.pod:822
23711 msgid "UPLOADING AND DOWNLOADING FILES"
23716 #: ../fish/guestfish.pod:824
23718 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
23719 "others which upload from or download to a local file, you can use the "
23720 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
23725 #: ../fish/guestfish.pod:828
23734 #: ../fish/guestfish.pod:830
23736 "reads stdin and creates from that a file C</foo> in the disk image, and:"
23741 #: ../fish/guestfish.pod:833
23744 " tar-out /etc - | tar tf -\n"
23750 #: ../fish/guestfish.pod:835
23752 "writes the tarball to stdout and then pipes that into the external \"tar\" "
23753 "command (see L</PIPES>)."
23758 #: ../fish/guestfish.pod:838
23760 "When using C<-> to read from stdin, the input is read up to the end of "
23761 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
23762 "some arbitrary end marker:"
23767 #: ../fish/guestfish.pod:842
23770 " upload -<<END /foo\n"
23780 #: ../fish/guestfish.pod:848
23782 "Any string of characters can be used instead of C<END>. The end marker must "
23783 "appear on a line of its own, without any preceeding or following characters "
23784 "(not even spaces)."
23789 #: ../fish/guestfish.pod:852
23791 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
23792 "upload local files (so-called \"FileIn\" parameters in the generator)."
23797 #: ../fish/guestfish.pod:855
23798 msgid "EXIT ON ERROR BEHAVIOUR"
23803 #: ../fish/guestfish.pod:857
23805 "By default, guestfish will ignore any errors when in interactive mode (ie. "
23806 "taking commands from a human over a tty), and will exit on the first error "
23807 "in non-interactive mode (scripts, commands given on the command line)."
23812 #: ../fish/guestfish.pod:862
23814 "If you prefix a command with a I<-> character, then that command will not "
23815 "cause guestfish to exit, even if that (one) command returns an error."
23820 #: ../fish/guestfish.pod:866
23821 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
23826 #: ../fish/guestfish.pod:868
23828 "Guestfish can be remote-controlled over a socket. This is useful "
23829 "particularly in shell scripts where you want to make several different "
23830 "changes to a filesystem, but you don't want the overhead of starting up a "
23831 "guestfish process each time."
23836 #: ../fish/guestfish.pod:873
23837 msgid "Start a guestfish server process using:"
23842 #: ../fish/guestfish.pod:875
23845 " eval \"`guestfish --listen`\"\n"
23851 #: ../fish/guestfish.pod:877
23852 msgid "and then send it commands by doing:"
23857 #: ../fish/guestfish.pod:879
23860 " guestfish --remote cmd [...]\n"
23866 #: ../fish/guestfish.pod:881
23867 msgid "To cause the server to exit, send it the exit command:"
23872 #: ../fish/guestfish.pod:883
23875 " guestfish --remote exit\n"
23881 #: ../fish/guestfish.pod:885
23883 "Note that the server will normally exit if there is an error in a command. "
23884 "You can change this in the usual way. See section L</EXIT ON ERROR "
23890 #: ../fish/guestfish.pod:889
23891 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
23896 #: ../fish/guestfish.pod:891
23898 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
23899 "is how the I<--remote> option knows where to send the commands. You can "
23900 "have several guestfish listener processes running using:"
23905 #: ../fish/guestfish.pod:895
23908 " eval \"`guestfish --listen`\"\n"
23909 " pid1=$GUESTFISH_PID\n"
23910 " eval \"`guestfish --listen`\"\n"
23911 " pid2=$GUESTFISH_PID\n"
23913 " guestfish --remote=$pid1 cmd\n"
23914 " guestfish --remote=$pid2 cmd\n"
23920 #: ../fish/guestfish.pod:903
23921 msgid "REMOTE CONTROL AND CSH"
23926 #: ../fish/guestfish.pod:905
23928 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
23934 #: ../fish/guestfish.pod:908
23937 " eval \"`guestfish --listen --csh`\"\n"
23943 #: ../fish/guestfish.pod:910
23944 msgid "REMOTE CONTROL DETAILS"
23949 #: ../fish/guestfish.pod:912
23951 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
23952 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
23953 "and C<$PID> is the process ID of the server."
23958 #: ../fish/guestfish.pod:916
23959 msgid "Guestfish client and server versions must match exactly."
23964 #: ../fish/guestfish.pod:918
23965 msgid "PREPARED DISK IMAGES"
23970 #: ../fish/guestfish.pod:920
23972 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
23973 "preformatted disk images that guestfish can make for you to save typing. "
23974 "This is particularly useful for testing purposes. This option is used "
23975 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
23976 "can be mixed with I<-a>)."
23981 #: ../fish/guestfish.pod:926
23983 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
23984 "the second and so on. Existing files in the current directory are "
23990 #: ../fish/guestfish.pod:930
23992 "The type briefly describes how the disk should be sized, partitioned, how "
23993 "filesystem(s) should be created, and how content should be added. "
23994 "Optionally the type can be followed by extra parameters, separated by C<:> "
23995 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
23996 "allocated disk, containing a single partition, with the partition formatted "
23997 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
24003 #: ../fish/guestfish.pod:938
24004 msgid "To list the available types and any extra parameters they take, run:"
24009 #: ../fish/guestfish.pod:942
24011 "Note that the prepared filesystem is not mounted. You would usually have to "
24012 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
24017 #: ../fish/guestfish.pod:946
24019 "If any I<-N> or I<--new> options are given, the guest is automatically "
24025 #: ../fish/guestfish.pod:951
24026 msgid "Create a 100MB disk with an ext4-formatted partition:"
24031 #: ../fish/guestfish.pod:953
24034 " guestfish -N fs:ext4\n"
24040 #: ../fish/guestfish.pod:955
24041 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
24046 #: ../fish/guestfish.pod:957
24049 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
24055 #: ../fish/guestfish.pod:959
24056 msgid "Create a blank 200MB disk:"
24061 #: ../fish/guestfish.pod:961
24064 " guestfish -N disk:200M\n"
24070 #: ../fish/guestfish.pod:963
24071 msgid "PROGRESS BARS"
24076 #: ../fish/guestfish.pod:965
24078 "Some (not all) long-running commands send progress notification messages as "
24079 "they are running. Guestfish turns these messages into progress bars."
24084 #: ../fish/guestfish.pod:969
24086 "When a command that supports progress bars takes longer than two seconds to "
24087 "run, and if progress bars are enabled, then you will see one appearing below "
24093 #: ../fish/guestfish.pod:973
24096 " ><fs> copy-size /large-file /another-file 2048M\n"
24097 " / 10% [#####-----------------------------------------] 00:30\n"
24103 #: ../fish/guestfish.pod:976
24105 "The spinner on the left hand side moves round once for every progress "
24106 "notification received from the backend. This is a (reasonably) golden "
24107 "assurance that the command is \"doing something\" even if the progress bar "
24108 "is not moving, because the command is able to send the progress "
24109 "notifications. When the bar reaches 100% and the command finishes, the "
24110 "spinner disappears."
24115 #: ../fish/guestfish.pod:983
24117 "Progress bars are enabled by default when guestfish is used interactively. "
24118 "You can enable them even for non-interactive modes using I<--progress-bars>, "
24119 "and you can disable them completely using I<--no-progress-bars>."
24124 #: ../fish/guestfish.pod:988
24125 msgid "GUESTFISH COMMANDS"
24130 #: ../fish/guestfish.pod:990
24132 "The commands in this section are guestfish convenience commands, in other "
24133 "words, they are not part of the L<guestfs(3)> API."
24138 #: ../fish/guestfish.pod:993
24144 #: ../fish/guestfish.pod:995
24154 #: ../fish/guestfish.pod:998
24155 msgid "Without any parameter, this provides general help."
24160 #: ../fish/guestfish.pod:1000
24161 msgid "With a C<cmd> parameter, this displays detailed help for that command."
24166 #: ../fish/guestfish.pod:1002
24167 msgid "quit | exit"
24172 #: ../fish/guestfish.pod:1004
24173 msgid "This exits guestfish. You can also use C<^D> key."
24178 #: ../fish/guestfish.pod:1006
24179 msgid "@FISH_COMMANDS@"
24184 #: ../fish/guestfish.pod:1008
24190 #: ../fish/guestfish.pod:1012 ../test-tool/libguestfs-test-tool.pod:77
24196 #: ../fish/guestfish.pod:1014
24198 "guestfish returns 0 if the commands completed without error, or 1 if there "
24204 #: ../fish/guestfish.pod:1021
24210 #: ../fish/guestfish.pod:1023
24212 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
24218 #: ../fish/guestfish.pod:1026
24219 msgid "GUESTFISH_PID"
24224 #: ../fish/guestfish.pod:1028
24226 "Used with the I<--remote> option to specify the remote guestfish process to "
24227 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
24232 #: ../fish/guestfish.pod:1032
24238 #: ../fish/guestfish.pod:1034
24240 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
24241 "not specified, the external L<hexedit(1)> program is used."
24246 #: ../fish/guestfish.pod:1038
24252 #: ../fish/guestfish.pod:1040
24254 "If compiled with GNU readline support, various files in the home directory "
24255 "can be used. See L</FILES>."
24260 #: ../fish/guestfish.pod:1049
24262 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
24263 "effect as using the B<-v> option."
24268 #: ../fish/guestfish.pod:1061
24270 "Set the path that guestfish uses to search for kernel and initrd.img. See "
24271 "the discussion of paths in L<guestfs(3)>."
24276 #: ../fish/guestfish.pod:1072
24277 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
24282 #: ../fish/guestfish.pod:1074
24288 #: ../fish/guestfish.pod:1076
24290 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
24296 #: ../fish/guestfish.pod:1092 ../fuse/guestmount.pod:264
24301 #: ../fish/guestfish.pod:1096 ../fuse/guestmount.pod:268
24302 msgid "$HOME/.libguestfs-tools.rc"
24306 #: ../fish/guestfish.pod:1098 ../fuse/guestmount.pod:270
24307 msgid "/etc/libguestfs-tools.conf"
24311 #: ../fish/guestfish.pod:1100 ../fuse/guestmount.pod:272
24313 "This configuration file controls the default read-only or read-write mode "
24314 "(I<--ro> or I<--rw>)."
24318 #: ../fish/guestfish.pod:1103
24319 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
24324 #: ../fish/guestfish.pod:1105
24325 msgid "$HOME/.guestfish"
24330 #: ../fish/guestfish.pod:1107
24332 "If compiled with GNU readline support, then the command history is saved in "
24338 #: ../fish/guestfish.pod:1110
24339 msgid "$HOME/.inputrc"
24344 #: ../fish/guestfish.pod:1112
24345 msgid "/etc/inputrc"
24350 #: ../fish/guestfish.pod:1114
24352 "If compiled with GNU readline support, then these files can be used to "
24353 "configure readline. For further information, please see L<readline(3)/"
24354 "INITIALIZATION FILE>."
24359 #: ../fish/guestfish.pod:1118
24360 msgid "To write rules which only apply to guestfish, use:"
24365 #: ../fish/guestfish.pod:1120
24376 #: ../fish/guestfish.pod:1124
24378 "Variables that you can set in inputrc that change the behaviour of guestfish "
24379 "in useful ways include:"
24384 #: ../fish/guestfish.pod:1129
24385 msgid "completion-ignore-case (default: on)"
24390 #: ../fish/guestfish.pod:1131
24392 "By default, guestfish will ignore case when tab-completing paths on the "
24398 #: ../fish/guestfish.pod:1134
24401 " set completion-ignore-case off\n"
24407 #: ../fish/guestfish.pod:1136
24408 msgid "to make guestfish case sensitive."
24413 #: ../fish/guestfish.pod:1140
24419 #: ../fish/guestfish.pod:1142
24420 msgid "test2.img (etc)"
24424 #: ../fish/guestfish.pod:1144
24426 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
24427 "will be created in the file C<test1.img> in the current directory. The "
24428 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
24429 "the same name will be overwritten."
24433 #: ../fish/guestfish.pod:1153
24435 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-copy-in(1)"
24436 ">, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)"
24437 ">, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions"
24438 "(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)"
24439 ">, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)"
24440 ">, L<hexedit(1)>."
24445 #: ../fish/guestfish.pod:1183 ../test-tool/libguestfs-test-tool.pod:102
24446 #: ../fuse/guestmount.pod:299 ../tools/virt-win-reg.pl:778
24447 #: ../tools/virt-list-filesystems.pl:210 ../tools/virt-tar.pl:309
24448 #: ../tools/virt-make-fs.pl:572 ../tools/virt-list-partitions.pl:277
24450 "This program is free software; you can redistribute it and/or modify it "
24451 "under the terms of the GNU General Public License as published by the Free "
24452 "Software Foundation; either version 2 of the License, or (at your option) "
24453 "any later version."
24458 #: ../fish/guestfish.pod:1188 ../test-tool/libguestfs-test-tool.pod:107
24459 #: ../fuse/guestmount.pod:304 ../tools/virt-win-reg.pl:783
24460 #: ../tools/virt-list-filesystems.pl:215 ../tools/virt-tar.pl:314
24461 #: ../tools/virt-make-fs.pl:577 ../tools/virt-list-partitions.pl:282
24463 "This program is distributed in the hope that it will be useful, but WITHOUT "
24464 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
24465 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
24471 #: ../fish/guestfish.pod:1193 ../test-tool/libguestfs-test-tool.pod:112
24472 #: ../fuse/guestmount.pod:309 ../tools/virt-win-reg.pl:788
24473 #: ../tools/virt-list-filesystems.pl:220 ../tools/virt-tar.pl:319
24474 #: ../tools/virt-make-fs.pl:582 ../tools/virt-list-partitions.pl:287
24476 "You should have received a copy of the GNU General Public License along with "
24477 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
24478 "Ave, Cambridge, MA 02139, USA."
24483 #: ../fish/guestfish-actions.pod:1
24489 #: ../fish/guestfish-actions.pod:3
24492 " add-cdrom filename\n"
24498 #: ../fish/guestfish-actions.pod:15
24500 "This call checks for the existence of C<filename>. This stops you from "
24501 "specifying other types of drive which are supported by qemu such as C<nbd:> "
24502 "and C<http:> URLs. To specify those, use the general L</config> call "
24508 #: ../fish/guestfish-actions.pod:22
24510 "If you just want to add an ISO file (often you use this as an efficient way "
24511 "to transfer large files into the guest), then you should probably use L</add-"
24512 "drive-ro> instead."
24517 #: ../fish/guestfish-actions.pod:35
24523 #: ../fish/guestfish-actions.pod:37
24528 #: ../fish/guestfish-actions.pod:39
24531 " add-domain dom [libvirturi:..] [readonly:..] [iface:..] [live:..] [allowuuid:..]\n"
24537 #: ../fish/guestfish-actions.pod:41
24539 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
24540 "It works by connecting to libvirt, requesting the domain and domain XML from "
24541 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
24546 #: ../fish/guestfish-actions.pod:76
24548 "The other optional parameters are passed directly through to L</add-drive-"
24554 #: ../fish/guestfish-actions.pod:79 ../fish/guestfish-actions.pod:143
24555 #: ../fish/guestfish-actions.pod:3064
24557 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
24562 #: ../fish/guestfish-actions.pod:81
24568 #: ../fish/guestfish-actions.pod:83
24571 " add-drive filename\n"
24577 #: ../fish/guestfish-actions.pod:85
24579 "This function is the equivalent of calling L</add-drive-opts> with no "
24580 "optional parameters, so the disk is added writable, with the format being "
24581 "detected automatically."
24586 #: ../fish/guestfish-actions.pod:89
24588 "Automatic detection of the format opens you up to a potential security hole "
24589 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
24590 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
24591 "you should think about replacing calls to this function with calls to L</add-"
24592 "drive-opts>, and specifying the format."
24597 #: ../fish/guestfish-actions.pod:96
24598 msgid "add-drive-opts"
24603 #: ../fish/guestfish-actions.pod:98
24609 #: ../fish/guestfish-actions.pod:100
24612 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
24618 #: ../fish/guestfish-actions.pod:127
24620 "This forces the image format. If you omit this (or use L</add-drive> or L</"
24621 "add-drive-ro>) then the format is automatically detected. Possible formats "
24622 "include C<raw> and C<qcow2>."
24627 #: ../fish/guestfish-actions.pod:138
24629 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
24630 "add-drive-with-if> call (q.v.)"
24635 #: ../fish/guestfish-actions.pod:145
24636 msgid "add-drive-ro"
24641 #: ../fish/guestfish-actions.pod:147
24647 #: ../fish/guestfish-actions.pod:149
24650 " add-drive-ro filename\n"
24656 #: ../fish/guestfish-actions.pod:151
24658 "This function is the equivalent of calling L</add-drive-opts> with the "
24659 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
24660 "is added read-only, with the format being detected automatically."
24665 #: ../fish/guestfish-actions.pod:156
24666 msgid "add-drive-ro-with-if"
24671 #: ../fish/guestfish-actions.pod:158
24674 " add-drive-ro-with-if filename iface\n"
24680 #: ../fish/guestfish-actions.pod:160
24682 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
24683 "interface emulation to use at run time."
24688 #: ../fish/guestfish-actions.pod:170
24689 msgid "add-drive-with-if"
24694 #: ../fish/guestfish-actions.pod:172
24697 " add-drive-with-if filename iface\n"
24703 #: ../fish/guestfish-actions.pod:174
24705 "This is the same as L</add-drive> but it allows you to specify the QEMU "
24706 "interface emulation to use at run time."
24711 #: ../fish/guestfish-actions.pod:184
24717 #: ../fish/guestfish-actions.pod:186
24720 " aug-clear augpath\n"
24726 #: ../fish/guestfish-actions.pod:191
24732 #: ../fish/guestfish-actions.pod:193
24741 #: ../fish/guestfish-actions.pod:195
24743 "Close the current Augeas handle and free up any resources used by it. After "
24744 "calling this, you have to call L</aug-init> again before you can use any "
24745 "other Augeas functions."
24750 #: ../fish/guestfish-actions.pod:200
24751 msgid "aug-defnode"
24756 #: ../fish/guestfish-actions.pod:202
24759 " aug-defnode name expr val\n"
24765 #: ../fish/guestfish-actions.pod:207
24767 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
24768 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
24769 "containing that single node."
24774 #: ../fish/guestfish-actions.pod:215
24780 #: ../fish/guestfish-actions.pod:217
24783 " aug-defvar name expr\n"
24789 #: ../fish/guestfish-actions.pod:226
24795 #: ../fish/guestfish-actions.pod:228
24798 " aug-get augpath\n"
24804 #: ../fish/guestfish-actions.pod:233
24810 #: ../fish/guestfish-actions.pod:235
24813 " aug-init root flags\n"
24819 #: ../fish/guestfish-actions.pod:241
24820 msgid "You must call this before using any other L</aug-*> commands."
24825 #: ../fish/guestfish-actions.pod:276
24826 msgid "Do not load the tree in L</aug-init>."
24831 #: ../fish/guestfish-actions.pod:280
24832 msgid "To close the handle, you can call L</aug-close>."
24837 #: ../fish/guestfish-actions.pod:284
24843 #: ../fish/guestfish-actions.pod:286
24846 " aug-insert augpath label true|false\n"
24852 #: ../fish/guestfish-actions.pod:296
24858 #: ../fish/guestfish-actions.pod:298
24867 #: ../fish/guestfish-actions.pod:305
24873 #: ../fish/guestfish-actions.pod:307
24876 " aug-ls augpath\n"
24882 #: ../fish/guestfish-actions.pod:309
24884 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
24885 "resulting nodes into alphabetical order."
24890 #: ../fish/guestfish-actions.pod:312
24896 #: ../fish/guestfish-actions.pod:314
24899 " aug-match augpath\n"
24905 #: ../fish/guestfish-actions.pod:320
24911 #: ../fish/guestfish-actions.pod:322
24914 " aug-mv src dest\n"
24920 #: ../fish/guestfish-actions.pod:327
24926 #: ../fish/guestfish-actions.pod:329
24929 " aug-rm augpath\n"
24935 #: ../fish/guestfish-actions.pod:335
24941 #: ../fish/guestfish-actions.pod:337
24950 #: ../fish/guestfish-actions.pod:341
24952 "The flags which were passed to L</aug-init> affect exactly how files are "
24958 #: ../fish/guestfish-actions.pod:344
24964 #: ../fish/guestfish-actions.pod:346
24967 " aug-set augpath val\n"
24973 #: ../fish/guestfish-actions.pod:350
24975 "In the Augeas API, it is possible to clear a node by setting the value to "
24976 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
24977 "this call. Instead you must use the L</aug-clear> call."
24982 #: ../fish/guestfish-actions.pod:355
24988 #: ../fish/guestfish-actions.pod:357
24991 " available 'groups ...'\n"
24997 #: ../fish/guestfish-actions.pod:363
24999 "The libguestfs groups, and the functions that those groups correspond to, "
25000 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
25001 "runtime by calling L</available-all-groups>."
25006 #: ../fish/guestfish-actions.pod:387
25007 msgid "You must call L</launch> before calling this function."
25012 #: ../fish/guestfish-actions.pod:409
25014 "This call was added in version C<1.0.80>. In previous versions of "
25015 "libguestfs all you could do would be to speculatively execute a command to "
25016 "find out if the daemon implemented it. See also L</version>."
25021 #: ../fish/guestfish-actions.pod:416
25022 msgid "available-all-groups"
25027 #: ../fish/guestfish-actions.pod:418
25030 " available-all-groups\n"
25036 #: ../fish/guestfish-actions.pod:420
25038 "This command returns a list of all optional groups that this daemon knows "
25039 "about. Note this returns both supported and unsupported groups. To find "
25040 "out which ones the daemon can actually support you have to call L</"
25041 "available> on each member of the returned list."
25046 #: ../fish/guestfish-actions.pod:426
25047 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
25052 #: ../fish/guestfish-actions.pod:428
25058 #: ../fish/guestfish-actions.pod:430
25061 " base64-in (base64file|-) filename\n"
25067 #: ../fish/guestfish-actions.pod:435 ../fish/guestfish-actions.pod:444
25068 #: ../fish/guestfish-actions.pod:668 ../fish/guestfish-actions.pod:837
25069 #: ../fish/guestfish-actions.pod:856 ../fish/guestfish-actions.pod:1230
25070 #: ../fish/guestfish-actions.pod:4497 ../fish/guestfish-actions.pod:4509
25071 #: ../fish/guestfish-actions.pod:4520 ../fish/guestfish-actions.pod:4531
25072 #: ../fish/guestfish-actions.pod:4583 ../fish/guestfish-actions.pod:4592
25073 #: ../fish/guestfish-actions.pod:4646 ../fish/guestfish-actions.pod:4669
25074 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
25079 #: ../fish/guestfish-actions.pod:437
25085 #: ../fish/guestfish-actions.pod:439
25088 " base64-out filename (base64file|-)\n"
25094 #: ../fish/guestfish-actions.pod:446
25095 msgid "blockdev-flushbufs"
25100 #: ../fish/guestfish-actions.pod:448
25103 " blockdev-flushbufs device\n"
25109 #: ../fish/guestfish-actions.pod:455
25110 msgid "blockdev-getbsz"
25115 #: ../fish/guestfish-actions.pod:457
25118 " blockdev-getbsz device\n"
25124 #: ../fish/guestfish-actions.pod:466
25125 msgid "blockdev-getro"
25130 #: ../fish/guestfish-actions.pod:468
25133 " blockdev-getro device\n"
25139 #: ../fish/guestfish-actions.pod:475
25140 msgid "blockdev-getsize64"
25145 #: ../fish/guestfish-actions.pod:477
25148 " blockdev-getsize64 device\n"
25154 #: ../fish/guestfish-actions.pod:481
25155 msgid "See also L</blockdev-getsz>."
25160 #: ../fish/guestfish-actions.pod:485
25161 msgid "blockdev-getss"
25166 #: ../fish/guestfish-actions.pod:487
25169 " blockdev-getss device\n"
25175 #: ../fish/guestfish-actions.pod:492
25177 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
25182 #: ../fish/guestfish-actions.pod:497
25183 msgid "blockdev-getsz"
25188 #: ../fish/guestfish-actions.pod:499
25191 " blockdev-getsz device\n"
25197 #: ../fish/guestfish-actions.pod:504
25199 "See also L</blockdev-getss> for the real sector size of the device, and L</"
25200 "blockdev-getsize64> for the more useful I<size in bytes>."
25205 #: ../fish/guestfish-actions.pod:510
25206 msgid "blockdev-rereadpt"
25211 #: ../fish/guestfish-actions.pod:512
25214 " blockdev-rereadpt device\n"
25220 #: ../fish/guestfish-actions.pod:518
25221 msgid "blockdev-setbsz"
25226 #: ../fish/guestfish-actions.pod:520
25229 " blockdev-setbsz device blocksize\n"
25235 #: ../fish/guestfish-actions.pod:529
25236 msgid "blockdev-setro"
25241 #: ../fish/guestfish-actions.pod:531
25244 " blockdev-setro device\n"
25250 #: ../fish/guestfish-actions.pod:537
25251 msgid "blockdev-setrw"
25256 #: ../fish/guestfish-actions.pod:539
25259 " blockdev-setrw device\n"
25265 #: ../fish/guestfish-actions.pod:545
25266 msgid "case-sensitive-path"
25271 #: ../fish/guestfish-actions.pod:547
25274 " case-sensitive-path path\n"
25280 #: ../fish/guestfish-actions.pod:571
25282 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
25283 "WINDOWS/system32\"> (the exact return value would depend on details of how "
25284 "the directories were originally created under Windows)."
25289 #: ../fish/guestfish-actions.pod:579
25290 msgid "See also L</realpath>."
25295 #: ../fish/guestfish-actions.pod:581
25301 #: ../fish/guestfish-actions.pod:583
25310 #: ../fish/guestfish-actions.pod:587
25312 "Note that this function cannot correctly handle binary files (specifically, "
25313 "files containing C<\\0> character which is treated as end of string). For "
25314 "those you need to use the L</read-file> or L</download> functions which have "
25315 "a more complex interface."
25320 #: ../fish/guestfish-actions.pod:595
25326 #: ../fish/guestfish-actions.pod:597
25329 " checksum csumtype path\n"
25335 #: ../fish/guestfish-actions.pod:640
25336 msgid "To get the checksum for a device, use L</checksum-device>."
25341 #: ../fish/guestfish-actions.pod:642
25342 msgid "To get the checksums for many files, use L</checksums-out>."
25347 #: ../fish/guestfish-actions.pod:644
25348 msgid "checksum-device"
25353 #: ../fish/guestfish-actions.pod:646
25356 " checksum-device csumtype device\n"
25362 #: ../fish/guestfish-actions.pod:648
25364 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
25365 "device named C<device>. For the types of checksums supported see the L</"
25366 "checksum> command."
25371 #: ../fish/guestfish-actions.pod:652
25372 msgid "checksums-out"
25377 #: ../fish/guestfish-actions.pod:654
25380 " checksums-out csumtype directory (sumsfile|-)\n"
25386 #: ../fish/guestfish-actions.pod:670
25392 #: ../fish/guestfish-actions.pod:672
25395 " chmod mode path\n"
25401 #: ../fish/guestfish-actions.pod:683
25407 #: ../fish/guestfish-actions.pod:685
25410 " chown owner group path\n"
25416 #: ../fish/guestfish-actions.pod:693
25422 #: ../fish/guestfish-actions.pod:695
25425 " command 'arguments ...'\n"
25431 #: ../fish/guestfish-actions.pod:702
25433 "The single parameter is an argv-style list of arguments. The first element "
25434 "is the name of the program to run. Subsequent elements are parameters. The "
25435 "list must be non-empty (ie. must contain a program name). Note that the "
25436 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
25441 #: ../fish/guestfish-actions.pod:730
25442 msgid "command-lines"
25447 #: ../fish/guestfish-actions.pod:732
25450 " command-lines 'arguments ...'\n"
25456 #: ../fish/guestfish-actions.pod:734
25458 "This is the same as L</command>, but splits the result into a list of lines."
25463 #: ../fish/guestfish-actions.pod:737
25464 msgid "See also: L</sh-lines>"
25469 #: ../fish/guestfish-actions.pod:742
25475 #: ../fish/guestfish-actions.pod:744
25478 " config qemuparam qemuvalue\n"
25484 #: ../fish/guestfish-actions.pod:755
25490 #: ../fish/guestfish-actions.pod:757
25493 " copy-size src dest size\n"
25499 #: ../fish/guestfish-actions.pod:765
25505 #: ../fish/guestfish-actions.pod:767
25514 #: ../fish/guestfish-actions.pod:772
25520 #: ../fish/guestfish-actions.pod:774
25529 #: ../fish/guestfish-actions.pod:779
25535 #: ../fish/guestfish-actions.pod:781
25544 #: ../fish/guestfish-actions.pod:788
25546 "If the destination is a device, it must be as large or larger than the "
25547 "source file or device, otherwise the copy will fail. This command cannot do "
25548 "partial copies (see L</copy-size>)."
25553 #: ../fish/guestfish-actions.pod:792
25559 #: ../fish/guestfish-actions.pod:794
25568 #: ../fish/guestfish-actions.pod:798 ../fish/guestfish-actions.pod:809
25570 "This command is mostly useful for interactive sessions. It is I<not> "
25571 "intended that you try to parse the output string. Use L</statvfs> from "
25577 #: ../fish/guestfish-actions.pod:802
25583 #: ../fish/guestfish-actions.pod:804
25592 #: ../fish/guestfish-actions.pod:813
25598 #: ../fish/guestfish-actions.pod:815
25607 #: ../fish/guestfish-actions.pod:821
25609 "Another way to get the same information is to enable verbose messages with "
25610 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
25611 "before running the program."
25616 #: ../fish/guestfish-actions.pod:826
25622 #: ../fish/guestfish-actions.pod:828
25625 " download remotefilename (filename|-)\n"
25631 #: ../fish/guestfish-actions.pod:835
25632 msgid "See also L</upload>, L</cat>."
25637 #: ../fish/guestfish-actions.pod:839
25638 msgid "download-offset"
25643 #: ../fish/guestfish-actions.pod:841
25646 " download-offset remotefilename (filename|-) offset size\n"
25652 #: ../fish/guestfish-actions.pod:849
25654 "Note that there is no limit on the amount of data that can be downloaded "
25655 "with this call, unlike with L</pread>, and this call always reads the full "
25656 "amount unless an error occurs."
25661 #: ../fish/guestfish-actions.pod:854
25662 msgid "See also L</download>, L</pread>."
25667 #: ../fish/guestfish-actions.pod:858
25668 msgid "drop-caches"
25673 #: ../fish/guestfish-actions.pod:860
25676 " drop-caches whattodrop\n"
25682 #: ../fish/guestfish-actions.pod:872
25688 #: ../fish/guestfish-actions.pod:874
25697 #: ../fish/guestfish-actions.pod:886
25703 #: ../fish/guestfish-actions.pod:888
25706 " e2fsck-f device\n"
25712 #: ../fish/guestfish-actions.pod:894
25714 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
25715 "should use L</fsck>."
25720 #: ../fish/guestfish-actions.pod:897
25721 msgid "echo-daemon"
25726 #: ../fish/guestfish-actions.pod:899
25729 " echo-daemon 'words ...'\n"
25735 #: ../fish/guestfish-actions.pod:906
25736 msgid "See also L</ping-daemon>."
25741 #: ../fish/guestfish-actions.pod:908
25747 #: ../fish/guestfish-actions.pod:910
25750 " egrep regex path\n"
25756 #: ../fish/guestfish-actions.pod:918
25762 #: ../fish/guestfish-actions.pod:920
25765 " egrepi regex path\n"
25771 #: ../fish/guestfish-actions.pod:928
25777 #: ../fish/guestfish-actions.pod:930
25780 " equal file1 file2\n"
25786 #: ../fish/guestfish-actions.pod:937
25792 #: ../fish/guestfish-actions.pod:939
25801 #: ../fish/guestfish-actions.pod:944
25802 msgid "See also L</is-file>, L</is-dir>, L</stat>."
25807 #: ../fish/guestfish-actions.pod:946
25813 #: ../fish/guestfish-actions.pod:948
25816 " fallocate path len\n"
25822 #: ../fish/guestfish-actions.pod:965
25823 msgid "fallocate64"
25828 #: ../fish/guestfish-actions.pod:967
25831 " fallocate64 path len\n"
25837 #: ../fish/guestfish-actions.pod:973
25839 "Note that this call allocates disk blocks for the file. To create a sparse "
25840 "file use L</truncate-size> instead."
25845 #: ../fish/guestfish-actions.pod:976
25847 "The deprecated call L</fallocate> does the same, but owing to an oversight "
25848 "it only allowed 30 bit lengths to be specified, effectively limiting the "
25849 "maximum size of files created through that call to 1GB."
25854 #: ../fish/guestfish-actions.pod:985
25860 #: ../fish/guestfish-actions.pod:987
25863 " fgrep pattern path\n"
25869 #: ../fish/guestfish-actions.pod:995
25875 #: ../fish/guestfish-actions.pod:997
25878 " fgrepi pattern path\n"
25884 #: ../fish/guestfish-actions.pod:1005
25890 #: ../fish/guestfish-actions.pod:1007
25898 #: ../fish/guestfish-actions.pod:1023
25900 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
25901 "(etc), L</is-zero>."
25906 #: ../fish/guestfish-actions.pod:1026
25907 msgid "file-architecture"
25912 #: ../fish/guestfish-actions.pod:1028
25915 " file-architecture filename\n"
25921 #: ../fish/guestfish-actions.pod:1131
25927 #: ../fish/guestfish-actions.pod:1133
25936 #: ../fish/guestfish-actions.pod:1137
25938 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
25939 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
25944 #: ../fish/guestfish-actions.pod:1141
25950 #: ../fish/guestfish-actions.pod:1143
25953 " fill c len path\n"
25959 #: ../fish/guestfish-actions.pod:1149
25961 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
25962 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
25963 "L</fill-pattern>."
25968 #: ../fish/guestfish-actions.pod:1154
25969 msgid "fill-pattern"
25974 #: ../fish/guestfish-actions.pod:1156
25977 " fill-pattern pattern len path\n"
25983 #: ../fish/guestfish-actions.pod:1158
25985 "This function is like L</fill> except that it creates a new file of length "
25986 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
25987 "is truncated if necessary to ensure the length of the file is exactly C<len> "
25993 #: ../fish/guestfish-actions.pod:1163
25999 #: ../fish/guestfish-actions.pod:1165
26002 " find directory\n"
26008 #: ../fish/guestfish-actions.pod:1179
26009 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
26014 #: ../fish/guestfish-actions.pod:1192
26015 msgid "See also L</find0>."
26020 #: ../fish/guestfish-actions.pod:1197
26026 #: ../fish/guestfish-actions.pod:1199
26029 " find0 directory (files|-)\n"
26035 #: ../fish/guestfish-actions.pod:1205
26037 "This command works the same way as L</find> with the following exceptions:"
26042 #: ../fish/guestfish-actions.pod:1232
26043 msgid "findfs-label"
26048 #: ../fish/guestfish-actions.pod:1234
26051 " findfs-label label\n"
26057 #: ../fish/guestfish-actions.pod:1240
26058 msgid "To find the label of a filesystem, use L</vfs-label>."
26063 #: ../fish/guestfish-actions.pod:1242
26064 msgid "findfs-uuid"
26069 #: ../fish/guestfish-actions.pod:1244
26072 " findfs-uuid uuid\n"
26078 #: ../fish/guestfish-actions.pod:1250
26079 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
26084 #: ../fish/guestfish-actions.pod:1252
26090 #: ../fish/guestfish-actions.pod:1254
26093 " fsck fstype device\n"
26099 #: ../fish/guestfish-actions.pod:1284
26105 #: ../fish/guestfish-actions.pod:1286
26113 #: ../fish/guestfish-actions.pod:1293
26114 msgid "get-attach-method"
26118 #: ../fish/guestfish-actions.pod:1295
26121 " get-attach-method\n"
26126 #: ../fish/guestfish-actions.pod:1297
26127 msgid "Return the current attach method. See L</set-attach-method>."
26132 #: ../fish/guestfish-actions.pod:1299
26133 msgid "get-autosync"
26138 #: ../fish/guestfish-actions.pod:1301
26147 #: ../fish/guestfish-actions.pod:1305
26153 #: ../fish/guestfish-actions.pod:1307
26162 #: ../fish/guestfish-actions.pod:1311
26163 msgid "get-e2label"
26168 #: ../fish/guestfish-actions.pod:1313
26171 " get-e2label device\n"
26177 #: ../fish/guestfish-actions.pod:1325
26183 #: ../fish/guestfish-actions.pod:1327
26186 " get-e2uuid device\n"
26192 #: ../fish/guestfish-actions.pod:1339
26193 msgid "get-memsize"
26198 #: ../fish/guestfish-actions.pod:1341
26207 #: ../fish/guestfish-actions.pod:1346
26209 "If L</set-memsize> was not called on this handle, and if "
26210 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
26211 "value for memsize."
26216 #: ../fish/guestfish-actions.pod:1353
26217 msgid "get-network"
26222 #: ../fish/guestfish-actions.pod:1355
26231 #: ../fish/guestfish-actions.pod:1359
26237 #: ../fish/guestfish-actions.pod:1361
26246 #: ../fish/guestfish-actions.pod:1368
26252 #: ../fish/guestfish-actions.pod:1370
26258 #: ../fish/guestfish-actions.pod:1372
26267 #: ../fish/guestfish-actions.pod:1379
26273 #: ../fish/guestfish-actions.pod:1381
26282 #: ../fish/guestfish-actions.pod:1388
26283 msgid "get-recovery-proc"
26288 #: ../fish/guestfish-actions.pod:1390
26291 " get-recovery-proc\n"
26297 #: ../fish/guestfish-actions.pod:1394
26298 msgid "get-selinux"
26303 #: ../fish/guestfish-actions.pod:1396
26312 #: ../fish/guestfish-actions.pod:1398
26314 "This returns the current setting of the selinux flag which is passed to the "
26315 "appliance at boot time. See L</set-selinux>."
26320 #: ../fish/guestfish-actions.pod:1404
26326 #: ../fish/guestfish-actions.pod:1406
26335 #: ../fish/guestfish-actions.pod:1413
26341 #: ../fish/guestfish-actions.pod:1415
26350 #: ../fish/guestfish-actions.pod:1419
26356 #: ../fish/guestfish-actions.pod:1421
26365 #: ../fish/guestfish-actions.pod:1423
26367 "Return the current umask. By default the umask is C<022> unless it has been "
26368 "set by calling L</umask>."
26373 #: ../fish/guestfish-actions.pod:1426
26374 msgid "get-verbose"
26379 #: ../fish/guestfish-actions.pod:1428
26388 #: ../fish/guestfish-actions.pod:1432
26394 #: ../fish/guestfish-actions.pod:1434
26403 #: ../fish/guestfish-actions.pod:1438
26404 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
26409 #: ../fish/guestfish-actions.pod:1441
26415 #: ../fish/guestfish-actions.pod:1443
26418 " getxattr path name\n"
26424 #: ../fish/guestfish-actions.pod:1445
26426 "Get a single extended attribute from file C<path> named C<name>. This call "
26427 "follows symlinks. If you want to lookup an extended attribute for the "
26428 "symlink itself, use L</lgetxattr>."
26433 #: ../fish/guestfish-actions.pod:1449 ../fish/guestfish-actions.pod:2470
26435 "Normally it is better to get all extended attributes from a file in one go "
26436 "by calling L</getxattrs>. However some Linux filesystem implementations are "
26437 "buggy and do not provide a way to list out attributes. For these "
26438 "filesystems (notably ntfs-3g) you have to know the names of the extended "
26439 "attributes you want in advance and call this function."
26444 #: ../fish/guestfish-actions.pod:1459
26445 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
26450 #: ../fish/guestfish-actions.pod:1461
26456 #: ../fish/guestfish-actions.pod:1463
26459 " getxattrs path\n"
26465 #: ../fish/guestfish-actions.pod:1471
26466 msgid "See also: L</lgetxattrs>, L<attr(5)>."
26471 #: ../fish/guestfish-actions.pod:1473
26472 msgid "glob-expand"
26477 #: ../fish/guestfish-actions.pod:1475
26480 " glob-expand pattern\n"
26486 #: ../fish/guestfish-actions.pod:1488
26492 #: ../fish/guestfish-actions.pod:1490
26495 " grep regex path\n"
26501 #: ../fish/guestfish-actions.pod:1498
26507 #: ../fish/guestfish-actions.pod:1500
26510 " grepi regex path\n"
26516 #: ../fish/guestfish-actions.pod:1508
26517 msgid "grub-install"
26522 #: ../fish/guestfish-actions.pod:1510
26525 " grub-install root device\n"
26531 #: ../fish/guestfish-actions.pod:1526
26537 #: ../fish/guestfish-actions.pod:1528
26546 #: ../fish/guestfish-actions.pod:1536
26552 #: ../fish/guestfish-actions.pod:1538
26555 " head-n nrlines path\n"
26561 #: ../fish/guestfish-actions.pod:1551
26567 #: ../fish/guestfish-actions.pod:1553
26576 #: ../fish/guestfish-actions.pod:1561
26582 #: ../fish/guestfish-actions.pod:1563
26585 " initrd-cat initrdpath filename\n"
26591 #: ../fish/guestfish-actions.pod:1575
26592 msgid "See also L</initrd-list>."
26597 #: ../fish/guestfish-actions.pod:1580
26598 msgid "initrd-list"
26603 #: ../fish/guestfish-actions.pod:1582
26606 " initrd-list path\n"
26612 #: ../fish/guestfish-actions.pod:1594
26613 msgid "inotify-add-watch"
26618 #: ../fish/guestfish-actions.pod:1596
26621 " inotify-add-watch path mask\n"
26627 #: ../fish/guestfish-actions.pod:1608
26628 msgid "inotify-close"
26633 #: ../fish/guestfish-actions.pod:1610
26642 #: ../fish/guestfish-actions.pod:1616
26643 msgid "inotify-files"
26648 #: ../fish/guestfish-actions.pod:1618
26657 #: ../fish/guestfish-actions.pod:1620
26659 "This function is a helpful wrapper around L</inotify-read> which just "
26660 "returns a list of pathnames of objects that were touched. The returned "
26661 "pathnames are sorted and deduplicated."
26666 #: ../fish/guestfish-actions.pod:1624
26667 msgid "inotify-init"
26672 #: ../fish/guestfish-actions.pod:1626
26675 " inotify-init maxevents\n"
26681 #: ../fish/guestfish-actions.pod:1632
26683 "C<maxevents> is the maximum number of events which will be queued up between "
26684 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
26685 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
26686 "default was 16384 events. Beyond this limit, the kernel throws away events, "
26687 "but records the fact that it threw them away by setting a flag "
26688 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
26693 #: ../fish/guestfish-actions.pod:1642
26695 "Before any events are generated, you have to add some watches to the "
26696 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
26697 "L</inotify-watch-all>."
26702 #: ../fish/guestfish-actions.pod:1648
26704 "Queued up events should be read periodically by calling L</inotify-read> (or "
26705 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
26706 "If you don't read the events out often enough then you risk the internal "
26707 "queue overflowing."
26712 #: ../fish/guestfish-actions.pod:1655
26714 "The handle should be closed after use by calling L</inotify-close>. This "
26715 "also removes any watches automatically."
26720 #: ../fish/guestfish-actions.pod:1664
26721 msgid "inotify-read"
26726 #: ../fish/guestfish-actions.pod:1666
26735 #: ../fish/guestfish-actions.pod:1679
26736 msgid "inotify-rm-watch"
26741 #: ../fish/guestfish-actions.pod:1681
26744 " inotify-rm-watch wd\n"
26750 #: ../fish/guestfish-actions.pod:1683
26751 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
26756 #: ../fish/guestfish-actions.pod:1686
26757 msgid "inspect-get-arch"
26762 #: ../fish/guestfish-actions.pod:1688
26765 " inspect-get-arch root\n"
26771 #: ../fish/guestfish-actions.pod:1690 ../fish/guestfish-actions.pod:1706
26772 #: ../fish/guestfish-actions.pod:1792 ../fish/guestfish-actions.pod:1828
26773 #: ../fish/guestfish-actions.pod:1846 ../fish/guestfish-actions.pod:1880
26774 #: ../fish/guestfish-actions.pod:1895 ../fish/guestfish-actions.pod:1916
26775 #: ../fish/guestfish-actions.pod:1931 ../fish/guestfish-actions.pod:1964
26776 #: ../fish/guestfish-actions.pod:1986 ../fish/guestfish-actions.pod:2010
26777 #: ../fish/guestfish-actions.pod:2027 ../fish/guestfish-actions.pod:2070
26778 #: ../fish/guestfish-actions.pod:2105 ../fish/guestfish-actions.pod:2121
26779 #: ../fish/guestfish-actions.pod:2137 ../fish/guestfish-actions.pod:2150
26780 #: ../fish/guestfish-actions.pod:2163 ../fish/guestfish-actions.pod:2178
26782 "This function should only be called with a root device string as returned by "
26788 #: ../fish/guestfish-actions.pod:1693
26790 "This returns the architecture of the inspected operating system. The "
26791 "possible return values are listed under L</file-architecture>."
26796 #: ../fish/guestfish-actions.pod:1702
26797 msgid "inspect-get-distro"
26802 #: ../fish/guestfish-actions.pod:1704
26805 " inspect-get-distro root\n"
26810 #: ../fish/guestfish-actions.pod:1788
26811 msgid "inspect-get-drive-mappings"
26815 #: ../fish/guestfish-actions.pod:1790
26818 " inspect-get-drive-mappings root\n"
26823 #: ../fish/guestfish-actions.pod:1820
26825 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
26826 "get-mountpoints>, L</inspect-get-filesystems>."
26831 #: ../fish/guestfish-actions.pod:1824
26832 msgid "inspect-get-filesystems"
26837 #: ../fish/guestfish-actions.pod:1826
26840 " inspect-get-filesystems root\n"
26846 #: ../fish/guestfish-actions.pod:1839
26848 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
26849 "get-mountpoints>."
26853 #: ../fish/guestfish-actions.pod:1842
26854 msgid "inspect-get-format"
26858 #: ../fish/guestfish-actions.pod:1844
26861 " inspect-get-format root\n"
26867 #: ../fish/guestfish-actions.pod:1876
26868 msgid "inspect-get-hostname"
26873 #: ../fish/guestfish-actions.pod:1878
26876 " inspect-get-hostname root\n"
26882 #: ../fish/guestfish-actions.pod:1891
26883 msgid "inspect-get-major-version"
26888 #: ../fish/guestfish-actions.pod:1893
26891 " inspect-get-major-version root\n"
26897 #: ../fish/guestfish-actions.pod:1912
26898 msgid "inspect-get-minor-version"
26903 #: ../fish/guestfish-actions.pod:1914
26906 " inspect-get-minor-version root\n"
26912 #: ../fish/guestfish-actions.pod:1924
26914 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
26915 "get-major-version>."
26920 #: ../fish/guestfish-actions.pod:1927
26921 msgid "inspect-get-mountpoints"
26926 #: ../fish/guestfish-actions.pod:1929
26929 " inspect-get-mountpoints root\n"
26934 #: ../fish/guestfish-actions.pod:1951
26936 "For operating systems like Windows which still use drive letters, this call "
26937 "will only return an entry for the first drive \"mounted on\" C</>. For "
26938 "information about the mapping of drive letters to partitions, see L</inspect-"
26939 "get-drive-mappings>."
26944 #: ../fish/guestfish-actions.pod:1957
26946 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
26947 "get-filesystems>."
26952 #: ../fish/guestfish-actions.pod:1960
26953 msgid "inspect-get-package-format"
26958 #: ../fish/guestfish-actions.pod:1962
26961 " inspect-get-package-format root\n"
26967 #: ../fish/guestfish-actions.pod:1967
26969 "This function and L</inspect-get-package-management> return the package "
26970 "format and package management tool used by the inspected operating system. "
26971 "For example for Fedora these functions would return C<rpm> (package format) "
26972 "and C<yum> (package management)."
26977 #: ../fish/guestfish-actions.pod:1982
26978 msgid "inspect-get-package-management"
26983 #: ../fish/guestfish-actions.pod:1984
26986 " inspect-get-package-management root\n"
26992 #: ../fish/guestfish-actions.pod:1989
26994 "L</inspect-get-package-format> and this function return the package format "
26995 "and package management tool used by the inspected operating system. For "
26996 "example for Fedora these functions would return C<rpm> (package format) and "
26997 "C<yum> (package management)."
27002 #: ../fish/guestfish-actions.pod:2006
27003 msgid "inspect-get-product-name"
27008 #: ../fish/guestfish-actions.pod:2008
27011 " inspect-get-product-name root\n"
27016 #: ../fish/guestfish-actions.pod:2023
27017 msgid "inspect-get-product-variant"
27021 #: ../fish/guestfish-actions.pod:2025
27024 " inspect-get-product-variant root\n"
27029 #: ../fish/guestfish-actions.pod:2049
27031 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
27032 "get-product-name>, L</inspect-get-major-version>."
27037 #: ../fish/guestfish-actions.pod:2053
27038 msgid "inspect-get-roots"
27043 #: ../fish/guestfish-actions.pod:2055
27046 " inspect-get-roots\n"
27052 #: ../fish/guestfish-actions.pod:2057
27054 "This function is a convenient way to get the list of root devices, as "
27055 "returned from a previous call to L</inspect-os>, but without redoing the "
27056 "whole inspection process."
27061 #: ../fish/guestfish-actions.pod:2061
27063 "This returns an empty list if either no root devices were found or the "
27064 "caller has not called L</inspect-os>."
27069 #: ../fish/guestfish-actions.pod:2066
27070 msgid "inspect-get-type"
27075 #: ../fish/guestfish-actions.pod:2068
27078 " inspect-get-type root\n"
27083 #: ../fish/guestfish-actions.pod:2101
27084 msgid "inspect-get-windows-current-control-set"
27088 #: ../fish/guestfish-actions.pod:2103
27091 " inspect-get-windows-current-control-set root\n"
27097 #: ../fish/guestfish-actions.pod:2117
27098 msgid "inspect-get-windows-systemroot"
27103 #: ../fish/guestfish-actions.pod:2119
27106 " inspect-get-windows-systemroot root\n"
27111 #: ../fish/guestfish-actions.pod:2133
27112 msgid "inspect-is-live"
27116 #: ../fish/guestfish-actions.pod:2135
27119 " inspect-is-live root\n"
27124 #: ../fish/guestfish-actions.pod:2140
27126 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
27127 "then this returns true if a live image was detected on the disk."
27131 #: ../fish/guestfish-actions.pod:2146
27132 msgid "inspect-is-multipart"
27136 #: ../fish/guestfish-actions.pod:2148
27139 " inspect-is-multipart root\n"
27144 #: ../fish/guestfish-actions.pod:2153
27146 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
27147 "then this returns true if the disk is part of a set."
27151 #: ../fish/guestfish-actions.pod:2159
27152 msgid "inspect-is-netinst"
27156 #: ../fish/guestfish-actions.pod:2161
27159 " inspect-is-netinst root\n"
27164 #: ../fish/guestfish-actions.pod:2166
27166 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
27167 "then this returns true if the disk is a network installer, ie. not a self-"
27168 "contained install CD but one which is likely to require network access to "
27169 "complete the install."
27174 #: ../fish/guestfish-actions.pod:2174
27175 msgid "inspect-list-applications"
27180 #: ../fish/guestfish-actions.pod:2176
27183 " inspect-list-applications root\n"
27189 #: ../fish/guestfish-actions.pod:2183
27191 "I<Note:> This call works differently from other parts of the inspection "
27192 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
27193 "then mount up the disks, before calling this. Listing applications is a "
27194 "significantly more difficult operation which requires access to the full "
27195 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
27196 "are just returning data cached in the libguestfs handle, this call actually "
27197 "reads parts of the mounted filesystems during the call."
27202 #: ../fish/guestfish-actions.pod:2273
27208 #: ../fish/guestfish-actions.pod:2275
27217 #: ../fish/guestfish-actions.pod:2290
27219 "You can pass the root string(s) returned to other L</inspect-get-*> "
27220 "functions in order to query further information about each operating system, "
27221 "such as the name and version."
27226 #: ../fish/guestfish-actions.pod:2295
27228 "This function uses other libguestfs features such as L</mount-ro> and L</"
27229 "umount-all> in order to mount and unmount filesystems and look at the "
27230 "contents. This should be called with no disks currently mounted. The "
27231 "function may also use Augeas, so any existing Augeas handle will be closed."
27236 #: ../fish/guestfish-actions.pod:2307 ../fish/guestfish-actions.pod:2498
27237 #: ../fish/guestfish-actions.pod:2544
27238 msgid "See also L</list-filesystems>."
27243 #: ../fish/guestfish-actions.pod:2309
27244 msgid "is-blockdev"
27249 #: ../fish/guestfish-actions.pod:2311
27252 " is-blockdev path\n"
27258 #: ../fish/guestfish-actions.pod:2316 ../fish/guestfish-actions.pod:2334
27259 #: ../fish/guestfish-actions.pod:2353 ../fish/guestfish-actions.pod:2362
27260 #: ../fish/guestfish-actions.pod:2372 ../fish/guestfish-actions.pod:2406
27261 #: ../fish/guestfish-actions.pod:2415
27262 msgid "See also L</stat>."
27267 #: ../fish/guestfish-actions.pod:2318
27273 #: ../fish/guestfish-actions.pod:2320
27282 #: ../fish/guestfish-actions.pod:2327
27288 #: ../fish/guestfish-actions.pod:2329
27291 " is-chardev path\n"
27297 #: ../fish/guestfish-actions.pod:2336
27303 #: ../fish/guestfish-actions.pod:2338
27312 #: ../fish/guestfish-actions.pod:2345
27318 #: ../fish/guestfish-actions.pod:2347
27327 #: ../fish/guestfish-actions.pod:2355
27333 #: ../fish/guestfish-actions.pod:2357
27342 #: ../fish/guestfish-actions.pod:2364
27348 #: ../fish/guestfish-actions.pod:2366
27357 #: ../fish/guestfish-actions.pod:2374
27358 msgid "is-launching"
27363 #: ../fish/guestfish-actions.pod:2376
27372 #: ../fish/guestfish-actions.pod:2383
27378 #: ../fish/guestfish-actions.pod:2385
27387 #: ../fish/guestfish-actions.pod:2390
27393 #: ../fish/guestfish-actions.pod:2392
27402 #: ../fish/guestfish-actions.pod:2399
27408 #: ../fish/guestfish-actions.pod:2401
27411 " is-socket path\n"
27417 #: ../fish/guestfish-actions.pod:2408
27423 #: ../fish/guestfish-actions.pod:2410
27426 " is-symlink path\n"
27431 #: ../fish/guestfish-actions.pod:2417
27436 #: ../fish/guestfish-actions.pod:2419
27444 #: ../fish/guestfish-actions.pod:2424
27445 msgid "is-zero-device"
27449 #: ../fish/guestfish-actions.pod:2426
27452 " is-zero-device device\n"
27458 #: ../fish/guestfish-actions.pod:2432
27459 msgid "kill-subprocess"
27464 #: ../fish/guestfish-actions.pod:2434
27467 " kill-subprocess\n"
27473 #: ../fish/guestfish-actions.pod:2438
27479 #: ../fish/guestfish-actions.pod:2440
27485 #: ../fish/guestfish-actions.pod:2442
27494 #: ../fish/guestfish-actions.pod:2450
27500 #: ../fish/guestfish-actions.pod:2452
27503 " lchown owner group path\n"
27509 #: ../fish/guestfish-actions.pod:2454
27511 "Change the file owner to C<owner> and group to C<group>. This is like L</"
27512 "chown> but if C<path> is a symlink then the link itself is changed, not the "
27518 #: ../fish/guestfish-actions.pod:2462
27524 #: ../fish/guestfish-actions.pod:2464
27527 " lgetxattr path name\n"
27533 #: ../fish/guestfish-actions.pod:2480
27534 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
27539 #: ../fish/guestfish-actions.pod:2482
27545 #: ../fish/guestfish-actions.pod:2484
27548 " lgetxattrs path\n"
27554 #: ../fish/guestfish-actions.pod:2486
27556 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
27557 "it returns the extended attributes of the link itself."
27562 #: ../fish/guestfish-actions.pod:2490
27563 msgid "list-devices"
27568 #: ../fish/guestfish-actions.pod:2492
27577 #: ../fish/guestfish-actions.pod:2500
27578 msgid "list-filesystems"
27583 #: ../fish/guestfish-actions.pod:2502
27586 " list-filesystems\n"
27592 #: ../fish/guestfish-actions.pod:2521
27594 "This command runs other libguestfs commands, which might include L</mount> "
27595 "and L</umount>, and therefore you should use this soon after launch and only "
27596 "when nothing is mounted."
27601 #: ../fish/guestfish-actions.pod:2525
27603 "Not all of the filesystems returned will be mountable. In particular, swap "
27604 "partitions are returned in the list. Also this command does not check that "
27605 "each filesystem found is valid and mountable, and some filesystems might be "
27606 "mountable but require special options. Filesystems may not all belong to a "
27607 "single logical operating system (use L</inspect-os> to look for OSes)."
27612 #: ../fish/guestfish-actions.pod:2533
27613 msgid "list-partitions"
27618 #: ../fish/guestfish-actions.pod:2535
27621 " list-partitions\n"
27627 #: ../fish/guestfish-actions.pod:2541
27629 "This does not return logical volumes. For that you will need to call L</"
27635 #: ../fish/guestfish-actions.pod:2546
27641 #: ../fish/guestfish-actions.pod:2548
27650 #: ../fish/guestfish-actions.pod:2556
27656 #: ../fish/guestfish-actions.pod:2558
27659 " ln target linkname\n"
27665 #: ../fish/guestfish-actions.pod:2562
27671 #: ../fish/guestfish-actions.pod:2564
27674 " ln-f target linkname\n"
27680 #: ../fish/guestfish-actions.pod:2569
27686 #: ../fish/guestfish-actions.pod:2571
27689 " ln-s target linkname\n"
27695 #: ../fish/guestfish-actions.pod:2575
27701 #: ../fish/guestfish-actions.pod:2577
27704 " ln-sf target linkname\n"
27710 #: ../fish/guestfish-actions.pod:2582
27711 msgid "lremovexattr"
27716 #: ../fish/guestfish-actions.pod:2584
27719 " lremovexattr xattr path\n"
27725 #: ../fish/guestfish-actions.pod:2586
27727 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
27728 "it removes an extended attribute of the link itself."
27733 #: ../fish/guestfish-actions.pod:2590
27739 #: ../fish/guestfish-actions.pod:2592
27748 #: ../fish/guestfish-actions.pod:2598
27750 "This command is mostly useful for interactive sessions. Programs should "
27751 "probably use L</readdir> instead."
27756 #: ../fish/guestfish-actions.pod:2601
27762 #: ../fish/guestfish-actions.pod:2603
27765 " lsetxattr xattr val vallen path\n"
27771 #: ../fish/guestfish-actions.pod:2605
27773 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
27774 "sets an extended attribute of the link itself."
27779 #: ../fish/guestfish-actions.pod:2609
27785 #: ../fish/guestfish-actions.pod:2611
27794 #: ../fish/guestfish-actions.pod:2615
27796 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
27797 "the link is stat-ed, not the file it refers to."
27802 #: ../fish/guestfish-actions.pod:2621
27808 #: ../fish/guestfish-actions.pod:2623
27811 " lstatlist path 'names ...'\n"
27817 #: ../fish/guestfish-actions.pod:2625
27819 "This call allows you to perform the L</lstat> operation on multiple files, "
27820 "where all files are in the directory C<path>. C<names> is the list of files "
27821 "from this directory."
27826 #: ../fish/guestfish-actions.pod:2634
27828 "This call is intended for programs that want to efficiently list a directory "
27829 "contents without making many round-trips. See also L</lxattrlist> for a "
27830 "similarly efficient call for getting extended attributes. Very long "
27831 "directory listings might cause the protocol message size to be exceeded, "
27832 "causing this call to fail. The caller must split up such requests into "
27833 "smaller groups of names."
27838 #: ../fish/guestfish-actions.pod:2642
27839 msgid "luks-add-key"
27844 #: ../fish/guestfish-actions.pod:2644
27847 " luks-add-key device keyslot\n"
27853 #: ../fish/guestfish-actions.pod:2651
27855 "Note that if C<keyslot> already contains a key, then this command will "
27856 "fail. You have to use L</luks-kill-slot> first to remove that key."
27861 #: ../fish/guestfish-actions.pod:2655 ../fish/guestfish-actions.pod:2677
27862 #: ../fish/guestfish-actions.pod:2690 ../fish/guestfish-actions.pod:2704
27863 #: ../fish/guestfish-actions.pod:2727 ../fish/guestfish-actions.pod:2737
27865 "This command has one or more key or passphrase parameters. Guestfish will "
27866 "prompt for these separately."
27871 #: ../fish/guestfish-actions.pod:2658
27877 #: ../fish/guestfish-actions.pod:2660
27880 " luks-close device\n"
27886 #: ../fish/guestfish-actions.pod:2662
27888 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
27889 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
27890 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
27896 #: ../fish/guestfish-actions.pod:2668
27897 msgid "luks-format"
27902 #: ../fish/guestfish-actions.pod:2670
27905 " luks-format device keyslot\n"
27911 #: ../fish/guestfish-actions.pod:2683
27912 msgid "luks-format-cipher"
27917 #: ../fish/guestfish-actions.pod:2685
27920 " luks-format-cipher device keyslot cipher\n"
27926 #: ../fish/guestfish-actions.pod:2687
27928 "This command is the same as L</luks-format> but it also allows you to set "
27929 "the C<cipher> used."
27934 #: ../fish/guestfish-actions.pod:2696
27935 msgid "luks-kill-slot"
27940 #: ../fish/guestfish-actions.pod:2698
27943 " luks-kill-slot device keyslot\n"
27949 #: ../fish/guestfish-actions.pod:2707
27955 #: ../fish/guestfish-actions.pod:2709
27958 " luks-open device mapname\n"
27964 #: ../fish/guestfish-actions.pod:2723
27966 "If this block device contains LVM volume groups, then calling L</vgscan> "
27967 "followed by L</vg-activate-all> will make them visible."
27972 #: ../fish/guestfish-actions.pod:2730
27973 msgid "luks-open-ro"
27978 #: ../fish/guestfish-actions.pod:2732
27981 " luks-open-ro device mapname\n"
27987 #: ../fish/guestfish-actions.pod:2734
27989 "This is the same as L</luks-open> except that a read-only mapping is created."
27994 #: ../fish/guestfish-actions.pod:2740
28000 #: ../fish/guestfish-actions.pod:2742
28003 " lvcreate logvol volgroup mbytes\n"
28009 #: ../fish/guestfish-actions.pod:2747
28010 msgid "lvm-canonical-lv-name"
28015 #: ../fish/guestfish-actions.pod:2749
28018 " lvm-canonical-lv-name lvname\n"
28024 #: ../fish/guestfish-actions.pod:2758
28025 msgid "See also L</is-lv>."
28030 #: ../fish/guestfish-actions.pod:2760
28031 msgid "lvm-clear-filter"
28036 #: ../fish/guestfish-actions.pod:2762
28039 " lvm-clear-filter\n"
28045 #: ../fish/guestfish-actions.pod:2764
28047 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
28053 #: ../fish/guestfish-actions.pod:2770
28054 msgid "lvm-remove-all"
28059 #: ../fish/guestfish-actions.pod:2772
28062 " lvm-remove-all\n"
28068 #: ../fish/guestfish-actions.pod:2780
28069 msgid "lvm-set-filter"
28074 #: ../fish/guestfish-actions.pod:2782
28077 " lvm-set-filter 'devices ...'\n"
28083 #: ../fish/guestfish-actions.pod:2807
28089 #: ../fish/guestfish-actions.pod:2809
28092 " lvremove device\n"
28098 #: ../fish/guestfish-actions.pod:2817
28104 #: ../fish/guestfish-actions.pod:2819
28107 " lvrename logvol newlogvol\n"
28113 #: ../fish/guestfish-actions.pod:2823
28119 #: ../fish/guestfish-actions.pod:2825
28122 " lvresize device mbytes\n"
28128 #: ../fish/guestfish-actions.pod:2831
28129 msgid "lvresize-free"
28134 #: ../fish/guestfish-actions.pod:2833
28137 " lvresize-free lv percent\n"
28143 #: ../fish/guestfish-actions.pod:2841
28149 #: ../fish/guestfish-actions.pod:2843
28158 #: ../fish/guestfish-actions.pod:2851
28159 msgid "See also L</lvs-full>, L</list-filesystems>."
28164 #: ../fish/guestfish-actions.pod:2853
28170 #: ../fish/guestfish-actions.pod:2855
28179 #: ../fish/guestfish-actions.pod:2860
28185 #: ../fish/guestfish-actions.pod:2862
28194 #: ../fish/guestfish-actions.pod:2866
28200 #: ../fish/guestfish-actions.pod:2868
28203 " lxattrlist path 'names ...'\n"
28209 #: ../fish/guestfish-actions.pod:2884
28211 "This call is intended for programs that want to efficiently list a directory "
28212 "contents without making many round-trips. See also L</lstatlist> for a "
28213 "similarly efficient call for getting standard stats. Very long directory "
28214 "listings might cause the protocol message size to be exceeded, causing this "
28215 "call to fail. The caller must split up such requests into smaller groups of "
28221 #: ../fish/guestfish-actions.pod:2892
28227 #: ../fish/guestfish-actions.pod:2894
28236 #: ../fish/guestfish-actions.pod:2898
28242 #: ../fish/guestfish-actions.pod:2900
28245 " mkdir-mode path mode\n"
28251 #: ../fish/guestfish-actions.pod:2909
28252 msgid "See also L</mkdir>, L</umask>"
28257 #: ../fish/guestfish-actions.pod:2911
28263 #: ../fish/guestfish-actions.pod:2913
28272 #: ../fish/guestfish-actions.pod:2918
28278 #: ../fish/guestfish-actions.pod:2920
28281 " mkdtemp template\n"
28287 #: ../fish/guestfish-actions.pod:2941
28293 #: ../fish/guestfish-actions.pod:2943
28296 " mke2fs-J fstype blocksize device journal\n"
28302 #: ../fish/guestfish-actions.pod:2951
28303 msgid "See also L</mke2journal>."
28308 #: ../fish/guestfish-actions.pod:2953
28314 #: ../fish/guestfish-actions.pod:2955
28317 " mke2fs-JL fstype blocksize device label\n"
28323 #: ../fish/guestfish-actions.pod:2960
28324 msgid "See also L</mke2journal-L>."
28329 #: ../fish/guestfish-actions.pod:2962
28335 #: ../fish/guestfish-actions.pod:2964
28338 " mke2fs-JU fstype blocksize device uuid\n"
28344 #: ../fish/guestfish-actions.pod:2969
28345 msgid "See also L</mke2journal-U>."
28350 #: ../fish/guestfish-actions.pod:2971
28351 msgid "mke2journal"
28356 #: ../fish/guestfish-actions.pod:2973
28359 " mke2journal blocksize device\n"
28365 #: ../fish/guestfish-actions.pod:2980
28366 msgid "mke2journal-L"
28371 #: ../fish/guestfish-actions.pod:2982
28374 " mke2journal-L blocksize label device\n"
28380 #: ../fish/guestfish-actions.pod:2986
28381 msgid "mke2journal-U"
28386 #: ../fish/guestfish-actions.pod:2988
28389 " mke2journal-U blocksize uuid device\n"
28395 #: ../fish/guestfish-actions.pod:2992
28401 #: ../fish/guestfish-actions.pod:2994
28404 " mkfifo mode path\n"
28410 #: ../fish/guestfish-actions.pod:2996
28412 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
28413 "is just a convenient wrapper around L</mknod>."
28418 #: ../fish/guestfish-actions.pod:3002
28424 #: ../fish/guestfish-actions.pod:3004
28427 " mkfs fstype device\n"
28433 #: ../fish/guestfish-actions.pod:3010
28439 #: ../fish/guestfish-actions.pod:3012
28442 " mkfs-b fstype blocksize device\n"
28448 #: ../fish/guestfish-actions.pod:3014
28450 "This call is similar to L</mkfs>, but it allows you to control the block "
28451 "size of the resulting filesystem. Supported block sizes depend on the "
28452 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
28457 #: ../fish/guestfish-actions.pod:3029
28462 #: ../fish/guestfish-actions.pod:3031
28465 " mkfs-opts fstype device [blocksize:..] [features:..]\n"
28471 #: ../fish/guestfish-actions.pod:3066
28472 msgid "mkmountpoint"
28477 #: ../fish/guestfish-actions.pod:3068
28480 " mkmountpoint exemptpath\n"
28486 #: ../fish/guestfish-actions.pod:3070
28488 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
28489 "to create extra mountpoints before mounting the first filesystem."
28494 #: ../fish/guestfish-actions.pod:3094
28496 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
28497 "unexpected errors if you try to mix these calls. It is safest to manually "
28498 "unmount filesystems and remove mountpoints after use."
28503 #: ../fish/guestfish-actions.pod:3098
28505 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
28506 "for this to work for manual mountpoints, you must ensure that the innermost "
28507 "mountpoints have the longest pathnames, as in the example code above."
28511 #: ../fish/guestfish-actions.pod:3105
28513 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
28514 "L</umount-all> to be called when the handle is closed which can also trigger "
28520 #: ../fish/guestfish-actions.pod:3109
28526 #: ../fish/guestfish-actions.pod:3111
28529 " mknod mode devmajor devminor path\n"
28535 #: ../fish/guestfish-actions.pod:3121
28537 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
28538 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
28539 "regular file). These constants are available in the standard Linux header "
28540 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
28541 "wrappers around this command which bitwise OR in the appropriate constant "
28547 #: ../fish/guestfish-actions.pod:3131
28553 #: ../fish/guestfish-actions.pod:3133
28556 " mknod-b mode devmajor devminor path\n"
28562 #: ../fish/guestfish-actions.pod:3135
28564 "This call creates a block device node called C<path> with mode C<mode> and "
28565 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
28566 "wrapper around L</mknod>."
28571 #: ../fish/guestfish-actions.pod:3141
28577 #: ../fish/guestfish-actions.pod:3143
28580 " mknod-c mode devmajor devminor path\n"
28586 #: ../fish/guestfish-actions.pod:3145
28588 "This call creates a char device node called C<path> with mode C<mode> and "
28589 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
28590 "wrapper around L</mknod>."
28595 #: ../fish/guestfish-actions.pod:3151
28601 #: ../fish/guestfish-actions.pod:3153
28610 #: ../fish/guestfish-actions.pod:3157
28616 #: ../fish/guestfish-actions.pod:3159
28619 " mkswap-L label device\n"
28625 #: ../fish/guestfish-actions.pod:3167
28631 #: ../fish/guestfish-actions.pod:3169
28634 " mkswap-U uuid device\n"
28640 #: ../fish/guestfish-actions.pod:3173
28641 msgid "mkswap-file"
28646 #: ../fish/guestfish-actions.pod:3175
28649 " mkswap-file path\n"
28655 #: ../fish/guestfish-actions.pod:3179
28657 "This command just writes a swap file signature to an existing file. To "
28658 "create the file itself, use something like L</fallocate>."
28663 #: ../fish/guestfish-actions.pod:3182
28669 #: ../fish/guestfish-actions.pod:3184
28672 " modprobe modulename\n"
28678 #: ../fish/guestfish-actions.pod:3191
28684 #: ../fish/guestfish-actions.pod:3193
28687 " mount device mountpoint\n"
28693 #: ../fish/guestfish-actions.pod:3209
28695 "B<Important note:> When you use this call, the filesystem options C<sync> "
28696 "and C<noatime> are set implicitly. This was originally done because we "
28697 "thought it would improve reliability, but it turns out that I<-o sync> has a "
28698 "very large negative performance impact and negligible effect on "
28699 "reliability. Therefore we recommend that you avoid using L</mount> in any "
28700 "code that needs performance, and instead use L</mount-options> (use an empty "
28701 "string for the first parameter if you don't want any options)."
28706 #: ../fish/guestfish-actions.pod:3226
28712 #: ../fish/guestfish-actions.pod:3228
28715 " mount-loop file mountpoint\n"
28721 #: ../fish/guestfish-actions.pod:3234
28722 msgid "mount-options"
28727 #: ../fish/guestfish-actions.pod:3236
28730 " mount-options options device mountpoint\n"
28736 #: ../fish/guestfish-actions.pod:3238
28738 "This is the same as the L</mount> command, but it allows you to set the "
28739 "mount options as for the L<mount(8)> I<-o> flag."
28744 #: ../fish/guestfish-actions.pod:3246
28750 #: ../fish/guestfish-actions.pod:3248
28753 " mount-ro device mountpoint\n"
28759 #: ../fish/guestfish-actions.pod:3250
28761 "This is the same as the L</mount> command, but it mounts the filesystem with "
28762 "the read-only (I<-o ro>) flag."
28767 #: ../fish/guestfish-actions.pod:3253
28773 #: ../fish/guestfish-actions.pod:3255
28776 " mount-vfs options vfstype device mountpoint\n"
28782 #: ../fish/guestfish-actions.pod:3257
28784 "This is the same as the L</mount> command, but it allows you to set both the "
28785 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
28790 #: ../fish/guestfish-actions.pod:3261
28791 msgid "mountpoints"
28796 #: ../fish/guestfish-actions.pod:3263
28805 #: ../fish/guestfish-actions.pod:3265
28807 "This call is similar to L</mounts>. That call returns a list of devices. "
28808 "This one returns a hash table (map) of device name to directory where the "
28809 "device is mounted."
28814 #: ../fish/guestfish-actions.pod:3269
28820 #: ../fish/guestfish-actions.pod:3271
28829 #: ../fish/guestfish-actions.pod:3278
28830 msgid "See also: L</mountpoints>"
28835 #: ../fish/guestfish-actions.pod:3280
28841 #: ../fish/guestfish-actions.pod:3282
28850 #: ../fish/guestfish-actions.pod:3287
28851 msgid "ntfs-3g-probe"
28856 #: ../fish/guestfish-actions.pod:3289
28859 " ntfs-3g-probe true|false device\n"
28865 #: ../fish/guestfish-actions.pod:3303
28871 #: ../fish/guestfish-actions.pod:3305
28874 " ntfsresize device\n"
28880 #: ../fish/guestfish-actions.pod:3311
28881 msgid "ntfsresize-size"
28886 #: ../fish/guestfish-actions.pod:3313
28889 " ntfsresize-size device size\n"
28895 #: ../fish/guestfish-actions.pod:3315
28897 "This command is the same as L</ntfsresize> except that it allows you to "
28898 "specify the new size (in bytes) explicitly."
28903 #: ../fish/guestfish-actions.pod:3318
28909 #: ../fish/guestfish-actions.pod:3320
28912 " part-add device prlogex startsect endsect\n"
28918 #: ../fish/guestfish-actions.pod:3322
28920 "This command adds a partition to C<device>. If there is no partition table "
28921 "on the device, call L</part-init> first."
28926 #: ../fish/guestfish-actions.pod:3334
28928 "Creating a partition which covers the whole disk is not so easy. Use L</"
28929 "part-disk> to do that."
28934 #: ../fish/guestfish-actions.pod:3337
28940 #: ../fish/guestfish-actions.pod:3339
28943 " part-del device partnum\n"
28949 #: ../fish/guestfish-actions.pod:3347
28955 #: ../fish/guestfish-actions.pod:3349
28958 " part-disk device parttype\n"
28964 #: ../fish/guestfish-actions.pod:3351
28966 "This command is simply a combination of L</part-init> followed by L</part-"
28967 "add> to create a single primary partition covering the whole disk."
28972 #: ../fish/guestfish-actions.pod:3355
28974 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
28975 "possible values are described in L</part-init>."
28980 #: ../fish/guestfish-actions.pod:3361
28981 msgid "part-get-bootable"
28986 #: ../fish/guestfish-actions.pod:3363
28989 " part-get-bootable device partnum\n"
28995 #: ../fish/guestfish-actions.pod:3368
28996 msgid "See also L</part-set-bootable>."
29001 #: ../fish/guestfish-actions.pod:3370
29002 msgid "part-get-mbr-id"
29007 #: ../fish/guestfish-actions.pod:3372
29010 " part-get-mbr-id device partnum\n"
29016 #: ../fish/guestfish-actions.pod:3377 ../fish/guestfish-actions.pod:3515
29018 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
29019 "undefined results for other partition table types (see L</part-get-"
29025 #: ../fish/guestfish-actions.pod:3381
29026 msgid "part-get-parttype"
29031 #: ../fish/guestfish-actions.pod:3383
29034 " part-get-parttype device\n"
29040 #: ../fish/guestfish-actions.pod:3388
29042 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
29043 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
29044 "possible, although unusual. See L</part-init> for a full list."
29049 #: ../fish/guestfish-actions.pod:3393
29055 #: ../fish/guestfish-actions.pod:3395
29058 " part-init device parttype\n"
29064 #: ../fish/guestfish-actions.pod:3401
29066 "Initially there are no partitions. Following this, you should call L</part-"
29067 "add> for each partition required."
29072 #: ../fish/guestfish-actions.pod:3464
29078 #: ../fish/guestfish-actions.pod:3466
29081 " part-list device\n"
29087 #: ../fish/guestfish-actions.pod:3481
29089 "Start of the partition I<in bytes>. To get sectors you have to divide by "
29090 "the device's sector size, see L</blockdev-getss>."
29095 #: ../fish/guestfish-actions.pod:3494
29096 msgid "part-set-bootable"
29101 #: ../fish/guestfish-actions.pod:3496
29104 " part-set-bootable device partnum true|false\n"
29110 #: ../fish/guestfish-actions.pod:3505
29111 msgid "part-set-mbr-id"
29116 #: ../fish/guestfish-actions.pod:3507
29119 " part-set-mbr-id device partnum idbyte\n"
29125 #: ../fish/guestfish-actions.pod:3519
29126 msgid "part-set-name"
29131 #: ../fish/guestfish-actions.pod:3521
29134 " part-set-name device partnum name\n"
29140 #: ../fish/guestfish-actions.pod:3529
29141 msgid "part-to-dev"
29146 #: ../fish/guestfish-actions.pod:3531
29149 " part-to-dev partition\n"
29155 #: ../fish/guestfish-actions.pod:3537
29157 "The named partition must exist, for example as a string returned from L</"
29158 "list-partitions>."
29163 #: ../fish/guestfish-actions.pod:3540
29164 msgid "ping-daemon"
29169 #: ../fish/guestfish-actions.pod:3542
29178 #: ../fish/guestfish-actions.pod:3549
29184 #: ../fish/guestfish-actions.pod:3551
29187 " pread path count offset\n"
29193 #: ../fish/guestfish-actions.pod:3559
29194 msgid "See also L</pwrite>, L</pread-device>."
29199 #: ../fish/guestfish-actions.pod:3564
29200 msgid "pread-device"
29205 #: ../fish/guestfish-actions.pod:3566
29208 " pread-device device count offset\n"
29214 #: ../fish/guestfish-actions.pod:3574
29215 msgid "See also L</pread>."
29220 #: ../fish/guestfish-actions.pod:3579
29226 #: ../fish/guestfish-actions.pod:3581
29229 " pvcreate device\n"
29235 #: ../fish/guestfish-actions.pod:3587
29241 #: ../fish/guestfish-actions.pod:3589
29244 " pvremove device\n"
29250 #: ../fish/guestfish-actions.pod:3598
29256 #: ../fish/guestfish-actions.pod:3600
29259 " pvresize device\n"
29265 #: ../fish/guestfish-actions.pod:3605
29266 msgid "pvresize-size"
29271 #: ../fish/guestfish-actions.pod:3607
29274 " pvresize-size device size\n"
29280 #: ../fish/guestfish-actions.pod:3609
29282 "This command is the same as L</pvresize> except that it allows you to "
29283 "specify the new size (in bytes) explicitly."
29288 #: ../fish/guestfish-actions.pod:3612
29294 #: ../fish/guestfish-actions.pod:3614
29303 #: ../fish/guestfish-actions.pod:3622
29304 msgid "See also L</pvs-full>."
29309 #: ../fish/guestfish-actions.pod:3624
29315 #: ../fish/guestfish-actions.pod:3626
29324 #: ../fish/guestfish-actions.pod:3631
29330 #: ../fish/guestfish-actions.pod:3633
29339 #: ../fish/guestfish-actions.pod:3637
29345 #: ../fish/guestfish-actions.pod:3639
29348 " pwrite path content offset\n"
29354 #: ../fish/guestfish-actions.pod:3650
29355 msgid "See also L</pread>, L</pwrite-device>."
29360 #: ../fish/guestfish-actions.pod:3655
29361 msgid "pwrite-device"
29366 #: ../fish/guestfish-actions.pod:3657
29369 " pwrite-device device content offset\n"
29375 #: ../fish/guestfish-actions.pod:3667
29376 msgid "See also L</pwrite>."
29381 #: ../fish/guestfish-actions.pod:3672
29387 #: ../fish/guestfish-actions.pod:3674
29390 " read-file path\n"
29396 #: ../fish/guestfish-actions.pod:3679
29398 "Unlike L</cat>, this function can correctly handle files that contain "
29399 "embedded ASCII NUL characters. However unlike L</download>, this function "
29400 "is limited in the total size of file that can be handled."
29405 #: ../fish/guestfish-actions.pod:3687
29411 #: ../fish/guestfish-actions.pod:3689
29414 " read-lines path\n"
29420 #: ../fish/guestfish-actions.pod:3696
29422 "Note that this function cannot correctly handle binary files (specifically, "
29423 "files containing C<\\0> character which is treated as end of line). For "
29424 "those you need to use the L</read-file> function which has a more complex "
29430 #: ../fish/guestfish-actions.pod:3701
29436 #: ../fish/guestfish-actions.pod:3703
29445 #: ../fish/guestfish-actions.pod:3755
29447 "This function is primarily intended for use by programs. To get a simple "
29448 "list of names, use L</ls>. To get a printable directory for human "
29449 "consumption, use L</ll>."
29454 #: ../fish/guestfish-actions.pod:3759
29460 #: ../fish/guestfish-actions.pod:3761
29469 #: ../fish/guestfish-actions.pod:3765
29470 msgid "readlinklist"
29475 #: ../fish/guestfish-actions.pod:3767
29478 " readlinklist path 'names ...'\n"
29484 #: ../fish/guestfish-actions.pod:3791
29490 #: ../fish/guestfish-actions.pod:3793
29499 #: ../fish/guestfish-actions.pod:3798
29500 msgid "removexattr"
29505 #: ../fish/guestfish-actions.pod:3800
29508 " removexattr xattr path\n"
29514 #: ../fish/guestfish-actions.pod:3805
29515 msgid "See also: L</lremovexattr>, L<attr(5)>."
29520 #: ../fish/guestfish-actions.pod:3807
29526 #: ../fish/guestfish-actions.pod:3809
29529 " resize2fs device\n"
29535 #: ../fish/guestfish-actions.pod:3814
29537 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
29538 "before calling this command. For unknown reasons C<resize2fs> sometimes "
29539 "gives an error about this and sometimes not. In any case, it is always safe "
29540 "to call L</e2fsck-f> before calling this function."
29544 #: ../fish/guestfish-actions.pod:3820
29545 msgid "resize2fs-M"
29549 #: ../fish/guestfish-actions.pod:3822
29552 " resize2fs-M device\n"
29557 #: ../fish/guestfish-actions.pod:3824
29559 "This command is the same as L</resize2fs>, but the filesystem is resized to "
29560 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
29565 #: ../fish/guestfish-actions.pod:3828
29567 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
29568 "and read the C<Block size> and C<Block count> values. These two numbers, "
29569 "multiplied together, give the resulting size of the minimal filesystem in "
29575 #: ../fish/guestfish-actions.pod:3833
29576 msgid "resize2fs-size"
29581 #: ../fish/guestfish-actions.pod:3835
29584 " resize2fs-size device size\n"
29590 #: ../fish/guestfish-actions.pod:3837
29592 "This command is the same as L</resize2fs> except that it allows you to "
29593 "specify the new size (in bytes) explicitly."
29598 #: ../fish/guestfish-actions.pod:3840
29604 #: ../fish/guestfish-actions.pod:3842
29613 #: ../fish/guestfish-actions.pod:3846
29619 #: ../fish/guestfish-actions.pod:3848
29628 #: ../fish/guestfish-actions.pod:3854
29634 #: ../fish/guestfish-actions.pod:3856
29643 #: ../fish/guestfish-actions.pod:3860
29644 msgid "rmmountpoint"
29649 #: ../fish/guestfish-actions.pod:3862
29652 " rmmountpoint exemptpath\n"
29658 #: ../fish/guestfish-actions.pod:3864
29660 "This calls removes a mountpoint that was previously created with L</"
29661 "mkmountpoint>. See L</mkmountpoint> for full details."
29666 #: ../fish/guestfish-actions.pod:3868
29667 msgid "scrub-device"
29672 #: ../fish/guestfish-actions.pod:3870
29675 " scrub-device device\n"
29681 #: ../fish/guestfish-actions.pod:3881
29687 #: ../fish/guestfish-actions.pod:3883
29690 " scrub-file file\n"
29696 #: ../fish/guestfish-actions.pod:3893
29697 msgid "scrub-freespace"
29702 #: ../fish/guestfish-actions.pod:3895
29705 " scrub-freespace dir\n"
29711 #: ../fish/guestfish-actions.pod:3897
29713 "This command creates the directory C<dir> and then fills it with files until "
29714 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
29715 "deletes them. The intention is to scrub any free space on the partition "
29716 "containing C<dir>."
29721 #: ../fish/guestfish-actions.pod:3906
29727 #: ../fish/guestfish-actions.pod:3908
29733 #: ../fish/guestfish-actions.pod:3910
29736 " set-append append\n"
29741 #: ../fish/guestfish-actions.pod:3921
29742 msgid "set-attach-method"
29746 #: ../fish/guestfish-actions.pod:3923
29747 msgid "attach-method"
29751 #: ../fish/guestfish-actions.pod:3925
29754 " set-attach-method attachmethod\n"
29760 #: ../fish/guestfish-actions.pod:3947
29761 msgid "set-autosync"
29766 #: ../fish/guestfish-actions.pod:3949
29772 #: ../fish/guestfish-actions.pod:3951
29775 " set-autosync true|false\n"
29781 #: ../fish/guestfish-actions.pod:3961
29787 #: ../fish/guestfish-actions.pod:3963
29793 #: ../fish/guestfish-actions.pod:3965
29796 " set-direct true|false\n"
29802 #: ../fish/guestfish-actions.pod:3971
29804 "One consequence of this is that log messages aren't caught by the library "
29805 "and handled by L</set-log-message-callback>, but go straight to stdout."
29810 #: ../fish/guestfish-actions.pod:3980
29811 msgid "set-e2label"
29816 #: ../fish/guestfish-actions.pod:3982
29819 " set-e2label device label\n"
29825 #: ../fish/guestfish-actions.pod:3988
29827 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
29828 "label on a filesystem."
29833 #: ../fish/guestfish-actions.pod:3991
29839 #: ../fish/guestfish-actions.pod:3993
29842 " set-e2uuid device uuid\n"
29848 #: ../fish/guestfish-actions.pod:4000
29850 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
29851 "UUID of a filesystem."
29856 #: ../fish/guestfish-actions.pod:4003
29857 msgid "set-memsize"
29862 #: ../fish/guestfish-actions.pod:4005
29868 #: ../fish/guestfish-actions.pod:4007
29871 " set-memsize memsize\n"
29877 #: ../fish/guestfish-actions.pod:4009
29879 "This sets the memory size in megabytes allocated to the qemu subprocess. "
29880 "This only has any effect if called before L</launch>."
29885 #: ../fish/guestfish-actions.pod:4020
29886 msgid "set-network"
29891 #: ../fish/guestfish-actions.pod:4022
29897 #: ../fish/guestfish-actions.pod:4024
29900 " set-network true|false\n"
29906 #: ../fish/guestfish-actions.pod:4032
29908 "You must call this before calling L</launch>, otherwise it has no effect."
29913 #: ../fish/guestfish-actions.pod:4035
29919 #: ../fish/guestfish-actions.pod:4037
29925 #: ../fish/guestfish-actions.pod:4039
29928 " set-path searchpath\n"
29934 #: ../fish/guestfish-actions.pod:4048
29940 #: ../fish/guestfish-actions.pod:4050
29946 #: ../fish/guestfish-actions.pod:4052
29955 #: ../fish/guestfish-actions.pod:4072
29956 msgid "set-recovery-proc"
29961 #: ../fish/guestfish-actions.pod:4074
29962 msgid "recovery-proc"
29967 #: ../fish/guestfish-actions.pod:4076
29970 " set-recovery-proc true|false\n"
29976 #: ../fish/guestfish-actions.pod:4078
29978 "If this is called with the parameter C<false> then L</launch> does not "
29979 "create a recovery process. The purpose of the recovery process is to stop "
29980 "runaway qemu processes in the case where the main program aborts abruptly."
29985 #: ../fish/guestfish-actions.pod:4083
29987 "This only has any effect if called before L</launch>, and the default is "
29993 #: ../fish/guestfish-actions.pod:4092
29994 msgid "set-selinux"
29999 #: ../fish/guestfish-actions.pod:4094
30005 #: ../fish/guestfish-actions.pod:4096
30008 " set-selinux true|false\n"
30014 #: ../fish/guestfish-actions.pod:4107
30020 #: ../fish/guestfish-actions.pod:4109
30026 #: ../fish/guestfish-actions.pod:4111
30029 " set-trace true|false\n"
30034 #: ../fish/guestfish-actions.pod:4123
30036 "Trace messages are normally sent to C<stderr>, unless you register a "
30037 "callback to send them somewhere else (see L</set-event-callback>)."
30042 #: ../fish/guestfish-actions.pod:4127
30043 msgid "set-verbose"
30048 #: ../fish/guestfish-actions.pod:4129
30054 #: ../fish/guestfish-actions.pod:4131
30057 " set-verbose true|false\n"
30062 #: ../fish/guestfish-actions.pod:4138
30064 "Verbose messages are normally sent to C<stderr>, unless you register a "
30065 "callback to send them somewhere else (see L</set-event-callback>)."
30070 #: ../fish/guestfish-actions.pod:4142
30076 #: ../fish/guestfish-actions.pod:4144
30079 " setcon context\n"
30085 #: ../fish/guestfish-actions.pod:4151
30091 #: ../fish/guestfish-actions.pod:4153
30094 " setxattr xattr val vallen path\n"
30100 #: ../fish/guestfish-actions.pod:4159
30101 msgid "See also: L</lsetxattr>, L<attr(5)>."
30106 #: ../fish/guestfish-actions.pod:4161
30112 #: ../fish/guestfish-actions.pod:4163
30115 " sfdisk device cyls heads sectors 'lines ...'\n"
30121 #: ../fish/guestfish-actions.pod:4185
30122 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
30127 #: ../fish/guestfish-actions.pod:4198
30133 #: ../fish/guestfish-actions.pod:4200
30136 " sfdiskM device 'lines ...'\n"
30142 #: ../fish/guestfish-actions.pod:4202
30144 "This is a simplified interface to the L</sfdisk> command, where partition "
30145 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
30146 "you don't need to specify the cyls, heads and sectors parameters which were "
30147 "rarely if ever used anyway."
30152 #: ../fish/guestfish-actions.pod:4208
30153 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
30158 #: ../fish/guestfish-actions.pod:4221
30164 #: ../fish/guestfish-actions.pod:4223
30167 " sfdisk-N device partnum cyls heads sectors line\n"
30173 #: ../fish/guestfish-actions.pod:4228
30175 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
30176 "cyls/heads/sectors parameters."
30181 #: ../fish/guestfish-actions.pod:4231
30182 msgid "See also: L</part-add>"
30187 #: ../fish/guestfish-actions.pod:4243
30188 msgid "sfdisk-disk-geometry"
30193 #: ../fish/guestfish-actions.pod:4245
30196 " sfdisk-disk-geometry device\n"
30202 #: ../fish/guestfish-actions.pod:4247
30204 "This displays the disk geometry of C<device> read from the partition table. "
30205 "Especially in the case where the underlying block device has been resized, "
30206 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
30207 "kernel-geometry>)."
30212 #: ../fish/guestfish-actions.pod:4255
30213 msgid "sfdisk-kernel-geometry"
30218 #: ../fish/guestfish-actions.pod:4257
30221 " sfdisk-kernel-geometry device\n"
30227 #: ../fish/guestfish-actions.pod:4264
30233 #: ../fish/guestfish-actions.pod:4266
30236 " sfdisk-l device\n"
30242 #: ../fish/guestfish-actions.pod:4272
30243 msgid "See also: L</part-list>"
30248 #: ../fish/guestfish-actions.pod:4281
30254 #: ../fish/guestfish-actions.pod:4283
30263 #: ../fish/guestfish-actions.pod:4288
30264 msgid "This is like L</command>, but passes the command to:"
30269 #: ../fish/guestfish-actions.pod:4296
30270 msgid "All the provisos about L</command> apply to this call."
30275 #: ../fish/guestfish-actions.pod:4298
30281 #: ../fish/guestfish-actions.pod:4300
30284 " sh-lines command\n"
30290 #: ../fish/guestfish-actions.pod:4302
30291 msgid "This is the same as L</sh>, but splits the result into a list of lines."
30296 #: ../fish/guestfish-actions.pod:4305
30297 msgid "See also: L</command-lines>"
30302 #: ../fish/guestfish-actions.pod:4307
30308 #: ../fish/guestfish-actions.pod:4309
30317 #: ../fish/guestfish-actions.pod:4313
30323 #: ../fish/guestfish-actions.pod:4315
30332 #: ../fish/guestfish-actions.pod:4321
30338 #: ../fish/guestfish-actions.pod:4323
30347 #: ../fish/guestfish-actions.pod:4331
30353 #: ../fish/guestfish-actions.pod:4333
30362 #: ../fish/guestfish-actions.pod:4341
30368 #: ../fish/guestfish-actions.pod:4343
30371 " strings-e encoding path\n"
30377 #: ../fish/guestfish-actions.pod:4345
30379 "This is like the L</strings> command, but allows you to specify the encoding "
30380 "of strings that are looked for in the source file C<path>."
30385 #: ../fish/guestfish-actions.pod:4355
30387 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
30388 "ISO-8859-X (this is what L</strings> uses)."
30393 #: ../fish/guestfish-actions.pod:4387
30394 msgid "swapoff-device"
30399 #: ../fish/guestfish-actions.pod:4389
30402 " swapoff-device device\n"
30408 #: ../fish/guestfish-actions.pod:4391
30410 "This command disables the libguestfs appliance swap device or partition "
30411 "named C<device>. See L</swapon-device>."
30416 #: ../fish/guestfish-actions.pod:4395
30417 msgid "swapoff-file"
30422 #: ../fish/guestfish-actions.pod:4397
30425 " swapoff-file file\n"
30431 #: ../fish/guestfish-actions.pod:4401
30432 msgid "swapoff-label"
30437 #: ../fish/guestfish-actions.pod:4403
30440 " swapoff-label label\n"
30446 #: ../fish/guestfish-actions.pod:4408
30447 msgid "swapoff-uuid"
30452 #: ../fish/guestfish-actions.pod:4410
30455 " swapoff-uuid uuid\n"
30461 #: ../fish/guestfish-actions.pod:4415
30462 msgid "swapon-device"
30467 #: ../fish/guestfish-actions.pod:4417
30470 " swapon-device device\n"
30476 #: ../fish/guestfish-actions.pod:4419
30478 "This command enables the libguestfs appliance to use the swap device or "
30479 "partition named C<device>. The increased memory is made available for all "
30480 "commands, for example those run using L</command> or L</sh>."
30485 #: ../fish/guestfish-actions.pod:4431
30486 msgid "swapon-file"
30491 #: ../fish/guestfish-actions.pod:4433
30494 " swapon-file file\n"
30500 #: ../fish/guestfish-actions.pod:4435
30502 "This command enables swap to a file. See L</swapon-device> for other notes."
30507 #: ../fish/guestfish-actions.pod:4438
30508 msgid "swapon-label"
30513 #: ../fish/guestfish-actions.pod:4440
30516 " swapon-label label\n"
30522 #: ../fish/guestfish-actions.pod:4442
30524 "This command enables swap to a labeled swap partition. See L</swapon-"
30525 "device> for other notes."
30530 #: ../fish/guestfish-actions.pod:4445
30531 msgid "swapon-uuid"
30536 #: ../fish/guestfish-actions.pod:4447
30539 " swapon-uuid uuid\n"
30545 #: ../fish/guestfish-actions.pod:4449
30547 "This command enables swap to a swap partition with the given UUID. See L</"
30548 "swapon-device> for other notes."
30553 #: ../fish/guestfish-actions.pod:4452
30559 #: ../fish/guestfish-actions.pod:4454
30568 #: ../fish/guestfish-actions.pod:4462
30574 #: ../fish/guestfish-actions.pod:4464
30583 #: ../fish/guestfish-actions.pod:4472
30589 #: ../fish/guestfish-actions.pod:4474
30592 " tail-n nrlines path\n"
30598 #: ../fish/guestfish-actions.pod:4487
30604 #: ../fish/guestfish-actions.pod:4489
30607 " tar-in (tarfile|-) directory\n"
30613 #: ../fish/guestfish-actions.pod:4494
30614 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
30619 #: ../fish/guestfish-actions.pod:4499
30625 #: ../fish/guestfish-actions.pod:4501
30628 " tar-out directory (tarfile|-)\n"
30634 #: ../fish/guestfish-actions.pod:4506
30635 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
30640 #: ../fish/guestfish-actions.pod:4511
30646 #: ../fish/guestfish-actions.pod:4513
30649 " tgz-in (tarball|-) directory\n"
30655 #: ../fish/guestfish-actions.pod:4518
30656 msgid "To upload an uncompressed tarball, use L</tar-in>."
30661 #: ../fish/guestfish-actions.pod:4522
30667 #: ../fish/guestfish-actions.pod:4524
30670 " tgz-out directory (tarball|-)\n"
30676 #: ../fish/guestfish-actions.pod:4529
30677 msgid "To download an uncompressed tarball, use L</tar-out>."
30682 #: ../fish/guestfish-actions.pod:4533
30688 #: ../fish/guestfish-actions.pod:4535
30697 #: ../fish/guestfish-actions.pod:4544
30703 #: ../fish/guestfish-actions.pod:4546
30712 #: ../fish/guestfish-actions.pod:4551
30713 msgid "truncate-size"
30718 #: ../fish/guestfish-actions.pod:4553
30721 " truncate-size path size\n"
30727 #: ../fish/guestfish-actions.pod:4558
30729 "If the current file size is less than C<size> then the file is extended to "
30730 "the required size with zero bytes. This creates a sparse file (ie. disk "
30731 "blocks are not allocated for the file until you write to it). To create a "
30732 "non-sparse file of zeroes, use L</fallocate64> instead."
30737 #: ../fish/guestfish-actions.pod:4564
30743 #: ../fish/guestfish-actions.pod:4566
30746 " tune2fs-l device\n"
30752 #: ../fish/guestfish-actions.pod:4576
30758 #: ../fish/guestfish-actions.pod:4578
30761 " txz-in (tarball|-) directory\n"
30767 #: ../fish/guestfish-actions.pod:4585
30773 #: ../fish/guestfish-actions.pod:4587
30776 " txz-out directory (tarball|-)\n"
30782 #: ../fish/guestfish-actions.pod:4594
30788 #: ../fish/guestfish-actions.pod:4596
30797 #: ../fish/guestfish-actions.pod:4610
30798 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
30803 #: ../fish/guestfish-actions.pod:4615
30809 #: ../fish/guestfish-actions.pod:4617
30815 #: ../fish/guestfish-actions.pod:4619
30818 " umount pathordevice\n"
30824 #: ../fish/guestfish-actions.pod:4625
30830 #: ../fish/guestfish-actions.pod:4627
30831 msgid "unmount-all"
30836 #: ../fish/guestfish-actions.pod:4629
30845 #: ../fish/guestfish-actions.pod:4635
30851 #: ../fish/guestfish-actions.pod:4637
30854 " upload (filename|-) remotefilename\n"
30860 #: ../fish/guestfish-actions.pod:4644
30861 msgid "See also L</download>."
30866 #: ../fish/guestfish-actions.pod:4648
30867 msgid "upload-offset"
30872 #: ../fish/guestfish-actions.pod:4650
30875 " upload-offset (filename|-) remotefilename offset\n"
30881 #: ../fish/guestfish-actions.pod:4662
30883 "Note that there is no limit on the amount of data that can be uploaded with "
30884 "this call, unlike with L</pwrite>, and this call always writes the full "
30885 "amount unless an error occurs."
30890 #: ../fish/guestfish-actions.pod:4667
30891 msgid "See also L</upload>, L</pwrite>."
30896 #: ../fish/guestfish-actions.pod:4671
30902 #: ../fish/guestfish-actions.pod:4673
30905 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
30911 #: ../fish/guestfish-actions.pod:4692
30917 #: ../fish/guestfish-actions.pod:4694
30926 #: ../fish/guestfish-actions.pod:4721
30928 "I<Note:> Don't use this call to test for availability of features. In "
30929 "enterprise distributions we backport features from later versions into "
30930 "earlier versions, making this an unreliable way to test for features. Use "
30931 "L</available> instead."
30936 #: ../fish/guestfish-actions.pod:4727
30942 #: ../fish/guestfish-actions.pod:4729
30945 " vfs-label device\n"
30951 #: ../fish/guestfish-actions.pod:4736
30952 msgid "To find a filesystem from the label, use L</findfs-label>."
30957 #: ../fish/guestfish-actions.pod:4738
30963 #: ../fish/guestfish-actions.pod:4740
30966 " vfs-type device\n"
30972 #: ../fish/guestfish-actions.pod:4750
30978 #: ../fish/guestfish-actions.pod:4752
30981 " vfs-uuid device\n"
30987 #: ../fish/guestfish-actions.pod:4759
30988 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
30993 #: ../fish/guestfish-actions.pod:4761
30994 msgid "vg-activate"
30999 #: ../fish/guestfish-actions.pod:4763
31002 " vg-activate true|false 'volgroups ...'\n"
31008 #: ../fish/guestfish-actions.pod:4776
31009 msgid "vg-activate-all"
31014 #: ../fish/guestfish-actions.pod:4778
31017 " vg-activate-all true|false\n"
31023 #: ../fish/guestfish-actions.pod:4788
31029 #: ../fish/guestfish-actions.pod:4790
31032 " vgcreate volgroup 'physvols ...'\n"
31038 #: ../fish/guestfish-actions.pod:4795
31044 #: ../fish/guestfish-actions.pod:4797
31047 " vglvuuids vgname\n"
31053 #: ../fish/guestfish-actions.pod:4802
31055 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
31056 "logical volumes and volume groups."
31061 #: ../fish/guestfish-actions.pod:4805
31062 msgid "See also L</vgpvuuids>."
31067 #: ../fish/guestfish-actions.pod:4807
31073 #: ../fish/guestfish-actions.pod:4809
31076 " vgpvuuids vgname\n"
31082 #: ../fish/guestfish-actions.pod:4814
31084 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
31085 "physical volumes and volume groups."
31090 #: ../fish/guestfish-actions.pod:4817
31091 msgid "See also L</vglvuuids>."
31096 #: ../fish/guestfish-actions.pod:4819
31102 #: ../fish/guestfish-actions.pod:4821
31105 " vgremove vgname\n"
31111 #: ../fish/guestfish-actions.pod:4828
31117 #: ../fish/guestfish-actions.pod:4830
31120 " vgrename volgroup newvolgroup\n"
31126 #: ../fish/guestfish-actions.pod:4834
31132 #: ../fish/guestfish-actions.pod:4836
31141 #: ../fish/guestfish-actions.pod:4844
31142 msgid "See also L</vgs-full>."
31147 #: ../fish/guestfish-actions.pod:4846
31153 #: ../fish/guestfish-actions.pod:4848
31162 #: ../fish/guestfish-actions.pod:4853
31168 #: ../fish/guestfish-actions.pod:4855
31177 #: ../fish/guestfish-actions.pod:4860
31183 #: ../fish/guestfish-actions.pod:4862
31192 #: ../fish/guestfish-actions.pod:4866
31198 #: ../fish/guestfish-actions.pod:4868
31207 #: ../fish/guestfish-actions.pod:4873
31213 #: ../fish/guestfish-actions.pod:4875
31222 #: ../fish/guestfish-actions.pod:4880
31228 #: ../fish/guestfish-actions.pod:4882
31237 #: ../fish/guestfish-actions.pod:4887
31243 #: ../fish/guestfish-actions.pod:4889
31246 " write path content\n"
31252 #: ../fish/guestfish-actions.pod:4897
31258 #: ../fish/guestfish-actions.pod:4899
31261 " write-file path content size\n"
31267 #: ../fish/guestfish-actions.pod:4922
31273 #: ../fish/guestfish-actions.pod:4924
31276 " zegrep regex path\n"
31282 #: ../fish/guestfish-actions.pod:4932
31288 #: ../fish/guestfish-actions.pod:4934
31291 " zegrepi regex path\n"
31297 #: ../fish/guestfish-actions.pod:4942
31303 #: ../fish/guestfish-actions.pod:4944
31311 #: ../fish/guestfish-actions.pod:4952
31312 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
31317 #: ../fish/guestfish-actions.pod:4955
31318 msgid "zero-device"
31323 #: ../fish/guestfish-actions.pod:4957
31326 " zero-device device\n"
31332 #: ../fish/guestfish-actions.pod:4959
31334 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
31335 "which just zeroes the first few blocks of a device."
31340 #: ../fish/guestfish-actions.pod:4966
31346 #: ../fish/guestfish-actions.pod:4968
31349 " zerofree device\n"
31355 #: ../fish/guestfish-actions.pod:4981
31361 #: ../fish/guestfish-actions.pod:4983
31364 " zfgrep pattern path\n"
31370 #: ../fish/guestfish-actions.pod:4991
31376 #: ../fish/guestfish-actions.pod:4993
31379 " zfgrepi pattern path\n"
31385 #: ../fish/guestfish-actions.pod:5001
31391 #: ../fish/guestfish-actions.pod:5003
31394 " zfile meth path\n"
31400 #: ../fish/guestfish-actions.pod:5010
31402 "Since 1.0.63, use L</file> instead which can now process compressed files."
31407 #: ../fish/guestfish-actions.pod:5020
31413 #: ../fish/guestfish-actions.pod:5022
31416 " zgrep regex path\n"
31422 #: ../fish/guestfish-actions.pod:5030
31428 #: ../fish/guestfish-actions.pod:5032
31431 " zgrepi regex path\n"
31437 #: ../fish/guestfish-commands.pod:1
31443 #: ../fish/guestfish-commands.pod:3
31449 #: ../fish/guestfish-commands.pod:5
31452 " alloc filename size\n"
31458 #: ../fish/guestfish-commands.pod:7
31460 "This creates an empty (zeroed) file of the given size, and then adds so it "
31461 "can be further examined."
31466 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
31467 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
31472 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
31473 msgid "Size can be specified using standard suffixes, eg. C<1M>."
31478 #: ../fish/guestfish-commands.pod:14
31480 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
31481 "image, see L</PREPARED DISK IMAGES>."
31486 #: ../fish/guestfish-commands.pod:17
31492 #: ../fish/guestfish-commands.pod:19
31495 " copy-in local [local ...] /remotedir\n"
31501 #: ../fish/guestfish-commands.pod:21
31503 "C<copy-in> copies local files or directories recursively into the disk "
31504 "image, placing them in the directory called C</remotedir> (which must "
31505 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
31506 "other commands as necessary."
31511 #: ../fish/guestfish-commands.pod:26
31513 "Multiple local files and directories can be specified, but the last "
31514 "parameter must always be a remote directory. Wildcards cannot be used."
31519 #: ../fish/guestfish-commands.pod:30
31525 #: ../fish/guestfish-commands.pod:32
31528 " copy-out remote [remote ...] localdir\n"
31534 #: ../fish/guestfish-commands.pod:34
31536 "C<copy-out> copies remote files or directories recursively out of the disk "
31537 "image, placing them on the host disk in a local directory called C<localdir> "
31538 "(which must exist). This guestfish meta-command turns into a sequence of L</"
31539 "download>, L</tar-out> and other commands as necessary."
31544 #: ../fish/guestfish-commands.pod:40
31546 "Multiple remote files and directories can be specified, but the last "
31547 "parameter must always be a local directory. To download to the current "
31548 "directory, use C<.> as in:"
31553 #: ../fish/guestfish-commands.pod:44
31556 " copy-out /home .\n"
31562 #: ../fish/guestfish-commands.pod:46
31564 "Wildcards cannot be used in the ordinary command, but you can use them with "
31565 "the help of L</glob> like this:"
31570 #: ../fish/guestfish-commands.pod:49
31573 " glob copy-out /home/* .\n"
31579 #: ../fish/guestfish-commands.pod:51
31585 #: ../fish/guestfish-commands.pod:53
31588 " echo [params ...]\n"
31594 #: ../fish/guestfish-commands.pod:55
31595 msgid "This echos the parameters to the terminal."
31600 #: ../fish/guestfish-commands.pod:57
31606 #: ../fish/guestfish-commands.pod:59
31612 #: ../fish/guestfish-commands.pod:61
31618 #: ../fish/guestfish-commands.pod:63
31627 #: ../fish/guestfish-commands.pod:65
31629 "This is used to edit a file. It downloads the file, edits it locally using "
31630 "your editor, then uploads the result."
31635 #: ../fish/guestfish-commands.pod:68
31637 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
31638 "or C<emacs> you will get those corresponding editors."
31643 #: ../fish/guestfish-commands.pod:72
31649 #: ../fish/guestfish-commands.pod:74
31652 " glob command args...\n"
31658 #: ../fish/guestfish-commands.pod:76
31660 "Expand wildcards in any paths in the args list, and run C<command> "
31661 "repeatedly on each matching path."
31666 #: ../fish/guestfish-commands.pod:79
31667 msgid "See L</WILDCARDS AND GLOBBING>."
31672 #: ../fish/guestfish-commands.pod:81
31678 #: ../fish/guestfish-commands.pod:83
31681 " hexedit <filename|device>\n"
31682 " hexedit <filename|device> <max>\n"
31683 " hexedit <filename|device> <start> <max>\n"
31689 #: ../fish/guestfish-commands.pod:87
31691 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
31697 #: ../fish/guestfish-commands.pod:90
31699 "This command works by downloading potentially the whole file or device, "
31700 "editing it locally, then uploading it. If the file or device is large, you "
31701 "have to specify which part you wish to edit by using C<max> and/or C<start> "
31702 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
31703 "usual modifiers allowed such as C<1M> (1 megabyte)."
31708 #: ../fish/guestfish-commands.pod:97
31709 msgid "For example to edit the first few sectors of a disk you might do:"
31714 #: ../fish/guestfish-commands.pod:100
31717 " hexedit /dev/sda 1M\n"
31723 #: ../fish/guestfish-commands.pod:102
31725 "which would allow you to edit anywhere within the first megabyte of the disk."
31730 #: ../fish/guestfish-commands.pod:105
31731 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
31736 #: ../fish/guestfish-commands.pod:107
31739 " hexedit /dev/sda1 0x400 0x400\n"
31745 #: ../fish/guestfish-commands.pod:109
31746 msgid "(assuming the superblock is in the standard location)."
31751 #: ../fish/guestfish-commands.pod:111
31753 "This command requires the external L<hexedit(1)> program. You can specify "
31754 "another program to use by setting the C<HEXEDITOR> environment variable."
31759 #: ../fish/guestfish-commands.pod:115
31760 msgid "See also L</hexdump>."
31765 #: ../fish/guestfish-commands.pod:117
31771 #: ../fish/guestfish-commands.pod:119
31780 #: ../fish/guestfish-commands.pod:121
31782 "Change the local directory, ie. the current directory of guestfish itself."
31787 #: ../fish/guestfish-commands.pod:124
31788 msgid "Note that C<!cd> won't do what you might expect."
31793 #: ../fish/guestfish-commands.pod:126
31799 #: ../fish/guestfish-commands.pod:128
31805 #: ../fish/guestfish-commands.pod:130
31814 #: ../fish/guestfish-commands.pod:132
31815 msgid "Opens the manual page for guestfish."
31820 #: ../fish/guestfish-commands.pod:134
31826 #: ../fish/guestfish-commands.pod:136
31832 #: ../fish/guestfish-commands.pod:138
31841 #: ../fish/guestfish-commands.pod:140
31850 #: ../fish/guestfish-commands.pod:142
31851 msgid "This is used to view a file."
31856 #: ../fish/guestfish-commands.pod:144
31858 "The default viewer is C<$PAGER>. However if you use the alternate command "
31859 "C<less> you will get the C<less> command specifically."
31864 #: ../fish/guestfish-commands.pod:147
31870 #: ../fish/guestfish-commands.pod:149
31879 #: ../fish/guestfish-commands.pod:151
31881 "Close and reopen the libguestfs handle. It is not necessary to use this "
31882 "normally, because the handle is closed properly when guestfish exits. "
31883 "However this is occasionally useful for testing."
31888 #: ../fish/guestfish-commands.pod:155
31894 #: ../fish/guestfish-commands.pod:157
31897 " sparse filename size\n"
31903 #: ../fish/guestfish-commands.pod:159
31905 "This creates an empty sparse file of the given size, and then adds so it can "
31906 "be further examined."
31911 #: ../fish/guestfish-commands.pod:162
31913 "In all respects it works the same as the L</alloc> command, except that the "
31914 "image file is allocated sparsely, which means that disk blocks are not "
31915 "assigned to the file until they are needed. Sparse disk files only use "
31916 "space when written to, but they are slower and there is a danger you could "
31917 "run out of real disk space during a write operation."
31922 #: ../fish/guestfish-commands.pod:172
31928 #: ../fish/guestfish-commands.pod:174
31937 #: ../fish/guestfish-commands.pod:176
31939 "This command returns a list of the optional groups known to the daemon, and "
31940 "indicates which ones are supported by this build of the libguestfs appliance."
31945 #: ../fish/guestfish-commands.pod:180
31946 msgid "See also L<guestfs(3)/AVAILABILITY>."
31951 #: ../fish/guestfish-commands.pod:182
31957 #: ../fish/guestfish-commands.pod:184
31960 " time command args...\n"
31966 #: ../fish/guestfish-commands.pod:186
31968 "Run the command as usual, but print the elapsed time afterwards. This can "
31969 "be useful for benchmarking operations."
31974 #: ../test-tool/libguestfs-test-tool.pod:5
31975 msgid "libguestfs-test-tool - End user tests for libguestfs"
31980 #: ../test-tool/libguestfs-test-tool.pod:9
31983 " libguestfs-test-tool [--options]\n"
31989 #: ../test-tool/libguestfs-test-tool.pod:13
31991 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
31992 "and developers, to allow them to check basic libguestfs functionality is "
31993 "working. This is needed because libguestfs occasionally breaks for reasons "
31994 "beyond our control: usually because of changes in the underlying qemu or "
31995 "kernel packages, or the host environment."
32000 #: ../test-tool/libguestfs-test-tool.pod:20
32001 msgid "If you suspect a problem in libguestfs, then just run:"
32006 #: ../test-tool/libguestfs-test-tool.pod:22
32009 " libguestfs-test-tool\n"
32015 #: ../test-tool/libguestfs-test-tool.pod:24
32016 msgid "It will print lots of diagnostic messages."
32021 #: ../test-tool/libguestfs-test-tool.pod:26
32022 msgid "If it runs to completion successfully, you will see this near the end:"
32027 #: ../test-tool/libguestfs-test-tool.pod:28
32030 " ===== TEST FINISHED OK =====\n"
32036 #: ../test-tool/libguestfs-test-tool.pod:30
32037 msgid "and the test tool will exit with code 0."
32042 #: ../test-tool/libguestfs-test-tool.pod:32
32044 "If it fails (and/or exits with non-zero error code), please paste the "
32045 "B<complete, unedited> output of the test tool into a bug report. More "
32046 "information about reporting bugs can be found on the L<http://libguestfs.org/"
32052 #: ../test-tool/libguestfs-test-tool.pod:41
32058 #: ../test-tool/libguestfs-test-tool.pod:43
32059 msgid "Display short usage information and exit."
32064 #: ../test-tool/libguestfs-test-tool.pod:45
32065 msgid "I<--qemu qemu_binary>"
32070 #: ../test-tool/libguestfs-test-tool.pod:47
32072 "If you have downloaded another qemu binary, point this option at the full "
32073 "path of the binary to try it."
32078 #: ../test-tool/libguestfs-test-tool.pod:50
32079 msgid "I<--qemudir qemu_source_dir>"
32084 #: ../test-tool/libguestfs-test-tool.pod:52
32086 "If you have compiled qemu from source, point this option at the source "
32087 "directory to try it."
32092 #: ../test-tool/libguestfs-test-tool.pod:55
32093 msgid "I<--timeout N>"
32098 #: ../test-tool/libguestfs-test-tool.pod:57
32100 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
32101 "does not usually need to be adjusted unless your machine is very slow."
32106 #: ../test-tool/libguestfs-test-tool.pod:63
32107 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
32112 #: ../test-tool/libguestfs-test-tool.pod:65
32114 "If you have compiled another version of qemu from source and would like to "
32115 "try that, then you can use the I<--qemudir> option to point to the qemu "
32116 "source directory."
32121 #: ../test-tool/libguestfs-test-tool.pod:69
32123 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
32124 "option to point to the binary."
32129 #: ../test-tool/libguestfs-test-tool.pod:72
32131 "When using an alternate qemu with libguestfs, usually you would need to "
32132 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in L<guestfs(3)"
32133 ">). libguestfs-test-tool writes a temporary qemu wrapper script when you "
32134 "use either of the I<--qemudir> or I<--qemu> options."
32139 #: ../test-tool/libguestfs-test-tool.pod:79
32141 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
32142 "I<1> if there was an error."
32147 #: ../test-tool/libguestfs-test-tool.pod:84
32149 "For the full list of environment variables which may affect libguestfs, "
32150 "please see the L<guestfs(3)> manual page."
32155 #: ../test-tool/libguestfs-test-tool.pod:89
32156 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
32161 #: ../fuse/guestmount.pod:5
32163 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
32168 #: ../fuse/guestmount.pod:9
32171 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
32177 #: ../fuse/guestmount.pod:11
32180 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
32186 #: ../fuse/guestmount.pod:13
32189 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
32195 #: ../fuse/guestmount.pod:17
32197 "You must I<not> use C<guestmount> in read-write mode on live virtual "
32198 "machines. If you do this, you risk disk corruption in the VM."
32203 #: ../fuse/guestmount.pod:22
32205 "The guestmount program can be used to mount virtual machine filesystems and "
32206 "other disk images on the host. It uses libguestfs for access to the guest "
32207 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
32208 "a mountable device."
32213 #: ../fuse/guestmount.pod:27
32215 "Along with other options, you have to give at least one device (I<-a> "
32216 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
32217 "option) or use the I<-i> inspection option. How this works is better "
32218 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
32224 #: ../fuse/guestmount.pod:33
32226 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
32227 "by you, and the filesystem will not be visible to any other users unless you "
32228 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
32229 "the filesystem, use the C<fusermount -u> command."
32234 #: ../fuse/guestmount.pod:41
32236 "For a typical Windows guest which has its main filesystem on the first "
32242 #: ../fuse/guestmount.pod:44
32245 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
32251 #: ../fuse/guestmount.pod:46
32253 "For a typical Linux guest which has a /boot filesystem on the first "
32254 "partition, and the root filesystem on a logical volume:"
32259 #: ../fuse/guestmount.pod:49
32262 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
32268 #: ../fuse/guestmount.pod:51
32269 msgid "To get libguestfs to detect guest mountpoints for you:"
32274 #: ../fuse/guestmount.pod:53
32277 " guestmount -a guest.img -i --ro /mnt\n"
32283 #: ../fuse/guestmount.pod:55
32284 msgid "For a libvirt guest called \"Guest\" you could do:"
32289 #: ../fuse/guestmount.pod:57
32292 " guestmount -d Guest -i --ro /mnt\n"
32298 #: ../fuse/guestmount.pod:59
32300 "If you don't know what filesystems are contained in a guest or disk image, "
32301 "use L<virt-filesystems(1)> first:"
32306 #: ../fuse/guestmount.pod:62
32309 " virt-filesystems MyGuest\n"
32315 #: ../fuse/guestmount.pod:64
32317 "If you want to trace the libguestfs calls but without excessive debugging "
32318 "information, we recommend:"
32323 #: ../fuse/guestmount.pod:67
32326 " guestmount [...] --trace /mnt\n"
32332 #: ../fuse/guestmount.pod:69
32333 msgid "If you want to debug the program, we recommend:"
32338 #: ../fuse/guestmount.pod:71
32341 " guestmount [...] --trace --verbose /mnt\n"
32346 #: ../fuse/guestmount.pod:73
32351 #: ../fuse/guestmount.pod:75
32352 msgid "Other users cannot see the filesystem by default"
32356 #: ../fuse/guestmount.pod:77
32358 "If you mount a filesystem as one user (eg. root), then other users will not "
32359 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
32360 "option when mounting:"
32364 #: ../fuse/guestmount.pod:81
32367 " sudo guestmount [...] -o allow_other /mnt\n"
32373 #: ../fuse/guestmount.pod:87
32374 msgid "B<-a image> | B<--add image>"
32379 #: ../fuse/guestmount.pod:89
32380 msgid "Add a block device or virtual machine image."
32385 #: ../fuse/guestmount.pod:94
32386 msgid "B<-c URI> | B<--connect URI>"
32391 #: ../fuse/guestmount.pod:100
32392 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
32397 #: ../fuse/guestmount.pod:108
32398 msgid "B<--dir-cache-timeout N>"
32403 #: ../fuse/guestmount.pod:110
32405 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
32406 "seconds. The readdir cache [actually, there are several semi-independent "
32407 "caches] is populated after a readdir(2) call with the stat and extended "
32408 "attributes of the files in the directory, in anticipation that they will be "
32409 "requested soon after."
32414 #: ../fuse/guestmount.pod:116
32416 "There is also a different attribute cache implemented by FUSE (see the FUSE "
32417 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
32418 "requests, only cache existing ones."
32423 #: ../fuse/guestmount.pod:127
32424 msgid "B<--format=raw|qcow2|..> | B<--format>"
32429 #: ../fuse/guestmount.pod:134
32431 "If you have untrusted raw-format guest disk images, you should use this "
32432 "option to specify the disk format. This avoids a possible security problem "
32433 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
32434 "guestfs_add_drive_opts>."
32439 #: ../fuse/guestmount.pod:139
32440 msgid "B<--fuse-help>"
32445 #: ../fuse/guestmount.pod:141
32446 msgid "Display help on special FUSE options (see I<-o> below)."
32451 #: ../fuse/guestmount.pod:145
32452 msgid "Display brief help and exit."
32457 #: ../fuse/guestmount.pod:147
32458 msgid "B<-i> | B<--inspector>"
32463 #: ../fuse/guestmount.pod:167
32465 "Mount the named partition or logical volume on the given mountpoint B<in the "
32466 "guest> (this has nothing to do with mountpoints in the host)."
32471 #: ../fuse/guestmount.pod:170
32473 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
32474 "something on C</>."
32479 #: ../fuse/guestmount.pod:183
32480 msgid "B<-n> | B<--no-sync>"
32485 #: ../fuse/guestmount.pod:185
32487 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
32488 "unmounted. If you specify this option, then we don't attempt to sync the "
32489 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
32494 #: ../fuse/guestmount.pod:190
32495 msgid "B<-o option> | B<--option option>"
32500 #: ../fuse/guestmount.pod:192
32501 msgid "Pass extra options to FUSE."
32506 #: ../fuse/guestmount.pod:194
32508 "To get a list of all the extra options supported by FUSE, use the command "
32509 "below. Note that only the FUSE I<-o> options can be passed, and only some "
32510 "of them are a good idea."
32515 #: ../fuse/guestmount.pod:198
32518 " guestmount --fuse-help\n"
32524 #: ../fuse/guestmount.pod:200
32525 msgid "Some potentially useful FUSE options:"
32530 #: ../fuse/guestmount.pod:204
32531 msgid "B<-o allow_other>"
32536 #: ../fuse/guestmount.pod:206
32537 msgid "Allow other users to see the filesystem."
32542 #: ../fuse/guestmount.pod:208
32543 msgid "B<-o attr_timeout=N>"
32548 #: ../fuse/guestmount.pod:210
32549 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
32554 #: ../fuse/guestmount.pod:212
32555 msgid "B<-o kernel_cache>"
32560 #: ../fuse/guestmount.pod:214
32562 "Allow the kernel to cache files (reduces the number of reads that have to go "
32563 "through the L<guestfs(3)> API). This is generally a good idea if you can "
32564 "afford the extra memory usage."
32569 #: ../fuse/guestmount.pod:218
32570 msgid "B<-o uid=N> B<-o gid=N>"
32575 #: ../fuse/guestmount.pod:220
32577 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
32578 "the chosen values."
32583 #: ../fuse/guestmount.pod:225
32584 msgid "B<-r> | B<--ro>"
32589 #: ../fuse/guestmount.pod:227
32591 "Add devices and mount everything read-only. Also disallow writes and make "
32592 "the disk appear read-only to FUSE."
32597 #: ../fuse/guestmount.pod:230
32599 "This is highly recommended if you are not going to edit the guest disk. If "
32600 "the guest is running and this option is I<not> supplied, then there is a "
32601 "strong risk of disk corruption in the guest. We try to prevent this from "
32602 "happening, but it is not always possible."
32607 #: ../fuse/guestmount.pod:235
32608 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
32613 #: ../fuse/guestmount.pod:239
32614 msgid "Enable SELinux support for the guest."
32619 #: ../fuse/guestmount.pod:241
32620 msgid "B<-v> | B<--verbose>"
32625 #: ../fuse/guestmount.pod:243
32626 msgid "Enable verbose messages from underlying libguestfs."
32631 #: ../fuse/guestmount.pod:245
32632 msgid "B<-V> | B<--version>"
32637 #: ../fuse/guestmount.pod:247
32638 msgid "Display the program version and exit."
32643 #: ../fuse/guestmount.pod:249
32644 msgid "B<-w> | B<--rw>"
32648 #: ../fuse/guestmount.pod:254 ../fuse/guestmount.pod:275
32649 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
32654 #: ../fuse/guestmount.pod:256
32655 msgid "B<-x> | B<--trace>"
32660 #: ../fuse/guestmount.pod:258
32661 msgid "Trace libguestfs calls and entry into each FUSE function."
32666 #: ../fuse/guestmount.pod:260
32667 msgid "This also stops the daemon from forking into the background."
32672 #: ../fuse/guestmount.pod:281
32674 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
32675 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
32681 #: ../fuse/guestmount.pod:296
32682 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
32687 #: ../tools/virt-win-reg.pl:37
32689 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
32694 #: ../tools/virt-win-reg.pl:41
32697 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
32703 #: ../tools/virt-win-reg.pl:43
32706 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
32712 #: ../tools/virt-win-reg.pl:45
32715 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
32721 #: ../tools/virt-win-reg.pl:47
32724 " virt-win-reg --merge domname [input.reg ...]\n"
32730 #: ../tools/virt-win-reg.pl:49
32733 " virt-win-reg [--options] disk.img ... # instead of domname\n"
32738 #: ../tools/virt-win-reg.pl:53
32740 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
32741 "virtual machines. If you do this, you I<will> get irreversible disk "
32742 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
32743 "but doesn't catch all cases."
32747 #: ../tools/virt-win-reg.pl:58
32749 "Modifying the Windows Registry is an inherently risky operation. The format "
32750 "is deliberately obscure and undocumented, and Registry changes can leave the "
32751 "system unbootable. Therefore when using the I<--merge> option, make sure "
32752 "you have a reliable backup first."
32757 #: ../tools/virt-win-reg.pl:65
32759 "This program can export and merge Windows Registry entries from a Windows "
32765 #: ../tools/virt-win-reg.pl:68
32767 "The first parameter is the libvirt guest name or the raw disk image of a "
32772 #: ../tools/virt-win-reg.pl:71
32774 "If I<--merge> is I<not> specified, then the chosen registry key is displayed/"
32775 "exported (recursively). For example:"
32780 #: ../tools/virt-win-reg.pl:74
32783 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
32789 #: ../tools/virt-win-reg.pl:76
32791 "You can also display single values from within registry keys, for example:"
32796 #: ../tools/virt-win-reg.pl:79
32799 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
32800 " $ virt-win-reg Windows7 $cvkey ProductName\n"
32801 " Windows 7 Enterprise\n"
32806 #: ../tools/virt-win-reg.pl:83
32808 "With I<--merge>, you can merge a textual regedit file into the Windows "
32814 #: ../tools/virt-win-reg.pl:86
32817 " $ virt-win-reg --merge Windows7 changes.reg\n"
32823 #: ../tools/virt-win-reg.pl:88 ../tools/virt-tar.pl:45
32829 #: ../tools/virt-win-reg.pl:90
32831 "This program is only meant for simple access to the registry. If you want "
32832 "to do complicated things with the registry, we suggest you download the "
32833 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
32834 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
32835 "L<hivexregedit(1)>."
32840 #: ../tools/virt-win-reg.pl:106 ../tools/virt-list-filesystems.pl:63
32841 #: ../tools/virt-tar.pl:113 ../tools/virt-make-fs.pl:163
32842 #: ../tools/virt-list-partitions.pl:64
32843 msgid "Display brief help."
32848 #: ../tools/virt-win-reg.pl:114 ../tools/virt-list-filesystems.pl:71
32849 #: ../tools/virt-tar.pl:121 ../tools/virt-make-fs.pl:171
32850 #: ../tools/virt-list-partitions.pl:72
32851 msgid "Display version number and exit."
32856 #: ../tools/virt-win-reg.pl:120 ../tools/virt-make-fs.pl:177
32862 #: ../tools/virt-win-reg.pl:122
32863 msgid "Enable debugging messages."
32868 #: ../tools/virt-win-reg.pl:128 ../tools/virt-list-filesystems.pl:77
32869 #: ../tools/virt-tar.pl:127 ../tools/virt-list-partitions.pl:78
32870 msgid "B<--connect URI> | B<-c URI>"
32875 #: ../tools/virt-win-reg.pl:130 ../tools/virt-list-filesystems.pl:79
32876 #: ../tools/virt-tar.pl:129 ../tools/virt-list-partitions.pl:80
32878 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
32879 "to the default libvirt hypervisor."
32884 #: ../tools/virt-win-reg.pl:133 ../tools/virt-list-filesystems.pl:82
32885 #: ../tools/virt-tar.pl:132 ../tools/virt-list-partitions.pl:83
32887 "If you specify guest block devices directly, then libvirt is not used at all."
32892 #: ../tools/virt-win-reg.pl:140 ../tools/virt-list-filesystems.pl:89
32893 #: ../tools/virt-tar.pl:139 ../tools/virt-list-partitions.pl:90
32894 msgid "B<--format> raw"
32899 #: ../tools/virt-win-reg.pl:142 ../tools/virt-list-filesystems.pl:91
32900 #: ../tools/virt-tar.pl:141 ../tools/virt-list-partitions.pl:92
32902 "Specify the format of disk images given on the command line. If this is "
32903 "omitted then the format is autodetected from the content of the disk image."
32908 #: ../tools/virt-win-reg.pl:146 ../tools/virt-list-filesystems.pl:95
32909 #: ../tools/virt-tar.pl:145 ../tools/virt-list-partitions.pl:96
32911 "If disk images are requested from libvirt, then this program asks libvirt "
32912 "for this information. In this case, the value of the format parameter is "
32918 #: ../tools/virt-win-reg.pl:150 ../tools/virt-list-filesystems.pl:99
32919 #: ../tools/virt-tar.pl:149 ../tools/virt-list-partitions.pl:100
32921 "If working with untrusted raw-format guest disk images, you should ensure "
32922 "the format is always specified."
32927 #: ../tools/virt-win-reg.pl:157
32933 #: ../tools/virt-win-reg.pl:159
32935 "In merge mode, this merges a textual regedit file into the Windows Registry "
32936 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
32937 "displays or exports Registry entries instead."
32941 #: ../tools/virt-win-reg.pl:163
32943 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
32944 "result in disk corruption. However exporting (without this flag) is always "
32950 #: ../tools/virt-win-reg.pl:171
32951 msgid "B<--encoding> UTF-16LE|ASCII"
32956 #: ../tools/virt-win-reg.pl:173
32958 "When merging (only), you may need to specify the encoding for strings to be "
32959 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
32960 "(3)/ENCODING STRINGS>."
32965 #: ../tools/virt-win-reg.pl:177
32967 "The default is to use UTF-16LE, which should work with recent versions of "
32972 #: ../tools/virt-win-reg.pl:184
32973 msgid "B<--unsafe-printable-strings>"
32977 #: ../tools/virt-win-reg.pl:186
32979 "When exporting (only), assume strings are UTF-16LE and print them as strings "
32980 "instead of hex sequences. Remove the final zero codepoint from strings if "
32985 #: ../tools/virt-win-reg.pl:190
32987 "This is unsafe and does not preserve the fidelity of strings in the original "
32988 "Registry for various reasons:"
32992 #: ../tools/virt-win-reg.pl:197
32994 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
32995 "other encodings will be corrupted by this transformation."
32999 #: ../tools/virt-win-reg.pl:202
33001 "Assumes that everything which has type 1 or 2 is really a string and that "
33002 "everything else is not a string, but the type field in real Registries is "
33007 #: ../tools/virt-win-reg.pl:208
33009 "Loses information about whether a zero codepoint followed the string in the "
33014 #: ../tools/virt-win-reg.pl:213
33016 "This all happens because the Registry itself contains no information about "
33017 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
33021 #: ../tools/virt-win-reg.pl:217
33023 "You should only use this option for quick hacking and debugging of the "
33024 "Registry contents, and I<never> use it if the output is going to be passed "
33025 "into another program or stored in another Registry."
33030 #: ../tools/virt-win-reg.pl:554
33031 msgid "SUPPORTED SYSTEMS"
33036 #: ../tools/virt-win-reg.pl:556
33038 "The program currently supports Windows NT-derived guests starting with "
33039 "Windows XP through to at least Windows 7."
33043 #: ../tools/virt-win-reg.pl:559
33044 msgid "The following Registry keys are supported:"
33048 #: ../tools/virt-win-reg.pl:563
33049 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
33053 #: ../tools/virt-win-reg.pl:565
33054 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
33058 #: ../tools/virt-win-reg.pl:567
33059 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
33063 #: ../tools/virt-win-reg.pl:569
33064 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
33068 #: ../tools/virt-win-reg.pl:571
33069 msgid "C<HKEY_USERS\\.DEFAULT>"
33073 #: ../tools/virt-win-reg.pl:573
33074 msgid "C<HKEY_USERS\\I<SID>>"
33078 #: ../tools/virt-win-reg.pl:575
33079 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
33083 #: ../tools/virt-win-reg.pl:577
33084 msgid "C<HKEY_USERS\\I<username>>"
33088 #: ../tools/virt-win-reg.pl:579
33090 "where I<username> is a local user name (this is a libguestfs extension)."
33095 #: ../tools/virt-win-reg.pl:583
33097 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
33102 #: ../tools/virt-win-reg.pl:586
33104 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
33105 "supported (there is no \"current user\")."
33110 #: ../tools/virt-win-reg.pl:589
33116 #: ../tools/virt-win-reg.pl:591
33118 "C<virt-win-reg> expects that regedit files have already been reencoded in "
33119 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
33120 "style line endings. Since Windows regedit files are often in UTF-16LE with "
33121 "Windows-style line endings, you may need to reencode the whole file before "
33122 "or after processing."
33126 #: ../tools/virt-win-reg.pl:597
33128 "To reencode a file from Windows format to Linux (before processing it with "
33129 "the I<--merge> option), you would do something like this:"
33134 #: ../tools/virt-win-reg.pl:600
33137 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
33143 #: ../tools/virt-win-reg.pl:602
33145 "To go in the opposite direction, after exporting and before sending the file "
33146 "to a Windows user, do something like this:"
33151 #: ../tools/virt-win-reg.pl:605
33154 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
33160 #: ../tools/virt-win-reg.pl:607
33161 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
33166 #: ../tools/virt-win-reg.pl:609
33168 "If you are unsure about the current encoding, use the L<file(1)> command. "
33169 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
33170 "style (CRLF) line endings, like this:"
33175 #: ../tools/virt-win-reg.pl:613
33178 " $ file software.reg\n"
33179 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
33180 " with CRLF line terminators\n"
33185 #: ../tools/virt-win-reg.pl:617
33186 msgid "This file would need conversion before you could I<--merge> it."
33191 #: ../tools/virt-win-reg.pl:619
33192 msgid "CurrentControlSet etc."
33197 #: ../tools/virt-win-reg.pl:621
33199 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
33200 "Registry at the level of the hive file, and therefore you cannot modify "
33206 #: ../tools/virt-win-reg.pl:625
33208 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
33209 "circumstances it might refer to another control set. The way to find out is "
33210 "to look at the C<HKLM\\SYSTEM\\Select> key:"
33215 #: ../tools/virt-win-reg.pl:629
33218 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
33219 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
33220 " \"Current\"=dword:00000001\n"
33221 " \"Default\"=dword:00000001\n"
33222 " \"Failed\"=dword:00000000\n"
33223 " \"LastKnownGood\"=dword:00000002\n"
33229 #: ../tools/virt-win-reg.pl:636
33230 msgid "\"Current\" is the one which Windows will choose when it boots."
33235 #: ../tools/virt-win-reg.pl:638
33237 "Similarly, other C<Current...> keys in the path may need to be replaced."
33242 #: ../tools/virt-win-reg.pl:641
33243 msgid "WINDOWS TIPS"
33248 #: ../tools/virt-win-reg.pl:643
33250 "Note that some of these tips modify the guest disk image. The guest I<must> "
33251 "be shut off, else you will get disk corruption."
33256 #: ../tools/virt-win-reg.pl:646
33257 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
33262 #: ../tools/virt-win-reg.pl:648
33264 "Prepare a DOS batch script, VBScript or executable. Upload this using "
33265 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
33266 "is uploaded into C<C:\\>:"
33271 #: ../tools/virt-win-reg.pl:652
33274 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
33280 #: ../tools/virt-win-reg.pl:654
33281 msgid "Prepare a regedit file containing the registry change:"
33286 #: ../tools/virt-win-reg.pl:656
33289 " cat > test.reg <<'EOF'\n"
33290 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
33291 " \"Test\"=\"c:\\\\test.bat\"\n"
33298 #: ../tools/virt-win-reg.pl:661
33300 "In this example we use the key C<RunOnce> which means that the script will "
33301 "run precisely once when the first user logs in. If you want it to run every "
33302 "time a user logs in, replace C<RunOnce> with C<Run>."
33307 #: ../tools/virt-win-reg.pl:665
33308 msgid "Now update the registry:"
33313 #: ../tools/virt-win-reg.pl:667
33316 " virt-win-reg --merge WindowsGuest test.reg\n"
33322 #: ../tools/virt-win-reg.pl:669
33323 msgid "INSTALLING A SERVICE"
33328 #: ../tools/virt-win-reg.pl:671
33330 "This section assumes you are familiar with Windows services, and you either "
33331 "have a program which handles the Windows Service Control Protocol directly "
33332 "or you want to run any program using a service wrapper like SrvAny or the "
33338 #: ../tools/virt-win-reg.pl:676
33340 "First upload the program and optionally the service wrapper. In this case "
33341 "the test program is called C<test.exe> and we are using the RHSrvAny wrapper:"
33346 #: ../tools/virt-win-reg.pl:680
33349 " guestfish -i -d WindowsGuest <<EOF\n"
33350 " upload rhsrvany.exe /rhsrvany.exe\n"
33351 " upload test.exe /test.exe\n"
33358 #: ../tools/virt-win-reg.pl:685
33360 "Prepare a regedit file containing the registry changes. In this example, "
33361 "the first registry change is needed for the service itself or the service "
33362 "wrapper (if used). The second registry change is only needed because I am "
33363 "using the RHSrvAny service wrapper."
33368 #: ../tools/virt-win-reg.pl:690
33371 " cat > service.reg <<'EOF'\n"
33372 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
33373 " \"Type\"=dword:00000010\n"
33374 " \"Start\"=dword:00000002\n"
33375 " \"ErrorControl\"=dword:00000001\n"
33376 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
33377 " \"DisplayName\"=\"RHSrvAny\"\n"
33378 " \"ObjectName\"=\"NetworkService\"\n"
33384 #: ../tools/virt-win-reg.pl:699
33387 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
33388 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
33389 " \"PWD\"=\"c:\\\\Temp\"\n"
33396 #: ../tools/virt-win-reg.pl:710
33398 "For use of C<ControlSet001> see the section above in this manual page. You "
33399 "may need to adjust this according to the control set that is in use by the "
33405 #: ../tools/virt-win-reg.pl:716
33407 "C<\"ObjectName\"> controls the privileges that the service will have. An "
33408 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
33409 "privileged account."
33414 #: ../tools/virt-win-reg.pl:722
33416 "For the meaning of the magic numbers, see this Microsoft KB article: "
33417 "L<http://support.microsoft.com/kb/103000>."
33422 #: ../tools/virt-win-reg.pl:727
33423 msgid "Update the registry:"
33428 #: ../tools/virt-win-reg.pl:729
33431 " virt-win-reg --merge WindowsGuest service.reg\n"
33437 #: ../tools/virt-win-reg.pl:731 ../tools/virt-list-filesystems.pl:182
33438 #: ../tools/virt-tar.pl:279 ../tools/virt-make-fs.pl:532
33439 #: ../tools/virt-list-partitions.pl:250
33440 msgid "SHELL QUOTING"
33445 #: ../tools/virt-win-reg.pl:733
33447 "Be careful when passing parameters containing C<\\> (backslash) in the "
33448 "shell. Usually you will have to use 'single quotes' or double backslashes "
33449 "(but not both) to protect them from the shell."
33454 #: ../tools/virt-win-reg.pl:737
33455 msgid "Paths and value names are case-insensitive."
33460 #: ../tools/virt-win-reg.pl:739 ../tools/virt-list-filesystems.pl:184
33461 #: ../tools/virt-tar.pl:281 ../tools/virt-make-fs.pl:534
33462 #: ../tools/virt-list-partitions.pl:252
33464 "Libvirt guest names can contain arbitrary characters, some of which have "
33465 "meaning to the shell such as C<#> and space. You may need to quote or "
33466 "escape these characters on the command line. See the shell manual page L<sh"
33467 "(1)> for details."
33472 #: ../tools/virt-win-reg.pl:746
33474 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
33475 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
33476 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
33481 #: ../tools/virt-win-reg.pl:761 ../tools/virt-make-fs.pl:555
33483 "When reporting bugs, please enable debugging and capture the I<complete> "
33489 #: ../tools/virt-win-reg.pl:764
33492 " export LIBGUESTFS_DEBUG=1\n"
33493 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
33499 #: ../tools/virt-win-reg.pl:767
33501 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."
33507 #: ../tools/virt-win-reg.pl:770 ../tools/virt-list-filesystems.pl:202
33508 #: ../tools/virt-tar.pl:301 ../tools/virt-make-fs.pl:564
33509 #: ../tools/virt-list-partitions.pl:269
33515 #: ../tools/virt-win-reg.pl:772 ../tools/virt-list-filesystems.pl:204
33516 #: ../tools/virt-tar.pl:303 ../tools/virt-make-fs.pl:566
33517 #: ../tools/virt-list-partitions.pl:271
33518 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
33523 #: ../tools/virt-win-reg.pl:776 ../tools/virt-make-fs.pl:570
33524 msgid "Copyright (C) 2010 Red Hat Inc."
33529 #: ../tools/virt-list-filesystems.pl:32
33531 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
33536 #: ../tools/virt-list-filesystems.pl:36
33539 " virt-list-filesystems [--options] domname\n"
33545 #: ../tools/virt-list-filesystems.pl:38
33548 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
33554 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
33556 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
33562 #: ../tools/virt-list-filesystems.pl:45
33564 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
33565 "are contained in a virtual machine or disk image."
33570 #: ../tools/virt-list-filesystems.pl:49
33572 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
33573 "functionality. For more complex cases you should look at the L<guestfish(1)"
33579 #: ../tools/virt-list-filesystems.pl:106 ../tools/virt-list-partitions.pl:115
33580 msgid "B<-l> | B<--long>"
33585 #: ../tools/virt-list-filesystems.pl:108
33587 "With this option, C<virt-list-filesystems> displays the type of each "
33588 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
33593 #: ../tools/virt-list-filesystems.pl:115
33594 msgid "B<-a> | B<--all>"
33599 #: ../tools/virt-list-filesystems.pl:117
33601 "Normally we only show mountable filesystems. If this option is given then "
33602 "swap devices are shown too."
33607 #: ../tools/virt-list-filesystems.pl:191
33609 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-"
33610 "filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::"
33611 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
33616 #: ../tools/virt-list-filesystems.pl:208 ../tools/virt-tar.pl:307
33617 msgid "Copyright (C) 2009 Red Hat Inc."
33622 #: ../tools/virt-tar.pl:33
33623 msgid "virt-tar - Extract or upload files to a virtual machine"
33628 #: ../tools/virt-tar.pl:37
33631 " virt-tar [--options] -x domname directory tarball\n"
33637 #: ../tools/virt-tar.pl:39
33640 " virt-tar [--options] -u domname tarball directory\n"
33646 #: ../tools/virt-tar.pl:41
33649 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
33655 #: ../tools/virt-tar.pl:43
33658 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
33663 #: ../tools/virt-tar.pl:47
33665 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-"
33666 "tar-in(1)>, L<virt-tar-out(1)> as replacements."
33671 #: ../tools/virt-tar.pl:52
33672 msgid "Download C</home> from the VM into a local tarball:"
33677 #: ../tools/virt-tar.pl:54
33680 " virt-tar -x domname /home home.tar\n"
33686 #: ../tools/virt-tar.pl:56
33689 " virt-tar -zx domname /home home.tar.gz\n"
33695 #: ../tools/virt-tar.pl:58
33696 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
33701 #: ../tools/virt-tar.pl:60
33704 " virt-tar -u domname uploadstuff.tar /tmp\n"
33710 #: ../tools/virt-tar.pl:62
33713 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
33718 #: ../tools/virt-tar.pl:66
33720 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
33721 "virtual machines. If you do this, you risk disk corruption in the VM. "
33722 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
33726 #: ../tools/virt-tar.pl:71
33728 "You can use I<-x> (extract) on live virtual machines, but you might get "
33729 "inconsistent results or errors if there is filesystem activity inside the "
33730 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
33731 "work, but the only way to guarantee consistent results is if the virtual "
33732 "machine is shut down."
33737 #: ../tools/virt-tar.pl:79
33739 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
33740 "parts of a guest filesystem. There are many possibilities: making backups, "
33741 "uploading data files, snooping on guest activity, fixing or customizing "
33747 #: ../tools/virt-tar.pl:84
33749 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
33750 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
33751 "should look at the L<guestfish(1)> tool."
33755 #: ../tools/virt-tar.pl:88
33757 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
33758 "its contents (recursively) from the virtual machine into a local tarball. "
33759 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
33760 "virtual machine. You cannot use these two options together."
33764 #: ../tools/virt-tar.pl:94
33766 "In addition, you may need to use the I<-z> (gZip) option to enable "
33767 "compression. When uploading, you have to specify I<-z> if the upload file "
33768 "is compressed because virt-tar won't detect this on its own."
33773 #: ../tools/virt-tar.pl:98
33775 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
33776 "example it cannot do PKZip files or bzip2 compression. If you want that "
33777 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
33778 "the L<libguestfs(3)> API)."
33783 #: ../tools/virt-tar.pl:156
33784 msgid "B<-x> | B<--extract> | B<--download>"
33789 #: ../tools/virt-tar.pl:158
33790 msgid "B<-u> | B<--upload>"
33794 #: ../tools/virt-tar.pl:160
33796 "Use I<-x> to extract (download) a directory from a virtual machine to a "
33801 #: ../tools/virt-tar.pl:163
33803 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
33804 "Please read the L</WARNING> section above before using this option."
33809 #: ../tools/virt-tar.pl:167
33810 msgid "You must specify exactly one of these options."
33815 #: ../tools/virt-tar.pl:173
33816 msgid "B<-z> | B<--gzip>"
33821 #: ../tools/virt-tar.pl:175
33822 msgid "Specify that the input or output tarball is gzip-compressed."
33826 #: ../tools/virt-tar.pl:288
33828 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-copy-"
33829 "in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<Sys::"
33830 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
33836 #: ../tools/virt-make-fs.pl:37
33837 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
33842 #: ../tools/virt-make-fs.pl:41
33845 " virt-make-fs [--options] input.tar output.img\n"
33851 #: ../tools/virt-make-fs.pl:43
33854 " virt-make-fs [--options] input.tar.gz output.img\n"
33860 #: ../tools/virt-make-fs.pl:45
33863 " virt-make-fs [--options] directory output.img\n"
33869 #: ../tools/virt-make-fs.pl:49
33871 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
33872 "archive or some files in a directory. It is similar to tools like L<mkisofs"
33873 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
33874 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
33875 "you want to attach these filesystems to existing virtual machines (eg. to "
33876 "import large amounts of read-only data to a VM)."
33881 #: ../tools/virt-make-fs.pl:57
33882 msgid "Basic usage is:"
33887 #: ../tools/virt-make-fs.pl:59
33890 " virt-make-fs input output\n"
33896 #: ../tools/virt-make-fs.pl:61
33898 "where C<input> is either a directory containing files that you want to add, "
33899 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
33900 "C<output> is a disk image. The input type is detected automatically. The "
33901 "output disk image defaults to a raw ext2 image unless you specify extra "
33902 "flags (see L</OPTIONS> below)."
33907 #: ../tools/virt-make-fs.pl:67
33908 msgid "EXTRA SPACE"
33912 #: ../tools/virt-make-fs.pl:69
33914 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
33915 "the files that it contains, but might have extra space. Depending on how "
33916 "you are going to use the output, you might think this extra space is wasted "
33917 "and want to minimize it, or you might want to leave space so that more files "
33918 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
33919 "but you can use the I<--size> flag to leave space in the filesystem if you "
33924 #: ../tools/virt-make-fs.pl:77
33926 "An alternative way to leave extra space but not make the output image any "
33927 "bigger is to use an alternative disk image format (instead of the default "
33928 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
33929 "image format (check your hypervisor supports this before using it). This "
33930 "allows you to choose a large I<--size> but the extra space won't actually be "
33931 "allocated in the image until you try to store something in it."
33935 #: ../tools/virt-make-fs.pl:85
33937 "Don't forget that you can also use local commands including L<resize2fs(8)> "
33938 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
33939 "to build another image from scratch."
33944 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123
33945 #: ../tools/virt-make-fs.pl:142
33951 #: ../tools/virt-make-fs.pl:91
33954 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
33960 #: ../tools/virt-make-fs.pl:93
33961 msgid "FILESYSTEM TYPE"
33966 #: ../tools/virt-make-fs.pl:95
33968 "The default filesystem type is C<ext2>. Just about any filesystem type that "
33969 "libguestfs supports can be used (but I<not> read-only formats like "
33970 "ISO9660). Here are some of the more common choices:"
33975 #: ../tools/virt-make-fs.pl:101
33981 #: ../tools/virt-make-fs.pl:103
33983 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
33984 "you are not going to use the filesystem in a way that requires the journal, "
33985 "then this is just wasted overhead."
33990 #: ../tools/virt-make-fs.pl:107
33991 msgid "I<ntfs> or I<vfat>"
33996 #: ../tools/virt-make-fs.pl:109
33997 msgid "Useful if exporting data to a Windows guest."
34002 #: ../tools/virt-make-fs.pl:111
34004 "I<Note for vfat>: The tar archive or local directory must only contain files "
34005 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
34006 "program running within libguestfs is unable to change the ownership of non-"
34007 "root files, since vfat itself does not support this."
34012 #: ../tools/virt-make-fs.pl:116
34018 #: ../tools/virt-make-fs.pl:118
34020 "Lower overhead than C<ext2>, but certain limitations on filename length and "
34021 "total filesystem size."
34026 #: ../tools/virt-make-fs.pl:125
34029 " virt-make-fs --type=minix input minixfs.img\n"
34035 #: ../tools/virt-make-fs.pl:127
34036 msgid "TO PARTITION OR NOT TO PARTITION"
34041 #: ../tools/virt-make-fs.pl:129
34042 msgid "Optionally virt-make-fs can add a partition table to the output disk."
34047 #: ../tools/virt-make-fs.pl:131
34049 "Adding a partition can make the disk image more compatible with certain "
34050 "virtualized operating systems which don't expect to see a filesystem "
34051 "directly located on a block device (Linux doesn't care and will happily "
34052 "handle both types)."
34057 #: ../tools/virt-make-fs.pl:136
34059 "On the other hand, if you have a partition table then the output image is no "
34060 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
34061 "directly on a partitioned disk image. (However libguestfs tools such as "
34062 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
34067 #: ../tools/virt-make-fs.pl:144
34068 msgid "Add an MBR partition:"
34073 #: ../tools/virt-make-fs.pl:146
34076 " virt-make-fs --partition -- input disk.img\n"
34082 #: ../tools/virt-make-fs.pl:148
34084 "If the output disk image could be terabyte-sized or larger, it's better to "
34085 "use an EFI/GPT-compatible partition table:"
34090 #: ../tools/virt-make-fs.pl:151
34093 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
34099 #: ../tools/virt-make-fs.pl:179
34100 msgid "Enable debugging information."
34105 #: ../tools/virt-make-fs.pl:185
34106 msgid "B<--size=E<lt>NE<gt>>"
34111 #: ../tools/virt-make-fs.pl:187
34112 msgid "B<--size=+E<lt>NE<gt>>"
34117 #: ../tools/virt-make-fs.pl:189
34118 msgid "B<-s E<lt>NE<gt>>"
34123 #: ../tools/virt-make-fs.pl:191
34124 msgid "B<-s +E<lt>NE<gt>>"
34128 #: ../tools/virt-make-fs.pl:193
34130 "Use the I<--size> (or I<-s>) option to choose the size of the output image."
34135 #: ../tools/virt-make-fs.pl:196
34137 "If this option is I<not> given, then the output image will be just large "
34138 "enough to contain all the files, with not much wasted space."
34143 #: ../tools/virt-make-fs.pl:199
34145 "To choose a fixed size output disk, specify an absolute number followed by b/"
34146 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
34147 "Petabytes or Exabytes. This must be large enough to contain all the input "
34148 "files, else you will get an error."
34152 #: ../tools/virt-make-fs.pl:204
34154 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
34155 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
34156 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
34157 "the input files, and (approximately) an extra 200 MB free space."
34162 #: ../tools/virt-make-fs.pl:210
34164 "Note that virt-make-fs estimates free space, and therefore will not produce "
34165 "filesystems containing precisely the free space requested. (It is much more "
34166 "expensive and time-consuming to produce a filesystem which has precisely the "
34167 "desired free space)."
34172 #: ../tools/virt-make-fs.pl:219
34173 msgid "B<--format=E<lt>fmtE<gt>>"
34178 #: ../tools/virt-make-fs.pl:221
34179 msgid "B<-F E<lt>fmtE<gt>>"
34184 #: ../tools/virt-make-fs.pl:223
34185 msgid "Choose the output disk image format."
34190 #: ../tools/virt-make-fs.pl:225
34191 msgid "The default is C<raw> (raw disk image)."
34196 #: ../tools/virt-make-fs.pl:227
34198 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
34199 "that would really make sense here is C<qcow2>."
34204 #: ../tools/virt-make-fs.pl:234
34205 msgid "B<--type=E<lt>fsE<gt>>"
34210 #: ../tools/virt-make-fs.pl:236
34211 msgid "B<-t E<lt>fsE<gt>>"
34216 #: ../tools/virt-make-fs.pl:238
34217 msgid "Choose the output filesystem type."
34222 #: ../tools/virt-make-fs.pl:240
34223 msgid "The default is C<ext2>."
34228 #: ../tools/virt-make-fs.pl:242
34230 "Any filesystem which is supported read-write by libguestfs can be used here."
34235 #: ../tools/virt-make-fs.pl:249
34236 msgid "B<--partition>"
34241 #: ../tools/virt-make-fs.pl:251
34242 msgid "B<--partition=E<lt>parttypeE<gt>>"
34247 #: ../tools/virt-make-fs.pl:253
34249 "If specified, this flag adds an MBR partition table to the output disk image."
34253 #: ../tools/virt-make-fs.pl:256
34255 "You can change the partition table type, eg. I<--partition=gpt> for large "
34260 #: ../tools/virt-make-fs.pl:259
34262 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
34263 "might consider the next parameter to be the partition type. For example:"
34268 #: ../tools/virt-make-fs.pl:263
34271 " virt-make-fs --partition input.tar ...\n"
34276 #: ../tools/virt-make-fs.pl:265
34278 "would cause virt-make-fs to think you wanted to use a partition type of "
34279 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
34280 "dash) between options and the input file argument:"
34285 #: ../tools/virt-make-fs.pl:269
34288 " virt-make-fs --partition -- input.tar ...\n"
34293 #: ../tools/virt-make-fs.pl:541
34295 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
34296 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
34297 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
34302 #: ../tools/virt-make-fs.pl:558
34305 " export LIBGUESTFS_DEBUG=1\n"
34306 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
34312 #: ../tools/virt-make-fs.pl:561
34314 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
34320 #: ../tools/virt-list-partitions.pl:32
34322 "virt-list-partitions - List partitions in a virtual machine or disk image"
34327 #: ../tools/virt-list-partitions.pl:36
34330 " virt-list-partitions [--options] domname\n"
34336 #: ../tools/virt-list-partitions.pl:38
34339 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
34345 #: ../tools/virt-list-partitions.pl:45
34347 "C<virt-list-partitions> is a command line tool to list the partitions that "
34348 "are contained in a virtual machine or disk image. It is mainly useful as a "
34349 "first step to using L<virt-resize(1)>."
34354 #: ../tools/virt-list-partitions.pl:50
34356 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
34357 "functionality. For more complex cases you should look at the L<guestfish(1)"
34363 #: ../tools/virt-list-partitions.pl:107
34364 msgid "B<-h> | B<--human-readable>"
34369 #: ../tools/virt-list-partitions.pl:109
34370 msgid "Show sizes in human-readable form (eg. \"1G\")."
34375 #: ../tools/virt-list-partitions.pl:117
34377 "With this option, C<virt-list-partitions> displays the type and size of each "
34378 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
34383 #: ../tools/virt-list-partitions.pl:124
34384 msgid "B<-t> | B<--total>"
34389 #: ../tools/virt-list-partitions.pl:126
34391 "Display the total size of each block device (as a separate row or rows)."
34396 #: ../tools/virt-list-partitions.pl:259
34398 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-list-"
34399 "filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib"
34400 "(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
34405 #: ../tools/virt-list-partitions.pl:275
34406 msgid "Copyright (C) 2009-2010 Red Hat Inc."