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-07-15 17:18+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:2047 ../src/guestfs.pod:2052
924 #: ../src/guestfs.pod:2058 ../src/guestfs.pod:2066 ../src/guestfs.pod:2420
925 #: ../src/guestfs.pod:2426 ../src/guestfs.pod:2431 ../src/guestfs.pod:2437
926 #: ../src/guestfs.pod:3011 ../src/guestfs.pod:3015 ../src/guestfs.pod:3019
927 #: ../src/guestfs.pod:3023 ../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:1662
931 #: ../src/guestfs-actions.pod:1666 ../src/guestfs-actions.pod:1670
932 #: ../src/guestfs-actions.pod:1674 ../src/guestfs-actions.pod:1682
933 #: ../src/guestfs-actions.pod:1686 ../src/guestfs-actions.pod:1690
934 #: ../src/guestfs-actions.pod:1700 ../src/guestfs-actions.pod:1704
935 #: ../src/guestfs-actions.pod:1708 ../src/guestfs-actions.pod:1846
936 #: ../src/guestfs-actions.pod:1850 ../src/guestfs-actions.pod:1855
937 #: ../src/guestfs-actions.pod:1860 ../src/guestfs-actions.pod:1921
938 #: ../src/guestfs-actions.pod:1925 ../src/guestfs-actions.pod:1930
939 #: ../src/guestfs-actions.pod:2857 ../src/guestfs-actions.pod:2863
940 #: ../src/guestfs-actions.pod:2871 ../src/guestfs-actions.pod:2878
941 #: ../src/guestfs-actions.pod:2885 ../fish/guestfish.pod:445
942 #: ../fish/guestfish.pod:449 ../fish/guestfish.pod:453
943 #: ../fish/guestfish.pod:457 ../fish/guestfish-actions.pod:13
944 #: ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:385
945 #: ../fish/guestfish-actions.pod:393 ../fish/guestfish-actions.pod:400
946 #: ../fish/guestfish-actions.pod:407 ../fish/guestfish-actions.pod:1099
947 #: ../fish/guestfish-actions.pod:1103 ../fish/guestfish-actions.pod:1107
948 #: ../fish/guestfish-actions.pod:1111 ../fish/guestfish-actions.pod:1119
949 #: ../fish/guestfish-actions.pod:1123 ../fish/guestfish-actions.pod:1127
950 #: ../fish/guestfish-actions.pod:1137 ../fish/guestfish-actions.pod:1141
951 #: ../fish/guestfish-actions.pod:1145 ../fish/guestfish-actions.pod:1235
952 #: ../fish/guestfish-actions.pod:1239 ../fish/guestfish-actions.pod:1244
953 #: ../fish/guestfish-actions.pod:1249 ../fish/guestfish-actions.pod:1291
954 #: ../fish/guestfish-actions.pod:1295 ../fish/guestfish-actions.pod:1300
955 #: ../fish/guestfish-actions.pod:1933 ../fish/guestfish-actions.pod:1939
956 #: ../fish/guestfish-actions.pod:1947 ../fish/guestfish-actions.pod:1954
957 #: ../fish/guestfish-actions.pod:1961 ../tools/virt-win-reg.pl:195
958 #: ../tools/virt-win-reg.pl:200 ../tools/virt-win-reg.pl:206
959 #: ../tools/virt-win-reg.pl:708 ../tools/virt-win-reg.pl:714
960 #: ../tools/virt-win-reg.pl:720
966 #: ../src/guestfs.pod:390
968 "The kernel version that the command runs under will be different from what "
974 #: ../src/guestfs.pod:395
976 "If the command needs to communicate with daemons, then most likely they "
982 #: ../src/guestfs.pod:400
983 msgid "The command will be running in limited memory."
988 #: ../src/guestfs.pod:404
990 "The network may not be available unless you enable it (see L</"
991 "guestfs_set_network>)."
996 #: ../src/guestfs.pod:409
997 msgid "Only supports Linux guests (not Windows, BSD, etc)."
1002 #: ../src/guestfs.pod:413
1004 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
1009 #: ../src/guestfs.pod:418
1011 "For SELinux guests, you may need to enable SELinux and load policy first. "
1012 "See L</SELINUX> in this manpage."
1017 #: ../src/guestfs.pod:423
1019 "I<Security:> It is not safe to run commands from untrusted, possibly "
1020 "malicious guests. These commands may attempt to exploit your program by "
1021 "sending unexpected output. They could also try to exploit the Linux kernel "
1022 "or qemu provided by the libguestfs appliance. They could use the network "
1023 "provided by the libguestfs appliance to bypass ordinary network partitions "
1024 "and firewalls. They could use the elevated privileges or different SELinux "
1025 "context of your program to their advantage."
1030 #: ../src/guestfs.pod:432
1032 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
1033 "(a script which runs when the guest next boots normally), and to have this "
1034 "script run the commands you want in the normal context of the running guest, "
1035 "network security and so on. For information about other security issues, "
1041 #: ../src/guestfs.pod:440
1043 "The two main API calls to run commands are L</guestfs_command> and L</"
1044 "guestfs_sh> (there are also variations)."
1049 #: ../src/guestfs.pod:443
1051 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
1052 "shell globs, redirections, etc will work."
1057 #: ../src/guestfs.pod:446
1058 msgid "CONFIGURATION FILES"
1063 #: ../src/guestfs.pod:448
1065 "To read and write configuration files in Linux guest filesystems, we "
1066 "strongly recommend using Augeas. For example, Augeas understands how to "
1067 "read and write, say, a Linux shadow password file or X.org configuration "
1068 "file, and so avoids you having to write that code."
1073 #: ../src/guestfs.pod:453
1075 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
1076 "document Augeas itself here because there is excellent documentation on the "
1077 "L<http://augeas.net/> website."
1082 #: ../src/guestfs.pod:457
1084 "If you don't want to use Augeas (you fool!) then try calling L</"
1085 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
1091 #: ../src/guestfs.pod:461
1097 #: ../src/guestfs.pod:463
1099 "We support SELinux guests. To ensure that labeling happens correctly in "
1100 "SELinux guests, you need to enable SELinux and load the guest's policy:"
1105 #: ../src/guestfs.pod:469 ../src/guestfs.pod:1257 ../src/guestfs.pod:1395
1106 #: ../src/guestfs.pod:2465
1112 #: ../src/guestfs.pod:471
1113 msgid "Before launching, do:"
1118 #: ../src/guestfs.pod:473
1121 " guestfs_set_selinux (g, 1);\n"
1127 #: ../src/guestfs.pod:475 ../src/guestfs.pod:1261 ../src/guestfs.pod:1399
1128 #: ../src/guestfs.pod:2490
1134 #: ../src/guestfs.pod:477
1136 "After mounting the guest's filesystem(s), load the policy. This is best "
1137 "done by running the L<load_policy(8)> command in the guest itself:"
1142 #: ../src/guestfs.pod:481
1145 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
1151 #: ../src/guestfs.pod:483
1153 "(Older versions of C<load_policy> require you to specify the name of the "
1159 #: ../src/guestfs.pod:486 ../src/guestfs.pod:1405
1165 #: ../src/guestfs.pod:488
1167 "Optionally, set the security context for the API. The correct security "
1168 "context to use can only be known by inspecting the guest. As an example:"
1173 #: ../src/guestfs.pod:492
1176 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
1182 #: ../src/guestfs.pod:496
1183 msgid "This will work for running commands and editing existing files."
1188 #: ../src/guestfs.pod:498
1190 "When new files are created, you may need to label them explicitly, for "
1191 "example by running the external command C<restorecon pathname>."
1196 #: ../src/guestfs.pod:502
1202 #: ../src/guestfs.pod:504
1204 "Certain calls are affected by the current file mode creation mask (the "
1205 "\"umask\"). In particular ones which create files or directories, such as "
1206 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
1207 "either the default mode that the file is created with or modifies the mode "
1213 #: ../src/guestfs.pod:510
1215 "The default umask is C<022>, so files are created with modes such as C<0644> "
1216 "and directories with C<0755>."
1221 #: ../src/guestfs.pod:513
1223 "There are two ways to avoid being affected by umask. Either set umask to 0 "
1224 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
1225 "guestfs_chmod> after creating each file or directory."
1230 #: ../src/guestfs.pod:517
1231 msgid "For more information about umask, see L<umask(2)>."
1236 #: ../src/guestfs.pod:519 ../fish/guestfish.pod:825
1237 msgid "ENCRYPTED DISKS"
1242 #: ../src/guestfs.pod:521
1244 "Libguestfs allows you to access Linux guests which have been encrypted using "
1245 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1246 "standard. This includes nearly all whole disk encryption systems used by "
1247 "modern Linux guests."
1252 #: ../src/guestfs.pod:527
1254 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1255 "returns the string C<crypto_LUKS>)."
1260 #: ../src/guestfs.pod:530
1262 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
1263 "will require the passphrase!"
1268 #: ../src/guestfs.pod:533
1270 "Opening a LUKS device creates a new device mapper device called C</dev/"
1271 "mapper/mapname> (where C<mapname> is the string you supply to L</"
1272 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
1273 "from and encrypted to the underlying block device respectively."
1278 #: ../src/guestfs.pod:539
1280 "LVM volume groups on the device can be made visible by calling L</"
1281 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
1282 "(s) can now be mounted in the usual way."
1287 #: ../src/guestfs.pod:543
1289 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1290 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1291 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
1292 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1293 "underlying encrypted block device)."
1298 #: ../src/guestfs.pod:550
1303 #: ../src/guestfs.pod:552
1305 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1306 "contains operating systems, an install CD or a live CD. (These APIs used to "
1307 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
1308 "version 1.5.3 the most frequently used part of this library has been "
1309 "rewritten in C and moved into the core code)."
1314 #: ../src/guestfs.pod:559
1316 "Add all disks belonging to the unknown virtual machine and call L</"
1317 "guestfs_launch> in the usual way."
1322 #: ../src/guestfs.pod:562
1324 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1325 "and certain heuristics, and returns a list of operating systems that were "
1326 "found. An empty list means none were found. A single element is the root "
1327 "filesystem of the operating system. For dual- or multi-boot guests, "
1328 "multiple roots can be returned, each one corresponding to a separate "
1329 "operating system. (Multi-boot virtual machines are extremely rare in the "
1330 "world of virtualization, but since this scenario can happen, we have built "
1331 "libguestfs to deal with it.)"
1336 #: ../src/guestfs.pod:571
1338 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1339 "to get additional details about that operating system. For example, call L</"
1340 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1341 "Windows and Linux-based operating systems respectively."
1346 #: ../src/guestfs.pod:577
1348 "Un*x-like and Linux-based operating systems usually consist of several "
1349 "filesystems which are mounted at boot time (for example, a separate boot "
1350 "partition mounted on C</boot>). The inspection rules are able to detect how "
1351 "filesystems correspond to mount points. Call "
1352 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1353 "hash table like this example:"
1358 #: ../src/guestfs.pod:584
1361 " /boot => /dev/sda1\n"
1362 " / => /dev/vg_guest/lv_root\n"
1363 " /usr => /dev/vg_guest/lv_usr\n"
1369 #: ../src/guestfs.pod:588
1371 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1372 "filesystems as suggested."
1377 #: ../src/guestfs.pod:591
1379 "Be careful to mount filesystems in the right order (eg. C</> before C</"
1380 "usr>). Sorting the keys of the hash by length, shortest first, should work."
1385 #: ../src/guestfs.pod:595
1387 "Inspection currently only works for some common operating systems. "
1388 "Contributors are welcome to send patches for other operating systems that we "
1389 "currently cannot detect."
1394 #: ../src/guestfs.pod:599
1396 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1397 "for more details. The L</guestfs_inspect_os> function just ignores any "
1398 "encrypted devices."
1403 #: ../src/guestfs.pod:603
1405 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1406 "inspection and caches the results in the guest handle. Subsequent calls to "
1407 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
1408 "read the disks. If you change the content of the guest disks, you can redo "
1409 "inspection by calling L</guestfs_inspect_os> again. (L</"
1410 "guestfs_inspect_list_applications> works a little differently from the other "
1411 "calls and does read the disks. See documentation for that function for "
1416 #: ../src/guestfs.pod:612
1417 msgid "INSPECTING INSTALL DISKS"
1421 #: ../src/guestfs.pod:614
1423 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
1428 #: ../src/guestfs.pod:617
1430 "Call L</guestfs_inspect_get_format> to return the format of the operating "
1431 "system, which currently can be C<installed> (a regular operating system) or "
1432 "C<installer> (some sort of install disk)."
1436 #: ../src/guestfs.pod:621
1438 "Further information is available about the operating system that can be "
1439 "installed using the regular inspection APIs like L</"
1440 "guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> etc."
1444 #: ../src/guestfs.pod:626
1446 "Some additional information specific to installer disks is also available "
1447 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and L</"
1448 "guestfs_inspect_is_multipart> calls."
1453 #: ../src/guestfs.pod:631
1454 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1459 #: ../src/guestfs.pod:633
1461 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
1462 "ntfs-3g.org/> driver."
1467 #: ../src/guestfs.pod:636
1468 msgid "DRIVE LETTERS AND PATHS"
1473 #: ../src/guestfs.pod:638
1475 "DOS and Windows still use drive letters, and the filesystems are always "
1476 "treated as case insensitive by Windows itself, and therefore you might find "
1477 "a Windows configuration file referring to a path like C<c:\\windows"
1478 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
1479 "might be referred to as C</WINDOWS/System32>."
1483 #: ../src/guestfs.pod:644
1485 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
1486 "L</guestfs_inspect_get_drive_mappings>)"
1490 #: ../src/guestfs.pod:647
1492 "Dealing with separator characters (backslash vs forward slash) is outside "
1493 "the scope of libguestfs, but usually a simple character replacement will "
1498 #: ../src/guestfs.pod:651
1500 "To resolve the case insensitivity of paths, call L</"
1501 "guestfs_case_sensitive_path>."
1506 #: ../src/guestfs.pod:654
1507 msgid "ACCESSING THE WINDOWS REGISTRY"
1512 #: ../src/guestfs.pod:656
1514 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1515 "files, through the library C<hivex> which is part of the libguestfs project "
1516 "although ships as a separate tarball. You have to locate and download the "
1517 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1518 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
1519 "reg(1)> for more help on this issue."
1524 #: ../src/guestfs.pod:664
1525 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
1530 #: ../src/guestfs.pod:666
1532 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
1533 "provide something which looks like a Linux symlink. The way it tries to do "
1534 "the rewriting is described here:"
1539 #: ../src/guestfs.pod:670
1541 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
1547 #: ../src/guestfs.pod:672
1549 "The essential problem is that ntfs-3g simply does not have enough "
1550 "information to do a correct job. NTFS links can contain drive letters and "
1551 "references to external device GUIDs that ntfs-3g has no way of resolving. "
1552 "It is almost certainly the case that libguestfs callers should ignore what "
1553 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
1558 #: ../src/guestfs.pod:679
1560 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use L</"
1561 "guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
1562 "attribute, and read the raw reparse data from that (you can find the format "
1563 "documented in various places around the web)."
1568 #: ../src/guestfs.pod:684
1569 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
1574 #: ../src/guestfs.pod:686
1576 "There are other useful extended attributes that can be read from ntfs-3g "
1577 "filesystems (using L</guestfs_getxattr>). See:"
1582 #: ../src/guestfs.pod:689
1584 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
1589 #: ../src/guestfs.pod:691
1590 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1595 #: ../src/guestfs.pod:693
1597 "Although we don't want to discourage you from using the C API, we will "
1598 "mention here that the same API is also available in other languages."
1602 #: ../src/guestfs.pod:696
1604 "The API is broadly identical in all supported languages. This means that "
1605 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
1606 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
1607 "OCaml. In other words, a straightforward, predictable isomorphism between "
1613 #: ../src/guestfs.pod:702
1615 "Error messages are automatically transformed into exceptions if the language "
1621 #: ../src/guestfs.pod:705
1623 "We don't try to \"object orientify\" parts of the API in OO languages, "
1624 "although contributors are welcome to write higher level APIs above what we "
1625 "provide in their favourite languages if they wish."
1630 #: ../src/guestfs.pod:711
1636 #: ../src/guestfs.pod:713
1638 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1639 "identical to the C API. C++ classes and exceptions are not used."
1644 #: ../src/guestfs.pod:717
1650 #: ../src/guestfs.pod:719
1652 "The C# bindings are highly experimental. Please read the warnings at the "
1653 "top of C<csharp/Libguestfs.cs>."
1658 #: ../src/guestfs.pod:722
1664 #: ../src/guestfs.pod:724
1666 "This is the only language binding that is working but incomplete. Only "
1667 "calls which return simple integers have been bound in Haskell, and we are "
1668 "looking for help to complete this binding."
1673 #: ../src/guestfs.pod:728
1679 #: ../src/guestfs.pod:730
1681 "Full documentation is contained in the Javadoc which is distributed with "
1687 #: ../src/guestfs.pod:733
1692 #: ../src/guestfs.pod:735
1693 msgid "See L<guestfs-ocaml(3)>."
1698 #: ../src/guestfs.pod:737
1703 #: ../src/guestfs.pod:739
1704 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
1709 #: ../src/guestfs.pod:741
1715 #: ../src/guestfs.pod:743
1717 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1718 "the php-libguestfs package for your distribution."
1723 #: ../src/guestfs.pod:746
1724 msgid "The PHP binding only works correctly on 64 bit machines."
1729 #: ../src/guestfs.pod:748
1734 #: ../src/guestfs.pod:750
1735 msgid "See L<guestfs-python(3)>."
1740 #: ../src/guestfs.pod:752
1745 #: ../src/guestfs.pod:754
1746 msgid "See L<guestfs-ruby(3)>."
1751 #: ../src/guestfs.pod:756
1752 msgid "B<shell scripts>"
1756 #: ../src/guestfs.pod:758
1757 msgid "See L<guestfish(1)>."
1762 #: ../src/guestfs.pod:762
1763 msgid "LIBGUESTFS GOTCHAS"
1768 #: ../src/guestfs.pod:764
1770 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1771 "system [...] that works in the way it is documented but is counterintuitive "
1772 "and almost invites mistakes.\""
1777 #: ../src/guestfs.pod:768
1779 "Since we developed libguestfs and the associated tools, there are several "
1780 "things we would have designed differently, but are now stuck with for "
1781 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1782 "release, you can expect these to change. Beware of them."
1787 #: ../src/guestfs.pod:776
1788 msgid "Autosync / forgetting to sync."
1792 #: ../src/guestfs.pod:778
1794 "I<Update:> Autosync is enabled by default for all API users starting from "
1795 "libguestfs 1.5.24. This section only applies to older versions."
1800 #: ../src/guestfs.pod:781
1802 "When modifying a filesystem from C or another language, you B<must> unmount "
1803 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1804 "libguestfs handle. You can also call:"
1809 #: ../src/guestfs.pod:785
1812 " guestfs_set_autosync (g, 1);\n"
1818 #: ../src/guestfs.pod:787
1820 "to have the unmount/sync done automatically for you when the handle 'g' is "
1821 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
1826 #: ../src/guestfs.pod:791
1828 "If you forget to do this, then it is entirely possible that your changes "
1829 "won't be written out, or will be partially written, or (very rarely) that "
1830 "you'll get disk corruption."
1835 #: ../src/guestfs.pod:795
1837 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1838 "guestfish scripts that forget to sync will work just fine, which can make "
1839 "this very puzzling if you are trying to debug a problem."
1844 #: ../src/guestfs.pod:799
1845 msgid "Mount option C<-o sync> should not be the default."
1850 #: ../src/guestfs.pod:801
1852 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1853 "However C<-o sync> does not add any reliability benefit, but does have a "
1854 "very large performance impact."
1859 #: ../src/guestfs.pod:805
1861 "The work around is to use L</guestfs_mount_options> and set the mount "
1862 "options that you actually want to use."
1867 #: ../src/guestfs.pod:808
1868 msgid "Read-only should be the default."
1873 #: ../src/guestfs.pod:810
1875 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1876 "specify I<--rw> if you want to make changes to the image."
1881 #: ../src/guestfs.pod:813
1882 msgid "This would reduce the potential to corrupt live VM images."
1887 #: ../src/guestfs.pod:815
1889 "Note that many filesystems change the disk when you just mount and unmount, "
1890 "even if you didn't perform any writes. You need to use L</"
1891 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
1896 #: ../src/guestfs.pod:819
1897 msgid "guestfish command line is hard to use."
1902 #: ../src/guestfs.pod:821
1904 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1905 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1906 "exist, so it fails. In earlier versions of guestfish the error message was "
1907 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1908 "we should have used C<guestfish -c command> to run commands."
1913 #: ../src/guestfs.pod:828
1914 msgid "guestfish megabyte modifiers don't work right on all commands"
1919 #: ../src/guestfs.pod:830
1921 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1922 "other modifiers). What guestfish actually does is to multiply the number "
1923 "part by the modifier part and pass the result to the C API. However this "
1924 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1925 "expecting some other unit (eg. megabytes)."
1930 #: ../src/guestfs.pod:837
1931 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1936 #: ../src/guestfs.pod:839
1939 " lvcreate LV VG 100M\n"
1945 #: ../src/guestfs.pod:841
1947 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1948 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1949 "megabytes * megabytes) logical volume. The error message you get from this "
1950 "is also a little obscure."
1955 #: ../src/guestfs.pod:846
1957 "This could be fixed in the generator by specially marking parameters and "
1958 "return values which take bytes or other units."
1963 #: ../src/guestfs.pod:849
1964 msgid "Ambiguity between devices and paths"
1969 #: ../src/guestfs.pod:851
1971 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
1972 "sdb2>) and a similar pathname. A file might just happen to be called "
1973 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1978 #: ../src/guestfs.pod:856
1980 "In the current API we usually resolve this ambiguity by having two separate "
1981 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1982 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1983 "detecting if the path supplied begins with C</dev/>."
1988 #: ../src/guestfs.pod:862
1990 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1991 "make paths/devices into structured names. One way to do this would be to "
1992 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1993 "aspect of grub. Another way would be to use a structured type, equivalent "
1994 "to this OCaml type:"
1999 #: ../src/guestfs.pod:868
2002 " type path = Path of string | Device of int | Partition of int * int\n"
2008 #: ../src/guestfs.pod:870
2009 msgid "which would allow you to pass arguments like:"
2014 #: ../src/guestfs.pod:872
2017 " Path \"/foo/bar\"\n"
2018 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
2019 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
2020 " Path \"/dev/sdb2\" (* not a device *)\n"
2026 #: ../src/guestfs.pod:877
2028 "As you can see there are still problems to resolve even with this "
2029 "representation. Also consider how it might work in guestfish."
2034 #: ../src/guestfs.pod:882
2035 msgid "KEYS AND PASSPHRASES"
2040 #: ../src/guestfs.pod:884
2042 "Certain libguestfs calls take a parameter that contains sensitive key "
2043 "material, passed in as a C string."
2048 #: ../src/guestfs.pod:887
2050 "In the future we would hope to change the libguestfs implementation so that "
2051 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
2052 "swap. However this is I<not> done at the moment, because of the complexity "
2053 "of such an implementation."
2058 #: ../src/guestfs.pod:892
2060 "Therefore you should be aware that any key parameter you pass to libguestfs "
2061 "might end up being written out to the swap partition. If this is a concern, "
2062 "scrub the swap partition or don't use libguestfs on encrypted devices."
2067 #: ../src/guestfs.pod:897
2068 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
2073 #: ../src/guestfs.pod:899
2075 "All high-level libguestfs actions are synchronous. If you want to use "
2076 "libguestfs asynchronously then you must create a thread."
2081 #: ../src/guestfs.pod:902
2083 "Only use the handle from a single thread. Either use the handle exclusively "
2084 "from one thread, or provide your own mutex so that two threads cannot issue "
2085 "calls on the same handle at the same time."
2090 #: ../src/guestfs.pod:906
2092 "See the graphical program guestfs-browser for one possible architecture for "
2093 "multithreaded programs using libvirt and libguestfs."
2098 #: ../src/guestfs.pod:909
2103 #: ../src/guestfs.pod:911
2105 "Libguestfs needs a supermin appliance, which it finds by looking along an "
2111 #: ../src/guestfs.pod:914
2113 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
2114 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
2119 #: ../src/guestfs.pod:917
2121 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
2122 "to change the directories that libguestfs will search in. The value is a "
2123 "colon-separated list of paths. The current directory is I<not> searched "
2124 "unless the path contains an empty element or C<.>. For example "
2125 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
2126 "then C</usr/lib/guestfs>."
2131 #: ../src/guestfs.pod:924
2132 msgid "QEMU WRAPPERS"
2137 #: ../src/guestfs.pod:926
2139 "If you want to compile your own qemu, run qemu from a non-standard location, "
2140 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
2146 #: ../src/guestfs.pod:930
2148 "There is one important rule to remember: you I<must C<exec qemu>> as the "
2149 "last command in the shell script (so that qemu replaces the shell and "
2150 "becomes the direct child of the libguestfs-using program). If you don't do "
2151 "this, then the qemu process won't be cleaned up correctly."
2156 #: ../src/guestfs.pod:935
2158 "Here is an example of a wrapper, where I have built my own copy of qemu from "
2164 #: ../src/guestfs.pod:938
2168 " qemudir=/home/rjones/d/qemu\n"
2169 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
2175 #: ../src/guestfs.pod:942
2177 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
2178 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
2184 #: ../src/guestfs.pod:946
2187 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
2193 #: ../src/guestfs.pod:948
2195 "Note that libguestfs also calls qemu with the -help and -version options in "
2196 "order to determine features."
2200 #: ../src/guestfs.pod:951
2201 msgid "ATTACHING TO RUNNING DAEMONS"
2205 #: ../src/guestfs.pod:953
2207 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
2208 "babies. Use with caution."
2212 #: ../src/guestfs.pod:956
2214 "I<Note (2):> This section explains how to attach to a running daemon from a "
2215 "low level perspective. For most users, simply using virt tools such as "
2216 "L<guestfish(1)> with the I<--live> option will \"just work\"."
2220 #: ../src/guestfs.pod:960
2221 msgid "Using guestfs_set_attach_method"
2225 #: ../src/guestfs.pod:962
2227 "By calling L</guestfs_set_attach_method> you can change how the library "
2228 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read L</"
2229 "ARCHITECTURE> for some background)."
2233 #: ../src/guestfs.pod:966
2235 "The normal attach method is C<appliance>, where a small appliance is created "
2236 "containing the daemon, and then the library connects to this."
2240 #: ../src/guestfs.pod:969
2242 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
2243 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
2244 "daemon over the Unix domain socket."
2248 #: ../src/guestfs.pod:973
2250 "The normal use for this is to connect to a running virtual machine that "
2251 "contains a C<guestfsd> daemon, and send commands so you can read and write "
2252 "files inside the live virtual machine."
2256 #: ../src/guestfs.pod:977
2257 msgid "Using guestfs_add_domain with live flag"
2261 #: ../src/guestfs.pod:979
2263 "L</guestfs_add_domain> provides some help for getting the correct attach "
2264 "method. If you pass the C<live> option to this function, then (if the "
2265 "virtual machine is running) it will examine the libvirt XML looking for a "
2266 "virtio-serial channel to connect to:"
2270 #: ../src/guestfs.pod:985
2277 " <channel type='unix'>\n"
2278 " <source mode='bind' path='/path/to/socket'/>\n"
2279 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
2288 #: ../src/guestfs.pod:997
2290 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
2291 "method to C<unix:/path/to/socket>."
2295 #: ../src/guestfs.pod:1000
2297 "Some of the libguestfs tools (including guestfish) support a I<--live> "
2298 "option which is passed through to L</guestfs_add_domain> thus allowing you "
2299 "to attach to and modify live virtual machines."
2303 #: ../src/guestfs.pod:1004
2305 "The virtual machine needs to have been set up beforehand so that it has the "
2306 "virtio-serial channel and so that guestfsd is running inside it."
2311 #: ../src/guestfs.pod:1008
2312 msgid "ABI GUARANTEE"
2317 #: ../src/guestfs.pod:1010
2319 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
2320 "actions as outlined in this section. Although we will deprecate some "
2321 "actions, for example if they get replaced by newer calls, we will keep the "
2322 "old actions forever. This allows you the developer to program in confidence "
2323 "against the libguestfs API."
2328 #: ../src/guestfs.pod:1016
2329 msgid "BLOCK DEVICE NAMING"
2334 #: ../src/guestfs.pod:1018
2336 "In the kernel there is now quite a profusion of schemata for naming block "
2337 "devices (in this context, by I<block device> I mean a physical or virtual "
2338 "hard drive). The original Linux IDE driver used names starting with C</dev/"
2339 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
2340 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
2341 "for the old IDE driver (particularly for SATA devices) those devices also "
2342 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
2343 "paravirtualized drivers. This has created several different naming systems, "
2344 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
2349 #: ../src/guestfs.pod:1030
2351 "As discussed above, libguestfs uses a qemu appliance running an embedded "
2352 "Linux kernel to access block devices. We can run a variety of appliances "
2353 "based on a variety of Linux kernels."
2358 #: ../src/guestfs.pod:1034
2360 "This causes a problem for libguestfs because many API calls use device or "
2361 "partition names. Working scripts and the recipe (example) scripts that we "
2362 "make available over the internet could fail if the naming scheme changes."
2367 #: ../src/guestfs.pod:1039
2369 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2370 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2371 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2372 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2377 #: ../src/guestfs.pod:1045
2379 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2380 "L</guestfs_list_partitions> and similar calls return the true names of the "
2381 "devices and partitions as known to the appliance."
2386 #: ../src/guestfs.pod:1050
2387 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2392 #: ../src/guestfs.pod:1052
2394 "Usually this translation is transparent. However in some (very rare) cases "
2395 "you may need to know the exact algorithm. Such cases include where you use "
2396 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
2397 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
2402 #: ../src/guestfs.pod:1058
2404 "The algorithm is applied only to I<parameters> which are known to be either "
2405 "device or partition names. Return values from functions such as L</"
2406 "guestfs_list_devices> are never changed."
2411 #: ../src/guestfs.pod:1066
2412 msgid "Is the string a parameter which is a device or partition name?"
2417 #: ../src/guestfs.pod:1070
2418 msgid "Does the string begin with C</dev/sd>?"
2423 #: ../src/guestfs.pod:1074
2425 "Does the named device exist? If so, we use that device. However if I<not> "
2426 "then we continue with this algorithm."
2431 #: ../src/guestfs.pod:1079
2432 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
2437 #: ../src/guestfs.pod:1081
2438 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
2443 #: ../src/guestfs.pod:1083
2444 msgid "If that named device exists, use it. If not, continue."
2449 #: ../src/guestfs.pod:1087
2450 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
2455 #: ../src/guestfs.pod:1089
2456 msgid "If that named device exists, use it. If not, return an error."
2461 #: ../src/guestfs.pod:1093
2462 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
2467 #: ../src/guestfs.pod:1095
2469 "Although the standard naming scheme and automatic translation is useful for "
2470 "simple programs and guestfish scripts, for larger programs it is best not to "
2471 "rely on this mechanism."
2476 #: ../src/guestfs.pod:1099
2478 "Where possible for maximum future portability programs using libguestfs "
2479 "should use these future-proof techniques:"
2484 #: ../src/guestfs.pod:1106
2486 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2487 "device names, and then use those names directly."
2492 #: ../src/guestfs.pod:1109
2494 "Since those device names exist by definition, they will never be translated."
2499 #: ../src/guestfs.pod:1114
2501 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2502 "filesystem labels."
2507 #: ../src/guestfs.pod:1119
2513 #: ../src/guestfs.pod:1121
2515 "This section discusses security implications of using libguestfs, "
2516 "particularly with untrusted or malicious guests or disk images."
2521 #: ../src/guestfs.pod:1124
2522 msgid "GENERAL SECURITY CONSIDERATIONS"
2527 #: ../src/guestfs.pod:1126
2529 "Be careful with any files or data that you download from a guest (by "
2530 "\"download\" we mean not just the L</guestfs_download> command but any "
2531 "command that reads files, filenames, directories or anything else from a "
2532 "disk image). An attacker could manipulate the data to fool your program "
2533 "into doing the wrong thing. Consider cases such as:"
2538 #: ../src/guestfs.pod:1136
2539 msgid "the data (file etc) not being present"
2544 #: ../src/guestfs.pod:1140
2545 msgid "being present but empty"
2550 #: ../src/guestfs.pod:1144
2551 msgid "being much larger than normal"
2556 #: ../src/guestfs.pod:1148
2557 msgid "containing arbitrary 8 bit data"
2562 #: ../src/guestfs.pod:1152
2563 msgid "being in an unexpected character encoding"
2568 #: ../src/guestfs.pod:1156
2569 msgid "containing homoglyphs."
2574 #: ../src/guestfs.pod:1160
2575 msgid "SECURITY OF MOUNTING FILESYSTEMS"
2580 #: ../src/guestfs.pod:1162
2582 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
2583 "(VFS) module can sometimes be escalated into exploits by deliberately "
2584 "creating a malicious, malformed filesystem. These exploits are very severe "
2585 "for two reasons. Firstly there are very many filesystem drivers in the "
2586 "kernel, and many of them are infrequently used and not much developer "
2587 "attention has been paid to the code. Linux userspace helps potential "
2588 "crackers by detecting the filesystem type and automatically choosing the "
2589 "right VFS driver, even if that filesystem type is obscure or unexpected for "
2590 "the administrator. Secondly, a kernel-level exploit is like a local root "
2591 "exploit (worse in some ways), giving immediate and total access to the "
2592 "system right down to the hardware level."
2597 #: ../src/guestfs.pod:1175
2599 "That explains why you should never mount a filesystem from an untrusted "
2600 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
2601 "inside a qemu virtual machine, usually running as a non-root user. The "
2602 "attacker would need to write a filesystem which first exploited the kernel, "
2603 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
2604 "the libguestfs protocol, and finally to be as serious as the host kernel "
2605 "exploit it would need to escalate its privileges to root. This multi-step "
2606 "escalation, performed by a static piece of data, is thought to be extremely "
2607 "hard to do, although we never say 'never' about security issues."
2612 #: ../src/guestfs.pod:1186
2614 "In any case callers can reduce the attack surface by forcing the filesystem "
2615 "type when mounting (use L</guestfs_mount_vfs>)."
2620 #: ../src/guestfs.pod:1189
2621 msgid "PROTOCOL SECURITY"
2626 #: ../src/guestfs.pod:1191
2628 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
2629 "defined upper message size. However a program that uses libguestfs must "
2630 "also take care - for example you can write a program that downloads a binary "
2631 "from a disk image and executes it locally, and no amount of protocol "
2632 "security will save you from the consequences."
2637 #: ../src/guestfs.pod:1197
2638 msgid "INSPECTION SECURITY"
2643 #: ../src/guestfs.pod:1199
2645 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
2646 "directly from the guest, and these could contain any 8 bit data. Callers "
2647 "should be careful to escape these before printing them to a structured file "
2648 "(for example, use HTML escaping if creating a web page)."
2653 #: ../src/guestfs.pod:1205
2655 "Guest configuration may be altered in unusual ways by the administrator of "
2656 "the virtual machine, and may not reflect reality (particularly for untrusted "
2657 "or actively malicious guests). For example we parse the hostname from "
2658 "configuration files like C</etc/sysconfig/network> that we find in the "
2659 "guest, but the guest administrator can easily manipulate these files to "
2660 "provide the wrong hostname."
2665 #: ../src/guestfs.pod:1213
2667 "The inspection API parses guest configuration using two external libraries: "
2668 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
2669 "designed to be robust in the face of malicious data, although denial of "
2670 "service attacks are still possible, for example with oversized configuration "
2676 #: ../src/guestfs.pod:1219
2677 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
2682 #: ../src/guestfs.pod:1221
2684 "Be very cautious about running commands from the guest. By running a "
2685 "command in the guest, you are giving CPU time to a binary that you do not "
2686 "control, under the same user account as the library, albeit wrapped in qemu "
2687 "virtualization. More information and alternatives can be found in the "
2688 "section L</RUNNING COMMANDS>."
2693 #: ../src/guestfs.pod:1227
2694 msgid "CVE-2010-3851"
2699 #: ../src/guestfs.pod:1229
2700 msgid "https://bugzilla.redhat.com/642934"
2705 #: ../src/guestfs.pod:1231
2707 "This security bug concerns the automatic disk format detection that qemu "
2708 "does on disk images."
2713 #: ../src/guestfs.pod:1234
2715 "A raw disk image is just the raw bytes, there is no header. Other disk "
2716 "images like qcow2 contain a special header. Qemu deals with this by looking "
2717 "for one of the known headers, and if none is found then assuming the disk "
2718 "image must be raw."
2723 #: ../src/guestfs.pod:1239
2725 "This allows a guest which has been given a raw disk image to write some "
2726 "other header. At next boot (or when the disk image is accessed by "
2727 "libguestfs) qemu would do autodetection and think the disk image format was, "
2728 "say, qcow2 based on the header written by the guest."
2733 #: ../src/guestfs.pod:1244
2735 "This in itself would not be a problem, but qcow2 offers many features, one "
2736 "of which is to allow a disk image to refer to another image (called the "
2737 "\"backing disk\"). It does this by placing the path to the backing disk "
2738 "into the qcow2 header. This path is not validated and could point to any "
2739 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
2740 "\"holes\" in the qcow2 disk image, which of course is completely under the "
2741 "control of the attacker."
2746 #: ../src/guestfs.pod:1252
2748 "In libguestfs this is rather hard to exploit except under two circumstances:"
2753 #: ../src/guestfs.pod:1259
2754 msgid "You have enabled the network or have opened the disk in write mode."
2759 #: ../src/guestfs.pod:1263
2761 "You are also running untrusted code from the guest (see L</RUNNING "
2767 #: ../src/guestfs.pod:1268
2769 "The way to avoid this is to specify the expected disk format when adding "
2770 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
2771 "should always do this if the disk is raw format, and it's a good idea for "
2777 #: ../src/guestfs.pod:1273
2779 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
2780 "format is fetched from libvirt and passed through."
2785 #: ../src/guestfs.pod:1276
2787 "For libguestfs tools, use the I<--format> command line parameter as "
2793 #: ../src/guestfs.pod:1279
2794 msgid "CONNECTION MANAGEMENT"
2799 #: ../src/guestfs.pod:1281
2805 #: ../src/guestfs.pod:1283
2807 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
2808 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
2809 "handle and release all resources used."
2813 #: ../src/guestfs.pod:1287
2815 "For information on using multiple handles and threads, see the section L</"
2816 "MULTIPLE HANDLES AND MULTIPLE THREADS> above."
2821 #: ../src/guestfs.pod:1290
2822 msgid "guestfs_create"
2827 #: ../src/guestfs.pod:1292
2830 " guestfs_h *guestfs_create (void);\n"
2836 #: ../src/guestfs.pod:1294
2837 msgid "Create a connection handle."
2841 #: ../src/guestfs.pod:1296
2843 "On success this returns a non-NULL pointer to a handle. On error it returns "
2848 #: ../src/guestfs.pod:1299
2850 "You have to \"configure\" the handle after creating it. This includes "
2851 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
2852 "handle at least once."
2857 #: ../src/guestfs.pod:1303
2858 msgid "After configuring the handle, you have to call L</guestfs_launch>."
2862 #: ../src/guestfs.pod:1305
2864 "You may also want to configure error handling for the handle. See the L</"
2865 "ERROR HANDLING> section below."
2870 #: ../src/guestfs.pod:1308
2871 msgid "guestfs_close"
2876 #: ../src/guestfs.pod:1310
2879 " void guestfs_close (guestfs_h *g);\n"
2885 #: ../src/guestfs.pod:1312
2886 msgid "This closes the connection handle and frees up all resources used."
2890 #: ../src/guestfs.pod:1314
2892 "If autosync was set on the handle and the handle was launched, then this "
2893 "implicitly calls various functions to unmount filesystems and sync the "
2894 "disk. See L</guestfs_set_autosync> for more details."
2898 #: ../src/guestfs.pod:1318
2899 msgid "If a close callback was set on the handle, then it is called."
2904 #: ../src/guestfs.pod:1320
2905 msgid "ERROR HANDLING"
2910 #: ../src/guestfs.pod:1322
2912 "API functions can return errors. For example, almost all functions that "
2913 "return C<int> will return C<-1> to indicate an error."
2918 #: ../src/guestfs.pod:1325
2920 "Additional information is available for errors: an error message string and "
2921 "optionally an error number (errno) if the thing that failed was a system "
2927 #: ../src/guestfs.pod:1329
2929 "You can get at the additional information about the last error on the handle "
2930 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
2931 "up an error handler with L</guestfs_set_error_handler>."
2936 #: ../src/guestfs.pod:1334
2938 "When the handle is created, a default error handler is installed which "
2939 "prints the error message string to C<stderr>. For small short-running "
2940 "command line programs it is sufficient to do:"
2945 #: ../src/guestfs.pod:1338
2948 " if (guestfs_launch (g) == -1)\n"
2949 " exit (EXIT_FAILURE);\n"
2955 #: ../src/guestfs.pod:1341
2957 "since the default error handler will ensure that an error message has been "
2958 "printed to C<stderr> before the program exits."
2963 #: ../src/guestfs.pod:1344
2965 "For other programs the caller will almost certainly want to install an "
2966 "alternate error handler or do error handling in-line like this:"
2971 #: ../src/guestfs.pod:1347
2974 " g = guestfs_create ();\n"
2980 #: ../src/guestfs.pod:1349
2983 " /* This disables the default behaviour of printing errors\n"
2985 " guestfs_set_error_handler (g, NULL, NULL);\n"
2991 #: ../src/guestfs.pod:1353
2994 " if (guestfs_launch (g) == -1) {\n"
2995 " /* Examine the error message and print it etc. */\n"
2996 " char *msg = guestfs_last_error (g);\n"
2997 " int errnum = guestfs_last_errno (g);\n"
2998 " fprintf (stderr, \"%s\\n\", msg);\n"
3006 #: ../src/guestfs.pod:1361
3008 "Out of memory errors are handled differently. The default action is to call "
3009 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
3010 "guestfs_set_out_of_memory_handler>."
3015 #: ../src/guestfs.pod:1365
3017 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
3018 "because there is no handle if this happens there is no way to get additional "
3019 "error information. However L</guestfs_create> is supposed to be a "
3020 "lightweight operation which can only fail because of insufficient memory (it "
3021 "returns NULL in this case)."
3026 #: ../src/guestfs.pod:1371
3027 msgid "guestfs_last_error"
3032 #: ../src/guestfs.pod:1373
3035 " const char *guestfs_last_error (guestfs_h *g);\n"
3041 #: ../src/guestfs.pod:1375
3043 "This returns the last error message that happened on C<g>. If there has not "
3044 "been an error since the handle was created, then this returns C<NULL>."
3049 #: ../src/guestfs.pod:1379
3051 "The lifetime of the returned string is until the next error occurs, or L</"
3052 "guestfs_close> is called."
3057 #: ../src/guestfs.pod:1382
3058 msgid "guestfs_last_errno"
3063 #: ../src/guestfs.pod:1384
3066 " int guestfs_last_errno (guestfs_h *g);\n"
3072 #: ../src/guestfs.pod:1386
3073 msgid "This returns the last error number (errno) that happened on C<g>."
3078 #: ../src/guestfs.pod:1388
3079 msgid "If successful, an errno integer not equal to zero is returned."
3084 #: ../src/guestfs.pod:1390
3086 "If no error, this returns 0. This call can return 0 in three situations:"
3091 #: ../src/guestfs.pod:1397
3092 msgid "There has not been any error on the handle."
3097 #: ../src/guestfs.pod:1401
3099 "There has been an error but the errno was meaningless. This corresponds to "
3100 "the case where the error did not come from a failed system call, but for "
3101 "some other reason."
3106 #: ../src/guestfs.pod:1407
3108 "There was an error from a failed system call, but for some reason the errno "
3109 "was not captured and returned. This usually indicates a bug in libguestfs."
3114 #: ../src/guestfs.pod:1413
3116 "Libguestfs tries to convert the errno from inside the applicance into a "
3117 "corresponding errno for the caller (not entirely trivial: the appliance "
3118 "might be running a completely different operating system from the library "
3119 "and error numbers are not standardized across Un*xen). If this could not be "
3120 "done, then the error is translated to C<EINVAL>. In practice this should "
3121 "only happen in very rare circumstances."
3126 #: ../src/guestfs.pod:1421
3127 msgid "guestfs_set_error_handler"
3132 #: ../src/guestfs.pod:1423
3135 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
3137 " const char *msg);\n"
3138 " void guestfs_set_error_handler (guestfs_h *g,\n"
3139 " guestfs_error_handler_cb cb,\n"
3146 #: ../src/guestfs.pod:1430
3148 "The callback C<cb> will be called if there is an error. The parameters "
3149 "passed to the callback are an opaque data pointer and the error message "
3155 #: ../src/guestfs.pod:1434
3157 "C<errno> is not passed to the callback. To get that the callback must call "
3158 "L</guestfs_last_errno>."
3163 #: ../src/guestfs.pod:1437
3165 "Note that the message string C<msg> is freed as soon as the callback "
3166 "function returns, so if you want to stash it somewhere you must make your "
3172 #: ../src/guestfs.pod:1441
3173 msgid "The default handler prints messages on C<stderr>."
3178 #: ../src/guestfs.pod:1443
3179 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
3184 #: ../src/guestfs.pod:1445
3185 msgid "guestfs_get_error_handler"
3190 #: ../src/guestfs.pod:1447
3193 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
3194 " void **opaque_rtn);\n"
3200 #: ../src/guestfs.pod:1450
3201 msgid "Returns the current error handler callback."
3206 #: ../src/guestfs.pod:1452
3207 msgid "guestfs_set_out_of_memory_handler"
3212 #: ../src/guestfs.pod:1454
3215 " typedef void (*guestfs_abort_cb) (void);\n"
3216 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
3217 " guestfs_abort_cb);\n"
3223 #: ../src/guestfs.pod:1458
3225 "The callback C<cb> will be called if there is an out of memory situation. "
3226 "I<Note this callback must not return>."
3231 #: ../src/guestfs.pod:1461
3232 msgid "The default is to call L<abort(3)>."
3237 #: ../src/guestfs.pod:1463
3239 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
3244 #: ../src/guestfs.pod:1466
3245 msgid "guestfs_get_out_of_memory_handler"
3250 #: ../src/guestfs.pod:1468
3253 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
3259 #: ../src/guestfs.pod:1470
3260 msgid "This returns the current out of memory handler."
3265 #: ../src/guestfs.pod:1472
3271 #: ../src/guestfs.pod:1474 ../fish/guestfish.pod:1068
3277 #: ../src/guestfs.pod:1476
3283 #: ../src/guestfs.pod:1478
3289 #: ../src/guestfs.pod:1480
3290 msgid "AVAILABILITY"
3295 #: ../src/guestfs.pod:1482
3296 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
3301 #: ../src/guestfs.pod:1484
3303 "Using L</guestfs_available> you can test availability of the following "
3304 "groups of functions. This test queries the appliance to see if the "
3305 "appliance you are currently using supports the functionality."
3310 #: ../src/guestfs.pod:1489
3311 msgid "@AVAILABILITY@"
3316 #: ../src/guestfs.pod:1491
3317 msgid "GUESTFISH supported COMMAND"
3322 #: ../src/guestfs.pod:1493
3324 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
3325 "prints out the available groups and whether they are supported by this build "
3326 "of libguestfs. Note however that you have to do C<run> first."
3331 #: ../src/guestfs.pod:1498
3332 msgid "SINGLE CALLS AT COMPILE TIME"
3337 #: ../src/guestfs.pod:1500
3339 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
3340 "function, such as:"
3345 #: ../src/guestfs.pod:1503
3348 " #define LIBGUESTFS_HAVE_DD 1\n"
3354 #: ../src/guestfs.pod:1505
3355 msgid "if L</guestfs_dd> is available."
3360 #: ../src/guestfs.pod:1507
3362 "Before version 1.5.8, if you needed to test whether a single libguestfs "
3363 "function is available at compile time, we recommended using build tools such "
3364 "as autoconf or cmake. For example in autotools you could use:"
3369 #: ../src/guestfs.pod:1512
3372 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
3373 " AC_CHECK_FUNCS([guestfs_dd])\n"
3379 #: ../src/guestfs.pod:1515
3381 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
3387 #: ../src/guestfs.pod:1518
3388 msgid "SINGLE CALLS AT RUN TIME"
3393 #: ../src/guestfs.pod:1520
3395 "Testing at compile time doesn't guarantee that a function really exists in "
3396 "the library. The reason is that you might be dynamically linked against a "
3397 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
3398 "This situation unfortunately results in a segmentation fault, which is a "
3399 "shortcoming of the C dynamic linking system itself."
3404 #: ../src/guestfs.pod:1527
3406 "You can use L<dlopen(3)> to test if a function is available at run time, as "
3407 "in this example program (note that you still need the compile time check as "
3413 #: ../src/guestfs.pod:1531
3416 " #include <stdio.h>\n"
3417 " #include <stdlib.h>\n"
3418 " #include <unistd.h>\n"
3419 " #include <dlfcn.h>\n"
3420 " #include <guestfs.h>\n"
3426 #: ../src/guestfs.pod:1537
3431 " #ifdef LIBGUESTFS_HAVE_DD\n"
3433 " int has_function;\n"
3439 #: ../src/guestfs.pod:1543
3442 " /* Test if the function guestfs_dd is really available. */\n"
3443 " dl = dlopen (NULL, RTLD_LAZY);\n"
3445 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
3446 " exit (EXIT_FAILURE);\n"
3448 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
3455 #: ../src/guestfs.pod:1552
3458 " if (!has_function)\n"
3459 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
3461 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
3462 " /* Now it's safe to call\n"
3463 " guestfs_dd (g, \"foo\", \"bar\");\n"
3467 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
3475 #: ../src/guestfs.pod:1565
3477 "You may think the above is an awful lot of hassle, and it is. There are "
3478 "other ways outside of the C linking system to ensure that this kind of "
3479 "incompatibility never arises, such as using package versioning:"
3484 #: ../src/guestfs.pod:1570
3487 " Requires: libguestfs >= 1.0.80\n"
3493 #: ../src/guestfs.pod:1572
3494 msgid "CALLS WITH OPTIONAL ARGUMENTS"
3499 #: ../src/guestfs.pod:1574
3501 "A recent feature of the API is the introduction of calls which take optional "
3502 "arguments. In C these are declared 3 ways. The main way is as a call which "
3503 "takes variable arguments (ie. C<...>), as in this example:"
3508 #: ../src/guestfs.pod:1579
3511 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
3517 #: ../src/guestfs.pod:1581
3519 "Call this with a list of optional arguments, terminated by C<-1>. So to "
3520 "call with no optional arguments specified:"
3525 #: ../src/guestfs.pod:1584
3528 " guestfs_add_drive_opts (g, filename, -1);\n"
3534 #: ../src/guestfs.pod:1586
3535 msgid "With a single optional argument:"
3540 #: ../src/guestfs.pod:1588
3543 " guestfs_add_drive_opts (g, filename,\n"
3544 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3551 #: ../src/guestfs.pod:1592
3557 #: ../src/guestfs.pod:1594
3560 " guestfs_add_drive_opts (g, filename,\n"
3561 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3562 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
3569 #: ../src/guestfs.pod:1599
3571 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
3577 #: ../src/guestfs.pod:1602
3578 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
3583 #: ../src/guestfs.pod:1604
3585 "The second variant has the same name with the suffix C<_va>, which works the "
3586 "same way but takes a C<va_list>. See the C manual for details. For the "
3587 "example function, this is declared:"
3592 #: ../src/guestfs.pod:1608
3595 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
3602 #: ../src/guestfs.pod:1611
3603 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
3608 #: ../src/guestfs.pod:1613
3610 "The third variant is useful where you need to construct these calls. You "
3611 "pass in a structure where you fill in the optional fields. The structure "
3612 "has a bitmask as the first element which you must set to indicate which "
3613 "fields you have filled in. For our example function the structure and call "
3619 #: ../src/guestfs.pod:1619
3622 " struct guestfs_add_drive_opts_argv {\n"
3623 " uint64_t bitmask;\n"
3625 " const char *format;\n"
3628 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
3629 " const struct guestfs_add_drive_opts_argv *optargs);\n"
3635 #: ../src/guestfs.pod:1628
3636 msgid "You could call it like this:"
3641 #: ../src/guestfs.pod:1630
3644 " struct guestfs_add_drive_opts_argv optargs = {\n"
3645 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
3646 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
3648 " .format = \"qcow2\"\n"
3655 #: ../src/guestfs.pod:1637
3658 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
3664 #: ../src/guestfs.pod:1639 ../src/guestfs-actions.pod:11
3665 #: ../src/guestfs-actions.pod:1917 ../src/guestfs-actions.pod:2853
3666 #: ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1287
3667 #: ../fish/guestfish-actions.pod:1929 ../tools/virt-win-reg.pl:704
3673 #: ../src/guestfs.pod:1645
3674 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
3679 #: ../src/guestfs.pod:1650
3680 msgid "You do not need to fill in all fields of the structure."
3685 #: ../src/guestfs.pod:1654
3687 "There must be a one-to-one correspondence between fields of the structure "
3688 "that are filled in, and bits set in the bitmask."
3693 #: ../src/guestfs.pod:1659
3694 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
3699 #: ../src/guestfs.pod:1661
3701 "In other languages, optional arguments are expressed in the way that is "
3702 "natural for that language. We refer you to the language-specific "
3703 "documentation for more details on that."
3708 #: ../src/guestfs.pod:1665
3709 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
3714 #: ../src/guestfs.pod:1667
3715 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
3719 #: ../src/guestfs.pod:1669
3721 "B<Note:> This section documents the generic event mechanism introduced in "
3722 "libguestfs 1.10, which you should use in new code if possible. The old "
3723 "functions C<guestfs_set_log_message_callback>, "
3724 "C<guestfs_set_subprocess_quit_callback>, "
3725 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
3726 "C<guestfs_set_progress_callback> are no longer documented in this manual "
3727 "page. Because of the ABI guarantee, the old functions continue to work."
3731 #: ../src/guestfs.pod:1678
3733 "Handles generate events when certain things happen, such as log messages "
3734 "being generated, progress messages during long-running operations, or the "
3735 "handle being closed. The API calls described below let you register a "
3736 "callback to be called when events happen. You can register multiple "
3737 "callbacks (for the same, different or overlapping sets of events), and "
3738 "individually remove callbacks. If callbacks are not removed, then they "
3739 "remain in force until the handle is closed."
3743 #: ../src/guestfs.pod:1686
3745 "In the current implementation, events are only generated synchronously: that "
3746 "means that events (and hence callbacks) can only happen while you are in the "
3747 "middle of making another libguestfs call. The callback is called in the "
3752 #: ../src/guestfs.pod:1691
3754 "Events may contain a payload, usually nothing (void), an array of 64 bit "
3755 "unsigned integers, or a message buffer. Payloads are discussed later on."
3759 #: ../src/guestfs.pod:1695
3760 msgid "CLASSES OF EVENTS"
3764 #: ../src/guestfs.pod:1699
3765 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
3769 #: ../src/guestfs.pod:1702
3771 "The callback function will be called while the handle is being closed "
3772 "(synchronously from L</guestfs_close>)."
3777 #: ../src/guestfs.pod:1705
3779 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
3780 "handles that are open when the program exits. This means that this callback "
3781 "might be called indirectly from L<exit(3)>, which can cause unexpected "
3782 "problems in higher-level languages (eg. if your HLL interpreter has already "
3783 "been cleaned up by the time this is called, and if your callback then jumps "
3784 "into some HLL function)."
3788 #: ../src/guestfs.pod:1712
3790 "If no callback is registered: the handle is closed without any callback "
3795 #: ../src/guestfs.pod:1715
3796 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
3800 #: ../src/guestfs.pod:1718
3802 "The callback function will be called when the child process quits, either "
3803 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
3804 "corresponds to a transition from any state to the CONFIG state)."
3808 #: ../src/guestfs.pod:1722 ../src/guestfs.pod:1731
3809 msgid "If no callback is registered: the event is ignored."
3813 #: ../src/guestfs.pod:1724
3814 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
3818 #: ../src/guestfs.pod:1727
3820 "The callback function will be called when the child process becomes ready "
3821 "first time after it has been launched. (This corresponds to a transition "
3822 "from LAUNCHING to the READY state)."
3826 #: ../src/guestfs.pod:1733
3827 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
3832 #: ../src/guestfs.pod:1736
3834 "Some long-running operations can generate progress messages. If this "
3835 "callback is registered, then it will be called each time a progress message "
3836 "is generated (usually two seconds after the operation started, and three "
3837 "times per second thereafter until it completes, although the frequency may "
3838 "change in future versions)."
3842 #: ../src/guestfs.pod:1742
3844 "The callback receives in the payload four unsigned 64 bit numbers which are "
3845 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
3849 #: ../src/guestfs.pod:1745
3851 "The units of C<total> are not defined, although for some operations C<total> "
3852 "may relate in some way to the amount of data to be transferred (eg. in bytes "
3853 "or megabytes), and C<position> may be the portion which has been transferred."
3858 #: ../src/guestfs.pod:1750
3859 msgid "The only defined and stable parts of the API are:"
3864 #: ../src/guestfs.pod:1756
3866 "The callback can display to the user some type of progress bar or indicator "
3867 "which shows the ratio of C<position>:C<total>."
3872 #: ../src/guestfs.pod:1761
3873 msgid "0 E<lt>= C<position> E<lt>= C<total>"
3877 #: ../src/guestfs.pod:1765
3879 "If any progress notification is sent during a call, then a final progress "
3880 "notification is always sent when C<position> = C<total> (I<unless> the call "
3881 "fails with an error)."
3886 #: ../src/guestfs.pod:1769
3888 "This is to simplify caller code, so callers can easily set the progress "
3889 "indicator to \"100%\" at the end of the operation, without requiring special "
3890 "code to detect this case."
3894 #: ../src/guestfs.pod:1775
3896 "For some calls we are unable to estimate the progress of the call, but we "
3897 "can still generate progress messages to indicate activity. This is known as "
3898 "\"pulse mode\", and is directly supported by certain progress bar "
3899 "implementations (eg. GtkProgressBar)."
3903 #: ../src/guestfs.pod:1780
3905 "For these calls, zero or more progress messages are generated with "
3906 "C<position = 0> and C<total = 1>, followed by a final message with "
3907 "C<position = total = 1>."
3911 #: ../src/guestfs.pod:1784
3913 "As noted above, if the call fails with an error then the final message may "
3918 #: ../src/guestfs.pod:1789
3920 "The callback also receives the procedure number (C<proc_nr>) and serial "
3921 "number (C<serial>) of the call. These are only useful for debugging "
3922 "protocol issues, and the callback can normally ignore them. The callback "
3923 "may want to print these numbers in error messages or debugging messages."
3927 #: ../src/guestfs.pod:1795
3928 msgid "If no callback is registered: progress messages are discarded."
3932 #: ../src/guestfs.pod:1797
3933 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
3937 #: ../src/guestfs.pod:1800
3939 "The callback function is called whenever a log message is generated by qemu, "
3940 "the appliance kernel, guestfsd (daemon), or utility programs."
3944 #: ../src/guestfs.pod:1803
3946 "If the verbose flag (L</guestfs_set_verbose>) is set before launch (L</"
3947 "guestfs_launch>) then additional debug messages are generated."
3951 #: ../src/guestfs.pod:1806 ../src/guestfs.pod:1820
3953 "If no callback is registered: the messages are discarded unless the verbose "
3954 "flag is set in which case they are sent to stderr. You can override the "
3955 "printing of verbose messages to stderr by setting up a callback."
3959 #: ../src/guestfs.pod:1811
3960 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
3964 #: ../src/guestfs.pod:1814
3966 "The callback function is called whenever a log message is generated by the "
3967 "library part of libguestfs."
3971 #: ../src/guestfs.pod:1817
3973 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
3974 "messages are generated."
3978 #: ../src/guestfs.pod:1825
3979 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
3983 #: ../src/guestfs.pod:1828
3985 "The callback function is called whenever a trace message is generated. This "
3986 "only applies if the trace flag (L</guestfs_set_trace>) is set."
3990 #: ../src/guestfs.pod:1831
3992 "If no callback is registered: the messages are sent to stderr. You can "
3993 "override the printing of trace messages to stderr by setting up a callback."
3997 #: ../src/guestfs.pod:1837
3998 msgid "guestfs_set_event_callback"
4002 #: ../src/guestfs.pod:1839
4005 " int guestfs_set_event_callback (guestfs_h *g,\n"
4006 " guestfs_event_callback cb,\n"
4007 " uint64_t event_bitmask,\n"
4014 #: ../src/guestfs.pod:1845
4016 "This function registers a callback (C<cb>) for all event classes in the "
4021 #: ../src/guestfs.pod:1848
4023 "For example, to register for all log message events, you could call this "
4024 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
4025 "To register a single callback for all possible classes of events, use "
4026 "C<GUESTFS_EVENT_ALL>."
4030 #: ../src/guestfs.pod:1854
4031 msgid "C<flags> should always be passed as 0."
4035 #: ../src/guestfs.pod:1856
4037 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
4038 "it for any purpose."
4042 #: ../src/guestfs.pod:1859
4044 "The return value is the event handle (an integer) which you can use to "
4045 "delete the callback (see below)."
4049 #: ../src/guestfs.pod:1862
4051 "If there is an error, this function returns C<-1>, and sets the error in the "
4052 "handle in the usual way (see L</guestfs_last_error> etc.)"
4056 #: ../src/guestfs.pod:1865
4058 "Callbacks remain in effect until they are deleted, or until the handle is "
4063 #: ../src/guestfs.pod:1868
4065 "In the case where multiple callbacks are registered for a particular event "
4066 "class, all of the callbacks are called. The order in which multiple "
4067 "callbacks are called is not defined."
4071 #: ../src/guestfs.pod:1872
4072 msgid "guestfs_delete_event_callback"
4076 #: ../src/guestfs.pod:1874
4079 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
4084 #: ../src/guestfs.pod:1876
4086 "Delete a callback that was previously registered. C<event_handle> should be "
4087 "the integer that was returned by a previous call to "
4088 "C<guestfs_set_event_callback> on the same handle."
4092 #: ../src/guestfs.pod:1880
4093 msgid "guestfs_event_callback"
4097 #: ../src/guestfs.pod:1882
4100 " typedef void (*guestfs_event_callback) (\n"
4103 " uint64_t event,\n"
4104 " int event_handle,\n"
4106 " const char *buf, size_t buf_len,\n"
4107 " const uint64_t *array, size_t array_len);\n"
4112 #: ../src/guestfs.pod:1891
4114 "This is the type of the event callback function that you have to provide."
4118 #: ../src/guestfs.pod:1894
4120 "The basic parameters are: the handle (C<g>), the opaque user pointer "
4121 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
4122 "handle, and C<flags> which in the current API you should ignore."
4126 #: ../src/guestfs.pod:1898
4128 "The remaining parameters contain the event payload (if any). Each event may "
4129 "contain a payload, which usually relates to the event class, but for future "
4130 "proofing your code should be written to handle any payload for any event "
4135 #: ../src/guestfs.pod:1903
4137 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
4138 "there is no message buffer). Note that this message buffer can contain "
4139 "arbitrary 8 bit data, including NUL bytes."
4143 #: ../src/guestfs.pod:1907
4145 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
4146 "moment this is only used for progress messages."
4150 #: ../src/guestfs.pod:1910
4151 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
4155 #: ../src/guestfs.pod:1912
4157 "One motivation for the generic event API was to allow GUI programs to "
4158 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
4159 "unconditionally to C<stderr>."
4163 #: ../src/guestfs.pod:1916
4165 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
4166 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
4167 "messages are not events; you must capture error messages separately)."
4171 #: ../src/guestfs.pod:1921
4173 "Programs have to set up a callback to capture the classes of events of "
4178 #: ../src/guestfs.pod:1924
4182 " guestfs_set_event_callback\n"
4183 " (g, message_callback,\n"
4184 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
4185 " GUESTFS_EVENT_TRACE,\n"
4186 " 0, NULL) == -1)\n"
4187 " if (eh == -1) {\n"
4188 " // handle error in the usual way\n"
4194 #: ../src/guestfs.pod:1934
4196 "The callback can then direct messages to the appropriate place. In this "
4197 "example, messages are directed to syslog:"
4201 #: ../src/guestfs.pod:1937
4205 " message_callback (\n"
4208 " uint64_t event,\n"
4209 " int event_handle,\n"
4211 " const char *buf, size_t buf_len,\n"
4212 " const uint64_t *array, size_t array_len)\n"
4214 " const int priority = LOG_USER|LOG_INFO;\n"
4215 " if (buf_len > 0)\n"
4216 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
4222 #: ../src/guestfs.pod:1952
4223 msgid "CANCELLING LONG TRANSFERS"
4227 #: ../src/guestfs.pod:1954
4229 "Some operations can be cancelled by the caller while they are in progress. "
4230 "Currently only operations that involve uploading or downloading data can be "
4231 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
4232 "parameters in the generator)."
4236 #: ../src/guestfs.pod:1959
4237 msgid "guestfs_user_cancel"
4241 #: ../src/guestfs.pod:1961
4244 " void guestfs_user_cancel (guestfs_h *g);\n"
4249 #: ../src/guestfs.pod:1963
4251 "C<guestfs_user_cancel> cancels the current upload or download operation."
4255 #: ../src/guestfs.pod:1966
4257 "Unlike most other libguestfs calls, this function is signal safe and thread "
4258 "safe. You can call it from a signal handler or from another thread, without "
4259 "needing to do any locking."
4263 #: ../src/guestfs.pod:1970
4265 "The transfer that was in progress (if there is one) will stop shortly "
4266 "afterwards, and will return an error. The errno (see L</"
4267 "guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find "
4268 "out if the operation was cancelled or failed because of another error."
4272 #: ../src/guestfs.pod:1976
4274 "No cleanup is performed: for example, if a file was being uploaded then "
4275 "after cancellation there may be a partially uploaded file. It is the "
4276 "caller's responsibility to clean up if necessary."
4280 #: ../src/guestfs.pod:1980
4281 msgid "There are two common places that you might call C<guestfs_user_cancel>."
4285 #: ../src/guestfs.pod:1982
4287 "In an interactive text-based program, you might call it from a C<SIGINT> "
4288 "signal handler so that pressing C<^C> cancels the current operation. (You "
4289 "also need to call L</guestfs_set_pgroup> so that child processes don't "
4290 "receive the C<^C> signal)."
4294 #: ../src/guestfs.pod:1987
4296 "In a graphical program, when the main thread is displaying a progress bar "
4297 "with a cancel button, wire up the cancel button to call this function."
4302 #: ../src/guestfs.pod:1991
4303 msgid "PRIVATE DATA AREA"
4307 #: ../src/guestfs.pod:1993
4309 "You can attach named pieces of private data to the libguestfs handle, fetch "
4310 "them by name, and walk over them, for the lifetime of the handle. This is "
4311 "called the private data area and is only available from the C API."
4316 #: ../src/guestfs.pod:1998
4317 msgid "To attach a named piece of data, use the following call:"
4322 #: ../src/guestfs.pod:2000
4325 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
4330 #: ../src/guestfs.pod:2002
4332 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
4333 "pointer (which can be C<NULL>). Any previous item with the same key is "
4338 #: ../src/guestfs.pod:2006
4340 "You can use any C<key> you want, but your key should I<not> start with an "
4341 "underscore character. Keys beginning with an underscore character are "
4342 "reserved for internal libguestfs purposes (eg. for implementing language "
4343 "bindings). It is recommended that you prefix the key with some unique "
4344 "string to avoid collisions with other users."
4349 #: ../src/guestfs.pod:2012
4350 msgid "To retrieve the pointer, use:"
4355 #: ../src/guestfs.pod:2014
4358 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
4364 #: ../src/guestfs.pod:2016
4366 "This function returns C<NULL> if either no data is found associated with "
4367 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
4372 #: ../src/guestfs.pod:2020
4374 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
4375 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
4376 "all. In particular, libguestfs does I<not> try to free the data when the "
4377 "handle is closed. If the data must be freed, then the caller must either "
4378 "free it before calling L</guestfs_close> or must set up a close callback to "
4379 "do it (see L</GUESTFS_EVENT_CLOSE>)."
4383 #: ../src/guestfs.pod:2027
4384 msgid "To walk over all entries, use these two functions:"
4388 #: ../src/guestfs.pod:2029
4391 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
4396 #: ../src/guestfs.pod:2031
4399 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
4404 #: ../src/guestfs.pod:2033
4406 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
4407 "not have any particular meaning -- keys are not returned in any defined "
4408 "order). A pointer to the key is returned in C<*key_rtn> and the "
4409 "corresponding data pointer is returned from the function. C<NULL> is "
4410 "returned if there are no keys stored in the handle."
4414 #: ../src/guestfs.pod:2039
4416 "C<guestfs_next_private> returns the next key, pointer pair. The return "
4417 "value of this function is also C<NULL> is there are no further entries to "
4422 #: ../src/guestfs.pod:2043
4423 msgid "Notes about walking over entries:"
4427 #: ../src/guestfs.pod:2049
4429 "You must not call C<guestfs_set_private> while walking over the entries."
4433 #: ../src/guestfs.pod:2054
4435 "The handle maintains an internal iterator which is reset when you call "
4436 "C<guestfs_first_private>. This internal iterator is invalidated when you "
4437 "call C<guestfs_set_private>."
4441 #: ../src/guestfs.pod:2060
4442 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
4446 #: ../src/guestfs.pod:2062
4449 " guestfs_set_private (g, key, NULL);\n"
4454 #: ../src/guestfs.pod:2064
4455 msgid "then that C<key> is not returned when walking."
4459 #: ../src/guestfs.pod:2068
4461 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
4462 "C<guestfs_next_private> or C<guestfs_set_private>."
4466 #: ../src/guestfs.pod:2074
4468 "The following example code shows how to print all keys and data pointers "
4469 "that are associated with the handle C<g>:"
4473 #: ../src/guestfs.pod:2077
4476 " const char *key;\n"
4477 " void *data = guestfs_first_private (g, &key);\n"
4478 " while (data != NULL)\n"
4480 " printf (\"key = %s, data = %p\\n\", key, data);\n"
4481 " data = guestfs_next_private (g, &key);\n"
4487 #: ../src/guestfs.pod:2085
4489 "More commonly you are only interested in keys that begin with an application-"
4490 "specific prefix C<foo_>. Modify the loop like so:"
4494 #: ../src/guestfs.pod:2088
4497 " const char *key;\n"
4498 " void *data = guestfs_first_private (g, &key);\n"
4499 " while (data != NULL)\n"
4501 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
4502 " printf (\"key = %s, data = %p\\n\", key, data);\n"
4503 " data = guestfs_next_private (g, &key);\n"
4509 #: ../src/guestfs.pod:2097
4511 "If you need to modify keys while walking, then you have to jump back to the "
4512 "beginning of the loop. For example, to delete all keys prefixed with "
4517 #: ../src/guestfs.pod:2101
4520 " const char *key;\n"
4523 " data = guestfs_first_private (g, &key);\n"
4524 " while (data != NULL)\n"
4526 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
4528 " guestfs_set_private (g, key, NULL);\n"
4529 " /* note that 'key' pointer is now invalid, and so is\n"
4530 " the internal iterator */\n"
4533 " data = guestfs_next_private (g, &key);\n"
4539 #: ../src/guestfs.pod:2117
4541 "Note that the above loop is guaranteed to terminate because the keys are "
4542 "being deleted, but other manipulations of keys within the loop might not "
4543 "terminate unless you also maintain an indication of which keys have been "
4549 #: ../src/guestfs.pod:2122 ../src/guestfs.pod:2127
4555 #: ../src/guestfs.pod:2124
4557 "<!-- old anchor for the next section --> <a name="
4558 "\"state_machine_and_low_level_event_api\"/>"
4563 #: ../src/guestfs.pod:2129
4564 msgid "ARCHITECTURE"
4569 #: ../src/guestfs.pod:2131
4571 "Internally, libguestfs is implemented by running an appliance (a special "
4572 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
4573 "process of the main program."
4578 #: ../src/guestfs.pod:2135
4581 " ___________________\n"
4583 " | main program |\n"
4585 " | | child process / appliance\n"
4586 " | | __________________________\n"
4588 " +-------------------+ RPC | +-----------------+ |\n"
4589 " | libguestfs <--------------------> guestfsd | |\n"
4590 " | | | +-----------------+ |\n"
4591 " \\___________________/ | | Linux kernel | |\n"
4592 " | +--^--------------+ |\n"
4593 " \\_________|________________/\n"
4599 " \\______________/\n"
4605 #: ../src/guestfs.pod:2155
4607 "The library, linked to the main program, creates the child process and hence "
4608 "the appliance in the L</guestfs_launch> function."
4613 #: ../src/guestfs.pod:2158
4615 "Inside the appliance is a Linux kernel and a complete stack of userspace "
4616 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
4617 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
4618 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
4619 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
4620 "attached to the qemu process which translates device access by the "
4621 "appliance's Linux kernel into accesses to the image."
4626 #: ../src/guestfs.pod:2167
4628 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
4629 "Although the disk image you are attached to might also be used by some "
4630 "virtual machine, libguestfs doesn't know or care about this. (But you will "
4631 "care if both libguestfs's qemu process and your virtual machine are trying "
4632 "to update the disk image at the same time, since these usually results in "
4633 "massive disk corruption)."
4638 #: ../src/guestfs.pod:2174
4639 msgid "STATE MACHINE"
4644 #: ../src/guestfs.pod:2176
4645 msgid "libguestfs uses a state machine to model the child process:"
4650 #: ../src/guestfs.pod:2178
4662 " / | \\ \\ guestfs_launch\n"
4663 " / | _\\__V______\n"
4665 " / | | LAUNCHING |\n"
4666 " / | \\___________/\n"
4668 " / | guestfs_launch\n"
4670 " ______ / __|____V\n"
4671 " / \\ ------> / \\\n"
4672 " | BUSY | | READY |\n"
4673 " \\______/ <------ \\________/\n"
4679 #: ../src/guestfs.pod:2200
4681 "The normal transitions are (1) CONFIG (when the handle is created, but there "
4682 "is no child process), (2) LAUNCHING (when the child process is booting up), "
4683 "(3) alternating between READY and BUSY as commands are issued to, and "
4684 "carried out by, the child process."
4689 #: ../src/guestfs.pod:2205
4691 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
4692 "asynchronously at any time (eg. due to some internal error), and that causes "
4693 "the state to transition back to CONFIG."
4698 #: ../src/guestfs.pod:2209
4700 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
4701 "issued when in the CONFIG state."
4706 #: ../src/guestfs.pod:2212
4708 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
4709 "L</guestfs_launch> blocks until the child process is READY to accept "
4710 "commands (or until some failure or timeout). L</guestfs_launch> internally "
4711 "moves the state from CONFIG to LAUNCHING while it is running."
4716 #: ../src/guestfs.pod:2218
4718 "API actions such as L</guestfs_mount> can only be issued when in the READY "
4719 "state. These API calls block waiting for the command to be carried out (ie. "
4720 "the state to transition to BUSY and then back to READY). There are no non-"
4721 "blocking versions, and no way to issue more than one command per handle at "
4727 #: ../src/guestfs.pod:2224
4729 "Finally, the child process sends asynchronous messages back to the main "
4730 "program, such as kernel log messages. You can register a callback to "
4731 "receive these messages."
4736 #: ../src/guestfs.pod:2228
4742 #: ../src/guestfs.pod:2230
4743 msgid "COMMUNICATION PROTOCOL"
4748 #: ../src/guestfs.pod:2232
4750 "Don't rely on using this protocol directly. This section documents how it "
4751 "currently works, but it may change at any time."
4756 #: ../src/guestfs.pod:2235
4758 "The protocol used to talk between the library and the daemon running inside "
4759 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
4760 "1014, RFC 1832, RFC 4506)."
4765 #: ../src/guestfs.pod:2239
4767 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
4768 "this file is automatically generated)."
4773 #: ../src/guestfs.pod:2242
4775 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
4776 "and C<FileOut> parameters, which are handled with very simple request/reply "
4777 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
4778 "parameters, which use the same request and reply messages, but they may also "
4779 "be followed by files sent using a chunked encoding."
4784 #: ../src/guestfs.pod:2249
4785 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
4790 #: ../src/guestfs.pod:2251
4791 msgid "For ordinary functions, the request message is:"
4796 #: ../src/guestfs.pod:2253
4799 " total length (header + arguments,\n"
4800 " but not including the length word itself)\n"
4801 " struct guestfs_message_header (encoded as XDR)\n"
4802 " struct guestfs_<foo>_args (encoded as XDR)\n"
4808 #: ../src/guestfs.pod:2258
4810 "The total length field allows the daemon to allocate a fixed size buffer "
4811 "into which it slurps the rest of the message. As a result, the total length "
4812 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
4813 "effective size of any request is limited to somewhere under this size."
4818 #: ../src/guestfs.pod:2264
4820 "Note also that many functions don't take any arguments, in which case the "
4821 "C<guestfs_I<foo>_args> is completely omitted."
4826 #: ../src/guestfs.pod:2267
4828 "The header contains the procedure number (C<guestfs_proc>) which is how the "
4829 "receiver knows what type of args structure to expect, or none at all."
4834 #: ../src/guestfs.pod:2271
4836 "For functions that take optional arguments, the optional arguments are "
4837 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
4838 "arguments. A bitmask in the header indicates which optional arguments are "
4839 "meaningful. The bitmask is also checked to see if it contains bits set "
4840 "which the daemon does not know about (eg. if more optional arguments were "
4841 "added in a later version of the library), and this causes the call to be "
4847 #: ../src/guestfs.pod:2279
4848 msgid "The reply message for ordinary functions is:"
4853 #: ../src/guestfs.pod:2281
4856 " total length (header + ret,\n"
4857 " but not including the length word itself)\n"
4858 " struct guestfs_message_header (encoded as XDR)\n"
4859 " struct guestfs_<foo>_ret (encoded as XDR)\n"
4865 #: ../src/guestfs.pod:2286
4867 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
4868 "functions that return no formal return values."
4873 #: ../src/guestfs.pod:2289
4875 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
4880 #: ../src/guestfs.pod:2292
4882 "In the case of an error, a flag is set in the header, and the reply message "
4883 "is slightly changed:"
4888 #: ../src/guestfs.pod:2295
4891 " total length (header + error,\n"
4892 " but not including the length word itself)\n"
4893 " struct guestfs_message_header (encoded as XDR)\n"
4894 " struct guestfs_message_error (encoded as XDR)\n"
4900 #: ../src/guestfs.pod:2300
4902 "The C<guestfs_message_error> structure contains the error message as a "
4908 #: ../src/guestfs.pod:2303
4909 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
4914 #: ../src/guestfs.pod:2305
4916 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
4917 "The normal request message is sent (see above). However this is followed by "
4918 "a sequence of file chunks."
4923 #: ../src/guestfs.pod:2309
4926 " total length (header + arguments,\n"
4927 " but not including the length word itself,\n"
4928 " and not including the chunks)\n"
4929 " struct guestfs_message_header (encoded as XDR)\n"
4930 " struct guestfs_<foo>_args (encoded as XDR)\n"
4931 " sequence of chunks for FileIn param #0\n"
4932 " sequence of chunks for FileIn param #1 etc.\n"
4938 #: ../src/guestfs.pod:2317
4939 msgid "The \"sequence of chunks\" is:"
4944 #: ../src/guestfs.pod:2319
4947 " length of chunk (not including length word itself)\n"
4948 " struct guestfs_chunk (encoded as XDR)\n"
4949 " length of chunk\n"
4950 " struct guestfs_chunk (encoded as XDR)\n"
4952 " length of chunk\n"
4953 " struct guestfs_chunk (with data.data_len == 0)\n"
4959 #: ../src/guestfs.pod:2327
4961 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
4962 "is set in the final chunk to indicate either successful completion or early "
4968 #: ../src/guestfs.pod:2331
4970 "At time of writing there are no functions that have more than one FileIn "
4971 "parameter. However this is (theoretically) supported, by sending the "
4972 "sequence of chunks for each FileIn parameter one after another (from left to "
4978 #: ../src/guestfs.pod:2336
4980 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
4981 "transfer. The library does this by sending a chunk with a special flag set "
4982 "to indicate cancellation. When the daemon sees this, it cancels the whole "
4983 "RPC, does I<not> send any reply, and goes back to reading the next request."
4988 #: ../src/guestfs.pod:2342
4990 "The daemon may also cancel. It does this by writing a special word "
4991 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
4992 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
4993 "cancel chunk). The special word is chosen so that even if cancellation "
4994 "happens right at the end of the transfer (after the library has finished "
4995 "writing and has started listening for the reply), the \"spurious\" cancel "
4996 "flag will not be confused with the reply message."
5001 #: ../src/guestfs.pod:2351
5003 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
5004 "limit), and also files where the size is not known in advance (eg. from "
5005 "pipes or sockets). However the chunks are rather small "
5006 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
5007 "to keep much in memory."
5012 #: ../src/guestfs.pod:2357
5013 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
5018 #: ../src/guestfs.pod:2359
5020 "The protocol for FileOut parameters is exactly the same as for FileIn "
5021 "parameters, but with the roles of daemon and library reversed."
5026 #: ../src/guestfs.pod:2362
5029 " total length (header + ret,\n"
5030 " but not including the length word itself,\n"
5031 " and not including the chunks)\n"
5032 " struct guestfs_message_header (encoded as XDR)\n"
5033 " struct guestfs_<foo>_ret (encoded as XDR)\n"
5034 " sequence of chunks for FileOut param #0\n"
5035 " sequence of chunks for FileOut param #1 etc.\n"
5041 #: ../src/guestfs.pod:2370
5042 msgid "INITIAL MESSAGE"
5047 #: ../src/guestfs.pod:2372
5049 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
5050 "which indicates that the guest and daemon is alive. This is what L</"
5051 "guestfs_launch> waits for."
5056 #: ../src/guestfs.pod:2376
5057 msgid "PROGRESS NOTIFICATION MESSAGES"
5062 #: ../src/guestfs.pod:2378
5064 "The daemon may send progress notification messages at any time. These are "
5065 "distinguished by the normal length word being replaced by "
5066 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
5070 #: ../src/guestfs.pod:2382
5072 "The library turns them into progress callbacks (see L</"
5073 "GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards them "
5079 #: ../src/guestfs.pod:2386
5081 "The daemon self-limits the frequency of progress messages it sends (see "
5082 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
5088 #: ../src/guestfs.pod:2390
5089 msgid "LIBGUESTFS VERSION NUMBERS"
5094 #: ../src/guestfs.pod:2392
5096 "Since April 2010, libguestfs has started to make separate development and "
5097 "stable releases, along with corresponding branches in our git repository. "
5098 "These separate releases can be identified by version number:"
5103 #: ../src/guestfs.pod:2397
5106 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
5107 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
5113 " | `-------- sub-version\n"
5115 " `------ always '1' because we don't change the ABI\n"
5121 #: ../src/guestfs.pod:2408
5122 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
5127 #: ../src/guestfs.pod:2410
5129 "As time passes we cherry pick fixes from the development branch and backport "
5130 "those into the stable branch, the effect being that the stable branch should "
5131 "get more stable and less buggy over time. So the stable releases are ideal "
5132 "for people who don't need new features but would just like the software to "
5138 #: ../src/guestfs.pod:2416
5139 msgid "Our criteria for backporting changes are:"
5144 #: ../src/guestfs.pod:2422
5146 "Documentation changes which don't affect any code are backported unless the "
5147 "documentation refers to a future feature which is not in stable."
5152 #: ../src/guestfs.pod:2428
5154 "Bug fixes which are not controversial, fix obvious problems, and have been "
5155 "well tested are backported."
5160 #: ../src/guestfs.pod:2433
5162 "Simple rearrangements of code which shouldn't affect how it works get "
5163 "backported. This is so that the code in the two branches doesn't get too "
5164 "far out of step, allowing us to backport future fixes more easily."
5169 #: ../src/guestfs.pod:2439
5171 "We I<don't> backport new features, new APIs, new tools etc, except in one "
5172 "exceptional case: the new feature is required in order to implement an "
5173 "important bug fix."
5178 #: ../src/guestfs.pod:2445
5180 "A new stable branch starts when we think the new features in development are "
5181 "substantial and compelling enough over the current stable branch to warrant "
5182 "it. When that happens we create new stable and development versions 1.N.0 "
5183 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
5184 "stable at this point, but by backporting fixes from development, that branch "
5185 "will stabilize over time."
5189 #: ../src/guestfs.pod:2453
5190 msgid "EXTENDING LIBGUESTFS"
5194 #: ../src/guestfs.pod:2455
5195 msgid "ADDING A NEW API ACTION"
5199 #: ../src/guestfs.pod:2457
5201 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
5202 "documentation) are generated, and this makes it easy to extend the "
5207 #: ../src/guestfs.pod:2461
5208 msgid "To add a new API action there are two changes:"
5212 #: ../src/guestfs.pod:2467
5214 "You need to add a description of the call (name, parameters, return type, "
5215 "tests, documentation) to C<generator/generator_actions.ml>."
5219 #: ../src/guestfs.pod:2470
5221 "There are two sorts of API action, depending on whether the call goes "
5222 "through to the daemon in the appliance, or is serviced entirely by the "
5223 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
5224 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
5225 "an example of the latter, since a trace flag is maintained in the handle and "
5226 "all tracing is done on the library side."
5230 #: ../src/guestfs.pod:2478
5232 "Most new actions are of the first type, and get added to the "
5233 "C<daemon_functions> list. Each function has a unique procedure number used "
5234 "in the RPC protocol which is assigned to that action when we publish "
5235 "libguestfs and cannot be reused. Take the latest procedure number and "
5240 #: ../src/guestfs.pod:2484
5242 "For library-only actions of the second type, add to the "
5243 "C<non_daemon_functions> list. Since these functions are serviced by the "
5244 "library and do not travel over the RPC mechanism to the daemon, these "
5245 "functions do not need a procedure number, and so the procedure number is set "
5250 #: ../src/guestfs.pod:2492
5251 msgid "Implement the action (in C):"
5255 #: ../src/guestfs.pod:2494
5257 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
5258 "C<daemon/> directory."
5262 #: ../src/guestfs.pod:2497
5264 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
5265 "(note: double underscore) in the C<src/> directory."
5269 #: ../src/guestfs.pod:2500
5270 msgid "In either case, use another function as an example of what to do."
5274 #: ../src/guestfs.pod:2504
5275 msgid "After making these changes, use C<make> to compile."
5279 #: ../src/guestfs.pod:2506
5281 "Note that you don't need to implement the RPC, language bindings, manual "
5282 "pages or anything else. It's all automatically generated from the OCaml "
5287 #: ../src/guestfs.pod:2510
5288 msgid "ADDING TESTS FOR AN API ACTION"
5292 #: ../src/guestfs.pod:2512
5294 "You can supply zero or as many tests as you want per API call. The tests "
5295 "can either be added as part of the API description (C<generator/"
5296 "generator_actions.ml>), or in some rarer cases you may want to drop a script "
5297 "into C<regressions/>. Note that adding a script to C<regressions/> is "
5298 "slower, so if possible use the first method."
5302 #: ../src/guestfs.pod:2518
5304 "The following describes the test environment used when you add an API test "
5305 "in C<generator_actions.ml>."
5309 #: ../src/guestfs.pod:2521
5310 msgid "The test environment has 4 block devices:"
5314 #: ../src/guestfs.pod:2525
5315 msgid "C</dev/sda> 500MB"
5319 #: ../src/guestfs.pod:2527
5320 msgid "General block device for testing."
5324 #: ../src/guestfs.pod:2529
5325 msgid "C</dev/sdb> 50MB"
5329 #: ../src/guestfs.pod:2531
5331 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
5336 #: ../src/guestfs.pod:2534
5337 msgid "C</dev/sdc> 10MB"
5341 #: ../src/guestfs.pod:2536
5342 msgid "Used in a few tests where two block devices are needed."
5346 #: ../src/guestfs.pod:2538
5351 #: ../src/guestfs.pod:2540
5352 msgid "ISO with fixed content (see C<images/test.iso>)."
5356 #: ../src/guestfs.pod:2544
5358 "To be able to run the tests in a reasonable amount of time, the libguestfs "
5359 "appliance and block devices are reused between tests. So don't try testing "
5360 "L</guestfs_kill_subprocess> :-x"
5364 #: ../src/guestfs.pod:2548
5366 "Each test starts with an initial scenario, selected using one of the "
5367 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
5368 "initialize the disks mentioned above in a particular way as documented in "
5369 "C<generator_types.ml>. You should not assume anything about the previous "
5370 "contents of other disks that are not initialized."
5374 #: ../src/guestfs.pod:2554
5376 "You can add a prerequisite clause to any individual test. This is a run-"
5377 "time check, which, if it fails, causes the test to be skipped. Useful if "
5378 "testing a command which might not work on all variations of libguestfs "
5379 "builds. A test that has prerequisite of C<Always> means to run "
5384 #: ../src/guestfs.pod:2560
5386 "In addition, packagers can skip individual tests by setting environment "
5387 "variables before running C<make check>."
5391 #: ../src/guestfs.pod:2563
5394 " SKIP_TEST_<CMD>_<NUM>=1\n"
5399 #: ../src/guestfs.pod:2565
5400 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
5404 #: ../src/guestfs.pod:2567
5409 #: ../src/guestfs.pod:2569
5412 " SKIP_TEST_<CMD>=1\n"
5417 #: ../src/guestfs.pod:2571
5418 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
5422 #: ../src/guestfs.pod:2573
5423 msgid "Packagers can run only certain tests by setting for example:"
5427 #: ../src/guestfs.pod:2575
5430 " TEST_ONLY=\"vfs_type zerofree\"\n"
5435 #: ../src/guestfs.pod:2577
5437 "See C<capitests/tests.c> for more details of how these environment variables "
5442 #: ../src/guestfs.pod:2580
5443 msgid "DEBUGGING NEW API ACTIONS"
5447 #: ../src/guestfs.pod:2582
5448 msgid "Test new actions work before submitting them."
5452 #: ../src/guestfs.pod:2584
5453 msgid "You can use guestfish to try out new commands."
5457 #: ../src/guestfs.pod:2586
5459 "Debugging the daemon is a problem because it runs inside a minimal "
5460 "environment. However you can fprintf messages in the daemon to stderr, and "
5461 "they will show up if you use C<guestfish -v>."
5465 #: ../src/guestfs.pod:2590
5466 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
5470 #: ../src/guestfs.pod:2592
5472 "Our C source code generally adheres to some basic code-formatting "
5473 "conventions. The existing code base is not totally consistent on this "
5474 "front, but we do prefer that contributed code be formatted similarly. In "
5475 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
5476 "indentation level, and other than that, follow the K&R style."
5480 #: ../src/guestfs.pod:2598
5482 "If you use Emacs, add the following to one of one of your start-up files (e."
5483 "g., ~/.emacs), to help ensure that you get indentation right:"
5487 #: ../src/guestfs.pod:2601
5490 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
5491 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
5492 " (add-hook 'find-file-hook\n"
5493 " '(lambda () (if (and buffer-file-name\n"
5494 " (string-match \"/libguestfs\\\\>\"\n"
5495 " (buffer-file-name))\n"
5496 " (not (string-equal mode-name \"Change Log\"))\n"
5497 " (not (string-equal mode-name \"Makefile\")))\n"
5498 " (setq indent-tabs-mode nil))))\n"
5503 #: ../src/guestfs.pod:2611
5506 " ;;; When editing C sources in libguestfs, use this style.\n"
5507 " (defun libguestfs-c-mode ()\n"
5508 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
5510 " (c-set-style \"K&R\")\n"
5511 " (setq c-indent-level 2)\n"
5512 " (setq c-basic-offset 2))\n"
5513 " (add-hook 'c-mode-hook\n"
5514 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
5515 " (buffer-file-name))\n"
5516 " (libguestfs-c-mode))))\n"
5521 #: ../src/guestfs.pod:2623
5522 msgid "Enable warnings when compiling (and fix any problems this finds):"
5526 #: ../src/guestfs.pod:2626
5529 " ./configure --enable-gcc-warnings\n"
5534 #: ../src/guestfs.pod:2628
5535 msgid "Useful targets are:"
5539 #: ../src/guestfs.pod:2630
5542 " make syntax-check # checks the syntax of the C code\n"
5543 " make check # runs the test suite\n"
5548 #: ../src/guestfs.pod:2633
5549 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
5553 #: ../src/guestfs.pod:2635
5555 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
5556 "which are used to do shell quoting."
5560 #: ../src/guestfs.pod:2640
5565 #: ../src/guestfs.pod:2642
5567 "Simple shell quoted string. Any spaces or other shell characters are "
5572 #: ../src/guestfs.pod:2645
5577 #: ../src/guestfs.pod:2647
5579 "Same as C<%Q> except the string is treated as a path which is prefixed by "
5585 #: ../src/guestfs.pod:2652 ../fish/guestfish.pod:242 ../fish/guestfish.pod:673
5586 msgid "For example:"
5590 #: ../src/guestfs.pod:2654
5593 " asprintf (&cmd, \"cat %R\", path);\n"
5598 #: ../src/guestfs.pod:2656
5599 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
5603 #: ../src/guestfs.pod:2658
5605 "I<Note:> Do I<not> use these when you are passing parameters to the C<command"
5606 "{,r,v,rv}()> functions. These parameters do NOT need to be quoted because "
5607 "they are not passed via the shell (instead, straight to exec). You probably "
5608 "want to use the C<sysroot_path()> function however."
5612 #: ../src/guestfs.pod:2664
5613 msgid "SUBMITTING YOUR NEW API ACTIONS"
5617 #: ../src/guestfs.pod:2666
5619 "Submit patches to the mailing list: L<http://www.redhat.com/mailman/listinfo/"
5620 "libguestfs> and CC to L<rjones@redhat.com>."
5624 #: ../src/guestfs.pod:2670
5625 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
5629 #: ../src/guestfs.pod:2672
5630 msgid "We support i18n (gettext anyhow) in the library."
5634 #: ../src/guestfs.pod:2674
5636 "However many messages come from the daemon, and we don't translate those at "
5637 "the moment. One reason is that the appliance generally has all locale files "
5638 "removed from it, because they take up a lot of space. So we'd have to readd "
5639 "some of those, as well as copying our PO files into the appliance."
5643 #: ../src/guestfs.pod:2680
5645 "Debugging messages are never translated, since they are intended for the "
5650 #: ../src/guestfs.pod:2683
5651 msgid "SOURCE CODE SUBDIRECTORIES"
5655 #: ../src/guestfs.pod:2687 ../src/guestfs-actions.pod:6174
5656 #: ../fish/guestfish-actions.pod:4072
5657 msgid "C<appliance>"
5661 #: ../src/guestfs.pod:2689
5662 msgid "The libguestfs appliance, build scripts and so on."
5666 #: ../src/guestfs.pod:2691
5667 msgid "C<capitests>"
5671 #: ../src/guestfs.pod:2693
5672 msgid "Automated tests of the C API."
5676 #: ../src/guestfs.pod:2695
5681 #: ../src/guestfs.pod:2697
5683 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
5688 #: ../src/guestfs.pod:2700
5693 #: ../src/guestfs.pod:2702
5695 "Safety and liveness tests of components that libguestfs depends upon (not of "
5696 "libguestfs itself). Mainly this is for qemu and the kernel."
5700 #: ../src/guestfs.pod:2705
5705 #: ../src/guestfs.pod:2707
5706 msgid "Outside contributions, experimental parts."
5710 #: ../src/guestfs.pod:2709
5715 #: ../src/guestfs.pod:2711
5717 "The daemon that runs inside the libguestfs appliance and carries out actions."
5721 #: ../src/guestfs.pod:2714
5726 #: ../src/guestfs.pod:2716
5727 msgid "L<virt-df(1)> command and documentation."
5731 #: ../src/guestfs.pod:2718
5736 #: ../src/guestfs.pod:2720
5737 msgid "L<virt-edit(1)> command and documentation."
5741 #: ../src/guestfs.pod:2722
5746 #: ../src/guestfs.pod:2724
5747 msgid "C API example code."
5751 #: ../src/guestfs.pod:2726
5756 #: ../src/guestfs.pod:2728
5758 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
5759 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
5760 "L<virt-tar-out(1)>."
5764 #: ../src/guestfs.pod:2732
5769 #: ../src/guestfs.pod:2734
5771 "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
5775 #: ../src/guestfs.pod:2736
5776 msgid "C<generator>"
5780 #: ../src/guestfs.pod:2738
5782 "The crucially important generator, used to automatically generate large "
5783 "amounts of boilerplate C code for things like RPC and bindings."
5787 #: ../src/guestfs.pod:2741
5792 #: ../src/guestfs.pod:2743
5793 msgid "Files used by the test suite."
5797 #: ../src/guestfs.pod:2745
5798 msgid "Some \"phony\" guest images which we test against."
5802 #: ../src/guestfs.pod:2747
5803 msgid "C<inspector>"
5807 #: ../src/guestfs.pod:2749
5808 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
5812 #: ../src/guestfs.pod:2751
5817 #: ../src/guestfs.pod:2753
5818 msgid "Logo used on the website. The fish is called Arthur by the way."
5822 #: ../src/guestfs.pod:2755
5827 #: ../src/guestfs.pod:2757
5828 msgid "M4 macros used by autoconf."
5832 #: ../src/guestfs.pod:2759
5837 #: ../src/guestfs.pod:2761
5838 msgid "Translations of simple gettext strings."
5842 #: ../src/guestfs.pod:2763
5847 #: ../src/guestfs.pod:2765
5849 "The build infrastructure and PO files for translations of manpages and POD "
5850 "files. Eventually this will be combined with the C<po> directory, but that "
5851 "is rather complicated."
5855 #: ../src/guestfs.pod:2769
5856 msgid "C<regressions>"
5860 #: ../src/guestfs.pod:2771
5861 msgid "Regression tests."
5865 #: ../src/guestfs.pod:2773
5870 #: ../src/guestfs.pod:2775
5871 msgid "L<virt-rescue(1)> command and documentation."
5875 #: ../src/guestfs.pod:2777
5880 #: ../src/guestfs.pod:2779
5881 msgid "Source code to the C library."
5885 #: ../src/guestfs.pod:2781
5890 #: ../src/guestfs.pod:2783
5891 msgid "Command line tools written in Perl (L<virt-resize(1)> and many others)."
5895 #: ../src/guestfs.pod:2785
5896 msgid "C<test-tool>"
5900 #: ../src/guestfs.pod:2787
5902 "Test tool for end users to test if their qemu/kernel combination will work "
5907 #: ../src/guestfs.pod:2790
5912 #: ../src/guestfs.pod:2792
5917 #: ../src/guestfs.pod:2794
5922 #: ../src/guestfs.pod:2796
5927 #: ../src/guestfs.pod:2798
5932 #: ../src/guestfs.pod:2800
5937 #: ../src/guestfs.pod:2802
5942 #: ../src/guestfs.pod:2804
5947 #: ../src/guestfs.pod:2806
5948 msgid "Language bindings."
5952 #: ../src/guestfs.pod:2810
5958 #: ../src/guestfs.pod:2812
5959 msgid "PROTOCOL LIMITS"
5964 #: ../src/guestfs.pod:2814
5966 "Internally libguestfs uses a message-based protocol to pass API calls and "
5967 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
5968 "plenty more detail about this). The maximum message size used by the "
5969 "protocol is slightly less than 4 MB. For some API calls you may need to be "
5970 "aware of this limit. The API calls which may be affected are individually "
5971 "documented, with a link back to this section of the documentation."
5976 #: ../src/guestfs.pod:2822
5978 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
5979 "a simple string. Because this string is at some point internally encoded as "
5980 "a message, the maximum size that it can return is slightly under 4 MB. If "
5981 "the requested file is larger than this then you will get an error."
5986 #: ../src/guestfs.pod:2828
5988 "In order to transfer large files into and out of the guest filesystem, you "
5989 "need to use particular calls that support this. The sections L</UPLOADING> "
5990 "and L</DOWNLOADING> document how to do this."
5995 #: ../src/guestfs.pod:2832
5997 "You might also consider mounting the disk image using our FUSE filesystem "
5998 "support (L<guestmount(1)>)."
6002 #: ../src/guestfs.pod:2835
6003 msgid "MAXIMUM NUMBER OF DISKS"
6007 #: ../src/guestfs.pod:2837
6008 msgid "When using virtio disks (the default) the current limit is B<25> disks."
6012 #: ../src/guestfs.pod:2840
6014 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
6015 "slots. However febootstrap only understands disks with names C</dev/vda> "
6016 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
6021 #: ../src/guestfs.pod:2845
6023 "We are working to substantially raise this limit in future versions but it "
6024 "requires complex changes to qemu."
6028 #: ../src/guestfs.pod:2848
6030 "In future versions of libguestfs it should also be possible to \"hot plug\" "
6031 "disks (add and remove disks after calling L</guestfs_launch>). This also "
6032 "requires changes to qemu."
6036 #: ../src/guestfs.pod:2852
6037 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
6041 #: ../src/guestfs.pod:2854
6042 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
6046 #: ../src/guestfs.pod:2856
6048 "This is because it reserves 4 bits for the minor device number (thus C</dev/"
6049 "vda>, and C</dev/vda1> through C</dev/vda15>)."
6053 #: ../src/guestfs.pod:2859
6055 "If you attach a disk with more than 15 partitions, the extra partitions are "
6056 "ignored by libguestfs."
6060 #: ../src/guestfs.pod:2862
6061 msgid "MAXIMUM SIZE OF A DISK"
6065 #: ../src/guestfs.pod:2864
6066 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
6070 #: ../src/guestfs.pod:2866
6072 "We have tested block devices up to 1 exabyte (2**60 or "
6073 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
6078 #: ../src/guestfs.pod:2870
6080 "Although libguestfs probably does not impose any limit, the underlying host "
6081 "storage will. If you store disk images on a host ext4 filesystem, then the "
6082 "maximum size will be limited by the maximum ext4 file size (currently 16 "
6083 "TB). If you store disk images as host logical volumes then you are limited "
6084 "by the maximum size of an LV."
6088 #: ../src/guestfs.pod:2876
6090 "For the hugest disk image files, we recommend using XFS on the host for "
6095 #: ../src/guestfs.pod:2879
6096 msgid "MAXIMUM SIZE OF A PARTITION"
6100 #: ../src/guestfs.pod:2881
6102 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
6103 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
6104 "address a partition located beyond 2 TB on the disk."
6108 #: ../src/guestfs.pod:2885
6110 "It is recommended that you use GPT partitions on disks which are larger than "
6111 "this size. GPT uses 64 bit sector numbers and so can address partitions "
6112 "which are theoretically larger than the largest disk we could support."
6116 #: ../src/guestfs.pod:2890
6117 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
6121 #: ../src/guestfs.pod:2892
6123 "This depends on the filesystem type. libguestfs itself does not impose any "
6124 "known limit. Consult Wikipedia or the filesystem documentation to find out "
6125 "what these limits are."
6129 #: ../src/guestfs.pod:2896
6130 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
6134 #: ../src/guestfs.pod:2898
6136 "The API functions L</guestfs_upload>, L</guestfs_download>, L</"
6137 "guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
6138 "uploads and downloads."
6142 #: ../src/guestfs.pod:2902
6143 msgid "INSPECTION LIMITS"
6147 #: ../src/guestfs.pod:2904
6149 "The inspection code has several arbitrary limits on things like the size of "
6150 "Windows Registry hive it will read, and the length of product name. These "
6151 "are intended to stop a malicious guest from consuming arbitrary amounts of "
6152 "memory and disk space on the host, and should not be reached in practice. "
6153 "See the source code for more information."
6158 #: ../src/guestfs.pod:2910 ../fish/guestfish.pod:1075
6159 #: ../test-tool/libguestfs-test-tool.pod:82
6160 msgid "ENVIRONMENT VARIABLES"
6165 #: ../src/guestfs.pod:2914 ../fish/guestfish.pod:1106
6166 msgid "LIBGUESTFS_APPEND"
6171 #: ../src/guestfs.pod:2916 ../fish/guestfish.pod:1108
6172 msgid "Pass additional options to the guest kernel."
6177 #: ../src/guestfs.pod:2918 ../fish/guestfish.pod:1110
6178 msgid "LIBGUESTFS_DEBUG"
6183 #: ../src/guestfs.pod:2920
6185 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
6186 "effect as calling C<guestfs_set_verbose (g, 1)>."
6191 #: ../src/guestfs.pod:2923 ../fish/guestfish.pod:1115
6192 msgid "LIBGUESTFS_MEMSIZE"
6197 #: ../src/guestfs.pod:2925 ../fish/guestfish.pod:1117
6199 "Set the memory allocated to the qemu process, in megabytes. For example:"
6204 #: ../src/guestfs.pod:2928 ../fish/guestfish.pod:1120
6207 " LIBGUESTFS_MEMSIZE=700\n"
6213 #: ../src/guestfs.pod:2930 ../fish/guestfish.pod:1122
6214 msgid "LIBGUESTFS_PATH"
6218 #: ../src/guestfs.pod:2932
6220 "Set the path that libguestfs uses to search for a supermin appliance. See "
6221 "the discussion of paths in section L</PATH> above."
6226 #: ../src/guestfs.pod:2935 ../fish/guestfish.pod:1127
6227 msgid "LIBGUESTFS_QEMU"
6232 #: ../src/guestfs.pod:2937 ../fish/guestfish.pod:1129
6234 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
6235 "which was found at compile time by the configure script is used."
6240 #: ../src/guestfs.pod:2941
6241 msgid "See also L</QEMU WRAPPERS> above."
6246 #: ../src/guestfs.pod:2943 ../fish/guestfish.pod:1133
6247 msgid "LIBGUESTFS_TRACE"
6252 #: ../src/guestfs.pod:2945
6254 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
6255 "effect as calling C<guestfs_set_trace (g, 1)>."
6260 #: ../src/guestfs.pod:2948 ../fish/guestfish.pod:1142
6265 #: ../src/guestfs.pod:2950 ../fish/guestfish.pod:1144
6267 "Location of temporary directory, defaults to C</tmp> except for the cached "
6268 "supermin appliance which defaults to C</var/tmp>."
6272 #: ../src/guestfs.pod:2953 ../fish/guestfish.pod:1147
6274 "If libguestfs was compiled to use the supermin appliance then the real "
6275 "appliance is cached in this directory, shared between all handles belonging "
6276 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
6277 "use in case C</var/tmp> is not large enough."
6282 #: ../src/guestfs.pod:2961 ../fish/guestfish.pod:1214
6283 #: ../test-tool/libguestfs-test-tool.pod:87 ../fuse/guestmount.pod:279
6284 #: ../tools/virt-win-reg.pl:744 ../tools/virt-list-filesystems.pl:189
6285 #: ../tools/virt-tar.pl:286 ../tools/virt-make-fs.pl:539
6286 #: ../tools/virt-list-partitions.pl:257
6291 #: ../src/guestfs.pod:2963
6293 "L<guestfs-examples(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, L<guestfs-"
6294 "ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-copy-in"
6295 "(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems"
6296 "(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-"
6297 "partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-"
6298 "tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<qemu(1)"
6299 ">, L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
6304 #: ../src/guestfs.pod:2990
6306 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
6307 "(8)>, L<disktype(1)>."
6312 #: ../src/guestfs.pod:2997 ../tools/virt-win-reg.pl:759
6313 #: ../tools/virt-make-fs.pl:553
6319 #: ../src/guestfs.pod:2999
6320 msgid "To get a list of bugs against libguestfs use this link:"
6325 #: ../src/guestfs.pod:3001
6327 "L<https://bugzilla.redhat.com/buglist.cgi?"
6328 "component=libguestfs&product=Virtualization+Tools>"
6333 #: ../src/guestfs.pod:3003
6334 msgid "To report a new bug against libguestfs use this link:"
6339 #: ../src/guestfs.pod:3005
6341 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
6342 "component=libguestfs&product=Virtualization+Tools>"
6347 #: ../src/guestfs.pod:3007
6348 msgid "When reporting a bug, please check:"
6353 #: ../src/guestfs.pod:3013
6354 msgid "That the bug hasn't been reported already."
6359 #: ../src/guestfs.pod:3017
6360 msgid "That you are testing a recent version."
6365 #: ../src/guestfs.pod:3021
6366 msgid "Describe the bug accurately, and give a way to reproduce it."
6371 #: ../src/guestfs.pod:3025
6373 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
6379 #: ../src/guestfs.pod:3030 ../fish/guestfish.pod:1238
6380 #: ../test-tool/libguestfs-test-tool.pod:93 ../fuse/guestmount.pod:290
6386 #: ../src/guestfs.pod:3032 ../fish/guestfish.pod:1240
6387 #: ../test-tool/libguestfs-test-tool.pod:95 ../fuse/guestmount.pod:292
6388 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
6393 #: ../src/guestfs.pod:3034 ../fish/guestfish.pod:1242
6394 #: ../test-tool/libguestfs-test-tool.pod:97 ../fuse/guestmount.pod:294
6395 #: ../tools/virt-win-reg.pl:774 ../tools/virt-list-filesystems.pl:206
6396 #: ../tools/virt-tar.pl:305 ../tools/virt-make-fs.pl:568
6397 #: ../tools/virt-list-partitions.pl:273
6402 #: ../src/guestfs.pod:3036 ../fish/guestfish.pod:1244
6403 #: ../test-tool/libguestfs-test-tool.pod:99
6404 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
6409 #: ../src/guestfs.pod:3039
6411 "This library is free software; you can redistribute it and/or modify it "
6412 "under the terms of the GNU Lesser General Public License as published by the "
6413 "Free Software Foundation; either version 2 of the License, or (at your "
6414 "option) any later version."
6419 #: ../src/guestfs.pod:3044
6421 "This library is distributed in the hope that it will be useful, but WITHOUT "
6422 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
6423 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
6429 #: ../src/guestfs.pod:3049
6431 "You should have received a copy of the GNU Lesser General Public License "
6432 "along with this library; if not, write to the Free Software Foundation, "
6433 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
6438 #: ../src/guestfs-actions.pod:1
6439 msgid "guestfs_add_cdrom"
6444 #: ../src/guestfs-actions.pod:3
6448 " guestfs_add_cdrom (guestfs_h *g,\n"
6449 " const char *filename);\n"
6455 #: ../src/guestfs-actions.pod:7 ../fish/guestfish-actions.pod:5
6456 msgid "This function adds a virtual CD-ROM disk image to the guest."
6460 #: ../src/guestfs-actions.pod:9 ../fish/guestfish-actions.pod:7
6461 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
6466 #: ../src/guestfs-actions.pod:17
6468 "This call checks for the existence of C<filename>. This stops you from "
6469 "specifying other types of drive which are supported by qemu such as C<nbd:> "
6470 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
6476 #: ../src/guestfs-actions.pod:24
6478 "If you just want to add an ISO file (often you use this as an efficient way "
6479 "to transfer large files into the guest), then you should probably use "
6480 "C<guestfs_add_drive_ro> instead."
6485 #: ../src/guestfs-actions.pod:30 ../src/guestfs-actions.pod:140
6486 #: ../src/guestfs-actions.pod:201 ../src/guestfs-actions.pod:238
6487 #: ../src/guestfs-actions.pod:252 ../src/guestfs-actions.pod:273
6488 #: ../src/guestfs-actions.pod:293 ../src/guestfs-actions.pod:307
6489 #: ../src/guestfs-actions.pod:422 ../src/guestfs-actions.pod:442
6490 #: ../src/guestfs-actions.pod:456 ../src/guestfs-actions.pod:501
6491 #: ../src/guestfs-actions.pod:529 ../src/guestfs-actions.pod:547
6492 #: ../src/guestfs-actions.pod:614 ../src/guestfs-actions.pod:647
6493 #: ../src/guestfs-actions.pod:661 ../src/guestfs-actions.pod:676
6494 #: ../src/guestfs-actions.pod:775 ../src/guestfs-actions.pod:793
6495 #: ../src/guestfs-actions.pod:807 ../src/guestfs-actions.pod:821
6496 #: ../src/guestfs-actions.pod:858 ../src/guestfs-actions.pod:1041
6497 #: ../src/guestfs-actions.pod:1061 ../src/guestfs-actions.pod:1079
6498 #: ../src/guestfs-actions.pod:1163 ../src/guestfs-actions.pod:1181
6499 #: ../src/guestfs-actions.pod:1200 ../src/guestfs-actions.pod:1214
6500 #: ../src/guestfs-actions.pod:1234 ../src/guestfs-actions.pod:1304
6501 #: ../src/guestfs-actions.pod:1335 ../src/guestfs-actions.pod:1360
6502 #: ../src/guestfs-actions.pod:1402 ../src/guestfs-actions.pod:1508
6503 #: ../src/guestfs-actions.pod:1542 ../src/guestfs-actions.pod:1757
6504 #: ../src/guestfs-actions.pod:1779 ../src/guestfs-actions.pod:1866
6505 #: ../src/guestfs-actions.pod:2339 ../src/guestfs-actions.pod:2483
6506 #: ../src/guestfs-actions.pod:2544 ../src/guestfs-actions.pod:2579
6507 #: ../src/guestfs-actions.pod:3619 ../src/guestfs-actions.pod:3634
6508 #: ../src/guestfs-actions.pod:3659 ../src/guestfs-actions.pod:3848
6509 #: ../src/guestfs-actions.pod:3862 ../src/guestfs-actions.pod:3875
6510 #: ../src/guestfs-actions.pod:3889 ../src/guestfs-actions.pod:3904
6511 #: ../src/guestfs-actions.pod:3940 ../src/guestfs-actions.pod:4012
6512 #: ../src/guestfs-actions.pod:4032 ../src/guestfs-actions.pod:4049
6513 #: ../src/guestfs-actions.pod:4072 ../src/guestfs-actions.pod:4095
6514 #: ../src/guestfs-actions.pod:4130 ../src/guestfs-actions.pod:4149
6515 #: ../src/guestfs-actions.pod:4168 ../src/guestfs-actions.pod:4203
6516 #: ../src/guestfs-actions.pod:4215 ../src/guestfs-actions.pod:4251
6517 #: ../src/guestfs-actions.pod:4267 ../src/guestfs-actions.pod:4280
6518 #: ../src/guestfs-actions.pod:4295 ../src/guestfs-actions.pod:4312
6519 #: ../src/guestfs-actions.pod:4405 ../src/guestfs-actions.pod:4425
6520 #: ../src/guestfs-actions.pod:4438 ../src/guestfs-actions.pod:4489
6521 #: ../src/guestfs-actions.pod:4507 ../src/guestfs-actions.pod:4525
6522 #: ../src/guestfs-actions.pod:4541 ../src/guestfs-actions.pod:4555
6523 #: ../src/guestfs-actions.pod:4569 ../src/guestfs-actions.pod:4586
6524 #: ../src/guestfs-actions.pod:4601 ../src/guestfs-actions.pod:4621
6525 #: ../src/guestfs-actions.pod:4691 ../src/guestfs-actions.pod:4764
6526 #: ../src/guestfs-actions.pod:4795 ../src/guestfs-actions.pod:4814
6527 #: ../src/guestfs-actions.pod:4833 ../src/guestfs-actions.pod:4845
6528 #: ../src/guestfs-actions.pod:4862 ../src/guestfs-actions.pod:4875
6529 #: ../src/guestfs-actions.pod:4890 ../src/guestfs-actions.pod:4905
6530 #: ../src/guestfs-actions.pod:4940 ../src/guestfs-actions.pod:4973
6531 #: ../src/guestfs-actions.pod:5012 ../src/guestfs-actions.pod:5032
6532 #: ../src/guestfs-actions.pod:5046 ../src/guestfs-actions.pod:5063
6533 #: ../src/guestfs-actions.pod:5112 ../src/guestfs-actions.pod:5158
6534 #: ../src/guestfs-actions.pod:5212 ../src/guestfs-actions.pod:5248
6535 #: ../src/guestfs-actions.pod:5283 ../src/guestfs-actions.pod:5300
6536 #: ../src/guestfs-actions.pod:5318 ../src/guestfs-actions.pod:5452
6537 #: ../src/guestfs-actions.pod:5509 ../src/guestfs-actions.pod:5531
6538 #: ../src/guestfs-actions.pod:5549 ../src/guestfs-actions.pod:5581
6539 #: ../src/guestfs-actions.pod:5647 ../src/guestfs-actions.pod:5664
6540 #: ../src/guestfs-actions.pod:5677 ../src/guestfs-actions.pod:5691
6541 #: ../src/guestfs-actions.pod:5980 ../src/guestfs-actions.pod:5999
6542 #: ../src/guestfs-actions.pod:6018 ../src/guestfs-actions.pod:6032
6543 #: ../src/guestfs-actions.pod:6044 ../src/guestfs-actions.pod:6058
6544 #: ../src/guestfs-actions.pod:6070 ../src/guestfs-actions.pod:6084
6545 #: ../src/guestfs-actions.pod:6100 ../src/guestfs-actions.pod:6121
6546 #: ../src/guestfs-actions.pod:6140 ../src/guestfs-actions.pod:6159
6547 #: ../src/guestfs-actions.pod:6189 ../src/guestfs-actions.pod:6207
6548 #: ../src/guestfs-actions.pod:6230 ../src/guestfs-actions.pod:6248
6549 #: ../src/guestfs-actions.pod:6267 ../src/guestfs-actions.pod:6288
6550 #: ../src/guestfs-actions.pod:6307 ../src/guestfs-actions.pod:6324
6551 #: ../src/guestfs-actions.pod:6343 ../src/guestfs-actions.pod:6369
6552 #: ../src/guestfs-actions.pod:6393 ../src/guestfs-actions.pod:6412
6553 #: ../src/guestfs-actions.pod:6436 ../src/guestfs-actions.pod:6455
6554 #: ../src/guestfs-actions.pod:6470 ../src/guestfs-actions.pod:6489
6555 #: ../src/guestfs-actions.pod:6526 ../src/guestfs-actions.pod:6556
6556 #: ../src/guestfs-actions.pod:6589 ../src/guestfs-actions.pod:6711
6557 #: ../src/guestfs-actions.pod:6832 ../src/guestfs-actions.pod:6844
6558 #: ../src/guestfs-actions.pod:6857 ../src/guestfs-actions.pod:6870
6559 #: ../src/guestfs-actions.pod:6892 ../src/guestfs-actions.pod:6905
6560 #: ../src/guestfs-actions.pod:6918 ../src/guestfs-actions.pod:6931
6561 #: ../src/guestfs-actions.pod:6946 ../src/guestfs-actions.pod:7005
6562 #: ../src/guestfs-actions.pod:7022 ../src/guestfs-actions.pod:7038
6563 #: ../src/guestfs-actions.pod:7054 ../src/guestfs-actions.pod:7071
6564 #: ../src/guestfs-actions.pod:7084 ../src/guestfs-actions.pod:7104
6565 #: ../src/guestfs-actions.pod:7140 ../src/guestfs-actions.pod:7154
6566 #: ../src/guestfs-actions.pod:7195 ../src/guestfs-actions.pod:7208
6567 #: ../src/guestfs-actions.pod:7226 ../src/guestfs-actions.pod:7260
6568 #: ../src/guestfs-actions.pod:7296 ../src/guestfs-actions.pod:7412
6569 #: ../src/guestfs-actions.pod:7427 ../src/guestfs-actions.pod:7441
6570 #: ../src/guestfs-actions.pod:7496 ../src/guestfs-actions.pod:7509
6571 #: ../src/guestfs-actions.pod:7554 ../src/guestfs-actions.pod:7587
6572 #: ../src/guestfs-actions.pod:7650 ../src/guestfs-actions.pod:7670
6573 #: ../src/guestfs-actions.pod:7694 ../src/guestfs-actions.pod:7761
6574 #: ../src/guestfs-actions.pod:7780 ../src/guestfs-actions.pod:7809
6575 msgid "This function returns 0 on success or -1 on error."
6580 #: ../src/guestfs-actions.pod:32 ../src/guestfs-actions.pod:254
6581 #: ../src/guestfs-actions.pod:275 ../fish/guestfish-actions.pod:28
6582 #: ../fish/guestfish-actions.pod:163 ../fish/guestfish-actions.pod:177
6584 "This function is deprecated. In new code, use the C<add_drive_opts> call "
6590 #: ../src/guestfs-actions.pod:35 ../src/guestfs-actions.pod:257
6591 #: ../src/guestfs-actions.pod:278 ../src/guestfs-actions.pod:1513
6592 #: ../src/guestfs-actions.pod:2008 ../src/guestfs-actions.pod:2029
6593 #: ../src/guestfs-actions.pod:4626 ../src/guestfs-actions.pod:4945
6594 #: ../src/guestfs-actions.pod:5163 ../src/guestfs-actions.pod:5253
6595 #: ../src/guestfs-actions.pod:6534 ../src/guestfs-actions.pod:6564
6596 #: ../src/guestfs-actions.pod:6597 ../src/guestfs-actions.pod:6656
6597 #: ../src/guestfs-actions.pod:7592 ../src/guestfs-actions.pod:7702
6598 #: ../src/guestfs-actions.pod:7872 ../fish/guestfish-actions.pod:31
6599 #: ../fish/guestfish-actions.pod:166 ../fish/guestfish-actions.pod:180
6600 #: ../fish/guestfish-actions.pod:986 ../fish/guestfish-actions.pod:1346
6601 #: ../fish/guestfish-actions.pod:1360 ../fish/guestfish-actions.pod:3085
6602 #: ../fish/guestfish-actions.pod:3292 ../fish/guestfish-actions.pod:3406
6603 #: ../fish/guestfish-actions.pod:3454 ../fish/guestfish-actions.pod:4349
6604 #: ../fish/guestfish-actions.pod:4372 ../fish/guestfish-actions.pod:4394
6605 #: ../fish/guestfish-actions.pod:4432 ../fish/guestfish-actions.pod:5081
6606 #: ../fish/guestfish-actions.pod:5179
6608 "Deprecated functions will not be removed from the API, but the fact that "
6609 "they are deprecated indicates that there are problems with correct use of "
6615 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:142
6616 #: ../src/guestfs-actions.pod:1165 ../src/guestfs-actions.pod:1980
6617 #: ../src/guestfs-actions.pod:2078 ../src/guestfs-actions.pod:2190
6618 #: ../src/guestfs-actions.pod:3621 ../src/guestfs-actions.pod:3641
6619 #: ../src/guestfs-actions.pod:4949 ../src/guestfs-actions.pod:6209
6620 #: ../src/guestfs-actions.pod:6326 ../src/guestfs-actions.pod:6457
6621 #: ../src/guestfs-actions.pod:6948 ../src/guestfs-actions.pod:7073
6622 #: ../src/guestfs-actions.pod:7596
6623 msgid "(Added in 0.3)"
6628 #: ../src/guestfs-actions.pod:41
6629 msgid "guestfs_add_domain"
6634 #: ../src/guestfs-actions.pod:43
6638 " guestfs_add_domain (guestfs_h *g,\n"
6639 " const char *dom,\n"
6646 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:151
6647 #: ../src/guestfs-actions.pod:832 ../src/guestfs-actions.pod:2824
6648 #: ../src/guestfs-actions.pod:4640 ../src/guestfs-actions.pod:4959
6649 #: ../src/guestfs-actions.pod:5176
6651 "You may supply a list of optional arguments to this call. Use zero or more "
6652 "of the following pairs of parameters, and terminate the list with C<-1> on "
6653 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
6657 #: ../src/guestfs-actions.pod:53
6660 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
6661 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
6662 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
6663 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
6664 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
6670 #: ../src/guestfs-actions.pod:59
6672 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
6673 "It works by connecting to libvirt, requesting the domain and domain XML from "
6674 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
6680 #: ../src/guestfs-actions.pod:64 ../fish/guestfish-actions.pod:46
6682 "The number of disks added is returned. This operation is atomic: if an "
6683 "error is returned, then no disks are added."
6688 #: ../src/guestfs-actions.pod:67 ../fish/guestfish-actions.pod:49
6690 "This function does some minimal checks to make sure the libvirt domain is "
6691 "not running (unless C<readonly> is true). In a future version we will try "
6692 "to acquire the libvirt lock on each disk."
6697 #: ../src/guestfs-actions.pod:71 ../fish/guestfish-actions.pod:53
6699 "Disks must be accessible locally. This often means that adding disks from a "
6700 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
6701 "unless those disks are accessible via the same device path locally too."
6705 #: ../src/guestfs-actions.pod:76 ../fish/guestfish-actions.pod:58
6707 "The optional C<libvirturi> parameter sets the libvirt URI (see L<http://"
6708 "libvirt.org/uri.html>). If this is not set then we connect to the default "
6709 "libvirt URI (or one set through an environment variable, see the libvirt "
6710 "documentation for full details)."
6714 #: ../src/guestfs-actions.pod:82 ../fish/guestfish-actions.pod:64
6716 "The optional C<live> flag controls whether this call will try to connect to "
6717 "a running virtual machine C<guestfsd> process if it sees a suitable "
6718 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
6719 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
6720 "DAEMONS> for more information."
6724 #: ../src/guestfs-actions.pod:89 ../fish/guestfish-actions.pod:71
6726 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
6727 "passed instead of the domain name. The C<dom> string is treated as a UUID "
6728 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
6734 #: ../src/guestfs-actions.pod:94
6736 "The other optional parameters are passed directly through to "
6737 "C<guestfs_add_drive_opts>."
6742 #: ../src/guestfs-actions.pod:97 ../src/guestfs-actions.pod:350
6743 #: ../src/guestfs-actions.pod:515 ../src/guestfs-actions.pod:693
6744 #: ../src/guestfs-actions.pod:724 ../src/guestfs-actions.pod:742
6745 #: ../src/guestfs-actions.pod:761 ../src/guestfs-actions.pod:1380
6746 #: ../src/guestfs-actions.pod:1736 ../src/guestfs-actions.pod:1939
6747 #: ../src/guestfs-actions.pod:2050 ../src/guestfs-actions.pod:2099
6748 #: ../src/guestfs-actions.pod:2154 ../src/guestfs-actions.pod:2177
6749 #: ../src/guestfs-actions.pod:2470 ../src/guestfs-actions.pod:2942
6750 #: ../src/guestfs-actions.pod:2960 ../src/guestfs-actions.pod:5135
6751 #: ../src/guestfs-actions.pod:5355 ../src/guestfs-actions.pod:5761
6752 #: ../src/guestfs-actions.pod:5787 ../src/guestfs-actions.pod:7181
6753 #: ../src/guestfs-actions.pod:7607 ../src/guestfs-actions.pod:7620
6754 #: ../src/guestfs-actions.pod:7633
6755 msgid "On error this function returns -1."
6760 #: ../src/guestfs-actions.pod:99
6761 msgid "(Added in 1.7.4)"
6766 #: ../src/guestfs-actions.pod:101
6767 msgid "guestfs_add_domain_va"
6772 #: ../src/guestfs-actions.pod:103
6776 " guestfs_add_domain_va (guestfs_h *g,\n"
6777 " const char *dom,\n"
6784 #: ../src/guestfs-actions.pod:108
6785 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
6790 #: ../src/guestfs-actions.pod:110 ../src/guestfs-actions.pod:121
6791 #: ../src/guestfs-actions.pod:214 ../src/guestfs-actions.pod:225
6792 #: ../src/guestfs-actions.pod:871 ../src/guestfs-actions.pod:882
6793 #: ../src/guestfs-actions.pod:2908 ../src/guestfs-actions.pod:2920
6794 #: ../src/guestfs-actions.pod:4705 ../src/guestfs-actions.pod:4717
6795 #: ../src/guestfs-actions.pod:4987 ../src/guestfs-actions.pod:4999
6796 #: ../src/guestfs-actions.pod:5225 ../src/guestfs-actions.pod:5236
6797 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
6802 #: ../src/guestfs-actions.pod:112
6803 msgid "guestfs_add_domain_argv"
6808 #: ../src/guestfs-actions.pod:114
6812 " guestfs_add_domain_argv (guestfs_h *g,\n"
6813 " const char *dom,\n"
6814 " const struct guestfs_add_domain_argv *optargs);\n"
6820 #: ../src/guestfs-actions.pod:119
6821 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
6826 #: ../src/guestfs-actions.pod:123
6827 msgid "guestfs_add_drive"
6832 #: ../src/guestfs-actions.pod:125
6836 " guestfs_add_drive (guestfs_h *g,\n"
6837 " const char *filename);\n"
6843 #: ../src/guestfs-actions.pod:129
6845 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
6846 "optional parameters, so the disk is added writable, with the format being "
6847 "detected automatically."
6852 #: ../src/guestfs-actions.pod:133
6854 "Automatic detection of the format opens you up to a potential security hole "
6855 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6856 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
6857 "you should think about replacing calls to this function with calls to "
6858 "C<guestfs_add_drive_opts>, and specifying the format."
6863 #: ../src/guestfs-actions.pod:144
6864 msgid "guestfs_add_drive_opts"
6869 #: ../src/guestfs-actions.pod:146
6873 " guestfs_add_drive_opts (guestfs_h *g,\n"
6874 " const char *filename,\n"
6881 #: ../src/guestfs-actions.pod:156
6884 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
6885 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
6886 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
6892 #: ../src/guestfs-actions.pod:160 ../fish/guestfish-actions.pod:102
6894 "This function adds a virtual machine disk image C<filename> to libguestfs. "
6895 "The first time you call this function, the disk appears as C</dev/sda>, the "
6896 "second time as C</dev/sdb>, and so on."
6901 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:107
6903 "You don't necessarily need to be root when using libguestfs. However you "
6904 "obviously do need sufficient permissions to access the filename for whatever "
6905 "operations you want to perform (ie. read access if you just want to read the "
6906 "image or write access if you want to modify the image)."
6911 #: ../src/guestfs-actions.pod:171 ../fish/guestfish-actions.pod:113
6912 msgid "This call checks that C<filename> exists."
6917 #: ../src/guestfs-actions.pod:173 ../src/guestfs-actions.pod:4653
6918 #: ../fish/guestfish-actions.pod:115 ../fish/guestfish-actions.pod:3096
6919 msgid "The optional arguments are:"
6924 #: ../src/guestfs-actions.pod:177 ../fish/guestfish-actions.pod:119
6930 #: ../src/guestfs-actions.pod:179 ../fish/guestfish-actions.pod:121
6932 "If true then the image is treated as read-only. Writes are still allowed, "
6933 "but they are stored in a temporary snapshot overlay which is discarded at "
6934 "the end. The disk that you add is not modified."
6939 #: ../src/guestfs-actions.pod:183 ../fish/guestfish-actions.pod:125
6945 #: ../src/guestfs-actions.pod:185
6947 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
6948 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
6949 "Possible formats include C<raw> and C<qcow2>."
6954 #: ../src/guestfs-actions.pod:189 ../fish/guestfish-actions.pod:131
6956 "Automatic detection of the format opens you up to a potential security hole "
6957 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6958 "RHBZ#642934. Specifying the format closes this security hole."
6963 #: ../src/guestfs-actions.pod:194 ../fish/guestfish-actions.pod:136
6969 #: ../src/guestfs-actions.pod:196
6971 "This rarely-used option lets you emulate the behaviour of the deprecated "
6972 "C<guestfs_add_drive_with_if> call (q.v.)"
6977 #: ../src/guestfs-actions.pod:203
6978 msgid "(Added in 1.5.23)"
6983 #: ../src/guestfs-actions.pod:205
6984 msgid "guestfs_add_drive_opts_va"
6989 #: ../src/guestfs-actions.pod:207
6993 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
6994 " const char *filename,\n"
7001 #: ../src/guestfs-actions.pod:212
7002 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
7007 #: ../src/guestfs-actions.pod:216
7008 msgid "guestfs_add_drive_opts_argv"
7013 #: ../src/guestfs-actions.pod:218
7017 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
7018 " const char *filename,\n"
7019 " const struct guestfs_add_drive_opts_argv *optargs);\n"
7025 #: ../src/guestfs-actions.pod:223
7026 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
7031 #: ../src/guestfs-actions.pod:227
7032 msgid "guestfs_add_drive_ro"
7037 #: ../src/guestfs-actions.pod:229
7041 " guestfs_add_drive_ro (guestfs_h *g,\n"
7042 " const char *filename);\n"
7048 #: ../src/guestfs-actions.pod:233
7050 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
7051 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
7052 "disk is added read-only, with the format being detected automatically."
7057 #: ../src/guestfs-actions.pod:240
7058 msgid "(Added in 1.0.38)"
7063 #: ../src/guestfs-actions.pod:242
7064 msgid "guestfs_add_drive_ro_with_if"
7069 #: ../src/guestfs-actions.pod:244
7073 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
7074 " const char *filename,\n"
7075 " const char *iface);\n"
7081 #: ../src/guestfs-actions.pod:249
7083 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
7084 "QEMU interface emulation to use at run time."
7089 #: ../src/guestfs-actions.pod:261 ../src/guestfs-actions.pod:282
7090 #: ../src/guestfs-actions.pod:2429
7091 msgid "(Added in 1.0.84)"
7096 #: ../src/guestfs-actions.pod:263
7097 msgid "guestfs_add_drive_with_if"
7102 #: ../src/guestfs-actions.pod:265
7106 " guestfs_add_drive_with_if (guestfs_h *g,\n"
7107 " const char *filename,\n"
7108 " const char *iface);\n"
7114 #: ../src/guestfs-actions.pod:270
7116 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
7117 "QEMU interface emulation to use at run time."
7122 #: ../src/guestfs-actions.pod:284
7123 msgid "guestfs_aug_clear"
7128 #: ../src/guestfs-actions.pod:286
7132 " guestfs_aug_clear (guestfs_h *g,\n"
7133 " const char *augpath);\n"
7139 #: ../src/guestfs-actions.pod:290 ../fish/guestfish-actions.pod:188
7141 "Set the value associated with C<path> to C<NULL>. This is the same as the "
7142 "L<augtool(1)> C<clear> command."
7147 #: ../src/guestfs-actions.pod:295 ../src/guestfs-actions.pod:2179
7148 msgid "(Added in 1.3.4)"
7153 #: ../src/guestfs-actions.pod:297
7154 msgid "guestfs_aug_close"
7159 #: ../src/guestfs-actions.pod:299
7163 " guestfs_aug_close (guestfs_h *g);\n"
7169 #: ../src/guestfs-actions.pod:302
7171 "Close the current Augeas handle and free up any resources used by it. After "
7172 "calling this, you have to call C<guestfs_aug_init> again before you can use "
7173 "any other Augeas functions."
7178 #: ../src/guestfs-actions.pod:309 ../src/guestfs-actions.pod:334
7179 #: ../src/guestfs-actions.pod:352 ../src/guestfs-actions.pod:366
7180 #: ../src/guestfs-actions.pod:424 ../src/guestfs-actions.pod:444
7181 #: ../src/guestfs-actions.pod:458 ../src/guestfs-actions.pod:489
7182 #: ../src/guestfs-actions.pod:503 ../src/guestfs-actions.pod:517
7183 #: ../src/guestfs-actions.pod:531 ../src/guestfs-actions.pod:549
7184 #: ../src/guestfs-actions.pod:5838
7185 msgid "(Added in 0.7)"
7190 #: ../src/guestfs-actions.pod:311
7191 msgid "guestfs_aug_defnode"
7196 #: ../src/guestfs-actions.pod:313
7199 " struct guestfs_int_bool *\n"
7200 " guestfs_aug_defnode (guestfs_h *g,\n"
7201 " const char *name,\n"
7202 " const char *expr,\n"
7203 " const char *val);\n"
7209 #: ../src/guestfs-actions.pod:319 ../fish/guestfish-actions.pod:204
7211 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
7216 #: ../src/guestfs-actions.pod:322
7218 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
7219 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
7220 "containing that single node."
7225 #: ../src/guestfs-actions.pod:326 ../fish/guestfish-actions.pod:211
7227 "On success this returns a pair containing the number of nodes in the "
7228 "nodeset, and a boolean flag if a node was created."
7233 #: ../src/guestfs-actions.pod:330
7235 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
7236 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
7241 #: ../src/guestfs-actions.pod:336
7242 msgid "guestfs_aug_defvar"
7247 #: ../src/guestfs-actions.pod:338
7251 " guestfs_aug_defvar (guestfs_h *g,\n"
7252 " const char *name,\n"
7253 " const char *expr);\n"
7259 #: ../src/guestfs-actions.pod:343 ../fish/guestfish-actions.pod:219
7261 "Defines an Augeas variable C<name> whose value is the result of evaluating "
7262 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
7267 #: ../src/guestfs-actions.pod:347 ../fish/guestfish-actions.pod:223
7269 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
7270 "evaluates to something which is not a nodeset."
7275 #: ../src/guestfs-actions.pod:354
7276 msgid "guestfs_aug_get"
7281 #: ../src/guestfs-actions.pod:356
7285 " guestfs_aug_get (guestfs_h *g,\n"
7286 " const char *augpath);\n"
7292 #: ../src/guestfs-actions.pod:360 ../fish/guestfish-actions.pod:230
7294 "Look up the value associated with C<path>. If C<path> matches exactly one "
7295 "node, the C<value> is returned."
7300 #: ../src/guestfs-actions.pod:363 ../src/guestfs-actions.pod:922
7301 #: ../src/guestfs-actions.pod:940 ../src/guestfs-actions.pod:1000
7302 #: ../src/guestfs-actions.pod:1016 ../src/guestfs-actions.pod:1119
7303 #: ../src/guestfs-actions.pod:1249 ../src/guestfs-actions.pod:1266
7304 #: ../src/guestfs-actions.pod:1285 ../src/guestfs-actions.pod:1419
7305 #: ../src/guestfs-actions.pod:1607 ../src/guestfs-actions.pod:1719
7306 #: ../src/guestfs-actions.pod:1882 ../src/guestfs-actions.pod:1899
7307 #: ../src/guestfs-actions.pod:1966 ../src/guestfs-actions.pod:2002
7308 #: ../src/guestfs-actions.pod:2023 ../src/guestfs-actions.pod:2202
7309 #: ../src/guestfs-actions.pod:2394 ../src/guestfs-actions.pod:2598
7310 #: ../src/guestfs-actions.pod:2688 ../src/guestfs-actions.pod:2792
7311 #: ../src/guestfs-actions.pod:2811 ../src/guestfs-actions.pod:3025
7312 #: ../src/guestfs-actions.pod:3053 ../src/guestfs-actions.pod:3074
7313 #: ../src/guestfs-actions.pod:3108 ../src/guestfs-actions.pod:3167
7314 #: ../src/guestfs-actions.pod:3187 ../src/guestfs-actions.pod:3207
7315 #: ../src/guestfs-actions.pod:3834 ../src/guestfs-actions.pod:4187
7316 #: ../src/guestfs-actions.pod:4357 ../src/guestfs-actions.pod:4467
7317 #: ../src/guestfs-actions.pod:5373 ../src/guestfs-actions.pod:5566
7318 #: ../src/guestfs-actions.pod:5736 ../src/guestfs-actions.pod:5914
7319 #: ../src/guestfs-actions.pod:5963 ../src/guestfs-actions.pod:6617
7320 #: ../src/guestfs-actions.pod:6633 ../src/guestfs-actions.pod:6650
7321 #: ../src/guestfs-actions.pod:6681 ../src/guestfs-actions.pod:7355
7322 #: ../src/guestfs-actions.pod:7374 ../src/guestfs-actions.pod:7392
7323 #: ../src/guestfs-actions.pod:7566 ../src/guestfs-actions.pod:7866
7325 "This function returns a string, or NULL on error. I<The caller must free "
7326 "the returned string after use>."
7331 #: ../src/guestfs-actions.pod:368
7332 msgid "guestfs_aug_init"
7337 #: ../src/guestfs-actions.pod:370
7341 " guestfs_aug_init (guestfs_h *g,\n"
7342 " const char *root,\n"
7349 #: ../src/guestfs-actions.pod:375 ../fish/guestfish-actions.pod:237
7351 "Create a new Augeas handle for editing configuration files. If there was "
7352 "any previous Augeas handle associated with this guestfs session, then it is "
7358 #: ../src/guestfs-actions.pod:379
7359 msgid "You must call this before using any other C<guestfs_aug_*> commands."
7364 #: ../src/guestfs-actions.pod:382 ../fish/guestfish-actions.pod:244
7366 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
7371 #: ../src/guestfs-actions.pod:385 ../fish/guestfish-actions.pod:247
7373 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
7374 "logical I<or> of the following integers:"
7379 #: ../src/guestfs-actions.pod:391 ../fish/guestfish-actions.pod:253
7380 msgid "C<AUG_SAVE_BACKUP> = 1"
7385 #: ../src/guestfs-actions.pod:393 ../fish/guestfish-actions.pod:255
7386 msgid "Keep the original file with a C<.augsave> extension."
7391 #: ../src/guestfs-actions.pod:395 ../fish/guestfish-actions.pod:257
7392 msgid "C<AUG_SAVE_NEWFILE> = 2"
7397 #: ../src/guestfs-actions.pod:397 ../fish/guestfish-actions.pod:259
7399 "Save changes into a file with extension C<.augnew>, and do not overwrite "
7400 "original. Overrides C<AUG_SAVE_BACKUP>."
7405 #: ../src/guestfs-actions.pod:400 ../fish/guestfish-actions.pod:262
7406 msgid "C<AUG_TYPE_CHECK> = 4"
7411 #: ../src/guestfs-actions.pod:402 ../fish/guestfish-actions.pod:264
7412 msgid "Typecheck lenses (can be expensive)."
7417 #: ../src/guestfs-actions.pod:404 ../fish/guestfish-actions.pod:266
7418 msgid "C<AUG_NO_STDINC> = 8"
7423 #: ../src/guestfs-actions.pod:406 ../fish/guestfish-actions.pod:268
7424 msgid "Do not use standard load path for modules."
7429 #: ../src/guestfs-actions.pod:408 ../fish/guestfish-actions.pod:270
7430 msgid "C<AUG_SAVE_NOOP> = 16"
7435 #: ../src/guestfs-actions.pod:410 ../fish/guestfish-actions.pod:272
7436 msgid "Make save a no-op, just record what would have been changed."
7441 #: ../src/guestfs-actions.pod:412 ../fish/guestfish-actions.pod:274
7442 msgid "C<AUG_NO_LOAD> = 32"
7447 #: ../src/guestfs-actions.pod:414
7448 msgid "Do not load the tree in C<guestfs_aug_init>."
7453 #: ../src/guestfs-actions.pod:418
7454 msgid "To close the handle, you can call C<guestfs_aug_close>."
7459 #: ../src/guestfs-actions.pod:420 ../fish/guestfish-actions.pod:282
7460 msgid "To find out more about Augeas, see L<http://augeas.net/>."
7465 #: ../src/guestfs-actions.pod:426
7466 msgid "guestfs_aug_insert"
7471 #: ../src/guestfs-actions.pod:428
7475 " guestfs_aug_insert (guestfs_h *g,\n"
7476 " const char *augpath,\n"
7477 " const char *label,\n"
7484 #: ../src/guestfs-actions.pod:434 ../fish/guestfish-actions.pod:288
7486 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
7487 "or after C<path> (depending on the boolean flag C<before>)."
7492 #: ../src/guestfs-actions.pod:438 ../fish/guestfish-actions.pod:292
7494 "C<path> must match exactly one existing node in the tree, and C<label> must "
7495 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
7500 #: ../src/guestfs-actions.pod:446
7501 msgid "guestfs_aug_load"
7506 #: ../src/guestfs-actions.pod:448
7510 " guestfs_aug_load (guestfs_h *g);\n"
7516 #: ../src/guestfs-actions.pod:451 ../fish/guestfish-actions.pod:300
7517 msgid "Load files into the tree."
7522 #: ../src/guestfs-actions.pod:453 ../fish/guestfish-actions.pod:302
7523 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
7528 #: ../src/guestfs-actions.pod:460
7529 msgid "guestfs_aug_ls"
7534 #: ../src/guestfs-actions.pod:462
7538 " guestfs_aug_ls (guestfs_h *g,\n"
7539 " const char *augpath);\n"
7545 #: ../src/guestfs-actions.pod:466
7547 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
7548 "sorting the resulting nodes into alphabetical order."
7553 #: ../src/guestfs-actions.pod:469 ../src/guestfs-actions.pod:485
7554 #: ../src/guestfs-actions.pod:631 ../src/guestfs-actions.pod:1138
7555 #: ../src/guestfs-actions.pod:1434 ../src/guestfs-actions.pod:1453
7556 #: ../src/guestfs-actions.pod:1556 ../src/guestfs-actions.pod:1575
7557 #: ../src/guestfs-actions.pod:1821 ../src/guestfs-actions.pod:2274
7558 #: ../src/guestfs-actions.pod:2290 ../src/guestfs-actions.pod:2309
7559 #: ../src/guestfs-actions.pod:2352 ../src/guestfs-actions.pod:2376
7560 #: ../src/guestfs-actions.pod:2447 ../src/guestfs-actions.pod:2496
7561 #: ../src/guestfs-actions.pod:2753 ../src/guestfs-actions.pod:3127
7562 #: ../src/guestfs-actions.pod:3403 ../src/guestfs-actions.pod:3717
7563 #: ../src/guestfs-actions.pod:3734 ../src/guestfs-actions.pod:3754
7564 #: ../src/guestfs-actions.pod:3816 ../src/guestfs-actions.pod:3921
7565 #: ../src/guestfs-actions.pod:4329 ../src/guestfs-actions.pod:5096
7566 #: ../src/guestfs-actions.pod:5708 ../src/guestfs-actions.pod:5834
7567 #: ../src/guestfs-actions.pod:5948 ../src/guestfs-actions.pod:6697
7568 #: ../src/guestfs-actions.pod:6758 ../src/guestfs-actions.pod:6813
7569 #: ../src/guestfs-actions.pod:6959 ../src/guestfs-actions.pod:6983
7570 #: ../src/guestfs-actions.pod:7459 ../src/guestfs-actions.pod:7479
7571 #: ../src/guestfs-actions.pod:7526 ../src/guestfs-actions.pod:7718
7572 #: ../src/guestfs-actions.pod:7737 ../src/guestfs-actions.pod:7823
7573 #: ../src/guestfs-actions.pod:7842 ../src/guestfs-actions.pod:7888
7574 #: ../src/guestfs-actions.pod:7907
7576 "This function returns a NULL-terminated array of strings (like L<environ(3)"
7577 ">), or NULL if there was an error. I<The caller must free the strings and "
7578 "the array after use>."
7583 #: ../src/guestfs-actions.pod:473 ../src/guestfs-actions.pod:1063
7584 #: ../src/guestfs-actions.pod:1081 ../src/guestfs-actions.pod:1491
7585 #: ../src/guestfs-actions.pod:3481 ../src/guestfs-actions.pod:3512
7586 #: ../src/guestfs-actions.pod:4170 ../src/guestfs-actions.pod:4220
7587 #: ../src/guestfs-actions.pod:4407 ../src/guestfs-actions.pod:4440
7588 #: ../src/guestfs-actions.pod:4603 ../src/guestfs-actions.pod:5100
7589 #: ../src/guestfs-actions.pod:5649 ../src/guestfs-actions.pod:6046
7590 #: ../src/guestfs-actions.pod:6060 ../src/guestfs-actions.pod:6072
7591 #: ../src/guestfs-actions.pod:6538 ../src/guestfs-actions.pod:7197
7592 #: ../src/guestfs-actions.pod:7210 ../src/guestfs-actions.pod:7443
7593 #: ../src/guestfs-actions.pod:7706
7594 msgid "(Added in 0.8)"
7599 #: ../src/guestfs-actions.pod:475
7600 msgid "guestfs_aug_match"
7605 #: ../src/guestfs-actions.pod:477
7609 " guestfs_aug_match (guestfs_h *g,\n"
7610 " const char *augpath);\n"
7616 #: ../src/guestfs-actions.pod:481 ../fish/guestfish-actions.pod:316
7618 "Returns a list of paths which match the path expression C<path>. The "
7619 "returned paths are sufficiently qualified so that they match exactly one "
7620 "node in the current tree."
7625 #: ../src/guestfs-actions.pod:491
7626 msgid "guestfs_aug_mv"
7631 #: ../src/guestfs-actions.pod:493
7635 " guestfs_aug_mv (guestfs_h *g,\n"
7636 " const char *src,\n"
7637 " const char *dest);\n"
7643 #: ../src/guestfs-actions.pod:498 ../fish/guestfish-actions.pod:324
7645 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
7646 "C<dest> is overwritten if it exists."
7651 #: ../src/guestfs-actions.pod:505
7652 msgid "guestfs_aug_rm"
7657 #: ../src/guestfs-actions.pod:507
7661 " guestfs_aug_rm (guestfs_h *g,\n"
7662 " const char *augpath);\n"
7668 #: ../src/guestfs-actions.pod:511 ../fish/guestfish-actions.pod:331
7669 msgid "Remove C<path> and all of its children."
7674 #: ../src/guestfs-actions.pod:513 ../fish/guestfish-actions.pod:333
7675 msgid "On success this returns the number of entries which were removed."
7680 #: ../src/guestfs-actions.pod:519
7681 msgid "guestfs_aug_save"
7686 #: ../src/guestfs-actions.pod:521
7690 " guestfs_aug_save (guestfs_h *g);\n"
7696 #: ../src/guestfs-actions.pod:524 ../fish/guestfish-actions.pod:339
7697 msgid "This writes all pending changes to disk."
7702 #: ../src/guestfs-actions.pod:526
7704 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
7710 #: ../src/guestfs-actions.pod:533
7711 msgid "guestfs_aug_set"
7716 #: ../src/guestfs-actions.pod:535
7720 " guestfs_aug_set (guestfs_h *g,\n"
7721 " const char *augpath,\n"
7722 " const char *val);\n"
7728 #: ../src/guestfs-actions.pod:540 ../fish/guestfish-actions.pod:348
7729 msgid "Set the value associated with C<path> to C<val>."
7734 #: ../src/guestfs-actions.pod:542
7736 "In the Augeas API, it is possible to clear a node by setting the value to "
7737 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
7738 "this call. Instead you must use the C<guestfs_aug_clear> call."
7743 #: ../src/guestfs-actions.pod:551
7744 msgid "guestfs_available"
7749 #: ../src/guestfs-actions.pod:553
7753 " guestfs_available (guestfs_h *g,\n"
7754 " char *const *groups);\n"
7760 #: ../src/guestfs-actions.pod:557 ../fish/guestfish-actions.pod:359
7762 "This command is used to check the availability of some groups of "
7763 "functionality in the appliance, which not all builds of the libguestfs "
7764 "appliance will be able to provide."
7769 #: ../src/guestfs-actions.pod:561
7771 "The libguestfs groups, and the functions that those groups correspond to, "
7772 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
7773 "runtime by calling C<guestfs_available_all_groups>."
7778 #: ../src/guestfs-actions.pod:566 ../fish/guestfish-actions.pod:368
7780 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
7781 "\"]> would check for the availability of the Linux inotify functions and "
7782 "Augeas (configuration file editing) functions."
7787 #: ../src/guestfs-actions.pod:571 ../fish/guestfish-actions.pod:373
7788 msgid "The command returns no error if I<all> requested groups are available."
7793 #: ../src/guestfs-actions.pod:573 ../fish/guestfish-actions.pod:375
7795 "It fails with an error if one or more of the requested groups is unavailable "
7801 #: ../src/guestfs-actions.pod:576 ../fish/guestfish-actions.pod:378
7803 "If an unknown group name is included in the list of groups then an error is "
7809 #: ../src/guestfs-actions.pod:579 ../fish/guestfish-actions.pod:381
7815 #: ../src/guestfs-actions.pod:585
7816 msgid "You must call C<guestfs_launch> before calling this function."
7821 #: ../src/guestfs-actions.pod:587 ../fish/guestfish-actions.pod:389
7823 "The reason is because we don't know what groups are supported by the "
7824 "appliance/daemon until it is running and can be queried."
7829 #: ../src/guestfs-actions.pod:593 ../fish/guestfish-actions.pod:395
7831 "If a group of functions is available, this does not necessarily mean that "
7832 "they will work. You still have to check for errors when calling individual "
7833 "API functions even if they are available."
7838 #: ../src/guestfs-actions.pod:600 ../fish/guestfish-actions.pod:402
7840 "It is usually the job of distro packagers to build complete functionality "
7841 "into the libguestfs appliance. Upstream libguestfs, if built from source "
7842 "with all requirements satisfied, will support everything."
7847 #: ../src/guestfs-actions.pod:607
7849 "This call was added in version C<1.0.80>. In previous versions of "
7850 "libguestfs all you could do would be to speculatively execute a command to "
7851 "find out if the daemon implemented it. See also C<guestfs_version>."
7856 #: ../src/guestfs-actions.pod:616 ../src/guestfs-actions.pod:1236
7857 msgid "(Added in 1.0.80)"
7862 #: ../src/guestfs-actions.pod:618
7863 msgid "guestfs_available_all_groups"
7868 #: ../src/guestfs-actions.pod:620
7872 " guestfs_available_all_groups (guestfs_h *g);\n"
7878 #: ../src/guestfs-actions.pod:623
7880 "This command returns a list of all optional groups that this daemon knows "
7881 "about. Note this returns both supported and unsupported groups. To find "
7882 "out which ones the daemon can actually support you have to call "
7883 "C<guestfs_available> on each member of the returned list."
7888 #: ../src/guestfs-actions.pod:629
7889 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
7894 #: ../src/guestfs-actions.pod:635
7895 msgid "(Added in 1.3.15)"
7900 #: ../src/guestfs-actions.pod:637
7901 msgid "guestfs_base64_in"
7906 #: ../src/guestfs-actions.pod:639
7910 " guestfs_base64_in (guestfs_h *g,\n"
7911 " const char *base64file,\n"
7912 " const char *filename);\n"
7918 #: ../src/guestfs-actions.pod:644 ../fish/guestfish-actions.pod:432
7920 "This command uploads base64-encoded data from C<base64file> to C<filename>."
7925 #: ../src/guestfs-actions.pod:649 ../src/guestfs-actions.pod:663
7926 msgid "(Added in 1.3.5)"
7931 #: ../src/guestfs-actions.pod:651
7932 msgid "guestfs_base64_out"
7937 #: ../src/guestfs-actions.pod:653
7941 " guestfs_base64_out (guestfs_h *g,\n"
7942 " const char *filename,\n"
7943 " const char *base64file);\n"
7949 #: ../src/guestfs-actions.pod:658 ../fish/guestfish-actions.pod:441
7951 "This command downloads the contents of C<filename>, writing it out to local "
7952 "file C<base64file> encoded as base64."
7957 #: ../src/guestfs-actions.pod:665
7958 msgid "guestfs_blockdev_flushbufs"
7963 #: ../src/guestfs-actions.pod:667
7967 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
7968 " const char *device);\n"
7974 #: ../src/guestfs-actions.pod:671 ../fish/guestfish-actions.pod:450
7976 "This tells the kernel to flush internal buffers associated with C<device>."
7981 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:691
7982 #: ../src/guestfs-actions.pod:706 ../src/guestfs-actions.pod:722
7983 #: ../src/guestfs-actions.pod:740 ../src/guestfs-actions.pod:759
7984 #: ../src/guestfs-actions.pod:773 ../src/guestfs-actions.pod:791
7985 #: ../src/guestfs-actions.pod:805 ../src/guestfs-actions.pod:819
7986 #: ../fish/guestfish-actions.pod:453 ../fish/guestfish-actions.pod:464
7987 #: ../fish/guestfish-actions.pod:473 ../fish/guestfish-actions.pod:483
7988 #: ../fish/guestfish-actions.pod:495 ../fish/guestfish-actions.pod:508
7989 #: ../fish/guestfish-actions.pod:516 ../fish/guestfish-actions.pod:527
7990 #: ../fish/guestfish-actions.pod:535 ../fish/guestfish-actions.pod:543
7991 msgid "This uses the L<blockdev(8)> command."
7996 #: ../src/guestfs-actions.pod:678 ../src/guestfs-actions.pod:695
7997 #: ../src/guestfs-actions.pod:710 ../src/guestfs-actions.pod:726
7998 #: ../src/guestfs-actions.pod:744 ../src/guestfs-actions.pod:763
7999 #: ../src/guestfs-actions.pod:777 ../src/guestfs-actions.pod:795
8000 #: ../src/guestfs-actions.pod:809 ../src/guestfs-actions.pod:823
8001 msgid "(Added in 0.9.3)"
8006 #: ../src/guestfs-actions.pod:680
8007 msgid "guestfs_blockdev_getbsz"
8012 #: ../src/guestfs-actions.pod:682
8016 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
8017 " const char *device);\n"
8023 #: ../src/guestfs-actions.pod:686 ../fish/guestfish-actions.pod:459
8024 msgid "This returns the block size of a device."
8029 #: ../src/guestfs-actions.pod:688 ../src/guestfs-actions.pod:788
8030 #: ../fish/guestfish-actions.pod:461 ../fish/guestfish-actions.pod:524
8032 "(Note this is different from both I<size in blocks> and I<filesystem block "
8038 #: ../src/guestfs-actions.pod:697
8039 msgid "guestfs_blockdev_getro"
8044 #: ../src/guestfs-actions.pod:699
8048 " guestfs_blockdev_getro (guestfs_h *g,\n"
8049 " const char *device);\n"
8055 #: ../src/guestfs-actions.pod:703 ../fish/guestfish-actions.pod:470
8057 "Returns a boolean indicating if the block device is read-only (true if read-"
8058 "only, false if not)."
8063 #: ../src/guestfs-actions.pod:708 ../src/guestfs-actions.pod:1474
8064 #: ../src/guestfs-actions.pod:1489 ../src/guestfs-actions.pod:1978
8065 #: ../src/guestfs-actions.pod:1989 ../src/guestfs-actions.pod:2061
8066 #: ../src/guestfs-actions.pod:2087 ../src/guestfs-actions.pod:2125
8067 #: ../src/guestfs-actions.pod:2140 ../src/guestfs-actions.pod:2165
8068 #: ../src/guestfs-actions.pod:2188 ../src/guestfs-actions.pod:3224
8069 #: ../src/guestfs-actions.pod:3240 ../src/guestfs-actions.pod:3258
8070 #: ../src/guestfs-actions.pod:3420 ../src/guestfs-actions.pod:3434
8071 #: ../src/guestfs-actions.pod:3449 ../src/guestfs-actions.pod:3463
8072 #: ../src/guestfs-actions.pod:3479 ../src/guestfs-actions.pod:3494
8073 #: ../src/guestfs-actions.pod:3510 ../src/guestfs-actions.pod:3524
8074 #: ../src/guestfs-actions.pod:3537 ../src/guestfs-actions.pod:3551
8075 #: ../src/guestfs-actions.pod:3566 ../src/guestfs-actions.pod:3581
8076 #: ../src/guestfs-actions.pod:3594 ../src/guestfs-actions.pod:3608
8077 #: ../src/guestfs-actions.pod:5337
8078 msgid "This function returns a C truth value on success or -1 on error."
8083 #: ../src/guestfs-actions.pod:712
8084 msgid "guestfs_blockdev_getsize64"
8089 #: ../src/guestfs-actions.pod:714
8093 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
8094 " const char *device);\n"
8100 #: ../src/guestfs-actions.pod:718 ../fish/guestfish-actions.pod:479
8101 msgid "This returns the size of the device in bytes."
8106 #: ../src/guestfs-actions.pod:720
8107 msgid "See also C<guestfs_blockdev_getsz>."
8112 #: ../src/guestfs-actions.pod:728
8113 msgid "guestfs_blockdev_getss"
8118 #: ../src/guestfs-actions.pod:730
8122 " guestfs_blockdev_getss (guestfs_h *g,\n"
8123 " const char *device);\n"
8129 #: ../src/guestfs-actions.pod:734 ../fish/guestfish-actions.pod:489
8131 "This returns the size of sectors on a block device. Usually 512, but can be "
8132 "larger for modern devices."
8137 #: ../src/guestfs-actions.pod:737
8139 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
8145 #: ../src/guestfs-actions.pod:746
8146 msgid "guestfs_blockdev_getsz"
8151 #: ../src/guestfs-actions.pod:748
8155 " guestfs_blockdev_getsz (guestfs_h *g,\n"
8156 " const char *device);\n"
8162 #: ../src/guestfs-actions.pod:752 ../fish/guestfish-actions.pod:501
8164 "This returns the size of the device in units of 512-byte sectors (even if "
8165 "the sectorsize isn't 512 bytes ... weird)."
8170 #: ../src/guestfs-actions.pod:755
8172 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
8173 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
8178 #: ../src/guestfs-actions.pod:765
8179 msgid "guestfs_blockdev_rereadpt"
8184 #: ../src/guestfs-actions.pod:767
8188 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
8189 " const char *device);\n"
8195 #: ../src/guestfs-actions.pod:771 ../fish/guestfish-actions.pod:514
8196 msgid "Reread the partition table on C<device>."
8201 #: ../src/guestfs-actions.pod:779
8202 msgid "guestfs_blockdev_setbsz"
8207 #: ../src/guestfs-actions.pod:781
8211 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
8212 " const char *device,\n"
8213 " int blocksize);\n"
8219 #: ../src/guestfs-actions.pod:786 ../fish/guestfish-actions.pod:522
8220 msgid "This sets the block size of a device."
8225 #: ../src/guestfs-actions.pod:797
8226 msgid "guestfs_blockdev_setro"
8231 #: ../src/guestfs-actions.pod:799
8235 " guestfs_blockdev_setro (guestfs_h *g,\n"
8236 " const char *device);\n"
8242 #: ../src/guestfs-actions.pod:803 ../fish/guestfish-actions.pod:533
8243 msgid "Sets the block device named C<device> to read-only."
8248 #: ../src/guestfs-actions.pod:811
8249 msgid "guestfs_blockdev_setrw"
8254 #: ../src/guestfs-actions.pod:813
8258 " guestfs_blockdev_setrw (guestfs_h *g,\n"
8259 " const char *device);\n"
8265 #: ../src/guestfs-actions.pod:817 ../fish/guestfish-actions.pod:541
8266 msgid "Sets the block device named C<device> to read-write."
8270 #: ../src/guestfs-actions.pod:825
8271 msgid "guestfs_btrfs_filesystem_resize"
8275 #: ../src/guestfs-actions.pod:827
8279 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
8280 " const char *mountpoint,\n"
8286 #: ../src/guestfs-actions.pod:837
8289 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
8294 #: ../src/guestfs-actions.pod:839 ../fish/guestfish-actions.pod:549
8295 msgid "This command resizes a btrfs filesystem."
8299 #: ../src/guestfs-actions.pod:841 ../fish/guestfish-actions.pod:551
8301 "Note that unlike other resize calls, the filesystem has to be mounted and "
8302 "the parameter is the mountpoint not the device (this is a requirement of "
8307 #: ../src/guestfs-actions.pod:845 ../src/guestfs-actions.pod:5187
8308 #: ../fish/guestfish-actions.pod:555 ../fish/guestfish-actions.pod:3417
8309 msgid "The optional parameters are:"
8313 #: ../src/guestfs-actions.pod:849 ../src/guestfs-actions.pod:5191
8314 #: ../fish/guestfish-actions.pod:559 ../fish/guestfish-actions.pod:3421
8319 #: ../src/guestfs-actions.pod:851 ../fish/guestfish-actions.pod:561
8321 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
8322 "resized to the maximum size."
8326 #: ../src/guestfs-actions.pod:856 ../fish/guestfish-actions.pod:566
8327 msgid "See also L<btrfs(8)>."
8331 #: ../src/guestfs-actions.pod:860
8332 msgid "(Added in 1.11.17)"
8336 #: ../src/guestfs-actions.pod:862
8337 msgid "guestfs_btrfs_filesystem_resize_va"
8341 #: ../src/guestfs-actions.pod:864
8345 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
8346 " const char *mountpoint,\n"
8352 #: ../src/guestfs-actions.pod:869
8353 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
8357 #: ../src/guestfs-actions.pod:873
8358 msgid "guestfs_btrfs_filesystem_resize_argv"
8362 #: ../src/guestfs-actions.pod:875
8366 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
8367 " const char *mountpoint,\n"
8368 " const struct guestfs_btrfs_filesystem_resize_argv *optargs);\n"
8373 #: ../src/guestfs-actions.pod:880
8374 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
8379 #: ../src/guestfs-actions.pod:884
8380 msgid "guestfs_case_sensitive_path"
8385 #: ../src/guestfs-actions.pod:886
8389 " guestfs_case_sensitive_path (guestfs_h *g,\n"
8390 " const char *path);\n"
8396 #: ../src/guestfs-actions.pod:890 ../fish/guestfish-actions.pod:574
8398 "This can be used to resolve case insensitive paths on a filesystem which is "
8399 "case sensitive. The use case is to resolve paths which you have read from "
8400 "Windows configuration files or the Windows Registry, to the true path."
8405 #: ../src/guestfs-actions.pod:895 ../fish/guestfish-actions.pod:579
8407 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
8408 "(and probably others), which is that although the underlying filesystem is "
8409 "case-insensitive, the driver exports the filesystem to Linux as case-"
8415 #: ../src/guestfs-actions.pod:900 ../fish/guestfish-actions.pod:584
8417 "One consequence of this is that special directories such as C<c:\\windows> "
8418 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
8419 "precise details of how they were created. In Windows itself this would not "
8425 #: ../src/guestfs-actions.pod:906 ../fish/guestfish-actions.pod:590
8427 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
8433 #: ../src/guestfs-actions.pod:909 ../fish/guestfish-actions.pod:593
8435 "This function resolves the true case of each element in the path and returns "
8436 "the case-sensitive path."
8441 #: ../src/guestfs-actions.pod:912
8443 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
8444 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
8445 "how the directories were originally created under Windows)."
8450 #: ../src/guestfs-actions.pod:917 ../fish/guestfish-actions.pod:601
8451 msgid "I<Note>: This function does not handle drive names, backslashes etc."
8456 #: ../src/guestfs-actions.pod:920
8457 msgid "See also C<guestfs_realpath>."
8462 #: ../src/guestfs-actions.pod:925 ../src/guestfs-actions.pod:7377
8463 msgid "(Added in 1.0.75)"
8468 #: ../src/guestfs-actions.pod:927
8474 #: ../src/guestfs-actions.pod:929
8478 " guestfs_cat (guestfs_h *g,\n"
8479 " const char *path);\n"
8485 #: ../src/guestfs-actions.pod:933 ../src/guestfs-actions.pod:5824
8486 #: ../fish/guestfish-actions.pod:610 ../fish/guestfish-actions.pod:3831
8487 msgid "Return the contents of the file named C<path>."
8492 #: ../src/guestfs-actions.pod:935
8494 "Note that this function cannot correctly handle binary files (specifically, "
8495 "files containing C<\\0> character which is treated as end of string). For "
8496 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
8497 "functions which have a more complex interface."
8502 #: ../src/guestfs-actions.pod:943 ../src/guestfs-actions.pod:1122
8503 #: ../src/guestfs-actions.pod:1142 ../src/guestfs-actions.pod:1438
8504 #: ../src/guestfs-actions.pod:1457 ../src/guestfs-actions.pod:1560
8505 #: ../src/guestfs-actions.pod:1579 ../src/guestfs-actions.pod:1825
8506 #: ../src/guestfs-actions.pod:2294 ../src/guestfs-actions.pod:2313
8507 #: ../src/guestfs-actions.pod:2356 ../src/guestfs-actions.pod:2380
8508 #: ../src/guestfs-actions.pod:2397 ../src/guestfs-actions.pod:2426
8509 #: ../src/guestfs-actions.pod:5606 ../src/guestfs-actions.pod:5632
8510 #: ../src/guestfs-actions.pod:5763 ../src/guestfs-actions.pod:5789
8511 #: ../src/guestfs-actions.pod:5813 ../src/guestfs-actions.pod:6762
8512 #: ../src/guestfs-actions.pod:6817 ../src/guestfs-actions.pod:6963
8513 #: ../src/guestfs-actions.pod:6987 ../src/guestfs-actions.pod:7652
8514 #: ../src/guestfs-actions.pod:7672 ../src/guestfs-actions.pod:7696
8515 #: ../src/guestfs-actions.pod:7722 ../src/guestfs-actions.pod:7741
8516 #: ../src/guestfs-actions.pod:7827 ../src/guestfs-actions.pod:7846
8517 #: ../src/guestfs-actions.pod:7892 ../src/guestfs-actions.pod:7911
8518 #: ../fish/guestfish-actions.pod:617 ../fish/guestfish-actions.pod:752
8519 #: ../fish/guestfish-actions.pod:764 ../fish/guestfish-actions.pod:940
8520 #: ../fish/guestfish-actions.pod:950 ../fish/guestfish-actions.pod:1017
8521 #: ../fish/guestfish-actions.pod:1027 ../fish/guestfish-actions.pod:1219
8522 #: ../fish/guestfish-actions.pod:1526 ../fish/guestfish-actions.pod:1536
8523 #: ../fish/guestfish-actions.pod:1564 ../fish/guestfish-actions.pod:1579
8524 #: ../fish/guestfish-actions.pod:1589 ../fish/guestfish-actions.pod:1608
8525 #: ../fish/guestfish-actions.pod:3701 ../fish/guestfish-actions.pod:3716
8526 #: ../fish/guestfish-actions.pod:3792 ../fish/guestfish-actions.pod:3809
8527 #: ../fish/guestfish-actions.pod:3824 ../fish/guestfish-actions.pod:4493
8528 #: ../fish/guestfish-actions.pod:4539 ../fish/guestfish-actions.pod:4624
8529 #: ../fish/guestfish-actions.pod:4639 ../fish/guestfish-actions.pod:5045
8530 #: ../fish/guestfish-actions.pod:5057 ../fish/guestfish-actions.pod:5075
8531 #: ../fish/guestfish-actions.pod:5092 ../fish/guestfish-actions.pod:5102
8532 #: ../fish/guestfish-actions.pod:5151 ../fish/guestfish-actions.pod:5161
8533 #: ../fish/guestfish-actions.pod:5190 ../fish/guestfish-actions.pod:5200
8535 "Because of the message protocol, there is a transfer limit of somewhere "
8536 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
8541 #: ../src/guestfs-actions.pod:946 ../src/guestfs-actions.pod:3738
8542 #: ../src/guestfs-actions.pod:3820 ../src/guestfs-actions.pod:3837
8543 #: ../src/guestfs-actions.pod:3925 ../src/guestfs-actions.pod:4333
8544 #: ../src/guestfs-actions.pod:4347 ../src/guestfs-actions.pod:5712
8545 #: ../src/guestfs-actions.pod:5726 ../src/guestfs-actions.pod:7530
8546 #: ../src/guestfs-actions.pod:7544
8547 msgid "(Added in 0.4)"
8552 #: ../src/guestfs-actions.pod:948
8553 msgid "guestfs_checksum"
8558 #: ../src/guestfs-actions.pod:950
8562 " guestfs_checksum (guestfs_h *g,\n"
8563 " const char *csumtype,\n"
8564 " const char *path);\n"
8570 #: ../src/guestfs-actions.pod:955 ../fish/guestfish-actions.pod:624
8572 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
8577 #: ../src/guestfs-actions.pod:958 ../fish/guestfish-actions.pod:627
8579 "The type of checksum to compute is given by the C<csumtype> parameter which "
8580 "must have one of the following values:"
8585 #: ../src/guestfs-actions.pod:963 ../fish/guestfish-actions.pod:632
8591 #: ../src/guestfs-actions.pod:965 ../fish/guestfish-actions.pod:634
8593 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
8599 #: ../src/guestfs-actions.pod:968 ../fish/guestfish-actions.pod:637
8605 #: ../src/guestfs-actions.pod:970 ../fish/guestfish-actions.pod:639
8606 msgid "Compute the MD5 hash (using the C<md5sum> program)."
8611 #: ../src/guestfs-actions.pod:972 ../fish/guestfish-actions.pod:641
8617 #: ../src/guestfs-actions.pod:974 ../fish/guestfish-actions.pod:643
8618 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
8623 #: ../src/guestfs-actions.pod:976 ../fish/guestfish-actions.pod:645
8629 #: ../src/guestfs-actions.pod:978 ../fish/guestfish-actions.pod:647
8630 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
8635 #: ../src/guestfs-actions.pod:980 ../fish/guestfish-actions.pod:649
8641 #: ../src/guestfs-actions.pod:982 ../fish/guestfish-actions.pod:651
8642 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
8647 #: ../src/guestfs-actions.pod:984 ../fish/guestfish-actions.pod:653
8653 #: ../src/guestfs-actions.pod:986 ../fish/guestfish-actions.pod:655
8654 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
8659 #: ../src/guestfs-actions.pod:988 ../fish/guestfish-actions.pod:657
8665 #: ../src/guestfs-actions.pod:990 ../fish/guestfish-actions.pod:659
8666 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
8671 #: ../src/guestfs-actions.pod:994 ../fish/guestfish-actions.pod:663
8672 msgid "The checksum is returned as a printable string."
8677 #: ../src/guestfs-actions.pod:996
8678 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
8683 #: ../src/guestfs-actions.pod:998
8684 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
8689 #: ../src/guestfs-actions.pod:1003 ../src/guestfs-actions.pod:1311
8690 #: ../src/guestfs-actions.pod:2156 ../src/guestfs-actions.pod:3436
8691 #: ../src/guestfs-actions.pod:3465 ../src/guestfs-actions.pod:3526
8692 #: ../src/guestfs-actions.pod:3553 ../src/guestfs-actions.pod:7233
8693 msgid "(Added in 1.0.2)"
8698 #: ../src/guestfs-actions.pod:1005
8699 msgid "guestfs_checksum_device"
8704 #: ../src/guestfs-actions.pod:1007
8708 " guestfs_checksum_device (guestfs_h *g,\n"
8709 " const char *csumtype,\n"
8710 " const char *device);\n"
8716 #: ../src/guestfs-actions.pod:1012
8718 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
8719 "device named C<device>. For the types of checksums supported see the "
8720 "C<guestfs_checksum> command."
8725 #: ../src/guestfs-actions.pod:1019 ../src/guestfs-actions.pod:5167
8726 #: ../src/guestfs-actions.pod:5302 ../src/guestfs-actions.pod:5339
8727 #: ../src/guestfs-actions.pod:5357 ../src/guestfs-actions.pod:5533
8728 #: ../src/guestfs-actions.pod:7142 ../src/guestfs-actions.pod:7156
8729 #: ../src/guestfs-actions.pod:7556
8730 msgid "(Added in 1.3.2)"
8735 #: ../src/guestfs-actions.pod:1021
8736 msgid "guestfs_checksums_out"
8741 #: ../src/guestfs-actions.pod:1023
8745 " guestfs_checksums_out (guestfs_h *g,\n"
8746 " const char *csumtype,\n"
8747 " const char *directory,\n"
8748 " const char *sumsfile);\n"
8754 #: ../src/guestfs-actions.pod:1029 ../fish/guestfish-actions.pod:681
8756 "This command computes the checksums of all regular files in C<directory> and "
8757 "then emits a list of those checksums to the local output file C<sumsfile>."
8762 #: ../src/guestfs-actions.pod:1033 ../fish/guestfish-actions.pod:685
8764 "This can be used for verifying the integrity of a virtual machine. However "
8765 "to be properly secure you should pay attention to the output of the checksum "
8766 "command (it uses the ones from GNU coreutils). In particular when the "
8767 "filename is not printable, coreutils uses a special backslash syntax. For "
8768 "more information, see the GNU coreutils info file."
8773 #: ../src/guestfs-actions.pod:1043
8774 msgid "(Added in 1.3.7)"
8779 #: ../src/guestfs-actions.pod:1045
8780 msgid "guestfs_chmod"
8785 #: ../src/guestfs-actions.pod:1047
8789 " guestfs_chmod (guestfs_h *g,\n"
8791 " const char *path);\n"
8797 #: ../src/guestfs-actions.pod:1052 ../fish/guestfish-actions.pod:699
8799 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
8805 #: ../src/guestfs-actions.pod:1055 ../fish/guestfish-actions.pod:702
8807 "I<Note>: When using this command from guestfish, C<mode> by default would be "
8808 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
8814 #: ../src/guestfs-actions.pod:1059 ../src/guestfs-actions.pod:4584
8815 #: ../src/guestfs-actions.pod:4793 ../src/guestfs-actions.pod:4812
8816 #: ../src/guestfs-actions.pod:4831 ../fish/guestfish-actions.pod:706
8817 #: ../fish/guestfish-actions.pod:3060 ../fish/guestfish-actions.pod:3199
8818 #: ../fish/guestfish-actions.pod:3209 ../fish/guestfish-actions.pod:3219
8819 msgid "The mode actually set is affected by the umask."
8824 #: ../src/guestfs-actions.pod:1065
8825 msgid "guestfs_chown"
8830 #: ../src/guestfs-actions.pod:1067
8834 " guestfs_chown (guestfs_h *g,\n"
8837 " const char *path);\n"
8843 #: ../src/guestfs-actions.pod:1073 ../fish/guestfish-actions.pod:712
8844 msgid "Change the file owner to C<owner> and group to C<group>."
8849 #: ../src/guestfs-actions.pod:1075 ../src/guestfs-actions.pod:3655
8850 #: ../fish/guestfish-actions.pod:714 ../fish/guestfish-actions.pod:2495
8852 "Only numeric uid and gid are supported. If you want to use names, you will "
8853 "need to locate and parse the password file yourself (Augeas support makes "
8854 "this relatively easy)."
8859 #: ../src/guestfs-actions.pod:1083
8860 msgid "guestfs_command"
8865 #: ../src/guestfs-actions.pod:1085
8869 " guestfs_command (guestfs_h *g,\n"
8870 " char *const *arguments);\n"
8876 #: ../src/guestfs-actions.pod:1089 ../fish/guestfish-actions.pod:722
8878 "This call runs a command from the guest filesystem. The filesystem must be "
8879 "mounted, and must contain a compatible operating system (ie. something "
8880 "Linux, with the same or compatible processor architecture)."
8885 #: ../src/guestfs-actions.pod:1094
8887 "The single parameter is an argv-style list of arguments. The first element "
8888 "is the name of the program to run. Subsequent elements are parameters. The "
8889 "list must be non-empty (ie. must contain a program name). Note that the "
8890 "command runs directly, and is I<not> invoked via the shell (see "
8896 #: ../src/guestfs-actions.pod:1101 ../fish/guestfish-actions.pod:734
8897 msgid "The return value is anything printed to I<stdout> by the command."
8902 #: ../src/guestfs-actions.pod:1104 ../fish/guestfish-actions.pod:737
8904 "If the command returns a non-zero exit status, then this function returns an "
8905 "error message. The error message string is the content of I<stderr> from "
8911 #: ../src/guestfs-actions.pod:1108 ../fish/guestfish-actions.pod:741
8913 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
8914 "bin>. If you require a program from another location, you should provide "
8915 "the full path in the first parameter."
8920 #: ../src/guestfs-actions.pod:1113 ../fish/guestfish-actions.pod:746
8922 "Shared libraries and data files required by the program must be available on "
8923 "filesystems which are mounted in the correct places. It is the caller's "
8924 "responsibility to ensure all filesystems that are needed are mounted at the "
8930 #: ../src/guestfs-actions.pod:1125 ../src/guestfs-actions.pod:1145
8931 #: ../src/guestfs-actions.pod:1610
8932 msgid "(Added in 0.9.1)"
8937 #: ../src/guestfs-actions.pod:1127
8938 msgid "guestfs_command_lines"
8943 #: ../src/guestfs-actions.pod:1129
8947 " guestfs_command_lines (guestfs_h *g,\n"
8948 " char *const *arguments);\n"
8954 #: ../src/guestfs-actions.pod:1133
8956 "This is the same as C<guestfs_command>, but splits the result into a list of "
8962 #: ../src/guestfs-actions.pod:1136
8963 msgid "See also: C<guestfs_sh_lines>"
8968 #: ../src/guestfs-actions.pod:1147
8969 msgid "guestfs_config"
8974 #: ../src/guestfs-actions.pod:1149
8978 " guestfs_config (guestfs_h *g,\n"
8979 " const char *qemuparam,\n"
8980 " const char *qemuvalue);\n"
8985 #: ../src/guestfs-actions.pod:1154 ../fish/guestfish-actions.pod:771
8987 "This can be used to add arbitrary qemu command line parameters of the form "
8988 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
8989 "setting some parameters which would interfere with parameters that we use."
8994 #: ../src/guestfs-actions.pod:1159 ../fish/guestfish-actions.pod:776
8995 msgid "The first character of C<param> string must be a C<-> (dash)."
9000 #: ../src/guestfs-actions.pod:1161 ../fish/guestfish-actions.pod:778
9001 msgid "C<value> can be NULL."
9006 #: ../src/guestfs-actions.pod:1167
9007 msgid "guestfs_copy_size"
9012 #: ../src/guestfs-actions.pod:1169
9016 " guestfs_copy_size (guestfs_h *g,\n"
9017 " const char *src,\n"
9018 " const char *dest,\n"
9025 #: ../src/guestfs-actions.pod:1175 ../fish/guestfish-actions.pod:784
9027 "This command copies exactly C<size> bytes from one source device or file "
9028 "C<src> to another destination device or file C<dest>."
9033 #: ../src/guestfs-actions.pod:1178 ../fish/guestfish-actions.pod:787
9035 "Note this will fail if the source is too short or if the destination is not "
9040 #: ../src/guestfs-actions.pod:1183 ../src/guestfs-actions.pod:1306
9041 #: ../src/guestfs-actions.pod:1337 ../src/guestfs-actions.pod:1382
9042 #: ../src/guestfs-actions.pod:1759 ../src/guestfs-actions.pod:1781
9043 #: ../src/guestfs-actions.pod:3636 ../src/guestfs-actions.pod:7228
9044 #: ../src/guestfs-actions.pod:7262 ../src/guestfs-actions.pod:7763
9045 #: ../src/guestfs-actions.pod:7782
9047 "This long-running command can generate progress notification messages so "
9048 "that the caller can display a progress bar or indicator. To receive these "
9049 "messages, the caller must register a progress event callback. See L<guestfs"
9050 "(3)/GUESTFS_EVENT_PROGRESS>."
9055 #: ../src/guestfs-actions.pod:1188 ../src/guestfs-actions.pod:4360
9056 #: ../src/guestfs-actions.pod:5739 ../src/guestfs-actions.pod:7463
9057 #: ../src/guestfs-actions.pod:7483 ../src/guestfs-actions.pod:7569
9058 msgid "(Added in 1.0.87)"
9063 #: ../src/guestfs-actions.pod:1190
9069 #: ../src/guestfs-actions.pod:1192
9073 " guestfs_cp (guestfs_h *g,\n"
9074 " const char *src,\n"
9075 " const char *dest);\n"
9081 #: ../src/guestfs-actions.pod:1197 ../fish/guestfish-actions.pod:794
9083 "This copies a file from C<src> to C<dest> where C<dest> is either a "
9084 "destination filename or destination directory."
9089 #: ../src/guestfs-actions.pod:1202 ../src/guestfs-actions.pod:1216
9090 #: ../src/guestfs-actions.pod:1288 ../src/guestfs-actions.pod:1362
9091 #: ../src/guestfs-actions.pod:1476 ../src/guestfs-actions.pod:5114
9092 #: ../src/guestfs-actions.pod:5583
9093 msgid "(Added in 1.0.18)"
9098 #: ../src/guestfs-actions.pod:1204
9099 msgid "guestfs_cp_a"
9104 #: ../src/guestfs-actions.pod:1206
9108 " guestfs_cp_a (guestfs_h *g,\n"
9109 " const char *src,\n"
9110 " const char *dest);\n"
9116 #: ../src/guestfs-actions.pod:1211 ../fish/guestfish-actions.pod:801
9118 "This copies a file or directory from C<src> to C<dest> recursively using the "
9124 #: ../src/guestfs-actions.pod:1218
9130 #: ../src/guestfs-actions.pod:1220
9134 " guestfs_dd (guestfs_h *g,\n"
9135 " const char *src,\n"
9136 " const char *dest);\n"
9142 #: ../src/guestfs-actions.pod:1225 ../fish/guestfish-actions.pod:808
9144 "This command copies from one source device or file C<src> to another "
9145 "destination device or file C<dest>. Normally you would use this to copy to "
9146 "or from a device or partition, for example to duplicate a filesystem."
9151 #: ../src/guestfs-actions.pod:1230
9153 "If the destination is a device, it must be as large or larger than the "
9154 "source file or device, otherwise the copy will fail. This command cannot do "
9155 "partial copies (see C<guestfs_copy_size>)."
9160 #: ../src/guestfs-actions.pod:1238
9166 #: ../src/guestfs-actions.pod:1240
9170 " guestfs_df (guestfs_h *g);\n"
9176 #: ../src/guestfs-actions.pod:1243 ../fish/guestfish-actions.pod:821
9177 msgid "This command runs the C<df> command to report disk space used."
9182 #: ../src/guestfs-actions.pod:1245 ../src/guestfs-actions.pod:1262
9184 "This command is mostly useful for interactive sessions. It is I<not> "
9185 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
9191 #: ../src/guestfs-actions.pod:1252 ../src/guestfs-actions.pod:1269
9192 #: ../src/guestfs-actions.pod:1387 ../src/guestfs-actions.pod:2359
9193 #: ../src/guestfs-actions.pod:2383 ../src/guestfs-actions.pod:2451
9194 #: ../src/guestfs-actions.pod:4470 ../src/guestfs-actions.pod:5014
9195 #: ../src/guestfs-actions.pod:6966 ../src/guestfs-actions.pod:6990
9196 #: ../src/guestfs-actions.pod:7609 ../src/guestfs-actions.pod:7622
9197 #: ../src/guestfs-actions.pod:7635
9198 msgid "(Added in 1.0.54)"
9203 #: ../src/guestfs-actions.pod:1254
9204 msgid "guestfs_df_h"
9209 #: ../src/guestfs-actions.pod:1256
9213 " guestfs_df_h (guestfs_h *g);\n"
9219 #: ../src/guestfs-actions.pod:1259 ../fish/guestfish-actions.pod:831
9221 "This command runs the C<df -h> command to report disk space used in human-"
9227 #: ../src/guestfs-actions.pod:1271
9228 msgid "guestfs_dmesg"
9233 #: ../src/guestfs-actions.pod:1273
9237 " guestfs_dmesg (guestfs_h *g);\n"
9243 #: ../src/guestfs-actions.pod:1276 ../fish/guestfish-actions.pod:842
9245 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
9246 "This is sometimes useful for extended debugging of problems."
9251 #: ../src/guestfs-actions.pod:1280
9253 "Another way to get the same information is to enable verbose messages with "
9254 "C<guestfs_set_verbose> or by setting the environment variable "
9255 "C<LIBGUESTFS_DEBUG=1> before running the program."
9260 #: ../src/guestfs-actions.pod:1290
9261 msgid "guestfs_download"
9266 #: ../src/guestfs-actions.pod:1292
9270 " guestfs_download (guestfs_h *g,\n"
9271 " const char *remotefilename,\n"
9272 " const char *filename);\n"
9278 #: ../src/guestfs-actions.pod:1297 ../src/guestfs-actions.pod:1322
9279 #: ../fish/guestfish-actions.pod:855 ../fish/guestfish-actions.pod:868
9281 "Download file C<remotefilename> and save it as C<filename> on the local "
9287 #: ../src/guestfs-actions.pod:1300 ../src/guestfs-actions.pod:7222
9288 #: ../fish/guestfish-actions.pod:858 ../fish/guestfish-actions.pod:4797
9289 msgid "C<filename> can also be a named pipe."
9294 #: ../src/guestfs-actions.pod:1302
9295 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
9300 #: ../src/guestfs-actions.pod:1313
9301 msgid "guestfs_download_offset"
9306 #: ../src/guestfs-actions.pod:1315
9310 " guestfs_download_offset (guestfs_h *g,\n"
9311 " const char *remotefilename,\n"
9312 " const char *filename,\n"
9313 " int64_t offset,\n"
9320 #: ../src/guestfs-actions.pod:1325 ../fish/guestfish-actions.pod:871
9322 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
9323 "region must be within the file or device)."
9328 #: ../src/guestfs-actions.pod:1328
9330 "Note that there is no limit on the amount of data that can be downloaded "
9331 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
9332 "full amount unless an error occurs."
9337 #: ../src/guestfs-actions.pod:1333
9338 msgid "See also C<guestfs_download>, C<guestfs_pread>."
9343 #: ../src/guestfs-actions.pod:1342 ../src/guestfs-actions.pod:7267
9344 msgid "(Added in 1.5.17)"
9349 #: ../src/guestfs-actions.pod:1344
9350 msgid "guestfs_drop_caches"
9355 #: ../src/guestfs-actions.pod:1346
9359 " guestfs_drop_caches (guestfs_h *g,\n"
9360 " int whattodrop);\n"
9366 #: ../src/guestfs-actions.pod:1350 ../fish/guestfish-actions.pod:887
9368 "This instructs the guest kernel to drop its page cache, and/or dentries and "
9369 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
9370 "to drop, see L<http://linux-mm.org/Drop_Caches>"
9375 #: ../src/guestfs-actions.pod:1355 ../fish/guestfish-actions.pod:892
9376 msgid "Setting C<whattodrop> to 3 should drop everything."
9381 #: ../src/guestfs-actions.pod:1357 ../fish/guestfish-actions.pod:894
9383 "This automatically calls L<sync(2)> before the operation, so that the "
9384 "maximum guest memory is freed."
9389 #: ../src/guestfs-actions.pod:1364
9395 #: ../src/guestfs-actions.pod:1366
9399 " guestfs_du (guestfs_h *g,\n"
9400 " const char *path);\n"
9406 #: ../src/guestfs-actions.pod:1370 ../fish/guestfish-actions.pod:901
9408 "This command runs the C<du -s> command to estimate file space usage for "
9414 #: ../src/guestfs-actions.pod:1373 ../fish/guestfish-actions.pod:904
9416 "C<path> can be a file or a directory. If C<path> is a directory then the "
9417 "estimate includes the contents of the directory and all subdirectories "
9423 #: ../src/guestfs-actions.pod:1377 ../fish/guestfish-actions.pod:908
9425 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
9430 #: ../src/guestfs-actions.pod:1389
9431 msgid "guestfs_e2fsck_f"
9436 #: ../src/guestfs-actions.pod:1391
9440 " guestfs_e2fsck_f (guestfs_h *g,\n"
9441 " const char *device);\n"
9446 #: ../src/guestfs-actions.pod:1395 ../fish/guestfish-actions.pod:915
9448 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
9449 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
9455 #: ../src/guestfs-actions.pod:1399
9457 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
9458 "Normally you should use C<guestfs_fsck>."
9463 #: ../src/guestfs-actions.pod:1404
9464 msgid "(Added in 1.0.29)"
9469 #: ../src/guestfs-actions.pod:1406
9470 msgid "guestfs_echo_daemon"
9475 #: ../src/guestfs-actions.pod:1408
9479 " guestfs_echo_daemon (guestfs_h *g,\n"
9480 " char *const *words);\n"
9486 #: ../src/guestfs-actions.pod:1412 ../fish/guestfish-actions.pod:926
9488 "This command concatenates the list of C<words> passed with single spaces "
9489 "between them and returns the resulting string."
9494 #: ../src/guestfs-actions.pod:1415 ../fish/guestfish-actions.pod:929
9495 msgid "You can use this command to test the connection through to the daemon."
9500 #: ../src/guestfs-actions.pod:1417
9501 msgid "See also C<guestfs_ping_daemon>."
9506 #: ../src/guestfs-actions.pod:1422 ../src/guestfs-actions.pod:2167
9507 #: ../src/guestfs-actions.pod:6438
9508 msgid "(Added in 1.0.69)"
9513 #: ../src/guestfs-actions.pod:1424
9514 msgid "guestfs_egrep"
9519 #: ../src/guestfs-actions.pod:1426
9523 " guestfs_egrep (guestfs_h *g,\n"
9524 " const char *regex,\n"
9525 " const char *path);\n"
9531 #: ../src/guestfs-actions.pod:1431 ../fish/guestfish-actions.pod:937
9533 "This calls the external C<egrep> program and returns the matching lines."
9538 #: ../src/guestfs-actions.pod:1441 ../src/guestfs-actions.pod:1460
9539 #: ../src/guestfs-actions.pod:1517 ../src/guestfs-actions.pod:1563
9540 #: ../src/guestfs-actions.pod:1582 ../src/guestfs-actions.pod:2297
9541 #: ../src/guestfs-actions.pod:2316 ../src/guestfs-actions.pod:2472
9542 #: ../src/guestfs-actions.pod:2485 ../src/guestfs-actions.pod:2500
9543 #: ../src/guestfs-actions.pod:2546 ../src/guestfs-actions.pod:2568
9544 #: ../src/guestfs-actions.pod:2581 ../src/guestfs-actions.pod:3850
9545 #: ../src/guestfs-actions.pod:3864 ../src/guestfs-actions.pod:3877
9546 #: ../src/guestfs-actions.pod:3891 ../src/guestfs-actions.pod:4892
9547 #: ../src/guestfs-actions.pod:5917 ../src/guestfs-actions.pod:5966
9548 #: ../src/guestfs-actions.pod:6834 ../src/guestfs-actions.pod:6846
9549 #: ../src/guestfs-actions.pod:6859 ../src/guestfs-actions.pod:6872
9550 #: ../src/guestfs-actions.pod:6894 ../src/guestfs-actions.pod:6907
9551 #: ../src/guestfs-actions.pod:6920 ../src/guestfs-actions.pod:6933
9552 #: ../src/guestfs-actions.pod:7725 ../src/guestfs-actions.pod:7744
9553 #: ../src/guestfs-actions.pod:7830 ../src/guestfs-actions.pod:7849
9554 #: ../src/guestfs-actions.pod:7895 ../src/guestfs-actions.pod:7914
9555 msgid "(Added in 1.0.66)"
9560 #: ../src/guestfs-actions.pod:1443
9561 msgid "guestfs_egrepi"
9566 #: ../src/guestfs-actions.pod:1445
9570 " guestfs_egrepi (guestfs_h *g,\n"
9571 " const char *regex,\n"
9572 " const char *path);\n"
9578 #: ../src/guestfs-actions.pod:1450 ../fish/guestfish-actions.pod:947
9580 "This calls the external C<egrep -i> program and returns the matching lines."
9585 #: ../src/guestfs-actions.pod:1462
9586 msgid "guestfs_equal"
9591 #: ../src/guestfs-actions.pod:1464
9595 " guestfs_equal (guestfs_h *g,\n"
9596 " const char *file1,\n"
9597 " const char *file2);\n"
9603 #: ../src/guestfs-actions.pod:1469 ../fish/guestfish-actions.pod:957
9605 "This compares the two files C<file1> and C<file2> and returns true if their "
9606 "content is exactly equal, or false otherwise."
9611 #: ../src/guestfs-actions.pod:1472 ../fish/guestfish-actions.pod:960
9612 msgid "The external L<cmp(1)> program is used for the comparison."
9617 #: ../src/guestfs-actions.pod:1478
9618 msgid "guestfs_exists"
9623 #: ../src/guestfs-actions.pod:1480
9627 " guestfs_exists (guestfs_h *g,\n"
9628 " const char *path);\n"
9634 #: ../src/guestfs-actions.pod:1484 ../fish/guestfish-actions.pod:966
9636 "This returns C<true> if and only if there is a file, directory (or anything) "
9637 "with the given C<path> name."
9642 #: ../src/guestfs-actions.pod:1487
9643 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
9648 #: ../src/guestfs-actions.pod:1493
9649 msgid "guestfs_fallocate"
9654 #: ../src/guestfs-actions.pod:1495
9658 " guestfs_fallocate (guestfs_h *g,\n"
9659 " const char *path,\n"
9666 #: ../src/guestfs-actions.pod:1500 ../src/guestfs-actions.pod:1526
9667 #: ../fish/guestfish-actions.pod:975 ../fish/guestfish-actions.pod:994
9669 "This command preallocates a file (containing zero bytes) named C<path> of "
9670 "size C<len> bytes. If the file exists already, it is overwritten."
9675 #: ../src/guestfs-actions.pod:1504 ../fish/guestfish-actions.pod:979
9677 "Do not confuse this with the guestfish-specific C<alloc> command which "
9678 "allocates a file in the host and attaches it as a device."
9683 #: ../src/guestfs-actions.pod:1510 ../fish/guestfish-actions.pod:983
9685 "This function is deprecated. In new code, use the C<fallocate64> call "
9691 #: ../src/guestfs-actions.pod:1519
9692 msgid "guestfs_fallocate64"
9697 #: ../src/guestfs-actions.pod:1521
9701 " guestfs_fallocate64 (guestfs_h *g,\n"
9702 " const char *path,\n"
9709 #: ../src/guestfs-actions.pod:1530
9711 "Note that this call allocates disk blocks for the file. To create a sparse "
9712 "file use C<guestfs_truncate_size> instead."
9717 #: ../src/guestfs-actions.pod:1533
9719 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
9720 "oversight it only allowed 30 bit lengths to be specified, effectively "
9721 "limiting the maximum size of files created through that call to 1GB."
9726 #: ../src/guestfs-actions.pod:1538 ../fish/guestfish-actions.pod:1006
9728 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
9729 "commands which create a file in the host and attach it as a device."
9734 #: ../src/guestfs-actions.pod:1544
9735 msgid "(Added in 1.3.17)"
9740 #: ../src/guestfs-actions.pod:1546
9741 msgid "guestfs_fgrep"
9746 #: ../src/guestfs-actions.pod:1548
9750 " guestfs_fgrep (guestfs_h *g,\n"
9751 " const char *pattern,\n"
9752 " const char *path);\n"
9758 #: ../src/guestfs-actions.pod:1553 ../fish/guestfish-actions.pod:1014
9760 "This calls the external C<fgrep> program and returns the matching lines."
9765 #: ../src/guestfs-actions.pod:1565
9766 msgid "guestfs_fgrepi"
9771 #: ../src/guestfs-actions.pod:1567
9775 " guestfs_fgrepi (guestfs_h *g,\n"
9776 " const char *pattern,\n"
9777 " const char *path);\n"
9783 #: ../src/guestfs-actions.pod:1572 ../fish/guestfish-actions.pod:1024
9785 "This calls the external C<fgrep -i> program and returns the matching lines."
9790 #: ../src/guestfs-actions.pod:1584
9791 msgid "guestfs_file"
9796 #: ../src/guestfs-actions.pod:1586
9800 " guestfs_file (guestfs_h *g,\n"
9801 " const char *path);\n"
9807 #: ../src/guestfs-actions.pod:1590 ../fish/guestfish-actions.pod:1034
9809 "This call uses the standard L<file(1)> command to determine the type or "
9810 "contents of the file."
9815 #: ../src/guestfs-actions.pod:1593 ../fish/guestfish-actions.pod:1037
9817 "This call will also transparently look inside various types of compressed "
9822 #: ../src/guestfs-actions.pod:1596 ../fish/guestfish-actions.pod:1040
9824 "The exact command which runs is C<file -zb path>. Note in particular that "
9825 "the filename is not prepended to the output (the I<-b> option)."
9829 #: ../src/guestfs-actions.pod:1600 ../fish/guestfish-actions.pod:1044
9831 "The output depends on the output of the underlying L<file(1)> command and it "
9832 "can change in future in ways beyond our control. In other words, the output "
9833 "is not guaranteed by the ABI."
9837 #: ../src/guestfs-actions.pod:1604
9839 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
9840 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
9845 #: ../src/guestfs-actions.pod:1612
9846 msgid "guestfs_file_architecture"
9851 #: ../src/guestfs-actions.pod:1614
9855 " guestfs_file_architecture (guestfs_h *g,\n"
9856 " const char *filename);\n"
9862 #: ../src/guestfs-actions.pod:1618 ../fish/guestfish-actions.pod:1055
9864 "This detects the architecture of the binary C<filename>, and returns it if "
9870 #: ../src/guestfs-actions.pod:1621 ../fish/guestfish-actions.pod:1058
9871 msgid "Currently defined architectures are:"
9876 #: ../src/guestfs-actions.pod:1625 ../fish/guestfish-actions.pod:1062
9882 #: ../src/guestfs-actions.pod:1627 ../fish/guestfish-actions.pod:1064
9884 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
9885 "irrespective of the precise processor requirements of the binary."
9890 #: ../src/guestfs-actions.pod:1630 ../fish/guestfish-actions.pod:1067
9896 #: ../src/guestfs-actions.pod:1632 ../fish/guestfish-actions.pod:1069
9897 msgid "64 bit x86-64."
9902 #: ../src/guestfs-actions.pod:1634 ../fish/guestfish-actions.pod:1071
9908 #: ../src/guestfs-actions.pod:1636 ../fish/guestfish-actions.pod:1073
9909 msgid "32 bit SPARC."
9914 #: ../src/guestfs-actions.pod:1638 ../fish/guestfish-actions.pod:1075
9920 #: ../src/guestfs-actions.pod:1640 ../fish/guestfish-actions.pod:1077
9921 msgid "64 bit SPARC V9 and above."
9926 #: ../src/guestfs-actions.pod:1642 ../fish/guestfish-actions.pod:1079
9932 #: ../src/guestfs-actions.pod:1644 ../fish/guestfish-actions.pod:1081
9933 msgid "Intel Itanium."
9938 #: ../src/guestfs-actions.pod:1646 ../fish/guestfish-actions.pod:1083
9944 #: ../src/guestfs-actions.pod:1648 ../fish/guestfish-actions.pod:1085
9945 msgid "32 bit Power PC."
9950 #: ../src/guestfs-actions.pod:1650 ../fish/guestfish-actions.pod:1087
9956 #: ../src/guestfs-actions.pod:1652 ../fish/guestfish-actions.pod:1089
9957 msgid "64 bit Power PC."
9962 #: ../src/guestfs-actions.pod:1656 ../fish/guestfish-actions.pod:1093
9963 msgid "Libguestfs may return other architecture strings in future."
9968 #: ../src/guestfs-actions.pod:1658 ../fish/guestfish-actions.pod:1095
9969 msgid "The function works on at least the following types of files:"
9974 #: ../src/guestfs-actions.pod:1664 ../fish/guestfish-actions.pod:1101
9975 msgid "many types of Un*x and Linux binary"
9980 #: ../src/guestfs-actions.pod:1668 ../fish/guestfish-actions.pod:1105
9981 msgid "many types of Un*x and Linux shared library"
9986 #: ../src/guestfs-actions.pod:1672 ../fish/guestfish-actions.pod:1109
9987 msgid "Windows Win32 and Win64 binaries"
9992 #: ../src/guestfs-actions.pod:1676 ../fish/guestfish-actions.pod:1113
9993 msgid "Windows Win32 and Win64 DLLs"
9998 #: ../src/guestfs-actions.pod:1678 ../fish/guestfish-actions.pod:1115
9999 msgid "Win32 binaries and DLLs return C<i386>."
10004 #: ../src/guestfs-actions.pod:1680 ../fish/guestfish-actions.pod:1117
10005 msgid "Win64 binaries and DLLs return C<x86_64>."
10010 #: ../src/guestfs-actions.pod:1684 ../fish/guestfish-actions.pod:1121
10011 msgid "Linux kernel modules"
10016 #: ../src/guestfs-actions.pod:1688 ../fish/guestfish-actions.pod:1125
10017 msgid "Linux new-style initrd images"
10022 #: ../src/guestfs-actions.pod:1692 ../fish/guestfish-actions.pod:1129
10023 msgid "some non-x86 Linux vmlinuz kernels"
10028 #: ../src/guestfs-actions.pod:1696 ../fish/guestfish-actions.pod:1133
10029 msgid "What it can't do currently:"
10034 #: ../src/guestfs-actions.pod:1702 ../fish/guestfish-actions.pod:1139
10035 msgid "static libraries (libfoo.a)"
10040 #: ../src/guestfs-actions.pod:1706 ../fish/guestfish-actions.pod:1143
10041 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
10046 #: ../src/guestfs-actions.pod:1710 ../fish/guestfish-actions.pod:1147
10047 msgid "x86 Linux vmlinuz kernels"
10052 #: ../src/guestfs-actions.pod:1712 ../fish/guestfish-actions.pod:1149
10054 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
10055 "compressed code, and are horribly hard to unpack. If you want to find the "
10056 "architecture of a kernel, use the architecture of the associated initrd or "
10057 "kernel module(s) instead."
10062 #: ../src/guestfs-actions.pod:1722 ../src/guestfs-actions.pod:1885
10063 #: ../src/guestfs-actions.pod:1902 ../src/guestfs-actions.pod:2601
10064 #: ../src/guestfs-actions.pod:2691 ../src/guestfs-actions.pod:2757
10065 #: ../src/guestfs-actions.pod:2944 ../src/guestfs-actions.pod:2962
10066 #: ../src/guestfs-actions.pod:3002 ../src/guestfs-actions.pod:3077
10067 #: ../src/guestfs-actions.pod:3170 ../src/guestfs-actions.pod:3407
10068 #: ../src/guestfs-actions.pod:3539
10069 msgid "(Added in 1.5.3)"
10074 #: ../src/guestfs-actions.pod:1724
10075 msgid "guestfs_filesize"
10080 #: ../src/guestfs-actions.pod:1726
10084 " guestfs_filesize (guestfs_h *g,\n"
10085 " const char *file);\n"
10091 #: ../src/guestfs-actions.pod:1730 ../fish/guestfish-actions.pod:1160
10092 msgid "This command returns the size of C<file> in bytes."
10097 #: ../src/guestfs-actions.pod:1732
10099 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
10100 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
10101 "devices, use C<guestfs_blockdev_getsize64>."
10106 #: ../src/guestfs-actions.pod:1738
10107 msgid "(Added in 1.0.82)"
10112 #: ../src/guestfs-actions.pod:1740
10113 msgid "guestfs_fill"
10118 #: ../src/guestfs-actions.pod:1742
10122 " guestfs_fill (guestfs_h *g,\n"
10125 " const char *path);\n"
10131 #: ../src/guestfs-actions.pod:1748 ../fish/guestfish-actions.pod:1170
10133 "This command creates a new file called C<path>. The initial content of the "
10134 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
10140 #: ../src/guestfs-actions.pod:1752
10142 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
10143 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
10144 "bytes use C<guestfs_fill_pattern>."
10149 #: ../src/guestfs-actions.pod:1764
10150 msgid "(Added in 1.0.79)"
10155 #: ../src/guestfs-actions.pod:1766
10156 msgid "guestfs_fill_pattern"
10161 #: ../src/guestfs-actions.pod:1768
10165 " guestfs_fill_pattern (guestfs_h *g,\n"
10166 " const char *pattern,\n"
10168 " const char *path);\n"
10174 #: ../src/guestfs-actions.pod:1774
10176 "This function is like C<guestfs_fill> except that it creates a new file of "
10177 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
10178 "pattern is truncated if necessary to ensure the length of the file is "
10179 "exactly C<len> bytes."
10184 #: ../src/guestfs-actions.pod:1786
10185 msgid "(Added in 1.3.12)"
10190 #: ../src/guestfs-actions.pod:1788
10191 msgid "guestfs_find"
10196 #: ../src/guestfs-actions.pod:1790
10200 " guestfs_find (guestfs_h *g,\n"
10201 " const char *directory);\n"
10207 #: ../src/guestfs-actions.pod:1794 ../fish/guestfish-actions.pod:1192
10209 "This command lists out all files and directories, recursively, starting at "
10210 "C<directory>. It is essentially equivalent to running the shell command "
10211 "C<find directory -print> but some post-processing happens on the output, "
10217 #: ../src/guestfs-actions.pod:1799 ../fish/guestfish-actions.pod:1197
10219 "This returns a list of strings I<without any prefix>. Thus if the directory "
10225 #: ../src/guestfs-actions.pod:1802 ../fish/guestfish-actions.pod:1200
10236 #: ../src/guestfs-actions.pod:1806
10238 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
10243 #: ../src/guestfs-actions.pod:1809 ../fish/guestfish-actions.pod:1207
10255 #: ../src/guestfs-actions.pod:1814 ../fish/guestfish-actions.pod:1212
10256 msgid "If C<directory> is not a directory, then this command returns an error."
10261 #: ../src/guestfs-actions.pod:1817 ../fish/guestfish-actions.pod:1215
10262 msgid "The returned list is sorted."
10267 #: ../src/guestfs-actions.pod:1819
10268 msgid "See also C<guestfs_find0>."
10273 #: ../src/guestfs-actions.pod:1828 ../src/guestfs-actions.pod:4297
10274 #: ../src/guestfs-actions.pod:6001
10275 msgid "(Added in 1.0.27)"
10280 #: ../src/guestfs-actions.pod:1830
10281 msgid "guestfs_find0"
10286 #: ../src/guestfs-actions.pod:1832
10290 " guestfs_find0 (guestfs_h *g,\n"
10291 " const char *directory,\n"
10292 " const char *files);\n"
10298 #: ../src/guestfs-actions.pod:1837 ../fish/guestfish-actions.pod:1226
10300 "This command lists out all files and directories, recursively, starting at "
10301 "C<directory>, placing the resulting list in the external file called "
10307 #: ../src/guestfs-actions.pod:1841
10309 "This command works the same way as C<guestfs_find> with the following "
10315 #: ../src/guestfs-actions.pod:1848 ../fish/guestfish-actions.pod:1237
10316 msgid "The resulting list is written to an external file."
10321 #: ../src/guestfs-actions.pod:1852 ../fish/guestfish-actions.pod:1241
10323 "Items (filenames) in the result are separated by C<\\0> characters. See "
10324 "L<find(1)> option I<-print0>."
10329 #: ../src/guestfs-actions.pod:1857 ../fish/guestfish-actions.pod:1246
10330 msgid "This command is not limited in the number of names that it can return."
10335 #: ../src/guestfs-actions.pod:1862 ../fish/guestfish-actions.pod:1251
10336 msgid "The result list is not sorted."
10341 #: ../src/guestfs-actions.pod:1868
10342 msgid "(Added in 1.0.74)"
10347 #: ../src/guestfs-actions.pod:1870
10348 msgid "guestfs_findfs_label"
10353 #: ../src/guestfs-actions.pod:1872
10357 " guestfs_findfs_label (guestfs_h *g,\n"
10358 " const char *label);\n"
10364 #: ../src/guestfs-actions.pod:1876 ../fish/guestfish-actions.pod:1261
10366 "This command searches the filesystems and returns the one which has the "
10367 "given label. An error is returned if no such filesystem can be found."
10372 #: ../src/guestfs-actions.pod:1880
10373 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
10378 #: ../src/guestfs-actions.pod:1887
10379 msgid "guestfs_findfs_uuid"
10384 #: ../src/guestfs-actions.pod:1889
10388 " guestfs_findfs_uuid (guestfs_h *g,\n"
10389 " const char *uuid);\n"
10395 #: ../src/guestfs-actions.pod:1893 ../fish/guestfish-actions.pod:1271
10397 "This command searches the filesystems and returns the one which has the "
10398 "given UUID. An error is returned if no such filesystem can be found."
10403 #: ../src/guestfs-actions.pod:1897
10404 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
10409 #: ../src/guestfs-actions.pod:1904
10410 msgid "guestfs_fsck"
10415 #: ../src/guestfs-actions.pod:1906
10419 " guestfs_fsck (guestfs_h *g,\n"
10420 " const char *fstype,\n"
10421 " const char *device);\n"
10427 #: ../src/guestfs-actions.pod:1911 ../fish/guestfish-actions.pod:1281
10429 "This runs the filesystem checker (fsck) on C<device> which should have "
10430 "filesystem type C<fstype>."
10435 #: ../src/guestfs-actions.pod:1914 ../fish/guestfish-actions.pod:1284
10437 "The returned integer is the status. See L<fsck(8)> for the list of status "
10438 "codes from C<fsck>."
10443 #: ../src/guestfs-actions.pod:1923 ../fish/guestfish-actions.pod:1293
10444 msgid "Multiple status codes can be summed together."
10449 #: ../src/guestfs-actions.pod:1927 ../fish/guestfish-actions.pod:1297
10451 "A non-zero return code can mean \"success\", for example if errors have been "
10452 "corrected on the filesystem."
10457 #: ../src/guestfs-actions.pod:1932 ../fish/guestfish-actions.pod:1302
10458 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
10463 #: ../src/guestfs-actions.pod:1937 ../fish/guestfish-actions.pod:1307
10465 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
10470 #: ../src/guestfs-actions.pod:1941 ../src/guestfs-actions.pod:7768
10471 msgid "(Added in 1.0.16)"
10476 #: ../src/guestfs-actions.pod:1943
10477 msgid "guestfs_get_append"
10482 #: ../src/guestfs-actions.pod:1945
10486 " guestfs_get_append (guestfs_h *g);\n"
10492 #: ../src/guestfs-actions.pod:1948 ../fish/guestfish-actions.pod:1313
10494 "Return the additional kernel options which are added to the guest kernel "
10500 #: ../src/guestfs-actions.pod:1951 ../fish/guestfish-actions.pod:1316
10501 msgid "If C<NULL> then no options are added."
10506 #: ../src/guestfs-actions.pod:1953
10508 "This function returns a string which may be NULL. There is no way to return "
10509 "an error from this function. The string is owned by the guest handle and "
10510 "must I<not> be freed."
10515 #: ../src/guestfs-actions.pod:1957 ../src/guestfs-actions.pod:5679
10516 #: ../src/guestfs-actions.pod:6161 ../src/guestfs-actions.pod:6601
10517 #: ../src/guestfs-actions.pod:6620 ../src/guestfs-actions.pod:6636
10518 #: ../src/guestfs-actions.pod:6660 ../src/guestfs-actions.pod:7414
10519 #: ../src/guestfs-actions.pod:7429 ../src/guestfs-actions.pod:7811
10520 msgid "(Added in 1.0.26)"
10524 #: ../src/guestfs-actions.pod:1959
10525 msgid "guestfs_get_attach_method"
10529 #: ../src/guestfs-actions.pod:1961
10533 " guestfs_get_attach_method (guestfs_h *g);\n"
10538 #: ../src/guestfs-actions.pod:1964
10539 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
10543 #: ../src/guestfs-actions.pod:1969 ../src/guestfs-actions.pod:6191
10544 msgid "(Added in 1.9.8)"
10549 #: ../src/guestfs-actions.pod:1971
10550 msgid "guestfs_get_autosync"
10555 #: ../src/guestfs-actions.pod:1973
10559 " guestfs_get_autosync (guestfs_h *g);\n"
10565 #: ../src/guestfs-actions.pod:1976 ../fish/guestfish-actions.pod:1328
10566 msgid "Get the autosync flag."
10571 #: ../src/guestfs-actions.pod:1982
10572 msgid "guestfs_get_direct"
10577 #: ../src/guestfs-actions.pod:1984
10581 " guestfs_get_direct (guestfs_h *g);\n"
10587 #: ../src/guestfs-actions.pod:1987 ../fish/guestfish-actions.pod:1334
10588 msgid "Return the direct appliance mode flag."
10593 #: ../src/guestfs-actions.pod:1991 ../src/guestfs-actions.pod:6232
10594 msgid "(Added in 1.0.72)"
10599 #: ../src/guestfs-actions.pod:1993
10600 msgid "guestfs_get_e2label"
10605 #: ../src/guestfs-actions.pod:1995
10609 " guestfs_get_e2label (guestfs_h *g,\n"
10610 " const char *device);\n"
10616 #: ../src/guestfs-actions.pod:1999 ../fish/guestfish-actions.pod:1340
10618 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
10623 #: ../src/guestfs-actions.pod:2005 ../fish/guestfish-actions.pod:1343
10625 "This function is deprecated. In new code, use the C<vfs_label> call instead."
10630 #: ../src/guestfs-actions.pod:2012 ../src/guestfs-actions.pod:2033
10631 #: ../src/guestfs-actions.pod:6250 ../src/guestfs-actions.pod:6269
10632 msgid "(Added in 1.0.15)"
10637 #: ../src/guestfs-actions.pod:2014
10638 msgid "guestfs_get_e2uuid"
10643 #: ../src/guestfs-actions.pod:2016
10647 " guestfs_get_e2uuid (guestfs_h *g,\n"
10648 " const char *device);\n"
10654 #: ../src/guestfs-actions.pod:2020 ../fish/guestfish-actions.pod:1354
10656 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
10661 #: ../src/guestfs-actions.pod:2026 ../fish/guestfish-actions.pod:1357
10663 "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
10668 #: ../src/guestfs-actions.pod:2035
10669 msgid "guestfs_get_memsize"
10674 #: ../src/guestfs-actions.pod:2037
10678 " guestfs_get_memsize (guestfs_h *g);\n"
10684 #: ../src/guestfs-actions.pod:2040 ../fish/guestfish-actions.pod:1368
10686 "This gets the memory size in megabytes allocated to the qemu subprocess."
10691 #: ../src/guestfs-actions.pod:2043
10693 "If C<guestfs_set_memsize> was not called on this handle, and if "
10694 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
10695 "value for memsize."
10700 #: ../src/guestfs-actions.pod:2047 ../src/guestfs-actions.pod:2137
10701 #: ../src/guestfs-actions.pod:6285 ../src/guestfs-actions.pod:6409
10702 #: ../fish/guestfish-actions.pod:1375 ../fish/guestfish-actions.pod:1432
10703 #: ../fish/guestfish-actions.pod:4157 ../fish/guestfish-actions.pod:4259
10705 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
10710 #: ../src/guestfs-actions.pod:2052 ../src/guestfs-actions.pod:4588
10711 #: ../src/guestfs-actions.pod:4797 ../src/guestfs-actions.pod:4816
10712 #: ../src/guestfs-actions.pod:4835 ../src/guestfs-actions.pod:4847
10713 #: ../src/guestfs-actions.pod:4864 ../src/guestfs-actions.pod:4877
10714 #: ../src/guestfs-actions.pod:5904 ../src/guestfs-actions.pod:6290
10715 #: ../src/guestfs-actions.pod:6568 ../src/guestfs-actions.pod:7183
10716 msgid "(Added in 1.0.55)"
10721 #: ../src/guestfs-actions.pod:2054
10722 msgid "guestfs_get_network"
10727 #: ../src/guestfs-actions.pod:2056
10731 " guestfs_get_network (guestfs_h *g);\n"
10737 #: ../src/guestfs-actions.pod:2059 ../fish/guestfish-actions.pod:1382
10738 msgid "This returns the enable network flag."
10743 #: ../src/guestfs-actions.pod:2063 ../src/guestfs-actions.pod:6309
10744 msgid "(Added in 1.5.4)"
10749 #: ../src/guestfs-actions.pod:2065
10750 msgid "guestfs_get_path"
10755 #: ../src/guestfs-actions.pod:2067
10759 " guestfs_get_path (guestfs_h *g);\n"
10765 #: ../src/guestfs-actions.pod:2070 ../fish/guestfish-actions.pod:1388
10766 msgid "Return the current search path."
10771 #: ../src/guestfs-actions.pod:2072 ../fish/guestfish-actions.pod:1390
10773 "This is always non-NULL. If it wasn't set already, then this will return "
10774 "the default path."
10779 #: ../src/guestfs-actions.pod:2075 ../src/guestfs-actions.pod:2113
10781 "This function returns a string, or NULL on error. The string is owned by "
10782 "the guest handle and must I<not> be freed."
10786 #: ../src/guestfs-actions.pod:2080
10787 msgid "guestfs_get_pgroup"
10791 #: ../src/guestfs-actions.pod:2082
10795 " guestfs_get_pgroup (guestfs_h *g);\n"
10800 #: ../src/guestfs-actions.pod:2085 ../fish/guestfish-actions.pod:1397
10801 msgid "This returns the process group flag."
10806 #: ../src/guestfs-actions.pod:2089
10807 msgid "guestfs_get_pid"
10812 #: ../src/guestfs-actions.pod:2091
10816 " guestfs_get_pid (guestfs_h *g);\n"
10822 #: ../src/guestfs-actions.pod:2094 ../fish/guestfish-actions.pod:1405
10824 "Return the process ID of the qemu subprocess. If there is no qemu "
10825 "subprocess, then this will return an error."
10830 #: ../src/guestfs-actions.pod:2097 ../fish/guestfish-actions.pod:1408
10831 msgid "This is an internal call used for debugging and testing."
10836 #: ../src/guestfs-actions.pod:2101
10837 msgid "(Added in 1.0.56)"
10842 #: ../src/guestfs-actions.pod:2103
10843 msgid "guestfs_get_qemu"
10848 #: ../src/guestfs-actions.pod:2105
10852 " guestfs_get_qemu (guestfs_h *g);\n"
10858 #: ../src/guestfs-actions.pod:2108 ../fish/guestfish-actions.pod:1414
10859 msgid "Return the current qemu binary."
10864 #: ../src/guestfs-actions.pod:2110 ../fish/guestfish-actions.pod:1416
10866 "This is always non-NULL. If it wasn't set already, then this will return "
10867 "the default qemu binary name."
10872 #: ../src/guestfs-actions.pod:2116 ../src/guestfs-actions.pod:6371
10873 msgid "(Added in 1.0.6)"
10878 #: ../src/guestfs-actions.pod:2118
10879 msgid "guestfs_get_recovery_proc"
10884 #: ../src/guestfs-actions.pod:2120
10888 " guestfs_get_recovery_proc (guestfs_h *g);\n"
10894 #: ../src/guestfs-actions.pod:2123 ../fish/guestfish-actions.pod:1423
10895 msgid "Return the recovery process enabled flag."
10900 #: ../src/guestfs-actions.pod:2127 ../src/guestfs-actions.pod:3661
10901 #: ../src/guestfs-actions.pod:3992 ../src/guestfs-actions.pod:4395
10902 #: ../src/guestfs-actions.pod:4427 ../src/guestfs-actions.pod:5609
10903 #: ../src/guestfs-actions.pod:5952 ../src/guestfs-actions.pod:6395
10904 #: ../src/guestfs-actions.pod:7086 ../src/guestfs-actions.pod:7106
10905 #: ../src/guestfs-actions.pod:7298
10906 msgid "(Added in 1.0.77)"
10911 #: ../src/guestfs-actions.pod:2129
10912 msgid "guestfs_get_selinux"
10917 #: ../src/guestfs-actions.pod:2131
10921 " guestfs_get_selinux (guestfs_h *g);\n"
10927 #: ../src/guestfs-actions.pod:2134
10929 "This returns the current setting of the selinux flag which is passed to the "
10930 "appliance at boot time. See C<guestfs_set_selinux>."
10935 #: ../src/guestfs-actions.pod:2142 ../src/guestfs-actions.pod:2205
10936 #: ../src/guestfs-actions.pod:6414 ../src/guestfs-actions.pod:6472
10937 msgid "(Added in 1.0.67)"
10942 #: ../src/guestfs-actions.pod:2144
10943 msgid "guestfs_get_state"
10948 #: ../src/guestfs-actions.pod:2146
10952 " guestfs_get_state (guestfs_h *g);\n"
10958 #: ../src/guestfs-actions.pod:2149 ../fish/guestfish-actions.pod:1439
10960 "This returns the current state as an opaque integer. This is only useful "
10961 "for printing debug and internal error messages."
10966 #: ../src/guestfs-actions.pod:2152 ../src/guestfs-actions.pod:3432
10967 #: ../src/guestfs-actions.pod:3461 ../src/guestfs-actions.pod:3522
10968 #: ../src/guestfs-actions.pod:3549 ../fish/guestfish-actions.pod:1442
10969 #: ../fish/guestfish-actions.pod:2362 ../fish/guestfish-actions.pod:2380
10970 #: ../fish/guestfish-actions.pod:2418 ../fish/guestfish-actions.pod:2434
10971 msgid "For more information on states, see L<guestfs(3)>."
10976 #: ../src/guestfs-actions.pod:2158
10977 msgid "guestfs_get_trace"
10982 #: ../src/guestfs-actions.pod:2160
10986 " guestfs_get_trace (guestfs_h *g);\n"
10992 #: ../src/guestfs-actions.pod:2163 ../fish/guestfish-actions.pod:1448
10993 msgid "Return the command trace flag."
10998 #: ../src/guestfs-actions.pod:2169
10999 msgid "guestfs_get_umask"
11004 #: ../src/guestfs-actions.pod:2171
11008 " guestfs_get_umask (guestfs_h *g);\n"
11014 #: ../src/guestfs-actions.pod:2174
11016 "Return the current umask. By default the umask is C<022> unless it has been "
11017 "set by calling C<guestfs_umask>."
11022 #: ../src/guestfs-actions.pod:2181
11023 msgid "guestfs_get_verbose"
11028 #: ../src/guestfs-actions.pod:2183
11032 " guestfs_get_verbose (guestfs_h *g);\n"
11038 #: ../src/guestfs-actions.pod:2186 ../fish/guestfish-actions.pod:1461
11039 msgid "This returns the verbose messages flag."
11044 #: ../src/guestfs-actions.pod:2192
11045 msgid "guestfs_getcon"
11050 #: ../src/guestfs-actions.pod:2194
11054 " guestfs_getcon (guestfs_h *g);\n"
11060 #: ../src/guestfs-actions.pod:2197 ../fish/guestfish-actions.pod:1467
11061 msgid "This gets the SELinux security context of the daemon."
11066 #: ../src/guestfs-actions.pod:2199
11068 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
11073 #: ../src/guestfs-actions.pod:2207
11074 msgid "guestfs_getxattr"
11079 #: ../src/guestfs-actions.pod:2209
11083 " guestfs_getxattr (guestfs_h *g,\n"
11084 " const char *path,\n"
11085 " const char *name,\n"
11086 " size_t *size_r);\n"
11092 #: ../src/guestfs-actions.pod:2215
11094 "Get a single extended attribute from file C<path> named C<name>. This call "
11095 "follows symlinks. If you want to lookup an extended attribute for the "
11096 "symlink itself, use C<guestfs_lgetxattr>."
11101 #: ../src/guestfs-actions.pod:2219 ../src/guestfs-actions.pod:3675
11103 "Normally it is better to get all extended attributes from a file in one go "
11104 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
11105 "implementations are buggy and do not provide a way to list out attributes. "
11106 "For these filesystems (notably ntfs-3g) you have to know the names of the "
11107 "extended attributes you want in advance and call this function."
11112 #: ../src/guestfs-actions.pod:2226 ../src/guestfs-actions.pod:3682
11113 #: ../fish/guestfish-actions.pod:1487 ../fish/guestfish-actions.pod:2514
11115 "Extended attribute values are blobs of binary data. If there is no extended "
11116 "attribute named C<name>, this returns an error."
11121 #: ../src/guestfs-actions.pod:2229
11122 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
11127 #: ../src/guestfs-actions.pod:2231 ../src/guestfs-actions.pod:2422
11128 #: ../src/guestfs-actions.pod:2892 ../src/guestfs-actions.pod:3687
11129 #: ../src/guestfs-actions.pod:5602 ../src/guestfs-actions.pod:5628
11130 #: ../src/guestfs-actions.pod:5809
11132 "This function returns a buffer, or NULL on error. The size of the returned "
11133 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
11138 #: ../src/guestfs-actions.pod:2235 ../src/guestfs-actions.pod:3691
11139 msgid "(Added in 1.7.24)"
11144 #: ../src/guestfs-actions.pod:2237
11145 msgid "guestfs_getxattrs"
11150 #: ../src/guestfs-actions.pod:2239
11153 " struct guestfs_xattr_list *\n"
11154 " guestfs_getxattrs (guestfs_h *g,\n"
11155 " const char *path);\n"
11161 #: ../src/guestfs-actions.pod:2243 ../fish/guestfish-actions.pod:1496
11163 "This call lists the extended attributes of the file or directory C<path>."
11168 #: ../src/guestfs-actions.pod:2246 ../fish/guestfish-actions.pod:1499
11170 "At the system call level, this is a combination of the L<listxattr(2)> and "
11171 "L<getxattr(2)> calls."
11176 #: ../src/guestfs-actions.pod:2249
11177 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
11182 #: ../src/guestfs-actions.pod:2251 ../src/guestfs-actions.pod:3703
11183 #: ../src/guestfs-actions.pod:4391
11185 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
11186 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
11191 #: ../src/guestfs-actions.pod:2255 ../src/guestfs-actions.pod:3707
11192 #: ../src/guestfs-actions.pod:3906 ../src/guestfs-actions.pod:3942
11193 #: ../src/guestfs-actions.pod:5982 ../src/guestfs-actions.pod:6491
11194 #: ../src/guestfs-actions.pod:7876
11195 msgid "(Added in 1.0.59)"
11200 #: ../src/guestfs-actions.pod:2257
11201 msgid "guestfs_glob_expand"
11206 #: ../src/guestfs-actions.pod:2259
11210 " guestfs_glob_expand (guestfs_h *g,\n"
11211 " const char *pattern);\n"
11217 #: ../src/guestfs-actions.pod:2263 ../fish/guestfish-actions.pod:1508
11219 "This command searches for all the pathnames matching C<pattern> according to "
11220 "the wildcard expansion rules used by the shell."
11225 #: ../src/guestfs-actions.pod:2267 ../fish/guestfish-actions.pod:1512
11227 "If no paths match, then this returns an empty list (note: not an error)."
11232 #: ../src/guestfs-actions.pod:2270 ../fish/guestfish-actions.pod:1515
11234 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
11235 "GLOB_BRACE>. See that manual page for more details."
11240 #: ../src/guestfs-actions.pod:2278 ../src/guestfs-actions.pod:6684
11241 #: ../src/guestfs-actions.pod:6701
11242 msgid "(Added in 1.0.50)"
11247 #: ../src/guestfs-actions.pod:2280
11248 msgid "guestfs_grep"
11253 #: ../src/guestfs-actions.pod:2282
11257 " guestfs_grep (guestfs_h *g,\n"
11258 " const char *regex,\n"
11259 " const char *path);\n"
11265 #: ../src/guestfs-actions.pod:2287 ../fish/guestfish-actions.pod:1523
11266 msgid "This calls the external C<grep> program and returns the matching lines."
11271 #: ../src/guestfs-actions.pod:2299
11272 msgid "guestfs_grepi"
11277 #: ../src/guestfs-actions.pod:2301
11281 " guestfs_grepi (guestfs_h *g,\n"
11282 " const char *regex,\n"
11283 " const char *path);\n"
11289 #: ../src/guestfs-actions.pod:2306 ../fish/guestfish-actions.pod:1533
11291 "This calls the external C<grep -i> program and returns the matching lines."
11296 #: ../src/guestfs-actions.pod:2318
11297 msgid "guestfs_grub_install"
11302 #: ../src/guestfs-actions.pod:2320
11306 " guestfs_grub_install (guestfs_h *g,\n"
11307 " const char *root,\n"
11308 " const char *device);\n"
11314 #: ../src/guestfs-actions.pod:2325 ../fish/guestfish-actions.pod:1543
11316 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
11317 "the root directory being C<root>."
11322 #: ../src/guestfs-actions.pod:2328 ../fish/guestfish-actions.pod:1546
11324 "Note: If grub-install reports the error \"No suitable drive was found in the "
11325 "generated device map.\" it may be that you need to create a C</boot/grub/"
11326 "device.map> file first that contains the mapping between grub device names "
11327 "and Linux device names. It is usually sufficient to create a file "
11333 #: ../src/guestfs-actions.pod:2335 ../fish/guestfish-actions.pod:1553
11336 " (hd0) /dev/vda\n"
11342 #: ../src/guestfs-actions.pod:2337 ../fish/guestfish-actions.pod:1555
11343 msgid "replacing C</dev/vda> with the name of the installation device."
11348 #: ../src/guestfs-actions.pod:2341
11349 msgid "(Added in 1.0.17)"
11354 #: ../src/guestfs-actions.pod:2343
11355 msgid "guestfs_head"
11360 #: ../src/guestfs-actions.pod:2345
11364 " guestfs_head (guestfs_h *g,\n"
11365 " const char *path);\n"
11371 #: ../src/guestfs-actions.pod:2349 ../fish/guestfish-actions.pod:1561
11373 "This command returns up to the first 10 lines of a file as a list of strings."
11378 #: ../src/guestfs-actions.pod:2361
11379 msgid "guestfs_head_n"
11384 #: ../src/guestfs-actions.pod:2363
11388 " guestfs_head_n (guestfs_h *g,\n"
11390 " const char *path);\n"
11396 #: ../src/guestfs-actions.pod:2368 ../fish/guestfish-actions.pod:1571
11398 "If the parameter C<nrlines> is a positive number, this returns the first "
11399 "C<nrlines> lines of the file C<path>."
11404 #: ../src/guestfs-actions.pod:2371 ../fish/guestfish-actions.pod:1574
11406 "If the parameter C<nrlines> is a negative number, this returns lines from "
11407 "the file C<path>, excluding the last C<nrlines> lines."
11412 #: ../src/guestfs-actions.pod:2374 ../src/guestfs-actions.pod:6981
11413 #: ../fish/guestfish-actions.pod:1577 ../fish/guestfish-actions.pod:4637
11414 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
11419 #: ../src/guestfs-actions.pod:2385
11420 msgid "guestfs_hexdump"
11425 #: ../src/guestfs-actions.pod:2387
11429 " guestfs_hexdump (guestfs_h *g,\n"
11430 " const char *path);\n"
11436 #: ../src/guestfs-actions.pod:2391 ../fish/guestfish-actions.pod:1586
11438 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
11439 "readable, canonical hex dump of the file."
11444 #: ../src/guestfs-actions.pod:2400 ../src/guestfs-actions.pod:6765
11445 #: ../src/guestfs-actions.pod:6820
11446 msgid "(Added in 1.0.22)"
11451 #: ../src/guestfs-actions.pod:2402
11452 msgid "guestfs_initrd_cat"
11457 #: ../src/guestfs-actions.pod:2404
11461 " guestfs_initrd_cat (guestfs_h *g,\n"
11462 " const char *initrdpath,\n"
11463 " const char *filename,\n"
11464 " size_t *size_r);\n"
11470 #: ../src/guestfs-actions.pod:2410 ../fish/guestfish-actions.pod:1596
11472 "This command unpacks the file C<filename> from the initrd file called "
11473 "C<initrdpath>. The filename must be given I<without> the initial C</> "
11479 #: ../src/guestfs-actions.pod:2414 ../fish/guestfish-actions.pod:1600
11481 "For example, in guestfish you could use the following command to examine the "
11482 "boot script (usually called C</init>) contained in a Linux initrd or "
11488 #: ../src/guestfs-actions.pod:2418 ../fish/guestfish-actions.pod:1604
11491 " initrd-cat /boot/initrd-<version>.img init\n"
11497 #: ../src/guestfs-actions.pod:2420
11498 msgid "See also C<guestfs_initrd_list>."
11503 #: ../src/guestfs-actions.pod:2431
11504 msgid "guestfs_initrd_list"
11509 #: ../src/guestfs-actions.pod:2433
11513 " guestfs_initrd_list (guestfs_h *g,\n"
11514 " const char *path);\n"
11520 #: ../src/guestfs-actions.pod:2437 ../fish/guestfish-actions.pod:1615
11521 msgid "This command lists out files contained in an initrd."
11526 #: ../src/guestfs-actions.pod:2439 ../fish/guestfish-actions.pod:1617
11528 "The files are listed without any initial C</> character. The files are "
11529 "listed in the order they appear (not necessarily alphabetical). Directory "
11530 "names are listed as separate items."
11535 #: ../src/guestfs-actions.pod:2443 ../fish/guestfish-actions.pod:1621
11537 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
11538 "initrd. We I<only> support the newer initramfs format (compressed cpio "
11544 #: ../src/guestfs-actions.pod:2453
11545 msgid "guestfs_inotify_add_watch"
11550 #: ../src/guestfs-actions.pod:2455
11554 " guestfs_inotify_add_watch (guestfs_h *g,\n"
11555 " const char *path,\n"
11562 #: ../src/guestfs-actions.pod:2460 ../fish/guestfish-actions.pod:1629
11563 msgid "Watch C<path> for the events listed in C<mask>."
11568 #: ../src/guestfs-actions.pod:2462 ../fish/guestfish-actions.pod:1631
11570 "Note that if C<path> is a directory then events within that directory are "
11571 "watched, but this does I<not> happen recursively (in subdirectories)."
11576 #: ../src/guestfs-actions.pod:2466 ../fish/guestfish-actions.pod:1635
11578 "Note for non-C or non-Linux callers: the inotify events are defined by the "
11579 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
11584 #: ../src/guestfs-actions.pod:2474
11585 msgid "guestfs_inotify_close"
11590 #: ../src/guestfs-actions.pod:2476
11594 " guestfs_inotify_close (guestfs_h *g);\n"
11600 #: ../src/guestfs-actions.pod:2479 ../fish/guestfish-actions.pod:1643
11602 "This closes the inotify handle which was previously opened by inotify_init. "
11603 "It removes all watches, throws away any pending events, and deallocates all "
11609 #: ../src/guestfs-actions.pod:2487
11610 msgid "guestfs_inotify_files"
11615 #: ../src/guestfs-actions.pod:2489
11619 " guestfs_inotify_files (guestfs_h *g);\n"
11625 #: ../src/guestfs-actions.pod:2492
11627 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
11628 "returns a list of pathnames of objects that were touched. The returned "
11629 "pathnames are sorted and deduplicated."
11634 #: ../src/guestfs-actions.pod:2502
11635 msgid "guestfs_inotify_init"
11640 #: ../src/guestfs-actions.pod:2504
11644 " guestfs_inotify_init (guestfs_h *g,\n"
11645 " int maxevents);\n"
11651 #: ../src/guestfs-actions.pod:2508 ../fish/guestfish-actions.pod:1659
11653 "This command creates a new inotify handle. The inotify subsystem can be "
11654 "used to notify events which happen to objects in the guest filesystem."
11659 #: ../src/guestfs-actions.pod:2512
11661 "C<maxevents> is the maximum number of events which will be queued up between "
11662 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
11663 "passed as C<0>, then the kernel (or previously set) default is used. For "
11664 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
11665 "throws away events, but records the fact that it threw them away by setting "
11666 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
11667 "C<guestfs_inotify_read>)."
11672 #: ../src/guestfs-actions.pod:2522
11674 "Before any events are generated, you have to add some watches to the "
11675 "internal watch list. See: C<guestfs_inotify_add_watch>, "
11676 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
11681 #: ../src/guestfs-actions.pod:2528
11683 "Queued up events should be read periodically by calling "
11684 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
11685 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
11686 "often enough then you risk the internal queue overflowing."
11691 #: ../src/guestfs-actions.pod:2535
11693 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
11694 "This also removes any watches automatically."
11699 #: ../src/guestfs-actions.pod:2539 ../fish/guestfish-actions.pod:1690
11701 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
11702 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
11703 "that there is one global inotify handle per libguestfs instance."
11708 #: ../src/guestfs-actions.pod:2548
11709 msgid "guestfs_inotify_read"
11714 #: ../src/guestfs-actions.pod:2550
11717 " struct guestfs_inotify_event_list *\n"
11718 " guestfs_inotify_read (guestfs_h *g);\n"
11724 #: ../src/guestfs-actions.pod:2553 ../fish/guestfish-actions.pod:1699
11726 "Return the complete queue of events that have happened since the previous "
11732 #: ../src/guestfs-actions.pod:2556 ../fish/guestfish-actions.pod:1702
11733 msgid "If no events have happened, this returns an empty list."
11738 #: ../src/guestfs-actions.pod:2558 ../fish/guestfish-actions.pod:1704
11740 "I<Note>: In order to make sure that all events have been read, you must call "
11741 "this function repeatedly until it returns an empty list. The reason is that "
11742 "the call will read events up to the maximum appliance-to-host message size "
11743 "and leave remaining events in the queue."
11748 #: ../src/guestfs-actions.pod:2564
11750 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
11751 "there was an error. I<The caller must call "
11752 "C<guestfs_free_inotify_event_list> after use>."
11757 #: ../src/guestfs-actions.pod:2570
11758 msgid "guestfs_inotify_rm_watch"
11763 #: ../src/guestfs-actions.pod:2572
11767 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
11774 #: ../src/guestfs-actions.pod:2576
11776 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
11781 #: ../src/guestfs-actions.pod:2583
11782 msgid "guestfs_inspect_get_arch"
11787 #: ../src/guestfs-actions.pod:2585
11791 " guestfs_inspect_get_arch (guestfs_h *g,\n"
11792 " const char *root);\n"
11798 #: ../src/guestfs-actions.pod:2589
11800 "This returns the architecture of the inspected operating system. The "
11801 "possible return values are listed under C<guestfs_file_architecture>."
11806 #: ../src/guestfs-actions.pod:2593 ../fish/guestfish-actions.pod:1725
11808 "If the architecture could not be determined, then the string C<unknown> is "
11814 #: ../src/guestfs-actions.pod:2596 ../src/guestfs-actions.pod:2686
11815 #: ../src/guestfs-actions.pod:2790 ../src/guestfs-actions.pod:2809
11816 #: ../src/guestfs-actions.pod:2940 ../src/guestfs-actions.pod:3023
11817 #: ../src/guestfs-actions.pod:3051 ../src/guestfs-actions.pod:3072
11818 #: ../src/guestfs-actions.pod:3125 ../src/guestfs-actions.pod:3165
11819 #: ../src/guestfs-actions.pod:3185 ../src/guestfs-actions.pod:3205
11820 #: ../src/guestfs-actions.pod:3222 ../src/guestfs-actions.pod:3238
11821 #: ../src/guestfs-actions.pod:3256 ../src/guestfs-actions.pod:3358
11822 #: ../src/guestfs-actions.pod:3399 ../fish/guestfish-actions.pod:1728
11823 #: ../fish/guestfish-actions.pod:1811 ../fish/guestfish-actions.pod:1890
11824 #: ../fish/guestfish-actions.pod:1902 ../fish/guestfish-actions.pod:1986
11825 #: ../fish/guestfish-actions.pod:2047 ../fish/guestfish-actions.pod:2068
11826 #: ../fish/guestfish-actions.pod:2082 ../fish/guestfish-actions.pod:2122
11827 #: ../fish/guestfish-actions.pod:2154 ../fish/guestfish-actions.pod:2167
11828 #: ../fish/guestfish-actions.pod:2180 ../fish/guestfish-actions.pod:2190
11829 #: ../fish/guestfish-actions.pod:2200 ../fish/guestfish-actions.pod:2212
11830 #: ../fish/guestfish-actions.pod:2308 ../fish/guestfish-actions.pod:2342
11831 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
11836 #: ../src/guestfs-actions.pod:2603
11837 msgid "guestfs_inspect_get_distro"
11842 #: ../src/guestfs-actions.pod:2605
11846 " guestfs_inspect_get_distro (guestfs_h *g,\n"
11847 " const char *root);\n"
11853 #: ../src/guestfs-actions.pod:2609 ../fish/guestfish-actions.pod:1734
11855 "This returns the distro (distribution) of the inspected operating system."
11860 #: ../src/guestfs-actions.pod:2612 ../fish/guestfish-actions.pod:1737
11861 msgid "Currently defined distros are:"
11866 #: ../src/guestfs-actions.pod:2616 ../fish/guestfish-actions.pod:1741
11867 msgid "\"archlinux\""
11872 #: ../src/guestfs-actions.pod:2618 ../fish/guestfish-actions.pod:1743
11873 msgid "Arch Linux."
11877 #: ../src/guestfs-actions.pod:2620 ../fish/guestfish-actions.pod:1745
11882 #: ../src/guestfs-actions.pod:2622 ../fish/guestfish-actions.pod:1747
11888 #: ../src/guestfs-actions.pod:2624 ../fish/guestfish-actions.pod:1749
11894 #: ../src/guestfs-actions.pod:2626 ../fish/guestfish-actions.pod:1751
11900 #: ../src/guestfs-actions.pod:2628 ../fish/guestfish-actions.pod:1753
11906 #: ../src/guestfs-actions.pod:2630 ../fish/guestfish-actions.pod:1755
11912 #: ../src/guestfs-actions.pod:2632 ../fish/guestfish-actions.pod:1757
11918 #: ../src/guestfs-actions.pod:2634 ../fish/guestfish-actions.pod:1759
11924 #: ../src/guestfs-actions.pod:2636 ../fish/guestfish-actions.pod:1761
11925 msgid "\"linuxmint\""
11930 #: ../src/guestfs-actions.pod:2638 ../fish/guestfish-actions.pod:1763
11931 msgid "Linux Mint."
11936 #: ../src/guestfs-actions.pod:2640 ../fish/guestfish-actions.pod:1765
11937 msgid "\"mandriva\""
11942 #: ../src/guestfs-actions.pod:2642 ../fish/guestfish-actions.pod:1767
11948 #: ../src/guestfs-actions.pod:2644 ../fish/guestfish-actions.pod:1769
11954 #: ../src/guestfs-actions.pod:2646 ../fish/guestfish-actions.pod:1771
11960 #: ../src/guestfs-actions.pod:2648 ../fish/guestfish-actions.pod:1773
11966 #: ../src/guestfs-actions.pod:2650 ../fish/guestfish-actions.pod:1775
11972 #: ../src/guestfs-actions.pod:2652 ../fish/guestfish-actions.pod:1777
11973 msgid "\"redhat-based\""
11978 #: ../src/guestfs-actions.pod:2654 ../fish/guestfish-actions.pod:1779
11979 msgid "Some Red Hat-derived distro."
11984 #: ../src/guestfs-actions.pod:2656 ../fish/guestfish-actions.pod:1781
11989 #: ../src/guestfs-actions.pod:2658 ../fish/guestfish-actions.pod:1783
11990 msgid "Red Hat Enterprise Linux."
11994 #: ../src/guestfs-actions.pod:2660 ../fish/guestfish-actions.pod:1785
11995 msgid "\"scientificlinux\""
11999 #: ../src/guestfs-actions.pod:2662 ../fish/guestfish-actions.pod:1787
12000 msgid "Scientific Linux."
12004 #: ../src/guestfs-actions.pod:2664 ../fish/guestfish-actions.pod:1789
12005 msgid "\"slackware\""
12009 #: ../src/guestfs-actions.pod:2666 ../fish/guestfish-actions.pod:1791
12015 #: ../src/guestfs-actions.pod:2668 ../fish/guestfish-actions.pod:1793
12021 #: ../src/guestfs-actions.pod:2670 ../fish/guestfish-actions.pod:1795
12027 #: ../src/guestfs-actions.pod:2672 ../src/guestfs-actions.pod:2781
12028 #: ../src/guestfs-actions.pod:3156 ../fish/guestfish-actions.pod:1797
12029 #: ../fish/guestfish-actions.pod:1881 ../fish/guestfish-actions.pod:2145
12030 msgid "\"unknown\""
12035 #: ../src/guestfs-actions.pod:2674 ../fish/guestfish-actions.pod:1799
12036 msgid "The distro could not be determined."
12041 #: ../src/guestfs-actions.pod:2676 ../src/guestfs-actions.pod:3148
12042 #: ../fish/guestfish-actions.pod:1801 ../fish/guestfish-actions.pod:2137
12043 msgid "\"windows\""
12048 #: ../src/guestfs-actions.pod:2678 ../fish/guestfish-actions.pod:1803
12050 "Windows does not have distributions. This string is returned if the OS type "
12056 #: ../src/guestfs-actions.pod:2683 ../src/guestfs-actions.pod:2787
12057 #: ../src/guestfs-actions.pod:3162 ../fish/guestfish-actions.pod:1808
12058 #: ../fish/guestfish-actions.pod:1887 ../fish/guestfish-actions.pod:2151
12060 "Future versions of libguestfs may return other strings here. The caller "
12061 "should be prepared to handle any string."
12065 #: ../src/guestfs-actions.pod:2693
12066 msgid "guestfs_inspect_get_drive_mappings"
12070 #: ../src/guestfs-actions.pod:2695
12074 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
12075 " const char *root);\n"
12080 #: ../src/guestfs-actions.pod:2699 ../fish/guestfish-actions.pod:1817
12082 "This call is useful for Windows which uses a primitive system of assigning "
12083 "drive letters (like \"C:\") to partitions. This inspection API examines the "
12084 "Windows Registry to find out how disks/partitions are mapped to drive "
12085 "letters, and returns a hash table as in the example below:"
12089 #: ../src/guestfs-actions.pod:2705 ../fish/guestfish-actions.pod:1823
12092 " C => /dev/vda2\n"
12093 " E => /dev/vdb1\n"
12094 " F => /dev/vdc1\n"
12099 #: ../src/guestfs-actions.pod:2709 ../fish/guestfish-actions.pod:1827
12101 "Note that keys are drive letters. For Windows, the key is case insensitive "
12102 "and just contains the drive letter, without the customary colon separator "
12107 #: ../src/guestfs-actions.pod:2713 ../fish/guestfish-actions.pod:1831
12109 "In future we may support other operating systems that also used drive "
12110 "letters, but the keys for those might not be case insensitive and might be "
12111 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
12116 #: ../src/guestfs-actions.pod:2718 ../fish/guestfish-actions.pod:1836
12118 "For Windows guests, currently only hard drive mappings are returned. "
12119 "Removable disks (eg. DVD-ROMs) are ignored."
12123 #: ../src/guestfs-actions.pod:2721 ../fish/guestfish-actions.pod:1839
12125 "For guests that do not use drive mappings, or if the drive mappings could "
12126 "not be determined, this returns an empty hash table."
12130 #: ../src/guestfs-actions.pod:2724
12132 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
12133 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
12138 #: ../src/guestfs-actions.pod:2728 ../src/guestfs-actions.pod:2996
12139 #: ../src/guestfs-actions.pod:3794 ../src/guestfs-actions.pod:5076
12140 #: ../src/guestfs-actions.pod:7122
12142 "This function returns a NULL-terminated array of strings, or NULL if there "
12143 "was an error. The array of strings will always have length C<2n+1>, where "
12144 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
12145 "caller must free the strings and the array after use>."
12149 #: ../src/guestfs-actions.pod:2734 ../src/guestfs-actions.pod:3190
12150 msgid "(Added in 1.9.17)"
12155 #: ../src/guestfs-actions.pod:2736
12156 msgid "guestfs_inspect_get_filesystems"
12161 #: ../src/guestfs-actions.pod:2738
12165 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
12166 " const char *root);\n"
12172 #: ../src/guestfs-actions.pod:2742 ../fish/guestfish-actions.pod:1850
12174 "This returns a list of all the filesystems that we think are associated with "
12175 "this operating system. This includes the root filesystem, other ordinary "
12176 "filesystems, and non-mounted devices like swap partitions."
12181 #: ../src/guestfs-actions.pod:2747 ../fish/guestfish-actions.pod:1855
12183 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
12184 "to be shared between operating systems."
12189 #: ../src/guestfs-actions.pod:2750
12191 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
12192 "C<guestfs_inspect_get_mountpoints>."
12196 #: ../src/guestfs-actions.pod:2759
12197 msgid "guestfs_inspect_get_format"
12201 #: ../src/guestfs-actions.pod:2761
12205 " guestfs_inspect_get_format (guestfs_h *g,\n"
12206 " const char *root);\n"
12211 #: ../src/guestfs-actions.pod:2765 ../fish/guestfish-actions.pod:1865
12213 "This returns the format of the inspected operating system. You can use it "
12214 "to detect install images, live CDs and similar."
12218 #: ../src/guestfs-actions.pod:2768 ../fish/guestfish-actions.pod:1868
12219 msgid "Currently defined formats are:"
12223 #: ../src/guestfs-actions.pod:2772 ../fish/guestfish-actions.pod:1872
12224 msgid "\"installed\""
12228 #: ../src/guestfs-actions.pod:2774 ../fish/guestfish-actions.pod:1874
12229 msgid "This is an installed operating system."
12233 #: ../src/guestfs-actions.pod:2776 ../fish/guestfish-actions.pod:1876
12234 msgid "\"installer\""
12238 #: ../src/guestfs-actions.pod:2778 ../fish/guestfish-actions.pod:1878
12240 "The disk image being inspected is not an installed operating system, but a "
12241 "I<bootable> install disk, live CD, or similar."
12245 #: ../src/guestfs-actions.pod:2783 ../fish/guestfish-actions.pod:1883
12246 msgid "The format of this disk image is not known."
12250 #: ../src/guestfs-actions.pod:2795 ../src/guestfs-actions.pod:3226
12251 #: ../src/guestfs-actions.pod:3242 ../src/guestfs-actions.pod:3260
12252 #: ../src/guestfs-actions.pod:6020
12253 msgid "(Added in 1.9.4)"
12258 #: ../src/guestfs-actions.pod:2797
12259 msgid "guestfs_inspect_get_hostname"
12264 #: ../src/guestfs-actions.pod:2799
12268 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
12269 " const char *root);\n"
12275 #: ../src/guestfs-actions.pod:2803 ../fish/guestfish-actions.pod:1896
12277 "This function returns the hostname of the operating system as found by "
12278 "inspection of the guest's configuration files."
12283 #: ../src/guestfs-actions.pod:2806 ../fish/guestfish-actions.pod:1899
12285 "If the hostname could not be determined, then the string C<unknown> is "
12291 #: ../src/guestfs-actions.pod:2814
12292 msgid "(Added in 1.7.9)"
12296 #: ../src/guestfs-actions.pod:2816
12297 msgid "guestfs_inspect_get_icon"
12301 #: ../src/guestfs-actions.pod:2818
12305 " guestfs_inspect_get_icon (guestfs_h *g,\n"
12306 " const char *root,\n"
12307 " size_t *size_r,\n"
12313 #: ../src/guestfs-actions.pod:2829
12316 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
12317 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
12322 #: ../src/guestfs-actions.pod:2832 ../fish/guestfish-actions.pod:1908
12324 "This function returns an icon corresponding to the inspected operating "
12325 "system. The icon is returned as a buffer containing a PNG image (re-encoded "
12326 "to PNG if necessary)."
12330 #: ../src/guestfs-actions.pod:2836 ../fish/guestfish-actions.pod:1912
12332 "If it was not possible to get an icon this function returns a zero-length "
12333 "(non-NULL) buffer. I<Callers must check for this case>."
12337 #: ../src/guestfs-actions.pod:2839 ../fish/guestfish-actions.pod:1915
12339 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
12340 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
12341 "this file will be returned. You can disable favicons by passing the "
12342 "optional C<favicon> boolean as false (default is true)."
12346 #: ../src/guestfs-actions.pod:2845 ../fish/guestfish-actions.pod:1921
12348 "If finding the favicon fails, then we look in other places in the guest for "
12353 #: ../src/guestfs-actions.pod:2848 ../fish/guestfish-actions.pod:1924
12355 "If the optional C<highquality> boolean is true then only high quality icons "
12356 "are returned, which means only icons of high resolution with an alpha "
12357 "channel. The default (false) is to return any icon we can, even if it is of "
12358 "substandard quality."
12362 #: ../src/guestfs-actions.pod:2859 ../fish/guestfish-actions.pod:1935
12364 "Unlike most other inspection API calls, the guest's disks must be mounted up "
12365 "before you call this, since it needs to read information from the guest "
12366 "filesystem during the call."
12370 #: ../src/guestfs-actions.pod:2865 ../fish/guestfish-actions.pod:1941
12372 "B<Security:> The icon data comes from the untrusted guest, and should be "
12373 "treated with caution. PNG files have been known to contain exploits. "
12374 "Ensure that libpng (or other relevant libraries) are fully up to date before "
12375 "trying to process or display the icon."
12379 #: ../src/guestfs-actions.pod:2873 ../fish/guestfish-actions.pod:1949
12381 "The PNG image returned can be any size. It might not be square. Libguestfs "
12382 "tries to return the largest, highest quality icon available. The "
12383 "application must scale the icon to the required size."
12387 #: ../src/guestfs-actions.pod:2880 ../fish/guestfish-actions.pod:1956
12389 "Extracting icons from Windows guests requires the external C<wrestool> "
12390 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
12391 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
12392 "installed separately."
12396 #: ../src/guestfs-actions.pod:2887 ../fish/guestfish-actions.pod:1963
12398 "Operating system icons are usually trademarks. Seek legal advice before "
12399 "using trademarks in applications."
12403 #: ../src/guestfs-actions.pod:2896 ../src/guestfs-actions.pod:3721
12404 #: ../src/guestfs-actions.pod:4975
12405 msgid "(Added in 1.11.12)"
12409 #: ../src/guestfs-actions.pod:2898
12410 msgid "guestfs_inspect_get_icon_va"
12414 #: ../src/guestfs-actions.pod:2900
12418 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
12419 " const char *root,\n"
12420 " size_t *size_r,\n"
12421 " va_list args);\n"
12426 #: ../src/guestfs-actions.pod:2906
12427 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
12431 #: ../src/guestfs-actions.pod:2910
12432 msgid "guestfs_inspect_get_icon_argv"
12436 #: ../src/guestfs-actions.pod:2912
12440 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
12441 " const char *root,\n"
12442 " size_t *size_r,\n"
12443 " const struct guestfs_inspect_get_icon_argv *optargs);\n"
12448 #: ../src/guestfs-actions.pod:2918
12449 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
12454 #: ../src/guestfs-actions.pod:2922
12455 msgid "guestfs_inspect_get_major_version"
12460 #: ../src/guestfs-actions.pod:2924
12464 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
12465 " const char *root);\n"
12471 #: ../src/guestfs-actions.pod:2928 ../fish/guestfish-actions.pod:1974
12473 "This returns the major version number of the inspected operating system."
12478 #: ../src/guestfs-actions.pod:2931 ../fish/guestfish-actions.pod:1977
12480 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
12481 "popular public names used by the operating system. Notably the operating "
12482 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
12483 "1). You can find out the real versions corresponding to releases of Windows "
12484 "by consulting Wikipedia or MSDN."
12489 #: ../src/guestfs-actions.pod:2938 ../src/guestfs-actions.pod:2955
12490 #: ../fish/guestfish-actions.pod:1984 ../fish/guestfish-actions.pod:1995
12491 msgid "If the version could not be determined, then C<0> is returned."
12496 #: ../src/guestfs-actions.pod:2946
12497 msgid "guestfs_inspect_get_minor_version"
12502 #: ../src/guestfs-actions.pod:2948
12506 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
12507 " const char *root);\n"
12513 #: ../src/guestfs-actions.pod:2952 ../fish/guestfish-actions.pod:1992
12515 "This returns the minor version number of the inspected operating system."
12520 #: ../src/guestfs-actions.pod:2957
12522 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
12523 "C<guestfs_inspect_get_major_version>."
12528 #: ../src/guestfs-actions.pod:2964
12529 msgid "guestfs_inspect_get_mountpoints"
12534 #: ../src/guestfs-actions.pod:2966
12538 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
12539 " const char *root);\n"
12544 #: ../src/guestfs-actions.pod:2970 ../fish/guestfish-actions.pod:2004
12546 "This returns a hash of where we think the filesystems associated with this "
12547 "operating system should be mounted. Callers should note that this is at "
12548 "best an educated guess made by reading configuration files such as C</etc/"
12549 "fstab>. I<In particular note> that this may return filesystems which are "
12550 "non-existent or not mountable and callers should be prepared to handle or "
12551 "ignore failures if they try to mount them."
12556 #: ../src/guestfs-actions.pod:2979 ../fish/guestfish-actions.pod:2013
12558 "Each element in the returned hashtable has a key which is the path of the "
12559 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
12560 "mounted there (eg. C</dev/sda1>)."
12565 #: ../src/guestfs-actions.pod:2984 ../fish/guestfish-actions.pod:2018
12567 "Non-mounted devices such as swap devices are I<not> returned in this list."
12571 #: ../src/guestfs-actions.pod:2987
12573 "For operating systems like Windows which still use drive letters, this call "
12574 "will only return an entry for the first drive \"mounted on\" C</>. For "
12575 "information about the mapping of drive letters to partitions, see "
12576 "C<guestfs_inspect_get_drive_mappings>."
12581 #: ../src/guestfs-actions.pod:2993
12583 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
12584 "C<guestfs_inspect_get_filesystems>."
12589 #: ../src/guestfs-actions.pod:3004
12590 msgid "guestfs_inspect_get_package_format"
12595 #: ../src/guestfs-actions.pod:3006
12599 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
12600 " const char *root);\n"
12606 #: ../src/guestfs-actions.pod:3010
12608 "This function and C<guestfs_inspect_get_package_management> return the "
12609 "package format and package management tool used by the inspected operating "
12610 "system. For example for Fedora these functions would return C<rpm> (package "
12611 "format) and C<yum> (package management)."
12616 #: ../src/guestfs-actions.pod:3016 ../fish/guestfish-actions.pod:2040
12618 "This returns the string C<unknown> if we could not determine the package "
12619 "format I<or> if the operating system does not have a real packaging system "
12625 #: ../src/guestfs-actions.pod:3020 ../fish/guestfish-actions.pod:2044
12627 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>. "
12628 "Future versions of libguestfs may return other strings."
12633 #: ../src/guestfs-actions.pod:3028 ../src/guestfs-actions.pod:3056
12634 msgid "(Added in 1.7.5)"
12639 #: ../src/guestfs-actions.pod:3030
12640 msgid "guestfs_inspect_get_package_management"
12645 #: ../src/guestfs-actions.pod:3032
12649 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
12650 " const char *root);\n"
12656 #: ../src/guestfs-actions.pod:3036
12658 "C<guestfs_inspect_get_package_format> and this function return the package "
12659 "format and package management tool used by the inspected operating system. "
12660 "For example for Fedora these functions would return C<rpm> (package format) "
12661 "and C<yum> (package management)."
12666 #: ../src/guestfs-actions.pod:3042 ../fish/guestfish-actions.pod:2059
12668 "This returns the string C<unknown> if we could not determine the package "
12669 "management tool I<or> if the operating system does not have a real packaging "
12670 "system (eg. Windows)."
12675 #: ../src/guestfs-actions.pod:3046 ../fish/guestfish-actions.pod:2063
12677 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
12678 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>. Future versions of "
12679 "libguestfs may return other strings."
12684 #: ../src/guestfs-actions.pod:3058
12685 msgid "guestfs_inspect_get_product_name"
12690 #: ../src/guestfs-actions.pod:3060
12694 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
12695 " const char *root);\n"
12701 #: ../src/guestfs-actions.pod:3064 ../fish/guestfish-actions.pod:2074
12703 "This returns the product name of the inspected operating system. The "
12704 "product name is generally some freeform string which can be displayed to the "
12705 "user, but should not be parsed by programs."
12710 #: ../src/guestfs-actions.pod:3069 ../fish/guestfish-actions.pod:2079
12712 "If the product name could not be determined, then the string C<unknown> is "
12717 #: ../src/guestfs-actions.pod:3079
12718 msgid "guestfs_inspect_get_product_variant"
12722 #: ../src/guestfs-actions.pod:3081
12726 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
12727 " const char *root);\n"
12732 #: ../src/guestfs-actions.pod:3085 ../fish/guestfish-actions.pod:2088
12733 msgid "This returns the product variant of the inspected operating system."
12737 #: ../src/guestfs-actions.pod:3088 ../fish/guestfish-actions.pod:2091
12739 "For Windows guests, this returns the contents of the Registry key C<HKLM"
12740 "\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> which "
12741 "is usually a string such as C<Client> or C<Server> (other values are "
12742 "possible). This can be used to distinguish consumer and enterprise versions "
12743 "of Windows that have the same version number (for example, Windows 7 and "
12744 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
12745 "the latter is C<Server>)."
12749 #: ../src/guestfs-actions.pod:3097 ../fish/guestfish-actions.pod:2100
12751 "For enterprise Linux guests, in future we intend this to return the product "
12752 "variant such as C<Desktop>, C<Server> and so on. But this is not "
12753 "implemented at present."
12757 #: ../src/guestfs-actions.pod:3101 ../fish/guestfish-actions.pod:2104
12759 "If the product variant could not be determined, then the string C<unknown> "
12764 #: ../src/guestfs-actions.pod:3104
12766 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
12767 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
12771 #: ../src/guestfs-actions.pod:3111
12772 msgid "(Added in 1.9.13)"
12777 #: ../src/guestfs-actions.pod:3113
12778 msgid "guestfs_inspect_get_roots"
12783 #: ../src/guestfs-actions.pod:3115
12787 " guestfs_inspect_get_roots (guestfs_h *g);\n"
12793 #: ../src/guestfs-actions.pod:3118
12795 "This function is a convenient way to get the list of root devices, as "
12796 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
12797 "the whole inspection process."
12802 #: ../src/guestfs-actions.pod:3122
12804 "This returns an empty list if either no root devices were found or the "
12805 "caller has not called C<guestfs_inspect_os>."
12810 #: ../src/guestfs-actions.pod:3131
12811 msgid "(Added in 1.7.3)"
12816 #: ../src/guestfs-actions.pod:3133
12817 msgid "guestfs_inspect_get_type"
12822 #: ../src/guestfs-actions.pod:3135
12826 " guestfs_inspect_get_type (guestfs_h *g,\n"
12827 " const char *root);\n"
12833 #: ../src/guestfs-actions.pod:3139 ../fish/guestfish-actions.pod:2128
12835 "This returns the type of the inspected operating system. Currently defined "
12841 #: ../src/guestfs-actions.pod:3144 ../fish/guestfish-actions.pod:2133
12847 #: ../src/guestfs-actions.pod:3146 ../fish/guestfish-actions.pod:2135
12848 msgid "Any Linux-based operating system."
12853 #: ../src/guestfs-actions.pod:3150 ../fish/guestfish-actions.pod:2139
12854 msgid "Any Microsoft Windows operating system."
12859 #: ../src/guestfs-actions.pod:3152 ../fish/guestfish-actions.pod:2141
12860 msgid "\"freebsd\""
12865 #: ../src/guestfs-actions.pod:3154 ../fish/guestfish-actions.pod:2143
12871 #: ../src/guestfs-actions.pod:3158 ../fish/guestfish-actions.pod:2147
12872 msgid "The operating system type could not be determined."
12876 #: ../src/guestfs-actions.pod:3172
12877 msgid "guestfs_inspect_get_windows_current_control_set"
12881 #: ../src/guestfs-actions.pod:3174
12885 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
12886 " const char *root);\n"
12891 #: ../src/guestfs-actions.pod:3178 ../fish/guestfish-actions.pod:2160
12893 "This returns the Windows CurrentControlSet of the inspected guest. The "
12894 "CurrentControlSet is a registry key name such as C<ControlSet001>."
12898 #: ../src/guestfs-actions.pod:3181 ../fish/guestfish-actions.pod:2163
12900 "This call assumes that the guest is Windows and that the Registry could be "
12901 "examined by inspection. If this is not the case then an error is returned."
12906 #: ../src/guestfs-actions.pod:3192
12907 msgid "guestfs_inspect_get_windows_systemroot"
12912 #: ../src/guestfs-actions.pod:3194
12916 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
12917 " const char *root);\n"
12923 #: ../src/guestfs-actions.pod:3198 ../fish/guestfish-actions.pod:2173
12925 "This returns the Windows systemroot of the inspected guest. The systemroot "
12926 "is a directory path such as C</WINDOWS>."
12931 #: ../src/guestfs-actions.pod:3201 ../fish/guestfish-actions.pod:2176
12933 "This call assumes that the guest is Windows and that the systemroot could be "
12934 "determined by inspection. If this is not the case then an error is returned."
12939 #: ../src/guestfs-actions.pod:3210
12940 msgid "(Added in 1.5.25)"
12944 #: ../src/guestfs-actions.pod:3212
12945 msgid "guestfs_inspect_is_live"
12949 #: ../src/guestfs-actions.pod:3214
12953 " guestfs_inspect_is_live (guestfs_h *g,\n"
12954 " const char *root);\n"
12959 #: ../src/guestfs-actions.pod:3218
12961 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
12962 "disk), then this returns true if a live image was detected on the disk."
12966 #: ../src/guestfs-actions.pod:3228
12967 msgid "guestfs_inspect_is_multipart"
12971 #: ../src/guestfs-actions.pod:3230
12975 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
12976 " const char *root);\n"
12981 #: ../src/guestfs-actions.pod:3234
12983 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
12984 "disk), then this returns true if the disk is part of a set."
12988 #: ../src/guestfs-actions.pod:3244
12989 msgid "guestfs_inspect_is_netinst"
12993 #: ../src/guestfs-actions.pod:3246
12997 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
12998 " const char *root);\n"
13003 #: ../src/guestfs-actions.pod:3250
13005 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
13006 "disk), then this returns true if the disk is a network installer, ie. not a "
13007 "self-contained install CD but one which is likely to require network access "
13008 "to complete the install."
13013 #: ../src/guestfs-actions.pod:3262
13014 msgid "guestfs_inspect_list_applications"
13019 #: ../src/guestfs-actions.pod:3264
13022 " struct guestfs_application_list *\n"
13023 " guestfs_inspect_list_applications (guestfs_h *g,\n"
13024 " const char *root);\n"
13030 #: ../src/guestfs-actions.pod:3268 ../fish/guestfish-actions.pod:2218
13031 msgid "Return the list of applications installed in the operating system."
13036 #: ../src/guestfs-actions.pod:3270
13038 "I<Note:> This call works differently from other parts of the inspection "
13039 "API. You have to call C<guestfs_inspect_os>, then "
13040 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
13041 "this. Listing applications is a significantly more difficult operation "
13042 "which requires access to the full filesystem. Also note that unlike the "
13043 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
13044 "the libguestfs handle, this call actually reads parts of the mounted "
13045 "filesystems during the call."
13050 #: ../src/guestfs-actions.pod:3280 ../fish/guestfish-actions.pod:2230
13052 "This returns an empty list if the inspection code was not able to determine "
13053 "the list of applications."
13058 #: ../src/guestfs-actions.pod:3283 ../fish/guestfish-actions.pod:2233
13059 msgid "The application structure contains the following fields:"
13064 #: ../src/guestfs-actions.pod:3287 ../fish/guestfish-actions.pod:2237
13065 msgid "C<app_name>"
13070 #: ../src/guestfs-actions.pod:3289 ../fish/guestfish-actions.pod:2239
13072 "The name of the application. For Red Hat-derived and Debian-derived Linux "
13073 "guests, this is the package name."
13078 #: ../src/guestfs-actions.pod:3292 ../fish/guestfish-actions.pod:2242
13079 msgid "C<app_display_name>"
13084 #: ../src/guestfs-actions.pod:3294 ../fish/guestfish-actions.pod:2244
13086 "The display name of the application, sometimes localized to the install "
13087 "language of the guest operating system."
13092 #: ../src/guestfs-actions.pod:3297 ../fish/guestfish-actions.pod:2247
13094 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
13095 "to display something can use C<app_name> instead."
13100 #: ../src/guestfs-actions.pod:3300 ../fish/guestfish-actions.pod:2250
13101 msgid "C<app_epoch>"
13106 #: ../src/guestfs-actions.pod:3302 ../fish/guestfish-actions.pod:2252
13108 "For package managers which use epochs, this contains the epoch of the "
13109 "package (an integer). If unavailable, this is returned as C<0>."
13114 #: ../src/guestfs-actions.pod:3305 ../fish/guestfish-actions.pod:2255
13115 msgid "C<app_version>"
13120 #: ../src/guestfs-actions.pod:3307 ../fish/guestfish-actions.pod:2257
13122 "The version string of the application or package. If unavailable this is "
13123 "returned as an empty string C<\"\">."
13128 #: ../src/guestfs-actions.pod:3310 ../fish/guestfish-actions.pod:2260
13129 msgid "C<app_release>"
13134 #: ../src/guestfs-actions.pod:3312 ../fish/guestfish-actions.pod:2262
13136 "The release string of the application or package, for package managers that "
13137 "use this. If unavailable this is returned as an empty string C<\"\">."
13142 #: ../src/guestfs-actions.pod:3316 ../fish/guestfish-actions.pod:2266
13143 msgid "C<app_install_path>"
13148 #: ../src/guestfs-actions.pod:3318 ../fish/guestfish-actions.pod:2268
13150 "The installation path of the application (on operating systems such as "
13151 "Windows which use installation paths). This path is in the format used by "
13152 "the guest operating system, it is not a libguestfs path."
13157 #: ../src/guestfs-actions.pod:3323 ../fish/guestfish-actions.pod:2273
13158 msgid "If unavailable this is returned as an empty string C<\"\">."
13163 #: ../src/guestfs-actions.pod:3325 ../fish/guestfish-actions.pod:2275
13164 msgid "C<app_trans_path>"
13169 #: ../src/guestfs-actions.pod:3327 ../fish/guestfish-actions.pod:2277
13171 "The install path translated into a libguestfs path. If unavailable this is "
13172 "returned as an empty string C<\"\">."
13177 #: ../src/guestfs-actions.pod:3330 ../fish/guestfish-actions.pod:2280
13178 msgid "C<app_publisher>"
13183 #: ../src/guestfs-actions.pod:3332 ../fish/guestfish-actions.pod:2282
13185 "The name of the publisher of the application, for package managers that use "
13186 "this. If unavailable this is returned as an empty string C<\"\">."
13191 #: ../src/guestfs-actions.pod:3336 ../fish/guestfish-actions.pod:2286
13197 #: ../src/guestfs-actions.pod:3338 ../fish/guestfish-actions.pod:2288
13199 "The URL (eg. upstream URL) of the application. If unavailable this is "
13200 "returned as an empty string C<\"\">."
13205 #: ../src/guestfs-actions.pod:3341 ../fish/guestfish-actions.pod:2291
13206 msgid "C<app_source_package>"
13211 #: ../src/guestfs-actions.pod:3343 ../fish/guestfish-actions.pod:2293
13213 "For packaging systems which support this, the name of the source package. "
13214 "If unavailable this is returned as an empty string C<\"\">."
13219 #: ../src/guestfs-actions.pod:3346 ../fish/guestfish-actions.pod:2296
13220 msgid "C<app_summary>"
13225 #: ../src/guestfs-actions.pod:3348 ../fish/guestfish-actions.pod:2298
13227 "A short (usually one line) description of the application or package. If "
13228 "unavailable this is returned as an empty string C<\"\">."
13233 #: ../src/guestfs-actions.pod:3351 ../fish/guestfish-actions.pod:2301
13234 msgid "C<app_description>"
13239 #: ../src/guestfs-actions.pod:3353 ../fish/guestfish-actions.pod:2303
13241 "A longer description of the application or package. If unavailable this is "
13242 "returned as an empty string C<\"\">."
13247 #: ../src/guestfs-actions.pod:3360
13249 "This function returns a C<struct guestfs_application_list *>, or NULL if "
13250 "there was an error. I<The caller must call C<guestfs_free_application_list> "
13256 #: ../src/guestfs-actions.pod:3364
13257 msgid "(Added in 1.7.8)"
13262 #: ../src/guestfs-actions.pod:3366
13263 msgid "guestfs_inspect_os"
13268 #: ../src/guestfs-actions.pod:3368
13272 " guestfs_inspect_os (guestfs_h *g);\n"
13278 #: ../src/guestfs-actions.pod:3371 ../fish/guestfish-actions.pod:2314
13280 "This function uses other libguestfs functions and certain heuristics to "
13281 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
13282 "for operating systems."
13287 #: ../src/guestfs-actions.pod:3375 ../fish/guestfish-actions.pod:2318
13288 msgid "The list returned is empty if no operating systems were found."
13293 #: ../src/guestfs-actions.pod:3377 ../fish/guestfish-actions.pod:2320
13295 "If one operating system was found, then this returns a list with a single "
13296 "element, which is the name of the root filesystem of this operating system. "
13297 "It is also possible for this function to return a list containing more than "
13298 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
13299 "element being the root filesystem of one of the operating systems."
13304 #: ../src/guestfs-actions.pod:3384
13306 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
13307 "functions in order to query further information about each operating system, "
13308 "such as the name and version."
13313 #: ../src/guestfs-actions.pod:3389
13315 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
13316 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
13317 "the contents. This should be called with no disks currently mounted. The "
13318 "function may also use Augeas, so any existing Augeas handle will be closed."
13323 #: ../src/guestfs-actions.pod:3395 ../fish/guestfish-actions.pod:2338
13325 "This function cannot decrypt encrypted disks. The caller must do that first "
13326 "(supplying the necessary keys) if the disk is encrypted."
13331 #: ../src/guestfs-actions.pod:3401 ../src/guestfs-actions.pod:3732
13332 #: ../src/guestfs-actions.pod:3814
13333 msgid "See also C<guestfs_list_filesystems>."
13338 #: ../src/guestfs-actions.pod:3409
13339 msgid "guestfs_is_blockdev"
13344 #: ../src/guestfs-actions.pod:3411
13348 " guestfs_is_blockdev (guestfs_h *g,\n"
13349 " const char *path);\n"
13355 #: ../src/guestfs-actions.pod:3415 ../fish/guestfish-actions.pod:2350
13357 "This returns C<true> if and only if there is a block device with the given "
13363 #: ../src/guestfs-actions.pod:3418 ../src/guestfs-actions.pod:3447
13364 #: ../src/guestfs-actions.pod:3477 ../src/guestfs-actions.pod:3492
13365 #: ../src/guestfs-actions.pod:3508 ../src/guestfs-actions.pod:3564
13366 #: ../src/guestfs-actions.pod:3579
13367 msgid "See also C<guestfs_stat>."
13372 #: ../src/guestfs-actions.pod:3422 ../src/guestfs-actions.pod:3451
13373 #: ../src/guestfs-actions.pod:3496 ../src/guestfs-actions.pod:3568
13374 #: ../src/guestfs-actions.pod:3583
13375 msgid "(Added in 1.5.10)"
13380 #: ../src/guestfs-actions.pod:3424
13381 msgid "guestfs_is_busy"
13386 #: ../src/guestfs-actions.pod:3426
13390 " guestfs_is_busy (guestfs_h *g);\n"
13396 #: ../src/guestfs-actions.pod:3429 ../fish/guestfish-actions.pod:2359
13398 "This returns true iff this handle is busy processing a command (in the "
13404 #: ../src/guestfs-actions.pod:3438
13405 msgid "guestfs_is_chardev"
13410 #: ../src/guestfs-actions.pod:3440
13414 " guestfs_is_chardev (guestfs_h *g,\n"
13415 " const char *path);\n"
13421 #: ../src/guestfs-actions.pod:3444 ../fish/guestfish-actions.pod:2368
13423 "This returns C<true> if and only if there is a character device with the "
13424 "given C<path> name."
13429 #: ../src/guestfs-actions.pod:3453
13430 msgid "guestfs_is_config"
13435 #: ../src/guestfs-actions.pod:3455
13439 " guestfs_is_config (guestfs_h *g);\n"
13445 #: ../src/guestfs-actions.pod:3458 ../fish/guestfish-actions.pod:2377
13447 "This returns true iff this handle is being configured (in the C<CONFIG> "
13453 #: ../src/guestfs-actions.pod:3467
13454 msgid "guestfs_is_dir"
13459 #: ../src/guestfs-actions.pod:3469
13463 " guestfs_is_dir (guestfs_h *g,\n"
13464 " const char *path);\n"
13470 #: ../src/guestfs-actions.pod:3473 ../fish/guestfish-actions.pod:2386
13472 "This returns C<true> if and only if there is a directory with the given "
13473 "C<path> name. Note that it returns false for other objects like files."
13478 #: ../src/guestfs-actions.pod:3483
13479 msgid "guestfs_is_fifo"
13484 #: ../src/guestfs-actions.pod:3485
13488 " guestfs_is_fifo (guestfs_h *g,\n"
13489 " const char *path);\n"
13495 #: ../src/guestfs-actions.pod:3489 ../fish/guestfish-actions.pod:2396
13497 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
13498 "given C<path> name."
13503 #: ../src/guestfs-actions.pod:3498
13504 msgid "guestfs_is_file"
13509 #: ../src/guestfs-actions.pod:3500
13513 " guestfs_is_file (guestfs_h *g,\n"
13514 " const char *path);\n"
13520 #: ../src/guestfs-actions.pod:3504 ../fish/guestfish-actions.pod:2405
13522 "This returns C<true> if and only if there is a regular file with the given "
13523 "C<path> name. Note that it returns false for other objects like directories."
13528 #: ../src/guestfs-actions.pod:3514
13529 msgid "guestfs_is_launching"
13534 #: ../src/guestfs-actions.pod:3516
13538 " guestfs_is_launching (guestfs_h *g);\n"
13544 #: ../src/guestfs-actions.pod:3519 ../fish/guestfish-actions.pod:2415
13546 "This returns true iff this handle is launching the subprocess (in the "
13547 "C<LAUNCHING> state)."
13552 #: ../src/guestfs-actions.pod:3528
13553 msgid "guestfs_is_lv"
13558 #: ../src/guestfs-actions.pod:3530
13562 " guestfs_is_lv (guestfs_h *g,\n"
13563 " const char *device);\n"
13569 #: ../src/guestfs-actions.pod:3534 ../fish/guestfish-actions.pod:2424
13571 "This command tests whether C<device> is a logical volume, and returns true "
13572 "iff this is the case."
13577 #: ../src/guestfs-actions.pod:3541
13578 msgid "guestfs_is_ready"
13583 #: ../src/guestfs-actions.pod:3543
13587 " guestfs_is_ready (guestfs_h *g);\n"
13593 #: ../src/guestfs-actions.pod:3546 ../fish/guestfish-actions.pod:2431
13595 "This returns true iff this handle is ready to accept commands (in the "
13601 #: ../src/guestfs-actions.pod:3555
13602 msgid "guestfs_is_socket"
13607 #: ../src/guestfs-actions.pod:3557
13611 " guestfs_is_socket (guestfs_h *g,\n"
13612 " const char *path);\n"
13618 #: ../src/guestfs-actions.pod:3561 ../fish/guestfish-actions.pod:2440
13620 "This returns C<true> if and only if there is a Unix domain socket with the "
13621 "given C<path> name."
13626 #: ../src/guestfs-actions.pod:3570
13627 msgid "guestfs_is_symlink"
13632 #: ../src/guestfs-actions.pod:3572
13636 " guestfs_is_symlink (guestfs_h *g,\n"
13637 " const char *path);\n"
13643 #: ../src/guestfs-actions.pod:3576 ../fish/guestfish-actions.pod:2449
13645 "This returns C<true> if and only if there is a symbolic link with the given "
13650 #: ../src/guestfs-actions.pod:3585
13651 msgid "guestfs_is_zero"
13655 #: ../src/guestfs-actions.pod:3587
13659 " guestfs_is_zero (guestfs_h *g,\n"
13660 " const char *path);\n"
13665 #: ../src/guestfs-actions.pod:3591 ../fish/guestfish-actions.pod:2458
13667 "This returns true iff the file exists and the file is empty or it contains "
13672 #: ../src/guestfs-actions.pod:3596 ../src/guestfs-actions.pod:3610
13673 msgid "(Added in 1.11.8)"
13677 #: ../src/guestfs-actions.pod:3598
13678 msgid "guestfs_is_zero_device"
13682 #: ../src/guestfs-actions.pod:3600
13686 " guestfs_is_zero_device (guestfs_h *g,\n"
13687 " const char *device);\n"
13692 #: ../src/guestfs-actions.pod:3604 ../fish/guestfish-actions.pod:2465
13693 msgid "This returns true iff the device exists and contains all zero bytes."
13697 #: ../src/guestfs-actions.pod:3606 ../fish/guestfish-actions.pod:2467
13698 msgid "Note that for large devices this can take a long time to run."
13703 #: ../src/guestfs-actions.pod:3612
13704 msgid "guestfs_kill_subprocess"
13709 #: ../src/guestfs-actions.pod:3614
13713 " guestfs_kill_subprocess (guestfs_h *g);\n"
13719 #: ../src/guestfs-actions.pod:3617 ../fish/guestfish-actions.pod:2473
13720 msgid "This kills the qemu subprocess. You should never need to call this."
13725 #: ../src/guestfs-actions.pod:3623
13726 msgid "guestfs_launch"
13731 #: ../src/guestfs-actions.pod:3625
13735 " guestfs_launch (guestfs_h *g);\n"
13741 #: ../src/guestfs-actions.pod:3628 ../fish/guestfish-actions.pod:2481
13743 "Internally libguestfs is implemented by running a virtual machine using "
13749 #: ../src/guestfs-actions.pod:3631 ../fish/guestfish-actions.pod:2484
13751 "You should call this after configuring the handle (eg. adding drives) but "
13752 "before performing any actions."
13757 #: ../src/guestfs-actions.pod:3643
13758 msgid "guestfs_lchown"
13763 #: ../src/guestfs-actions.pod:3645
13767 " guestfs_lchown (guestfs_h *g,\n"
13770 " const char *path);\n"
13776 #: ../src/guestfs-actions.pod:3651
13778 "Change the file owner to C<owner> and group to C<group>. This is like "
13779 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
13780 "changed, not the target."
13785 #: ../src/guestfs-actions.pod:3663
13786 msgid "guestfs_lgetxattr"
13791 #: ../src/guestfs-actions.pod:3665
13795 " guestfs_lgetxattr (guestfs_h *g,\n"
13796 " const char *path,\n"
13797 " const char *name,\n"
13798 " size_t *size_r);\n"
13804 #: ../src/guestfs-actions.pod:3671 ../fish/guestfish-actions.pod:2503
13806 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
13807 "is a symlink, then this call returns an extended attribute from the symlink."
13812 #: ../src/guestfs-actions.pod:3685
13813 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
13818 #: ../src/guestfs-actions.pod:3693
13819 msgid "guestfs_lgetxattrs"
13824 #: ../src/guestfs-actions.pod:3695
13827 " struct guestfs_xattr_list *\n"
13828 " guestfs_lgetxattrs (guestfs_h *g,\n"
13829 " const char *path);\n"
13835 #: ../src/guestfs-actions.pod:3699
13837 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
13838 "then it returns the extended attributes of the link itself."
13842 #: ../src/guestfs-actions.pod:3709
13843 msgid "guestfs_list_9p"
13847 #: ../src/guestfs-actions.pod:3711
13851 " guestfs_list_9p (guestfs_h *g);\n"
13856 #: ../src/guestfs-actions.pod:3714 ../fish/guestfish-actions.pod:2531
13858 "List all 9p filesystems attached to the guest. A list of mount tags is "
13864 #: ../src/guestfs-actions.pod:3723
13865 msgid "guestfs_list_devices"
13870 #: ../src/guestfs-actions.pod:3725
13874 " guestfs_list_devices (guestfs_h *g);\n"
13880 #: ../src/guestfs-actions.pod:3728 ../fish/guestfish-actions.pod:2538
13881 msgid "List all the block devices."
13886 #: ../src/guestfs-actions.pod:3730 ../fish/guestfish-actions.pod:2540
13887 msgid "The full block device names are returned, eg. C</dev/sda>."
13891 #: ../src/guestfs-actions.pod:3740
13892 msgid "guestfs_list_dm_devices"
13896 #: ../src/guestfs-actions.pod:3742
13900 " guestfs_list_dm_devices (guestfs_h *g);\n"
13905 #: ../src/guestfs-actions.pod:3745 ../fish/guestfish-actions.pod:2548
13906 msgid "List all device mapper devices."
13910 #: ../src/guestfs-actions.pod:3747
13912 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
13913 "previous call to C<guestfs_luks_open>."
13917 #: ../src/guestfs-actions.pod:3750
13919 "Device mapper devices which correspond to logical volumes are I<not> "
13920 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
13925 #: ../src/guestfs-actions.pod:3758 ../src/guestfs-actions.pod:5214
13926 msgid "(Added in 1.11.15)"
13931 #: ../src/guestfs-actions.pod:3760
13932 msgid "guestfs_list_filesystems"
13937 #: ../src/guestfs-actions.pod:3762
13941 " guestfs_list_filesystems (guestfs_h *g);\n"
13947 #: ../src/guestfs-actions.pod:3765 ../fish/guestfish-actions.pod:2561
13949 "This inspection command looks for filesystems on partitions, block devices "
13950 "and logical volumes, returning a list of devices containing filesystems and "
13956 #: ../src/guestfs-actions.pod:3769 ../fish/guestfish-actions.pod:2565
13958 "The return value is a hash, where the keys are the devices containing "
13959 "filesystems, and the values are the filesystem types. For example:"
13964 #: ../src/guestfs-actions.pod:3773 ../fish/guestfish-actions.pod:2569
13967 " \"/dev/sda1\" => \"ntfs\"\n"
13968 " \"/dev/sda2\" => \"ext2\"\n"
13969 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
13970 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
13976 #: ../src/guestfs-actions.pod:3778 ../fish/guestfish-actions.pod:2574
13978 "The value can have the special value \"unknown\", meaning the content of the "
13979 "device is undetermined or empty. \"swap\" means a Linux swap partition."
13984 #: ../src/guestfs-actions.pod:3782
13986 "This command runs other libguestfs commands, which might include "
13987 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
13988 "soon after launch and only when nothing is mounted."
13993 #: ../src/guestfs-actions.pod:3786
13995 "Not all of the filesystems returned will be mountable. In particular, swap "
13996 "partitions are returned in the list. Also this command does not check that "
13997 "each filesystem found is valid and mountable, and some filesystems might be "
13998 "mountable but require special options. Filesystems may not all belong to a "
13999 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
14004 #: ../src/guestfs-actions.pod:3800 ../src/guestfs-actions.pod:5569
14005 msgid "(Added in 1.5.15)"
14010 #: ../src/guestfs-actions.pod:3802
14011 msgid "guestfs_list_partitions"
14016 #: ../src/guestfs-actions.pod:3804
14020 " guestfs_list_partitions (guestfs_h *g);\n"
14026 #: ../src/guestfs-actions.pod:3807 ../fish/guestfish-actions.pod:2594
14027 msgid "List all the partitions detected on all block devices."
14032 #: ../src/guestfs-actions.pod:3809 ../fish/guestfish-actions.pod:2596
14033 msgid "The full partition device names are returned, eg. C</dev/sda1>"
14038 #: ../src/guestfs-actions.pod:3811
14040 "This does not return logical volumes. For that you will need to call "
14046 #: ../src/guestfs-actions.pod:3822
14052 #: ../src/guestfs-actions.pod:3824
14056 " guestfs_ll (guestfs_h *g,\n"
14057 " const char *directory);\n"
14063 #: ../src/guestfs-actions.pod:3828 ../fish/guestfish-actions.pod:2607
14065 "List the files in C<directory> (relative to the root directory, there is no "
14066 "cwd) in the format of 'ls -la'."
14071 #: ../src/guestfs-actions.pod:3831 ../fish/guestfish-actions.pod:2610
14073 "This command is mostly useful for interactive sessions. It is I<not> "
14074 "intended that you try to parse the output string."
14079 #: ../src/guestfs-actions.pod:3839
14085 #: ../src/guestfs-actions.pod:3841
14089 " guestfs_ln (guestfs_h *g,\n"
14090 " const char *target,\n"
14091 " const char *linkname);\n"
14097 #: ../src/guestfs-actions.pod:3846 ../fish/guestfish-actions.pod:2617
14098 msgid "This command creates a hard link using the C<ln> command."
14103 #: ../src/guestfs-actions.pod:3852
14104 msgid "guestfs_ln_f"
14109 #: ../src/guestfs-actions.pod:3854
14113 " guestfs_ln_f (guestfs_h *g,\n"
14114 " const char *target,\n"
14115 " const char *linkname);\n"
14120 #: ../src/guestfs-actions.pod:3859 ../fish/guestfish-actions.pod:2623
14122 "This command creates a hard link using the C<ln -f> command. The I<-f> "
14123 "option removes the link (C<linkname>) if it exists already."
14128 #: ../src/guestfs-actions.pod:3866
14129 msgid "guestfs_ln_s"
14134 #: ../src/guestfs-actions.pod:3868
14138 " guestfs_ln_s (guestfs_h *g,\n"
14139 " const char *target,\n"
14140 " const char *linkname);\n"
14146 #: ../src/guestfs-actions.pod:3873 ../fish/guestfish-actions.pod:2630
14147 msgid "This command creates a symbolic link using the C<ln -s> command."
14152 #: ../src/guestfs-actions.pod:3879
14153 msgid "guestfs_ln_sf"
14158 #: ../src/guestfs-actions.pod:3881
14162 " guestfs_ln_sf (guestfs_h *g,\n"
14163 " const char *target,\n"
14164 " const char *linkname);\n"
14169 #: ../src/guestfs-actions.pod:3886 ../fish/guestfish-actions.pod:2636
14171 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
14172 "option removes the link (C<linkname>) if it exists already."
14177 #: ../src/guestfs-actions.pod:3893
14178 msgid "guestfs_lremovexattr"
14183 #: ../src/guestfs-actions.pod:3895
14187 " guestfs_lremovexattr (guestfs_h *g,\n"
14188 " const char *xattr,\n"
14189 " const char *path);\n"
14195 #: ../src/guestfs-actions.pod:3900
14197 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
14198 "link, then it removes an extended attribute of the link itself."
14203 #: ../src/guestfs-actions.pod:3908
14209 #: ../src/guestfs-actions.pod:3910
14213 " guestfs_ls (guestfs_h *g,\n"
14214 " const char *directory);\n"
14220 #: ../src/guestfs-actions.pod:3914 ../fish/guestfish-actions.pod:2651
14222 "List the files in C<directory> (relative to the root directory, there is no "
14223 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
14228 #: ../src/guestfs-actions.pod:3918
14230 "This command is mostly useful for interactive sessions. Programs should "
14231 "probably use C<guestfs_readdir> instead."
14236 #: ../src/guestfs-actions.pod:3927
14237 msgid "guestfs_lsetxattr"
14242 #: ../src/guestfs-actions.pod:3929
14246 " guestfs_lsetxattr (guestfs_h *g,\n"
14247 " const char *xattr,\n"
14248 " const char *val,\n"
14250 " const char *path);\n"
14256 #: ../src/guestfs-actions.pod:3936
14258 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
14259 "then it sets an extended attribute of the link itself."
14264 #: ../src/guestfs-actions.pod:3944
14265 msgid "guestfs_lstat"
14270 #: ../src/guestfs-actions.pod:3946
14273 " struct guestfs_stat *\n"
14274 " guestfs_lstat (guestfs_h *g,\n"
14275 " const char *path);\n"
14281 #: ../src/guestfs-actions.pod:3950 ../src/guestfs-actions.pod:6721
14282 #: ../fish/guestfish-actions.pod:2670 ../fish/guestfish-actions.pod:4472
14283 msgid "Returns file information for the given C<path>."
14288 #: ../src/guestfs-actions.pod:3952
14290 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
14291 "link, then the link is stat-ed, not the file it refers to."
14296 #: ../src/guestfs-actions.pod:3956 ../fish/guestfish-actions.pod:2676
14297 msgid "This is the same as the C<lstat(2)> system call."
14302 #: ../src/guestfs-actions.pod:3958 ../src/guestfs-actions.pod:6725
14304 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
14305 "error. I<The caller must call C<guestfs_free_stat> after use>."
14310 #: ../src/guestfs-actions.pod:3962 ../src/guestfs-actions.pod:6729
14311 #: ../src/guestfs-actions.pod:6747 ../src/guestfs-actions.pod:7128
14312 msgid "(Added in 0.9.2)"
14317 #: ../src/guestfs-actions.pod:3964
14318 msgid "guestfs_lstatlist"
14323 #: ../src/guestfs-actions.pod:3966
14326 " struct guestfs_stat_list *\n"
14327 " guestfs_lstatlist (guestfs_h *g,\n"
14328 " const char *path,\n"
14329 " char *const *names);\n"
14335 #: ../src/guestfs-actions.pod:3971
14337 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
14338 "files, where all files are in the directory C<path>. C<names> is the list "
14339 "of files from this directory."
14344 #: ../src/guestfs-actions.pod:3975 ../fish/guestfish-actions.pod:2686
14346 "On return you get a list of stat structs, with a one-to-one correspondence "
14347 "to the C<names> list. If any name did not exist or could not be lstat'd, "
14348 "then the C<ino> field of that structure is set to C<-1>."
14353 #: ../src/guestfs-actions.pod:3980
14355 "This call is intended for programs that want to efficiently list a directory "
14356 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
14357 "for a similarly efficient call for getting extended attributes. Very long "
14358 "directory listings might cause the protocol message size to be exceeded, "
14359 "causing this call to fail. The caller must split up such requests into "
14360 "smaller groups of names."
14365 #: ../src/guestfs-actions.pod:3988
14367 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
14368 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
14373 #: ../src/guestfs-actions.pod:3994
14374 msgid "guestfs_luks_add_key"
14379 #: ../src/guestfs-actions.pod:3996
14383 " guestfs_luks_add_key (guestfs_h *g,\n"
14384 " const char *device,\n"
14385 " const char *key,\n"
14386 " const char *newkey,\n"
14393 #: ../src/guestfs-actions.pod:4003 ../fish/guestfish-actions.pod:2703
14395 "This command adds a new key on LUKS device C<device>. C<key> is any "
14396 "existing key, and is used to access the device. C<newkey> is the new key to "
14397 "add. C<keyslot> is the key slot that will be replaced."
14402 #: ../src/guestfs-actions.pod:4008
14404 "Note that if C<keyslot> already contains a key, then this command will "
14405 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
14410 #: ../src/guestfs-actions.pod:4014 ../src/guestfs-actions.pod:4054
14411 #: ../src/guestfs-actions.pod:4077 ../src/guestfs-actions.pod:4097
14412 #: ../src/guestfs-actions.pod:4132 ../src/guestfs-actions.pod:4151
14414 "This function takes a key or passphrase parameter which could contain "
14415 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
14421 #: ../src/guestfs-actions.pod:4018 ../src/guestfs-actions.pod:4058
14422 #: ../src/guestfs-actions.pod:4081 ../src/guestfs-actions.pod:4101
14423 msgid "(Added in 1.5.2)"
14428 #: ../src/guestfs-actions.pod:4020
14429 msgid "guestfs_luks_close"
14434 #: ../src/guestfs-actions.pod:4022
14438 " guestfs_luks_close (guestfs_h *g,\n"
14439 " const char *device);\n"
14445 #: ../src/guestfs-actions.pod:4026
14447 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
14448 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
14449 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
14450 "underlying block device."
14455 #: ../src/guestfs-actions.pod:4034 ../src/guestfs-actions.pod:4136
14456 #: ../src/guestfs-actions.pod:4155 ../src/guestfs-actions.pod:4205
14457 #: ../src/guestfs-actions.pod:4253
14458 msgid "(Added in 1.5.1)"
14463 #: ../src/guestfs-actions.pod:4036
14464 msgid "guestfs_luks_format"
14469 #: ../src/guestfs-actions.pod:4038
14473 " guestfs_luks_format (guestfs_h *g,\n"
14474 " const char *device,\n"
14475 " const char *key,\n"
14482 #: ../src/guestfs-actions.pod:4044 ../fish/guestfish-actions.pod:2729
14484 "This command erases existing data on C<device> and formats the device as a "
14485 "LUKS encrypted device. C<key> is the initial key, which is added to key "
14486 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
14491 #: ../src/guestfs-actions.pod:4051 ../src/guestfs-actions.pod:4074
14492 #: ../src/guestfs-actions.pod:4217 ../src/guestfs-actions.pod:5320
14493 #: ../src/guestfs-actions.pod:6102 ../src/guestfs-actions.pod:6528
14494 #: ../src/guestfs-actions.pod:6558 ../src/guestfs-actions.pod:6591
14495 #: ../src/guestfs-actions.pod:7787 ../fish/guestfish-actions.pod:2737
14496 #: ../fish/guestfish-actions.pod:2750 ../fish/guestfish-actions.pod:2837
14497 #: ../fish/guestfish-actions.pod:3498 ../fish/guestfish-actions.pod:4018
14498 #: ../fish/guestfish-actions.pod:4343 ../fish/guestfish-actions.pod:4366
14499 #: ../fish/guestfish-actions.pod:4388 ../fish/guestfish-actions.pod:5126
14501 "B<This command is dangerous. Without careful use you can easily destroy all "
14507 #: ../src/guestfs-actions.pod:4060
14508 msgid "guestfs_luks_format_cipher"
14513 #: ../src/guestfs-actions.pod:4062
14517 " guestfs_luks_format_cipher (guestfs_h *g,\n"
14518 " const char *device,\n"
14519 " const char *key,\n"
14521 " const char *cipher);\n"
14527 #: ../src/guestfs-actions.pod:4069
14529 "This command is the same as C<guestfs_luks_format> but it also allows you to "
14530 "set the C<cipher> used."
14535 #: ../src/guestfs-actions.pod:4083
14536 msgid "guestfs_luks_kill_slot"
14541 #: ../src/guestfs-actions.pod:4085
14545 " guestfs_luks_kill_slot (guestfs_h *g,\n"
14546 " const char *device,\n"
14547 " const char *key,\n"
14554 #: ../src/guestfs-actions.pod:4091 ../fish/guestfish-actions.pod:2757
14556 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
14557 "device C<device>. C<key> must be one of the I<other> keys."
14562 #: ../src/guestfs-actions.pod:4103
14563 msgid "guestfs_luks_open"
14568 #: ../src/guestfs-actions.pod:4105
14572 " guestfs_luks_open (guestfs_h *g,\n"
14573 " const char *device,\n"
14574 " const char *key,\n"
14575 " const char *mapname);\n"
14581 #: ../src/guestfs-actions.pod:4111 ../fish/guestfish-actions.pod:2768
14583 "This command opens a block device which has been encrypted according to the "
14584 "Linux Unified Key Setup (LUKS) standard."
14589 #: ../src/guestfs-actions.pod:4114 ../fish/guestfish-actions.pod:2771
14590 msgid "C<device> is the encrypted block device or partition."
14595 #: ../src/guestfs-actions.pod:4116 ../fish/guestfish-actions.pod:2773
14597 "The caller must supply one of the keys associated with the LUKS block "
14598 "device, in the C<key> parameter."
14603 #: ../src/guestfs-actions.pod:4119 ../fish/guestfish-actions.pod:2776
14605 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
14606 "writes to this block device are decrypted from and encrypted to the "
14607 "underlying C<device> respectively."
14612 #: ../src/guestfs-actions.pod:4123
14614 "If this block device contains LVM volume groups, then calling "
14615 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
14620 #: ../src/guestfs-actions.pod:4127
14621 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
14626 #: ../src/guestfs-actions.pod:4138
14627 msgid "guestfs_luks_open_ro"
14632 #: ../src/guestfs-actions.pod:4140
14636 " guestfs_luks_open_ro (guestfs_h *g,\n"
14637 " const char *device,\n"
14638 " const char *key,\n"
14639 " const char *mapname);\n"
14645 #: ../src/guestfs-actions.pod:4146
14647 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
14653 #: ../src/guestfs-actions.pod:4157
14654 msgid "guestfs_lvcreate"
14659 #: ../src/guestfs-actions.pod:4159
14663 " guestfs_lvcreate (guestfs_h *g,\n"
14664 " const char *logvol,\n"
14665 " const char *volgroup,\n"
14672 #: ../src/guestfs-actions.pod:4165 ../fish/guestfish-actions.pod:2804
14674 "This creates an LVM logical volume called C<logvol> on the volume group "
14675 "C<volgroup>, with C<size> megabytes."
14680 #: ../src/guestfs-actions.pod:4172
14681 msgid "guestfs_lvm_canonical_lv_name"
14686 #: ../src/guestfs-actions.pod:4174
14690 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
14691 " const char *lvname);\n"
14697 #: ../src/guestfs-actions.pod:4178 ../fish/guestfish-actions.pod:2811
14699 "This converts alternative naming schemes for LVs that you might find to the "
14700 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
14706 #: ../src/guestfs-actions.pod:4182 ../fish/guestfish-actions.pod:2815
14708 "This command returns an error if the C<lvname> parameter does not refer to a "
14714 #: ../src/guestfs-actions.pod:4185
14715 msgid "See also C<guestfs_is_lv>."
14720 #: ../src/guestfs-actions.pod:4190
14721 msgid "(Added in 1.5.24)"
14726 #: ../src/guestfs-actions.pod:4192
14727 msgid "guestfs_lvm_clear_filter"
14732 #: ../src/guestfs-actions.pod:4194
14736 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
14742 #: ../src/guestfs-actions.pod:4197
14744 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
14745 "see every block device."
14750 #: ../src/guestfs-actions.pod:4200 ../src/guestfs-actions.pod:4242
14751 #: ../fish/guestfish-actions.pod:2827 ../fish/guestfish-actions.pod:2858
14753 "This command also clears the LVM cache and performs a volume group scan."
14758 #: ../src/guestfs-actions.pod:4207
14759 msgid "guestfs_lvm_remove_all"
14764 #: ../src/guestfs-actions.pod:4209
14768 " guestfs_lvm_remove_all (guestfs_h *g);\n"
14774 #: ../src/guestfs-actions.pod:4212 ../fish/guestfish-actions.pod:2834
14776 "This command removes all LVM logical volumes, volume groups and physical "
14782 #: ../src/guestfs-actions.pod:4222
14783 msgid "guestfs_lvm_set_filter"
14788 #: ../src/guestfs-actions.pod:4224
14792 " guestfs_lvm_set_filter (guestfs_h *g,\n"
14793 " char *const *devices);\n"
14799 #: ../src/guestfs-actions.pod:4228 ../fish/guestfish-actions.pod:2844
14801 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
14802 "block devices in the list C<devices>, and will ignore all other attached "
14808 #: ../src/guestfs-actions.pod:4232 ../fish/guestfish-actions.pod:2848
14810 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
14811 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
14812 "there are two types of duplication possible: either cloned PVs/VGs which "
14813 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
14814 "same name. In normal operation you cannot create this situation, but you "
14815 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
14816 "inside the LVM metadata."
14821 #: ../src/guestfs-actions.pod:4245 ../fish/guestfish-actions.pod:2861
14822 msgid "You can filter whole block devices or individual partitions."
14827 #: ../src/guestfs-actions.pod:4247 ../fish/guestfish-actions.pod:2863
14829 "You cannot use this if any VG is currently in use (eg. contains a mounted "
14830 "filesystem), even if you are not filtering out that VG."
14835 #: ../src/guestfs-actions.pod:4255
14836 msgid "guestfs_lvremove"
14841 #: ../src/guestfs-actions.pod:4257
14845 " guestfs_lvremove (guestfs_h *g,\n"
14846 " const char *device);\n"
14852 #: ../src/guestfs-actions.pod:4261 ../fish/guestfish-actions.pod:2871
14854 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
14855 "LV, such as C</dev/VG/LV>."
14860 #: ../src/guestfs-actions.pod:4264 ../fish/guestfish-actions.pod:2874
14862 "You can also remove all LVs in a volume group by specifying the VG name, C</"
14868 #: ../src/guestfs-actions.pod:4269 ../src/guestfs-actions.pod:5666
14869 #: ../src/guestfs-actions.pod:7498
14870 msgid "(Added in 1.0.13)"
14875 #: ../src/guestfs-actions.pod:4271
14876 msgid "guestfs_lvrename"
14881 #: ../src/guestfs-actions.pod:4273
14885 " guestfs_lvrename (guestfs_h *g,\n"
14886 " const char *logvol,\n"
14887 " const char *newlogvol);\n"
14893 #: ../src/guestfs-actions.pod:4278 ../fish/guestfish-actions.pod:2881
14894 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
14899 #: ../src/guestfs-actions.pod:4282 ../src/guestfs-actions.pod:7511
14900 msgid "(Added in 1.0.83)"
14905 #: ../src/guestfs-actions.pod:4284
14906 msgid "guestfs_lvresize"
14911 #: ../src/guestfs-actions.pod:4286
14915 " guestfs_lvresize (guestfs_h *g,\n"
14916 " const char *device,\n"
14923 #: ../src/guestfs-actions.pod:4291 ../fish/guestfish-actions.pod:2887
14925 "This resizes (expands or shrinks) an existing LVM logical volume to "
14926 "C<mbytes>. When reducing, data in the reduced part is lost."
14931 #: ../src/guestfs-actions.pod:4299
14932 msgid "guestfs_lvresize_free"
14937 #: ../src/guestfs-actions.pod:4301
14941 " guestfs_lvresize_free (guestfs_h *g,\n"
14942 " const char *lv,\n"
14949 #: ../src/guestfs-actions.pod:4306 ../fish/guestfish-actions.pod:2895
14951 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
14952 "remaining free space in the volume group. Commonly you would call this with "
14953 "pc = 100 which expands the logical volume as much as possible, using all "
14954 "remaining free space in the volume group."
14959 #: ../src/guestfs-actions.pod:4314
14960 msgid "(Added in 1.3.3)"
14965 #: ../src/guestfs-actions.pod:4316
14966 msgid "guestfs_lvs"
14971 #: ../src/guestfs-actions.pod:4318
14975 " guestfs_lvs (guestfs_h *g);\n"
14981 #: ../src/guestfs-actions.pod:4321 ../fish/guestfish-actions.pod:2905
14983 "List all the logical volumes detected. This is the equivalent of the L<lvs"
14989 #: ../src/guestfs-actions.pod:4324 ../fish/guestfish-actions.pod:2908
14991 "This returns a list of the logical volume device names (eg. C</dev/"
14992 "VolGroup00/LogVol00>)."
14997 #: ../src/guestfs-actions.pod:4327
14998 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
15003 #: ../src/guestfs-actions.pod:4335
15004 msgid "guestfs_lvs_full"
15009 #: ../src/guestfs-actions.pod:4337
15012 " struct guestfs_lvm_lv_list *\n"
15013 " guestfs_lvs_full (guestfs_h *g);\n"
15019 #: ../src/guestfs-actions.pod:4340 ../fish/guestfish-actions.pod:2917
15021 "List all the logical volumes detected. This is the equivalent of the L<lvs"
15022 "(8)> command. The \"full\" version includes all fields."
15027 #: ../src/guestfs-actions.pod:4343
15029 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
15030 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after use>."
15035 #: ../src/guestfs-actions.pod:4349
15036 msgid "guestfs_lvuuid"
15041 #: ../src/guestfs-actions.pod:4351
15045 " guestfs_lvuuid (guestfs_h *g,\n"
15046 " const char *device);\n"
15052 #: ../src/guestfs-actions.pod:4355 ../fish/guestfish-actions.pod:2924
15053 msgid "This command returns the UUID of the LVM LV C<device>."
15058 #: ../src/guestfs-actions.pod:4362
15059 msgid "guestfs_lxattrlist"
15064 #: ../src/guestfs-actions.pod:4364
15067 " struct guestfs_xattr_list *\n"
15068 " guestfs_lxattrlist (guestfs_h *g,\n"
15069 " const char *path,\n"
15070 " char *const *names);\n"
15076 #: ../src/guestfs-actions.pod:4369 ../fish/guestfish-actions.pod:2930
15078 "This call allows you to get the extended attributes of multiple files, where "
15079 "all files are in the directory C<path>. C<names> is the list of files from "
15085 #: ../src/guestfs-actions.pod:4373 ../fish/guestfish-actions.pod:2934
15087 "On return you get a flat list of xattr structs which must be interpreted "
15088 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
15089 "C<attrval> in this struct is zero-length to indicate there was an error "
15090 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
15091 "number (the number of following attributes for this file, which could be C<"
15092 "\"0\">). Then after the first xattr struct are the zero or more attributes "
15093 "for the first named file. This repeats for the second and subsequent files."
15098 #: ../src/guestfs-actions.pod:4383
15100 "This call is intended for programs that want to efficiently list a directory "
15101 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
15102 "a similarly efficient call for getting standard stats. Very long directory "
15103 "listings might cause the protocol message size to be exceeded, causing this "
15104 "call to fail. The caller must split up such requests into smaller groups of "
15110 #: ../src/guestfs-actions.pod:4397
15111 msgid "guestfs_mkdir"
15116 #: ../src/guestfs-actions.pod:4399
15120 " guestfs_mkdir (guestfs_h *g,\n"
15121 " const char *path);\n"
15127 #: ../src/guestfs-actions.pod:4403 ../fish/guestfish-actions.pod:2956
15128 msgid "Create a directory named C<path>."
15133 #: ../src/guestfs-actions.pod:4409
15134 msgid "guestfs_mkdir_mode"
15139 #: ../src/guestfs-actions.pod:4411
15143 " guestfs_mkdir_mode (guestfs_h *g,\n"
15144 " const char *path,\n"
15151 #: ../src/guestfs-actions.pod:4416 ../fish/guestfish-actions.pod:2962
15153 "This command creates a directory, setting the initial permissions of the "
15154 "directory to C<mode>."
15159 #: ../src/guestfs-actions.pod:4419 ../fish/guestfish-actions.pod:2965
15161 "For common Linux filesystems, the actual mode which is set will be C<mode & "
15162 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
15168 #: ../src/guestfs-actions.pod:4423
15169 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
15174 #: ../src/guestfs-actions.pod:4429
15175 msgid "guestfs_mkdir_p"
15180 #: ../src/guestfs-actions.pod:4431
15184 " guestfs_mkdir_p (guestfs_h *g,\n"
15185 " const char *path);\n"
15191 #: ../src/guestfs-actions.pod:4435 ../fish/guestfish-actions.pod:2975
15193 "Create a directory named C<path>, creating any parent directories as "
15194 "necessary. This is like the C<mkdir -p> shell command."
15199 #: ../src/guestfs-actions.pod:4442
15200 msgid "guestfs_mkdtemp"
15205 #: ../src/guestfs-actions.pod:4444
15209 " guestfs_mkdtemp (guestfs_h *g,\n"
15210 " const char *template);\n"
15216 #: ../src/guestfs-actions.pod:4448 ../fish/guestfish-actions.pod:2982
15218 "This command creates a temporary directory. The C<template> parameter "
15219 "should be a full pathname for the temporary directory name with the final "
15220 "six characters being \"XXXXXX\"."
15225 #: ../src/guestfs-actions.pod:4453 ../fish/guestfish-actions.pod:2987
15227 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
15228 "being suitable for Windows filesystems."
15233 #: ../src/guestfs-actions.pod:4456 ../fish/guestfish-actions.pod:2990
15234 msgid "The name of the temporary directory that was created is returned."
15239 #: ../src/guestfs-actions.pod:4459 ../fish/guestfish-actions.pod:2993
15240 msgid "The temporary directory is created with mode 0700 and is owned by root."
15245 #: ../src/guestfs-actions.pod:4462 ../fish/guestfish-actions.pod:2996
15247 "The caller is responsible for deleting the temporary directory and its "
15248 "contents after use."
15253 #: ../src/guestfs-actions.pod:4465 ../fish/guestfish-actions.pod:2999
15254 msgid "See also: L<mkdtemp(3)>"
15259 #: ../src/guestfs-actions.pod:4472
15260 msgid "guestfs_mke2fs_J"
15265 #: ../src/guestfs-actions.pod:4474
15269 " guestfs_mke2fs_J (guestfs_h *g,\n"
15270 " const char *fstype,\n"
15271 " int blocksize,\n"
15272 " const char *device,\n"
15273 " const char *journal);\n"
15279 #: ../src/guestfs-actions.pod:4481 ../fish/guestfish-actions.pod:3005
15281 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
15282 "C<journal>. It is equivalent to the command:"
15287 #: ../src/guestfs-actions.pod:4485 ../fish/guestfish-actions.pod:3009
15290 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
15296 #: ../src/guestfs-actions.pod:4487
15297 msgid "See also C<guestfs_mke2journal>."
15302 #: ../src/guestfs-actions.pod:4491 ../src/guestfs-actions.pod:4509
15303 #: ../src/guestfs-actions.pod:4527 ../src/guestfs-actions.pod:4543
15304 #: ../src/guestfs-actions.pod:4557 ../src/guestfs-actions.pod:4571
15305 #: ../src/guestfs-actions.pod:4630 ../src/guestfs-actions.pod:4907
15306 msgid "(Added in 1.0.68)"
15311 #: ../src/guestfs-actions.pod:4493
15312 msgid "guestfs_mke2fs_JL"
15317 #: ../src/guestfs-actions.pod:4495
15321 " guestfs_mke2fs_JL (guestfs_h *g,\n"
15322 " const char *fstype,\n"
15323 " int blocksize,\n"
15324 " const char *device,\n"
15325 " const char *label);\n"
15331 #: ../src/guestfs-actions.pod:4502 ../fish/guestfish-actions.pod:3017
15333 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
15334 "the journal labeled C<label>."
15339 #: ../src/guestfs-actions.pod:4505
15340 msgid "See also C<guestfs_mke2journal_L>."
15345 #: ../src/guestfs-actions.pod:4511
15346 msgid "guestfs_mke2fs_JU"
15351 #: ../src/guestfs-actions.pod:4513
15355 " guestfs_mke2fs_JU (guestfs_h *g,\n"
15356 " const char *fstype,\n"
15357 " int blocksize,\n"
15358 " const char *device,\n"
15359 " const char *uuid);\n"
15365 #: ../src/guestfs-actions.pod:4520 ../fish/guestfish-actions.pod:3026
15367 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
15368 "the journal with UUID C<uuid>."
15373 #: ../src/guestfs-actions.pod:4523
15374 msgid "See also C<guestfs_mke2journal_U>."
15379 #: ../src/guestfs-actions.pod:4529
15380 msgid "guestfs_mke2journal"
15385 #: ../src/guestfs-actions.pod:4531
15389 " guestfs_mke2journal (guestfs_h *g,\n"
15390 " int blocksize,\n"
15391 " const char *device);\n"
15397 #: ../src/guestfs-actions.pod:4536 ../fish/guestfish-actions.pod:3035
15399 "This creates an ext2 external journal on C<device>. It is equivalent to the "
15405 #: ../src/guestfs-actions.pod:4539 ../fish/guestfish-actions.pod:3038
15408 " mke2fs -O journal_dev -b blocksize device\n"
15414 #: ../src/guestfs-actions.pod:4545
15415 msgid "guestfs_mke2journal_L"
15420 #: ../src/guestfs-actions.pod:4547
15424 " guestfs_mke2journal_L (guestfs_h *g,\n"
15425 " int blocksize,\n"
15426 " const char *label,\n"
15427 " const char *device);\n"
15433 #: ../src/guestfs-actions.pod:4553 ../fish/guestfish-actions.pod:3044
15434 msgid "This creates an ext2 external journal on C<device> with label C<label>."
15439 #: ../src/guestfs-actions.pod:4559
15440 msgid "guestfs_mke2journal_U"
15445 #: ../src/guestfs-actions.pod:4561
15449 " guestfs_mke2journal_U (guestfs_h *g,\n"
15450 " int blocksize,\n"
15451 " const char *uuid,\n"
15452 " const char *device);\n"
15458 #: ../src/guestfs-actions.pod:4567 ../fish/guestfish-actions.pod:3050
15459 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
15464 #: ../src/guestfs-actions.pod:4573
15465 msgid "guestfs_mkfifo"
15470 #: ../src/guestfs-actions.pod:4575
15474 " guestfs_mkfifo (guestfs_h *g,\n"
15476 " const char *path);\n"
15482 #: ../src/guestfs-actions.pod:4580
15484 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
15485 "is just a convenient wrapper around C<guestfs_mknod>."
15490 #: ../src/guestfs-actions.pod:4590
15491 msgid "guestfs_mkfs"
15496 #: ../src/guestfs-actions.pod:4592
15500 " guestfs_mkfs (guestfs_h *g,\n"
15501 " const char *fstype,\n"
15502 " const char *device);\n"
15508 #: ../src/guestfs-actions.pod:4597 ../fish/guestfish-actions.pod:3066
15510 "This creates a filesystem on C<device> (usually a partition or LVM logical "
15511 "volume). The filesystem type is C<fstype>, for example C<ext3>."
15516 #: ../src/guestfs-actions.pod:4605
15517 msgid "guestfs_mkfs_b"
15522 #: ../src/guestfs-actions.pod:4607
15526 " guestfs_mkfs_b (guestfs_h *g,\n"
15527 " const char *fstype,\n"
15528 " int blocksize,\n"
15529 " const char *device);\n"
15535 #: ../src/guestfs-actions.pod:4613
15537 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
15538 "block size of the resulting filesystem. Supported block sizes depend on the "
15539 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
15544 #: ../src/guestfs-actions.pod:4618 ../src/guestfs-actions.pod:4663
15545 #: ../fish/guestfish-actions.pod:3079 ../fish/guestfish-actions.pod:3106
15547 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
15553 #: ../src/guestfs-actions.pod:4623 ../fish/guestfish-actions.pod:3082
15555 "This function is deprecated. In new code, use the C<mkfs_opts> call instead."
15560 #: ../src/guestfs-actions.pod:4632
15561 msgid "guestfs_mkfs_opts"
15566 #: ../src/guestfs-actions.pod:4634
15570 " guestfs_mkfs_opts (guestfs_h *g,\n"
15571 " const char *fstype,\n"
15572 " const char *device,\n"
15578 #: ../src/guestfs-actions.pod:4645
15581 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
15582 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
15583 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
15584 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
15590 #: ../src/guestfs-actions.pod:4650 ../fish/guestfish-actions.pod:3093
15592 "This function creates a filesystem on C<device>. The filesystem type is "
15593 "C<fstype>, for example C<ext3>."
15598 #: ../src/guestfs-actions.pod:4657 ../fish/guestfish-actions.pod:3100
15599 msgid "C<blocksize>"
15604 #: ../src/guestfs-actions.pod:4659 ../fish/guestfish-actions.pod:3102
15606 "The filesystem block size. Supported block sizes depend on the filesystem "
15607 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
15612 #: ../src/guestfs-actions.pod:4666 ../fish/guestfish-actions.pod:3109
15613 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
15617 #: ../src/guestfs-actions.pod:4668 ../fish/guestfish-actions.pod:3111
15618 msgid "C<features>"
15622 #: ../src/guestfs-actions.pod:4670 ../fish/guestfish-actions.pod:3113
15623 msgid "This passes the I<-O> parameter to the external mkfs program."
15627 #: ../src/guestfs-actions.pod:4672 ../fish/guestfish-actions.pod:3115
15629 "For certain filesystem types, this allows extra filesystem features to be "
15630 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
15634 #: ../src/guestfs-actions.pod:4676 ../fish/guestfish-actions.pod:3119
15636 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
15641 #: ../src/guestfs-actions.pod:4679 ../fish/guestfish-actions.pod:3122
15646 #: ../src/guestfs-actions.pod:4681 ../fish/guestfish-actions.pod:3124
15648 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
15649 "sets the inode size (only for ext2/3/4 filesystems at present)."
15653 #: ../src/guestfs-actions.pod:4684 ../fish/guestfish-actions.pod:3127
15654 msgid "C<sectorsize>"
15658 #: ../src/guestfs-actions.pod:4686 ../fish/guestfish-actions.pod:3129
15660 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
15661 "sets sector size for ufs filesystem."
15665 #: ../src/guestfs-actions.pod:4693
15666 msgid "(Added in 1.7.19)"
15671 #: ../src/guestfs-actions.pod:4695
15672 msgid "guestfs_mkfs_opts_va"
15677 #: ../src/guestfs-actions.pod:4697
15681 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
15682 " const char *fstype,\n"
15683 " const char *device,\n"
15684 " va_list args);\n"
15690 #: ../src/guestfs-actions.pod:4703
15691 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
15696 #: ../src/guestfs-actions.pod:4707
15697 msgid "guestfs_mkfs_opts_argv"
15702 #: ../src/guestfs-actions.pod:4709
15706 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
15707 " const char *fstype,\n"
15708 " const char *device,\n"
15709 " const struct guestfs_mkfs_opts_argv *optargs);\n"
15715 #: ../src/guestfs-actions.pod:4715
15716 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
15721 #: ../src/guestfs-actions.pod:4719
15722 msgid "guestfs_mkmountpoint"
15727 #: ../src/guestfs-actions.pod:4721
15731 " guestfs_mkmountpoint (guestfs_h *g,\n"
15732 " const char *exemptpath);\n"
15738 #: ../src/guestfs-actions.pod:4725
15740 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
15741 "that can be used to create extra mountpoints before mounting the first "
15747 #: ../src/guestfs-actions.pod:4729 ../fish/guestfish-actions.pod:3144
15749 "These calls are I<only> necessary in some very limited circumstances, mainly "
15750 "the case where you want to mount a mix of unrelated and/or read-only "
15751 "filesystems together."
15756 #: ../src/guestfs-actions.pod:4733 ../fish/guestfish-actions.pod:3148
15758 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
15759 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
15760 "inside that. You can unpack this as follows in guestfish:"
15765 #: ../src/guestfs-actions.pod:4738 ../fish/guestfish-actions.pod:3153
15768 " add-ro Fedora-11-i686-Live.iso\n"
15770 " mkmountpoint /cd\n"
15771 " mkmountpoint /sqsh\n"
15772 " mkmountpoint /ext3fs\n"
15773 " mount /dev/sda /cd\n"
15774 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
15775 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
15781 #: ../src/guestfs-actions.pod:4747 ../fish/guestfish-actions.pod:3162
15782 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
15787 #: ../src/guestfs-actions.pod:4749
15789 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
15790 "may get unexpected errors if you try to mix these calls. It is safest to "
15791 "manually unmount filesystems and remove mountpoints after use."
15796 #: ../src/guestfs-actions.pod:4753
15798 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
15799 "first, so for this to work for manual mountpoints, you must ensure that the "
15800 "innermost mountpoints have the longest pathnames, as in the example code "
15806 #: ../src/guestfs-actions.pod:4758 ../fish/guestfish-actions.pod:3173
15808 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
15812 #: ../src/guestfs-actions.pod:4760
15814 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
15815 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
15816 "can also trigger these issues."
15821 #: ../src/guestfs-actions.pod:4766 ../src/guestfs-actions.pod:5082
15822 #: ../src/guestfs-actions.pod:6086
15823 msgid "(Added in 1.0.62)"
15828 #: ../src/guestfs-actions.pod:4768
15829 msgid "guestfs_mknod"
15834 #: ../src/guestfs-actions.pod:4770
15838 " guestfs_mknod (guestfs_h *g,\n"
15842 " const char *path);\n"
15848 #: ../src/guestfs-actions.pod:4777 ../fish/guestfish-actions.pod:3183
15850 "This call creates block or character special devices, or named pipes (FIFOs)."
15855 #: ../src/guestfs-actions.pod:4780 ../fish/guestfish-actions.pod:3186
15857 "The C<mode> parameter should be the mode, using the standard constants. "
15858 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
15859 "used when creating block and character special devices."
15864 #: ../src/guestfs-actions.pod:4785
15866 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
15867 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
15868 "regular file). These constants are available in the standard Linux header "
15869 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
15870 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
15871 "the appropriate constant for you."
15876 #: ../src/guestfs-actions.pod:4799
15877 msgid "guestfs_mknod_b"
15882 #: ../src/guestfs-actions.pod:4801
15886 " guestfs_mknod_b (guestfs_h *g,\n"
15890 " const char *path);\n"
15896 #: ../src/guestfs-actions.pod:4808
15898 "This call creates a block device node called C<path> with mode C<mode> and "
15899 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
15900 "wrapper around C<guestfs_mknod>."
15905 #: ../src/guestfs-actions.pod:4818
15906 msgid "guestfs_mknod_c"
15911 #: ../src/guestfs-actions.pod:4820
15915 " guestfs_mknod_c (guestfs_h *g,\n"
15919 " const char *path);\n"
15925 #: ../src/guestfs-actions.pod:4827
15927 "This call creates a char device node called C<path> with mode C<mode> and "
15928 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
15929 "wrapper around C<guestfs_mknod>."
15934 #: ../src/guestfs-actions.pod:4837
15935 msgid "guestfs_mkswap"
15940 #: ../src/guestfs-actions.pod:4839
15944 " guestfs_mkswap (guestfs_h *g,\n"
15945 " const char *device);\n"
15951 #: ../src/guestfs-actions.pod:4843 ../fish/guestfish-actions.pod:3225
15952 msgid "Create a swap partition on C<device>."
15957 #: ../src/guestfs-actions.pod:4849
15958 msgid "guestfs_mkswap_L"
15963 #: ../src/guestfs-actions.pod:4851
15967 " guestfs_mkswap_L (guestfs_h *g,\n"
15968 " const char *label,\n"
15969 " const char *device);\n"
15975 #: ../src/guestfs-actions.pod:4856 ../fish/guestfish-actions.pod:3231
15976 msgid "Create a swap partition on C<device> with label C<label>."
15981 #: ../src/guestfs-actions.pod:4858 ../fish/guestfish-actions.pod:3233
15983 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
15984 "sda>), just to a partition. This appears to be a limitation of the kernel "
15990 #: ../src/guestfs-actions.pod:4866
15991 msgid "guestfs_mkswap_U"
15996 #: ../src/guestfs-actions.pod:4868
16000 " guestfs_mkswap_U (guestfs_h *g,\n"
16001 " const char *uuid,\n"
16002 " const char *device);\n"
16008 #: ../src/guestfs-actions.pod:4873 ../fish/guestfish-actions.pod:3241
16009 msgid "Create a swap partition on C<device> with UUID C<uuid>."
16014 #: ../src/guestfs-actions.pod:4879
16015 msgid "guestfs_mkswap_file"
16020 #: ../src/guestfs-actions.pod:4881
16024 " guestfs_mkswap_file (guestfs_h *g,\n"
16025 " const char *path);\n"
16031 #: ../src/guestfs-actions.pod:4885 ../fish/guestfish-actions.pod:3247
16032 msgid "Create a swap file."
16037 #: ../src/guestfs-actions.pod:4887
16039 "This command just writes a swap file signature to an existing file. To "
16040 "create the file itself, use something like C<guestfs_fallocate>."
16045 #: ../src/guestfs-actions.pod:4894
16046 msgid "guestfs_modprobe"
16051 #: ../src/guestfs-actions.pod:4896
16055 " guestfs_modprobe (guestfs_h *g,\n"
16056 " const char *modulename);\n"
16062 #: ../src/guestfs-actions.pod:4900 ../fish/guestfish-actions.pod:3256
16063 msgid "This loads a kernel module in the appliance."
16068 #: ../src/guestfs-actions.pod:4902 ../fish/guestfish-actions.pod:3258
16070 "The kernel module must have been whitelisted when libguestfs was built (see "
16071 "C<appliance/kmod.whitelist.in> in the source)."
16076 #: ../src/guestfs-actions.pod:4909
16077 msgid "guestfs_mount"
16082 #: ../src/guestfs-actions.pod:4911
16086 " guestfs_mount (guestfs_h *g,\n"
16087 " const char *device,\n"
16088 " const char *mountpoint);\n"
16094 #: ../src/guestfs-actions.pod:4916 ../fish/guestfish-actions.pod:3265
16096 "Mount a guest disk at a position in the filesystem. Block devices are named "
16097 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
16098 "those block devices contain partitions, they will have the usual names (eg. "
16099 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
16104 #: ../src/guestfs-actions.pod:4922 ../fish/guestfish-actions.pod:3271
16106 "The rules are the same as for L<mount(2)>: A filesystem must first be "
16107 "mounted on C</> before others can be mounted. Other filesystems can only be "
16108 "mounted on directories which already exist."
16113 #: ../src/guestfs-actions.pod:4927 ../fish/guestfish-actions.pod:3276
16115 "The mounted filesystem is writable, if we have sufficient permissions on the "
16116 "underlying device."
16121 #: ../src/guestfs-actions.pod:4930
16123 "B<Important note:> When you use this call, the filesystem options C<sync> "
16124 "and C<noatime> are set implicitly. This was originally done because we "
16125 "thought it would improve reliability, but it turns out that I<-o sync> has a "
16126 "very large negative performance impact and negligible effect on "
16127 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
16128 "in any code that needs performance, and instead use C<guestfs_mount_options> "
16129 "(use an empty string for the first parameter if you don't want any options)."
16133 #: ../src/guestfs-actions.pod:4942 ../fish/guestfish-actions.pod:3289
16135 "This function is deprecated. In new code, use the C<mount_options> call "
16140 #: ../src/guestfs-actions.pod:4951
16141 msgid "guestfs_mount_9p"
16145 #: ../src/guestfs-actions.pod:4953
16149 " guestfs_mount_9p (guestfs_h *g,\n"
16150 " const char *mounttag,\n"
16151 " const char *mountpoint,\n"
16157 #: ../src/guestfs-actions.pod:4964
16160 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
16165 #: ../src/guestfs-actions.pod:4966 ../fish/guestfish-actions.pod:3300
16167 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
16172 #: ../src/guestfs-actions.pod:4969 ../fish/guestfish-actions.pod:3303
16174 "If required, C<trans=virtio> will be automatically added to the options. "
16175 "Any other options required can be passed in the optional C<options> "
16180 #: ../src/guestfs-actions.pod:4977
16181 msgid "guestfs_mount_9p_va"
16185 #: ../src/guestfs-actions.pod:4979
16189 " guestfs_mount_9p_va (guestfs_h *g,\n"
16190 " const char *mounttag,\n"
16191 " const char *mountpoint,\n"
16192 " va_list args);\n"
16197 #: ../src/guestfs-actions.pod:4985
16198 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
16202 #: ../src/guestfs-actions.pod:4989
16203 msgid "guestfs_mount_9p_argv"
16207 #: ../src/guestfs-actions.pod:4991
16211 " guestfs_mount_9p_argv (guestfs_h *g,\n"
16212 " const char *mounttag,\n"
16213 " const char *mountpoint,\n"
16214 " const struct guestfs_mount_9p_argv *optargs);\n"
16219 #: ../src/guestfs-actions.pod:4997
16220 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
16225 #: ../src/guestfs-actions.pod:5001
16226 msgid "guestfs_mount_loop"
16231 #: ../src/guestfs-actions.pod:5003
16235 " guestfs_mount_loop (guestfs_h *g,\n"
16236 " const char *file,\n"
16237 " const char *mountpoint);\n"
16243 #: ../src/guestfs-actions.pod:5008 ../fish/guestfish-actions.pod:3313
16245 "This command lets you mount C<file> (a filesystem image in a file) on a "
16246 "mount point. It is entirely equivalent to the command C<mount -o loop file "
16252 #: ../src/guestfs-actions.pod:5016
16253 msgid "guestfs_mount_options"
16258 #: ../src/guestfs-actions.pod:5018
16262 " guestfs_mount_options (guestfs_h *g,\n"
16263 " const char *options,\n"
16264 " const char *device,\n"
16265 " const char *mountpoint);\n"
16271 #: ../src/guestfs-actions.pod:5024
16273 "This is the same as the C<guestfs_mount> command, but it allows you to set "
16274 "the mount options as for the L<mount(8)> I<-o> flag."
16279 #: ../src/guestfs-actions.pod:5028 ../fish/guestfish-actions.pod:3325
16281 "If the C<options> parameter is an empty string, then no options are passed "
16282 "(all options default to whatever the filesystem uses)."
16287 #: ../src/guestfs-actions.pod:5034 ../src/guestfs-actions.pod:5048
16288 #: ../src/guestfs-actions.pod:5065
16289 msgid "(Added in 1.0.10)"
16294 #: ../src/guestfs-actions.pod:5036
16295 msgid "guestfs_mount_ro"
16300 #: ../src/guestfs-actions.pod:5038
16304 " guestfs_mount_ro (guestfs_h *g,\n"
16305 " const char *device,\n"
16306 " const char *mountpoint);\n"
16312 #: ../src/guestfs-actions.pod:5043
16314 "This is the same as the C<guestfs_mount> command, but it mounts the "
16315 "filesystem with the read-only (I<-o ro>) flag."
16320 #: ../src/guestfs-actions.pod:5050
16321 msgid "guestfs_mount_vfs"
16326 #: ../src/guestfs-actions.pod:5052
16330 " guestfs_mount_vfs (guestfs_h *g,\n"
16331 " const char *options,\n"
16332 " const char *vfstype,\n"
16333 " const char *device,\n"
16334 " const char *mountpoint);\n"
16340 #: ../src/guestfs-actions.pod:5059
16342 "This is the same as the C<guestfs_mount> command, but it allows you to set "
16343 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
16349 #: ../src/guestfs-actions.pod:5067
16350 msgid "guestfs_mountpoints"
16355 #: ../src/guestfs-actions.pod:5069
16359 " guestfs_mountpoints (guestfs_h *g);\n"
16365 #: ../src/guestfs-actions.pod:5072
16367 "This call is similar to C<guestfs_mounts>. That call returns a list of "
16368 "devices. This one returns a hash table (map) of device name to directory "
16369 "where the device is mounted."
16374 #: ../src/guestfs-actions.pod:5084
16375 msgid "guestfs_mounts"
16380 #: ../src/guestfs-actions.pod:5086
16384 " guestfs_mounts (guestfs_h *g);\n"
16390 #: ../src/guestfs-actions.pod:5089 ../fish/guestfish-actions.pod:3356
16392 "This returns the list of currently mounted filesystems. It returns the list "
16393 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
16398 #: ../src/guestfs-actions.pod:5092 ../fish/guestfish-actions.pod:3359
16399 msgid "Some internal mounts are not shown."
16404 #: ../src/guestfs-actions.pod:5094
16405 msgid "See also: C<guestfs_mountpoints>"
16410 #: ../src/guestfs-actions.pod:5102
16416 #: ../src/guestfs-actions.pod:5104
16420 " guestfs_mv (guestfs_h *g,\n"
16421 " const char *src,\n"
16422 " const char *dest);\n"
16428 #: ../src/guestfs-actions.pod:5109 ../fish/guestfish-actions.pod:3367
16430 "This moves a file from C<src> to C<dest> where C<dest> is either a "
16431 "destination filename or destination directory."
16436 #: ../src/guestfs-actions.pod:5116
16437 msgid "guestfs_ntfs_3g_probe"
16442 #: ../src/guestfs-actions.pod:5118
16446 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
16448 " const char *device);\n"
16454 #: ../src/guestfs-actions.pod:5123 ../fish/guestfish-actions.pod:3374
16456 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
16457 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
16458 "write, and some cannot be mounted at all)."
16463 #: ../src/guestfs-actions.pod:5127 ../fish/guestfish-actions.pod:3378
16465 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
16466 "can be mounted read-write. Set it to false if you want to test if the "
16467 "volume can be mounted read-only."
16472 #: ../src/guestfs-actions.pod:5131 ../fish/guestfish-actions.pod:3382
16474 "The return value is an integer which C<0> if the operation would succeed, or "
16475 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
16480 #: ../src/guestfs-actions.pod:5137
16481 msgid "(Added in 1.0.43)"
16486 #: ../src/guestfs-actions.pod:5139
16487 msgid "guestfs_ntfsresize"
16492 #: ../src/guestfs-actions.pod:5141
16496 " guestfs_ntfsresize (guestfs_h *g,\n"
16497 " const char *device);\n"
16502 #: ../src/guestfs-actions.pod:5145 ../src/guestfs-actions.pod:5184
16503 #: ../fish/guestfish-actions.pod:3390 ../fish/guestfish-actions.pod:3414
16505 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
16506 "size of the underlying device."
16510 #: ../src/guestfs-actions.pod:5148 ../fish/guestfish-actions.pod:3393
16512 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
16513 "consistency check (for safety). You have to boot into Windows to perform "
16514 "this check and clear this condition. Furthermore, ntfsresize refuses to "
16515 "resize filesystems which have been marked in this way. So in effect it is "
16516 "not possible to call ntfsresize multiple times on a single filesystem "
16517 "without booting into Windows between each resize."
16521 #: ../src/guestfs-actions.pod:5156 ../src/guestfs-actions.pod:5210
16522 #: ../fish/guestfish-actions.pod:3401 ../fish/guestfish-actions.pod:3440
16523 msgid "See also L<ntfsresize(8)>."
16527 #: ../src/guestfs-actions.pod:5160 ../src/guestfs-actions.pod:5250
16528 #: ../fish/guestfish-actions.pod:3403 ../fish/guestfish-actions.pod:3451
16530 "This function is deprecated. In new code, use the C<ntfsresize_opts> call "
16535 #: ../src/guestfs-actions.pod:5169
16536 msgid "guestfs_ntfsresize_opts"
16540 #: ../src/guestfs-actions.pod:5171
16544 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
16545 " const char *device,\n"
16551 #: ../src/guestfs-actions.pod:5181
16554 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
16555 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
16560 #: ../src/guestfs-actions.pod:5193 ../fish/guestfish-actions.pod:3423
16562 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
16563 "resized to fit the container (eg. partition)."
16567 #: ../src/guestfs-actions.pod:5196 ../fish/guestfish-actions.pod:3426
16572 #: ../src/guestfs-actions.pod:5198 ../fish/guestfish-actions.pod:3428
16574 "If this option is true, then force the resize of the filesystem even if the "
16575 "filesystem is marked as requiring a consistency check."
16579 #: ../src/guestfs-actions.pod:5201
16581 "After the resize operation, the filesystem is always marked as requiring a "
16582 "consistency check (for safety). You have to boot into Windows to perform "
16583 "this check and clear this condition. If you I<don't> set the C<force> "
16584 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
16585 "times on a single filesystem without booting into Windows between each "
16590 #: ../src/guestfs-actions.pod:5216
16591 msgid "guestfs_ntfsresize_opts_va"
16595 #: ../src/guestfs-actions.pod:5218
16599 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
16600 " const char *device,\n"
16601 " va_list args);\n"
16606 #: ../src/guestfs-actions.pod:5223
16607 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
16611 #: ../src/guestfs-actions.pod:5227
16612 msgid "guestfs_ntfsresize_opts_argv"
16616 #: ../src/guestfs-actions.pod:5229
16620 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
16621 " const char *device,\n"
16622 " const struct guestfs_ntfsresize_opts_argv *optargs);\n"
16627 #: ../src/guestfs-actions.pod:5234
16628 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
16633 #: ../src/guestfs-actions.pod:5238
16634 msgid "guestfs_ntfsresize_size"
16639 #: ../src/guestfs-actions.pod:5240
16643 " guestfs_ntfsresize_size (guestfs_h *g,\n"
16644 " const char *device,\n"
16645 " int64_t size);\n"
16651 #: ../src/guestfs-actions.pod:5245
16653 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
16654 "to specify the new size (in bytes) explicitly."
16659 #: ../src/guestfs-actions.pod:5257 ../src/guestfs-actions.pod:5693
16660 #: ../src/guestfs-actions.pod:5766 ../src/guestfs-actions.pod:6034
16661 #: ../src/guestfs-actions.pod:7655
16662 msgid "(Added in 1.3.14)"
16667 #: ../src/guestfs-actions.pod:5259
16668 msgid "guestfs_part_add"
16673 #: ../src/guestfs-actions.pod:5261
16677 " guestfs_part_add (guestfs_h *g,\n"
16678 " const char *device,\n"
16679 " const char *prlogex,\n"
16680 " int64_t startsect,\n"
16681 " int64_t endsect);\n"
16687 #: ../src/guestfs-actions.pod:5268
16689 "This command adds a partition to C<device>. If there is no partition table "
16690 "on the device, call C<guestfs_part_init> first."
16695 #: ../src/guestfs-actions.pod:5271 ../fish/guestfish-actions.pod:3465
16697 "The C<prlogex> parameter is the type of partition. Normally you should pass "
16698 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
16699 "C<logical>) and C<e> (or C<extended>) partition types."
16704 #: ../src/guestfs-actions.pod:5276 ../fish/guestfish-actions.pod:3470
16706 "C<startsect> and C<endsect> are the start and end of the partition in "
16707 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
16708 "from the end of the disk (C<-1> is the last sector)."
16713 #: ../src/guestfs-actions.pod:5280
16715 "Creating a partition which covers the whole disk is not so easy. Use "
16716 "C<guestfs_part_disk> to do that."
16721 #: ../src/guestfs-actions.pod:5285 ../src/guestfs-actions.pod:5323
16722 #: ../src/guestfs-actions.pod:5376 ../src/guestfs-actions.pod:5454
16723 #: ../src/guestfs-actions.pod:5492 ../src/guestfs-actions.pod:5511
16724 #: ../src/guestfs-actions.pod:5551
16725 msgid "(Added in 1.0.78)"
16730 #: ../src/guestfs-actions.pod:5287
16731 msgid "guestfs_part_del"
16736 #: ../src/guestfs-actions.pod:5289
16740 " guestfs_part_del (guestfs_h *g,\n"
16741 " const char *device,\n"
16748 #: ../src/guestfs-actions.pod:5294 ../fish/guestfish-actions.pod:3481
16749 msgid "This command deletes the partition numbered C<partnum> on C<device>."
16754 #: ../src/guestfs-actions.pod:5296 ../fish/guestfish-actions.pod:3483
16756 "Note that in the case of MBR partitioning, deleting an extended partition "
16757 "also deletes any logical partitions it contains."
16762 #: ../src/guestfs-actions.pod:5304
16763 msgid "guestfs_part_disk"
16768 #: ../src/guestfs-actions.pod:5306
16772 " guestfs_part_disk (guestfs_h *g,\n"
16773 " const char *device,\n"
16774 " const char *parttype);\n"
16780 #: ../src/guestfs-actions.pod:5311
16782 "This command is simply a combination of C<guestfs_part_init> followed by "
16783 "C<guestfs_part_add> to create a single primary partition covering the whole "
16789 #: ../src/guestfs-actions.pod:5315
16791 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
16792 "possible values are described in C<guestfs_part_init>."
16797 #: ../src/guestfs-actions.pod:5325
16798 msgid "guestfs_part_get_bootable"
16803 #: ../src/guestfs-actions.pod:5327
16807 " guestfs_part_get_bootable (guestfs_h *g,\n"
16808 " const char *device,\n"
16815 #: ../src/guestfs-actions.pod:5332 ../fish/guestfish-actions.pod:3505
16817 "This command returns true if the partition C<partnum> on C<device> has the "
16818 "bootable flag set."
16823 #: ../src/guestfs-actions.pod:5335
16824 msgid "See also C<guestfs_part_set_bootable>."
16829 #: ../src/guestfs-actions.pod:5341
16830 msgid "guestfs_part_get_mbr_id"
16835 #: ../src/guestfs-actions.pod:5343
16839 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
16840 " const char *device,\n"
16847 #: ../src/guestfs-actions.pod:5348 ../fish/guestfish-actions.pod:3514
16849 "Returns the MBR type byte (also known as the ID byte) from the numbered "
16850 "partition C<partnum>."
16855 #: ../src/guestfs-actions.pod:5351 ../src/guestfs-actions.pod:5527
16857 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
16858 "undefined results for other partition table types (see "
16859 "C<guestfs_part_get_parttype>)."
16864 #: ../src/guestfs-actions.pod:5359
16865 msgid "guestfs_part_get_parttype"
16870 #: ../src/guestfs-actions.pod:5361
16874 " guestfs_part_get_parttype (guestfs_h *g,\n"
16875 " const char *device);\n"
16881 #: ../src/guestfs-actions.pod:5365 ../fish/guestfish-actions.pod:3525
16883 "This command examines the partition table on C<device> and returns the "
16884 "partition table type (format) being used."
16889 #: ../src/guestfs-actions.pod:5368
16891 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
16892 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
16893 "possible, although unusual. See C<guestfs_part_init> for a full list."
16898 #: ../src/guestfs-actions.pod:5378
16899 msgid "guestfs_part_init"
16904 #: ../src/guestfs-actions.pod:5380
16908 " guestfs_part_init (guestfs_h *g,\n"
16909 " const char *device,\n"
16910 " const char *parttype);\n"
16916 #: ../src/guestfs-actions.pod:5385 ../fish/guestfish-actions.pod:3537
16918 "This creates an empty partition table on C<device> of one of the partition "
16919 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
16920 "(for large disks)."
16925 #: ../src/guestfs-actions.pod:5389
16927 "Initially there are no partitions. Following this, you should call "
16928 "C<guestfs_part_add> for each partition required."
16933 #: ../src/guestfs-actions.pod:5392 ../fish/guestfish-actions.pod:3544
16934 msgid "Possible values for C<parttype> are:"
16939 #: ../src/guestfs-actions.pod:5396 ../fish/guestfish-actions.pod:3548
16940 msgid "B<efi> | B<gpt>"
16945 #: ../src/guestfs-actions.pod:5398 ../fish/guestfish-actions.pod:3550
16946 msgid "Intel EFI / GPT partition table."
16951 #: ../src/guestfs-actions.pod:5400 ../fish/guestfish-actions.pod:3552
16953 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
16954 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
16955 "the C<mbr> format."
16960 #: ../src/guestfs-actions.pod:5404 ../fish/guestfish-actions.pod:3556
16961 msgid "B<mbr> | B<msdos>"
16966 #: ../src/guestfs-actions.pod:5406 ../fish/guestfish-actions.pod:3558
16968 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
16969 "Windows. This partition type will B<only> work for device sizes up to 2 "
16970 "TB. For large disks we recommend using C<gpt>."
16975 #: ../src/guestfs-actions.pod:5413 ../fish/guestfish-actions.pod:3565
16977 "Other partition table types that may work but are not supported include:"
16982 #: ../src/guestfs-actions.pod:5418 ../fish/guestfish-actions.pod:3570
16988 #: ../src/guestfs-actions.pod:5420 ../fish/guestfish-actions.pod:3572
16989 msgid "AIX disk labels."
16994 #: ../src/guestfs-actions.pod:5422 ../fish/guestfish-actions.pod:3574
16995 msgid "B<amiga> | B<rdb>"
17000 #: ../src/guestfs-actions.pod:5424 ../fish/guestfish-actions.pod:3576
17001 msgid "Amiga \"Rigid Disk Block\" format."
17006 #: ../src/guestfs-actions.pod:5426 ../fish/guestfish-actions.pod:3578
17012 #: ../src/guestfs-actions.pod:5428 ../fish/guestfish-actions.pod:3580
17013 msgid "BSD disk labels."
17018 #: ../src/guestfs-actions.pod:5430 ../fish/guestfish-actions.pod:3582
17024 #: ../src/guestfs-actions.pod:5432 ../fish/guestfish-actions.pod:3584
17025 msgid "DASD, used on IBM mainframes."
17030 #: ../src/guestfs-actions.pod:5434 ../fish/guestfish-actions.pod:3586
17036 #: ../src/guestfs-actions.pod:5436 ../fish/guestfish-actions.pod:3588
17037 msgid "MIPS/SGI volumes."
17042 #: ../src/guestfs-actions.pod:5438 ../fish/guestfish-actions.pod:3590
17048 #: ../src/guestfs-actions.pod:5440 ../fish/guestfish-actions.pod:3592
17049 msgid "Old Mac partition format. Modern Macs use C<gpt>."
17054 #: ../src/guestfs-actions.pod:5442 ../fish/guestfish-actions.pod:3594
17060 #: ../src/guestfs-actions.pod:5444 ../fish/guestfish-actions.pod:3596
17061 msgid "NEC PC-98 format, common in Japan apparently."
17066 #: ../src/guestfs-actions.pod:5446 ../fish/guestfish-actions.pod:3598
17072 #: ../src/guestfs-actions.pod:5448 ../fish/guestfish-actions.pod:3600
17073 msgid "Sun disk labels."
17078 #: ../src/guestfs-actions.pod:5456
17079 msgid "guestfs_part_list"
17084 #: ../src/guestfs-actions.pod:5458
17087 " struct guestfs_partition_list *\n"
17088 " guestfs_part_list (guestfs_h *g,\n"
17089 " const char *device);\n"
17095 #: ../src/guestfs-actions.pod:5462 ../fish/guestfish-actions.pod:3608
17097 "This command parses the partition table on C<device> and returns the list of "
17098 "partitions found."
17103 #: ../src/guestfs-actions.pod:5465 ../fish/guestfish-actions.pod:3611
17104 msgid "The fields in the returned structure are:"
17109 #: ../src/guestfs-actions.pod:5469 ../fish/guestfish-actions.pod:3615
17110 msgid "B<part_num>"
17115 #: ../src/guestfs-actions.pod:5471 ../fish/guestfish-actions.pod:3617
17116 msgid "Partition number, counting from 1."
17121 #: ../src/guestfs-actions.pod:5473 ../fish/guestfish-actions.pod:3619
17122 msgid "B<part_start>"
17127 #: ../src/guestfs-actions.pod:5475
17129 "Start of the partition I<in bytes>. To get sectors you have to divide by "
17130 "the device's sector size, see C<guestfs_blockdev_getss>."
17135 #: ../src/guestfs-actions.pod:5478 ../fish/guestfish-actions.pod:3624
17136 msgid "B<part_end>"
17141 #: ../src/guestfs-actions.pod:5480 ../fish/guestfish-actions.pod:3626
17142 msgid "End of the partition in bytes."
17147 #: ../src/guestfs-actions.pod:5482 ../fish/guestfish-actions.pod:3628
17148 msgid "B<part_size>"
17153 #: ../src/guestfs-actions.pod:5484 ../fish/guestfish-actions.pod:3630
17154 msgid "Size of the partition in bytes."
17159 #: ../src/guestfs-actions.pod:5488
17161 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
17162 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
17168 #: ../src/guestfs-actions.pod:5494
17169 msgid "guestfs_part_set_bootable"
17174 #: ../src/guestfs-actions.pod:5496
17178 " guestfs_part_set_bootable (guestfs_h *g,\n"
17179 " const char *device,\n"
17181 " int bootable);\n"
17187 #: ../src/guestfs-actions.pod:5502 ../fish/guestfish-actions.pod:3638
17189 "This sets the bootable flag on partition numbered C<partnum> on device "
17190 "C<device>. Note that partitions are numbered from 1."
17195 #: ../src/guestfs-actions.pod:5505 ../fish/guestfish-actions.pod:3641
17197 "The bootable flag is used by some operating systems (notably Windows) to "
17198 "determine which partition to boot from. It is by no means universally "
17204 #: ../src/guestfs-actions.pod:5513
17205 msgid "guestfs_part_set_mbr_id"
17210 #: ../src/guestfs-actions.pod:5515
17214 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
17215 " const char *device,\n"
17223 #: ../src/guestfs-actions.pod:5521 ../fish/guestfish-actions.pod:3649
17225 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
17226 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
17227 "documentation are in fact hexadecimal numbers, but usually documented "
17228 "without any leading \"0x\" which might be confusing."
17233 #: ../src/guestfs-actions.pod:5535
17234 msgid "guestfs_part_set_name"
17239 #: ../src/guestfs-actions.pod:5537
17243 " guestfs_part_set_name (guestfs_h *g,\n"
17244 " const char *device,\n"
17246 " const char *name);\n"
17252 #: ../src/guestfs-actions.pod:5543 ../fish/guestfish-actions.pod:3663
17254 "This sets the partition name on partition numbered C<partnum> on device "
17255 "C<device>. Note that partitions are numbered from 1."
17260 #: ../src/guestfs-actions.pod:5546 ../fish/guestfish-actions.pod:3666
17262 "The partition name can only be set on certain types of partition table. "
17263 "This works on C<gpt> but not on C<mbr> partitions."
17268 #: ../src/guestfs-actions.pod:5553
17269 msgid "guestfs_part_to_dev"
17274 #: ../src/guestfs-actions.pod:5555
17278 " guestfs_part_to_dev (guestfs_h *g,\n"
17279 " const char *partition);\n"
17285 #: ../src/guestfs-actions.pod:5559 ../fish/guestfish-actions.pod:3673
17287 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
17288 "partition number, returning the device name (eg. \"/dev/sdb\")."
17293 #: ../src/guestfs-actions.pod:5563
17295 "The named partition must exist, for example as a string returned from "
17296 "C<guestfs_list_partitions>."
17301 #: ../src/guestfs-actions.pod:5571
17302 msgid "guestfs_ping_daemon"
17307 #: ../src/guestfs-actions.pod:5573
17311 " guestfs_ping_daemon (guestfs_h *g);\n"
17317 #: ../src/guestfs-actions.pod:5576 ../fish/guestfish-actions.pod:3684
17319 "This is a test probe into the guestfs daemon running inside the qemu "
17320 "subprocess. Calling this function checks that the daemon responds to the "
17321 "ping message, without affecting the daemon or attached block device(s) in "
17327 #: ../src/guestfs-actions.pod:5585
17328 msgid "guestfs_pread"
17333 #: ../src/guestfs-actions.pod:5587
17337 " guestfs_pread (guestfs_h *g,\n"
17338 " const char *path,\n"
17340 " int64_t offset,\n"
17341 " size_t *size_r);\n"
17347 #: ../src/guestfs-actions.pod:5594 ../fish/guestfish-actions.pod:3693
17349 "This command lets you read part of a file. It reads C<count> bytes of the "
17350 "file, starting at C<offset>, from file C<path>."
17355 #: ../src/guestfs-actions.pod:5597 ../src/guestfs-actions.pod:5623
17356 #: ../fish/guestfish-actions.pod:3696 ../fish/guestfish-actions.pod:3711
17358 "This may read fewer bytes than requested. For further details see the "
17359 "L<pread(2)> system call."
17364 #: ../src/guestfs-actions.pod:5600
17365 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
17370 #: ../src/guestfs-actions.pod:5611
17371 msgid "guestfs_pread_device"
17376 #: ../src/guestfs-actions.pod:5613
17380 " guestfs_pread_device (guestfs_h *g,\n"
17381 " const char *device,\n"
17383 " int64_t offset,\n"
17384 " size_t *size_r);\n"
17390 #: ../src/guestfs-actions.pod:5620 ../fish/guestfish-actions.pod:3708
17392 "This command lets you read part of a file. It reads C<count> bytes of "
17393 "C<device>, starting at C<offset>."
17398 #: ../src/guestfs-actions.pod:5626
17399 msgid "See also C<guestfs_pread>."
17404 #: ../src/guestfs-actions.pod:5635
17405 msgid "(Added in 1.5.21)"
17410 #: ../src/guestfs-actions.pod:5637
17411 msgid "guestfs_pvcreate"
17416 #: ../src/guestfs-actions.pod:5639
17420 " guestfs_pvcreate (guestfs_h *g,\n"
17421 " const char *device);\n"
17427 #: ../src/guestfs-actions.pod:5643 ../fish/guestfish-actions.pod:3723
17429 "This creates an LVM physical volume on the named C<device>, where C<device> "
17430 "should usually be a partition name such as C</dev/sda1>."
17435 #: ../src/guestfs-actions.pod:5651
17436 msgid "guestfs_pvremove"
17441 #: ../src/guestfs-actions.pod:5653
17445 " guestfs_pvremove (guestfs_h *g,\n"
17446 " const char *device);\n"
17452 #: ../src/guestfs-actions.pod:5657 ../fish/guestfish-actions.pod:3731
17454 "This wipes a physical volume C<device> so that LVM will no longer recognise "
17460 #: ../src/guestfs-actions.pod:5660 ../fish/guestfish-actions.pod:3734
17462 "The implementation uses the C<pvremove> command which refuses to wipe "
17463 "physical volumes that contain any volume groups, so you have to remove those "
17469 #: ../src/guestfs-actions.pod:5668
17470 msgid "guestfs_pvresize"
17475 #: ../src/guestfs-actions.pod:5670
17479 " guestfs_pvresize (guestfs_h *g,\n"
17480 " const char *device);\n"
17486 #: ../src/guestfs-actions.pod:5674 ../fish/guestfish-actions.pod:3742
17488 "This resizes (expands or shrinks) an existing LVM physical volume to match "
17489 "the new size of the underlying device."
17494 #: ../src/guestfs-actions.pod:5681
17495 msgid "guestfs_pvresize_size"
17500 #: ../src/guestfs-actions.pod:5683
17504 " guestfs_pvresize_size (guestfs_h *g,\n"
17505 " const char *device,\n"
17506 " int64_t size);\n"
17512 #: ../src/guestfs-actions.pod:5688
17514 "This command is the same as C<guestfs_pvresize> except that it allows you to "
17515 "specify the new size (in bytes) explicitly."
17520 #: ../src/guestfs-actions.pod:5695
17521 msgid "guestfs_pvs"
17526 #: ../src/guestfs-actions.pod:5697
17530 " guestfs_pvs (guestfs_h *g);\n"
17536 #: ../src/guestfs-actions.pod:5700 ../fish/guestfish-actions.pod:3756
17538 "List all the physical volumes detected. This is the equivalent of the L<pvs"
17544 #: ../src/guestfs-actions.pod:5703 ../fish/guestfish-actions.pod:3759
17546 "This returns a list of just the device names that contain PVs (eg. C</dev/"
17552 #: ../src/guestfs-actions.pod:5706
17553 msgid "See also C<guestfs_pvs_full>."
17558 #: ../src/guestfs-actions.pod:5714
17559 msgid "guestfs_pvs_full"
17564 #: ../src/guestfs-actions.pod:5716
17567 " struct guestfs_lvm_pv_list *\n"
17568 " guestfs_pvs_full (guestfs_h *g);\n"
17574 #: ../src/guestfs-actions.pod:5719 ../fish/guestfish-actions.pod:3768
17576 "List all the physical volumes detected. This is the equivalent of the L<pvs"
17577 "(8)> command. The \"full\" version includes all fields."
17582 #: ../src/guestfs-actions.pod:5722
17584 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
17585 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after use>."
17590 #: ../src/guestfs-actions.pod:5728
17591 msgid "guestfs_pvuuid"
17596 #: ../src/guestfs-actions.pod:5730
17600 " guestfs_pvuuid (guestfs_h *g,\n"
17601 " const char *device);\n"
17607 #: ../src/guestfs-actions.pod:5734 ../fish/guestfish-actions.pod:3775
17608 msgid "This command returns the UUID of the LVM PV C<device>."
17613 #: ../src/guestfs-actions.pod:5741
17614 msgid "guestfs_pwrite"
17619 #: ../src/guestfs-actions.pod:5743
17623 " guestfs_pwrite (guestfs_h *g,\n"
17624 " const char *path,\n"
17625 " const char *content,\n"
17626 " size_t content_size,\n"
17627 " int64_t offset);\n"
17633 #: ../src/guestfs-actions.pod:5750 ../fish/guestfish-actions.pod:3781
17635 "This command writes to part of a file. It writes the data buffer C<content> "
17636 "to the file C<path> starting at offset C<offset>."
17641 #: ../src/guestfs-actions.pod:5753 ../fish/guestfish-actions.pod:3784
17643 "This command implements the L<pwrite(2)> system call, and like that system "
17644 "call it may not write the full data requested. The return value is the "
17645 "number of bytes that were actually written to the file. This could even be "
17646 "0, although short writes are unlikely for regular files in ordinary "
17652 #: ../src/guestfs-actions.pod:5759
17653 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
17658 #: ../src/guestfs-actions.pod:5768
17659 msgid "guestfs_pwrite_device"
17664 #: ../src/guestfs-actions.pod:5770
17668 " guestfs_pwrite_device (guestfs_h *g,\n"
17669 " const char *device,\n"
17670 " const char *content,\n"
17671 " size_t content_size,\n"
17672 " int64_t offset);\n"
17678 #: ../src/guestfs-actions.pod:5777 ../fish/guestfish-actions.pod:3799
17680 "This command writes to part of a device. It writes the data buffer "
17681 "C<content> to C<device> starting at offset C<offset>."
17686 #: ../src/guestfs-actions.pod:5780 ../fish/guestfish-actions.pod:3802
17688 "This command implements the L<pwrite(2)> system call, and like that system "
17689 "call it may not write the full data requested (although short writes to disk "
17690 "devices and partitions are probably impossible with standard Linux kernels)."
17695 #: ../src/guestfs-actions.pod:5785
17696 msgid "See also C<guestfs_pwrite>."
17701 #: ../src/guestfs-actions.pod:5792
17702 msgid "(Added in 1.5.20)"
17707 #: ../src/guestfs-actions.pod:5794
17708 msgid "guestfs_read_file"
17713 #: ../src/guestfs-actions.pod:5796
17717 " guestfs_read_file (guestfs_h *g,\n"
17718 " const char *path,\n"
17719 " size_t *size_r);\n"
17725 #: ../src/guestfs-actions.pod:5801 ../fish/guestfish-actions.pod:3816
17726 msgid "This calls returns the contents of the file C<path> as a buffer."
17731 #: ../src/guestfs-actions.pod:5804
17733 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
17734 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
17735 "function is limited in the total size of file that can be handled."
17740 #: ../src/guestfs-actions.pod:5816
17741 msgid "(Added in 1.0.63)"
17746 #: ../src/guestfs-actions.pod:5818
17747 msgid "guestfs_read_lines"
17752 #: ../src/guestfs-actions.pod:5820
17756 " guestfs_read_lines (guestfs_h *g,\n"
17757 " const char *path);\n"
17763 #: ../src/guestfs-actions.pod:5826 ../fish/guestfish-actions.pod:3833
17765 "The file contents are returned as a list of lines. Trailing C<LF> and "
17766 "C<CRLF> character sequences are I<not> returned."
17771 #: ../src/guestfs-actions.pod:5829
17773 "Note that this function cannot correctly handle binary files (specifically, "
17774 "files containing C<\\0> character which is treated as end of line). For "
17775 "those you need to use the C<guestfs_read_file> function which has a more "
17776 "complex interface."
17781 #: ../src/guestfs-actions.pod:5840
17782 msgid "guestfs_readdir"
17787 #: ../src/guestfs-actions.pod:5842
17790 " struct guestfs_dirent_list *\n"
17791 " guestfs_readdir (guestfs_h *g,\n"
17792 " const char *dir);\n"
17798 #: ../src/guestfs-actions.pod:5846 ../fish/guestfish-actions.pod:3845
17799 msgid "This returns the list of directory entries in directory C<dir>."
17804 #: ../src/guestfs-actions.pod:5848 ../fish/guestfish-actions.pod:3847
17806 "All entries in the directory are returned, including C<.> and C<..>. The "
17807 "entries are I<not> sorted, but returned in the same order as the underlying "
17813 #: ../src/guestfs-actions.pod:5852 ../fish/guestfish-actions.pod:3851
17815 "Also this call returns basic file type information about each file. The "
17816 "C<ftyp> field will contain one of the following characters:"
17821 #: ../src/guestfs-actions.pod:5857 ../fish/guestfish-actions.pod:3856
17827 #: ../src/guestfs-actions.pod:5859 ../fish/guestfish-actions.pod:3858
17828 msgid "Block special"
17833 #: ../src/guestfs-actions.pod:5861 ../fish/guestfish-actions.pod:3860
17839 #: ../src/guestfs-actions.pod:5863 ../fish/guestfish-actions.pod:3862
17840 msgid "Char special"
17845 #: ../src/guestfs-actions.pod:5865 ../fish/guestfish-actions.pod:3864
17851 #: ../src/guestfs-actions.pod:5867 ../fish/guestfish-actions.pod:3866
17857 #: ../src/guestfs-actions.pod:5869 ../fish/guestfish-actions.pod:3868
17863 #: ../src/guestfs-actions.pod:5871 ../fish/guestfish-actions.pod:3870
17864 msgid "FIFO (named pipe)"
17869 #: ../src/guestfs-actions.pod:5873 ../fish/guestfish-actions.pod:3872
17875 #: ../src/guestfs-actions.pod:5875 ../fish/guestfish-actions.pod:3874
17876 msgid "Symbolic link"
17881 #: ../src/guestfs-actions.pod:5877 ../fish/guestfish-actions.pod:3876
17887 #: ../src/guestfs-actions.pod:5879 ../fish/guestfish-actions.pod:3878
17888 msgid "Regular file"
17893 #: ../src/guestfs-actions.pod:5881 ../fish/guestfish-actions.pod:3880
17899 #: ../src/guestfs-actions.pod:5883 ../fish/guestfish-actions.pod:3882
17905 #: ../src/guestfs-actions.pod:5885 ../fish/guestfish-actions.pod:3884
17911 #: ../src/guestfs-actions.pod:5887 ../fish/guestfish-actions.pod:3886
17912 msgid "Unknown file type"
17917 #: ../src/guestfs-actions.pod:5889 ../fish/guestfish-actions.pod:3888
17923 #: ../src/guestfs-actions.pod:5891 ../fish/guestfish-actions.pod:3890
17925 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
17930 #: ../src/guestfs-actions.pod:5896
17932 "This function is primarily intended for use by programs. To get a simple "
17933 "list of names, use C<guestfs_ls>. To get a printable directory for human "
17934 "consumption, use C<guestfs_ll>."
17939 #: ../src/guestfs-actions.pod:5900
17941 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
17942 "was an error. I<The caller must call C<guestfs_free_dirent_list> after use>."
17947 #: ../src/guestfs-actions.pod:5906
17948 msgid "guestfs_readlink"
17953 #: ../src/guestfs-actions.pod:5908
17957 " guestfs_readlink (guestfs_h *g,\n"
17958 " const char *path);\n"
17964 #: ../src/guestfs-actions.pod:5912 ../fish/guestfish-actions.pod:3903
17965 msgid "This command reads the target of a symbolic link."
17970 #: ../src/guestfs-actions.pod:5919
17971 msgid "guestfs_readlinklist"
17976 #: ../src/guestfs-actions.pod:5921
17980 " guestfs_readlinklist (guestfs_h *g,\n"
17981 " const char *path,\n"
17982 " char *const *names);\n"
17988 #: ../src/guestfs-actions.pod:5926 ../fish/guestfish-actions.pod:3909
17990 "This call allows you to do a C<readlink> operation on multiple files, where "
17991 "all files are in the directory C<path>. C<names> is the list of files from "
17997 #: ../src/guestfs-actions.pod:5930 ../fish/guestfish-actions.pod:3913
17999 "On return you get a list of strings, with a one-to-one correspondence to the "
18000 "C<names> list. Each string is the value of the symbolic link."
18005 #: ../src/guestfs-actions.pod:5934 ../fish/guestfish-actions.pod:3917
18007 "If the C<readlink(2)> operation fails on any name, then the corresponding "
18008 "result string is the empty string C<\"\">. However the whole operation is "
18009 "completed even if there were C<readlink(2)> errors, and so you can call this "
18010 "function with names where you don't know if they are symbolic links already "
18011 "(albeit slightly less efficient)."
18016 #: ../src/guestfs-actions.pod:5941 ../fish/guestfish-actions.pod:3924
18018 "This call is intended for programs that want to efficiently list a directory "
18019 "contents without making many round-trips. Very long directory listings "
18020 "might cause the protocol message size to be exceeded, causing this call to "
18021 "fail. The caller must split up such requests into smaller groups of names."
18026 #: ../src/guestfs-actions.pod:5954
18027 msgid "guestfs_realpath"
18032 #: ../src/guestfs-actions.pod:5956
18036 " guestfs_realpath (guestfs_h *g,\n"
18037 " const char *path);\n"
18043 #: ../src/guestfs-actions.pod:5960 ../fish/guestfish-actions.pod:3935
18045 "Return the canonicalized absolute pathname of C<path>. The returned path "
18046 "has no C<.>, C<..> or symbolic link path elements."
18051 #: ../src/guestfs-actions.pod:5968
18052 msgid "guestfs_removexattr"
18057 #: ../src/guestfs-actions.pod:5970
18061 " guestfs_removexattr (guestfs_h *g,\n"
18062 " const char *xattr,\n"
18063 " const char *path);\n"
18069 #: ../src/guestfs-actions.pod:5975 ../fish/guestfish-actions.pod:3942
18071 "This call removes the extended attribute named C<xattr> of the file C<path>."
18076 #: ../src/guestfs-actions.pod:5978
18077 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
18082 #: ../src/guestfs-actions.pod:5984
18083 msgid "guestfs_resize2fs"
18088 #: ../src/guestfs-actions.pod:5986
18092 " guestfs_resize2fs (guestfs_h *g,\n"
18093 " const char *device);\n"
18099 #: ../src/guestfs-actions.pod:5990 ../fish/guestfish-actions.pod:3951
18101 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
18102 "underlying device."
18107 #: ../src/guestfs-actions.pod:5993
18109 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
18110 "C<device> before calling this command. For unknown reasons C<resize2fs> "
18111 "sometimes gives an error about this and sometimes not. In any case, it is "
18112 "always safe to call C<guestfs_e2fsck_f> before calling this function."
18116 #: ../src/guestfs-actions.pod:6003
18117 msgid "guestfs_resize2fs_M"
18121 #: ../src/guestfs-actions.pod:6005
18125 " guestfs_resize2fs_M (guestfs_h *g,\n"
18126 " const char *device);\n"
18131 #: ../src/guestfs-actions.pod:6009
18133 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
18134 "resized to its minimum size. This works like the I<-M> option to the "
18135 "C<resize2fs> command."
18139 #: ../src/guestfs-actions.pod:6013
18141 "To get the resulting size of the filesystem you should call "
18142 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
18143 "These two numbers, multiplied together, give the resulting size of the "
18144 "minimal filesystem in bytes."
18149 #: ../src/guestfs-actions.pod:6022
18150 msgid "guestfs_resize2fs_size"
18155 #: ../src/guestfs-actions.pod:6024
18159 " guestfs_resize2fs_size (guestfs_h *g,\n"
18160 " const char *device,\n"
18161 " int64_t size);\n"
18167 #: ../src/guestfs-actions.pod:6029
18169 "This command is the same as C<guestfs_resize2fs> except that it allows you "
18170 "to specify the new size (in bytes) explicitly."
18175 #: ../src/guestfs-actions.pod:6036
18181 #: ../src/guestfs-actions.pod:6038
18185 " guestfs_rm (guestfs_h *g,\n"
18186 " const char *path);\n"
18192 #: ../src/guestfs-actions.pod:6042 ../fish/guestfish-actions.pod:3984
18193 msgid "Remove the single file C<path>."
18198 #: ../src/guestfs-actions.pod:6048
18199 msgid "guestfs_rm_rf"
18204 #: ../src/guestfs-actions.pod:6050
18208 " guestfs_rm_rf (guestfs_h *g,\n"
18209 " const char *path);\n"
18215 #: ../src/guestfs-actions.pod:6054 ../fish/guestfish-actions.pod:3990
18217 "Remove the file or directory C<path>, recursively removing the contents if "
18218 "its a directory. This is like the C<rm -rf> shell command."
18223 #: ../src/guestfs-actions.pod:6062
18224 msgid "guestfs_rmdir"
18229 #: ../src/guestfs-actions.pod:6064
18233 " guestfs_rmdir (guestfs_h *g,\n"
18234 " const char *path);\n"
18240 #: ../src/guestfs-actions.pod:6068 ../fish/guestfish-actions.pod:3998
18241 msgid "Remove the single directory C<path>."
18246 #: ../src/guestfs-actions.pod:6074
18247 msgid "guestfs_rmmountpoint"
18252 #: ../src/guestfs-actions.pod:6076
18256 " guestfs_rmmountpoint (guestfs_h *g,\n"
18257 " const char *exemptpath);\n"
18263 #: ../src/guestfs-actions.pod:6080
18265 "This calls removes a mountpoint that was previously created with "
18266 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
18271 #: ../src/guestfs-actions.pod:6088
18272 msgid "guestfs_scrub_device"
18277 #: ../src/guestfs-actions.pod:6090
18281 " guestfs_scrub_device (guestfs_h *g,\n"
18282 " const char *device);\n"
18288 #: ../src/guestfs-actions.pod:6094 ../fish/guestfish-actions.pod:4012
18290 "This command writes patterns over C<device> to make data retrieval more "
18296 #: ../src/guestfs-actions.pod:6097 ../src/guestfs-actions.pod:6118
18297 #: ../src/guestfs-actions.pod:6137 ../fish/guestfish-actions.pod:4015
18298 #: ../fish/guestfish-actions.pod:4030 ../fish/guestfish-actions.pod:4043
18300 "It is an interface to the L<scrub(1)> program. See that manual page for "
18306 #: ../src/guestfs-actions.pod:6105 ../src/guestfs-actions.pod:6123
18307 #: ../src/guestfs-actions.pod:6142
18308 msgid "(Added in 1.0.52)"
18313 #: ../src/guestfs-actions.pod:6107
18314 msgid "guestfs_scrub_file"
18319 #: ../src/guestfs-actions.pod:6109
18323 " guestfs_scrub_file (guestfs_h *g,\n"
18324 " const char *file);\n"
18330 #: ../src/guestfs-actions.pod:6113 ../fish/guestfish-actions.pod:4025
18332 "This command writes patterns over a file to make data retrieval more "
18338 #: ../src/guestfs-actions.pod:6116 ../fish/guestfish-actions.pod:4028
18339 msgid "The file is I<removed> after scrubbing."
18344 #: ../src/guestfs-actions.pod:6125
18345 msgid "guestfs_scrub_freespace"
18350 #: ../src/guestfs-actions.pod:6127
18354 " guestfs_scrub_freespace (guestfs_h *g,\n"
18355 " const char *dir);\n"
18361 #: ../src/guestfs-actions.pod:6131
18363 "This command creates the directory C<dir> and then fills it with files until "
18364 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
18365 "and deletes them. The intention is to scrub any free space on the partition "
18366 "containing C<dir>."
18371 #: ../src/guestfs-actions.pod:6144
18372 msgid "guestfs_set_append"
18377 #: ../src/guestfs-actions.pod:6146
18381 " guestfs_set_append (guestfs_h *g,\n"
18382 " const char *append);\n"
18388 #: ../src/guestfs-actions.pod:6150 ../fish/guestfish-actions.pod:4052
18390 "This function is used to add additional options to the guest kernel command "
18396 #: ../src/guestfs-actions.pod:6153 ../fish/guestfish-actions.pod:4055
18398 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
18399 "environment variable."
18404 #: ../src/guestfs-actions.pod:6156 ../fish/guestfish-actions.pod:4058
18406 "Setting C<append> to C<NULL> means I<no> additional options are passed "
18407 "(libguestfs always adds a few of its own)."
18411 #: ../src/guestfs-actions.pod:6163
18412 msgid "guestfs_set_attach_method"
18416 #: ../src/guestfs-actions.pod:6165
18420 " guestfs_set_attach_method (guestfs_h *g,\n"
18421 " const char *attachmethod);\n"
18426 #: ../src/guestfs-actions.pod:6169 ../fish/guestfish-actions.pod:4067
18428 "Set the method that libguestfs uses to connect to the back end guestfsd "
18429 "daemon. Possible methods are:"
18433 #: ../src/guestfs-actions.pod:6176 ../fish/guestfish-actions.pod:4074
18435 "Launch an appliance and connect to it. This is the ordinary method and the "
18440 #: ../src/guestfs-actions.pod:6179 ../fish/guestfish-actions.pod:4077
18441 msgid "C<unix:I<path>>"
18445 #: ../src/guestfs-actions.pod:6181 ../fish/guestfish-actions.pod:4079
18446 msgid "Connect to the Unix domain socket I<path>."
18450 #: ../src/guestfs-actions.pod:6183 ../fish/guestfish-actions.pod:4081
18452 "This method lets you connect to an existing daemon or (using virtio-serial) "
18453 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
18454 "RUNNING DAEMONS>."
18459 #: ../src/guestfs-actions.pod:6193
18460 msgid "guestfs_set_autosync"
18465 #: ../src/guestfs-actions.pod:6195
18469 " guestfs_set_autosync (guestfs_h *g,\n"
18470 " int autosync);\n"
18475 #: ../src/guestfs-actions.pod:6199 ../fish/guestfish-actions.pod:4093
18477 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
18478 "effort attempt to make filesystems consistent and synchronized when the "
18479 "handle is closed (also if the program exits without closing handles)."
18484 #: ../src/guestfs-actions.pod:6204 ../fish/guestfish-actions.pod:4098
18486 "This is enabled by default (since libguestfs 1.5.24, previously it was "
18487 "disabled by default)."
18492 #: ../src/guestfs-actions.pod:6211
18493 msgid "guestfs_set_direct"
18498 #: ../src/guestfs-actions.pod:6213
18502 " guestfs_set_direct (guestfs_h *g,\n"
18509 #: ../src/guestfs-actions.pod:6217 ../fish/guestfish-actions.pod:4107
18511 "If the direct appliance mode flag is enabled, then stdin and stdout are "
18512 "passed directly through to the appliance once it is launched."
18517 #: ../src/guestfs-actions.pod:6221
18519 "One consequence of this is that log messages aren't caught by the library "
18520 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
18526 #: ../src/guestfs-actions.pod:6225 ../fish/guestfish-actions.pod:4115
18527 msgid "You probably don't want to use this unless you know what you are doing."
18532 #: ../src/guestfs-actions.pod:6228 ../fish/guestfish-actions.pod:4118
18533 msgid "The default is disabled."
18538 #: ../src/guestfs-actions.pod:6234
18539 msgid "guestfs_set_e2label"
18544 #: ../src/guestfs-actions.pod:6236
18548 " guestfs_set_e2label (guestfs_h *g,\n"
18549 " const char *device,\n"
18550 " const char *label);\n"
18556 #: ../src/guestfs-actions.pod:6241 ../fish/guestfish-actions.pod:4124
18558 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
18559 "C<label>. Filesystem labels are limited to 16 characters."
18564 #: ../src/guestfs-actions.pod:6245
18566 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
18567 "the existing label on a filesystem."
18572 #: ../src/guestfs-actions.pod:6252
18573 msgid "guestfs_set_e2uuid"
18578 #: ../src/guestfs-actions.pod:6254
18582 " guestfs_set_e2uuid (guestfs_h *g,\n"
18583 " const char *device,\n"
18584 " const char *uuid);\n"
18590 #: ../src/guestfs-actions.pod:6259 ../fish/guestfish-actions.pod:4135
18592 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
18593 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
18594 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
18599 #: ../src/guestfs-actions.pod:6264
18601 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
18602 "the existing UUID of a filesystem."
18607 #: ../src/guestfs-actions.pod:6271
18608 msgid "guestfs_set_memsize"
18613 #: ../src/guestfs-actions.pod:6273
18617 " guestfs_set_memsize (guestfs_h *g,\n"
18624 #: ../src/guestfs-actions.pod:6277
18626 "This sets the memory size in megabytes allocated to the qemu subprocess. "
18627 "This only has any effect if called before C<guestfs_launch>."
18632 #: ../src/guestfs-actions.pod:6281 ../fish/guestfish-actions.pod:4153
18634 "You can also change this by setting the environment variable "
18635 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
18640 #: ../src/guestfs-actions.pod:6292
18641 msgid "guestfs_set_network"
18646 #: ../src/guestfs-actions.pod:6294
18650 " guestfs_set_network (guestfs_h *g,\n"
18657 #: ../src/guestfs-actions.pod:6298 ../fish/guestfish-actions.pod:4166
18659 "If C<network> is true, then the network is enabled in the libguestfs "
18660 "appliance. The default is false."
18665 #: ../src/guestfs-actions.pod:6301 ../fish/guestfish-actions.pod:4169
18667 "This affects whether commands are able to access the network (see L<guestfs"
18668 "(3)/RUNNING COMMANDS>)."
18673 #: ../src/guestfs-actions.pod:6304
18675 "You must call this before calling C<guestfs_launch>, otherwise it has no "
18681 #: ../src/guestfs-actions.pod:6311
18682 msgid "guestfs_set_path"
18687 #: ../src/guestfs-actions.pod:6313
18691 " guestfs_set_path (guestfs_h *g,\n"
18692 " const char *searchpath);\n"
18698 #: ../src/guestfs-actions.pod:6317 ../fish/guestfish-actions.pod:4181
18699 msgid "Set the path that libguestfs searches for kernel and initrd.img."
18704 #: ../src/guestfs-actions.pod:6319 ../fish/guestfish-actions.pod:4183
18706 "The default is C<$libdir/guestfs> unless overridden by setting "
18707 "C<LIBGUESTFS_PATH> environment variable."
18712 #: ../src/guestfs-actions.pod:6322 ../fish/guestfish-actions.pod:4186
18713 msgid "Setting C<path> to C<NULL> restores the default path."
18717 #: ../src/guestfs-actions.pod:6328
18718 msgid "guestfs_set_pgroup"
18722 #: ../src/guestfs-actions.pod:6330
18726 " guestfs_set_pgroup (guestfs_h *g,\n"
18732 #: ../src/guestfs-actions.pod:6334 ../fish/guestfish-actions.pod:4194
18734 "If C<pgroup> is true, child processes are placed into their own process "
18739 #: ../src/guestfs-actions.pod:6337 ../fish/guestfish-actions.pod:4197
18741 "The practical upshot of this is that signals like C<SIGINT> (from users "
18742 "pressing C<^C>) won't be received by the child process."
18746 #: ../src/guestfs-actions.pod:6340 ../fish/guestfish-actions.pod:4200
18748 "The default for this flag is false, because usually you want C<^C> to kill "
18754 #: ../src/guestfs-actions.pod:6345
18755 msgid "guestfs_set_qemu"
18760 #: ../src/guestfs-actions.pod:6347
18764 " guestfs_set_qemu (guestfs_h *g,\n"
18765 " const char *qemu);\n"
18771 #: ../src/guestfs-actions.pod:6351 ../fish/guestfish-actions.pod:4209
18772 msgid "Set the qemu binary that we will use."
18777 #: ../src/guestfs-actions.pod:6353 ../fish/guestfish-actions.pod:4211
18779 "The default is chosen when the library was compiled by the configure script."
18784 #: ../src/guestfs-actions.pod:6356 ../fish/guestfish-actions.pod:4214
18786 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
18792 #: ../src/guestfs-actions.pod:6359 ../fish/guestfish-actions.pod:4217
18793 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
18798 #: ../src/guestfs-actions.pod:6361 ../fish/guestfish-actions.pod:4219
18800 "Note that you should call this function as early as possible after creating "
18801 "the handle. This is because some pre-launch operations depend on testing "
18802 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
18803 "don't retest features, and so you might see inconsistent results. Using the "
18804 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
18805 "the qemu binary at the same time as the handle is created."
18810 #: ../src/guestfs-actions.pod:6373
18811 msgid "guestfs_set_recovery_proc"
18816 #: ../src/guestfs-actions.pod:6375
18820 " guestfs_set_recovery_proc (guestfs_h *g,\n"
18821 " int recoveryproc);\n"
18827 #: ../src/guestfs-actions.pod:6379
18829 "If this is called with the parameter C<false> then C<guestfs_launch> does "
18830 "not create a recovery process. The purpose of the recovery process is to "
18831 "stop runaway qemu processes in the case where the main program aborts "
18837 #: ../src/guestfs-actions.pod:6384
18839 "This only has any effect if called before C<guestfs_launch>, and the default "
18845 #: ../src/guestfs-actions.pod:6387 ../fish/guestfish-actions.pod:4241
18847 "About the only time when you would want to disable this is if the main "
18848 "process will fork itself into the background (\"daemonize\" itself). In "
18849 "this case the recovery process thinks that the main program has disappeared "
18850 "and so kills qemu, which is not very helpful."
18855 #: ../src/guestfs-actions.pod:6397
18856 msgid "guestfs_set_selinux"
18861 #: ../src/guestfs-actions.pod:6399
18865 " guestfs_set_selinux (guestfs_h *g,\n"
18872 #: ../src/guestfs-actions.pod:6403 ../fish/guestfish-actions.pod:4253
18874 "This sets the selinux flag that is passed to the appliance at boot time. "
18875 "The default is C<selinux=0> (disabled)."
18880 #: ../src/guestfs-actions.pod:6406 ../fish/guestfish-actions.pod:4256
18882 "Note that if SELinux is enabled, it is always in Permissive mode "
18883 "(C<enforcing=0>)."
18888 #: ../src/guestfs-actions.pod:6416
18889 msgid "guestfs_set_trace"
18894 #: ../src/guestfs-actions.pod:6418
18898 " guestfs_set_trace (guestfs_h *g,\n"
18904 #: ../src/guestfs-actions.pod:6422 ../fish/guestfish-actions.pod:4268
18906 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
18907 "return values are traced."
18912 #: ../src/guestfs-actions.pod:6425 ../fish/guestfish-actions.pod:4271
18914 "If you want to trace C API calls into libguestfs (and other libraries) then "
18915 "possibly a better way is to use the external ltrace(1) command."
18920 #: ../src/guestfs-actions.pod:6429 ../fish/guestfish-actions.pod:4275
18922 "Command traces are disabled unless the environment variable "
18923 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
18927 #: ../src/guestfs-actions.pod:6432
18929 "Trace messages are normally sent to C<stderr>, unless you register a "
18930 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
18935 #: ../src/guestfs-actions.pod:6440
18936 msgid "guestfs_set_verbose"
18941 #: ../src/guestfs-actions.pod:6442
18945 " guestfs_set_verbose (guestfs_h *g,\n"
18951 #: ../src/guestfs-actions.pod:6446 ../fish/guestfish-actions.pod:4288
18952 msgid "If C<verbose> is true, this turns on verbose messages."
18957 #: ../src/guestfs-actions.pod:6448 ../fish/guestfish-actions.pod:4290
18959 "Verbose messages are disabled unless the environment variable "
18960 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
18964 #: ../src/guestfs-actions.pod:6451
18966 "Verbose messages are normally sent to C<stderr>, unless you register a "
18967 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
18972 #: ../src/guestfs-actions.pod:6459
18973 msgid "guestfs_setcon"
18978 #: ../src/guestfs-actions.pod:6461
18982 " guestfs_setcon (guestfs_h *g,\n"
18983 " const char *context);\n"
18989 #: ../src/guestfs-actions.pod:6465 ../fish/guestfish-actions.pod:4301
18991 "This sets the SELinux security context of the daemon to the string "
18997 #: ../src/guestfs-actions.pod:6468 ../fish/guestfish-actions.pod:4304
18998 msgid "See the documentation about SELINUX in L<guestfs(3)>."
19003 #: ../src/guestfs-actions.pod:6474
19004 msgid "guestfs_setxattr"
19009 #: ../src/guestfs-actions.pod:6476
19013 " guestfs_setxattr (guestfs_h *g,\n"
19014 " const char *xattr,\n"
19015 " const char *val,\n"
19017 " const char *path);\n"
19023 #: ../src/guestfs-actions.pod:6483 ../fish/guestfish-actions.pod:4310
19025 "This call sets the extended attribute named C<xattr> of the file C<path> to "
19026 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
19031 #: ../src/guestfs-actions.pod:6487
19032 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
19037 #: ../src/guestfs-actions.pod:6493
19038 msgid "guestfs_sfdisk"
19043 #: ../src/guestfs-actions.pod:6495
19047 " guestfs_sfdisk (guestfs_h *g,\n"
19048 " const char *device,\n"
19052 " char *const *lines);\n"
19058 #: ../src/guestfs-actions.pod:6503 ../fish/guestfish-actions.pod:4320
19060 "This is a direct interface to the L<sfdisk(8)> program for creating "
19061 "partitions on block devices."
19066 #: ../src/guestfs-actions.pod:6506 ../fish/guestfish-actions.pod:4323
19067 msgid "C<device> should be a block device, for example C</dev/sda>."
19072 #: ../src/guestfs-actions.pod:6508 ../fish/guestfish-actions.pod:4325
19074 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
19075 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
19076 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
19077 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
19078 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
19079 "the kernel) cannot work out the right geometry and you will need to tell it."
19084 #: ../src/guestfs-actions.pod:6516 ../fish/guestfish-actions.pod:4333
19086 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
19087 "refer to the L<sfdisk(8)> manpage."
19092 #: ../src/guestfs-actions.pod:6519 ../fish/guestfish-actions.pod:4336
19094 "To create a single partition occupying the whole disk, you would pass "
19095 "C<lines> as a single element list, when the single element being the string "
19101 #: ../src/guestfs-actions.pod:6523
19103 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
19107 #: ../src/guestfs-actions.pod:6531 ../src/guestfs-actions.pod:6561
19108 #: ../src/guestfs-actions.pod:6594 ../fish/guestfish-actions.pod:4346
19109 #: ../fish/guestfish-actions.pod:4369 ../fish/guestfish-actions.pod:4391
19111 "This function is deprecated. In new code, use the C<part_add> call instead."
19116 #: ../src/guestfs-actions.pod:6540
19117 msgid "guestfs_sfdiskM"
19122 #: ../src/guestfs-actions.pod:6542
19126 " guestfs_sfdiskM (guestfs_h *g,\n"
19127 " const char *device,\n"
19128 " char *const *lines);\n"
19134 #: ../src/guestfs-actions.pod:6547
19136 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
19137 "partition sizes are specified in megabytes only (rounded to the nearest "
19138 "cylinder) and you don't need to specify the cyls, heads and sectors "
19139 "parameters which were rarely if ever used anyway."
19144 #: ../src/guestfs-actions.pod:6553
19146 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
19147 "C<guestfs_part_disk>"
19152 #: ../src/guestfs-actions.pod:6570
19153 msgid "guestfs_sfdisk_N"
19158 #: ../src/guestfs-actions.pod:6572
19162 " guestfs_sfdisk_N (guestfs_h *g,\n"
19163 " const char *device,\n"
19168 " const char *line);\n"
19174 #: ../src/guestfs-actions.pod:6581 ../fish/guestfish-actions.pod:4380
19176 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
19177 "(note: C<n> counts from 1)."
19182 #: ../src/guestfs-actions.pod:6584
19184 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
19185 "for the cyls/heads/sectors parameters."
19190 #: ../src/guestfs-actions.pod:6587
19191 msgid "See also: C<guestfs_part_add>"
19196 #: ../src/guestfs-actions.pod:6603
19197 msgid "guestfs_sfdisk_disk_geometry"
19202 #: ../src/guestfs-actions.pod:6605
19206 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
19207 " const char *device);\n"
19213 #: ../src/guestfs-actions.pod:6609
19215 "This displays the disk geometry of C<device> read from the partition table. "
19216 "Especially in the case where the underlying block device has been resized, "
19217 "this can be different from the kernel's idea of the geometry (see "
19218 "C<guestfs_sfdisk_kernel_geometry>)."
19223 #: ../src/guestfs-actions.pod:6614 ../src/guestfs-actions.pod:6630
19224 #: ../fish/guestfish-actions.pod:4407 ../fish/guestfish-actions.pod:4416
19225 msgid "The result is in human-readable format, and not designed to be parsed."
19230 #: ../src/guestfs-actions.pod:6622
19231 msgid "guestfs_sfdisk_kernel_geometry"
19236 #: ../src/guestfs-actions.pod:6624
19240 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
19241 " const char *device);\n"
19247 #: ../src/guestfs-actions.pod:6628 ../fish/guestfish-actions.pod:4414
19248 msgid "This displays the kernel's idea of the geometry of C<device>."
19253 #: ../src/guestfs-actions.pod:6638
19254 msgid "guestfs_sfdisk_l"
19259 #: ../src/guestfs-actions.pod:6640
19263 " guestfs_sfdisk_l (guestfs_h *g,\n"
19264 " const char *device);\n"
19270 #: ../src/guestfs-actions.pod:6644 ../fish/guestfish-actions.pod:4423
19272 "This displays the partition table on C<device>, in the human-readable output "
19273 "of the L<sfdisk(8)> command. It is not intended to be parsed."
19278 #: ../src/guestfs-actions.pod:6648
19279 msgid "See also: C<guestfs_part_list>"
19283 #: ../src/guestfs-actions.pod:6653 ../fish/guestfish-actions.pod:4429
19285 "This function is deprecated. In new code, use the C<part_list> call instead."
19290 #: ../src/guestfs-actions.pod:6662
19296 #: ../src/guestfs-actions.pod:6664
19300 " guestfs_sh (guestfs_h *g,\n"
19301 " const char *command);\n"
19307 #: ../src/guestfs-actions.pod:6668 ../fish/guestfish-actions.pod:4440
19309 "This call runs a command from the guest filesystem via the guest's C</bin/"
19315 #: ../src/guestfs-actions.pod:6671
19316 msgid "This is like C<guestfs_command>, but passes the command to:"
19321 #: ../src/guestfs-actions.pod:6673 ../fish/guestfish-actions.pod:4445
19324 " /bin/sh -c \"command\"\n"
19330 #: ../src/guestfs-actions.pod:6675 ../fish/guestfish-actions.pod:4447
19332 "Depending on the guest's shell, this usually results in wildcards being "
19333 "expanded, shell expressions being interpolated and so on."
19338 #: ../src/guestfs-actions.pod:6679
19339 msgid "All the provisos about C<guestfs_command> apply to this call."
19344 #: ../src/guestfs-actions.pod:6686
19345 msgid "guestfs_sh_lines"
19350 #: ../src/guestfs-actions.pod:6688
19354 " guestfs_sh_lines (guestfs_h *g,\n"
19355 " const char *command);\n"
19361 #: ../src/guestfs-actions.pod:6692
19363 "This is the same as C<guestfs_sh>, but splits the result into a list of "
19369 #: ../src/guestfs-actions.pod:6695
19370 msgid "See also: C<guestfs_command_lines>"
19375 #: ../src/guestfs-actions.pod:6703
19376 msgid "guestfs_sleep"
19381 #: ../src/guestfs-actions.pod:6705
19385 " guestfs_sleep (guestfs_h *g,\n"
19392 #: ../src/guestfs-actions.pod:6709 ../fish/guestfish-actions.pod:4466
19393 msgid "Sleep for C<secs> seconds."
19398 #: ../src/guestfs-actions.pod:6713
19399 msgid "(Added in 1.0.41)"
19404 #: ../src/guestfs-actions.pod:6715 ../src/guestfs-structs.pod:109
19405 msgid "guestfs_stat"
19410 #: ../src/guestfs-actions.pod:6717
19413 " struct guestfs_stat *\n"
19414 " guestfs_stat (guestfs_h *g,\n"
19415 " const char *path);\n"
19421 #: ../src/guestfs-actions.pod:6723 ../fish/guestfish-actions.pod:4474
19422 msgid "This is the same as the C<stat(2)> system call."
19427 #: ../src/guestfs-actions.pod:6731 ../src/guestfs-structs.pod:135
19428 msgid "guestfs_statvfs"
19433 #: ../src/guestfs-actions.pod:6733
19436 " struct guestfs_statvfs *\n"
19437 " guestfs_statvfs (guestfs_h *g,\n"
19438 " const char *path);\n"
19444 #: ../src/guestfs-actions.pod:6737 ../fish/guestfish-actions.pod:4480
19446 "Returns file system statistics for any mounted file system. C<path> should "
19447 "be a file or directory in the mounted file system (typically it is the mount "
19448 "point itself, but it doesn't need to be)."
19453 #: ../src/guestfs-actions.pod:6741 ../fish/guestfish-actions.pod:4484
19454 msgid "This is the same as the C<statvfs(2)> system call."
19459 #: ../src/guestfs-actions.pod:6743
19461 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
19462 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
19467 #: ../src/guestfs-actions.pod:6749
19468 msgid "guestfs_strings"
19473 #: ../src/guestfs-actions.pod:6751
19477 " guestfs_strings (guestfs_h *g,\n"
19478 " const char *path);\n"
19484 #: ../src/guestfs-actions.pod:6755 ../fish/guestfish-actions.pod:4490
19486 "This runs the L<strings(1)> command on a file and returns the list of "
19487 "printable strings found."
19492 #: ../src/guestfs-actions.pod:6767
19493 msgid "guestfs_strings_e"
19498 #: ../src/guestfs-actions.pod:6769
19502 " guestfs_strings_e (guestfs_h *g,\n"
19503 " const char *encoding,\n"
19504 " const char *path);\n"
19510 #: ../src/guestfs-actions.pod:6774
19512 "This is like the C<guestfs_strings> command, but allows you to specify the "
19513 "encoding of strings that are looked for in the source file C<path>."
19518 #: ../src/guestfs-actions.pod:6778 ../fish/guestfish-actions.pod:4504
19519 msgid "Allowed encodings are:"
19524 #: ../src/guestfs-actions.pod:6782 ../fish/guestfish-actions.pod:4508
19530 #: ../src/guestfs-actions.pod:6784
19532 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
19533 "ISO-8859-X (this is what C<guestfs_strings> uses)."
19538 #: ../src/guestfs-actions.pod:6787 ../fish/guestfish-actions.pod:4513
19544 #: ../src/guestfs-actions.pod:6789 ../fish/guestfish-actions.pod:4515
19545 msgid "Single 8-bit-byte characters."
19550 #: ../src/guestfs-actions.pod:6791 ../fish/guestfish-actions.pod:4517
19556 #: ../src/guestfs-actions.pod:6793 ../fish/guestfish-actions.pod:4519
19557 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
19562 #: ../src/guestfs-actions.pod:6796 ../fish/guestfish-actions.pod:4522
19563 msgid "l (lower case letter L)"
19568 #: ../src/guestfs-actions.pod:6798 ../fish/guestfish-actions.pod:4524
19570 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
19571 "examining binaries in Windows guests."
19576 #: ../src/guestfs-actions.pod:6801 ../fish/guestfish-actions.pod:4527
19582 #: ../src/guestfs-actions.pod:6803 ../fish/guestfish-actions.pod:4529
19583 msgid "32-bit big endian such as UCS-4BE."
19588 #: ../src/guestfs-actions.pod:6805 ../fish/guestfish-actions.pod:4531
19594 #: ../src/guestfs-actions.pod:6807 ../fish/guestfish-actions.pod:4533
19595 msgid "32-bit little endian such as UCS-4LE."
19600 #: ../src/guestfs-actions.pod:6811 ../fish/guestfish-actions.pod:4537
19601 msgid "The returned strings are transcoded to UTF-8."
19606 #: ../src/guestfs-actions.pod:6822
19607 msgid "guestfs_swapoff_device"
19612 #: ../src/guestfs-actions.pod:6824
19616 " guestfs_swapoff_device (guestfs_h *g,\n"
19617 " const char *device);\n"
19623 #: ../src/guestfs-actions.pod:6828
19625 "This command disables the libguestfs appliance swap device or partition "
19626 "named C<device>. See C<guestfs_swapon_device>."
19631 #: ../src/guestfs-actions.pod:6836
19632 msgid "guestfs_swapoff_file"
19637 #: ../src/guestfs-actions.pod:6838
19641 " guestfs_swapoff_file (guestfs_h *g,\n"
19642 " const char *file);\n"
19648 #: ../src/guestfs-actions.pod:6842 ../fish/guestfish-actions.pod:4554
19649 msgid "This command disables the libguestfs appliance swap on file."
19654 #: ../src/guestfs-actions.pod:6848
19655 msgid "guestfs_swapoff_label"
19660 #: ../src/guestfs-actions.pod:6850
19664 " guestfs_swapoff_label (guestfs_h *g,\n"
19665 " const char *label);\n"
19671 #: ../src/guestfs-actions.pod:6854 ../fish/guestfish-actions.pod:4560
19673 "This command disables the libguestfs appliance swap on labeled swap "
19679 #: ../src/guestfs-actions.pod:6861
19680 msgid "guestfs_swapoff_uuid"
19685 #: ../src/guestfs-actions.pod:6863
19689 " guestfs_swapoff_uuid (guestfs_h *g,\n"
19690 " const char *uuid);\n"
19696 #: ../src/guestfs-actions.pod:6867 ../fish/guestfish-actions.pod:4567
19698 "This command disables the libguestfs appliance swap partition with the given "
19704 #: ../src/guestfs-actions.pod:6874
19705 msgid "guestfs_swapon_device"
19710 #: ../src/guestfs-actions.pod:6876
19714 " guestfs_swapon_device (guestfs_h *g,\n"
19715 " const char *device);\n"
19721 #: ../src/guestfs-actions.pod:6880
19723 "This command enables the libguestfs appliance to use the swap device or "
19724 "partition named C<device>. The increased memory is made available for all "
19725 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
19730 #: ../src/guestfs-actions.pod:6885 ../fish/guestfish-actions.pod:4579
19732 "Note that you should not swap to existing guest swap partitions unless you "
19733 "know what you are doing. They may contain hibernation information, or other "
19734 "information that the guest doesn't want you to trash. You also risk leaking "
19735 "information about the host to the guest this way. Instead, attach a new "
19736 "host device to the guest and swap on that."
19741 #: ../src/guestfs-actions.pod:6896
19742 msgid "guestfs_swapon_file"
19747 #: ../src/guestfs-actions.pod:6898
19751 " guestfs_swapon_file (guestfs_h *g,\n"
19752 " const char *file);\n"
19758 #: ../src/guestfs-actions.pod:6902
19760 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
19766 #: ../src/guestfs-actions.pod:6909
19767 msgid "guestfs_swapon_label"
19772 #: ../src/guestfs-actions.pod:6911
19776 " guestfs_swapon_label (guestfs_h *g,\n"
19777 " const char *label);\n"
19783 #: ../src/guestfs-actions.pod:6915
19785 "This command enables swap to a labeled swap partition. See "
19786 "C<guestfs_swapon_device> for other notes."
19791 #: ../src/guestfs-actions.pod:6922
19792 msgid "guestfs_swapon_uuid"
19797 #: ../src/guestfs-actions.pod:6924
19801 " guestfs_swapon_uuid (guestfs_h *g,\n"
19802 " const char *uuid);\n"
19808 #: ../src/guestfs-actions.pod:6928
19810 "This command enables swap to a swap partition with the given UUID. See "
19811 "C<guestfs_swapon_device> for other notes."
19816 #: ../src/guestfs-actions.pod:6935
19817 msgid "guestfs_sync"
19822 #: ../src/guestfs-actions.pod:6937
19826 " guestfs_sync (guestfs_h *g);\n"
19832 #: ../src/guestfs-actions.pod:6940 ../fish/guestfish-actions.pod:4611
19834 "This syncs the disk, so that any writes are flushed through to the "
19835 "underlying disk image."
19840 #: ../src/guestfs-actions.pod:6943 ../fish/guestfish-actions.pod:4614
19842 "You should always call this if you have modified a disk image, before "
19843 "closing the handle."
19848 #: ../src/guestfs-actions.pod:6950
19849 msgid "guestfs_tail"
19854 #: ../src/guestfs-actions.pod:6952
19858 " guestfs_tail (guestfs_h *g,\n"
19859 " const char *path);\n"
19865 #: ../src/guestfs-actions.pod:6956 ../fish/guestfish-actions.pod:4621
19867 "This command returns up to the last 10 lines of a file as a list of strings."
19872 #: ../src/guestfs-actions.pod:6968
19873 msgid "guestfs_tail_n"
19878 #: ../src/guestfs-actions.pod:6970
19882 " guestfs_tail_n (guestfs_h *g,\n"
19884 " const char *path);\n"
19890 #: ../src/guestfs-actions.pod:6975 ../fish/guestfish-actions.pod:4631
19892 "If the parameter C<nrlines> is a positive number, this returns the last "
19893 "C<nrlines> lines of the file C<path>."
19898 #: ../src/guestfs-actions.pod:6978 ../fish/guestfish-actions.pod:4634
19900 "If the parameter C<nrlines> is a negative number, this returns lines from "
19901 "the file C<path>, starting with the C<-nrlines>th line."
19906 #: ../src/guestfs-actions.pod:6992
19907 msgid "guestfs_tar_in"
19912 #: ../src/guestfs-actions.pod:6994
19916 " guestfs_tar_in (guestfs_h *g,\n"
19917 " const char *tarfile,\n"
19918 " const char *directory);\n"
19924 #: ../src/guestfs-actions.pod:6999 ../fish/guestfish-actions.pod:4646
19926 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
19927 "tar file) into C<directory>."
19932 #: ../src/guestfs-actions.pod:7002
19934 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
19939 #: ../src/guestfs-actions.pod:7007 ../src/guestfs-actions.pod:7024
19940 #: ../src/guestfs-actions.pod:7040 ../src/guestfs-actions.pod:7056
19941 msgid "(Added in 1.0.3)"
19946 #: ../src/guestfs-actions.pod:7009
19947 msgid "guestfs_tar_out"
19952 #: ../src/guestfs-actions.pod:7011
19956 " guestfs_tar_out (guestfs_h *g,\n"
19957 " const char *directory,\n"
19958 " const char *tarfile);\n"
19964 #: ../src/guestfs-actions.pod:7016 ../fish/guestfish-actions.pod:4658
19966 "This command packs the contents of C<directory> and downloads it to local "
19972 #: ../src/guestfs-actions.pod:7019
19974 "To download a compressed tarball, use C<guestfs_tgz_out> or "
19975 "C<guestfs_txz_out>."
19980 #: ../src/guestfs-actions.pod:7026
19981 msgid "guestfs_tgz_in"
19986 #: ../src/guestfs-actions.pod:7028
19990 " guestfs_tgz_in (guestfs_h *g,\n"
19991 " const char *tarball,\n"
19992 " const char *directory);\n"
19998 #: ../src/guestfs-actions.pod:7033 ../fish/guestfish-actions.pod:4670
20000 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
20001 "tar file) into C<directory>."
20006 #: ../src/guestfs-actions.pod:7036
20007 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
20012 #: ../src/guestfs-actions.pod:7042
20013 msgid "guestfs_tgz_out"
20018 #: ../src/guestfs-actions.pod:7044
20022 " guestfs_tgz_out (guestfs_h *g,\n"
20023 " const char *directory,\n"
20024 " const char *tarball);\n"
20030 #: ../src/guestfs-actions.pod:7049 ../fish/guestfish-actions.pod:4681
20032 "This command packs the contents of C<directory> and downloads it to local "
20038 #: ../src/guestfs-actions.pod:7052
20039 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
20044 #: ../src/guestfs-actions.pod:7058
20045 msgid "guestfs_touch"
20050 #: ../src/guestfs-actions.pod:7060
20054 " guestfs_touch (guestfs_h *g,\n"
20055 " const char *path);\n"
20061 #: ../src/guestfs-actions.pod:7064 ../fish/guestfish-actions.pod:4692
20063 "Touch acts like the L<touch(1)> command. It can be used to update the "
20064 "timestamps on a file, or, if the file does not exist, to create a new zero-"
20070 #: ../src/guestfs-actions.pod:7068 ../fish/guestfish-actions.pod:4696
20072 "This command only works on regular files, and will fail on other file types "
20073 "such as directories, symbolic links, block special etc."
20078 #: ../src/guestfs-actions.pod:7075
20079 msgid "guestfs_truncate"
20084 #: ../src/guestfs-actions.pod:7077
20088 " guestfs_truncate (guestfs_h *g,\n"
20089 " const char *path);\n"
20095 #: ../src/guestfs-actions.pod:7081 ../fish/guestfish-actions.pod:4703
20097 "This command truncates C<path> to a zero-length file. The file must exist "
20103 #: ../src/guestfs-actions.pod:7088
20104 msgid "guestfs_truncate_size"
20109 #: ../src/guestfs-actions.pod:7090
20113 " guestfs_truncate_size (guestfs_h *g,\n"
20114 " const char *path,\n"
20115 " int64_t size);\n"
20121 #: ../src/guestfs-actions.pod:7095 ../fish/guestfish-actions.pod:4710
20123 "This command truncates C<path> to size C<size> bytes. The file must exist "
20129 #: ../src/guestfs-actions.pod:7098
20131 "If the current file size is less than C<size> then the file is extended to "
20132 "the required size with zero bytes. This creates a sparse file (ie. disk "
20133 "blocks are not allocated for the file until you write to it). To create a "
20134 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
20139 #: ../src/guestfs-actions.pod:7108
20140 msgid "guestfs_tune2fs_l"
20145 #: ../src/guestfs-actions.pod:7110
20149 " guestfs_tune2fs_l (guestfs_h *g,\n"
20150 " const char *device);\n"
20156 #: ../src/guestfs-actions.pod:7114 ../fish/guestfish-actions.pod:4723
20158 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
20164 #: ../src/guestfs-actions.pod:7117 ../fish/guestfish-actions.pod:4726
20166 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
20167 "for more details. The list of fields returned isn't clearly defined, and "
20168 "depends on both the version of C<tune2fs> that libguestfs was built against, "
20169 "and the filesystem itself."
20174 #: ../src/guestfs-actions.pod:7130
20175 msgid "guestfs_txz_in"
20180 #: ../src/guestfs-actions.pod:7132
20184 " guestfs_txz_in (guestfs_h *g,\n"
20185 " const char *tarball,\n"
20186 " const char *directory);\n"
20192 #: ../src/guestfs-actions.pod:7137 ../fish/guestfish-actions.pod:4735
20194 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
20195 "tar file) into C<directory>."
20200 #: ../src/guestfs-actions.pod:7144
20201 msgid "guestfs_txz_out"
20206 #: ../src/guestfs-actions.pod:7146
20210 " guestfs_txz_out (guestfs_h *g,\n"
20211 " const char *directory,\n"
20212 " const char *tarball);\n"
20218 #: ../src/guestfs-actions.pod:7151 ../fish/guestfish-actions.pod:4744
20220 "This command packs the contents of C<directory> and downloads it to local "
20221 "file C<tarball> (as an xz compressed tar archive)."
20226 #: ../src/guestfs-actions.pod:7158
20227 msgid "guestfs_umask"
20232 #: ../src/guestfs-actions.pod:7160
20236 " guestfs_umask (guestfs_h *g,\n"
20243 #: ../src/guestfs-actions.pod:7164 ../fish/guestfish-actions.pod:4753
20245 "This function sets the mask used for creating new files and device nodes to "
20251 #: ../src/guestfs-actions.pod:7167 ../fish/guestfish-actions.pod:4756
20253 "Typical umask values would be C<022> which creates new files with "
20254 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
20255 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
20260 #: ../src/guestfs-actions.pod:7172 ../fish/guestfish-actions.pod:4761
20262 "The default umask is C<022>. This is important because it means that "
20263 "directories and device nodes will be created with C<0644> or C<0755> mode "
20264 "even if you specify C<0777>."
20269 #: ../src/guestfs-actions.pod:7176
20271 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
20272 "C<guestfs_mkdir>."
20277 #: ../src/guestfs-actions.pod:7179 ../fish/guestfish-actions.pod:4768
20278 msgid "This call returns the previous umask."
20283 #: ../src/guestfs-actions.pod:7185
20284 msgid "guestfs_umount"
20289 #: ../src/guestfs-actions.pod:7187
20293 " guestfs_umount (guestfs_h *g,\n"
20294 " const char *pathordevice);\n"
20300 #: ../src/guestfs-actions.pod:7191 ../fish/guestfish-actions.pod:4776
20302 "This unmounts the given filesystem. The filesystem may be specified either "
20303 "by its mountpoint (path) or the device which contains the filesystem."
20308 #: ../src/guestfs-actions.pod:7199
20309 msgid "guestfs_umount_all"
20314 #: ../src/guestfs-actions.pod:7201
20318 " guestfs_umount_all (guestfs_h *g);\n"
20324 #: ../src/guestfs-actions.pod:7204 ../fish/guestfish-actions.pod:4786
20325 msgid "This unmounts all mounted filesystems."
20330 #: ../src/guestfs-actions.pod:7206 ../fish/guestfish-actions.pod:4788
20331 msgid "Some internal mounts are not unmounted by this call."
20336 #: ../src/guestfs-actions.pod:7212
20337 msgid "guestfs_upload"
20342 #: ../src/guestfs-actions.pod:7214
20346 " guestfs_upload (guestfs_h *g,\n"
20347 " const char *filename,\n"
20348 " const char *remotefilename);\n"
20354 #: ../src/guestfs-actions.pod:7219 ../src/guestfs-actions.pod:7243
20355 #: ../fish/guestfish-actions.pod:4794 ../fish/guestfish-actions.pod:4807
20356 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
20361 #: ../src/guestfs-actions.pod:7224
20362 msgid "See also C<guestfs_download>."
20367 #: ../src/guestfs-actions.pod:7235
20368 msgid "guestfs_upload_offset"
20373 #: ../src/guestfs-actions.pod:7237
20377 " guestfs_upload_offset (guestfs_h *g,\n"
20378 " const char *filename,\n"
20379 " const char *remotefilename,\n"
20380 " int64_t offset);\n"
20386 #: ../src/guestfs-actions.pod:7246 ../fish/guestfish-actions.pod:4810
20388 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
20389 "The intention is to overwrite parts of existing files or devices, although "
20390 "if a non-existant file is specified then it is created with a \"hole\" "
20391 "before C<offset>. The size of the data written is implicit in the size of "
20392 "the source C<filename>."
20397 #: ../src/guestfs-actions.pod:7253
20399 "Note that there is no limit on the amount of data that can be uploaded with "
20400 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
20401 "full amount unless an error occurs."
20406 #: ../src/guestfs-actions.pod:7258
20407 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
20412 #: ../src/guestfs-actions.pod:7269
20413 msgid "guestfs_utimens"
20418 #: ../src/guestfs-actions.pod:7271
20422 " guestfs_utimens (guestfs_h *g,\n"
20423 " const char *path,\n"
20424 " int64_t atsecs,\n"
20425 " int64_t atnsecs,\n"
20426 " int64_t mtsecs,\n"
20427 " int64_t mtnsecs);\n"
20433 #: ../src/guestfs-actions.pod:7279 ../fish/guestfish-actions.pod:4830
20434 msgid "This command sets the timestamps of a file with nanosecond precision."
20439 #: ../src/guestfs-actions.pod:7282 ../fish/guestfish-actions.pod:4833
20441 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
20447 #: ../src/guestfs-actions.pod:7285 ../fish/guestfish-actions.pod:4836
20449 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
20450 "nanoseconds from the epoch."
20455 #: ../src/guestfs-actions.pod:7288 ../fish/guestfish-actions.pod:4839
20457 "If the C<*nsecs> field contains the special value C<-1> then the "
20458 "corresponding timestamp is set to the current time. (The C<*secs> field is "
20459 "ignored in this case)."
20464 #: ../src/guestfs-actions.pod:7292 ../fish/guestfish-actions.pod:4843
20466 "If the C<*nsecs> field contains the special value C<-2> then the "
20467 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
20473 #: ../src/guestfs-actions.pod:7300 ../src/guestfs-structs.pod:175
20474 msgid "guestfs_version"
20479 #: ../src/guestfs-actions.pod:7302
20482 " struct guestfs_version *\n"
20483 " guestfs_version (guestfs_h *g);\n"
20489 #: ../src/guestfs-actions.pod:7305 ../fish/guestfish-actions.pod:4851
20491 "Return the libguestfs version number that the program is linked against."
20496 #: ../src/guestfs-actions.pod:7308 ../fish/guestfish-actions.pod:4854
20498 "Note that because of dynamic linking this is not necessarily the version of "
20499 "libguestfs that you compiled against. You can compile the program, and then "
20500 "at runtime dynamically link against a completely different C<libguestfs.so> "
20506 #: ../src/guestfs-actions.pod:7313 ../fish/guestfish-actions.pod:4859
20508 "This call was added in version C<1.0.58>. In previous versions of "
20509 "libguestfs there was no way to get the version number. From C code you can "
20510 "use dynamic linker functions to find out if this symbol exists (if it "
20511 "doesn't, then it's an earlier version)."
20516 #: ../src/guestfs-actions.pod:7319 ../fish/guestfish-actions.pod:4865
20518 "The call returns a structure with four elements. The first three (C<major>, "
20519 "C<minor> and C<release>) are numbers and correspond to the usual version "
20520 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
20521 "but may be used for distro-specific information."
20526 #: ../src/guestfs-actions.pod:7325 ../fish/guestfish-actions.pod:4871
20528 "To construct the original version string: C<$major.$minor.$release$extra>"
20533 #: ../src/guestfs-actions.pod:7328 ../fish/guestfish-actions.pod:4874
20534 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
20539 #: ../src/guestfs-actions.pod:7330
20541 "I<Note:> Don't use this call to test for availability of features. In "
20542 "enterprise distributions we backport features from later versions into "
20543 "earlier versions, making this an unreliable way to test for features. Use "
20544 "C<guestfs_available> instead."
20549 #: ../src/guestfs-actions.pod:7336
20551 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
20552 "error. I<The caller must call C<guestfs_free_version> after use>."
20557 #: ../src/guestfs-actions.pod:7340
20558 msgid "(Added in 1.0.58)"
20563 #: ../src/guestfs-actions.pod:7342
20564 msgid "guestfs_vfs_label"
20569 #: ../src/guestfs-actions.pod:7344
20573 " guestfs_vfs_label (guestfs_h *g,\n"
20574 " const char *device);\n"
20580 #: ../src/guestfs-actions.pod:7348 ../fish/guestfish-actions.pod:4886
20581 msgid "This returns the filesystem label of the filesystem on C<device>."
20586 #: ../src/guestfs-actions.pod:7351 ../fish/guestfish-actions.pod:4889
20587 msgid "If the filesystem is unlabeled, this returns the empty string."
20592 #: ../src/guestfs-actions.pod:7353
20593 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
20598 #: ../src/guestfs-actions.pod:7358 ../src/guestfs-actions.pod:7395
20599 msgid "(Added in 1.3.18)"
20604 #: ../src/guestfs-actions.pod:7360
20605 msgid "guestfs_vfs_type"
20610 #: ../src/guestfs-actions.pod:7362
20614 " guestfs_vfs_type (guestfs_h *g,\n"
20615 " const char *device);\n"
20621 #: ../src/guestfs-actions.pod:7366 ../fish/guestfish-actions.pod:4897
20623 "This command gets the filesystem type corresponding to the filesystem on "
20629 #: ../src/guestfs-actions.pod:7369 ../fish/guestfish-actions.pod:4900
20631 "For most filesystems, the result is the name of the Linux VFS module which "
20632 "would be used to mount this filesystem if you mounted it without specifying "
20633 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
20638 #: ../src/guestfs-actions.pod:7379
20639 msgid "guestfs_vfs_uuid"
20644 #: ../src/guestfs-actions.pod:7381
20648 " guestfs_vfs_uuid (guestfs_h *g,\n"
20649 " const char *device);\n"
20655 #: ../src/guestfs-actions.pod:7385 ../fish/guestfish-actions.pod:4909
20656 msgid "This returns the filesystem UUID of the filesystem on C<device>."
20661 #: ../src/guestfs-actions.pod:7388 ../fish/guestfish-actions.pod:4912
20662 msgid "If the filesystem does not have a UUID, this returns the empty string."
20667 #: ../src/guestfs-actions.pod:7390
20668 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
20673 #: ../src/guestfs-actions.pod:7397
20674 msgid "guestfs_vg_activate"
20679 #: ../src/guestfs-actions.pod:7399
20683 " guestfs_vg_activate (guestfs_h *g,\n"
20685 " char *const *volgroups);\n"
20690 #: ../src/guestfs-actions.pod:7404 ../fish/guestfish-actions.pod:4920
20692 "This command activates or (if C<activate> is false) deactivates all logical "
20693 "volumes in the listed volume groups C<volgroups>."
20698 #: ../src/guestfs-actions.pod:7407 ../fish/guestfish-actions.pod:4923
20699 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
20704 #: ../src/guestfs-actions.pod:7409 ../fish/guestfish-actions.pod:4925
20706 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
20707 "activated or deactivated."
20712 #: ../src/guestfs-actions.pod:7416
20713 msgid "guestfs_vg_activate_all"
20718 #: ../src/guestfs-actions.pod:7418
20722 " guestfs_vg_activate_all (guestfs_h *g,\n"
20723 " int activate);\n"
20728 #: ../src/guestfs-actions.pod:7422 ../fish/guestfish-actions.pod:4932
20730 "This command activates or (if C<activate> is false) deactivates all logical "
20731 "volumes in all volume groups."
20736 #: ../src/guestfs-actions.pod:7425 ../fish/guestfish-actions.pod:4935
20737 msgid "This command is the same as running C<vgchange -a y|n>"
20742 #: ../src/guestfs-actions.pod:7431
20743 msgid "guestfs_vgcreate"
20748 #: ../src/guestfs-actions.pod:7433
20752 " guestfs_vgcreate (guestfs_h *g,\n"
20753 " const char *volgroup,\n"
20754 " char *const *physvols);\n"
20760 #: ../src/guestfs-actions.pod:7438 ../fish/guestfish-actions.pod:4941
20762 "This creates an LVM volume group called C<volgroup> from the non-empty list "
20763 "of physical volumes C<physvols>."
20768 #: ../src/guestfs-actions.pod:7445
20769 msgid "guestfs_vglvuuids"
20774 #: ../src/guestfs-actions.pod:7447
20778 " guestfs_vglvuuids (guestfs_h *g,\n"
20779 " const char *vgname);\n"
20785 #: ../src/guestfs-actions.pod:7451 ../fish/guestfish-actions.pod:4948
20787 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
20788 "volumes created in this volume group."
20793 #: ../src/guestfs-actions.pod:7454
20795 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
20796 "associate logical volumes and volume groups."
20801 #: ../src/guestfs-actions.pod:7457
20802 msgid "See also C<guestfs_vgpvuuids>."
20807 #: ../src/guestfs-actions.pod:7465
20808 msgid "guestfs_vgpvuuids"
20813 #: ../src/guestfs-actions.pod:7467
20817 " guestfs_vgpvuuids (guestfs_h *g,\n"
20818 " const char *vgname);\n"
20824 #: ../src/guestfs-actions.pod:7471 ../fish/guestfish-actions.pod:4960
20826 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
20827 "volumes that this volume group resides on."
20832 #: ../src/guestfs-actions.pod:7474
20834 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
20835 "associate physical volumes and volume groups."
20840 #: ../src/guestfs-actions.pod:7477
20841 msgid "See also C<guestfs_vglvuuids>."
20846 #: ../src/guestfs-actions.pod:7485
20847 msgid "guestfs_vgremove"
20852 #: ../src/guestfs-actions.pod:7487
20856 " guestfs_vgremove (guestfs_h *g,\n"
20857 " const char *vgname);\n"
20863 #: ../src/guestfs-actions.pod:7491 ../fish/guestfish-actions.pod:4972
20864 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
20869 #: ../src/guestfs-actions.pod:7493 ../fish/guestfish-actions.pod:4974
20871 "This also forcibly removes all logical volumes in the volume group (if any)."
20876 #: ../src/guestfs-actions.pod:7500
20877 msgid "guestfs_vgrename"
20882 #: ../src/guestfs-actions.pod:7502
20886 " guestfs_vgrename (guestfs_h *g,\n"
20887 " const char *volgroup,\n"
20888 " const char *newvolgroup);\n"
20894 #: ../src/guestfs-actions.pod:7507 ../fish/guestfish-actions.pod:4981
20895 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
20900 #: ../src/guestfs-actions.pod:7513
20901 msgid "guestfs_vgs"
20906 #: ../src/guestfs-actions.pod:7515
20910 " guestfs_vgs (guestfs_h *g);\n"
20916 #: ../src/guestfs-actions.pod:7518 ../fish/guestfish-actions.pod:4987
20918 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
20924 #: ../src/guestfs-actions.pod:7521 ../fish/guestfish-actions.pod:4990
20926 "This returns a list of just the volume group names that were detected (eg. "
20932 #: ../src/guestfs-actions.pod:7524
20933 msgid "See also C<guestfs_vgs_full>."
20938 #: ../src/guestfs-actions.pod:7532
20939 msgid "guestfs_vgs_full"
20944 #: ../src/guestfs-actions.pod:7534
20947 " struct guestfs_lvm_vg_list *\n"
20948 " guestfs_vgs_full (guestfs_h *g);\n"
20954 #: ../src/guestfs-actions.pod:7537 ../fish/guestfish-actions.pod:4999
20956 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
20957 "> command. The \"full\" version includes all fields."
20962 #: ../src/guestfs-actions.pod:7540
20964 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
20965 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after use>."
20970 #: ../src/guestfs-actions.pod:7546
20971 msgid "guestfs_vgscan"
20976 #: ../src/guestfs-actions.pod:7548
20980 " guestfs_vgscan (guestfs_h *g);\n"
20986 #: ../src/guestfs-actions.pod:7551 ../fish/guestfish-actions.pod:5006
20988 "This rescans all block devices and rebuilds the list of LVM physical "
20989 "volumes, volume groups and logical volumes."
20994 #: ../src/guestfs-actions.pod:7558
20995 msgid "guestfs_vguuid"
21000 #: ../src/guestfs-actions.pod:7560
21004 " guestfs_vguuid (guestfs_h *g,\n"
21005 " const char *vgname);\n"
21011 #: ../src/guestfs-actions.pod:7564 ../fish/guestfish-actions.pod:5013
21012 msgid "This command returns the UUID of the LVM VG named C<vgname>."
21017 #: ../src/guestfs-actions.pod:7571
21018 msgid "guestfs_wait_ready"
21023 #: ../src/guestfs-actions.pod:7573
21027 " guestfs_wait_ready (guestfs_h *g);\n"
21033 #: ../src/guestfs-actions.pod:7576
21034 msgid "This function is a no op."
21039 #: ../src/guestfs-actions.pod:7578
21041 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
21042 "calling C<guestfs_launch> to wait for the launch to complete. However this "
21043 "is no longer necessary because C<guestfs_launch> now does the waiting."
21048 #: ../src/guestfs-actions.pod:7583
21050 "If you see any calls to this function in code then you can just remove them, "
21051 "unless you want to retain compatibility with older versions of the API."
21055 #: ../src/guestfs-actions.pod:7589
21057 "This function is deprecated. In new code, use the C<launch> call instead."
21062 #: ../src/guestfs-actions.pod:7598
21063 msgid "guestfs_wc_c"
21068 #: ../src/guestfs-actions.pod:7600
21072 " guestfs_wc_c (guestfs_h *g,\n"
21073 " const char *path);\n"
21079 #: ../src/guestfs-actions.pod:7604 ../fish/guestfish-actions.pod:5019
21081 "This command counts the characters in a file, using the C<wc -c> external "
21087 #: ../src/guestfs-actions.pod:7611
21088 msgid "guestfs_wc_l"
21093 #: ../src/guestfs-actions.pod:7613
21097 " guestfs_wc_l (guestfs_h *g,\n"
21098 " const char *path);\n"
21104 #: ../src/guestfs-actions.pod:7617 ../fish/guestfish-actions.pod:5026
21106 "This command counts the lines in a file, using the C<wc -l> external command."
21111 #: ../src/guestfs-actions.pod:7624
21112 msgid "guestfs_wc_w"
21117 #: ../src/guestfs-actions.pod:7626
21121 " guestfs_wc_w (guestfs_h *g,\n"
21122 " const char *path);\n"
21128 #: ../src/guestfs-actions.pod:7630 ../fish/guestfish-actions.pod:5033
21130 "This command counts the words in a file, using the C<wc -w> external command."
21135 #: ../src/guestfs-actions.pod:7637
21136 msgid "guestfs_write"
21141 #: ../src/guestfs-actions.pod:7639
21145 " guestfs_write (guestfs_h *g,\n"
21146 " const char *path,\n"
21147 " const char *content,\n"
21148 " size_t content_size);\n"
21154 #: ../src/guestfs-actions.pod:7645 ../fish/guestfish-actions.pod:5040
21156 "This call creates a file called C<path>. The content of the file is the "
21157 "string C<content> (which can contain any 8 bit data)."
21161 #: ../src/guestfs-actions.pod:7648
21162 msgid "See also C<guestfs_write_append>."
21166 #: ../src/guestfs-actions.pod:7657
21167 msgid "guestfs_write_append"
21171 #: ../src/guestfs-actions.pod:7659
21175 " guestfs_write_append (guestfs_h *g,\n"
21176 " const char *path,\n"
21177 " const char *content,\n"
21178 " size_t content_size);\n"
21183 #: ../src/guestfs-actions.pod:7665 ../fish/guestfish-actions.pod:5052
21185 "This call appends C<content> to the end of file C<path>. If C<path> does "
21186 "not exist, then a new file is created."
21190 #: ../src/guestfs-actions.pod:7668
21191 msgid "See also C<guestfs_write>."
21196 #: ../src/guestfs-actions.pod:7675
21197 msgid "guestfs_write_file"
21202 #: ../src/guestfs-actions.pod:7677
21206 " guestfs_write_file (guestfs_h *g,\n"
21207 " const char *path,\n"
21208 " const char *content,\n"
21215 #: ../src/guestfs-actions.pod:7683 ../fish/guestfish-actions.pod:5064
21217 "This call creates a file called C<path>. The contents of the file is the "
21218 "string C<content> (which can contain any 8 bit data), with length C<size>."
21223 #: ../src/guestfs-actions.pod:7687 ../fish/guestfish-actions.pod:5068
21225 "As a special case, if C<size> is C<0> then the length is calculated using "
21226 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
21231 #: ../src/guestfs-actions.pod:7691 ../fish/guestfish-actions.pod:5072
21233 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
21234 "I<not> work, even if the length is specified."
21239 #: ../src/guestfs-actions.pod:7699 ../fish/guestfish-actions.pod:5078
21241 "This function is deprecated. In new code, use the C<write> call instead."
21246 #: ../src/guestfs-actions.pod:7708
21247 msgid "guestfs_zegrep"
21252 #: ../src/guestfs-actions.pod:7710
21256 " guestfs_zegrep (guestfs_h *g,\n"
21257 " const char *regex,\n"
21258 " const char *path);\n"
21264 #: ../src/guestfs-actions.pod:7715 ../fish/guestfish-actions.pod:5089
21266 "This calls the external C<zegrep> program and returns the matching lines."
21271 #: ../src/guestfs-actions.pod:7727
21272 msgid "guestfs_zegrepi"
21277 #: ../src/guestfs-actions.pod:7729
21281 " guestfs_zegrepi (guestfs_h *g,\n"
21282 " const char *regex,\n"
21283 " const char *path);\n"
21289 #: ../src/guestfs-actions.pod:7734 ../fish/guestfish-actions.pod:5099
21291 "This calls the external C<zegrep -i> program and returns the matching lines."
21296 #: ../src/guestfs-actions.pod:7746
21297 msgid "guestfs_zero"
21302 #: ../src/guestfs-actions.pod:7748
21306 " guestfs_zero (guestfs_h *g,\n"
21307 " const char *device);\n"
21313 #: ../src/guestfs-actions.pod:7752 ../fish/guestfish-actions.pod:5109
21314 msgid "This command writes zeroes over the first few blocks of C<device>."
21319 #: ../src/guestfs-actions.pod:7754 ../fish/guestfish-actions.pod:5111
21321 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
21322 "securely wipe the device). It should be sufficient to remove any partition "
21323 "tables, filesystem superblocks and so on."
21327 #: ../src/guestfs-actions.pod:7758
21329 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
21330 "C<guestfs_is_zero_device>"
21335 #: ../src/guestfs-actions.pod:7770
21336 msgid "guestfs_zero_device"
21341 #: ../src/guestfs-actions.pod:7772
21345 " guestfs_zero_device (guestfs_h *g,\n"
21346 " const char *device);\n"
21352 #: ../src/guestfs-actions.pod:7776
21354 "This command writes zeroes over the entire C<device>. Compare with "
21355 "C<guestfs_zero> which just zeroes the first few blocks of a device."
21360 #: ../src/guestfs-actions.pod:7790
21361 msgid "(Added in 1.3.1)"
21366 #: ../src/guestfs-actions.pod:7792
21367 msgid "guestfs_zerofree"
21372 #: ../src/guestfs-actions.pod:7794
21376 " guestfs_zerofree (guestfs_h *g,\n"
21377 " const char *device);\n"
21383 #: ../src/guestfs-actions.pod:7798 ../fish/guestfish-actions.pod:5133
21385 "This runs the I<zerofree> program on C<device>. This program claims to zero "
21386 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
21387 "possible to compress the filesystem more effectively."
21392 #: ../src/guestfs-actions.pod:7803 ../fish/guestfish-actions.pod:5138
21393 msgid "You should B<not> run this program if the filesystem is mounted."
21398 #: ../src/guestfs-actions.pod:7806 ../fish/guestfish-actions.pod:5141
21400 "It is possible that using this program can damage the filesystem or data on "
21406 #: ../src/guestfs-actions.pod:7813
21407 msgid "guestfs_zfgrep"
21412 #: ../src/guestfs-actions.pod:7815
21416 " guestfs_zfgrep (guestfs_h *g,\n"
21417 " const char *pattern,\n"
21418 " const char *path);\n"
21424 #: ../src/guestfs-actions.pod:7820 ../fish/guestfish-actions.pod:5148
21426 "This calls the external C<zfgrep> program and returns the matching lines."
21431 #: ../src/guestfs-actions.pod:7832
21432 msgid "guestfs_zfgrepi"
21437 #: ../src/guestfs-actions.pod:7834
21441 " guestfs_zfgrepi (guestfs_h *g,\n"
21442 " const char *pattern,\n"
21443 " const char *path);\n"
21449 #: ../src/guestfs-actions.pod:7839 ../fish/guestfish-actions.pod:5158
21451 "This calls the external C<zfgrep -i> program and returns the matching lines."
21456 #: ../src/guestfs-actions.pod:7851
21457 msgid "guestfs_zfile"
21462 #: ../src/guestfs-actions.pod:7853
21466 " guestfs_zfile (guestfs_h *g,\n"
21467 " const char *meth,\n"
21468 " const char *path);\n"
21474 #: ../src/guestfs-actions.pod:7858 ../fish/guestfish-actions.pod:5168
21476 "This command runs C<file> after first decompressing C<path> using C<method>."
21481 #: ../src/guestfs-actions.pod:7861 ../fish/guestfish-actions.pod:5171
21482 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
21487 #: ../src/guestfs-actions.pod:7863
21489 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
21495 #: ../src/guestfs-actions.pod:7869 ../fish/guestfish-actions.pod:5176
21497 "This function is deprecated. In new code, use the C<file> call instead."
21502 #: ../src/guestfs-actions.pod:7878
21503 msgid "guestfs_zgrep"
21508 #: ../src/guestfs-actions.pod:7880
21512 " guestfs_zgrep (guestfs_h *g,\n"
21513 " const char *regex,\n"
21514 " const char *path);\n"
21520 #: ../src/guestfs-actions.pod:7885 ../fish/guestfish-actions.pod:5187
21522 "This calls the external C<zgrep> program and returns the matching lines."
21527 #: ../src/guestfs-actions.pod:7897
21528 msgid "guestfs_zgrepi"
21533 #: ../src/guestfs-actions.pod:7899
21537 " guestfs_zgrepi (guestfs_h *g,\n"
21538 " const char *regex,\n"
21539 " const char *path);\n"
21545 #: ../src/guestfs-actions.pod:7904 ../fish/guestfish-actions.pod:5197
21547 "This calls the external C<zgrep -i> program and returns the matching lines."
21552 #: ../src/guestfs-availability.pod:3
21558 #: ../src/guestfs-availability.pod:5
21560 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
21561 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
21562 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
21563 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
21564 "L</guestfs_aug_save> L</guestfs_aug_set>"
21568 #: ../src/guestfs-availability.pod:21
21573 #: ../src/guestfs-availability.pod:23
21574 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
21579 #: ../src/guestfs-availability.pod:26
21585 #: ../src/guestfs-availability.pod:28
21587 "The following functions: L</guestfs_inotify_add_watch> L</"
21588 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
21589 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
21594 #: ../src/guestfs-availability.pod:36
21595 msgid "B<linuxfsuuid>"
21600 #: ../src/guestfs-availability.pod:38
21602 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
21603 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
21608 #: ../src/guestfs-availability.pod:45
21609 msgid "B<linuxmodules>"
21614 #: ../src/guestfs-availability.pod:47
21615 msgid "The following functions: L</guestfs_modprobe>"
21620 #: ../src/guestfs-availability.pod:50
21621 msgid "B<linuxxattrs>"
21626 #: ../src/guestfs-availability.pod:52
21628 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> L</"
21629 "guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> L</"
21630 "guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> L</"
21631 "guestfs_setxattr>"
21636 #: ../src/guestfs-availability.pod:63
21642 #: ../src/guestfs-availability.pod:65
21644 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
21645 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
21646 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
21651 #: ../src/guestfs-availability.pod:74
21657 #: ../src/guestfs-availability.pod:76
21659 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
21660 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
21661 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
21662 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
21663 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
21664 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
21665 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
21670 #: ../src/guestfs-availability.pod:99
21676 #: ../src/guestfs-availability.pod:101
21678 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
21679 "guestfs_mknod_b> L</guestfs_mknod_c>"
21684 #: ../src/guestfs-availability.pod:107
21690 #: ../src/guestfs-availability.pod:109
21691 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
21696 #: ../src/guestfs-availability.pod:112
21697 msgid "B<ntfsprogs>"
21701 #: ../src/guestfs-availability.pod:114
21703 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
21704 "L</guestfs_ntfsresize_size>"
21709 #: ../src/guestfs-availability.pod:119
21710 msgid "B<realpath>"
21715 #: ../src/guestfs-availability.pod:121
21716 msgid "The following functions: L</guestfs_realpath>"
21721 #: ../src/guestfs-availability.pod:124
21727 #: ../src/guestfs-availability.pod:126
21729 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
21730 "guestfs_scrub_freespace>"
21735 #: ../src/guestfs-availability.pod:131
21741 #: ../src/guestfs-availability.pod:133
21742 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
21747 #: ../src/guestfs-availability.pod:137
21753 #: ../src/guestfs-availability.pod:139
21754 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
21759 #: ../src/guestfs-availability.pod:143
21760 msgid "B<zerofree>"
21765 #: ../src/guestfs-availability.pod:145
21766 msgid "The following functions: L</guestfs_zerofree>"
21771 #: ../src/guestfs-structs.pod:1
21772 msgid "guestfs_int_bool"
21777 #: ../src/guestfs-structs.pod:3
21780 " struct guestfs_int_bool {\n"
21789 #: ../src/guestfs-structs.pod:8
21792 " struct guestfs_int_bool_list {\n"
21793 " uint32_t len; /* Number of elements in list. */\n"
21794 " struct guestfs_int_bool *val; /* Elements. */\n"
21801 #: ../src/guestfs-structs.pod:13
21804 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
21805 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
21811 #: ../src/guestfs-structs.pod:16
21812 msgid "guestfs_lvm_pv"
21817 #: ../src/guestfs-structs.pod:18
21820 " struct guestfs_lvm_pv {\n"
21821 " char *pv_name;\n"
21822 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
21823 " char pv_uuid[32];\n"
21825 " uint64_t pv_size;\n"
21826 " uint64_t dev_size;\n"
21827 " uint64_t pv_free;\n"
21828 " uint64_t pv_used;\n"
21829 " char *pv_attr;\n"
21830 " int64_t pv_pe_count;\n"
21831 " int64_t pv_pe_alloc_count;\n"
21832 " char *pv_tags;\n"
21833 " uint64_t pe_start;\n"
21834 " int64_t pv_mda_count;\n"
21835 " uint64_t pv_mda_free;\n"
21842 #: ../src/guestfs-structs.pod:36
21845 " struct guestfs_lvm_pv_list {\n"
21846 " uint32_t len; /* Number of elements in list. */\n"
21847 " struct guestfs_lvm_pv *val; /* Elements. */\n"
21854 #: ../src/guestfs-structs.pod:41
21857 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
21858 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
21864 #: ../src/guestfs-structs.pod:44
21865 msgid "guestfs_lvm_vg"
21870 #: ../src/guestfs-structs.pod:46
21873 " struct guestfs_lvm_vg {\n"
21874 " char *vg_name;\n"
21875 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
21876 " char vg_uuid[32];\n"
21878 " char *vg_attr;\n"
21879 " uint64_t vg_size;\n"
21880 " uint64_t vg_free;\n"
21881 " char *vg_sysid;\n"
21882 " uint64_t vg_extent_size;\n"
21883 " int64_t vg_extent_count;\n"
21884 " int64_t vg_free_count;\n"
21885 " int64_t max_lv;\n"
21886 " int64_t max_pv;\n"
21887 " int64_t pv_count;\n"
21888 " int64_t lv_count;\n"
21889 " int64_t snap_count;\n"
21890 " int64_t vg_seqno;\n"
21891 " char *vg_tags;\n"
21892 " int64_t vg_mda_count;\n"
21893 " uint64_t vg_mda_free;\n"
21900 #: ../src/guestfs-structs.pod:69
21903 " struct guestfs_lvm_vg_list {\n"
21904 " uint32_t len; /* Number of elements in list. */\n"
21905 " struct guestfs_lvm_vg *val; /* Elements. */\n"
21912 #: ../src/guestfs-structs.pod:74
21915 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
21916 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
21922 #: ../src/guestfs-structs.pod:77
21923 msgid "guestfs_lvm_lv"
21928 #: ../src/guestfs-structs.pod:79
21931 " struct guestfs_lvm_lv {\n"
21932 " char *lv_name;\n"
21933 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
21934 " char lv_uuid[32];\n"
21935 " char *lv_attr;\n"
21936 " int64_t lv_major;\n"
21937 " int64_t lv_minor;\n"
21938 " int64_t lv_kernel_major;\n"
21939 " int64_t lv_kernel_minor;\n"
21940 " uint64_t lv_size;\n"
21941 " int64_t seg_count;\n"
21943 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
21944 " float snap_percent;\n"
21945 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
21946 " float copy_percent;\n"
21947 " char *move_pv;\n"
21948 " char *lv_tags;\n"
21949 " char *mirror_log;\n"
21950 " char *modules;\n"
21957 #: ../src/guestfs-structs.pod:101
21960 " struct guestfs_lvm_lv_list {\n"
21961 " uint32_t len; /* Number of elements in list. */\n"
21962 " struct guestfs_lvm_lv *val; /* Elements. */\n"
21969 #: ../src/guestfs-structs.pod:106
21972 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
21973 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
21979 #: ../src/guestfs-structs.pod:111
21982 " struct guestfs_stat {\n"
21986 " int64_t nlink;\n"
21991 " int64_t blksize;\n"
21992 " int64_t blocks;\n"
21993 " int64_t atime;\n"
21994 " int64_t mtime;\n"
21995 " int64_t ctime;\n"
22002 #: ../src/guestfs-structs.pod:127
22005 " struct guestfs_stat_list {\n"
22006 " uint32_t len; /* Number of elements in list. */\n"
22007 " struct guestfs_stat *val; /* Elements. */\n"
22014 #: ../src/guestfs-structs.pod:132
22017 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
22018 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
22024 #: ../src/guestfs-structs.pod:137
22027 " struct guestfs_statvfs {\n"
22028 " int64_t bsize;\n"
22029 " int64_t frsize;\n"
22030 " int64_t blocks;\n"
22031 " int64_t bfree;\n"
22032 " int64_t bavail;\n"
22033 " int64_t files;\n"
22034 " int64_t ffree;\n"
22035 " int64_t favail;\n"
22038 " int64_t namemax;\n"
22045 #: ../src/guestfs-structs.pod:151
22048 " struct guestfs_statvfs_list {\n"
22049 " uint32_t len; /* Number of elements in list. */\n"
22050 " struct guestfs_statvfs *val; /* Elements. */\n"
22057 #: ../src/guestfs-structs.pod:156
22060 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
22061 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
22067 #: ../src/guestfs-structs.pod:159
22068 msgid "guestfs_dirent"
22073 #: ../src/guestfs-structs.pod:161
22076 " struct guestfs_dirent {\n"
22086 #: ../src/guestfs-structs.pod:167
22089 " struct guestfs_dirent_list {\n"
22090 " uint32_t len; /* Number of elements in list. */\n"
22091 " struct guestfs_dirent *val; /* Elements. */\n"
22098 #: ../src/guestfs-structs.pod:172
22101 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
22102 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
22108 #: ../src/guestfs-structs.pod:177
22111 " struct guestfs_version {\n"
22112 " int64_t major;\n"
22113 " int64_t minor;\n"
22114 " int64_t release;\n"
22122 #: ../src/guestfs-structs.pod:184
22125 " struct guestfs_version_list {\n"
22126 " uint32_t len; /* Number of elements in list. */\n"
22127 " struct guestfs_version *val; /* Elements. */\n"
22134 #: ../src/guestfs-structs.pod:189
22137 " void guestfs_free_version (struct guestfs_free_version *);\n"
22138 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
22144 #: ../src/guestfs-structs.pod:192
22145 msgid "guestfs_xattr"
22150 #: ../src/guestfs-structs.pod:194
22153 " struct guestfs_xattr {\n"
22154 " char *attrname;\n"
22155 " /* The next two fields describe a byte array. */\n"
22156 " uint32_t attrval_len;\n"
22157 " char *attrval;\n"
22164 #: ../src/guestfs-structs.pod:201
22167 " struct guestfs_xattr_list {\n"
22168 " uint32_t len; /* Number of elements in list. */\n"
22169 " struct guestfs_xattr *val; /* Elements. */\n"
22176 #: ../src/guestfs-structs.pod:206
22179 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
22180 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
22186 #: ../src/guestfs-structs.pod:209
22187 msgid "guestfs_inotify_event"
22192 #: ../src/guestfs-structs.pod:211
22195 " struct guestfs_inotify_event {\n"
22196 " int64_t in_wd;\n"
22197 " uint32_t in_mask;\n"
22198 " uint32_t in_cookie;\n"
22199 " char *in_name;\n"
22206 #: ../src/guestfs-structs.pod:218
22209 " struct guestfs_inotify_event_list {\n"
22210 " uint32_t len; /* Number of elements in list. */\n"
22211 " struct guestfs_inotify_event *val; /* Elements. */\n"
22218 #: ../src/guestfs-structs.pod:223
22221 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
22222 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
22228 #: ../src/guestfs-structs.pod:226
22229 msgid "guestfs_partition"
22234 #: ../src/guestfs-structs.pod:228
22237 " struct guestfs_partition {\n"
22238 " int32_t part_num;\n"
22239 " uint64_t part_start;\n"
22240 " uint64_t part_end;\n"
22241 " uint64_t part_size;\n"
22248 #: ../src/guestfs-structs.pod:235
22251 " struct guestfs_partition_list {\n"
22252 " uint32_t len; /* Number of elements in list. */\n"
22253 " struct guestfs_partition *val; /* Elements. */\n"
22260 #: ../src/guestfs-structs.pod:240
22263 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
22264 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
22270 #: ../src/guestfs-structs.pod:243
22271 msgid "guestfs_application"
22276 #: ../src/guestfs-structs.pod:245
22279 " struct guestfs_application {\n"
22280 " char *app_name;\n"
22281 " char *app_display_name;\n"
22282 " int32_t app_epoch;\n"
22283 " char *app_version;\n"
22284 " char *app_release;\n"
22285 " char *app_install_path;\n"
22286 " char *app_trans_path;\n"
22287 " char *app_publisher;\n"
22288 " char *app_url;\n"
22289 " char *app_source_package;\n"
22290 " char *app_summary;\n"
22291 " char *app_description;\n"
22298 #: ../src/guestfs-structs.pod:260
22301 " struct guestfs_application_list {\n"
22302 " uint32_t len; /* Number of elements in list. */\n"
22303 " struct guestfs_application *val; /* Elements. */\n"
22310 #: ../src/guestfs-structs.pod:265
22313 " void guestfs_free_application (struct guestfs_free_application *);\n"
22314 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
22320 #: ../fish/guestfish.pod:5
22321 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
22326 #: ../fish/guestfish.pod:9
22329 " guestfish [--options] [commands]\n"
22335 #: ../fish/guestfish.pod:11
22344 #: ../fish/guestfish.pod:13
22347 " guestfish [--ro|--rw] -a disk.img\n"
22353 #: ../fish/guestfish.pod:15
22356 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
22362 #: ../fish/guestfish.pod:17
22365 " guestfish -d libvirt-domain\n"
22371 #: ../fish/guestfish.pod:19
22374 " guestfish [--ro|--rw] -a disk.img -i\n"
22380 #: ../fish/guestfish.pod:21
22383 " guestfish -d libvirt-domain -i\n"
22389 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:15
22390 #: ../tools/virt-win-reg.pl:51 ../tools/virt-tar.pl:64
22396 #: ../fish/guestfish.pod:25
22398 "Using guestfish in read/write mode on live virtual machines can be "
22399 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
22400 "option to use guestfish safely if the disk image or virtual machine might be "
22406 #: ../fish/guestfish.pod:32
22408 "Guestfish is a shell and command-line tool for examining and modifying "
22409 "virtual machine filesystems. It uses libguestfs and exposes all of the "
22410 "functionality of the guestfs API, see L<guestfs(3)>."
22415 #: ../fish/guestfish.pod:36
22417 "Guestfish gives you structured access to the libguestfs API, from shell "
22418 "scripts or the command line or interactively. If you want to rescue a "
22419 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
22425 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:1007
22426 #: ../fuse/guestmount.pod:39 ../tools/virt-tar.pl:50
22432 #: ../fish/guestfish.pod:43
22433 msgid "As an interactive shell"
22438 #: ../fish/guestfish.pod:45
22447 #: ../fish/guestfish.pod:47
22450 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
22451 " editing virtual machine filesystems.\n"
22457 #: ../fish/guestfish.pod:50
22460 " Type: 'help' for a list of commands\n"
22461 " 'man' to read the manual\n"
22462 " 'quit' to quit the shell\n"
22468 #: ../fish/guestfish.pod:54
22471 " ><fs> add-ro disk.img\n"
22473 " ><fs> list-filesystems\n"
22474 " /dev/sda1: ext4\n"
22475 " /dev/vg_guest/lv_root: ext4\n"
22476 " /dev/vg_guest/lv_swap: swap\n"
22477 " ><fs> mount /dev/vg_guest/lv_root /\n"
22478 " ><fs> cat /etc/fstab\n"
22480 " # Created by anaconda\n"
22488 #: ../fish/guestfish.pod:67
22489 msgid "From shell scripts"
22494 #: ../fish/guestfish.pod:69
22495 msgid "Create a new C</etc/motd> file in a guest or disk image:"
22500 #: ../fish/guestfish.pod:71
22503 " guestfish <<_EOF_\n"
22506 " mount /dev/vg_guest/lv_root /\n"
22507 " write /etc/motd \"Welcome, new users\"\n"
22514 #: ../fish/guestfish.pod:78
22515 msgid "List the LVM logical volumes in a disk image:"
22520 #: ../fish/guestfish.pod:80
22523 " guestfish -a disk.img --ro <<_EOF_\n"
22532 #: ../fish/guestfish.pod:85
22533 msgid "List all the filesystems in a disk image:"
22538 #: ../fish/guestfish.pod:87
22541 " guestfish -a disk.img --ro <<_EOF_\n"
22543 " list-filesystems\n"
22550 #: ../fish/guestfish.pod:92
22551 msgid "On one command line"
22556 #: ../fish/guestfish.pod:94
22557 msgid "Update C</etc/resolv.conf> in a guest:"
22562 #: ../fish/guestfish.pod:96
22566 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
22567 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
22573 #: ../fish/guestfish.pod:100
22574 msgid "Edit C</boot/grub/grub.conf> interactively:"
22579 #: ../fish/guestfish.pod:102
22582 " guestfish --rw --add disk.img \\\n"
22583 " --mount /dev/vg_guest/lv_root \\\n"
22584 " --mount /dev/sda1:/boot \\\n"
22585 " edit /boot/grub/grub.conf\n"
22591 #: ../fish/guestfish.pod:107
22592 msgid "Mount disks automatically"
22597 #: ../fish/guestfish.pod:109
22599 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
22604 #: ../fish/guestfish.pod:112
22607 " guestfish --ro -a disk.img -i cat /etc/group\n"
22613 #: ../fish/guestfish.pod:114
22616 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
22622 #: ../fish/guestfish.pod:116
22623 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
22628 #: ../fish/guestfish.pod:118
22631 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
22637 #: ../fish/guestfish.pod:120
22638 msgid "As a script interpreter"
22643 #: ../fish/guestfish.pod:122
22644 msgid "Create a 100MB disk containing an ext2-formatted partition:"
22649 #: ../fish/guestfish.pod:124
22652 " #!/usr/bin/guestfish -f\n"
22653 " sparse test1.img 100M\n"
22655 " part-disk /dev/sda mbr\n"
22656 " mkfs ext2 /dev/sda1\n"
22662 #: ../fish/guestfish.pod:130
22663 msgid "Start with a prepared disk"
22668 #: ../fish/guestfish.pod:132
22670 "An alternate way to create a 100MB disk called C<test1.img> containing a "
22671 "single ext2-formatted partition:"
22676 #: ../fish/guestfish.pod:135
22679 " guestfish -N fs\n"
22685 #: ../fish/guestfish.pod:137
22686 msgid "To list what is available do:"
22691 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:998
22694 " guestfish -N help | less\n"
22700 #: ../fish/guestfish.pod:141
22701 msgid "Remote control"
22706 #: ../fish/guestfish.pod:143
22709 " eval \"`guestfish --listen`\"\n"
22710 " guestfish --remote add-ro disk.img\n"
22711 " guestfish --remote run\n"
22712 " guestfish --remote lvs\n"
22718 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37
22719 #: ../fuse/guestmount.pod:83 ../tools/virt-win-reg.pl:96
22720 #: ../tools/virt-list-filesystems.pl:53 ../tools/virt-tar.pl:103
22721 #: ../tools/virt-make-fs.pl:153 ../tools/virt-list-partitions.pl:54
22727 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:143
22728 #: ../tools/virt-win-reg.pl:104 ../tools/virt-list-filesystems.pl:61
22729 #: ../tools/virt-tar.pl:111 ../tools/virt-make-fs.pl:161
22730 #: ../tools/virt-list-partitions.pl:62
22736 #: ../fish/guestfish.pod:154
22737 msgid "Displays general help on options."
22742 #: ../fish/guestfish.pod:156
22748 #: ../fish/guestfish.pod:158
22749 msgid "B<--cmd-help>"
22754 #: ../fish/guestfish.pod:160
22755 msgid "Lists all available guestfish commands."
22760 #: ../fish/guestfish.pod:162
22766 #: ../fish/guestfish.pod:164
22767 msgid "B<--cmd-help cmd>"
22772 #: ../fish/guestfish.pod:166
22773 msgid "Displays detailed help on a single command C<cmd>."
22778 #: ../fish/guestfish.pod:168
22779 msgid "B<-a image>"
22784 #: ../fish/guestfish.pod:170
22785 msgid "B<--add image>"
22790 #: ../fish/guestfish.pod:172
22791 msgid "Add a block device or virtual machine image to the shell."
22796 #: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:91
22798 "The format of the disk image is auto-detected. To override this and force a "
22799 "particular format use the I<--format=..> option."
22803 #: ../fish/guestfish.pod:177
22805 "Using this flag is mostly equivalent to using the C<add> command, with "
22806 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
22807 "the I<--format=...> flag was given."
22812 #: ../fish/guestfish.pod:181
22818 #: ../fish/guestfish.pod:183
22819 msgid "B<--connect URI>"
22824 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:96
22826 "When used in conjunction with the I<-d> option, this specifies the libvirt "
22827 "URI to use. The default is to use the default libvirt connection."
22832 #: ../fish/guestfish.pod:189
22838 #: ../fish/guestfish.pod:191
22840 "If using the I<--listen> option and a csh-like shell, use this option. See "
22841 "section L</REMOTE CONTROL AND CSH> below."
22846 #: ../fish/guestfish.pod:194
22847 msgid "B<-d libvirt-domain>"
22852 #: ../fish/guestfish.pod:196
22853 msgid "B<--domain libvirt-domain>"
22858 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:102
22860 "Add disks from the named libvirt domain. If the I<--ro> option is also "
22861 "used, then any libvirt domain can be used. However in write mode, only "
22862 "libvirt domains which are shut down can be named here."
22866 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:106
22867 msgid "Domain UUIDs can be used instead of names."
22872 #: ../fish/guestfish.pod:204
22874 "Using this flag is mostly equivalent to using the C<add-domain> command, "
22875 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
22876 "if the I<--format:...> flag was given."
22881 #: ../fish/guestfish.pod:208
22887 #: ../fish/guestfish.pod:210
22888 msgid "B<--no-dest-paths>"
22893 #: ../fish/guestfish.pod:212
22895 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
22896 "to hit the tab key to complete paths on the guest filesystem, but this "
22897 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
22898 "allow this feature to be disabled."
22903 #: ../fish/guestfish.pod:217 ../fuse/guestmount.pod:120
22904 msgid "B<--echo-keys>"
22909 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:122
22911 "When prompting for keys and passphrases, guestfish normally turns echoing "
22912 "off so you cannot see what you are typing. If you are not worried about "
22913 "Tempest attacks and there is no one else in the room you can specify this "
22914 "flag to see what you are typing."
22919 #: ../fish/guestfish.pod:224
22925 #: ../fish/guestfish.pod:226
22926 msgid "B<--file file>"
22931 #: ../fish/guestfish.pod:228
22932 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
22937 #: ../fish/guestfish.pod:231
22940 " #!/usr/bin/guestfish -f\n"
22946 #: ../fish/guestfish.pod:233
22947 msgid "B<--format=raw|qcow2|..>"
22952 #: ../fish/guestfish.pod:235
22953 msgid "B<--format>"
22958 #: ../fish/guestfish.pod:237 ../fuse/guestmount.pod:129
22960 "The default for the I<-a> option is to auto-detect the format of the disk "
22961 "image. Using this forces the disk format for I<-a> options which follow on "
22962 "the command line. Using I<--format> with no argument switches back to auto-"
22963 "detection for subsequent I<-a> options."
22968 #: ../fish/guestfish.pod:244
22971 " guestfish --format=raw -a disk.img\n"
22977 #: ../fish/guestfish.pod:246
22978 msgid "forces raw format (no auto-detection) for C<disk.img>."
22983 #: ../fish/guestfish.pod:248
22986 " guestfish --format=raw -a disk.img --format -a another.img\n"
22992 #: ../fish/guestfish.pod:250
22994 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
22995 "detection for C<another.img>."
23000 #: ../fish/guestfish.pod:253
23002 "If you have untrusted raw-format guest disk images, you should use this "
23003 "option to specify the disk format. This avoids a possible security problem "
23004 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
23009 #: ../fish/guestfish.pod:258
23015 #: ../fish/guestfish.pod:260
23016 msgid "B<--inspector>"
23021 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:149
23023 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
23024 "system and mount filesystems as they would be mounted on the real virtual "
23030 #: ../fish/guestfish.pod:266
23031 msgid "Typical usage is either:"
23036 #: ../fish/guestfish.pod:268
23039 " guestfish -d myguest -i\n"
23045 #: ../fish/guestfish.pod:270
23046 msgid "(for an inactive libvirt domain called I<myguest>), or:"
23051 #: ../fish/guestfish.pod:272
23054 " guestfish --ro -d myguest -i\n"
23060 #: ../fish/guestfish.pod:274
23061 msgid "(for active domains, readonly), or specify the block device directly:"
23066 #: ../fish/guestfish.pod:276
23069 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
23075 #: ../fish/guestfish.pod:278
23077 "Note that the command line syntax changed slightly over older versions of "
23078 "guestfish. You can still use the old syntax:"
23083 #: ../fish/guestfish.pod:281
23086 " guestfish [--ro] -i disk.img\n"
23092 #: ../fish/guestfish.pod:283
23095 " guestfish [--ro] -i libvirt-domain\n"
23101 #: ../fish/guestfish.pod:285
23103 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
23104 "then using other commands to mount the filesystems that were found."
23109 #: ../fish/guestfish.pod:289 ../fuse/guestmount.pod:153
23110 msgid "B<--keys-from-stdin>"
23115 #: ../fish/guestfish.pod:291 ../fuse/guestmount.pod:155
23117 "Read key or passphrase parameters from stdin. The default is to try to read "
23118 "passphrases from the user by opening C</dev/tty>."
23123 #: ../fish/guestfish.pod:294
23124 msgid "B<--listen>"
23129 #: ../fish/guestfish.pod:296
23131 "Fork into the background and listen for remote commands. See section L</"
23132 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
23136 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:158
23141 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:160
23143 "Connect to a live virtual machine. (Experimental, see L<guestfs(3)/"
23144 "ATTACHING TO RUNNING DAEMONS>)."
23148 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:163
23149 msgid "B<-m dev[:mountpoint[:options]]>"
23153 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:165
23154 msgid "B<--mount dev[:mountpoint[:options]]>"
23159 #: ../fish/guestfish.pod:308
23160 msgid "Mount the named partition or logical volume on the given mountpoint."
23165 #: ../fish/guestfish.pod:310
23166 msgid "If the mountpoint is omitted, it defaults to C</>."
23171 #: ../fish/guestfish.pod:312
23172 msgid "You have to mount something on C</> before most commands will work."
23177 #: ../fish/guestfish.pod:314
23179 "If any I<-m> or I<--mount> options are given, the guest is automatically "
23185 #: ../fish/guestfish.pod:317
23187 "If you don't know what filesystems a disk image contains, you can either run "
23188 "guestfish without this option, then list the partitions, filesystems and LVs "
23189 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
23190 "commands), or you can use the L<virt-filesystems(1)> program."
23194 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:173
23196 "The third (and rarely used) part of the mount parameter is the list of mount "
23197 "options used to mount the underlying filesystem. If this is not given, then "
23198 "the mount options are either the empty string or C<ro> (the latter if the "
23199 "I<--ro> flag is used). By specifying the mount options, you override this "
23200 "default choice. Probably the only time you would use this is to enable ACLs "
23201 "and/or extended attributes if the filesystem can support them:"
23205 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:181
23208 " -m /dev/sda1:/:acl,user_xattr\n"
23213 #: ../fish/guestfish.pod:333
23214 msgid "Using this flag is equivalent to using the C<mount-options> command."
23219 #: ../fish/guestfish.pod:335
23225 #: ../fish/guestfish.pod:337
23226 msgid "B<--no-sync>"
23231 #: ../fish/guestfish.pod:339
23233 "Disable autosync. This is enabled by default. See the discussion of "
23234 "autosync in the L<guestfs(3)> manpage."
23239 #: ../fish/guestfish.pod:342
23245 #: ../fish/guestfish.pod:344
23246 msgid "B<--new type>"
23251 #: ../fish/guestfish.pod:346
23257 #: ../fish/guestfish.pod:348
23259 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
23260 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
23261 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
23267 #: ../fish/guestfish.pod:353
23268 msgid "B<--progress-bars>"
23273 #: ../fish/guestfish.pod:355
23274 msgid "Enable progress bars, even when guestfish is used non-interactively."
23279 #: ../fish/guestfish.pod:357
23281 "Progress bars are enabled by default when guestfish is used as an "
23282 "interactive shell."
23287 #: ../fish/guestfish.pod:360
23288 msgid "B<--no-progress-bars>"
23293 #: ../fish/guestfish.pod:362
23294 msgid "Disable progress bars."
23299 #: ../fish/guestfish.pod:364
23300 msgid "B<--remote[=pid]>"
23305 #: ../fish/guestfish.pod:366
23307 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
23308 "CONTROL GUESTFISH OVER A SOCKET> below."
23313 #: ../fish/guestfish.pod:369
23319 #: ../fish/guestfish.pod:371
23325 #: ../fish/guestfish.pod:373
23327 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
23328 "mounts are done read-only."
23333 #: ../fish/guestfish.pod:376
23335 "The option must always be used if the disk image or virtual machine might be "
23336 "running, and is generally recommended in cases where you don't need write "
23337 "access to the disk."
23342 #: ../fish/guestfish.pod:380
23344 "Note that prepared disk images created with I<-N> are not affected by this "
23345 "option. Also commands like C<add> are not affected - you have to specify "
23346 "the C<readonly:true> option explicitly if you need it."
23351 #: ../fish/guestfish.pod:384
23352 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
23357 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:237
23358 msgid "B<--selinux>"
23363 #: ../fish/guestfish.pod:388
23364 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
23369 #: ../fish/guestfish.pod:390
23375 #: ../fish/guestfish.pod:392
23376 msgid "B<--verbose>"
23381 #: ../fish/guestfish.pod:394
23383 "Enable very verbose messages. This is particularly useful if you find a bug."
23388 #: ../fish/guestfish.pod:397
23394 #: ../fish/guestfish.pod:399 ../tools/virt-win-reg.pl:112
23395 #: ../tools/virt-list-filesystems.pl:69 ../tools/virt-tar.pl:119
23396 #: ../tools/virt-make-fs.pl:169 ../tools/virt-list-partitions.pl:70
23397 msgid "B<--version>"
23402 #: ../fish/guestfish.pod:401
23403 msgid "Display the guestfish / libguestfs version number and exit."
23408 #: ../fish/guestfish.pod:403
23414 #: ../fish/guestfish.pod:405
23419 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:251
23421 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
23422 "mounts are done read-write."
23426 #: ../fish/guestfish.pod:410
23427 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
23432 #: ../fish/guestfish.pod:412
23438 #: ../fish/guestfish.pod:414
23439 msgid "Echo each command before executing it."
23444 #: ../fish/guestfish.pod:418
23445 msgid "COMMANDS ON COMMAND LINE"
23450 #: ../fish/guestfish.pod:420
23452 "Any additional (non-option) arguments are treated as commands to execute."
23457 #: ../fish/guestfish.pod:423
23459 "Commands to execute should be separated by a colon (C<:>), where the colon "
23460 "is a separate parameter. Thus:"
23465 #: ../fish/guestfish.pod:426
23468 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
23474 #: ../fish/guestfish.pod:428
23476 "If there are no additional arguments, then we enter a shell, either an "
23477 "interactive shell with a prompt (if the input is a terminal) or a non-"
23478 "interactive shell."
23483 #: ../fish/guestfish.pod:432
23485 "In either command line mode or non-interactive shell, the first command that "
23486 "gives an error causes the whole shell to exit. In interactive mode (with a "
23487 "prompt) if a command fails, you can continue to enter commands."
23492 #: ../fish/guestfish.pod:437
23493 msgid "USING launch (OR run)"
23498 #: ../fish/guestfish.pod:439
23500 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
23501 "then launch it, then mount any disks you need, and finally issue actions/"
23502 "commands. So the general order of the day is:"
23507 #: ../fish/guestfish.pod:447
23508 msgid "add or -a/--add"
23513 #: ../fish/guestfish.pod:451
23514 msgid "launch (aka run)"
23519 #: ../fish/guestfish.pod:455
23520 msgid "mount or -m/--mount"
23525 #: ../fish/guestfish.pod:459
23526 msgid "any other commands"
23531 #: ../fish/guestfish.pod:463
23533 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
23534 "guest before mounting or performing any other commands."
23539 #: ../fish/guestfish.pod:466
23541 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
23542 "I<--new> options were given then C<run> is done automatically, simply "
23543 "because guestfish can't perform the action you asked for without doing this."
23548 #: ../fish/guestfish.pod:471
23549 msgid "OPENING DISKS FOR READ AND WRITE"
23553 #: ../fish/guestfish.pod:473
23555 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
23556 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
23557 "I<-i> and I<-m> open disk images read-only or for writing."
23561 #: ../fish/guestfish.pod:478
23563 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
23564 "opening disk images supplied on the command line for write. To open a disk "
23565 "image read-only you have to do I<-a image --ro>."
23570 #: ../fish/guestfish.pod:482
23572 "This matters: If you accidentally open a live VM disk image writable then "
23573 "you will cause irreversible disk corruption."
23577 #: ../fish/guestfish.pod:485
23579 "By libguestfs 1.12 we intend to change the default the other way. Disk "
23580 "images will be opened read-only. You will have to either specify "
23581 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
23582 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
23583 "access for disk images specified by those other command line options."
23587 #: ../fish/guestfish.pod:492
23589 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
23590 "which does nothing (it is already the default). However it is highly "
23591 "recommended that you use this option to indicate that you need write access, "
23592 "and prepare your scripts for the day when this option will be required for "
23598 #: ../fish/guestfish.pod:498
23600 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
23601 "other libguestfs program apart from guestfish and guestmount."
23606 #: ../fish/guestfish.pod:501
23612 #: ../fish/guestfish.pod:503
23614 "You can quote ordinary parameters using either single or double quotes. For "
23620 #: ../fish/guestfish.pod:506
23623 " add \"file with a space.img\"\n"
23629 #: ../fish/guestfish.pod:508
23632 " rm '/file name'\n"
23638 #: ../fish/guestfish.pod:510
23647 #: ../fish/guestfish.pod:512
23649 "A few commands require a list of strings to be passed. For these, use a "
23650 "whitespace-separated list, enclosed in quotes. Strings containing "
23651 "whitespace to be passed through must be enclosed in single quotes. A "
23652 "literal single quote must be escaped with a backslash."
23657 #: ../fish/guestfish.pod:517
23660 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
23661 " command \"/bin/echo 'foo bar'\"\n"
23662 " command \"/bin/echo \\'foo\\'\"\n"
23667 #: ../fish/guestfish.pod:521
23668 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
23672 #: ../fish/guestfish.pod:523
23674 "In double-quoted arguments (only) use backslash to insert special characters:"
23678 #: ../fish/guestfish.pod:528
23683 #: ../fish/guestfish.pod:530
23684 msgid "Alert (bell) character."
23688 #: ../fish/guestfish.pod:532
23693 #: ../fish/guestfish.pod:534
23694 msgid "Backspace character."
23698 #: ../fish/guestfish.pod:536
23703 #: ../fish/guestfish.pod:538
23704 msgid "Form feed character."
23708 #: ../fish/guestfish.pod:540
23713 #: ../fish/guestfish.pod:542
23714 msgid "Newline character."
23718 #: ../fish/guestfish.pod:544
23723 #: ../fish/guestfish.pod:546
23724 msgid "Carriage return character."
23728 #: ../fish/guestfish.pod:548
23733 #: ../fish/guestfish.pod:550
23734 msgid "Horizontal tab character."
23738 #: ../fish/guestfish.pod:552
23743 #: ../fish/guestfish.pod:554
23744 msgid "Vertical tab character."
23748 #: ../fish/guestfish.pod:556
23753 #: ../fish/guestfish.pod:558
23754 msgid "A literal double quote character."
23758 #: ../fish/guestfish.pod:560
23763 #: ../fish/guestfish.pod:562
23765 "A character with octal value I<ooo>. There must be precisely 3 octal digits "
23770 #: ../fish/guestfish.pod:565
23775 #: ../fish/guestfish.pod:567
23777 "A character with hex value I<hh>. There must be precisely 2 hex digits."
23781 #: ../fish/guestfish.pod:570
23783 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
23788 #: ../fish/guestfish.pod:573
23793 #: ../fish/guestfish.pod:575
23794 msgid "A literal backslash character."
23799 #: ../fish/guestfish.pod:579
23800 msgid "OPTIONAL ARGUMENTS"
23805 #: ../fish/guestfish.pod:581
23807 "Some commands take optional arguments. These arguments appear in this "
23808 "documentation as C<[argname:..]>. You can use them as in these examples:"
23813 #: ../fish/guestfish.pod:585
23816 " add-drive-opts filename\n"
23822 #: ../fish/guestfish.pod:587
23825 " add-drive-opts filename readonly:true\n"
23831 #: ../fish/guestfish.pod:589
23834 " add-drive-opts filename format:qcow2 readonly:false\n"
23840 #: ../fish/guestfish.pod:591
23842 "Each optional argument can appear at most once. All optional arguments must "
23843 "appear after the required ones."
23848 #: ../fish/guestfish.pod:594
23854 #: ../fish/guestfish.pod:596
23856 "This section applies to all commands which can take integers as parameters."
23861 #: ../fish/guestfish.pod:599
23862 msgid "SIZE SUFFIX"
23867 #: ../fish/guestfish.pod:601
23869 "When the command takes a parameter measured in bytes, you can use one of the "
23870 "following suffixes to specify kilobytes, megabytes and larger sizes:"
23875 #: ../fish/guestfish.pod:607
23876 msgid "B<k> or B<K> or B<KiB>"
23881 #: ../fish/guestfish.pod:609
23882 msgid "The size in kilobytes (multiplied by 1024)."
23887 #: ../fish/guestfish.pod:611
23893 #: ../fish/guestfish.pod:613
23894 msgid "The size in SI 1000 byte units."
23899 #: ../fish/guestfish.pod:615
23900 msgid "B<M> or B<MiB>"
23905 #: ../fish/guestfish.pod:617
23906 msgid "The size in megabytes (multiplied by 1048576)."
23911 #: ../fish/guestfish.pod:619
23917 #: ../fish/guestfish.pod:621
23918 msgid "The size in SI 1000000 byte units."
23923 #: ../fish/guestfish.pod:623
23924 msgid "B<G> or B<GiB>"
23929 #: ../fish/guestfish.pod:625
23930 msgid "The size in gigabytes (multiplied by 2**30)."
23935 #: ../fish/guestfish.pod:627
23941 #: ../fish/guestfish.pod:629
23942 msgid "The size in SI 10**9 byte units."
23947 #: ../fish/guestfish.pod:631
23948 msgid "B<T> or B<TiB>"
23953 #: ../fish/guestfish.pod:633
23954 msgid "The size in terabytes (multiplied by 2**40)."
23959 #: ../fish/guestfish.pod:635
23965 #: ../fish/guestfish.pod:637
23966 msgid "The size in SI 10**12 byte units."
23971 #: ../fish/guestfish.pod:639
23972 msgid "B<P> or B<PiB>"
23977 #: ../fish/guestfish.pod:641
23978 msgid "The size in petabytes (multiplied by 2**50)."
23983 #: ../fish/guestfish.pod:643
23989 #: ../fish/guestfish.pod:645
23990 msgid "The size in SI 10**15 byte units."
23995 #: ../fish/guestfish.pod:647
23996 msgid "B<E> or B<EiB>"
24001 #: ../fish/guestfish.pod:649
24002 msgid "The size in exabytes (multiplied by 2**60)."
24007 #: ../fish/guestfish.pod:651
24013 #: ../fish/guestfish.pod:653
24014 msgid "The size in SI 10**18 byte units."
24019 #: ../fish/guestfish.pod:655
24020 msgid "B<Z> or B<ZiB>"
24025 #: ../fish/guestfish.pod:657
24026 msgid "The size in zettabytes (multiplied by 2**70)."
24031 #: ../fish/guestfish.pod:659
24037 #: ../fish/guestfish.pod:661
24038 msgid "The size in SI 10**21 byte units."
24043 #: ../fish/guestfish.pod:663
24044 msgid "B<Y> or B<YiB>"
24049 #: ../fish/guestfish.pod:665
24050 msgid "The size in yottabytes (multiplied by 2**80)."
24055 #: ../fish/guestfish.pod:667
24061 #: ../fish/guestfish.pod:669
24062 msgid "The size in SI 10**24 byte units."
24067 #: ../fish/guestfish.pod:675
24070 " truncate-size /file 1G\n"
24076 #: ../fish/guestfish.pod:677
24077 msgid "would truncate the file to 1 gigabyte."
24082 #: ../fish/guestfish.pod:679
24084 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
24085 "the parameter to L</memsize> is specified in megabytes already). Adding a "
24086 "suffix will probably not do what you expect."
24091 #: ../fish/guestfish.pod:683
24092 msgid "OCTAL AND HEXADECIMAL NUMBERS"
24097 #: ../fish/guestfish.pod:685
24099 "For specifying the radix (base) use the C convention: C<0> to prefix an "
24100 "octal number or C<0x> to prefix a hexadecimal number. For example:"
24105 #: ../fish/guestfish.pod:688
24108 " 1234 decimal number 1234\n"
24109 " 02322 octal number, equivalent to decimal 1234\n"
24110 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
24116 #: ../fish/guestfish.pod:692
24118 "When using the C<chmod> command, you almost always want to specify an octal "
24119 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
24120 "L<chmod(1)> program):"
24125 #: ../fish/guestfish.pod:696
24128 " chmod 0777 /public # OK\n"
24129 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
24135 #: ../fish/guestfish.pod:699
24137 "Commands that return numbers usually print them in decimal, but some "
24138 "commands print numbers in other radices (eg. C<umask> prints the mode in "
24139 "octal, preceeded by C<0>)."
24144 #: ../fish/guestfish.pod:703
24145 msgid "WILDCARDS AND GLOBBING"
24150 #: ../fish/guestfish.pod:705
24152 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
24153 "(globbing) by default. So for example the following will not do what you "
24159 #: ../fish/guestfish.pod:709
24168 #: ../fish/guestfish.pod:711
24170 "Assuming you don't have a directory called literally C</home/*> then the "
24171 "above command will return an error."
24176 #: ../fish/guestfish.pod:714
24177 msgid "To perform wildcard expansion, use the C<glob> command."
24182 #: ../fish/guestfish.pod:716
24185 " glob rm-rf /home/*\n"
24191 #: ../fish/guestfish.pod:718
24193 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
24194 "many times), equivalent to:"
24199 #: ../fish/guestfish.pod:721
24202 " rm-rf /home/jim\n"
24203 " rm-rf /home/joe\n"
24204 " rm-rf /home/mary\n"
24210 #: ../fish/guestfish.pod:725
24211 msgid "C<glob> only works on simple guest paths and not on device names."
24216 #: ../fish/guestfish.pod:727
24218 "If you have several parameters, each containing a wildcard, then glob will "
24219 "perform a Cartesian product."
24224 #: ../fish/guestfish.pod:730
24230 #: ../fish/guestfish.pod:732
24232 "Any line which starts with a I<#> character is treated as a comment and "
24233 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
24234 "a command. For example:"
24239 #: ../fish/guestfish.pod:736
24242 " # this is a comment\n"
24243 " # this is a comment\n"
24244 " foo # NOT a comment\n"
24250 #: ../fish/guestfish.pod:740
24251 msgid "Blank lines are also ignored."
24256 #: ../fish/guestfish.pod:742
24257 msgid "RUNNING COMMANDS LOCALLY"
24262 #: ../fish/guestfish.pod:744
24264 "Any line which starts with a I<!> character is treated as a command sent to "
24265 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
24270 #: ../fish/guestfish.pod:748
24274 " tgz-out /remote local/remote-data.tar.gz\n"
24280 #: ../fish/guestfish.pod:751
24282 "will create a directory C<local> on the host, and then export the contents "
24283 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
24284 "(See C<tgz-out>)."
24289 #: ../fish/guestfish.pod:755
24291 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
24292 "effect, due to the way that subprocesses work in Unix."
24296 #: ../fish/guestfish.pod:758
24297 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
24301 #: ../fish/guestfish.pod:760
24303 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
24304 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
24305 "and executed as guestfish commands."
24309 #: ../fish/guestfish.pod:764
24311 "Thus you can use shell script to construct arbitrary guestfish commands "
24312 "which are then parsed by guestfish."
24316 #: ../fish/guestfish.pod:767
24318 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
24319 "through C</foo.100>) using guestfish commands alone. However this is simple "
24320 "if we use a shell script to create the guestfish commands for us:"
24324 #: ../fish/guestfish.pod:772
24327 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
24332 #: ../fish/guestfish.pod:774
24333 msgid "or with names like C</foo.001>:"
24337 #: ../fish/guestfish.pod:776
24340 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
24345 #: ../fish/guestfish.pod:778
24347 "When using guestfish interactively it can be helpful to just run the shell "
24348 "script first (ie. remove the initial C<E<lt>> character so it is just an "
24349 "ordinary I<!> local command), see what guestfish commands it would run, and "
24350 "when you are happy with those prepend the C<E<lt>> character to run the "
24351 "guestfish commands for real."
24356 #: ../fish/guestfish.pod:784
24362 #: ../fish/guestfish.pod:786
24364 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
24365 "command (a guestfish command) to the second command (any host command). For "
24371 #: ../fish/guestfish.pod:790
24374 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
24380 #: ../fish/guestfish.pod:792
24382 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
24383 "program). The above command would list all accounts in the guest filesystem "
24384 "which have UID 0, ie. root accounts including backdoors. Other examples:"
24389 #: ../fish/guestfish.pod:797
24392 " hexdump /bin/ls | head\n"
24393 " list-devices | tail -1\n"
24394 " tgz-out / - | tar ztf -\n"
24400 #: ../fish/guestfish.pod:801
24402 "The space before the pipe symbol is required, any space after the pipe "
24403 "symbol is optional. Everything after the pipe symbol is just passed "
24404 "straight to the host shell, so it can contain redirections, globs and "
24405 "anything else that makes sense on the host side."
24410 #: ../fish/guestfish.pod:806
24412 "To use a literal argument which begins with a pipe symbol, you have to quote "
24418 #: ../fish/guestfish.pod:809
24427 #: ../fish/guestfish.pod:811
24428 msgid "HOME DIRECTORIES"
24433 #: ../fish/guestfish.pod:813
24435 "If a parameter starts with the character C<~> then the tilde may be expanded "
24436 "as a home directory path (either C<~> for the current user's home directory, "
24437 "or C<~user> for another user)."
24442 #: ../fish/guestfish.pod:817
24444 "Note that home directory expansion happens for users known I<on the host>, "
24445 "not in the guest filesystem."
24450 #: ../fish/guestfish.pod:820
24452 "To use a literal argument which begins with a tilde, you have to quote it, "
24458 #: ../fish/guestfish.pod:823
24467 #: ../fish/guestfish.pod:827
24469 "Libguestfs has some support for Linux guests encrypted according to the "
24470 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
24471 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
24472 "LUKS is supported."
24477 #: ../fish/guestfish.pod:832
24478 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
24483 #: ../fish/guestfish.pod:834
24486 " ><fs> vfs-type /dev/sda2\n"
24493 #: ../fish/guestfish.pod:837
24495 "Then open those devices using L</luks-open>. This creates a device-mapper "
24496 "device called C</dev/mapper/luksdev>."
24501 #: ../fish/guestfish.pod:840
24504 " ><fs> luks-open /dev/sda2 luksdev\n"
24505 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
24511 #: ../fish/guestfish.pod:843
24513 "Finally you have to tell LVM to scan for volume groups on the newly created "
24519 #: ../fish/guestfish.pod:846
24523 " vg-activate-all true\n"
24529 #: ../fish/guestfish.pod:849
24530 msgid "The logical volume(s) can now be mounted in the usual way."
24535 #: ../fish/guestfish.pod:851
24537 "Before closing a LUKS device you must unmount any logical volumes on it and "
24538 "deactivate the volume groups by calling C<vg-activate false VG> on each "
24539 "one. Then you can close the mapper device:"
24544 #: ../fish/guestfish.pod:855
24547 " vg-activate false /dev/VG\n"
24548 " luks-close /dev/mapper/luksdev\n"
24554 #: ../fish/guestfish.pod:858
24555 msgid "WINDOWS PATHS"
24559 #: ../fish/guestfish.pod:860
24561 "If a path is prefixed with C<win:> then you can use Windows-style drive "
24562 "letters and paths (with some limitations). The following commands are "
24568 #: ../fish/guestfish.pod:864
24571 " file /WINDOWS/system32/config/system.LOG\n"
24577 #: ../fish/guestfish.pod:866
24580 " file win:\\windows\\system32\\config\\system.log\n"
24585 #: ../fish/guestfish.pod:868
24588 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
24593 #: ../fish/guestfish.pod:870
24595 "The parameter is rewritten \"behind the scenes\" by looking up the position "
24596 "where the drive is mounted, prepending that to the path, changing all "
24597 "backslash characters to forward slash, then resolving the result using L</"
24598 "case-sensitive-path>. For example if the E: drive was mounted on C</e> then "
24599 "the parameter might be rewritten like this:"
24603 #: ../fish/guestfish.pod:876
24606 " win:e:\\foo\\bar => /e/FOO/bar\n"
24611 #: ../fish/guestfish.pod:878
24612 msgid "This only works in argument positions that expect a path."
24617 #: ../fish/guestfish.pod:880
24618 msgid "UPLOADING AND DOWNLOADING FILES"
24623 #: ../fish/guestfish.pod:882
24625 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
24626 "others which upload from or download to a local file, you can use the "
24627 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
24632 #: ../fish/guestfish.pod:886
24641 #: ../fish/guestfish.pod:888
24643 "reads stdin and creates from that a file C</foo> in the disk image, and:"
24648 #: ../fish/guestfish.pod:891
24651 " tar-out /etc - | tar tf -\n"
24657 #: ../fish/guestfish.pod:893
24659 "writes the tarball to stdout and then pipes that into the external \"tar\" "
24660 "command (see L</PIPES>)."
24665 #: ../fish/guestfish.pod:896
24667 "When using C<-> to read from stdin, the input is read up to the end of "
24668 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
24669 "some arbitrary end marker:"
24674 #: ../fish/guestfish.pod:900
24677 " upload -<<END /foo\n"
24687 #: ../fish/guestfish.pod:906
24689 "Any string of characters can be used instead of C<END>. The end marker must "
24690 "appear on a line of its own, without any preceeding or following characters "
24691 "(not even spaces)."
24696 #: ../fish/guestfish.pod:910
24698 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
24699 "upload local files (so-called \"FileIn\" parameters in the generator)."
24704 #: ../fish/guestfish.pod:913
24705 msgid "EXIT ON ERROR BEHAVIOUR"
24710 #: ../fish/guestfish.pod:915
24712 "By default, guestfish will ignore any errors when in interactive mode (ie. "
24713 "taking commands from a human over a tty), and will exit on the first error "
24714 "in non-interactive mode (scripts, commands given on the command line)."
24719 #: ../fish/guestfish.pod:920
24721 "If you prefix a command with a I<-> character, then that command will not "
24722 "cause guestfish to exit, even if that (one) command returns an error."
24727 #: ../fish/guestfish.pod:924
24728 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
24733 #: ../fish/guestfish.pod:926
24735 "Guestfish can be remote-controlled over a socket. This is useful "
24736 "particularly in shell scripts where you want to make several different "
24737 "changes to a filesystem, but you don't want the overhead of starting up a "
24738 "guestfish process each time."
24743 #: ../fish/guestfish.pod:931
24744 msgid "Start a guestfish server process using:"
24749 #: ../fish/guestfish.pod:933
24752 " eval \"`guestfish --listen`\"\n"
24758 #: ../fish/guestfish.pod:935
24759 msgid "and then send it commands by doing:"
24764 #: ../fish/guestfish.pod:937
24767 " guestfish --remote cmd [...]\n"
24773 #: ../fish/guestfish.pod:939
24774 msgid "To cause the server to exit, send it the exit command:"
24779 #: ../fish/guestfish.pod:941
24782 " guestfish --remote exit\n"
24788 #: ../fish/guestfish.pod:943
24790 "Note that the server will normally exit if there is an error in a command. "
24791 "You can change this in the usual way. See section L</EXIT ON ERROR "
24797 #: ../fish/guestfish.pod:947
24798 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
24803 #: ../fish/guestfish.pod:949
24805 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
24806 "is how the I<--remote> option knows where to send the commands. You can "
24807 "have several guestfish listener processes running using:"
24812 #: ../fish/guestfish.pod:953
24815 " eval \"`guestfish --listen`\"\n"
24816 " pid1=$GUESTFISH_PID\n"
24817 " eval \"`guestfish --listen`\"\n"
24818 " pid2=$GUESTFISH_PID\n"
24820 " guestfish --remote=$pid1 cmd\n"
24821 " guestfish --remote=$pid2 cmd\n"
24827 #: ../fish/guestfish.pod:961
24828 msgid "REMOTE CONTROL AND CSH"
24833 #: ../fish/guestfish.pod:963
24835 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
24841 #: ../fish/guestfish.pod:966
24844 " eval \"`guestfish --listen --csh`\"\n"
24850 #: ../fish/guestfish.pod:968
24851 msgid "REMOTE CONTROL DETAILS"
24856 #: ../fish/guestfish.pod:970
24858 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
24859 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
24860 "and C<$PID> is the process ID of the server."
24865 #: ../fish/guestfish.pod:974
24866 msgid "Guestfish client and server versions must match exactly."
24871 #: ../fish/guestfish.pod:976
24872 msgid "PREPARED DISK IMAGES"
24877 #: ../fish/guestfish.pod:978
24879 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
24880 "preformatted disk images that guestfish can make for you to save typing. "
24881 "This is particularly useful for testing purposes. This option is used "
24882 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
24883 "can be mixed with I<-a>)."
24888 #: ../fish/guestfish.pod:984
24890 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
24891 "the second and so on. Existing files in the current directory are "
24897 #: ../fish/guestfish.pod:988
24899 "The type briefly describes how the disk should be sized, partitioned, how "
24900 "filesystem(s) should be created, and how content should be added. "
24901 "Optionally the type can be followed by extra parameters, separated by C<:> "
24902 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
24903 "allocated disk, containing a single partition, with the partition formatted "
24904 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
24910 #: ../fish/guestfish.pod:996
24911 msgid "To list the available types and any extra parameters they take, run:"
24916 #: ../fish/guestfish.pod:1000
24918 "Note that the prepared filesystem is not mounted. You would usually have to "
24919 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
24924 #: ../fish/guestfish.pod:1004
24926 "If any I<-N> or I<--new> options are given, the guest is automatically "
24932 #: ../fish/guestfish.pod:1009
24933 msgid "Create a 100MB disk with an ext4-formatted partition:"
24938 #: ../fish/guestfish.pod:1011
24941 " guestfish -N fs:ext4\n"
24947 #: ../fish/guestfish.pod:1013
24948 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
24953 #: ../fish/guestfish.pod:1015
24956 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
24962 #: ../fish/guestfish.pod:1017
24963 msgid "Create a blank 200MB disk:"
24968 #: ../fish/guestfish.pod:1019
24971 " guestfish -N disk:200M\n"
24977 #: ../fish/guestfish.pod:1021
24978 msgid "PROGRESS BARS"
24983 #: ../fish/guestfish.pod:1023
24985 "Some (not all) long-running commands send progress notification messages as "
24986 "they are running. Guestfish turns these messages into progress bars."
24991 #: ../fish/guestfish.pod:1027
24993 "When a command that supports progress bars takes longer than two seconds to "
24994 "run, and if progress bars are enabled, then you will see one appearing below "
25000 #: ../fish/guestfish.pod:1031
25003 " ><fs> copy-size /large-file /another-file 2048M\n"
25004 " / 10% [#####-----------------------------------------] 00:30\n"
25010 #: ../fish/guestfish.pod:1034
25012 "The spinner on the left hand side moves round once for every progress "
25013 "notification received from the backend. This is a (reasonably) golden "
25014 "assurance that the command is \"doing something\" even if the progress bar "
25015 "is not moving, because the command is able to send the progress "
25016 "notifications. When the bar reaches 100% and the command finishes, the "
25017 "spinner disappears."
25022 #: ../fish/guestfish.pod:1041
25024 "Progress bars are enabled by default when guestfish is used interactively. "
25025 "You can enable them even for non-interactive modes using I<--progress-bars>, "
25026 "and you can disable them completely using I<--no-progress-bars>."
25031 #: ../fish/guestfish.pod:1046
25032 msgid "GUESTFISH COMMANDS"
25037 #: ../fish/guestfish.pod:1048
25039 "The commands in this section are guestfish convenience commands, in other "
25040 "words, they are not part of the L<guestfs(3)> API."
25045 #: ../fish/guestfish.pod:1051
25051 #: ../fish/guestfish.pod:1053
25061 #: ../fish/guestfish.pod:1056
25062 msgid "Without any parameter, this provides general help."
25067 #: ../fish/guestfish.pod:1058
25068 msgid "With a C<cmd> parameter, this displays detailed help for that command."
25073 #: ../fish/guestfish.pod:1060
25074 msgid "quit | exit"
25079 #: ../fish/guestfish.pod:1062
25080 msgid "This exits guestfish. You can also use C<^D> key."
25085 #: ../fish/guestfish.pod:1064
25086 msgid "@FISH_COMMANDS@"
25091 #: ../fish/guestfish.pod:1066
25097 #: ../fish/guestfish.pod:1070 ../test-tool/libguestfs-test-tool.pod:77
25103 #: ../fish/guestfish.pod:1072
25105 "guestfish returns 0 if the commands completed without error, or 1 if there "
25111 #: ../fish/guestfish.pod:1079
25117 #: ../fish/guestfish.pod:1081
25119 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
25124 #: ../fish/guestfish.pod:1084
25125 msgid "GUESTFISH_DISPLAY_IMAGE"
25129 #: ../fish/guestfish.pod:1086
25131 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
25132 "If not set, it uses L<display(1)>."
25137 #: ../fish/guestfish.pod:1089
25138 msgid "GUESTFISH_PID"
25143 #: ../fish/guestfish.pod:1091
25145 "Used with the I<--remote> option to specify the remote guestfish process to "
25146 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
25151 #: ../fish/guestfish.pod:1095
25157 #: ../fish/guestfish.pod:1097
25159 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
25160 "not specified, the external L<hexedit(1)> program is used."
25165 #: ../fish/guestfish.pod:1101
25171 #: ../fish/guestfish.pod:1103
25173 "If compiled with GNU readline support, various files in the home directory "
25174 "can be used. See L</FILES>."
25179 #: ../fish/guestfish.pod:1112
25181 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
25182 "effect as using the B<-v> option."
25187 #: ../fish/guestfish.pod:1124
25189 "Set the path that guestfish uses to search for kernel and initrd.img. See "
25190 "the discussion of paths in L<guestfs(3)>."
25195 #: ../fish/guestfish.pod:1135
25196 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
25201 #: ../fish/guestfish.pod:1137
25207 #: ../fish/guestfish.pod:1139
25209 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
25215 #: ../fish/guestfish.pod:1155 ../fuse/guestmount.pod:264
25220 #: ../fish/guestfish.pod:1159 ../fuse/guestmount.pod:268
25221 msgid "$HOME/.libguestfs-tools.rc"
25225 #: ../fish/guestfish.pod:1161 ../fuse/guestmount.pod:270
25226 msgid "/etc/libguestfs-tools.conf"
25230 #: ../fish/guestfish.pod:1163 ../fuse/guestmount.pod:272
25232 "This configuration file controls the default read-only or read-write mode "
25233 "(I<--ro> or I<--rw>)."
25237 #: ../fish/guestfish.pod:1166
25238 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
25243 #: ../fish/guestfish.pod:1168
25244 msgid "$HOME/.guestfish"
25249 #: ../fish/guestfish.pod:1170
25251 "If compiled with GNU readline support, then the command history is saved in "
25257 #: ../fish/guestfish.pod:1173
25258 msgid "$HOME/.inputrc"
25263 #: ../fish/guestfish.pod:1175
25264 msgid "/etc/inputrc"
25269 #: ../fish/guestfish.pod:1177
25271 "If compiled with GNU readline support, then these files can be used to "
25272 "configure readline. For further information, please see L<readline(3)/"
25273 "INITIALIZATION FILE>."
25278 #: ../fish/guestfish.pod:1181
25279 msgid "To write rules which only apply to guestfish, use:"
25284 #: ../fish/guestfish.pod:1183
25295 #: ../fish/guestfish.pod:1187
25297 "Variables that you can set in inputrc that change the behaviour of guestfish "
25298 "in useful ways include:"
25303 #: ../fish/guestfish.pod:1192
25304 msgid "completion-ignore-case (default: on)"
25309 #: ../fish/guestfish.pod:1194
25311 "By default, guestfish will ignore case when tab-completing paths on the "
25317 #: ../fish/guestfish.pod:1197
25320 " set completion-ignore-case off\n"
25326 #: ../fish/guestfish.pod:1199
25327 msgid "to make guestfish case sensitive."
25332 #: ../fish/guestfish.pod:1203
25338 #: ../fish/guestfish.pod:1205
25339 msgid "test2.img (etc)"
25343 #: ../fish/guestfish.pod:1207
25345 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
25346 "will be created in the file C<test1.img> in the current directory. The "
25347 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
25348 "the same name will be overwritten."
25352 #: ../fish/guestfish.pod:1216
25354 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-copy-in(1)"
25355 ">, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)"
25356 ">, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions"
25357 "(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)"
25358 ">, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)"
25359 ">, L<display(1)>, L<hexedit(1)>."
25364 #: ../fish/guestfish.pod:1247 ../test-tool/libguestfs-test-tool.pod:102
25365 #: ../fuse/guestmount.pod:299 ../tools/virt-win-reg.pl:778
25366 #: ../tools/virt-list-filesystems.pl:210 ../tools/virt-tar.pl:309
25367 #: ../tools/virt-make-fs.pl:572 ../tools/virt-list-partitions.pl:277
25369 "This program is free software; you can redistribute it and/or modify it "
25370 "under the terms of the GNU General Public License as published by the Free "
25371 "Software Foundation; either version 2 of the License, or (at your option) "
25372 "any later version."
25377 #: ../fish/guestfish.pod:1252 ../test-tool/libguestfs-test-tool.pod:107
25378 #: ../fuse/guestmount.pod:304 ../tools/virt-win-reg.pl:783
25379 #: ../tools/virt-list-filesystems.pl:215 ../tools/virt-tar.pl:314
25380 #: ../tools/virt-make-fs.pl:577 ../tools/virt-list-partitions.pl:282
25382 "This program is distributed in the hope that it will be useful, but WITHOUT "
25383 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
25384 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
25390 #: ../fish/guestfish.pod:1257 ../test-tool/libguestfs-test-tool.pod:112
25391 #: ../fuse/guestmount.pod:309 ../tools/virt-win-reg.pl:788
25392 #: ../tools/virt-list-filesystems.pl:220 ../tools/virt-tar.pl:319
25393 #: ../tools/virt-make-fs.pl:582 ../tools/virt-list-partitions.pl:287
25395 "You should have received a copy of the GNU General Public License along with "
25396 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
25397 "Ave, Cambridge, MA 02139, USA."
25402 #: ../fish/guestfish-actions.pod:1
25408 #: ../fish/guestfish-actions.pod:3
25411 " add-cdrom filename\n"
25417 #: ../fish/guestfish-actions.pod:15
25419 "This call checks for the existence of C<filename>. This stops you from "
25420 "specifying other types of drive which are supported by qemu such as C<nbd:> "
25421 "and C<http:> URLs. To specify those, use the general L</config> call "
25427 #: ../fish/guestfish-actions.pod:22
25429 "If you just want to add an ISO file (often you use this as an efficient way "
25430 "to transfer large files into the guest), then you should probably use L</add-"
25431 "drive-ro> instead."
25436 #: ../fish/guestfish-actions.pod:35
25442 #: ../fish/guestfish-actions.pod:37
25447 #: ../fish/guestfish-actions.pod:39
25450 " add-domain dom [libvirturi:..] [readonly:..] [iface:..] [live:..] [allowuuid:..]\n"
25456 #: ../fish/guestfish-actions.pod:41
25458 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
25459 "It works by connecting to libvirt, requesting the domain and domain XML from "
25460 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
25465 #: ../fish/guestfish-actions.pod:76
25467 "The other optional parameters are passed directly through to L</add-drive-"
25473 #: ../fish/guestfish-actions.pod:79 ../fish/guestfish-actions.pod:143
25474 #: ../fish/guestfish-actions.pod:568 ../fish/guestfish-actions.pod:1968
25475 #: ../fish/guestfish-actions.pod:3134 ../fish/guestfish-actions.pod:3307
25476 #: ../fish/guestfish-actions.pod:3442
25478 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
25483 #: ../fish/guestfish-actions.pod:81
25489 #: ../fish/guestfish-actions.pod:83
25492 " add-drive filename\n"
25498 #: ../fish/guestfish-actions.pod:85
25500 "This function is the equivalent of calling L</add-drive-opts> with no "
25501 "optional parameters, so the disk is added writable, with the format being "
25502 "detected automatically."
25507 #: ../fish/guestfish-actions.pod:89
25509 "Automatic detection of the format opens you up to a potential security hole "
25510 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
25511 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
25512 "you should think about replacing calls to this function with calls to L</add-"
25513 "drive-opts>, and specifying the format."
25518 #: ../fish/guestfish-actions.pod:96
25519 msgid "add-drive-opts"
25524 #: ../fish/guestfish-actions.pod:98
25530 #: ../fish/guestfish-actions.pod:100
25533 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
25539 #: ../fish/guestfish-actions.pod:127
25541 "This forces the image format. If you omit this (or use L</add-drive> or L</"
25542 "add-drive-ro>) then the format is automatically detected. Possible formats "
25543 "include C<raw> and C<qcow2>."
25548 #: ../fish/guestfish-actions.pod:138
25550 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
25551 "add-drive-with-if> call (q.v.)"
25556 #: ../fish/guestfish-actions.pod:145
25557 msgid "add-drive-ro"
25562 #: ../fish/guestfish-actions.pod:147
25568 #: ../fish/guestfish-actions.pod:149
25571 " add-drive-ro filename\n"
25577 #: ../fish/guestfish-actions.pod:151
25579 "This function is the equivalent of calling L</add-drive-opts> with the "
25580 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
25581 "is added read-only, with the format being detected automatically."
25586 #: ../fish/guestfish-actions.pod:156
25587 msgid "add-drive-ro-with-if"
25592 #: ../fish/guestfish-actions.pod:158
25595 " add-drive-ro-with-if filename iface\n"
25601 #: ../fish/guestfish-actions.pod:160
25603 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
25604 "interface emulation to use at run time."
25609 #: ../fish/guestfish-actions.pod:170
25610 msgid "add-drive-with-if"
25615 #: ../fish/guestfish-actions.pod:172
25618 " add-drive-with-if filename iface\n"
25624 #: ../fish/guestfish-actions.pod:174
25626 "This is the same as L</add-drive> but it allows you to specify the QEMU "
25627 "interface emulation to use at run time."
25632 #: ../fish/guestfish-actions.pod:184
25638 #: ../fish/guestfish-actions.pod:186
25641 " aug-clear augpath\n"
25647 #: ../fish/guestfish-actions.pod:191
25653 #: ../fish/guestfish-actions.pod:193
25662 #: ../fish/guestfish-actions.pod:195
25664 "Close the current Augeas handle and free up any resources used by it. After "
25665 "calling this, you have to call L</aug-init> again before you can use any "
25666 "other Augeas functions."
25671 #: ../fish/guestfish-actions.pod:200
25672 msgid "aug-defnode"
25677 #: ../fish/guestfish-actions.pod:202
25680 " aug-defnode name expr val\n"
25686 #: ../fish/guestfish-actions.pod:207
25688 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
25689 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
25690 "containing that single node."
25695 #: ../fish/guestfish-actions.pod:215
25701 #: ../fish/guestfish-actions.pod:217
25704 " aug-defvar name expr\n"
25710 #: ../fish/guestfish-actions.pod:226
25716 #: ../fish/guestfish-actions.pod:228
25719 " aug-get augpath\n"
25725 #: ../fish/guestfish-actions.pod:233
25731 #: ../fish/guestfish-actions.pod:235
25734 " aug-init root flags\n"
25740 #: ../fish/guestfish-actions.pod:241
25741 msgid "You must call this before using any other L</aug-*> commands."
25746 #: ../fish/guestfish-actions.pod:276
25747 msgid "Do not load the tree in L</aug-init>."
25752 #: ../fish/guestfish-actions.pod:280
25753 msgid "To close the handle, you can call L</aug-close>."
25758 #: ../fish/guestfish-actions.pod:284
25764 #: ../fish/guestfish-actions.pod:286
25767 " aug-insert augpath label true|false\n"
25773 #: ../fish/guestfish-actions.pod:296
25779 #: ../fish/guestfish-actions.pod:298
25788 #: ../fish/guestfish-actions.pod:305
25794 #: ../fish/guestfish-actions.pod:307
25797 " aug-ls augpath\n"
25803 #: ../fish/guestfish-actions.pod:309
25805 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
25806 "resulting nodes into alphabetical order."
25811 #: ../fish/guestfish-actions.pod:312
25817 #: ../fish/guestfish-actions.pod:314
25820 " aug-match augpath\n"
25826 #: ../fish/guestfish-actions.pod:320
25832 #: ../fish/guestfish-actions.pod:322
25835 " aug-mv src dest\n"
25841 #: ../fish/guestfish-actions.pod:327
25847 #: ../fish/guestfish-actions.pod:329
25850 " aug-rm augpath\n"
25856 #: ../fish/guestfish-actions.pod:335
25862 #: ../fish/guestfish-actions.pod:337
25871 #: ../fish/guestfish-actions.pod:341
25873 "The flags which were passed to L</aug-init> affect exactly how files are "
25879 #: ../fish/guestfish-actions.pod:344
25885 #: ../fish/guestfish-actions.pod:346
25888 " aug-set augpath val\n"
25894 #: ../fish/guestfish-actions.pod:350
25896 "In the Augeas API, it is possible to clear a node by setting the value to "
25897 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
25898 "this call. Instead you must use the L</aug-clear> call."
25903 #: ../fish/guestfish-actions.pod:355
25909 #: ../fish/guestfish-actions.pod:357
25912 " available 'groups ...'\n"
25918 #: ../fish/guestfish-actions.pod:363
25920 "The libguestfs groups, and the functions that those groups correspond to, "
25921 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
25922 "runtime by calling L</available-all-groups>."
25927 #: ../fish/guestfish-actions.pod:387
25928 msgid "You must call L</launch> before calling this function."
25933 #: ../fish/guestfish-actions.pod:409
25935 "This call was added in version C<1.0.80>. In previous versions of "
25936 "libguestfs all you could do would be to speculatively execute a command to "
25937 "find out if the daemon implemented it. See also L</version>."
25942 #: ../fish/guestfish-actions.pod:416
25943 msgid "available-all-groups"
25948 #: ../fish/guestfish-actions.pod:418
25951 " available-all-groups\n"
25957 #: ../fish/guestfish-actions.pod:420
25959 "This command returns a list of all optional groups that this daemon knows "
25960 "about. Note this returns both supported and unsupported groups. To find "
25961 "out which ones the daemon can actually support you have to call L</"
25962 "available> on each member of the returned list."
25967 #: ../fish/guestfish-actions.pod:426
25968 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
25973 #: ../fish/guestfish-actions.pod:428
25979 #: ../fish/guestfish-actions.pod:430
25982 " base64-in (base64file|-) filename\n"
25988 #: ../fish/guestfish-actions.pod:435 ../fish/guestfish-actions.pod:444
25989 #: ../fish/guestfish-actions.pod:693 ../fish/guestfish-actions.pod:862
25990 #: ../fish/guestfish-actions.pod:881 ../fish/guestfish-actions.pod:1255
25991 #: ../fish/guestfish-actions.pod:4652 ../fish/guestfish-actions.pod:4664
25992 #: ../fish/guestfish-actions.pod:4675 ../fish/guestfish-actions.pod:4686
25993 #: ../fish/guestfish-actions.pod:4738 ../fish/guestfish-actions.pod:4747
25994 #: ../fish/guestfish-actions.pod:4801 ../fish/guestfish-actions.pod:4824
25995 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
26000 #: ../fish/guestfish-actions.pod:437
26006 #: ../fish/guestfish-actions.pod:439
26009 " base64-out filename (base64file|-)\n"
26015 #: ../fish/guestfish-actions.pod:446
26016 msgid "blockdev-flushbufs"
26021 #: ../fish/guestfish-actions.pod:448
26024 " blockdev-flushbufs device\n"
26030 #: ../fish/guestfish-actions.pod:455
26031 msgid "blockdev-getbsz"
26036 #: ../fish/guestfish-actions.pod:457
26039 " blockdev-getbsz device\n"
26045 #: ../fish/guestfish-actions.pod:466
26046 msgid "blockdev-getro"
26051 #: ../fish/guestfish-actions.pod:468
26054 " blockdev-getro device\n"
26060 #: ../fish/guestfish-actions.pod:475
26061 msgid "blockdev-getsize64"
26066 #: ../fish/guestfish-actions.pod:477
26069 " blockdev-getsize64 device\n"
26075 #: ../fish/guestfish-actions.pod:481
26076 msgid "See also L</blockdev-getsz>."
26081 #: ../fish/guestfish-actions.pod:485
26082 msgid "blockdev-getss"
26087 #: ../fish/guestfish-actions.pod:487
26090 " blockdev-getss device\n"
26096 #: ../fish/guestfish-actions.pod:492
26098 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
26103 #: ../fish/guestfish-actions.pod:497
26104 msgid "blockdev-getsz"
26109 #: ../fish/guestfish-actions.pod:499
26112 " blockdev-getsz device\n"
26118 #: ../fish/guestfish-actions.pod:504
26120 "See also L</blockdev-getss> for the real sector size of the device, and L</"
26121 "blockdev-getsize64> for the more useful I<size in bytes>."
26126 #: ../fish/guestfish-actions.pod:510
26127 msgid "blockdev-rereadpt"
26132 #: ../fish/guestfish-actions.pod:512
26135 " blockdev-rereadpt device\n"
26141 #: ../fish/guestfish-actions.pod:518
26142 msgid "blockdev-setbsz"
26147 #: ../fish/guestfish-actions.pod:520
26150 " blockdev-setbsz device blocksize\n"
26156 #: ../fish/guestfish-actions.pod:529
26157 msgid "blockdev-setro"
26162 #: ../fish/guestfish-actions.pod:531
26165 " blockdev-setro device\n"
26171 #: ../fish/guestfish-actions.pod:537
26172 msgid "blockdev-setrw"
26177 #: ../fish/guestfish-actions.pod:539
26180 " blockdev-setrw device\n"
26185 #: ../fish/guestfish-actions.pod:545
26186 msgid "btrfs-filesystem-resize"
26190 #: ../fish/guestfish-actions.pod:547
26193 " btrfs-filesystem-resize mountpoint [size:..]\n"
26199 #: ../fish/guestfish-actions.pod:570
26200 msgid "case-sensitive-path"
26205 #: ../fish/guestfish-actions.pod:572
26208 " case-sensitive-path path\n"
26214 #: ../fish/guestfish-actions.pod:596
26216 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
26217 "WINDOWS/system32\"> (the exact return value would depend on details of how "
26218 "the directories were originally created under Windows)."
26223 #: ../fish/guestfish-actions.pod:604
26224 msgid "See also L</realpath>."
26229 #: ../fish/guestfish-actions.pod:606
26235 #: ../fish/guestfish-actions.pod:608
26244 #: ../fish/guestfish-actions.pod:612
26246 "Note that this function cannot correctly handle binary files (specifically, "
26247 "files containing C<\\0> character which is treated as end of string). For "
26248 "those you need to use the L</read-file> or L</download> functions which have "
26249 "a more complex interface."
26254 #: ../fish/guestfish-actions.pod:620
26260 #: ../fish/guestfish-actions.pod:622
26263 " checksum csumtype path\n"
26269 #: ../fish/guestfish-actions.pod:665
26270 msgid "To get the checksum for a device, use L</checksum-device>."
26275 #: ../fish/guestfish-actions.pod:667
26276 msgid "To get the checksums for many files, use L</checksums-out>."
26281 #: ../fish/guestfish-actions.pod:669
26282 msgid "checksum-device"
26287 #: ../fish/guestfish-actions.pod:671
26290 " checksum-device csumtype device\n"
26296 #: ../fish/guestfish-actions.pod:673
26298 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
26299 "device named C<device>. For the types of checksums supported see the L</"
26300 "checksum> command."
26305 #: ../fish/guestfish-actions.pod:677
26306 msgid "checksums-out"
26311 #: ../fish/guestfish-actions.pod:679
26314 " checksums-out csumtype directory (sumsfile|-)\n"
26320 #: ../fish/guestfish-actions.pod:695
26326 #: ../fish/guestfish-actions.pod:697
26329 " chmod mode path\n"
26335 #: ../fish/guestfish-actions.pod:708
26341 #: ../fish/guestfish-actions.pod:710
26344 " chown owner group path\n"
26350 #: ../fish/guestfish-actions.pod:718
26356 #: ../fish/guestfish-actions.pod:720
26359 " command 'arguments ...'\n"
26365 #: ../fish/guestfish-actions.pod:727
26367 "The single parameter is an argv-style list of arguments. The first element "
26368 "is the name of the program to run. Subsequent elements are parameters. The "
26369 "list must be non-empty (ie. must contain a program name). Note that the "
26370 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
26375 #: ../fish/guestfish-actions.pod:755
26376 msgid "command-lines"
26381 #: ../fish/guestfish-actions.pod:757
26384 " command-lines 'arguments ...'\n"
26390 #: ../fish/guestfish-actions.pod:759
26392 "This is the same as L</command>, but splits the result into a list of lines."
26397 #: ../fish/guestfish-actions.pod:762
26398 msgid "See also: L</sh-lines>"
26403 #: ../fish/guestfish-actions.pod:767
26409 #: ../fish/guestfish-actions.pod:769
26412 " config qemuparam qemuvalue\n"
26418 #: ../fish/guestfish-actions.pod:780
26424 #: ../fish/guestfish-actions.pod:782
26427 " copy-size src dest size\n"
26433 #: ../fish/guestfish-actions.pod:790
26439 #: ../fish/guestfish-actions.pod:792
26448 #: ../fish/guestfish-actions.pod:797
26454 #: ../fish/guestfish-actions.pod:799
26463 #: ../fish/guestfish-actions.pod:804
26469 #: ../fish/guestfish-actions.pod:806
26478 #: ../fish/guestfish-actions.pod:813
26480 "If the destination is a device, it must be as large or larger than the "
26481 "source file or device, otherwise the copy will fail. This command cannot do "
26482 "partial copies (see L</copy-size>)."
26487 #: ../fish/guestfish-actions.pod:817
26493 #: ../fish/guestfish-actions.pod:819
26502 #: ../fish/guestfish-actions.pod:823 ../fish/guestfish-actions.pod:834
26504 "This command is mostly useful for interactive sessions. It is I<not> "
26505 "intended that you try to parse the output string. Use L</statvfs> from "
26511 #: ../fish/guestfish-actions.pod:827
26517 #: ../fish/guestfish-actions.pod:829
26526 #: ../fish/guestfish-actions.pod:838
26532 #: ../fish/guestfish-actions.pod:840
26541 #: ../fish/guestfish-actions.pod:846
26543 "Another way to get the same information is to enable verbose messages with "
26544 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
26545 "before running the program."
26550 #: ../fish/guestfish-actions.pod:851
26556 #: ../fish/guestfish-actions.pod:853
26559 " download remotefilename (filename|-)\n"
26565 #: ../fish/guestfish-actions.pod:860
26566 msgid "See also L</upload>, L</cat>."
26571 #: ../fish/guestfish-actions.pod:864
26572 msgid "download-offset"
26577 #: ../fish/guestfish-actions.pod:866
26580 " download-offset remotefilename (filename|-) offset size\n"
26586 #: ../fish/guestfish-actions.pod:874
26588 "Note that there is no limit on the amount of data that can be downloaded "
26589 "with this call, unlike with L</pread>, and this call always reads the full "
26590 "amount unless an error occurs."
26595 #: ../fish/guestfish-actions.pod:879
26596 msgid "See also L</download>, L</pread>."
26601 #: ../fish/guestfish-actions.pod:883
26602 msgid "drop-caches"
26607 #: ../fish/guestfish-actions.pod:885
26610 " drop-caches whattodrop\n"
26616 #: ../fish/guestfish-actions.pod:897
26622 #: ../fish/guestfish-actions.pod:899
26631 #: ../fish/guestfish-actions.pod:911
26637 #: ../fish/guestfish-actions.pod:913
26640 " e2fsck-f device\n"
26646 #: ../fish/guestfish-actions.pod:919
26648 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
26649 "should use L</fsck>."
26654 #: ../fish/guestfish-actions.pod:922
26655 msgid "echo-daemon"
26660 #: ../fish/guestfish-actions.pod:924
26663 " echo-daemon 'words ...'\n"
26669 #: ../fish/guestfish-actions.pod:931
26670 msgid "See also L</ping-daemon>."
26675 #: ../fish/guestfish-actions.pod:933
26681 #: ../fish/guestfish-actions.pod:935
26684 " egrep regex path\n"
26690 #: ../fish/guestfish-actions.pod:943
26696 #: ../fish/guestfish-actions.pod:945
26699 " egrepi regex path\n"
26705 #: ../fish/guestfish-actions.pod:953
26711 #: ../fish/guestfish-actions.pod:955
26714 " equal file1 file2\n"
26720 #: ../fish/guestfish-actions.pod:962
26726 #: ../fish/guestfish-actions.pod:964
26735 #: ../fish/guestfish-actions.pod:969
26736 msgid "See also L</is-file>, L</is-dir>, L</stat>."
26741 #: ../fish/guestfish-actions.pod:971
26747 #: ../fish/guestfish-actions.pod:973
26750 " fallocate path len\n"
26756 #: ../fish/guestfish-actions.pod:990
26757 msgid "fallocate64"
26762 #: ../fish/guestfish-actions.pod:992
26765 " fallocate64 path len\n"
26771 #: ../fish/guestfish-actions.pod:998
26773 "Note that this call allocates disk blocks for the file. To create a sparse "
26774 "file use L</truncate-size> instead."
26779 #: ../fish/guestfish-actions.pod:1001
26781 "The deprecated call L</fallocate> does the same, but owing to an oversight "
26782 "it only allowed 30 bit lengths to be specified, effectively limiting the "
26783 "maximum size of files created through that call to 1GB."
26788 #: ../fish/guestfish-actions.pod:1010
26794 #: ../fish/guestfish-actions.pod:1012
26797 " fgrep pattern path\n"
26803 #: ../fish/guestfish-actions.pod:1020
26809 #: ../fish/guestfish-actions.pod:1022
26812 " fgrepi pattern path\n"
26818 #: ../fish/guestfish-actions.pod:1030
26824 #: ../fish/guestfish-actions.pod:1032
26832 #: ../fish/guestfish-actions.pod:1048
26834 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
26835 "(etc), L</is-zero>."
26840 #: ../fish/guestfish-actions.pod:1051
26841 msgid "file-architecture"
26846 #: ../fish/guestfish-actions.pod:1053
26849 " file-architecture filename\n"
26855 #: ../fish/guestfish-actions.pod:1156
26861 #: ../fish/guestfish-actions.pod:1158
26870 #: ../fish/guestfish-actions.pod:1162
26872 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
26873 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
26878 #: ../fish/guestfish-actions.pod:1166
26884 #: ../fish/guestfish-actions.pod:1168
26887 " fill c len path\n"
26893 #: ../fish/guestfish-actions.pod:1174
26895 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
26896 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
26897 "L</fill-pattern>."
26902 #: ../fish/guestfish-actions.pod:1179
26903 msgid "fill-pattern"
26908 #: ../fish/guestfish-actions.pod:1181
26911 " fill-pattern pattern len path\n"
26917 #: ../fish/guestfish-actions.pod:1183
26919 "This function is like L</fill> except that it creates a new file of length "
26920 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
26921 "is truncated if necessary to ensure the length of the file is exactly C<len> "
26927 #: ../fish/guestfish-actions.pod:1188
26933 #: ../fish/guestfish-actions.pod:1190
26936 " find directory\n"
26942 #: ../fish/guestfish-actions.pod:1204
26943 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
26948 #: ../fish/guestfish-actions.pod:1217
26949 msgid "See also L</find0>."
26954 #: ../fish/guestfish-actions.pod:1222
26960 #: ../fish/guestfish-actions.pod:1224
26963 " find0 directory (files|-)\n"
26969 #: ../fish/guestfish-actions.pod:1230
26971 "This command works the same way as L</find> with the following exceptions:"
26976 #: ../fish/guestfish-actions.pod:1257
26977 msgid "findfs-label"
26982 #: ../fish/guestfish-actions.pod:1259
26985 " findfs-label label\n"
26991 #: ../fish/guestfish-actions.pod:1265
26992 msgid "To find the label of a filesystem, use L</vfs-label>."
26997 #: ../fish/guestfish-actions.pod:1267
26998 msgid "findfs-uuid"
27003 #: ../fish/guestfish-actions.pod:1269
27006 " findfs-uuid uuid\n"
27012 #: ../fish/guestfish-actions.pod:1275
27013 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
27018 #: ../fish/guestfish-actions.pod:1277
27024 #: ../fish/guestfish-actions.pod:1279
27027 " fsck fstype device\n"
27033 #: ../fish/guestfish-actions.pod:1309
27039 #: ../fish/guestfish-actions.pod:1311
27047 #: ../fish/guestfish-actions.pod:1318
27048 msgid "get-attach-method"
27052 #: ../fish/guestfish-actions.pod:1320
27055 " get-attach-method\n"
27060 #: ../fish/guestfish-actions.pod:1322
27061 msgid "Return the current attach method. See L</set-attach-method>."
27066 #: ../fish/guestfish-actions.pod:1324
27067 msgid "get-autosync"
27072 #: ../fish/guestfish-actions.pod:1326
27081 #: ../fish/guestfish-actions.pod:1330
27087 #: ../fish/guestfish-actions.pod:1332
27096 #: ../fish/guestfish-actions.pod:1336
27097 msgid "get-e2label"
27102 #: ../fish/guestfish-actions.pod:1338
27105 " get-e2label device\n"
27111 #: ../fish/guestfish-actions.pod:1350
27117 #: ../fish/guestfish-actions.pod:1352
27120 " get-e2uuid device\n"
27126 #: ../fish/guestfish-actions.pod:1364
27127 msgid "get-memsize"
27132 #: ../fish/guestfish-actions.pod:1366
27141 #: ../fish/guestfish-actions.pod:1371
27143 "If L</set-memsize> was not called on this handle, and if "
27144 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
27145 "value for memsize."
27150 #: ../fish/guestfish-actions.pod:1378
27151 msgid "get-network"
27156 #: ../fish/guestfish-actions.pod:1380
27165 #: ../fish/guestfish-actions.pod:1384
27171 #: ../fish/guestfish-actions.pod:1386
27179 #: ../fish/guestfish-actions.pod:1393
27184 #: ../fish/guestfish-actions.pod:1395
27193 #: ../fish/guestfish-actions.pod:1399
27199 #: ../fish/guestfish-actions.pod:1401
27205 #: ../fish/guestfish-actions.pod:1403
27214 #: ../fish/guestfish-actions.pod:1410
27220 #: ../fish/guestfish-actions.pod:1412
27229 #: ../fish/guestfish-actions.pod:1419
27230 msgid "get-recovery-proc"
27235 #: ../fish/guestfish-actions.pod:1421
27238 " get-recovery-proc\n"
27244 #: ../fish/guestfish-actions.pod:1425
27245 msgid "get-selinux"
27250 #: ../fish/guestfish-actions.pod:1427
27259 #: ../fish/guestfish-actions.pod:1429
27261 "This returns the current setting of the selinux flag which is passed to the "
27262 "appliance at boot time. See L</set-selinux>."
27267 #: ../fish/guestfish-actions.pod:1435
27273 #: ../fish/guestfish-actions.pod:1437
27282 #: ../fish/guestfish-actions.pod:1444
27288 #: ../fish/guestfish-actions.pod:1446
27297 #: ../fish/guestfish-actions.pod:1450
27303 #: ../fish/guestfish-actions.pod:1452
27312 #: ../fish/guestfish-actions.pod:1454
27314 "Return the current umask. By default the umask is C<022> unless it has been "
27315 "set by calling L</umask>."
27320 #: ../fish/guestfish-actions.pod:1457
27321 msgid "get-verbose"
27326 #: ../fish/guestfish-actions.pod:1459
27335 #: ../fish/guestfish-actions.pod:1463
27341 #: ../fish/guestfish-actions.pod:1465
27350 #: ../fish/guestfish-actions.pod:1469
27351 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
27356 #: ../fish/guestfish-actions.pod:1472
27362 #: ../fish/guestfish-actions.pod:1474
27365 " getxattr path name\n"
27371 #: ../fish/guestfish-actions.pod:1476
27373 "Get a single extended attribute from file C<path> named C<name>. This call "
27374 "follows symlinks. If you want to lookup an extended attribute for the "
27375 "symlink itself, use L</lgetxattr>."
27380 #: ../fish/guestfish-actions.pod:1480 ../fish/guestfish-actions.pod:2507
27382 "Normally it is better to get all extended attributes from a file in one go "
27383 "by calling L</getxattrs>. However some Linux filesystem implementations are "
27384 "buggy and do not provide a way to list out attributes. For these "
27385 "filesystems (notably ntfs-3g) you have to know the names of the extended "
27386 "attributes you want in advance and call this function."
27391 #: ../fish/guestfish-actions.pod:1490
27392 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
27397 #: ../fish/guestfish-actions.pod:1492
27403 #: ../fish/guestfish-actions.pod:1494
27406 " getxattrs path\n"
27412 #: ../fish/guestfish-actions.pod:1502
27413 msgid "See also: L</lgetxattrs>, L<attr(5)>."
27418 #: ../fish/guestfish-actions.pod:1504
27419 msgid "glob-expand"
27424 #: ../fish/guestfish-actions.pod:1506
27427 " glob-expand pattern\n"
27433 #: ../fish/guestfish-actions.pod:1519
27439 #: ../fish/guestfish-actions.pod:1521
27442 " grep regex path\n"
27448 #: ../fish/guestfish-actions.pod:1529
27454 #: ../fish/guestfish-actions.pod:1531
27457 " grepi regex path\n"
27463 #: ../fish/guestfish-actions.pod:1539
27464 msgid "grub-install"
27469 #: ../fish/guestfish-actions.pod:1541
27472 " grub-install root device\n"
27478 #: ../fish/guestfish-actions.pod:1557
27484 #: ../fish/guestfish-actions.pod:1559
27493 #: ../fish/guestfish-actions.pod:1567
27499 #: ../fish/guestfish-actions.pod:1569
27502 " head-n nrlines path\n"
27508 #: ../fish/guestfish-actions.pod:1582
27514 #: ../fish/guestfish-actions.pod:1584
27523 #: ../fish/guestfish-actions.pod:1592
27529 #: ../fish/guestfish-actions.pod:1594
27532 " initrd-cat initrdpath filename\n"
27538 #: ../fish/guestfish-actions.pod:1606
27539 msgid "See also L</initrd-list>."
27544 #: ../fish/guestfish-actions.pod:1611
27545 msgid "initrd-list"
27550 #: ../fish/guestfish-actions.pod:1613
27553 " initrd-list path\n"
27559 #: ../fish/guestfish-actions.pod:1625
27560 msgid "inotify-add-watch"
27565 #: ../fish/guestfish-actions.pod:1627
27568 " inotify-add-watch path mask\n"
27574 #: ../fish/guestfish-actions.pod:1639
27575 msgid "inotify-close"
27580 #: ../fish/guestfish-actions.pod:1641
27589 #: ../fish/guestfish-actions.pod:1647
27590 msgid "inotify-files"
27595 #: ../fish/guestfish-actions.pod:1649
27604 #: ../fish/guestfish-actions.pod:1651
27606 "This function is a helpful wrapper around L</inotify-read> which just "
27607 "returns a list of pathnames of objects that were touched. The returned "
27608 "pathnames are sorted and deduplicated."
27613 #: ../fish/guestfish-actions.pod:1655
27614 msgid "inotify-init"
27619 #: ../fish/guestfish-actions.pod:1657
27622 " inotify-init maxevents\n"
27628 #: ../fish/guestfish-actions.pod:1663
27630 "C<maxevents> is the maximum number of events which will be queued up between "
27631 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
27632 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
27633 "default was 16384 events. Beyond this limit, the kernel throws away events, "
27634 "but records the fact that it threw them away by setting a flag "
27635 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
27640 #: ../fish/guestfish-actions.pod:1673
27642 "Before any events are generated, you have to add some watches to the "
27643 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
27644 "L</inotify-watch-all>."
27649 #: ../fish/guestfish-actions.pod:1679
27651 "Queued up events should be read periodically by calling L</inotify-read> (or "
27652 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
27653 "If you don't read the events out often enough then you risk the internal "
27654 "queue overflowing."
27659 #: ../fish/guestfish-actions.pod:1686
27661 "The handle should be closed after use by calling L</inotify-close>. This "
27662 "also removes any watches automatically."
27667 #: ../fish/guestfish-actions.pod:1695
27668 msgid "inotify-read"
27673 #: ../fish/guestfish-actions.pod:1697
27682 #: ../fish/guestfish-actions.pod:1710
27683 msgid "inotify-rm-watch"
27688 #: ../fish/guestfish-actions.pod:1712
27691 " inotify-rm-watch wd\n"
27697 #: ../fish/guestfish-actions.pod:1714
27698 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
27703 #: ../fish/guestfish-actions.pod:1717
27704 msgid "inspect-get-arch"
27709 #: ../fish/guestfish-actions.pod:1719
27712 " inspect-get-arch root\n"
27718 #: ../fish/guestfish-actions.pod:1721
27720 "This returns the architecture of the inspected operating system. The "
27721 "possible return values are listed under L</file-architecture>."
27726 #: ../fish/guestfish-actions.pod:1730
27727 msgid "inspect-get-distro"
27732 #: ../fish/guestfish-actions.pod:1732
27735 " inspect-get-distro root\n"
27740 #: ../fish/guestfish-actions.pod:1813
27741 msgid "inspect-get-drive-mappings"
27745 #: ../fish/guestfish-actions.pod:1815
27748 " inspect-get-drive-mappings root\n"
27753 #: ../fish/guestfish-actions.pod:1842
27755 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
27756 "get-mountpoints>, L</inspect-get-filesystems>."
27761 #: ../fish/guestfish-actions.pod:1846
27762 msgid "inspect-get-filesystems"
27767 #: ../fish/guestfish-actions.pod:1848
27770 " inspect-get-filesystems root\n"
27776 #: ../fish/guestfish-actions.pod:1858
27778 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
27779 "get-mountpoints>."
27783 #: ../fish/guestfish-actions.pod:1861
27784 msgid "inspect-get-format"
27788 #: ../fish/guestfish-actions.pod:1863
27791 " inspect-get-format root\n"
27797 #: ../fish/guestfish-actions.pod:1892
27798 msgid "inspect-get-hostname"
27803 #: ../fish/guestfish-actions.pod:1894
27806 " inspect-get-hostname root\n"
27811 #: ../fish/guestfish-actions.pod:1904
27812 msgid "inspect-get-icon"
27816 #: ../fish/guestfish-actions.pod:1906
27819 " inspect-get-icon root [favicon:..] [highquality:..]\n"
27825 #: ../fish/guestfish-actions.pod:1970
27826 msgid "inspect-get-major-version"
27831 #: ../fish/guestfish-actions.pod:1972
27834 " inspect-get-major-version root\n"
27840 #: ../fish/guestfish-actions.pod:1988
27841 msgid "inspect-get-minor-version"
27846 #: ../fish/guestfish-actions.pod:1990
27849 " inspect-get-minor-version root\n"
27855 #: ../fish/guestfish-actions.pod:1997
27857 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
27858 "get-major-version>."
27863 #: ../fish/guestfish-actions.pod:2000
27864 msgid "inspect-get-mountpoints"
27869 #: ../fish/guestfish-actions.pod:2002
27872 " inspect-get-mountpoints root\n"
27877 #: ../fish/guestfish-actions.pod:2021
27879 "For operating systems like Windows which still use drive letters, this call "
27880 "will only return an entry for the first drive \"mounted on\" C</>. For "
27881 "information about the mapping of drive letters to partitions, see L</inspect-"
27882 "get-drive-mappings>."
27887 #: ../fish/guestfish-actions.pod:2027
27889 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
27890 "get-filesystems>."
27895 #: ../fish/guestfish-actions.pod:2030
27896 msgid "inspect-get-package-format"
27901 #: ../fish/guestfish-actions.pod:2032
27904 " inspect-get-package-format root\n"
27910 #: ../fish/guestfish-actions.pod:2034
27912 "This function and L</inspect-get-package-management> return the package "
27913 "format and package management tool used by the inspected operating system. "
27914 "For example for Fedora these functions would return C<rpm> (package format) "
27915 "and C<yum> (package management)."
27920 #: ../fish/guestfish-actions.pod:2049
27921 msgid "inspect-get-package-management"
27926 #: ../fish/guestfish-actions.pod:2051
27929 " inspect-get-package-management root\n"
27935 #: ../fish/guestfish-actions.pod:2053
27937 "L</inspect-get-package-format> and this function return the package format "
27938 "and package management tool used by the inspected operating system. For "
27939 "example for Fedora these functions would return C<rpm> (package format) and "
27940 "C<yum> (package management)."
27945 #: ../fish/guestfish-actions.pod:2070
27946 msgid "inspect-get-product-name"
27951 #: ../fish/guestfish-actions.pod:2072
27954 " inspect-get-product-name root\n"
27959 #: ../fish/guestfish-actions.pod:2084
27960 msgid "inspect-get-product-variant"
27964 #: ../fish/guestfish-actions.pod:2086
27967 " inspect-get-product-variant root\n"
27972 #: ../fish/guestfish-actions.pod:2107
27974 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
27975 "get-product-name>, L</inspect-get-major-version>."
27980 #: ../fish/guestfish-actions.pod:2111
27981 msgid "inspect-get-roots"
27986 #: ../fish/guestfish-actions.pod:2113
27989 " inspect-get-roots\n"
27995 #: ../fish/guestfish-actions.pod:2115
27997 "This function is a convenient way to get the list of root devices, as "
27998 "returned from a previous call to L</inspect-os>, but without redoing the "
27999 "whole inspection process."
28004 #: ../fish/guestfish-actions.pod:2119
28006 "This returns an empty list if either no root devices were found or the "
28007 "caller has not called L</inspect-os>."
28012 #: ../fish/guestfish-actions.pod:2124
28013 msgid "inspect-get-type"
28018 #: ../fish/guestfish-actions.pod:2126
28021 " inspect-get-type root\n"
28026 #: ../fish/guestfish-actions.pod:2156
28027 msgid "inspect-get-windows-current-control-set"
28031 #: ../fish/guestfish-actions.pod:2158
28034 " inspect-get-windows-current-control-set root\n"
28040 #: ../fish/guestfish-actions.pod:2169
28041 msgid "inspect-get-windows-systemroot"
28046 #: ../fish/guestfish-actions.pod:2171
28049 " inspect-get-windows-systemroot root\n"
28054 #: ../fish/guestfish-actions.pod:2182
28055 msgid "inspect-is-live"
28059 #: ../fish/guestfish-actions.pod:2184
28062 " inspect-is-live root\n"
28067 #: ../fish/guestfish-actions.pod:2186
28069 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
28070 "then this returns true if a live image was detected on the disk."
28074 #: ../fish/guestfish-actions.pod:2192
28075 msgid "inspect-is-multipart"
28079 #: ../fish/guestfish-actions.pod:2194
28082 " inspect-is-multipart root\n"
28087 #: ../fish/guestfish-actions.pod:2196
28089 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
28090 "then this returns true if the disk is part of a set."
28094 #: ../fish/guestfish-actions.pod:2202
28095 msgid "inspect-is-netinst"
28099 #: ../fish/guestfish-actions.pod:2204
28102 " inspect-is-netinst root\n"
28107 #: ../fish/guestfish-actions.pod:2206
28109 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
28110 "then this returns true if the disk is a network installer, ie. not a self-"
28111 "contained install CD but one which is likely to require network access to "
28112 "complete the install."
28117 #: ../fish/guestfish-actions.pod:2214
28118 msgid "inspect-list-applications"
28123 #: ../fish/guestfish-actions.pod:2216
28126 " inspect-list-applications root\n"
28132 #: ../fish/guestfish-actions.pod:2220
28134 "I<Note:> This call works differently from other parts of the inspection "
28135 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
28136 "then mount up the disks, before calling this. Listing applications is a "
28137 "significantly more difficult operation which requires access to the full "
28138 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
28139 "are just returning data cached in the libguestfs handle, this call actually "
28140 "reads parts of the mounted filesystems during the call."
28145 #: ../fish/guestfish-actions.pod:2310
28151 #: ../fish/guestfish-actions.pod:2312
28160 #: ../fish/guestfish-actions.pod:2327
28162 "You can pass the root string(s) returned to other L</inspect-get-*> "
28163 "functions in order to query further information about each operating system, "
28164 "such as the name and version."
28169 #: ../fish/guestfish-actions.pod:2332
28171 "This function uses other libguestfs features such as L</mount-ro> and L</"
28172 "umount-all> in order to mount and unmount filesystems and look at the "
28173 "contents. This should be called with no disks currently mounted. The "
28174 "function may also use Augeas, so any existing Augeas handle will be closed."
28179 #: ../fish/guestfish-actions.pod:2344 ../fish/guestfish-actions.pod:2542
28180 #: ../fish/guestfish-actions.pod:2601
28181 msgid "See also L</list-filesystems>."
28186 #: ../fish/guestfish-actions.pod:2346
28187 msgid "is-blockdev"
28192 #: ../fish/guestfish-actions.pod:2348
28195 " is-blockdev path\n"
28201 #: ../fish/guestfish-actions.pod:2353 ../fish/guestfish-actions.pod:2371
28202 #: ../fish/guestfish-actions.pod:2390 ../fish/guestfish-actions.pod:2399
28203 #: ../fish/guestfish-actions.pod:2409 ../fish/guestfish-actions.pod:2443
28204 #: ../fish/guestfish-actions.pod:2452
28205 msgid "See also L</stat>."
28210 #: ../fish/guestfish-actions.pod:2355
28216 #: ../fish/guestfish-actions.pod:2357
28225 #: ../fish/guestfish-actions.pod:2364
28231 #: ../fish/guestfish-actions.pod:2366
28234 " is-chardev path\n"
28240 #: ../fish/guestfish-actions.pod:2373
28246 #: ../fish/guestfish-actions.pod:2375
28255 #: ../fish/guestfish-actions.pod:2382
28261 #: ../fish/guestfish-actions.pod:2384
28270 #: ../fish/guestfish-actions.pod:2392
28276 #: ../fish/guestfish-actions.pod:2394
28285 #: ../fish/guestfish-actions.pod:2401
28291 #: ../fish/guestfish-actions.pod:2403
28300 #: ../fish/guestfish-actions.pod:2411
28301 msgid "is-launching"
28306 #: ../fish/guestfish-actions.pod:2413
28315 #: ../fish/guestfish-actions.pod:2420
28321 #: ../fish/guestfish-actions.pod:2422
28330 #: ../fish/guestfish-actions.pod:2427
28336 #: ../fish/guestfish-actions.pod:2429
28345 #: ../fish/guestfish-actions.pod:2436
28351 #: ../fish/guestfish-actions.pod:2438
28354 " is-socket path\n"
28360 #: ../fish/guestfish-actions.pod:2445
28366 #: ../fish/guestfish-actions.pod:2447
28369 " is-symlink path\n"
28374 #: ../fish/guestfish-actions.pod:2454
28379 #: ../fish/guestfish-actions.pod:2456
28387 #: ../fish/guestfish-actions.pod:2461
28388 msgid "is-zero-device"
28392 #: ../fish/guestfish-actions.pod:2463
28395 " is-zero-device device\n"
28401 #: ../fish/guestfish-actions.pod:2469
28402 msgid "kill-subprocess"
28407 #: ../fish/guestfish-actions.pod:2471
28410 " kill-subprocess\n"
28416 #: ../fish/guestfish-actions.pod:2475
28422 #: ../fish/guestfish-actions.pod:2477
28428 #: ../fish/guestfish-actions.pod:2479
28437 #: ../fish/guestfish-actions.pod:2487
28443 #: ../fish/guestfish-actions.pod:2489
28446 " lchown owner group path\n"
28452 #: ../fish/guestfish-actions.pod:2491
28454 "Change the file owner to C<owner> and group to C<group>. This is like L</"
28455 "chown> but if C<path> is a symlink then the link itself is changed, not the "
28461 #: ../fish/guestfish-actions.pod:2499
28467 #: ../fish/guestfish-actions.pod:2501
28470 " lgetxattr path name\n"
28476 #: ../fish/guestfish-actions.pod:2517
28477 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
28482 #: ../fish/guestfish-actions.pod:2519
28488 #: ../fish/guestfish-actions.pod:2521
28491 " lgetxattrs path\n"
28497 #: ../fish/guestfish-actions.pod:2523
28499 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
28500 "it returns the extended attributes of the link itself."
28504 #: ../fish/guestfish-actions.pod:2527
28509 #: ../fish/guestfish-actions.pod:2529
28518 #: ../fish/guestfish-actions.pod:2534
28519 msgid "list-devices"
28524 #: ../fish/guestfish-actions.pod:2536
28532 #: ../fish/guestfish-actions.pod:2544
28533 msgid "list-dm-devices"
28537 #: ../fish/guestfish-actions.pod:2546
28540 " list-dm-devices\n"
28545 #: ../fish/guestfish-actions.pod:2550
28547 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
28548 "previous call to L</luks-open>."
28552 #: ../fish/guestfish-actions.pod:2553
28554 "Device mapper devices which correspond to logical volumes are I<not> "
28555 "returned in this list. Call L</lvs> if you want to list logical volumes."
28560 #: ../fish/guestfish-actions.pod:2557
28561 msgid "list-filesystems"
28566 #: ../fish/guestfish-actions.pod:2559
28569 " list-filesystems\n"
28575 #: ../fish/guestfish-actions.pod:2578
28577 "This command runs other libguestfs commands, which might include L</mount> "
28578 "and L</umount>, and therefore you should use this soon after launch and only "
28579 "when nothing is mounted."
28584 #: ../fish/guestfish-actions.pod:2582
28586 "Not all of the filesystems returned will be mountable. In particular, swap "
28587 "partitions are returned in the list. Also this command does not check that "
28588 "each filesystem found is valid and mountable, and some filesystems might be "
28589 "mountable but require special options. Filesystems may not all belong to a "
28590 "single logical operating system (use L</inspect-os> to look for OSes)."
28595 #: ../fish/guestfish-actions.pod:2590
28596 msgid "list-partitions"
28601 #: ../fish/guestfish-actions.pod:2592
28604 " list-partitions\n"
28610 #: ../fish/guestfish-actions.pod:2598
28612 "This does not return logical volumes. For that you will need to call L</"
28618 #: ../fish/guestfish-actions.pod:2603
28624 #: ../fish/guestfish-actions.pod:2605
28633 #: ../fish/guestfish-actions.pod:2613
28639 #: ../fish/guestfish-actions.pod:2615
28642 " ln target linkname\n"
28648 #: ../fish/guestfish-actions.pod:2619
28654 #: ../fish/guestfish-actions.pod:2621
28657 " ln-f target linkname\n"
28663 #: ../fish/guestfish-actions.pod:2626
28669 #: ../fish/guestfish-actions.pod:2628
28672 " ln-s target linkname\n"
28678 #: ../fish/guestfish-actions.pod:2632
28684 #: ../fish/guestfish-actions.pod:2634
28687 " ln-sf target linkname\n"
28693 #: ../fish/guestfish-actions.pod:2639
28694 msgid "lremovexattr"
28699 #: ../fish/guestfish-actions.pod:2641
28702 " lremovexattr xattr path\n"
28708 #: ../fish/guestfish-actions.pod:2643
28710 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
28711 "it removes an extended attribute of the link itself."
28716 #: ../fish/guestfish-actions.pod:2647
28722 #: ../fish/guestfish-actions.pod:2649
28731 #: ../fish/guestfish-actions.pod:2655
28733 "This command is mostly useful for interactive sessions. Programs should "
28734 "probably use L</readdir> instead."
28739 #: ../fish/guestfish-actions.pod:2658
28745 #: ../fish/guestfish-actions.pod:2660
28748 " lsetxattr xattr val vallen path\n"
28754 #: ../fish/guestfish-actions.pod:2662
28756 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
28757 "sets an extended attribute of the link itself."
28762 #: ../fish/guestfish-actions.pod:2666
28768 #: ../fish/guestfish-actions.pod:2668
28777 #: ../fish/guestfish-actions.pod:2672
28779 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
28780 "the link is stat-ed, not the file it refers to."
28785 #: ../fish/guestfish-actions.pod:2678
28791 #: ../fish/guestfish-actions.pod:2680
28794 " lstatlist path 'names ...'\n"
28800 #: ../fish/guestfish-actions.pod:2682
28802 "This call allows you to perform the L</lstat> operation on multiple files, "
28803 "where all files are in the directory C<path>. C<names> is the list of files "
28804 "from this directory."
28809 #: ../fish/guestfish-actions.pod:2691
28811 "This call is intended for programs that want to efficiently list a directory "
28812 "contents without making many round-trips. See also L</lxattrlist> for a "
28813 "similarly efficient call for getting extended attributes. Very long "
28814 "directory listings might cause the protocol message size to be exceeded, "
28815 "causing this call to fail. The caller must split up such requests into "
28816 "smaller groups of names."
28821 #: ../fish/guestfish-actions.pod:2699
28822 msgid "luks-add-key"
28827 #: ../fish/guestfish-actions.pod:2701
28830 " luks-add-key device keyslot\n"
28836 #: ../fish/guestfish-actions.pod:2708
28838 "Note that if C<keyslot> already contains a key, then this command will "
28839 "fail. You have to use L</luks-kill-slot> first to remove that key."
28844 #: ../fish/guestfish-actions.pod:2712 ../fish/guestfish-actions.pod:2734
28845 #: ../fish/guestfish-actions.pod:2747 ../fish/guestfish-actions.pod:2761
28846 #: ../fish/guestfish-actions.pod:2787 ../fish/guestfish-actions.pod:2797
28848 "This command has one or more key or passphrase parameters. Guestfish will "
28849 "prompt for these separately."
28854 #: ../fish/guestfish-actions.pod:2715
28860 #: ../fish/guestfish-actions.pod:2717
28863 " luks-close device\n"
28869 #: ../fish/guestfish-actions.pod:2719
28871 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
28872 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
28873 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
28879 #: ../fish/guestfish-actions.pod:2725
28880 msgid "luks-format"
28885 #: ../fish/guestfish-actions.pod:2727
28888 " luks-format device keyslot\n"
28894 #: ../fish/guestfish-actions.pod:2740
28895 msgid "luks-format-cipher"
28900 #: ../fish/guestfish-actions.pod:2742
28903 " luks-format-cipher device keyslot cipher\n"
28909 #: ../fish/guestfish-actions.pod:2744
28911 "This command is the same as L</luks-format> but it also allows you to set "
28912 "the C<cipher> used."
28917 #: ../fish/guestfish-actions.pod:2753
28918 msgid "luks-kill-slot"
28923 #: ../fish/guestfish-actions.pod:2755
28926 " luks-kill-slot device keyslot\n"
28932 #: ../fish/guestfish-actions.pod:2764
28938 #: ../fish/guestfish-actions.pod:2766
28941 " luks-open device mapname\n"
28947 #: ../fish/guestfish-actions.pod:2780
28949 "If this block device contains LVM volume groups, then calling L</vgscan> "
28950 "followed by L</vg-activate-all> will make them visible."
28954 #: ../fish/guestfish-actions.pod:2784
28955 msgid "Use L</list-dm-devices> to list all device mapper devices."
28960 #: ../fish/guestfish-actions.pod:2790
28961 msgid "luks-open-ro"
28966 #: ../fish/guestfish-actions.pod:2792
28969 " luks-open-ro device mapname\n"
28975 #: ../fish/guestfish-actions.pod:2794
28977 "This is the same as L</luks-open> except that a read-only mapping is created."
28982 #: ../fish/guestfish-actions.pod:2800
28988 #: ../fish/guestfish-actions.pod:2802
28991 " lvcreate logvol volgroup mbytes\n"
28997 #: ../fish/guestfish-actions.pod:2807
28998 msgid "lvm-canonical-lv-name"
29003 #: ../fish/guestfish-actions.pod:2809
29006 " lvm-canonical-lv-name lvname\n"
29012 #: ../fish/guestfish-actions.pod:2818
29013 msgid "See also L</is-lv>."
29018 #: ../fish/guestfish-actions.pod:2820
29019 msgid "lvm-clear-filter"
29024 #: ../fish/guestfish-actions.pod:2822
29027 " lvm-clear-filter\n"
29033 #: ../fish/guestfish-actions.pod:2824
29035 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
29041 #: ../fish/guestfish-actions.pod:2830
29042 msgid "lvm-remove-all"
29047 #: ../fish/guestfish-actions.pod:2832
29050 " lvm-remove-all\n"
29056 #: ../fish/guestfish-actions.pod:2840
29057 msgid "lvm-set-filter"
29062 #: ../fish/guestfish-actions.pod:2842
29065 " lvm-set-filter 'devices ...'\n"
29071 #: ../fish/guestfish-actions.pod:2867
29077 #: ../fish/guestfish-actions.pod:2869
29080 " lvremove device\n"
29086 #: ../fish/guestfish-actions.pod:2877
29092 #: ../fish/guestfish-actions.pod:2879
29095 " lvrename logvol newlogvol\n"
29101 #: ../fish/guestfish-actions.pod:2883
29107 #: ../fish/guestfish-actions.pod:2885
29110 " lvresize device mbytes\n"
29116 #: ../fish/guestfish-actions.pod:2891
29117 msgid "lvresize-free"
29122 #: ../fish/guestfish-actions.pod:2893
29125 " lvresize-free lv percent\n"
29131 #: ../fish/guestfish-actions.pod:2901
29137 #: ../fish/guestfish-actions.pod:2903
29146 #: ../fish/guestfish-actions.pod:2911
29147 msgid "See also L</lvs-full>, L</list-filesystems>."
29152 #: ../fish/guestfish-actions.pod:2913
29158 #: ../fish/guestfish-actions.pod:2915
29167 #: ../fish/guestfish-actions.pod:2920
29173 #: ../fish/guestfish-actions.pod:2922
29182 #: ../fish/guestfish-actions.pod:2926
29188 #: ../fish/guestfish-actions.pod:2928
29191 " lxattrlist path 'names ...'\n"
29197 #: ../fish/guestfish-actions.pod:2944
29199 "This call is intended for programs that want to efficiently list a directory "
29200 "contents without making many round-trips. See also L</lstatlist> for a "
29201 "similarly efficient call for getting standard stats. Very long directory "
29202 "listings might cause the protocol message size to be exceeded, causing this "
29203 "call to fail. The caller must split up such requests into smaller groups of "
29209 #: ../fish/guestfish-actions.pod:2952
29215 #: ../fish/guestfish-actions.pod:2954
29224 #: ../fish/guestfish-actions.pod:2958
29230 #: ../fish/guestfish-actions.pod:2960
29233 " mkdir-mode path mode\n"
29239 #: ../fish/guestfish-actions.pod:2969
29240 msgid "See also L</mkdir>, L</umask>"
29245 #: ../fish/guestfish-actions.pod:2971
29251 #: ../fish/guestfish-actions.pod:2973
29260 #: ../fish/guestfish-actions.pod:2978
29266 #: ../fish/guestfish-actions.pod:2980
29269 " mkdtemp template\n"
29275 #: ../fish/guestfish-actions.pod:3001
29281 #: ../fish/guestfish-actions.pod:3003
29284 " mke2fs-J fstype blocksize device journal\n"
29290 #: ../fish/guestfish-actions.pod:3011
29291 msgid "See also L</mke2journal>."
29296 #: ../fish/guestfish-actions.pod:3013
29302 #: ../fish/guestfish-actions.pod:3015
29305 " mke2fs-JL fstype blocksize device label\n"
29311 #: ../fish/guestfish-actions.pod:3020
29312 msgid "See also L</mke2journal-L>."
29317 #: ../fish/guestfish-actions.pod:3022
29323 #: ../fish/guestfish-actions.pod:3024
29326 " mke2fs-JU fstype blocksize device uuid\n"
29332 #: ../fish/guestfish-actions.pod:3029
29333 msgid "See also L</mke2journal-U>."
29338 #: ../fish/guestfish-actions.pod:3031
29339 msgid "mke2journal"
29344 #: ../fish/guestfish-actions.pod:3033
29347 " mke2journal blocksize device\n"
29353 #: ../fish/guestfish-actions.pod:3040
29354 msgid "mke2journal-L"
29359 #: ../fish/guestfish-actions.pod:3042
29362 " mke2journal-L blocksize label device\n"
29368 #: ../fish/guestfish-actions.pod:3046
29369 msgid "mke2journal-U"
29374 #: ../fish/guestfish-actions.pod:3048
29377 " mke2journal-U blocksize uuid device\n"
29383 #: ../fish/guestfish-actions.pod:3052
29389 #: ../fish/guestfish-actions.pod:3054
29392 " mkfifo mode path\n"
29398 #: ../fish/guestfish-actions.pod:3056
29400 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
29401 "is just a convenient wrapper around L</mknod>."
29406 #: ../fish/guestfish-actions.pod:3062
29412 #: ../fish/guestfish-actions.pod:3064
29415 " mkfs fstype device\n"
29421 #: ../fish/guestfish-actions.pod:3070
29427 #: ../fish/guestfish-actions.pod:3072
29430 " mkfs-b fstype blocksize device\n"
29436 #: ../fish/guestfish-actions.pod:3074
29438 "This call is similar to L</mkfs>, but it allows you to control the block "
29439 "size of the resulting filesystem. Supported block sizes depend on the "
29440 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
29445 #: ../fish/guestfish-actions.pod:3089
29450 #: ../fish/guestfish-actions.pod:3091
29453 " mkfs-opts fstype device [blocksize:..] [features:..] [inode:..] [sectorsize:..]\n"
29459 #: ../fish/guestfish-actions.pod:3136
29460 msgid "mkmountpoint"
29465 #: ../fish/guestfish-actions.pod:3138
29468 " mkmountpoint exemptpath\n"
29474 #: ../fish/guestfish-actions.pod:3140
29476 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
29477 "to create extra mountpoints before mounting the first filesystem."
29482 #: ../fish/guestfish-actions.pod:3164
29484 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
29485 "unexpected errors if you try to mix these calls. It is safest to manually "
29486 "unmount filesystems and remove mountpoints after use."
29491 #: ../fish/guestfish-actions.pod:3168
29493 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
29494 "for this to work for manual mountpoints, you must ensure that the innermost "
29495 "mountpoints have the longest pathnames, as in the example code above."
29499 #: ../fish/guestfish-actions.pod:3175
29501 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
29502 "L</umount-all> to be called when the handle is closed which can also trigger "
29508 #: ../fish/guestfish-actions.pod:3179
29514 #: ../fish/guestfish-actions.pod:3181
29517 " mknod mode devmajor devminor path\n"
29523 #: ../fish/guestfish-actions.pod:3191
29525 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
29526 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
29527 "regular file). These constants are available in the standard Linux header "
29528 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
29529 "wrappers around this command which bitwise OR in the appropriate constant "
29535 #: ../fish/guestfish-actions.pod:3201
29541 #: ../fish/guestfish-actions.pod:3203
29544 " mknod-b mode devmajor devminor path\n"
29550 #: ../fish/guestfish-actions.pod:3205
29552 "This call creates a block device node called C<path> with mode C<mode> and "
29553 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
29554 "wrapper around L</mknod>."
29559 #: ../fish/guestfish-actions.pod:3211
29565 #: ../fish/guestfish-actions.pod:3213
29568 " mknod-c mode devmajor devminor path\n"
29574 #: ../fish/guestfish-actions.pod:3215
29576 "This call creates a char device node called C<path> with mode C<mode> and "
29577 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
29578 "wrapper around L</mknod>."
29583 #: ../fish/guestfish-actions.pod:3221
29589 #: ../fish/guestfish-actions.pod:3223
29598 #: ../fish/guestfish-actions.pod:3227
29604 #: ../fish/guestfish-actions.pod:3229
29607 " mkswap-L label device\n"
29613 #: ../fish/guestfish-actions.pod:3237
29619 #: ../fish/guestfish-actions.pod:3239
29622 " mkswap-U uuid device\n"
29628 #: ../fish/guestfish-actions.pod:3243
29629 msgid "mkswap-file"
29634 #: ../fish/guestfish-actions.pod:3245
29637 " mkswap-file path\n"
29643 #: ../fish/guestfish-actions.pod:3249
29645 "This command just writes a swap file signature to an existing file. To "
29646 "create the file itself, use something like L</fallocate>."
29651 #: ../fish/guestfish-actions.pod:3252
29657 #: ../fish/guestfish-actions.pod:3254
29660 " modprobe modulename\n"
29666 #: ../fish/guestfish-actions.pod:3261
29672 #: ../fish/guestfish-actions.pod:3263
29675 " mount device mountpoint\n"
29681 #: ../fish/guestfish-actions.pod:3279
29683 "B<Important note:> When you use this call, the filesystem options C<sync> "
29684 "and C<noatime> are set implicitly. This was originally done because we "
29685 "thought it would improve reliability, but it turns out that I<-o sync> has a "
29686 "very large negative performance impact and negligible effect on "
29687 "reliability. Therefore we recommend that you avoid using L</mount> in any "
29688 "code that needs performance, and instead use L</mount-options> (use an empty "
29689 "string for the first parameter if you don't want any options)."
29693 #: ../fish/guestfish-actions.pod:3296
29698 #: ../fish/guestfish-actions.pod:3298
29701 " mount-9p mounttag mountpoint [options:..]\n"
29707 #: ../fish/guestfish-actions.pod:3309
29713 #: ../fish/guestfish-actions.pod:3311
29716 " mount-loop file mountpoint\n"
29722 #: ../fish/guestfish-actions.pod:3317
29723 msgid "mount-options"
29728 #: ../fish/guestfish-actions.pod:3319
29731 " mount-options options device mountpoint\n"
29737 #: ../fish/guestfish-actions.pod:3321
29739 "This is the same as the L</mount> command, but it allows you to set the "
29740 "mount options as for the L<mount(8)> I<-o> flag."
29745 #: ../fish/guestfish-actions.pod:3329
29751 #: ../fish/guestfish-actions.pod:3331
29754 " mount-ro device mountpoint\n"
29760 #: ../fish/guestfish-actions.pod:3333
29762 "This is the same as the L</mount> command, but it mounts the filesystem with "
29763 "the read-only (I<-o ro>) flag."
29768 #: ../fish/guestfish-actions.pod:3336
29774 #: ../fish/guestfish-actions.pod:3338
29777 " mount-vfs options vfstype device mountpoint\n"
29783 #: ../fish/guestfish-actions.pod:3340
29785 "This is the same as the L</mount> command, but it allows you to set both the "
29786 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
29791 #: ../fish/guestfish-actions.pod:3344
29792 msgid "mountpoints"
29797 #: ../fish/guestfish-actions.pod:3346
29806 #: ../fish/guestfish-actions.pod:3348
29808 "This call is similar to L</mounts>. That call returns a list of devices. "
29809 "This one returns a hash table (map) of device name to directory where the "
29810 "device is mounted."
29815 #: ../fish/guestfish-actions.pod:3352
29821 #: ../fish/guestfish-actions.pod:3354
29830 #: ../fish/guestfish-actions.pod:3361
29831 msgid "See also: L</mountpoints>"
29836 #: ../fish/guestfish-actions.pod:3363
29842 #: ../fish/guestfish-actions.pod:3365
29851 #: ../fish/guestfish-actions.pod:3370
29852 msgid "ntfs-3g-probe"
29857 #: ../fish/guestfish-actions.pod:3372
29860 " ntfs-3g-probe true|false device\n"
29866 #: ../fish/guestfish-actions.pod:3386
29872 #: ../fish/guestfish-actions.pod:3388
29875 " ntfsresize device\n"
29880 #: ../fish/guestfish-actions.pod:3410
29881 msgid "ntfsresize-opts"
29885 #: ../fish/guestfish-actions.pod:3412
29888 " ntfsresize-opts device [size:..] [force:..]\n"
29893 #: ../fish/guestfish-actions.pod:3431
29895 "After the resize operation, the filesystem is always marked as requiring a "
29896 "consistency check (for safety). You have to boot into Windows to perform "
29897 "this check and clear this condition. If you I<don't> set the C<force> "
29898 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
29899 "a single filesystem without booting into Windows between each resize."
29904 #: ../fish/guestfish-actions.pod:3444
29905 msgid "ntfsresize-size"
29910 #: ../fish/guestfish-actions.pod:3446
29913 " ntfsresize-size device size\n"
29919 #: ../fish/guestfish-actions.pod:3448
29921 "This command is the same as L</ntfsresize> except that it allows you to "
29922 "specify the new size (in bytes) explicitly."
29927 #: ../fish/guestfish-actions.pod:3458
29933 #: ../fish/guestfish-actions.pod:3460
29936 " part-add device prlogex startsect endsect\n"
29942 #: ../fish/guestfish-actions.pod:3462
29944 "This command adds a partition to C<device>. If there is no partition table "
29945 "on the device, call L</part-init> first."
29950 #: ../fish/guestfish-actions.pod:3474
29952 "Creating a partition which covers the whole disk is not so easy. Use L</"
29953 "part-disk> to do that."
29958 #: ../fish/guestfish-actions.pod:3477
29964 #: ../fish/guestfish-actions.pod:3479
29967 " part-del device partnum\n"
29973 #: ../fish/guestfish-actions.pod:3487
29979 #: ../fish/guestfish-actions.pod:3489
29982 " part-disk device parttype\n"
29988 #: ../fish/guestfish-actions.pod:3491
29990 "This command is simply a combination of L</part-init> followed by L</part-"
29991 "add> to create a single primary partition covering the whole disk."
29996 #: ../fish/guestfish-actions.pod:3495
29998 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
29999 "possible values are described in L</part-init>."
30004 #: ../fish/guestfish-actions.pod:3501
30005 msgid "part-get-bootable"
30010 #: ../fish/guestfish-actions.pod:3503
30013 " part-get-bootable device partnum\n"
30019 #: ../fish/guestfish-actions.pod:3508
30020 msgid "See also L</part-set-bootable>."
30025 #: ../fish/guestfish-actions.pod:3510
30026 msgid "part-get-mbr-id"
30031 #: ../fish/guestfish-actions.pod:3512
30034 " part-get-mbr-id device partnum\n"
30040 #: ../fish/guestfish-actions.pod:3517 ../fish/guestfish-actions.pod:3655
30042 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
30043 "undefined results for other partition table types (see L</part-get-"
30049 #: ../fish/guestfish-actions.pod:3521
30050 msgid "part-get-parttype"
30055 #: ../fish/guestfish-actions.pod:3523
30058 " part-get-parttype device\n"
30064 #: ../fish/guestfish-actions.pod:3528
30066 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
30067 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
30068 "possible, although unusual. See L</part-init> for a full list."
30073 #: ../fish/guestfish-actions.pod:3533
30079 #: ../fish/guestfish-actions.pod:3535
30082 " part-init device parttype\n"
30088 #: ../fish/guestfish-actions.pod:3541
30090 "Initially there are no partitions. Following this, you should call L</part-"
30091 "add> for each partition required."
30096 #: ../fish/guestfish-actions.pod:3604
30102 #: ../fish/guestfish-actions.pod:3606
30105 " part-list device\n"
30111 #: ../fish/guestfish-actions.pod:3621
30113 "Start of the partition I<in bytes>. To get sectors you have to divide by "
30114 "the device's sector size, see L</blockdev-getss>."
30119 #: ../fish/guestfish-actions.pod:3634
30120 msgid "part-set-bootable"
30125 #: ../fish/guestfish-actions.pod:3636
30128 " part-set-bootable device partnum true|false\n"
30134 #: ../fish/guestfish-actions.pod:3645
30135 msgid "part-set-mbr-id"
30140 #: ../fish/guestfish-actions.pod:3647
30143 " part-set-mbr-id device partnum idbyte\n"
30149 #: ../fish/guestfish-actions.pod:3659
30150 msgid "part-set-name"
30155 #: ../fish/guestfish-actions.pod:3661
30158 " part-set-name device partnum name\n"
30164 #: ../fish/guestfish-actions.pod:3669
30165 msgid "part-to-dev"
30170 #: ../fish/guestfish-actions.pod:3671
30173 " part-to-dev partition\n"
30179 #: ../fish/guestfish-actions.pod:3677
30181 "The named partition must exist, for example as a string returned from L</"
30182 "list-partitions>."
30187 #: ../fish/guestfish-actions.pod:3680
30188 msgid "ping-daemon"
30193 #: ../fish/guestfish-actions.pod:3682
30202 #: ../fish/guestfish-actions.pod:3689
30208 #: ../fish/guestfish-actions.pod:3691
30211 " pread path count offset\n"
30217 #: ../fish/guestfish-actions.pod:3699
30218 msgid "See also L</pwrite>, L</pread-device>."
30223 #: ../fish/guestfish-actions.pod:3704
30224 msgid "pread-device"
30229 #: ../fish/guestfish-actions.pod:3706
30232 " pread-device device count offset\n"
30238 #: ../fish/guestfish-actions.pod:3714
30239 msgid "See also L</pread>."
30244 #: ../fish/guestfish-actions.pod:3719
30250 #: ../fish/guestfish-actions.pod:3721
30253 " pvcreate device\n"
30259 #: ../fish/guestfish-actions.pod:3727
30265 #: ../fish/guestfish-actions.pod:3729
30268 " pvremove device\n"
30274 #: ../fish/guestfish-actions.pod:3738
30280 #: ../fish/guestfish-actions.pod:3740
30283 " pvresize device\n"
30289 #: ../fish/guestfish-actions.pod:3745
30290 msgid "pvresize-size"
30295 #: ../fish/guestfish-actions.pod:3747
30298 " pvresize-size device size\n"
30304 #: ../fish/guestfish-actions.pod:3749
30306 "This command is the same as L</pvresize> except that it allows you to "
30307 "specify the new size (in bytes) explicitly."
30312 #: ../fish/guestfish-actions.pod:3752
30318 #: ../fish/guestfish-actions.pod:3754
30327 #: ../fish/guestfish-actions.pod:3762
30328 msgid "See also L</pvs-full>."
30333 #: ../fish/guestfish-actions.pod:3764
30339 #: ../fish/guestfish-actions.pod:3766
30348 #: ../fish/guestfish-actions.pod:3771
30354 #: ../fish/guestfish-actions.pod:3773
30363 #: ../fish/guestfish-actions.pod:3777
30369 #: ../fish/guestfish-actions.pod:3779
30372 " pwrite path content offset\n"
30378 #: ../fish/guestfish-actions.pod:3790
30379 msgid "See also L</pread>, L</pwrite-device>."
30384 #: ../fish/guestfish-actions.pod:3795
30385 msgid "pwrite-device"
30390 #: ../fish/guestfish-actions.pod:3797
30393 " pwrite-device device content offset\n"
30399 #: ../fish/guestfish-actions.pod:3807
30400 msgid "See also L</pwrite>."
30405 #: ../fish/guestfish-actions.pod:3812
30411 #: ../fish/guestfish-actions.pod:3814
30414 " read-file path\n"
30420 #: ../fish/guestfish-actions.pod:3819
30422 "Unlike L</cat>, this function can correctly handle files that contain "
30423 "embedded ASCII NUL characters. However unlike L</download>, this function "
30424 "is limited in the total size of file that can be handled."
30429 #: ../fish/guestfish-actions.pod:3827
30435 #: ../fish/guestfish-actions.pod:3829
30438 " read-lines path\n"
30444 #: ../fish/guestfish-actions.pod:3836
30446 "Note that this function cannot correctly handle binary files (specifically, "
30447 "files containing C<\\0> character which is treated as end of line). For "
30448 "those you need to use the L</read-file> function which has a more complex "
30454 #: ../fish/guestfish-actions.pod:3841
30460 #: ../fish/guestfish-actions.pod:3843
30469 #: ../fish/guestfish-actions.pod:3895
30471 "This function is primarily intended for use by programs. To get a simple "
30472 "list of names, use L</ls>. To get a printable directory for human "
30473 "consumption, use L</ll>."
30478 #: ../fish/guestfish-actions.pod:3899
30484 #: ../fish/guestfish-actions.pod:3901
30493 #: ../fish/guestfish-actions.pod:3905
30494 msgid "readlinklist"
30499 #: ../fish/guestfish-actions.pod:3907
30502 " readlinklist path 'names ...'\n"
30508 #: ../fish/guestfish-actions.pod:3931
30514 #: ../fish/guestfish-actions.pod:3933
30523 #: ../fish/guestfish-actions.pod:3938
30524 msgid "removexattr"
30529 #: ../fish/guestfish-actions.pod:3940
30532 " removexattr xattr path\n"
30538 #: ../fish/guestfish-actions.pod:3945
30539 msgid "See also: L</lremovexattr>, L<attr(5)>."
30544 #: ../fish/guestfish-actions.pod:3947
30550 #: ../fish/guestfish-actions.pod:3949
30553 " resize2fs device\n"
30559 #: ../fish/guestfish-actions.pod:3954
30561 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
30562 "before calling this command. For unknown reasons C<resize2fs> sometimes "
30563 "gives an error about this and sometimes not. In any case, it is always safe "
30564 "to call L</e2fsck-f> before calling this function."
30568 #: ../fish/guestfish-actions.pod:3960
30569 msgid "resize2fs-M"
30573 #: ../fish/guestfish-actions.pod:3962
30576 " resize2fs-M device\n"
30581 #: ../fish/guestfish-actions.pod:3964
30583 "This command is the same as L</resize2fs>, but the filesystem is resized to "
30584 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
30589 #: ../fish/guestfish-actions.pod:3968
30591 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
30592 "and read the C<Block size> and C<Block count> values. These two numbers, "
30593 "multiplied together, give the resulting size of the minimal filesystem in "
30599 #: ../fish/guestfish-actions.pod:3973
30600 msgid "resize2fs-size"
30605 #: ../fish/guestfish-actions.pod:3975
30608 " resize2fs-size device size\n"
30614 #: ../fish/guestfish-actions.pod:3977
30616 "This command is the same as L</resize2fs> except that it allows you to "
30617 "specify the new size (in bytes) explicitly."
30622 #: ../fish/guestfish-actions.pod:3980
30628 #: ../fish/guestfish-actions.pod:3982
30637 #: ../fish/guestfish-actions.pod:3986
30643 #: ../fish/guestfish-actions.pod:3988
30652 #: ../fish/guestfish-actions.pod:3994
30658 #: ../fish/guestfish-actions.pod:3996
30667 #: ../fish/guestfish-actions.pod:4000
30668 msgid "rmmountpoint"
30673 #: ../fish/guestfish-actions.pod:4002
30676 " rmmountpoint exemptpath\n"
30682 #: ../fish/guestfish-actions.pod:4004
30684 "This calls removes a mountpoint that was previously created with L</"
30685 "mkmountpoint>. See L</mkmountpoint> for full details."
30690 #: ../fish/guestfish-actions.pod:4008
30691 msgid "scrub-device"
30696 #: ../fish/guestfish-actions.pod:4010
30699 " scrub-device device\n"
30705 #: ../fish/guestfish-actions.pod:4021
30711 #: ../fish/guestfish-actions.pod:4023
30714 " scrub-file file\n"
30720 #: ../fish/guestfish-actions.pod:4033
30721 msgid "scrub-freespace"
30726 #: ../fish/guestfish-actions.pod:4035
30729 " scrub-freespace dir\n"
30735 #: ../fish/guestfish-actions.pod:4037
30737 "This command creates the directory C<dir> and then fills it with files until "
30738 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
30739 "deletes them. The intention is to scrub any free space on the partition "
30740 "containing C<dir>."
30745 #: ../fish/guestfish-actions.pod:4046
30751 #: ../fish/guestfish-actions.pod:4048
30757 #: ../fish/guestfish-actions.pod:4050
30760 " set-append append\n"
30765 #: ../fish/guestfish-actions.pod:4061
30766 msgid "set-attach-method"
30770 #: ../fish/guestfish-actions.pod:4063
30771 msgid "attach-method"
30775 #: ../fish/guestfish-actions.pod:4065
30778 " set-attach-method attachmethod\n"
30784 #: ../fish/guestfish-actions.pod:4087
30785 msgid "set-autosync"
30790 #: ../fish/guestfish-actions.pod:4089
30796 #: ../fish/guestfish-actions.pod:4091
30799 " set-autosync true|false\n"
30805 #: ../fish/guestfish-actions.pod:4101
30811 #: ../fish/guestfish-actions.pod:4103
30817 #: ../fish/guestfish-actions.pod:4105
30820 " set-direct true|false\n"
30826 #: ../fish/guestfish-actions.pod:4111
30828 "One consequence of this is that log messages aren't caught by the library "
30829 "and handled by L</set-log-message-callback>, but go straight to stdout."
30834 #: ../fish/guestfish-actions.pod:4120
30835 msgid "set-e2label"
30840 #: ../fish/guestfish-actions.pod:4122
30843 " set-e2label device label\n"
30849 #: ../fish/guestfish-actions.pod:4128
30851 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
30852 "label on a filesystem."
30857 #: ../fish/guestfish-actions.pod:4131
30863 #: ../fish/guestfish-actions.pod:4133
30866 " set-e2uuid device uuid\n"
30872 #: ../fish/guestfish-actions.pod:4140
30874 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
30875 "UUID of a filesystem."
30880 #: ../fish/guestfish-actions.pod:4143
30881 msgid "set-memsize"
30886 #: ../fish/guestfish-actions.pod:4145
30892 #: ../fish/guestfish-actions.pod:4147
30895 " set-memsize memsize\n"
30901 #: ../fish/guestfish-actions.pod:4149
30903 "This sets the memory size in megabytes allocated to the qemu subprocess. "
30904 "This only has any effect if called before L</launch>."
30909 #: ../fish/guestfish-actions.pod:4160
30910 msgid "set-network"
30915 #: ../fish/guestfish-actions.pod:4162
30921 #: ../fish/guestfish-actions.pod:4164
30924 " set-network true|false\n"
30930 #: ../fish/guestfish-actions.pod:4172
30932 "You must call this before calling L</launch>, otherwise it has no effect."
30937 #: ../fish/guestfish-actions.pod:4175
30943 #: ../fish/guestfish-actions.pod:4177
30949 #: ../fish/guestfish-actions.pod:4179
30952 " set-path searchpath\n"
30957 #: ../fish/guestfish-actions.pod:4188
30962 #: ../fish/guestfish-actions.pod:4190
30967 #: ../fish/guestfish-actions.pod:4192
30970 " set-pgroup true|false\n"
30976 #: ../fish/guestfish-actions.pod:4203
30982 #: ../fish/guestfish-actions.pod:4205
30988 #: ../fish/guestfish-actions.pod:4207
30997 #: ../fish/guestfish-actions.pod:4227
30998 msgid "set-recovery-proc"
31003 #: ../fish/guestfish-actions.pod:4229
31004 msgid "recovery-proc"
31009 #: ../fish/guestfish-actions.pod:4231
31012 " set-recovery-proc true|false\n"
31018 #: ../fish/guestfish-actions.pod:4233
31020 "If this is called with the parameter C<false> then L</launch> does not "
31021 "create a recovery process. The purpose of the recovery process is to stop "
31022 "runaway qemu processes in the case where the main program aborts abruptly."
31027 #: ../fish/guestfish-actions.pod:4238
31029 "This only has any effect if called before L</launch>, and the default is "
31035 #: ../fish/guestfish-actions.pod:4247
31036 msgid "set-selinux"
31041 #: ../fish/guestfish-actions.pod:4249
31047 #: ../fish/guestfish-actions.pod:4251
31050 " set-selinux true|false\n"
31056 #: ../fish/guestfish-actions.pod:4262
31062 #: ../fish/guestfish-actions.pod:4264
31068 #: ../fish/guestfish-actions.pod:4266
31071 " set-trace true|false\n"
31076 #: ../fish/guestfish-actions.pod:4278
31078 "Trace messages are normally sent to C<stderr>, unless you register a "
31079 "callback to send them somewhere else (see L</set-event-callback>)."
31084 #: ../fish/guestfish-actions.pod:4282
31085 msgid "set-verbose"
31090 #: ../fish/guestfish-actions.pod:4284
31096 #: ../fish/guestfish-actions.pod:4286
31099 " set-verbose true|false\n"
31104 #: ../fish/guestfish-actions.pod:4293
31106 "Verbose messages are normally sent to C<stderr>, unless you register a "
31107 "callback to send them somewhere else (see L</set-event-callback>)."
31112 #: ../fish/guestfish-actions.pod:4297
31118 #: ../fish/guestfish-actions.pod:4299
31121 " setcon context\n"
31127 #: ../fish/guestfish-actions.pod:4306
31133 #: ../fish/guestfish-actions.pod:4308
31136 " setxattr xattr val vallen path\n"
31142 #: ../fish/guestfish-actions.pod:4314
31143 msgid "See also: L</lsetxattr>, L<attr(5)>."
31148 #: ../fish/guestfish-actions.pod:4316
31154 #: ../fish/guestfish-actions.pod:4318
31157 " sfdisk device cyls heads sectors 'lines ...'\n"
31163 #: ../fish/guestfish-actions.pod:4340
31164 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
31169 #: ../fish/guestfish-actions.pod:4353
31175 #: ../fish/guestfish-actions.pod:4355
31178 " sfdiskM device 'lines ...'\n"
31184 #: ../fish/guestfish-actions.pod:4357
31186 "This is a simplified interface to the L</sfdisk> command, where partition "
31187 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
31188 "you don't need to specify the cyls, heads and sectors parameters which were "
31189 "rarely if ever used anyway."
31194 #: ../fish/guestfish-actions.pod:4363
31195 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
31200 #: ../fish/guestfish-actions.pod:4376
31206 #: ../fish/guestfish-actions.pod:4378
31209 " sfdisk-N device partnum cyls heads sectors line\n"
31215 #: ../fish/guestfish-actions.pod:4383
31217 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
31218 "cyls/heads/sectors parameters."
31223 #: ../fish/guestfish-actions.pod:4386
31224 msgid "See also: L</part-add>"
31229 #: ../fish/guestfish-actions.pod:4398
31230 msgid "sfdisk-disk-geometry"
31235 #: ../fish/guestfish-actions.pod:4400
31238 " sfdisk-disk-geometry device\n"
31244 #: ../fish/guestfish-actions.pod:4402
31246 "This displays the disk geometry of C<device> read from the partition table. "
31247 "Especially in the case where the underlying block device has been resized, "
31248 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
31249 "kernel-geometry>)."
31254 #: ../fish/guestfish-actions.pod:4410
31255 msgid "sfdisk-kernel-geometry"
31260 #: ../fish/guestfish-actions.pod:4412
31263 " sfdisk-kernel-geometry device\n"
31269 #: ../fish/guestfish-actions.pod:4419
31275 #: ../fish/guestfish-actions.pod:4421
31278 " sfdisk-l device\n"
31284 #: ../fish/guestfish-actions.pod:4427
31285 msgid "See also: L</part-list>"
31290 #: ../fish/guestfish-actions.pod:4436
31296 #: ../fish/guestfish-actions.pod:4438
31305 #: ../fish/guestfish-actions.pod:4443
31306 msgid "This is like L</command>, but passes the command to:"
31311 #: ../fish/guestfish-actions.pod:4451
31312 msgid "All the provisos about L</command> apply to this call."
31317 #: ../fish/guestfish-actions.pod:4453
31323 #: ../fish/guestfish-actions.pod:4455
31326 " sh-lines command\n"
31332 #: ../fish/guestfish-actions.pod:4457
31333 msgid "This is the same as L</sh>, but splits the result into a list of lines."
31338 #: ../fish/guestfish-actions.pod:4460
31339 msgid "See also: L</command-lines>"
31344 #: ../fish/guestfish-actions.pod:4462
31350 #: ../fish/guestfish-actions.pod:4464
31359 #: ../fish/guestfish-actions.pod:4468
31365 #: ../fish/guestfish-actions.pod:4470
31374 #: ../fish/guestfish-actions.pod:4476
31380 #: ../fish/guestfish-actions.pod:4478
31389 #: ../fish/guestfish-actions.pod:4486
31395 #: ../fish/guestfish-actions.pod:4488
31404 #: ../fish/guestfish-actions.pod:4496
31410 #: ../fish/guestfish-actions.pod:4498
31413 " strings-e encoding path\n"
31419 #: ../fish/guestfish-actions.pod:4500
31421 "This is like the L</strings> command, but allows you to specify the encoding "
31422 "of strings that are looked for in the source file C<path>."
31427 #: ../fish/guestfish-actions.pod:4510
31429 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
31430 "ISO-8859-X (this is what L</strings> uses)."
31435 #: ../fish/guestfish-actions.pod:4542
31436 msgid "swapoff-device"
31441 #: ../fish/guestfish-actions.pod:4544
31444 " swapoff-device device\n"
31450 #: ../fish/guestfish-actions.pod:4546
31452 "This command disables the libguestfs appliance swap device or partition "
31453 "named C<device>. See L</swapon-device>."
31458 #: ../fish/guestfish-actions.pod:4550
31459 msgid "swapoff-file"
31464 #: ../fish/guestfish-actions.pod:4552
31467 " swapoff-file file\n"
31473 #: ../fish/guestfish-actions.pod:4556
31474 msgid "swapoff-label"
31479 #: ../fish/guestfish-actions.pod:4558
31482 " swapoff-label label\n"
31488 #: ../fish/guestfish-actions.pod:4563
31489 msgid "swapoff-uuid"
31494 #: ../fish/guestfish-actions.pod:4565
31497 " swapoff-uuid uuid\n"
31503 #: ../fish/guestfish-actions.pod:4570
31504 msgid "swapon-device"
31509 #: ../fish/guestfish-actions.pod:4572
31512 " swapon-device device\n"
31518 #: ../fish/guestfish-actions.pod:4574
31520 "This command enables the libguestfs appliance to use the swap device or "
31521 "partition named C<device>. The increased memory is made available for all "
31522 "commands, for example those run using L</command> or L</sh>."
31527 #: ../fish/guestfish-actions.pod:4586
31528 msgid "swapon-file"
31533 #: ../fish/guestfish-actions.pod:4588
31536 " swapon-file file\n"
31542 #: ../fish/guestfish-actions.pod:4590
31544 "This command enables swap to a file. See L</swapon-device> for other notes."
31549 #: ../fish/guestfish-actions.pod:4593
31550 msgid "swapon-label"
31555 #: ../fish/guestfish-actions.pod:4595
31558 " swapon-label label\n"
31564 #: ../fish/guestfish-actions.pod:4597
31566 "This command enables swap to a labeled swap partition. See L</swapon-"
31567 "device> for other notes."
31572 #: ../fish/guestfish-actions.pod:4600
31573 msgid "swapon-uuid"
31578 #: ../fish/guestfish-actions.pod:4602
31581 " swapon-uuid uuid\n"
31587 #: ../fish/guestfish-actions.pod:4604
31589 "This command enables swap to a swap partition with the given UUID. See L</"
31590 "swapon-device> for other notes."
31595 #: ../fish/guestfish-actions.pod:4607
31601 #: ../fish/guestfish-actions.pod:4609
31610 #: ../fish/guestfish-actions.pod:4617
31616 #: ../fish/guestfish-actions.pod:4619
31625 #: ../fish/guestfish-actions.pod:4627
31631 #: ../fish/guestfish-actions.pod:4629
31634 " tail-n nrlines path\n"
31640 #: ../fish/guestfish-actions.pod:4642
31646 #: ../fish/guestfish-actions.pod:4644
31649 " tar-in (tarfile|-) directory\n"
31655 #: ../fish/guestfish-actions.pod:4649
31656 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
31661 #: ../fish/guestfish-actions.pod:4654
31667 #: ../fish/guestfish-actions.pod:4656
31670 " tar-out directory (tarfile|-)\n"
31676 #: ../fish/guestfish-actions.pod:4661
31677 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
31682 #: ../fish/guestfish-actions.pod:4666
31688 #: ../fish/guestfish-actions.pod:4668
31691 " tgz-in (tarball|-) directory\n"
31697 #: ../fish/guestfish-actions.pod:4673
31698 msgid "To upload an uncompressed tarball, use L</tar-in>."
31703 #: ../fish/guestfish-actions.pod:4677
31709 #: ../fish/guestfish-actions.pod:4679
31712 " tgz-out directory (tarball|-)\n"
31718 #: ../fish/guestfish-actions.pod:4684
31719 msgid "To download an uncompressed tarball, use L</tar-out>."
31724 #: ../fish/guestfish-actions.pod:4688
31730 #: ../fish/guestfish-actions.pod:4690
31739 #: ../fish/guestfish-actions.pod:4699
31745 #: ../fish/guestfish-actions.pod:4701
31754 #: ../fish/guestfish-actions.pod:4706
31755 msgid "truncate-size"
31760 #: ../fish/guestfish-actions.pod:4708
31763 " truncate-size path size\n"
31769 #: ../fish/guestfish-actions.pod:4713
31771 "If the current file size is less than C<size> then the file is extended to "
31772 "the required size with zero bytes. This creates a sparse file (ie. disk "
31773 "blocks are not allocated for the file until you write to it). To create a "
31774 "non-sparse file of zeroes, use L</fallocate64> instead."
31779 #: ../fish/guestfish-actions.pod:4719
31785 #: ../fish/guestfish-actions.pod:4721
31788 " tune2fs-l device\n"
31794 #: ../fish/guestfish-actions.pod:4731
31800 #: ../fish/guestfish-actions.pod:4733
31803 " txz-in (tarball|-) directory\n"
31809 #: ../fish/guestfish-actions.pod:4740
31815 #: ../fish/guestfish-actions.pod:4742
31818 " txz-out directory (tarball|-)\n"
31824 #: ../fish/guestfish-actions.pod:4749
31830 #: ../fish/guestfish-actions.pod:4751
31839 #: ../fish/guestfish-actions.pod:4765
31840 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
31845 #: ../fish/guestfish-actions.pod:4770
31851 #: ../fish/guestfish-actions.pod:4772
31857 #: ../fish/guestfish-actions.pod:4774
31860 " umount pathordevice\n"
31866 #: ../fish/guestfish-actions.pod:4780
31872 #: ../fish/guestfish-actions.pod:4782
31873 msgid "unmount-all"
31878 #: ../fish/guestfish-actions.pod:4784
31887 #: ../fish/guestfish-actions.pod:4790
31893 #: ../fish/guestfish-actions.pod:4792
31896 " upload (filename|-) remotefilename\n"
31902 #: ../fish/guestfish-actions.pod:4799
31903 msgid "See also L</download>."
31908 #: ../fish/guestfish-actions.pod:4803
31909 msgid "upload-offset"
31914 #: ../fish/guestfish-actions.pod:4805
31917 " upload-offset (filename|-) remotefilename offset\n"
31923 #: ../fish/guestfish-actions.pod:4817
31925 "Note that there is no limit on the amount of data that can be uploaded with "
31926 "this call, unlike with L</pwrite>, and this call always writes the full "
31927 "amount unless an error occurs."
31932 #: ../fish/guestfish-actions.pod:4822
31933 msgid "See also L</upload>, L</pwrite>."
31938 #: ../fish/guestfish-actions.pod:4826
31944 #: ../fish/guestfish-actions.pod:4828
31947 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
31953 #: ../fish/guestfish-actions.pod:4847
31959 #: ../fish/guestfish-actions.pod:4849
31968 #: ../fish/guestfish-actions.pod:4876
31970 "I<Note:> Don't use this call to test for availability of features. In "
31971 "enterprise distributions we backport features from later versions into "
31972 "earlier versions, making this an unreliable way to test for features. Use "
31973 "L</available> instead."
31978 #: ../fish/guestfish-actions.pod:4882
31984 #: ../fish/guestfish-actions.pod:4884
31987 " vfs-label device\n"
31993 #: ../fish/guestfish-actions.pod:4891
31994 msgid "To find a filesystem from the label, use L</findfs-label>."
31999 #: ../fish/guestfish-actions.pod:4893
32005 #: ../fish/guestfish-actions.pod:4895
32008 " vfs-type device\n"
32014 #: ../fish/guestfish-actions.pod:4905
32020 #: ../fish/guestfish-actions.pod:4907
32023 " vfs-uuid device\n"
32029 #: ../fish/guestfish-actions.pod:4914
32030 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
32035 #: ../fish/guestfish-actions.pod:4916
32036 msgid "vg-activate"
32041 #: ../fish/guestfish-actions.pod:4918
32044 " vg-activate true|false 'volgroups ...'\n"
32050 #: ../fish/guestfish-actions.pod:4928
32051 msgid "vg-activate-all"
32056 #: ../fish/guestfish-actions.pod:4930
32059 " vg-activate-all true|false\n"
32065 #: ../fish/guestfish-actions.pod:4937
32071 #: ../fish/guestfish-actions.pod:4939
32074 " vgcreate volgroup 'physvols ...'\n"
32080 #: ../fish/guestfish-actions.pod:4944
32086 #: ../fish/guestfish-actions.pod:4946
32089 " vglvuuids vgname\n"
32095 #: ../fish/guestfish-actions.pod:4951
32097 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
32098 "logical volumes and volume groups."
32103 #: ../fish/guestfish-actions.pod:4954
32104 msgid "See also L</vgpvuuids>."
32109 #: ../fish/guestfish-actions.pod:4956
32115 #: ../fish/guestfish-actions.pod:4958
32118 " vgpvuuids vgname\n"
32124 #: ../fish/guestfish-actions.pod:4963
32126 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
32127 "physical volumes and volume groups."
32132 #: ../fish/guestfish-actions.pod:4966
32133 msgid "See also L</vglvuuids>."
32138 #: ../fish/guestfish-actions.pod:4968
32144 #: ../fish/guestfish-actions.pod:4970
32147 " vgremove vgname\n"
32153 #: ../fish/guestfish-actions.pod:4977
32159 #: ../fish/guestfish-actions.pod:4979
32162 " vgrename volgroup newvolgroup\n"
32168 #: ../fish/guestfish-actions.pod:4983
32174 #: ../fish/guestfish-actions.pod:4985
32183 #: ../fish/guestfish-actions.pod:4993
32184 msgid "See also L</vgs-full>."
32189 #: ../fish/guestfish-actions.pod:4995
32195 #: ../fish/guestfish-actions.pod:4997
32204 #: ../fish/guestfish-actions.pod:5002
32210 #: ../fish/guestfish-actions.pod:5004
32219 #: ../fish/guestfish-actions.pod:5009
32225 #: ../fish/guestfish-actions.pod:5011
32234 #: ../fish/guestfish-actions.pod:5015
32240 #: ../fish/guestfish-actions.pod:5017
32249 #: ../fish/guestfish-actions.pod:5022
32255 #: ../fish/guestfish-actions.pod:5024
32264 #: ../fish/guestfish-actions.pod:5029
32270 #: ../fish/guestfish-actions.pod:5031
32279 #: ../fish/guestfish-actions.pod:5036
32285 #: ../fish/guestfish-actions.pod:5038
32288 " write path content\n"
32293 #: ../fish/guestfish-actions.pod:5043
32294 msgid "See also L</write-append>."
32298 #: ../fish/guestfish-actions.pod:5048
32299 msgid "write-append"
32303 #: ../fish/guestfish-actions.pod:5050
32306 " write-append path content\n"
32311 #: ../fish/guestfish-actions.pod:5055
32312 msgid "See also L</write>."
32317 #: ../fish/guestfish-actions.pod:5060
32323 #: ../fish/guestfish-actions.pod:5062
32326 " write-file path content size\n"
32332 #: ../fish/guestfish-actions.pod:5085
32338 #: ../fish/guestfish-actions.pod:5087
32341 " zegrep regex path\n"
32347 #: ../fish/guestfish-actions.pod:5095
32353 #: ../fish/guestfish-actions.pod:5097
32356 " zegrepi regex path\n"
32362 #: ../fish/guestfish-actions.pod:5105
32368 #: ../fish/guestfish-actions.pod:5107
32376 #: ../fish/guestfish-actions.pod:5115
32377 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
32382 #: ../fish/guestfish-actions.pod:5118
32383 msgid "zero-device"
32388 #: ../fish/guestfish-actions.pod:5120
32391 " zero-device device\n"
32397 #: ../fish/guestfish-actions.pod:5122
32399 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
32400 "which just zeroes the first few blocks of a device."
32405 #: ../fish/guestfish-actions.pod:5129
32411 #: ../fish/guestfish-actions.pod:5131
32414 " zerofree device\n"
32420 #: ../fish/guestfish-actions.pod:5144
32426 #: ../fish/guestfish-actions.pod:5146
32429 " zfgrep pattern path\n"
32435 #: ../fish/guestfish-actions.pod:5154
32441 #: ../fish/guestfish-actions.pod:5156
32444 " zfgrepi pattern path\n"
32450 #: ../fish/guestfish-actions.pod:5164
32456 #: ../fish/guestfish-actions.pod:5166
32459 " zfile meth path\n"
32465 #: ../fish/guestfish-actions.pod:5173
32467 "Since 1.0.63, use L</file> instead which can now process compressed files."
32472 #: ../fish/guestfish-actions.pod:5183
32478 #: ../fish/guestfish-actions.pod:5185
32481 " zgrep regex path\n"
32487 #: ../fish/guestfish-actions.pod:5193
32493 #: ../fish/guestfish-actions.pod:5195
32496 " zgrepi regex path\n"
32502 #: ../fish/guestfish-commands.pod:1
32508 #: ../fish/guestfish-commands.pod:3
32514 #: ../fish/guestfish-commands.pod:5
32517 " alloc filename size\n"
32523 #: ../fish/guestfish-commands.pod:7
32525 "This creates an empty (zeroed) file of the given size, and then adds so it "
32526 "can be further examined."
32531 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:182
32532 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
32537 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:184
32538 msgid "Size can be specified using standard suffixes, eg. C<1M>."
32543 #: ../fish/guestfish-commands.pod:14
32545 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
32546 "image, see L</PREPARED DISK IMAGES>."
32551 #: ../fish/guestfish-commands.pod:17
32557 #: ../fish/guestfish-commands.pod:19
32560 " copy-in local [local ...] /remotedir\n"
32566 #: ../fish/guestfish-commands.pod:21
32568 "C<copy-in> copies local files or directories recursively into the disk "
32569 "image, placing them in the directory called C</remotedir> (which must "
32570 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
32571 "other commands as necessary."
32576 #: ../fish/guestfish-commands.pod:26
32578 "Multiple local files and directories can be specified, but the last "
32579 "parameter must always be a remote directory. Wildcards cannot be used."
32584 #: ../fish/guestfish-commands.pod:30
32590 #: ../fish/guestfish-commands.pod:32
32593 " copy-out remote [remote ...] localdir\n"
32599 #: ../fish/guestfish-commands.pod:34
32601 "C<copy-out> copies remote files or directories recursively out of the disk "
32602 "image, placing them on the host disk in a local directory called C<localdir> "
32603 "(which must exist). This guestfish meta-command turns into a sequence of L</"
32604 "download>, L</tar-out> and other commands as necessary."
32609 #: ../fish/guestfish-commands.pod:40
32611 "Multiple remote files and directories can be specified, but the last "
32612 "parameter must always be a local directory. To download to the current "
32613 "directory, use C<.> as in:"
32618 #: ../fish/guestfish-commands.pod:44
32621 " copy-out /home .\n"
32627 #: ../fish/guestfish-commands.pod:46
32629 "Wildcards cannot be used in the ordinary command, but you can use them with "
32630 "the help of L</glob> like this:"
32635 #: ../fish/guestfish-commands.pod:49
32638 " glob copy-out /home/* .\n"
32643 #: ../fish/guestfish-commands.pod:51
32648 #: ../fish/guestfish-commands.pod:53
32651 " display filename\n"
32656 #: ../fish/guestfish-commands.pod:55
32658 "Use C<display> (a graphical display program) to display an image file. It "
32659 "downloads the file, and runs C<display> on it."
32663 #: ../fish/guestfish-commands.pod:58
32665 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
32666 "environment variable. For example to use the GNOME display program:"
32670 #: ../fish/guestfish-commands.pod:61
32673 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
32678 #: ../fish/guestfish-commands.pod:63
32679 msgid "See also L<display(1)>."
32684 #: ../fish/guestfish-commands.pod:65
32690 #: ../fish/guestfish-commands.pod:67
32693 " echo [params ...]\n"
32699 #: ../fish/guestfish-commands.pod:69
32700 msgid "This echos the parameters to the terminal."
32705 #: ../fish/guestfish-commands.pod:71
32711 #: ../fish/guestfish-commands.pod:73
32717 #: ../fish/guestfish-commands.pod:75
32723 #: ../fish/guestfish-commands.pod:77
32732 #: ../fish/guestfish-commands.pod:79
32734 "This is used to edit a file. It downloads the file, edits it locally using "
32735 "your editor, then uploads the result."
32740 #: ../fish/guestfish-commands.pod:82
32742 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
32743 "or C<emacs> you will get those corresponding editors."
32748 #: ../fish/guestfish-commands.pod:86
32754 #: ../fish/guestfish-commands.pod:88
32757 " glob command args...\n"
32763 #: ../fish/guestfish-commands.pod:90
32765 "Expand wildcards in any paths in the args list, and run C<command> "
32766 "repeatedly on each matching path."
32771 #: ../fish/guestfish-commands.pod:93
32772 msgid "See L</WILDCARDS AND GLOBBING>."
32777 #: ../fish/guestfish-commands.pod:95
32783 #: ../fish/guestfish-commands.pod:97
32786 " hexedit <filename|device>\n"
32787 " hexedit <filename|device> <max>\n"
32788 " hexedit <filename|device> <start> <max>\n"
32794 #: ../fish/guestfish-commands.pod:101
32796 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
32802 #: ../fish/guestfish-commands.pod:104
32804 "This command works by downloading potentially the whole file or device, "
32805 "editing it locally, then uploading it. If the file or device is large, you "
32806 "have to specify which part you wish to edit by using C<max> and/or C<start> "
32807 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
32808 "usual modifiers allowed such as C<1M> (1 megabyte)."
32813 #: ../fish/guestfish-commands.pod:111
32814 msgid "For example to edit the first few sectors of a disk you might do:"
32819 #: ../fish/guestfish-commands.pod:114
32822 " hexedit /dev/sda 1M\n"
32828 #: ../fish/guestfish-commands.pod:116
32830 "which would allow you to edit anywhere within the first megabyte of the disk."
32835 #: ../fish/guestfish-commands.pod:119
32836 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
32841 #: ../fish/guestfish-commands.pod:121
32844 " hexedit /dev/sda1 0x400 0x400\n"
32850 #: ../fish/guestfish-commands.pod:123
32851 msgid "(assuming the superblock is in the standard location)."
32856 #: ../fish/guestfish-commands.pod:125
32858 "This command requires the external L<hexedit(1)> program. You can specify "
32859 "another program to use by setting the C<HEXEDITOR> environment variable."
32864 #: ../fish/guestfish-commands.pod:129
32865 msgid "See also L</hexdump>."
32870 #: ../fish/guestfish-commands.pod:131
32876 #: ../fish/guestfish-commands.pod:133
32885 #: ../fish/guestfish-commands.pod:135
32887 "Change the local directory, ie. the current directory of guestfish itself."
32892 #: ../fish/guestfish-commands.pod:138
32893 msgid "Note that C<!cd> won't do what you might expect."
32898 #: ../fish/guestfish-commands.pod:140
32904 #: ../fish/guestfish-commands.pod:142
32910 #: ../fish/guestfish-commands.pod:144
32919 #: ../fish/guestfish-commands.pod:146
32920 msgid "Opens the manual page for guestfish."
32925 #: ../fish/guestfish-commands.pod:148
32931 #: ../fish/guestfish-commands.pod:150
32937 #: ../fish/guestfish-commands.pod:152
32946 #: ../fish/guestfish-commands.pod:154
32955 #: ../fish/guestfish-commands.pod:156
32956 msgid "This is used to view a file."
32961 #: ../fish/guestfish-commands.pod:158
32963 "The default viewer is C<$PAGER>. However if you use the alternate command "
32964 "C<less> you will get the C<less> command specifically."
32969 #: ../fish/guestfish-commands.pod:161
32975 #: ../fish/guestfish-commands.pod:163
32984 #: ../fish/guestfish-commands.pod:165
32986 "Close and reopen the libguestfs handle. It is not necessary to use this "
32987 "normally, because the handle is closed properly when guestfish exits. "
32988 "However this is occasionally useful for testing."
32993 #: ../fish/guestfish-commands.pod:169
32999 #: ../fish/guestfish-commands.pod:171
33002 " sparse filename size\n"
33008 #: ../fish/guestfish-commands.pod:173
33010 "This creates an empty sparse file of the given size, and then adds so it can "
33011 "be further examined."
33016 #: ../fish/guestfish-commands.pod:176
33018 "In all respects it works the same as the L</alloc> command, except that the "
33019 "image file is allocated sparsely, which means that disk blocks are not "
33020 "assigned to the file until they are needed. Sparse disk files only use "
33021 "space when written to, but they are slower and there is a danger you could "
33022 "run out of real disk space during a write operation."
33027 #: ../fish/guestfish-commands.pod:186
33033 #: ../fish/guestfish-commands.pod:188
33042 #: ../fish/guestfish-commands.pod:190
33044 "This command returns a list of the optional groups known to the daemon, and "
33045 "indicates which ones are supported by this build of the libguestfs appliance."
33050 #: ../fish/guestfish-commands.pod:194
33051 msgid "See also L<guestfs(3)/AVAILABILITY>."
33056 #: ../fish/guestfish-commands.pod:196
33062 #: ../fish/guestfish-commands.pod:198
33065 " time command args...\n"
33071 #: ../fish/guestfish-commands.pod:200
33073 "Run the command as usual, but print the elapsed time afterwards. This can "
33074 "be useful for benchmarking operations."
33079 #: ../test-tool/libguestfs-test-tool.pod:5
33080 msgid "libguestfs-test-tool - End user tests for libguestfs"
33085 #: ../test-tool/libguestfs-test-tool.pod:9
33088 " libguestfs-test-tool [--options]\n"
33094 #: ../test-tool/libguestfs-test-tool.pod:13
33096 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
33097 "and developers, to allow them to check basic libguestfs functionality is "
33098 "working. This is needed because libguestfs occasionally breaks for reasons "
33099 "beyond our control: usually because of changes in the underlying qemu or "
33100 "kernel packages, or the host environment."
33105 #: ../test-tool/libguestfs-test-tool.pod:20
33106 msgid "If you suspect a problem in libguestfs, then just run:"
33111 #: ../test-tool/libguestfs-test-tool.pod:22
33114 " libguestfs-test-tool\n"
33120 #: ../test-tool/libguestfs-test-tool.pod:24
33121 msgid "It will print lots of diagnostic messages."
33126 #: ../test-tool/libguestfs-test-tool.pod:26
33127 msgid "If it runs to completion successfully, you will see this near the end:"
33132 #: ../test-tool/libguestfs-test-tool.pod:28
33135 " ===== TEST FINISHED OK =====\n"
33141 #: ../test-tool/libguestfs-test-tool.pod:30
33142 msgid "and the test tool will exit with code 0."
33147 #: ../test-tool/libguestfs-test-tool.pod:32
33149 "If it fails (and/or exits with non-zero error code), please paste the "
33150 "B<complete, unedited> output of the test tool into a bug report. More "
33151 "information about reporting bugs can be found on the L<http://libguestfs.org/"
33157 #: ../test-tool/libguestfs-test-tool.pod:41
33163 #: ../test-tool/libguestfs-test-tool.pod:43
33164 msgid "Display short usage information and exit."
33169 #: ../test-tool/libguestfs-test-tool.pod:45
33170 msgid "I<--qemu qemu_binary>"
33175 #: ../test-tool/libguestfs-test-tool.pod:47
33177 "If you have downloaded another qemu binary, point this option at the full "
33178 "path of the binary to try it."
33183 #: ../test-tool/libguestfs-test-tool.pod:50
33184 msgid "I<--qemudir qemu_source_dir>"
33189 #: ../test-tool/libguestfs-test-tool.pod:52
33191 "If you have compiled qemu from source, point this option at the source "
33192 "directory to try it."
33197 #: ../test-tool/libguestfs-test-tool.pod:55
33198 msgid "I<--timeout N>"
33203 #: ../test-tool/libguestfs-test-tool.pod:57
33205 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
33206 "does not usually need to be adjusted unless your machine is very slow."
33211 #: ../test-tool/libguestfs-test-tool.pod:63
33212 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
33217 #: ../test-tool/libguestfs-test-tool.pod:65
33219 "If you have compiled another version of qemu from source and would like to "
33220 "try that, then you can use the I<--qemudir> option to point to the qemu "
33221 "source directory."
33226 #: ../test-tool/libguestfs-test-tool.pod:69
33228 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
33229 "option to point to the binary."
33234 #: ../test-tool/libguestfs-test-tool.pod:72
33236 "When using an alternate qemu with libguestfs, usually you would need to "
33237 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in L<guestfs(3)"
33238 ">). libguestfs-test-tool writes a temporary qemu wrapper script when you "
33239 "use either of the I<--qemudir> or I<--qemu> options."
33244 #: ../test-tool/libguestfs-test-tool.pod:79
33246 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
33247 "I<1> if there was an error."
33252 #: ../test-tool/libguestfs-test-tool.pod:84
33254 "For the full list of environment variables which may affect libguestfs, "
33255 "please see the L<guestfs(3)> manual page."
33260 #: ../test-tool/libguestfs-test-tool.pod:89
33261 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
33266 #: ../fuse/guestmount.pod:5
33268 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
33273 #: ../fuse/guestmount.pod:9
33276 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
33282 #: ../fuse/guestmount.pod:11
33285 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
33291 #: ../fuse/guestmount.pod:13
33294 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
33300 #: ../fuse/guestmount.pod:17
33302 "You must I<not> use C<guestmount> in read-write mode on live virtual "
33303 "machines. If you do this, you risk disk corruption in the VM."
33308 #: ../fuse/guestmount.pod:22
33310 "The guestmount program can be used to mount virtual machine filesystems and "
33311 "other disk images on the host. It uses libguestfs for access to the guest "
33312 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
33313 "a mountable device."
33318 #: ../fuse/guestmount.pod:27
33320 "Along with other options, you have to give at least one device (I<-a> "
33321 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
33322 "option) or use the I<-i> inspection option. How this works is better "
33323 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
33329 #: ../fuse/guestmount.pod:33
33331 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
33332 "by you, and the filesystem will not be visible to any other users unless you "
33333 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
33334 "the filesystem, use the C<fusermount -u> command."
33339 #: ../fuse/guestmount.pod:41
33341 "For a typical Windows guest which has its main filesystem on the first "
33347 #: ../fuse/guestmount.pod:44
33350 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
33356 #: ../fuse/guestmount.pod:46
33358 "For a typical Linux guest which has a /boot filesystem on the first "
33359 "partition, and the root filesystem on a logical volume:"
33364 #: ../fuse/guestmount.pod:49
33367 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
33373 #: ../fuse/guestmount.pod:51
33374 msgid "To get libguestfs to detect guest mountpoints for you:"
33379 #: ../fuse/guestmount.pod:53
33382 " guestmount -a guest.img -i --ro /mnt\n"
33388 #: ../fuse/guestmount.pod:55
33389 msgid "For a libvirt guest called \"Guest\" you could do:"
33394 #: ../fuse/guestmount.pod:57
33397 " guestmount -d Guest -i --ro /mnt\n"
33403 #: ../fuse/guestmount.pod:59
33405 "If you don't know what filesystems are contained in a guest or disk image, "
33406 "use L<virt-filesystems(1)> first:"
33411 #: ../fuse/guestmount.pod:62
33414 " virt-filesystems MyGuest\n"
33420 #: ../fuse/guestmount.pod:64
33422 "If you want to trace the libguestfs calls but without excessive debugging "
33423 "information, we recommend:"
33428 #: ../fuse/guestmount.pod:67
33431 " guestmount [...] --trace /mnt\n"
33437 #: ../fuse/guestmount.pod:69
33438 msgid "If you want to debug the program, we recommend:"
33443 #: ../fuse/guestmount.pod:71
33446 " guestmount [...] --trace --verbose /mnt\n"
33451 #: ../fuse/guestmount.pod:73
33456 #: ../fuse/guestmount.pod:75
33457 msgid "Other users cannot see the filesystem by default"
33461 #: ../fuse/guestmount.pod:77
33463 "If you mount a filesystem as one user (eg. root), then other users will not "
33464 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
33465 "option when mounting:"
33469 #: ../fuse/guestmount.pod:81
33472 " sudo guestmount [...] -o allow_other /mnt\n"
33478 #: ../fuse/guestmount.pod:87
33479 msgid "B<-a image> | B<--add image>"
33484 #: ../fuse/guestmount.pod:89
33485 msgid "Add a block device or virtual machine image."
33490 #: ../fuse/guestmount.pod:94
33491 msgid "B<-c URI> | B<--connect URI>"
33496 #: ../fuse/guestmount.pod:100
33497 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
33502 #: ../fuse/guestmount.pod:108
33503 msgid "B<--dir-cache-timeout N>"
33508 #: ../fuse/guestmount.pod:110
33510 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
33511 "seconds. The readdir cache [actually, there are several semi-independent "
33512 "caches] is populated after a readdir(2) call with the stat and extended "
33513 "attributes of the files in the directory, in anticipation that they will be "
33514 "requested soon after."
33519 #: ../fuse/guestmount.pod:116
33521 "There is also a different attribute cache implemented by FUSE (see the FUSE "
33522 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
33523 "requests, only cache existing ones."
33528 #: ../fuse/guestmount.pod:127
33529 msgid "B<--format=raw|qcow2|..> | B<--format>"
33534 #: ../fuse/guestmount.pod:134
33536 "If you have untrusted raw-format guest disk images, you should use this "
33537 "option to specify the disk format. This avoids a possible security problem "
33538 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
33539 "guestfs_add_drive_opts>."
33544 #: ../fuse/guestmount.pod:139
33545 msgid "B<--fuse-help>"
33550 #: ../fuse/guestmount.pod:141
33551 msgid "Display help on special FUSE options (see I<-o> below)."
33556 #: ../fuse/guestmount.pod:145
33557 msgid "Display brief help and exit."
33562 #: ../fuse/guestmount.pod:147
33563 msgid "B<-i> | B<--inspector>"
33568 #: ../fuse/guestmount.pod:167
33570 "Mount the named partition or logical volume on the given mountpoint B<in the "
33571 "guest> (this has nothing to do with mountpoints in the host)."
33576 #: ../fuse/guestmount.pod:170
33578 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
33579 "something on C</>."
33584 #: ../fuse/guestmount.pod:183
33585 msgid "B<-n> | B<--no-sync>"
33590 #: ../fuse/guestmount.pod:185
33592 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
33593 "unmounted. If you specify this option, then we don't attempt to sync the "
33594 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
33599 #: ../fuse/guestmount.pod:190
33600 msgid "B<-o option> | B<--option option>"
33605 #: ../fuse/guestmount.pod:192
33606 msgid "Pass extra options to FUSE."
33611 #: ../fuse/guestmount.pod:194
33613 "To get a list of all the extra options supported by FUSE, use the command "
33614 "below. Note that only the FUSE I<-o> options can be passed, and only some "
33615 "of them are a good idea."
33620 #: ../fuse/guestmount.pod:198
33623 " guestmount --fuse-help\n"
33629 #: ../fuse/guestmount.pod:200
33630 msgid "Some potentially useful FUSE options:"
33635 #: ../fuse/guestmount.pod:204
33636 msgid "B<-o allow_other>"
33641 #: ../fuse/guestmount.pod:206
33642 msgid "Allow other users to see the filesystem."
33647 #: ../fuse/guestmount.pod:208
33648 msgid "B<-o attr_timeout=N>"
33653 #: ../fuse/guestmount.pod:210
33654 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
33659 #: ../fuse/guestmount.pod:212
33660 msgid "B<-o kernel_cache>"
33665 #: ../fuse/guestmount.pod:214
33667 "Allow the kernel to cache files (reduces the number of reads that have to go "
33668 "through the L<guestfs(3)> API). This is generally a good idea if you can "
33669 "afford the extra memory usage."
33674 #: ../fuse/guestmount.pod:218
33675 msgid "B<-o uid=N> B<-o gid=N>"
33680 #: ../fuse/guestmount.pod:220
33682 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
33683 "the chosen values."
33688 #: ../fuse/guestmount.pod:225
33689 msgid "B<-r> | B<--ro>"
33694 #: ../fuse/guestmount.pod:227
33696 "Add devices and mount everything read-only. Also disallow writes and make "
33697 "the disk appear read-only to FUSE."
33702 #: ../fuse/guestmount.pod:230
33704 "This is highly recommended if you are not going to edit the guest disk. If "
33705 "the guest is running and this option is I<not> supplied, then there is a "
33706 "strong risk of disk corruption in the guest. We try to prevent this from "
33707 "happening, but it is not always possible."
33712 #: ../fuse/guestmount.pod:235
33713 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
33718 #: ../fuse/guestmount.pod:239
33719 msgid "Enable SELinux support for the guest."
33724 #: ../fuse/guestmount.pod:241
33725 msgid "B<-v> | B<--verbose>"
33730 #: ../fuse/guestmount.pod:243
33731 msgid "Enable verbose messages from underlying libguestfs."
33736 #: ../fuse/guestmount.pod:245
33737 msgid "B<-V> | B<--version>"
33742 #: ../fuse/guestmount.pod:247
33743 msgid "Display the program version and exit."
33748 #: ../fuse/guestmount.pod:249
33749 msgid "B<-w> | B<--rw>"
33753 #: ../fuse/guestmount.pod:254 ../fuse/guestmount.pod:275
33754 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
33759 #: ../fuse/guestmount.pod:256
33760 msgid "B<-x> | B<--trace>"
33765 #: ../fuse/guestmount.pod:258
33766 msgid "Trace libguestfs calls and entry into each FUSE function."
33771 #: ../fuse/guestmount.pod:260
33772 msgid "This also stops the daemon from forking into the background."
33777 #: ../fuse/guestmount.pod:281
33779 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
33780 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
33786 #: ../fuse/guestmount.pod:296
33787 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
33792 #: ../tools/virt-win-reg.pl:37
33794 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
33799 #: ../tools/virt-win-reg.pl:41
33802 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
33808 #: ../tools/virt-win-reg.pl:43
33811 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
33817 #: ../tools/virt-win-reg.pl:45
33820 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
33826 #: ../tools/virt-win-reg.pl:47
33829 " virt-win-reg --merge domname [input.reg ...]\n"
33835 #: ../tools/virt-win-reg.pl:49
33838 " virt-win-reg [--options] disk.img ... # instead of domname\n"
33843 #: ../tools/virt-win-reg.pl:53
33845 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
33846 "virtual machines. If you do this, you I<will> get irreversible disk "
33847 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
33848 "but doesn't catch all cases."
33852 #: ../tools/virt-win-reg.pl:58
33854 "Modifying the Windows Registry is an inherently risky operation. The format "
33855 "is deliberately obscure and undocumented, and Registry changes can leave the "
33856 "system unbootable. Therefore when using the I<--merge> option, make sure "
33857 "you have a reliable backup first."
33862 #: ../tools/virt-win-reg.pl:65
33864 "This program can export and merge Windows Registry entries from a Windows "
33870 #: ../tools/virt-win-reg.pl:68
33872 "The first parameter is the libvirt guest name or the raw disk image of a "
33877 #: ../tools/virt-win-reg.pl:71
33879 "If I<--merge> is I<not> specified, then the chosen registry key is displayed/"
33880 "exported (recursively). For example:"
33885 #: ../tools/virt-win-reg.pl:74
33888 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
33894 #: ../tools/virt-win-reg.pl:76
33896 "You can also display single values from within registry keys, for example:"
33901 #: ../tools/virt-win-reg.pl:79
33904 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
33905 " $ virt-win-reg Windows7 $cvkey ProductName\n"
33906 " Windows 7 Enterprise\n"
33911 #: ../tools/virt-win-reg.pl:83
33913 "With I<--merge>, you can merge a textual regedit file into the Windows "
33919 #: ../tools/virt-win-reg.pl:86
33922 " $ virt-win-reg --merge Windows7 changes.reg\n"
33928 #: ../tools/virt-win-reg.pl:88 ../tools/virt-tar.pl:45
33934 #: ../tools/virt-win-reg.pl:90
33936 "This program is only meant for simple access to the registry. If you want "
33937 "to do complicated things with the registry, we suggest you download the "
33938 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
33939 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
33940 "L<hivexregedit(1)>."
33945 #: ../tools/virt-win-reg.pl:106 ../tools/virt-list-filesystems.pl:63
33946 #: ../tools/virt-tar.pl:113 ../tools/virt-make-fs.pl:163
33947 #: ../tools/virt-list-partitions.pl:64
33948 msgid "Display brief help."
33953 #: ../tools/virt-win-reg.pl:114 ../tools/virt-list-filesystems.pl:71
33954 #: ../tools/virt-tar.pl:121 ../tools/virt-make-fs.pl:171
33955 #: ../tools/virt-list-partitions.pl:72
33956 msgid "Display version number and exit."
33961 #: ../tools/virt-win-reg.pl:120 ../tools/virt-make-fs.pl:177
33967 #: ../tools/virt-win-reg.pl:122
33968 msgid "Enable debugging messages."
33973 #: ../tools/virt-win-reg.pl:128 ../tools/virt-list-filesystems.pl:77
33974 #: ../tools/virt-tar.pl:127 ../tools/virt-list-partitions.pl:78
33975 msgid "B<--connect URI> | B<-c URI>"
33980 #: ../tools/virt-win-reg.pl:130 ../tools/virt-list-filesystems.pl:79
33981 #: ../tools/virt-tar.pl:129 ../tools/virt-list-partitions.pl:80
33983 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
33984 "to the default libvirt hypervisor."
33989 #: ../tools/virt-win-reg.pl:133 ../tools/virt-list-filesystems.pl:82
33990 #: ../tools/virt-tar.pl:132 ../tools/virt-list-partitions.pl:83
33992 "If you specify guest block devices directly, then libvirt is not used at all."
33997 #: ../tools/virt-win-reg.pl:140 ../tools/virt-list-filesystems.pl:89
33998 #: ../tools/virt-tar.pl:139 ../tools/virt-list-partitions.pl:90
33999 msgid "B<--format> raw"
34004 #: ../tools/virt-win-reg.pl:142 ../tools/virt-list-filesystems.pl:91
34005 #: ../tools/virt-tar.pl:141 ../tools/virt-list-partitions.pl:92
34007 "Specify the format of disk images given on the command line. If this is "
34008 "omitted then the format is autodetected from the content of the disk image."
34013 #: ../tools/virt-win-reg.pl:146 ../tools/virt-list-filesystems.pl:95
34014 #: ../tools/virt-tar.pl:145 ../tools/virt-list-partitions.pl:96
34016 "If disk images are requested from libvirt, then this program asks libvirt "
34017 "for this information. In this case, the value of the format parameter is "
34023 #: ../tools/virt-win-reg.pl:150 ../tools/virt-list-filesystems.pl:99
34024 #: ../tools/virt-tar.pl:149 ../tools/virt-list-partitions.pl:100
34026 "If working with untrusted raw-format guest disk images, you should ensure "
34027 "the format is always specified."
34032 #: ../tools/virt-win-reg.pl:157
34038 #: ../tools/virt-win-reg.pl:159
34040 "In merge mode, this merges a textual regedit file into the Windows Registry "
34041 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
34042 "displays or exports Registry entries instead."
34046 #: ../tools/virt-win-reg.pl:163
34048 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
34049 "result in disk corruption. However exporting (without this flag) is always "
34055 #: ../tools/virt-win-reg.pl:171
34056 msgid "B<--encoding> UTF-16LE|ASCII"
34061 #: ../tools/virt-win-reg.pl:173
34063 "When merging (only), you may need to specify the encoding for strings to be "
34064 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
34065 "(3)/ENCODING STRINGS>."
34070 #: ../tools/virt-win-reg.pl:177
34072 "The default is to use UTF-16LE, which should work with recent versions of "
34077 #: ../tools/virt-win-reg.pl:184
34078 msgid "B<--unsafe-printable-strings>"
34082 #: ../tools/virt-win-reg.pl:186
34084 "When exporting (only), assume strings are UTF-16LE and print them as strings "
34085 "instead of hex sequences. Remove the final zero codepoint from strings if "
34090 #: ../tools/virt-win-reg.pl:190
34092 "This is unsafe and does not preserve the fidelity of strings in the original "
34093 "Registry for various reasons:"
34097 #: ../tools/virt-win-reg.pl:197
34099 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
34100 "other encodings will be corrupted by this transformation."
34104 #: ../tools/virt-win-reg.pl:202
34106 "Assumes that everything which has type 1 or 2 is really a string and that "
34107 "everything else is not a string, but the type field in real Registries is "
34112 #: ../tools/virt-win-reg.pl:208
34114 "Loses information about whether a zero codepoint followed the string in the "
34119 #: ../tools/virt-win-reg.pl:213
34121 "This all happens because the Registry itself contains no information about "
34122 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
34126 #: ../tools/virt-win-reg.pl:217
34128 "You should only use this option for quick hacking and debugging of the "
34129 "Registry contents, and I<never> use it if the output is going to be passed "
34130 "into another program or stored in another Registry."
34135 #: ../tools/virt-win-reg.pl:554
34136 msgid "SUPPORTED SYSTEMS"
34141 #: ../tools/virt-win-reg.pl:556
34143 "The program currently supports Windows NT-derived guests starting with "
34144 "Windows XP through to at least Windows 7."
34148 #: ../tools/virt-win-reg.pl:559
34149 msgid "The following Registry keys are supported:"
34153 #: ../tools/virt-win-reg.pl:563
34154 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
34158 #: ../tools/virt-win-reg.pl:565
34159 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
34163 #: ../tools/virt-win-reg.pl:567
34164 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
34168 #: ../tools/virt-win-reg.pl:569
34169 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
34173 #: ../tools/virt-win-reg.pl:571
34174 msgid "C<HKEY_USERS\\.DEFAULT>"
34178 #: ../tools/virt-win-reg.pl:573
34179 msgid "C<HKEY_USERS\\I<SID>>"
34183 #: ../tools/virt-win-reg.pl:575
34184 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
34188 #: ../tools/virt-win-reg.pl:577
34189 msgid "C<HKEY_USERS\\I<username>>"
34193 #: ../tools/virt-win-reg.pl:579
34195 "where I<username> is a local user name (this is a libguestfs extension)."
34200 #: ../tools/virt-win-reg.pl:583
34202 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
34207 #: ../tools/virt-win-reg.pl:586
34209 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
34210 "supported (there is no \"current user\")."
34215 #: ../tools/virt-win-reg.pl:589
34221 #: ../tools/virt-win-reg.pl:591
34223 "C<virt-win-reg> expects that regedit files have already been reencoded in "
34224 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
34225 "style line endings. Since Windows regedit files are often in UTF-16LE with "
34226 "Windows-style line endings, you may need to reencode the whole file before "
34227 "or after processing."
34231 #: ../tools/virt-win-reg.pl:597
34233 "To reencode a file from Windows format to Linux (before processing it with "
34234 "the I<--merge> option), you would do something like this:"
34239 #: ../tools/virt-win-reg.pl:600
34242 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
34248 #: ../tools/virt-win-reg.pl:602
34250 "To go in the opposite direction, after exporting and before sending the file "
34251 "to a Windows user, do something like this:"
34256 #: ../tools/virt-win-reg.pl:605
34259 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
34265 #: ../tools/virt-win-reg.pl:607
34266 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
34271 #: ../tools/virt-win-reg.pl:609
34273 "If you are unsure about the current encoding, use the L<file(1)> command. "
34274 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
34275 "style (CRLF) line endings, like this:"
34280 #: ../tools/virt-win-reg.pl:613
34283 " $ file software.reg\n"
34284 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
34285 " with CRLF line terminators\n"
34290 #: ../tools/virt-win-reg.pl:617
34291 msgid "This file would need conversion before you could I<--merge> it."
34296 #: ../tools/virt-win-reg.pl:619
34297 msgid "CurrentControlSet etc."
34302 #: ../tools/virt-win-reg.pl:621
34304 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
34305 "Registry at the level of the hive file, and therefore you cannot modify "
34311 #: ../tools/virt-win-reg.pl:625
34313 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
34314 "circumstances it might refer to another control set. The way to find out is "
34315 "to look at the C<HKLM\\SYSTEM\\Select> key:"
34320 #: ../tools/virt-win-reg.pl:629
34323 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
34324 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
34325 " \"Current\"=dword:00000001\n"
34326 " \"Default\"=dword:00000001\n"
34327 " \"Failed\"=dword:00000000\n"
34328 " \"LastKnownGood\"=dword:00000002\n"
34334 #: ../tools/virt-win-reg.pl:636
34335 msgid "\"Current\" is the one which Windows will choose when it boots."
34340 #: ../tools/virt-win-reg.pl:638
34342 "Similarly, other C<Current...> keys in the path may need to be replaced."
34347 #: ../tools/virt-win-reg.pl:641
34348 msgid "WINDOWS TIPS"
34353 #: ../tools/virt-win-reg.pl:643
34355 "Note that some of these tips modify the guest disk image. The guest I<must> "
34356 "be shut off, else you will get disk corruption."
34361 #: ../tools/virt-win-reg.pl:646
34362 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
34367 #: ../tools/virt-win-reg.pl:648
34369 "Prepare a DOS batch script, VBScript or executable. Upload this using "
34370 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
34371 "is uploaded into C<C:\\>:"
34376 #: ../tools/virt-win-reg.pl:652
34379 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
34385 #: ../tools/virt-win-reg.pl:654
34386 msgid "Prepare a regedit file containing the registry change:"
34391 #: ../tools/virt-win-reg.pl:656
34394 " cat > test.reg <<'EOF'\n"
34395 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
34396 " \"Test\"=\"c:\\\\test.bat\"\n"
34403 #: ../tools/virt-win-reg.pl:661
34405 "In this example we use the key C<RunOnce> which means that the script will "
34406 "run precisely once when the first user logs in. If you want it to run every "
34407 "time a user logs in, replace C<RunOnce> with C<Run>."
34412 #: ../tools/virt-win-reg.pl:665
34413 msgid "Now update the registry:"
34418 #: ../tools/virt-win-reg.pl:667
34421 " virt-win-reg --merge WindowsGuest test.reg\n"
34427 #: ../tools/virt-win-reg.pl:669
34428 msgid "INSTALLING A SERVICE"
34433 #: ../tools/virt-win-reg.pl:671
34435 "This section assumes you are familiar with Windows services, and you either "
34436 "have a program which handles the Windows Service Control Protocol directly "
34437 "or you want to run any program using a service wrapper like SrvAny or the "
34443 #: ../tools/virt-win-reg.pl:676
34445 "First upload the program and optionally the service wrapper. In this case "
34446 "the test program is called C<test.exe> and we are using the RHSrvAny wrapper:"
34451 #: ../tools/virt-win-reg.pl:680
34454 " guestfish -i -d WindowsGuest <<EOF\n"
34455 " upload rhsrvany.exe /rhsrvany.exe\n"
34456 " upload test.exe /test.exe\n"
34463 #: ../tools/virt-win-reg.pl:685
34465 "Prepare a regedit file containing the registry changes. In this example, "
34466 "the first registry change is needed for the service itself or the service "
34467 "wrapper (if used). The second registry change is only needed because I am "
34468 "using the RHSrvAny service wrapper."
34473 #: ../tools/virt-win-reg.pl:690
34476 " cat > service.reg <<'EOF'\n"
34477 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
34478 " \"Type\"=dword:00000010\n"
34479 " \"Start\"=dword:00000002\n"
34480 " \"ErrorControl\"=dword:00000001\n"
34481 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
34482 " \"DisplayName\"=\"RHSrvAny\"\n"
34483 " \"ObjectName\"=\"NetworkService\"\n"
34489 #: ../tools/virt-win-reg.pl:699
34492 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
34493 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
34494 " \"PWD\"=\"c:\\\\Temp\"\n"
34501 #: ../tools/virt-win-reg.pl:710
34503 "For use of C<ControlSet001> see the section above in this manual page. You "
34504 "may need to adjust this according to the control set that is in use by the "
34510 #: ../tools/virt-win-reg.pl:716
34512 "C<\"ObjectName\"> controls the privileges that the service will have. An "
34513 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
34514 "privileged account."
34519 #: ../tools/virt-win-reg.pl:722
34521 "For the meaning of the magic numbers, see this Microsoft KB article: "
34522 "L<http://support.microsoft.com/kb/103000>."
34527 #: ../tools/virt-win-reg.pl:727
34528 msgid "Update the registry:"
34533 #: ../tools/virt-win-reg.pl:729
34536 " virt-win-reg --merge WindowsGuest service.reg\n"
34542 #: ../tools/virt-win-reg.pl:731 ../tools/virt-list-filesystems.pl:182
34543 #: ../tools/virt-tar.pl:279 ../tools/virt-make-fs.pl:532
34544 #: ../tools/virt-list-partitions.pl:250
34545 msgid "SHELL QUOTING"
34550 #: ../tools/virt-win-reg.pl:733
34552 "Be careful when passing parameters containing C<\\> (backslash) in the "
34553 "shell. Usually you will have to use 'single quotes' or double backslashes "
34554 "(but not both) to protect them from the shell."
34559 #: ../tools/virt-win-reg.pl:737
34560 msgid "Paths and value names are case-insensitive."
34565 #: ../tools/virt-win-reg.pl:739 ../tools/virt-list-filesystems.pl:184
34566 #: ../tools/virt-tar.pl:281 ../tools/virt-make-fs.pl:534
34567 #: ../tools/virt-list-partitions.pl:252
34569 "Libvirt guest names can contain arbitrary characters, some of which have "
34570 "meaning to the shell such as C<#> and space. You may need to quote or "
34571 "escape these characters on the command line. See the shell manual page L<sh"
34572 "(1)> for details."
34577 #: ../tools/virt-win-reg.pl:746
34579 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
34580 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
34581 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
34586 #: ../tools/virt-win-reg.pl:761 ../tools/virt-make-fs.pl:555
34588 "When reporting bugs, please enable debugging and capture the I<complete> "
34594 #: ../tools/virt-win-reg.pl:764
34597 " export LIBGUESTFS_DEBUG=1\n"
34598 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
34604 #: ../tools/virt-win-reg.pl:767
34606 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."
34612 #: ../tools/virt-win-reg.pl:770 ../tools/virt-list-filesystems.pl:202
34613 #: ../tools/virt-tar.pl:301 ../tools/virt-make-fs.pl:564
34614 #: ../tools/virt-list-partitions.pl:269
34620 #: ../tools/virt-win-reg.pl:772 ../tools/virt-list-filesystems.pl:204
34621 #: ../tools/virt-tar.pl:303 ../tools/virt-make-fs.pl:566
34622 #: ../tools/virt-list-partitions.pl:271
34623 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
34628 #: ../tools/virt-win-reg.pl:776 ../tools/virt-make-fs.pl:570
34629 msgid "Copyright (C) 2010 Red Hat Inc."
34634 #: ../tools/virt-list-filesystems.pl:32
34636 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
34641 #: ../tools/virt-list-filesystems.pl:36
34644 " virt-list-filesystems [--options] domname\n"
34650 #: ../tools/virt-list-filesystems.pl:38
34653 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
34659 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
34661 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
34667 #: ../tools/virt-list-filesystems.pl:45
34669 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
34670 "are contained in a virtual machine or disk image."
34675 #: ../tools/virt-list-filesystems.pl:49
34677 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
34678 "functionality. For more complex cases you should look at the L<guestfish(1)"
34684 #: ../tools/virt-list-filesystems.pl:106 ../tools/virt-list-partitions.pl:115
34685 msgid "B<-l> | B<--long>"
34690 #: ../tools/virt-list-filesystems.pl:108
34692 "With this option, C<virt-list-filesystems> displays the type of each "
34693 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
34698 #: ../tools/virt-list-filesystems.pl:115
34699 msgid "B<-a> | B<--all>"
34704 #: ../tools/virt-list-filesystems.pl:117
34706 "Normally we only show mountable filesystems. If this option is given then "
34707 "swap devices are shown too."
34712 #: ../tools/virt-list-filesystems.pl:191
34714 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-"
34715 "filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::"
34716 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
34721 #: ../tools/virt-list-filesystems.pl:208 ../tools/virt-tar.pl:307
34722 msgid "Copyright (C) 2009 Red Hat Inc."
34727 #: ../tools/virt-tar.pl:33
34728 msgid "virt-tar - Extract or upload files to a virtual machine"
34733 #: ../tools/virt-tar.pl:37
34736 " virt-tar [--options] -x domname directory tarball\n"
34742 #: ../tools/virt-tar.pl:39
34745 " virt-tar [--options] -u domname tarball directory\n"
34751 #: ../tools/virt-tar.pl:41
34754 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
34760 #: ../tools/virt-tar.pl:43
34763 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
34768 #: ../tools/virt-tar.pl:47
34770 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-"
34771 "tar-in(1)>, L<virt-tar-out(1)> as replacements."
34776 #: ../tools/virt-tar.pl:52
34777 msgid "Download C</home> from the VM into a local tarball:"
34782 #: ../tools/virt-tar.pl:54
34785 " virt-tar -x domname /home home.tar\n"
34791 #: ../tools/virt-tar.pl:56
34794 " virt-tar -zx domname /home home.tar.gz\n"
34800 #: ../tools/virt-tar.pl:58
34801 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
34806 #: ../tools/virt-tar.pl:60
34809 " virt-tar -u domname uploadstuff.tar /tmp\n"
34815 #: ../tools/virt-tar.pl:62
34818 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
34823 #: ../tools/virt-tar.pl:66
34825 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
34826 "virtual machines. If you do this, you risk disk corruption in the VM. "
34827 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
34831 #: ../tools/virt-tar.pl:71
34833 "You can use I<-x> (extract) on live virtual machines, but you might get "
34834 "inconsistent results or errors if there is filesystem activity inside the "
34835 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
34836 "work, but the only way to guarantee consistent results is if the virtual "
34837 "machine is shut down."
34842 #: ../tools/virt-tar.pl:79
34844 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
34845 "parts of a guest filesystem. There are many possibilities: making backups, "
34846 "uploading data files, snooping on guest activity, fixing or customizing "
34852 #: ../tools/virt-tar.pl:84
34854 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
34855 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
34856 "should look at the L<guestfish(1)> tool."
34860 #: ../tools/virt-tar.pl:88
34862 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
34863 "its contents (recursively) from the virtual machine into a local tarball. "
34864 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
34865 "virtual machine. You cannot use these two options together."
34869 #: ../tools/virt-tar.pl:94
34871 "In addition, you may need to use the I<-z> (gZip) option to enable "
34872 "compression. When uploading, you have to specify I<-z> if the upload file "
34873 "is compressed because virt-tar won't detect this on its own."
34878 #: ../tools/virt-tar.pl:98
34880 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
34881 "example it cannot do PKZip files or bzip2 compression. If you want that "
34882 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
34883 "the L<libguestfs(3)> API)."
34888 #: ../tools/virt-tar.pl:156
34889 msgid "B<-x> | B<--extract> | B<--download>"
34894 #: ../tools/virt-tar.pl:158
34895 msgid "B<-u> | B<--upload>"
34899 #: ../tools/virt-tar.pl:160
34901 "Use I<-x> to extract (download) a directory from a virtual machine to a "
34906 #: ../tools/virt-tar.pl:163
34908 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
34909 "Please read the L</WARNING> section above before using this option."
34914 #: ../tools/virt-tar.pl:167
34915 msgid "You must specify exactly one of these options."
34920 #: ../tools/virt-tar.pl:173
34921 msgid "B<-z> | B<--gzip>"
34926 #: ../tools/virt-tar.pl:175
34927 msgid "Specify that the input or output tarball is gzip-compressed."
34931 #: ../tools/virt-tar.pl:288
34933 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-copy-"
34934 "in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<Sys::"
34935 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
34941 #: ../tools/virt-make-fs.pl:37
34942 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
34947 #: ../tools/virt-make-fs.pl:41
34950 " virt-make-fs [--options] input.tar output.img\n"
34956 #: ../tools/virt-make-fs.pl:43
34959 " virt-make-fs [--options] input.tar.gz output.img\n"
34965 #: ../tools/virt-make-fs.pl:45
34968 " virt-make-fs [--options] directory output.img\n"
34974 #: ../tools/virt-make-fs.pl:49
34976 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
34977 "archive or some files in a directory. It is similar to tools like L<mkisofs"
34978 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
34979 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
34980 "you want to attach these filesystems to existing virtual machines (eg. to "
34981 "import large amounts of read-only data to a VM)."
34986 #: ../tools/virt-make-fs.pl:57
34987 msgid "Basic usage is:"
34992 #: ../tools/virt-make-fs.pl:59
34995 " virt-make-fs input output\n"
35001 #: ../tools/virt-make-fs.pl:61
35003 "where C<input> is either a directory containing files that you want to add, "
35004 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
35005 "C<output> is a disk image. The input type is detected automatically. The "
35006 "output disk image defaults to a raw ext2 image unless you specify extra "
35007 "flags (see L</OPTIONS> below)."
35012 #: ../tools/virt-make-fs.pl:67
35013 msgid "EXTRA SPACE"
35017 #: ../tools/virt-make-fs.pl:69
35019 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
35020 "the files that it contains, but might have extra space. Depending on how "
35021 "you are going to use the output, you might think this extra space is wasted "
35022 "and want to minimize it, or you might want to leave space so that more files "
35023 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
35024 "but you can use the I<--size> flag to leave space in the filesystem if you "
35029 #: ../tools/virt-make-fs.pl:77
35031 "An alternative way to leave extra space but not make the output image any "
35032 "bigger is to use an alternative disk image format (instead of the default "
35033 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
35034 "image format (check your hypervisor supports this before using it). This "
35035 "allows you to choose a large I<--size> but the extra space won't actually be "
35036 "allocated in the image until you try to store something in it."
35040 #: ../tools/virt-make-fs.pl:85
35042 "Don't forget that you can also use local commands including L<resize2fs(8)> "
35043 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
35044 "to build another image from scratch."
35049 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123
35050 #: ../tools/virt-make-fs.pl:142
35056 #: ../tools/virt-make-fs.pl:91
35059 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
35065 #: ../tools/virt-make-fs.pl:93
35066 msgid "FILESYSTEM TYPE"
35071 #: ../tools/virt-make-fs.pl:95
35073 "The default filesystem type is C<ext2>. Just about any filesystem type that "
35074 "libguestfs supports can be used (but I<not> read-only formats like "
35075 "ISO9660). Here are some of the more common choices:"
35080 #: ../tools/virt-make-fs.pl:101
35086 #: ../tools/virt-make-fs.pl:103
35088 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
35089 "you are not going to use the filesystem in a way that requires the journal, "
35090 "then this is just wasted overhead."
35095 #: ../tools/virt-make-fs.pl:107
35096 msgid "I<ntfs> or I<vfat>"
35101 #: ../tools/virt-make-fs.pl:109
35102 msgid "Useful if exporting data to a Windows guest."
35107 #: ../tools/virt-make-fs.pl:111
35109 "I<Note for vfat>: The tar archive or local directory must only contain files "
35110 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
35111 "program running within libguestfs is unable to change the ownership of non-"
35112 "root files, since vfat itself does not support this."
35117 #: ../tools/virt-make-fs.pl:116
35123 #: ../tools/virt-make-fs.pl:118
35125 "Lower overhead than C<ext2>, but certain limitations on filename length and "
35126 "total filesystem size."
35131 #: ../tools/virt-make-fs.pl:125
35134 " virt-make-fs --type=minix input minixfs.img\n"
35140 #: ../tools/virt-make-fs.pl:127
35141 msgid "TO PARTITION OR NOT TO PARTITION"
35146 #: ../tools/virt-make-fs.pl:129
35147 msgid "Optionally virt-make-fs can add a partition table to the output disk."
35152 #: ../tools/virt-make-fs.pl:131
35154 "Adding a partition can make the disk image more compatible with certain "
35155 "virtualized operating systems which don't expect to see a filesystem "
35156 "directly located on a block device (Linux doesn't care and will happily "
35157 "handle both types)."
35162 #: ../tools/virt-make-fs.pl:136
35164 "On the other hand, if you have a partition table then the output image is no "
35165 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
35166 "directly on a partitioned disk image. (However libguestfs tools such as "
35167 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
35172 #: ../tools/virt-make-fs.pl:144
35173 msgid "Add an MBR partition:"
35178 #: ../tools/virt-make-fs.pl:146
35181 " virt-make-fs --partition -- input disk.img\n"
35187 #: ../tools/virt-make-fs.pl:148
35189 "If the output disk image could be terabyte-sized or larger, it's better to "
35190 "use an EFI/GPT-compatible partition table:"
35195 #: ../tools/virt-make-fs.pl:151
35198 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
35204 #: ../tools/virt-make-fs.pl:179
35205 msgid "Enable debugging information."
35210 #: ../tools/virt-make-fs.pl:185
35211 msgid "B<--size=E<lt>NE<gt>>"
35216 #: ../tools/virt-make-fs.pl:187
35217 msgid "B<--size=+E<lt>NE<gt>>"
35222 #: ../tools/virt-make-fs.pl:189
35223 msgid "B<-s E<lt>NE<gt>>"
35228 #: ../tools/virt-make-fs.pl:191
35229 msgid "B<-s +E<lt>NE<gt>>"
35233 #: ../tools/virt-make-fs.pl:193
35235 "Use the I<--size> (or I<-s>) option to choose the size of the output image."
35240 #: ../tools/virt-make-fs.pl:196
35242 "If this option is I<not> given, then the output image will be just large "
35243 "enough to contain all the files, with not much wasted space."
35248 #: ../tools/virt-make-fs.pl:199
35250 "To choose a fixed size output disk, specify an absolute number followed by b/"
35251 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
35252 "Petabytes or Exabytes. This must be large enough to contain all the input "
35253 "files, else you will get an error."
35257 #: ../tools/virt-make-fs.pl:204
35259 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
35260 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
35261 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
35262 "the input files, and (approximately) an extra 200 MB free space."
35267 #: ../tools/virt-make-fs.pl:210
35269 "Note that virt-make-fs estimates free space, and therefore will not produce "
35270 "filesystems containing precisely the free space requested. (It is much more "
35271 "expensive and time-consuming to produce a filesystem which has precisely the "
35272 "desired free space)."
35277 #: ../tools/virt-make-fs.pl:219
35278 msgid "B<--format=E<lt>fmtE<gt>>"
35283 #: ../tools/virt-make-fs.pl:221
35284 msgid "B<-F E<lt>fmtE<gt>>"
35289 #: ../tools/virt-make-fs.pl:223
35290 msgid "Choose the output disk image format."
35295 #: ../tools/virt-make-fs.pl:225
35296 msgid "The default is C<raw> (raw disk image)."
35301 #: ../tools/virt-make-fs.pl:227
35303 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
35304 "that would really make sense here is C<qcow2>."
35309 #: ../tools/virt-make-fs.pl:234
35310 msgid "B<--type=E<lt>fsE<gt>>"
35315 #: ../tools/virt-make-fs.pl:236
35316 msgid "B<-t E<lt>fsE<gt>>"
35321 #: ../tools/virt-make-fs.pl:238
35322 msgid "Choose the output filesystem type."
35327 #: ../tools/virt-make-fs.pl:240
35328 msgid "The default is C<ext2>."
35333 #: ../tools/virt-make-fs.pl:242
35335 "Any filesystem which is supported read-write by libguestfs can be used here."
35340 #: ../tools/virt-make-fs.pl:249
35341 msgid "B<--partition>"
35346 #: ../tools/virt-make-fs.pl:251
35347 msgid "B<--partition=E<lt>parttypeE<gt>>"
35352 #: ../tools/virt-make-fs.pl:253
35354 "If specified, this flag adds an MBR partition table to the output disk image."
35358 #: ../tools/virt-make-fs.pl:256
35360 "You can change the partition table type, eg. I<--partition=gpt> for large "
35365 #: ../tools/virt-make-fs.pl:259
35367 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
35368 "might consider the next parameter to be the partition type. For example:"
35373 #: ../tools/virt-make-fs.pl:263
35376 " virt-make-fs --partition input.tar ...\n"
35381 #: ../tools/virt-make-fs.pl:265
35383 "would cause virt-make-fs to think you wanted to use a partition type of "
35384 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
35385 "dash) between options and the input file argument:"
35390 #: ../tools/virt-make-fs.pl:269
35393 " virt-make-fs --partition -- input.tar ...\n"
35398 #: ../tools/virt-make-fs.pl:541
35400 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
35401 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
35402 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
35407 #: ../tools/virt-make-fs.pl:558
35410 " export LIBGUESTFS_DEBUG=1\n"
35411 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
35417 #: ../tools/virt-make-fs.pl:561
35419 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
35425 #: ../tools/virt-list-partitions.pl:32
35427 "virt-list-partitions - List partitions in a virtual machine or disk image"
35432 #: ../tools/virt-list-partitions.pl:36
35435 " virt-list-partitions [--options] domname\n"
35441 #: ../tools/virt-list-partitions.pl:38
35444 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
35450 #: ../tools/virt-list-partitions.pl:45
35452 "C<virt-list-partitions> is a command line tool to list the partitions that "
35453 "are contained in a virtual machine or disk image. It is mainly useful as a "
35454 "first step to using L<virt-resize(1)>."
35459 #: ../tools/virt-list-partitions.pl:50
35461 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
35462 "functionality. For more complex cases you should look at the L<guestfish(1)"
35468 #: ../tools/virt-list-partitions.pl:107
35469 msgid "B<-h> | B<--human-readable>"
35474 #: ../tools/virt-list-partitions.pl:109
35475 msgid "Show sizes in human-readable form (eg. \"1G\")."
35480 #: ../tools/virt-list-partitions.pl:117
35482 "With this option, C<virt-list-partitions> displays the type and size of each "
35483 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
35488 #: ../tools/virt-list-partitions.pl:124
35489 msgid "B<-t> | B<--total>"
35494 #: ../tools/virt-list-partitions.pl:126
35496 "Display the total size of each block device (as a separate row or rows)."
35501 #: ../tools/virt-list-partitions.pl:259
35503 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-list-"
35504 "filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib"
35505 "(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
35510 #: ../tools/virt-list-partitions.pl:275
35511 msgid "Copyright (C) 2009-2010 Red Hat Inc."