1 # SOME DESCRIPTIVE TITLE.
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
10 "POT-Creation-Date: 2011-05-09 15:21+0200\n"
11 "PO-Revision-Date: 2010-09-02 14:46+0100\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
21 #: ../src/guestfs.pod:3 ../fish/guestfish.pod:3
22 #: ../test-tool/libguestfs-test-tool.pod:3 ../fuse/guestmount.pod:3
23 #: ../tools/virt-win-reg.pl:35 ../tools/virt-list-filesystems.pl:30
24 #: ../tools/virt-tar.pl:31 ../tools/virt-make-fs.pl:35
25 #: ../tools/virt-list-partitions.pl:30
31 #: ../src/guestfs.pod:5
32 msgid "guestfs - Library for accessing and modifying virtual machine images"
37 #: ../src/guestfs.pod:7 ../fish/guestfish.pod:7
38 #: ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7
39 #: ../tools/virt-win-reg.pl:39 ../tools/virt-list-filesystems.pl:34
40 #: ../tools/virt-tar.pl:35 ../tools/virt-make-fs.pl:39
41 #: ../tools/virt-list-partitions.pl:34
47 #: ../src/guestfs.pod:9
50 " #include <guestfs.h>\n"
56 #: ../src/guestfs.pod:11
59 " guestfs_h *g = guestfs_create ();\n"
60 " guestfs_add_drive (g, \"guest.img\");\n"
61 " guestfs_launch (g);\n"
62 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
63 " guestfs_touch (g, \"/hello\");\n"
64 " guestfs_umount (g, \"/\");\n"
65 " guestfs_close (g);\n"
71 #: ../src/guestfs.pod:19
74 " cc prog.c -o prog -lguestfs\n"
76 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
82 #: ../src/guestfs.pod:23 ../fish/guestfish.pod:30
83 #: ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:20
84 #: ../tools/virt-win-reg.pl:63 ../tools/virt-list-filesystems.pl:40
85 #: ../tools/virt-tar.pl:77 ../tools/virt-make-fs.pl:47
86 #: ../tools/virt-list-partitions.pl:40
92 #: ../src/guestfs.pod:25
94 "Libguestfs is a library for accessing and modifying guest disk images. "
95 "Amongst the things this is good for: making batch configuration changes to "
96 "guests, getting disk used/free statistics (see also: virt-df), migrating "
97 "between virtualization systems (see also: virt-p2v), performing partial "
98 "backups, performing partial guest clones, cloning guests and changing "
99 "registry/UUID/hostname info, and much else besides."
104 #: ../src/guestfs.pod:33
106 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
107 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
108 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
114 #: ../src/guestfs.pod:38
116 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
117 "what filesystem is in each LV, etc.). It can also run commands in the "
118 "context of the guest. Also you can access filesystems over FUSE."
123 #: ../src/guestfs.pod:43
125 "Libguestfs is a library that can be linked with C and C++ management "
126 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
127 "PHP, Haskell or C#). You can also use it from shell scripts or the command "
133 #: ../src/guestfs.pod:48
135 "You don't need to be root to use libguestfs, although obviously you do need "
136 "enough permissions to access the disk images."
141 #: ../src/guestfs.pod:51
143 "Libguestfs is a large API because it can do many things. For a gentle "
144 "introduction, please read the L</API OVERVIEW> section next."
149 #: ../src/guestfs.pod:54
151 "There are also some example programs in the L<guestfs-examples(3)> manual "
157 #: ../src/guestfs.pod:57
163 #: ../src/guestfs.pod:59
165 "This section provides a gentler overview of the libguestfs API. We also try "
166 "to group API calls together, where that may not be obvious from reading "
167 "about the individual calls in the main section of this manual."
172 #: ../src/guestfs.pod:64
178 #: ../src/guestfs.pod:66
180 "Before you can use libguestfs calls, you have to create a handle. Then you "
181 "must add at least one disk image to the handle, followed by launching the "
182 "handle, then performing whatever operations you want, and finally closing "
183 "the handle. By convention we use the single letter C<g> for the name of the "
184 "handle variable, although of course you can use any name you want."
189 #: ../src/guestfs.pod:73
190 msgid "The general structure of all libguestfs-using programs looks like this:"
195 #: ../src/guestfs.pod:76
198 " guestfs_h *g = guestfs_create ();\n"
204 #: ../src/guestfs.pod:78
207 " /* Call guestfs_add_drive additional times if there are\n"
208 " * multiple disk images.\n"
210 " guestfs_add_drive (g, \"guest.img\");\n"
216 #: ../src/guestfs.pod:83
219 " /* Most manipulation calls won't work until you've launched\n"
220 " * the handle 'g'. You have to do this _after_ adding drives\n"
221 " * and _before_ other commands.\n"
223 " guestfs_launch (g);\n"
229 #: ../src/guestfs.pod:89
232 " /* Now you can examine what partitions, LVs etc are available.\n"
234 " char **partitions = guestfs_list_partitions (g);\n"
235 " char **logvols = guestfs_lvs (g);\n"
241 #: ../src/guestfs.pod:94
244 " /* To access a filesystem in the image, you must mount it.\n"
246 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
251 #: ../src/guestfs.pod:98
254 " /* Now you can perform filesystem actions on the guest\n"
257 " guestfs_touch (g, \"/hello\");\n"
263 #: ../src/guestfs.pod:103
266 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
267 " * it is done automatically when you close the handle. See\n"
268 " * discussion of autosync in this page.\n"
270 " guestfs_sync (g);\n"
276 #: ../src/guestfs.pod:109
279 " /* Close the handle 'g'. */\n"
280 " guestfs_close (g);\n"
286 #: ../src/guestfs.pod:112
288 "The code above doesn't include any error checking. In real code you should "
289 "check return values carefully for errors. In general all functions that "
290 "return integers return C<-1> on error, and all functions that return "
291 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
292 "how to handle errors, and consult the documentation for each function call "
293 "below to see precisely how they return error indications. See L<guestfs-"
294 "examples(3)> for fully worked examples."
299 #: ../src/guestfs.pod:121
305 #: ../src/guestfs.pod:123
307 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
308 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
309 "actual block device, or simply an empty file of zeroes that you have created "
310 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
316 #: ../src/guestfs.pod:129
318 "The call you should use in modern code for adding drives is L</"
319 "guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
320 "specifying that the format is raw, do:"
325 #: ../src/guestfs.pod:133
328 " guestfs_add_drive_opts (g, filename,\n"
329 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
336 #: ../src/guestfs.pod:137
337 msgid "You can add a disk read-only using:"
342 #: ../src/guestfs.pod:139
345 " guestfs_add_drive_opts (g, filename,\n"
346 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
347 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
354 #: ../src/guestfs.pod:144
356 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
357 "libguestfs won't modify the file."
362 #: ../src/guestfs.pod:147
364 "Be extremely cautious if the disk image is in use, eg. if it is being used "
365 "by a virtual machine. Adding it read-write will almost certainly cause disk "
366 "corruption, but adding it read-only is safe."
371 #: ../src/guestfs.pod:151
373 "You must add at least one disk image, and you may add multiple disk images. "
374 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
375 "first one you added), C</dev/sdb> (for the second one you added), etc."
380 #: ../src/guestfs.pod:156
382 "Once L</guestfs_launch> has been called you cannot add any more images. You "
383 "can call L</guestfs_list_devices> to get a list of the device names, in the "
384 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
389 #: ../src/guestfs.pod:161
394 #: ../src/guestfs.pod:163
396 "Before you can read or write files, create directories and so on in a disk "
397 "image that contains filesystems, you have to mount those filesystems using "
398 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
399 "a disk image contains (for example) one partition with a filesystem on that "
400 "partition, then you can mount it directly:"
404 #: ../src/guestfs.pod:170
407 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
412 #: ../src/guestfs.pod:172
414 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
415 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
416 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
417 "that these are libguestfs virtual devices, and are nothing to do with host "
422 #: ../src/guestfs.pod:178
424 "If you are given a disk image and you don't know what it contains then you "
425 "have to find out. Libguestfs can do that too: use L</"
426 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
427 "LVs, and either try mounting each to see what is mountable, or else examine "
428 "them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
429 "filesystems, use L</guestfs_list_filesystems>."
433 #: ../src/guestfs.pod:186
435 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
436 "L</INSPECTION> below). But you might find it easier to look at higher level "
437 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
441 #: ../src/guestfs.pod:191
443 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
444 "several other variations of the C<guestfs_mount_*> call."
449 #: ../src/guestfs.pod:194
450 msgid "FILESYSTEM ACCESS AND MODIFICATION"
455 #: ../src/guestfs.pod:196
457 "The majority of the libguestfs API consists of fairly low-level calls for "
458 "accessing and modifying the files, directories, symlinks etc on mounted "
459 "filesystems. There are over a hundred such calls which you can find listed "
460 "in detail below in this man page, and we don't even pretend to cover them "
461 "all in this overview."
466 #: ../src/guestfs.pod:202
468 "Specify filenames as full paths, starting with C<\"/\"> and including the "
474 #: ../src/guestfs.pod:205
476 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
477 "the file called C<\"etc/passwd\"> then you could do:"
482 #: ../src/guestfs.pod:208
485 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
491 #: ../src/guestfs.pod:210
493 "This would return C<data> as a newly allocated buffer containing the full "
494 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
495 "or C<NULL> if there was an error."
500 #: ../src/guestfs.pod:214
502 "As another example, to create a top-level directory on that filesystem "
503 "called C<\"var\"> you would do:"
508 #: ../src/guestfs.pod:217
511 " guestfs_mkdir (g, \"/var\");\n"
517 #: ../src/guestfs.pod:219
518 msgid "To create a symlink you could do:"
523 #: ../src/guestfs.pod:221
526 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
527 " \"/etc/rc3.d/S30portmap\");\n"
533 #: ../src/guestfs.pod:224
535 "Libguestfs will reject attempts to use relative paths and there is no "
536 "concept of a current working directory."
541 #: ../src/guestfs.pod:227
543 "Libguestfs can return errors in many situations: for example if the "
544 "filesystem isn't writable, or if a file or directory that you requested "
545 "doesn't exist. If you are using the C API (documented here) you have to "
546 "check for those error conditions after each call. (Other language bindings "
547 "turn these errors into exceptions)."
552 #: ../src/guestfs.pod:233
554 "File writes are affected by the per-handle umask, set by calling L</"
555 "guestfs_umask> and defaulting to 022. See L</UMASK>."
560 #: ../src/guestfs.pod:236
566 #: ../src/guestfs.pod:238
568 "Libguestfs contains API calls to read, create and modify partition tables on "
574 #: ../src/guestfs.pod:241
576 "In the common case where you want to create a single partition covering the "
577 "whole disk, you should use the L</guestfs_part_disk> call:"
582 #: ../src/guestfs.pod:245
585 " const char *parttype = \"mbr\";\n"
586 " if (disk_is_larger_than_2TB)\n"
587 " parttype = \"gpt\";\n"
588 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
594 #: ../src/guestfs.pod:250
596 "Obviously this effectively wipes anything that was on that disk image before."
601 #: ../src/guestfs.pod:253
607 #: ../src/guestfs.pod:255
609 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
610 "guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense unless "
611 "you familiarize yourself with the concepts of physical volumes, volume "
612 "groups and logical volumes."
617 #: ../src/guestfs.pod:260
619 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
620 "tldp.org/HOWTO/LVM-HOWTO/>."
625 #: ../src/guestfs.pod:263
630 #: ../src/guestfs.pod:265
632 "Use L</guestfs_cat> to download small, text only files. This call is "
633 "limited to files which are less than 2 MB and which cannot contain any ASCII "
634 "NUL (C<\\0>) characters. However the API is very simple to use."
639 #: ../src/guestfs.pod:269
641 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
642 "bit data, since it returns a (pointer, size) pair. However it is still "
643 "limited to \"small\" files, less than 2 MB."
648 #: ../src/guestfs.pod:273
650 "L</guestfs_download> can be used to download any file, with no limits on "
651 "content or size (even files larger than 4 GB)."
656 #: ../src/guestfs.pod:276
658 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
663 #: ../src/guestfs.pod:279
669 #: ../src/guestfs.pod:281
671 "It's often the case that you want to write a file or files to the disk image."
676 #: ../src/guestfs.pod:284
678 "To write a small file with fixed content, use L</guestfs_write>. To create "
679 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
680 "guestfs_fallocate64> (with all disk blocks allocated). There are a variety "
681 "of other functions for creating test files, for example L</guestfs_fill> and "
682 "L</guestfs_fill_pattern>."
687 #: ../src/guestfs.pod:290
689 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
690 "file content or size (even files larger than 4 GB)."
695 #: ../src/guestfs.pod:293
697 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
702 #: ../src/guestfs.pod:295
704 "However the fastest way to upload I<large numbers of arbitrary files> is to "
705 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
706 ">), then attach this using L</guestfs_add_drive_ro>. If you add the drive "
707 "in a predictable way (eg. adding it last after all other drives) then you "
708 "can get the device name from L</guestfs_list_devices> and mount it directly "
709 "using L</guestfs_mount_ro>. Note that squashfs images are sometimes non-"
710 "portable between kernel versions, and they don't support labels or UUIDs. "
711 "If you want to pre-build an image or you need to mount it using a label or "
712 "UUID, use an ISO image instead."
717 #: ../src/guestfs.pod:306
723 #: ../src/guestfs.pod:308
725 "There are various different commands for copying between files and devices "
726 "and in and out of the guest filesystem. These are summarised in the table "
732 #: ../src/guestfs.pod:314
733 msgid "B<file> to B<file>"
738 #: ../src/guestfs.pod:316
740 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
741 "directories recursively."
746 #: ../src/guestfs.pod:319
747 msgid "B<file or device> to B<file or device>"
752 #: ../src/guestfs.pod:321
754 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
755 "devices in the guest."
760 #: ../src/guestfs.pod:324
761 msgid "Example: duplicate the contents of an LV:"
766 #: ../src/guestfs.pod:326
769 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
775 #: ../src/guestfs.pod:328
777 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
778 "(C</dev/VG/Original>). To copy less than the whole source device, use L</"
779 "guestfs_copy_size>."
784 #: ../src/guestfs.pod:332
785 msgid "B<file on the host> to B<file or device>"
790 #: ../src/guestfs.pod:334
791 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
796 #: ../src/guestfs.pod:336
797 msgid "B<file or device> to B<file on the host>"
802 #: ../src/guestfs.pod:338
803 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
808 #: ../src/guestfs.pod:342
809 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
814 #: ../src/guestfs.pod:344
816 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, L</"
817 "guestfs_tar_out> etc appear to only take filenames as arguments, so it "
818 "appears you can only upload and download to files. However many Un*x-like "
819 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, C</"
820 "dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, stderr, "
821 "and arbitrary file descriptor N."
826 #: ../src/guestfs.pod:352
827 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
831 #: ../src/guestfs.pod:355
834 " guestfs_download (g, filename, \"/dev/stdout\");\n"
839 #: ../src/guestfs.pod:357
840 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
844 #: ../src/guestfs.pod:359
848 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
849 " guestfs_tar_out (g, \"/\", devfd);\n"
855 #: ../src/guestfs.pod:363
856 msgid "LISTING FILES"
861 #: ../src/guestfs.pod:365
863 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
864 "L<guestfish(1)>-equivalent command C<ll>)."
869 #: ../src/guestfs.pod:368
871 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
872 "programs, as a flat list of strings."
877 #: ../src/guestfs.pod:371
879 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
880 "directory, plus additional information about each one. It is more "
881 "equivalent to using the L<readdir(3)> call on a local filesystem."
886 #: ../src/guestfs.pod:375
888 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
893 #: ../src/guestfs.pod:378
894 msgid "RUNNING COMMANDS"
899 #: ../src/guestfs.pod:380
901 "Although libguestfs is primarily an API for manipulating files inside guest "
902 "images, we also provide some limited facilities for running commands inside "
908 #: ../src/guestfs.pod:384
909 msgid "There are many limitations to this:"
914 #: ../src/guestfs.pod:388 ../src/guestfs.pod:393 ../src/guestfs.pod:398
915 #: ../src/guestfs.pod:402 ../src/guestfs.pod:407 ../src/guestfs.pod:411
916 #: ../src/guestfs.pod:416 ../src/guestfs.pod:421 ../src/guestfs.pod:1064
917 #: ../src/guestfs.pod:1068 ../src/guestfs.pod:1072 ../src/guestfs.pod:1077
918 #: ../src/guestfs.pod:1085 ../src/guestfs.pod:1104 ../src/guestfs.pod:1112
919 #: ../src/guestfs.pod:1134 ../src/guestfs.pod:1138 ../src/guestfs.pod:1142
920 #: ../src/guestfs.pod:1146 ../src/guestfs.pod:1150 ../src/guestfs.pod:1154
921 #: ../src/guestfs.pod:1643 ../src/guestfs.pod:1648 ../src/guestfs.pod:1652
922 #: ../src/guestfs.pod:1754 ../src/guestfs.pod:1759 ../src/guestfs.pod:1763
923 #: ../src/guestfs.pod:1773 ../src/guestfs.pod:2008 ../src/guestfs.pod:2013
924 #: ../src/guestfs.pod:2019 ../src/guestfs.pod:2027 ../src/guestfs.pod:2381
925 #: ../src/guestfs.pod:2387 ../src/guestfs.pod:2392 ../src/guestfs.pod:2398
926 #: ../src/guestfs.pod:2967 ../src/guestfs.pod:2971 ../src/guestfs.pod:2975
927 #: ../src/guestfs.pod:2979 ../src/guestfs-actions.pod:15
928 #: ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:583
929 #: ../src/guestfs-actions.pod:591 ../src/guestfs-actions.pod:598
930 #: ../src/guestfs-actions.pod:605 ../src/guestfs-actions.pod:1606
931 #: ../src/guestfs-actions.pod:1610 ../src/guestfs-actions.pod:1614
932 #: ../src/guestfs-actions.pod:1618 ../src/guestfs-actions.pod:1626
933 #: ../src/guestfs-actions.pod:1630 ../src/guestfs-actions.pod:1634
934 #: ../src/guestfs-actions.pod:1644 ../src/guestfs-actions.pod:1648
935 #: ../src/guestfs-actions.pod:1652 ../src/guestfs-actions.pod:1790
936 #: ../src/guestfs-actions.pod:1794 ../src/guestfs-actions.pod:1799
937 #: ../src/guestfs-actions.pod:1804 ../src/guestfs-actions.pod:1865
938 #: ../src/guestfs-actions.pod:1869 ../src/guestfs-actions.pod:1874
939 #: ../fish/guestfish.pod:445 ../fish/guestfish.pod:449
940 #: ../fish/guestfish.pod:453 ../fish/guestfish.pod:457
941 #: ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20
942 #: ../fish/guestfish-actions.pod:385 ../fish/guestfish-actions.pod:393
943 #: ../fish/guestfish-actions.pod:400 ../fish/guestfish-actions.pod:407
944 #: ../fish/guestfish-actions.pod:1077 ../fish/guestfish-actions.pod:1081
945 #: ../fish/guestfish-actions.pod:1085 ../fish/guestfish-actions.pod:1089
946 #: ../fish/guestfish-actions.pod:1097 ../fish/guestfish-actions.pod:1101
947 #: ../fish/guestfish-actions.pod:1105 ../fish/guestfish-actions.pod:1115
948 #: ../fish/guestfish-actions.pod:1119 ../fish/guestfish-actions.pod:1123
949 #: ../fish/guestfish-actions.pod:1213 ../fish/guestfish-actions.pod:1217
950 #: ../fish/guestfish-actions.pod:1222 ../fish/guestfish-actions.pod:1227
951 #: ../fish/guestfish-actions.pod:1269 ../fish/guestfish-actions.pod:1273
952 #: ../fish/guestfish-actions.pod:1278 ../tools/virt-win-reg.pl:536
953 #: ../tools/virt-win-reg.pl:542 ../tools/virt-win-reg.pl:548
959 #: ../src/guestfs.pod:390
961 "The kernel version that the command runs under will be different from what "
967 #: ../src/guestfs.pod:395
969 "If the command needs to communicate with daemons, then most likely they "
975 #: ../src/guestfs.pod:400
976 msgid "The command will be running in limited memory."
981 #: ../src/guestfs.pod:404
983 "The network may not be available unless you enable it (see L</"
984 "guestfs_set_network>)."
989 #: ../src/guestfs.pod:409
990 msgid "Only supports Linux guests (not Windows, BSD, etc)."
995 #: ../src/guestfs.pod:413
997 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
1002 #: ../src/guestfs.pod:418
1004 "For SELinux guests, you may need to enable SELinux and load policy first. "
1005 "See L</SELINUX> in this manpage."
1010 #: ../src/guestfs.pod:423
1012 "I<Security:> It is not safe to run commands from untrusted, possibly "
1013 "malicious guests. These commands may attempt to exploit your program by "
1014 "sending unexpected output. They could also try to exploit the Linux kernel "
1015 "or qemu provided by the libguestfs appliance. They could use the network "
1016 "provided by the libguestfs appliance to bypass ordinary network partitions "
1017 "and firewalls. They could use the elevated privileges or different SELinux "
1018 "context of your program to their advantage."
1023 #: ../src/guestfs.pod:432
1025 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
1026 "(a script which runs when the guest next boots normally), and to have this "
1027 "script run the commands you want in the normal context of the running guest, "
1028 "network security and so on. For information about other security issues, "
1034 #: ../src/guestfs.pod:440
1036 "The two main API calls to run commands are L</guestfs_command> and L</"
1037 "guestfs_sh> (there are also variations)."
1042 #: ../src/guestfs.pod:443
1044 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
1045 "shell globs, redirections, etc will work."
1050 #: ../src/guestfs.pod:446
1051 msgid "CONFIGURATION FILES"
1056 #: ../src/guestfs.pod:448
1058 "To read and write configuration files in Linux guest filesystems, we "
1059 "strongly recommend using Augeas. For example, Augeas understands how to "
1060 "read and write, say, a Linux shadow password file or X.org configuration "
1061 "file, and so avoids you having to write that code."
1066 #: ../src/guestfs.pod:453
1068 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
1069 "document Augeas itself here because there is excellent documentation on the "
1070 "L<http://augeas.net/> website."
1075 #: ../src/guestfs.pod:457
1077 "If you don't want to use Augeas (you fool!) then try calling L</"
1078 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
1084 #: ../src/guestfs.pod:461
1090 #: ../src/guestfs.pod:463
1092 "We support SELinux guests. To ensure that labeling happens correctly in "
1093 "SELinux guests, you need to enable SELinux and load the guest's policy:"
1098 #: ../src/guestfs.pod:469 ../src/guestfs.pod:1257 ../src/guestfs.pod:1395
1099 #: ../src/guestfs.pod:2426
1105 #: ../src/guestfs.pod:471
1106 msgid "Before launching, do:"
1111 #: ../src/guestfs.pod:473
1114 " guestfs_set_selinux (g, 1);\n"
1120 #: ../src/guestfs.pod:475 ../src/guestfs.pod:1261 ../src/guestfs.pod:1399
1121 #: ../src/guestfs.pod:2451
1127 #: ../src/guestfs.pod:477
1129 "After mounting the guest's filesystem(s), load the policy. This is best "
1130 "done by running the L<load_policy(8)> command in the guest itself:"
1135 #: ../src/guestfs.pod:481
1138 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
1144 #: ../src/guestfs.pod:483
1146 "(Older versions of C<load_policy> require you to specify the name of the "
1152 #: ../src/guestfs.pod:486 ../src/guestfs.pod:1405
1158 #: ../src/guestfs.pod:488
1160 "Optionally, set the security context for the API. The correct security "
1161 "context to use can only be known by inspecting the guest. As an example:"
1166 #: ../src/guestfs.pod:492
1169 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
1175 #: ../src/guestfs.pod:496
1176 msgid "This will work for running commands and editing existing files."
1181 #: ../src/guestfs.pod:498
1183 "When new files are created, you may need to label them explicitly, for "
1184 "example by running the external command C<restorecon pathname>."
1189 #: ../src/guestfs.pod:502
1195 #: ../src/guestfs.pod:504
1197 "Certain calls are affected by the current file mode creation mask (the "
1198 "\"umask\"). In particular ones which create files or directories, such as "
1199 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
1200 "either the default mode that the file is created with or modifies the mode "
1206 #: ../src/guestfs.pod:510
1208 "The default umask is C<022>, so files are created with modes such as C<0644> "
1209 "and directories with C<0755>."
1214 #: ../src/guestfs.pod:513
1216 "There are two ways to avoid being affected by umask. Either set umask to 0 "
1217 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
1218 "guestfs_chmod> after creating each file or directory."
1223 #: ../src/guestfs.pod:517
1224 msgid "For more information about umask, see L<umask(2)>."
1229 #: ../src/guestfs.pod:519 ../fish/guestfish.pod:767
1230 msgid "ENCRYPTED DISKS"
1235 #: ../src/guestfs.pod:521
1237 "Libguestfs allows you to access Linux guests which have been encrypted using "
1238 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1239 "standard. This includes nearly all whole disk encryption systems used by "
1240 "modern Linux guests."
1245 #: ../src/guestfs.pod:527
1247 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1248 "returns the string C<crypto_LUKS>)."
1253 #: ../src/guestfs.pod:530
1255 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
1256 "will require the passphrase!"
1261 #: ../src/guestfs.pod:533
1263 "Opening a LUKS device creates a new device mapper device called C</dev/"
1264 "mapper/mapname> (where C<mapname> is the string you supply to L</"
1265 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
1266 "from and encrypted to the underlying block device respectively."
1271 #: ../src/guestfs.pod:539
1273 "LVM volume groups on the device can be made visible by calling L</"
1274 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
1275 "(s) can now be mounted in the usual way."
1280 #: ../src/guestfs.pod:543
1282 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1283 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1284 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
1285 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1286 "underlying encrypted block device)."
1291 #: ../src/guestfs.pod:550
1296 #: ../src/guestfs.pod:552
1298 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1299 "contains operating systems, an install CD or a live CD. (These APIs used to "
1300 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
1301 "version 1.5.3 the most frequently used part of this library has been "
1302 "rewritten in C and moved into the core code)."
1307 #: ../src/guestfs.pod:559
1309 "Add all disks belonging to the unknown virtual machine and call L</"
1310 "guestfs_launch> in the usual way."
1315 #: ../src/guestfs.pod:562
1317 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1318 "and certain heuristics, and returns a list of operating systems that were "
1319 "found. An empty list means none were found. A single element is the root "
1320 "filesystem of the operating system. For dual- or multi-boot guests, "
1321 "multiple roots can be returned, each one corresponding to a separate "
1322 "operating system. (Multi-boot virtual machines are extremely rare in the "
1323 "world of virtualization, but since this scenario can happen, we have built "
1324 "libguestfs to deal with it.)"
1329 #: ../src/guestfs.pod:571
1331 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1332 "to get additional details about that operating system. For example, call L</"
1333 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1334 "Windows and Linux-based operating systems respectively."
1339 #: ../src/guestfs.pod:577
1341 "Un*x-like and Linux-based operating systems usually consist of several "
1342 "filesystems which are mounted at boot time (for example, a separate boot "
1343 "partition mounted on C</boot>). The inspection rules are able to detect how "
1344 "filesystems correspond to mount points. Call "
1345 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1346 "hash table like this example:"
1351 #: ../src/guestfs.pod:584
1354 " /boot => /dev/sda1\n"
1355 " / => /dev/vg_guest/lv_root\n"
1356 " /usr => /dev/vg_guest/lv_usr\n"
1362 #: ../src/guestfs.pod:588
1364 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1365 "filesystems as suggested."
1370 #: ../src/guestfs.pod:591
1372 "Be careful to mount filesystems in the right order (eg. C</> before C</"
1373 "usr>). Sorting the keys of the hash by length, shortest first, should work."
1378 #: ../src/guestfs.pod:595
1380 "Inspection currently only works for some common operating systems. "
1381 "Contributors are welcome to send patches for other operating systems that we "
1382 "currently cannot detect."
1387 #: ../src/guestfs.pod:599
1389 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1390 "for more details. The L</guestfs_inspect_os> function just ignores any "
1391 "encrypted devices."
1396 #: ../src/guestfs.pod:603
1398 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1399 "inspection and caches the results in the guest handle. Subsequent calls to "
1400 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
1401 "read the disks. If you change the content of the guest disks, you can redo "
1402 "inspection by calling L</guestfs_inspect_os> again. (L</"
1403 "guestfs_inspect_list_applications> works a little differently from the other "
1404 "calls and does read the disks. See documentation for that function for "
1409 #: ../src/guestfs.pod:612
1410 msgid "INSPECTING INSTALL DISKS"
1414 #: ../src/guestfs.pod:614
1416 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
1421 #: ../src/guestfs.pod:617
1423 "Call L</guestfs_inspect_get_format> to return the format of the operating "
1424 "system, which currently can be C<installed> (a regular operating system) or "
1425 "C<installer> (some sort of install disk)."
1429 #: ../src/guestfs.pod:621
1431 "Further information is available about the operating system that can be "
1432 "installed using the regular inspection APIs like L</"
1433 "guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> etc."
1437 #: ../src/guestfs.pod:626
1439 "Some additional information specific to installer disks is also available "
1440 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and L</"
1441 "guestfs_inspect_is_multipart> calls."
1446 #: ../src/guestfs.pod:631
1447 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1452 #: ../src/guestfs.pod:633
1454 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
1455 "ntfs-3g.org/> driver."
1460 #: ../src/guestfs.pod:636
1461 msgid "DRIVE LETTERS AND PATHS"
1466 #: ../src/guestfs.pod:638
1468 "DOS and Windows still use drive letters, and the filesystems are always "
1469 "treated as case insensitive by Windows itself, and therefore you might find "
1470 "a Windows configuration file referring to a path like C<c:\\windows"
1471 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
1472 "might be referred to as C</WINDOWS/System32>."
1476 #: ../src/guestfs.pod:644
1478 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
1479 "L</guestfs_inspect_get_drive_mappings>)"
1483 #: ../src/guestfs.pod:647
1485 "Dealing with separator characters (backslash vs forward slash) is outside "
1486 "the scope of libguestfs, but usually a simple character replacement will "
1491 #: ../src/guestfs.pod:651
1493 "To resolve the case insensitivity of paths, call L</"
1494 "guestfs_case_sensitive_path>."
1499 #: ../src/guestfs.pod:654
1500 msgid "ACCESSING THE WINDOWS REGISTRY"
1505 #: ../src/guestfs.pod:656
1507 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1508 "files, through the library C<hivex> which is part of the libguestfs project "
1509 "although ships as a separate tarball. You have to locate and download the "
1510 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1511 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
1512 "reg(1)> for more help on this issue."
1517 #: ../src/guestfs.pod:664
1518 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
1523 #: ../src/guestfs.pod:666
1525 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
1526 "provide something which looks like a Linux symlink. The way it tries to do "
1527 "the rewriting is described here:"
1532 #: ../src/guestfs.pod:670
1534 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
1540 #: ../src/guestfs.pod:672
1542 "The essential problem is that ntfs-3g simply does not have enough "
1543 "information to do a correct job. NTFS links can contain drive letters and "
1544 "references to external device GUIDs that ntfs-3g has no way of resolving. "
1545 "It is almost certainly the case that libguestfs callers should ignore what "
1546 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
1551 #: ../src/guestfs.pod:679
1553 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use L</"
1554 "guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
1555 "attribute, and read the raw reparse data from that (you can find the format "
1556 "documented in various places around the web)."
1561 #: ../src/guestfs.pod:684
1562 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
1567 #: ../src/guestfs.pod:686
1569 "There are other useful extended attributes that can be read from ntfs-3g "
1570 "filesystems (using L</guestfs_getxattr>). See:"
1575 #: ../src/guestfs.pod:689
1577 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
1582 #: ../src/guestfs.pod:691
1583 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1588 #: ../src/guestfs.pod:693
1590 "Although we don't want to discourage you from using the C API, we will "
1591 "mention here that the same API is also available in other languages."
1595 #: ../src/guestfs.pod:696
1597 "The API is broadly identical in all supported languages. This means that "
1598 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
1599 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
1600 "OCaml. In other words, a straightforward, predictable isomorphism between "
1606 #: ../src/guestfs.pod:702
1608 "Error messages are automatically transformed into exceptions if the language "
1614 #: ../src/guestfs.pod:705
1616 "We don't try to \"object orientify\" parts of the API in OO languages, "
1617 "although contributors are welcome to write higher level APIs above what we "
1618 "provide in their favourite languages if they wish."
1623 #: ../src/guestfs.pod:711
1629 #: ../src/guestfs.pod:713
1631 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1632 "identical to the C API. C++ classes and exceptions are not used."
1637 #: ../src/guestfs.pod:717
1643 #: ../src/guestfs.pod:719
1645 "The C# bindings are highly experimental. Please read the warnings at the "
1646 "top of C<csharp/Libguestfs.cs>."
1651 #: ../src/guestfs.pod:722
1657 #: ../src/guestfs.pod:724
1659 "This is the only language binding that is working but incomplete. Only "
1660 "calls which return simple integers have been bound in Haskell, and we are "
1661 "looking for help to complete this binding."
1666 #: ../src/guestfs.pod:728
1672 #: ../src/guestfs.pod:730
1674 "Full documentation is contained in the Javadoc which is distributed with "
1680 #: ../src/guestfs.pod:733
1685 #: ../src/guestfs.pod:735
1686 msgid "See L<guestfs-ocaml(3)>."
1691 #: ../src/guestfs.pod:737
1696 #: ../src/guestfs.pod:739
1697 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
1702 #: ../src/guestfs.pod:741
1708 #: ../src/guestfs.pod:743
1710 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1711 "the php-libguestfs package for your distribution."
1716 #: ../src/guestfs.pod:746
1717 msgid "The PHP binding only works correctly on 64 bit machines."
1722 #: ../src/guestfs.pod:748
1727 #: ../src/guestfs.pod:750
1728 msgid "See L<guestfs-python(3)>."
1733 #: ../src/guestfs.pod:752
1738 #: ../src/guestfs.pod:754
1739 msgid "See L<guestfs-ruby(3)>."
1744 #: ../src/guestfs.pod:756
1745 msgid "B<shell scripts>"
1749 #: ../src/guestfs.pod:758
1750 msgid "See L<guestfish(1)>."
1755 #: ../src/guestfs.pod:762
1756 msgid "LIBGUESTFS GOTCHAS"
1761 #: ../src/guestfs.pod:764
1763 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1764 "system [...] that works in the way it is documented but is counterintuitive "
1765 "and almost invites mistakes.\""
1770 #: ../src/guestfs.pod:768
1772 "Since we developed libguestfs and the associated tools, there are several "
1773 "things we would have designed differently, but are now stuck with for "
1774 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1775 "release, you can expect these to change. Beware of them."
1780 #: ../src/guestfs.pod:776
1781 msgid "Autosync / forgetting to sync."
1785 #: ../src/guestfs.pod:778
1787 "I<Update:> Autosync is enabled by default for all API users starting from "
1788 "libguestfs 1.5.24. This section only applies to older versions."
1793 #: ../src/guestfs.pod:781
1795 "When modifying a filesystem from C or another language, you B<must> unmount "
1796 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1797 "libguestfs handle. You can also call:"
1802 #: ../src/guestfs.pod:785
1805 " guestfs_set_autosync (g, 1);\n"
1811 #: ../src/guestfs.pod:787
1813 "to have the unmount/sync done automatically for you when the handle 'g' is "
1814 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
1819 #: ../src/guestfs.pod:791
1821 "If you forget to do this, then it is entirely possible that your changes "
1822 "won't be written out, or will be partially written, or (very rarely) that "
1823 "you'll get disk corruption."
1828 #: ../src/guestfs.pod:795
1830 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1831 "guestfish scripts that forget to sync will work just fine, which can make "
1832 "this very puzzling if you are trying to debug a problem."
1837 #: ../src/guestfs.pod:799
1838 msgid "Mount option C<-o sync> should not be the default."
1843 #: ../src/guestfs.pod:801
1845 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1846 "However C<-o sync> does not add any reliability benefit, but does have a "
1847 "very large performance impact."
1852 #: ../src/guestfs.pod:805
1854 "The work around is to use L</guestfs_mount_options> and set the mount "
1855 "options that you actually want to use."
1860 #: ../src/guestfs.pod:808
1861 msgid "Read-only should be the default."
1866 #: ../src/guestfs.pod:810
1868 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1869 "specify I<--rw> if you want to make changes to the image."
1874 #: ../src/guestfs.pod:813
1875 msgid "This would reduce the potential to corrupt live VM images."
1880 #: ../src/guestfs.pod:815
1882 "Note that many filesystems change the disk when you just mount and unmount, "
1883 "even if you didn't perform any writes. You need to use L</"
1884 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
1889 #: ../src/guestfs.pod:819
1890 msgid "guestfish command line is hard to use."
1895 #: ../src/guestfs.pod:821
1897 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1898 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1899 "exist, so it fails. In earlier versions of guestfish the error message was "
1900 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1901 "we should have used C<guestfish -c command> to run commands."
1906 #: ../src/guestfs.pod:828
1907 msgid "guestfish megabyte modifiers don't work right on all commands"
1912 #: ../src/guestfs.pod:830
1914 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1915 "other modifiers). What guestfish actually does is to multiply the number "
1916 "part by the modifier part and pass the result to the C API. However this "
1917 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1918 "expecting some other unit (eg. megabytes)."
1923 #: ../src/guestfs.pod:837
1924 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1929 #: ../src/guestfs.pod:839
1932 " lvcreate LV VG 100M\n"
1938 #: ../src/guestfs.pod:841
1940 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1941 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1942 "megabytes * megabytes) logical volume. The error message you get from this "
1943 "is also a little obscure."
1948 #: ../src/guestfs.pod:846
1950 "This could be fixed in the generator by specially marking parameters and "
1951 "return values which take bytes or other units."
1956 #: ../src/guestfs.pod:849
1957 msgid "Ambiguity between devices and paths"
1962 #: ../src/guestfs.pod:851
1964 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
1965 "sdb2>) and a similar pathname. A file might just happen to be called "
1966 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1971 #: ../src/guestfs.pod:856
1973 "In the current API we usually resolve this ambiguity by having two separate "
1974 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1975 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1976 "detecting if the path supplied begins with C</dev/>."
1981 #: ../src/guestfs.pod:862
1983 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1984 "make paths/devices into structured names. One way to do this would be to "
1985 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1986 "aspect of grub. Another way would be to use a structured type, equivalent "
1987 "to this OCaml type:"
1992 #: ../src/guestfs.pod:868
1995 " type path = Path of string | Device of int | Partition of int * int\n"
2001 #: ../src/guestfs.pod:870
2002 msgid "which would allow you to pass arguments like:"
2007 #: ../src/guestfs.pod:872
2010 " Path \"/foo/bar\"\n"
2011 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
2012 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
2013 " Path \"/dev/sdb2\" (* not a device *)\n"
2019 #: ../src/guestfs.pod:877
2021 "As you can see there are still problems to resolve even with this "
2022 "representation. Also consider how it might work in guestfish."
2027 #: ../src/guestfs.pod:882
2028 msgid "KEYS AND PASSPHRASES"
2033 #: ../src/guestfs.pod:884
2035 "Certain libguestfs calls take a parameter that contains sensitive key "
2036 "material, passed in as a C string."
2041 #: ../src/guestfs.pod:887
2043 "In the future we would hope to change the libguestfs implementation so that "
2044 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
2045 "swap. However this is I<not> done at the moment, because of the complexity "
2046 "of such an implementation."
2051 #: ../src/guestfs.pod:892
2053 "Therefore you should be aware that any key parameter you pass to libguestfs "
2054 "might end up being written out to the swap partition. If this is a concern, "
2055 "scrub the swap partition or don't use libguestfs on encrypted devices."
2060 #: ../src/guestfs.pod:897
2061 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
2066 #: ../src/guestfs.pod:899
2068 "All high-level libguestfs actions are synchronous. If you want to use "
2069 "libguestfs asynchronously then you must create a thread."
2074 #: ../src/guestfs.pod:902
2076 "Only use the handle from a single thread. Either use the handle exclusively "
2077 "from one thread, or provide your own mutex so that two threads cannot issue "
2078 "calls on the same handle at the same time."
2083 #: ../src/guestfs.pod:906
2085 "See the graphical program guestfs-browser for one possible architecture for "
2086 "multithreaded programs using libvirt and libguestfs."
2091 #: ../src/guestfs.pod:909
2096 #: ../src/guestfs.pod:911
2098 "Libguestfs needs a supermin appliance, which it finds by looking along an "
2104 #: ../src/guestfs.pod:914
2106 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
2107 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
2112 #: ../src/guestfs.pod:917
2114 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
2115 "to change the directories that libguestfs will search in. The value is a "
2116 "colon-separated list of paths. The current directory is I<not> searched "
2117 "unless the path contains an empty element or C<.>. For example "
2118 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
2119 "then C</usr/lib/guestfs>."
2124 #: ../src/guestfs.pod:924
2125 msgid "QEMU WRAPPERS"
2130 #: ../src/guestfs.pod:926
2132 "If you want to compile your own qemu, run qemu from a non-standard location, "
2133 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
2139 #: ../src/guestfs.pod:930
2141 "There is one important rule to remember: you I<must C<exec qemu>> as the "
2142 "last command in the shell script (so that qemu replaces the shell and "
2143 "becomes the direct child of the libguestfs-using program). If you don't do "
2144 "this, then the qemu process won't be cleaned up correctly."
2149 #: ../src/guestfs.pod:935
2151 "Here is an example of a wrapper, where I have built my own copy of qemu from "
2157 #: ../src/guestfs.pod:938
2161 " qemudir=/home/rjones/d/qemu\n"
2162 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
2168 #: ../src/guestfs.pod:942
2170 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
2171 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
2177 #: ../src/guestfs.pod:946
2180 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
2186 #: ../src/guestfs.pod:948
2188 "Note that libguestfs also calls qemu with the -help and -version options in "
2189 "order to determine features."
2193 #: ../src/guestfs.pod:951
2194 msgid "ATTACHING TO RUNNING DAEMONS"
2198 #: ../src/guestfs.pod:953
2200 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
2201 "babies. Use with caution."
2205 #: ../src/guestfs.pod:956
2207 "I<Note (2):> This section explains how to attach to a running daemon from a "
2208 "low level perspective. For most users, simply using virt tools such as "
2209 "L<guestfish(1)> with the I<--live> option will \"just work\"."
2213 #: ../src/guestfs.pod:960
2214 msgid "Using guestfs_set_attach_method"
2218 #: ../src/guestfs.pod:962
2220 "By calling L</guestfs_set_attach_method> you can change how the library "
2221 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read L</"
2222 "ARCHITECTURE> for some background)."
2226 #: ../src/guestfs.pod:966
2228 "The normal attach method is C<appliance>, where a small appliance is created "
2229 "containing the daemon, and then the library connects to this."
2233 #: ../src/guestfs.pod:969
2235 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
2236 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
2237 "daemon over the Unix domain socket."
2241 #: ../src/guestfs.pod:973
2243 "The normal use for this is to connect to a running virtual machine that "
2244 "contains a C<guestfsd> daemon, and send commands so you can read and write "
2245 "files inside the live virtual machine."
2249 #: ../src/guestfs.pod:977
2250 msgid "Using guestfs_add_domain with live flag"
2254 #: ../src/guestfs.pod:979
2256 "L</guestfs_add_domain> provides some help for getting the correct attach "
2257 "method. If you pass the C<live> option to this function, then (if the "
2258 "virtual machine is running) it will examine the libvirt XML looking for a "
2259 "virtio-serial channel to connect to:"
2263 #: ../src/guestfs.pod:985
2270 " <channel type='unix'>\n"
2271 " <source mode='bind' path='/path/to/socket'/>\n"
2272 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
2281 #: ../src/guestfs.pod:997
2283 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
2284 "method to C<unix:/path/to/socket>."
2288 #: ../src/guestfs.pod:1000
2290 "Some of the libguestfs tools (including guestfish) support a I<--live> "
2291 "option which is passed through to L</guestfs_add_domain> thus allowing you "
2292 "to attach to and modify live virtual machines."
2296 #: ../src/guestfs.pod:1004
2298 "The virtual machine needs to have been set up beforehand so that it has the "
2299 "virtio-serial channel and so that guestfsd is running inside it."
2304 #: ../src/guestfs.pod:1008
2305 msgid "ABI GUARANTEE"
2310 #: ../src/guestfs.pod:1010
2312 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
2313 "actions as outlined in this section. Although we will deprecate some "
2314 "actions, for example if they get replaced by newer calls, we will keep the "
2315 "old actions forever. This allows you the developer to program in confidence "
2316 "against the libguestfs API."
2321 #: ../src/guestfs.pod:1016
2322 msgid "BLOCK DEVICE NAMING"
2327 #: ../src/guestfs.pod:1018
2329 "In the kernel there is now quite a profusion of schemata for naming block "
2330 "devices (in this context, by I<block device> I mean a physical or virtual "
2331 "hard drive). The original Linux IDE driver used names starting with C</dev/"
2332 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
2333 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
2334 "for the old IDE driver (particularly for SATA devices) those devices also "
2335 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
2336 "paravirtualized drivers. This has created several different naming systems, "
2337 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
2342 #: ../src/guestfs.pod:1030
2344 "As discussed above, libguestfs uses a qemu appliance running an embedded "
2345 "Linux kernel to access block devices. We can run a variety of appliances "
2346 "based on a variety of Linux kernels."
2351 #: ../src/guestfs.pod:1034
2353 "This causes a problem for libguestfs because many API calls use device or "
2354 "partition names. Working scripts and the recipe (example) scripts that we "
2355 "make available over the internet could fail if the naming scheme changes."
2360 #: ../src/guestfs.pod:1039
2362 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2363 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2364 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2365 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2370 #: ../src/guestfs.pod:1045
2372 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2373 "L</guestfs_list_partitions> and similar calls return the true names of the "
2374 "devices and partitions as known to the appliance."
2379 #: ../src/guestfs.pod:1050
2380 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2385 #: ../src/guestfs.pod:1052
2387 "Usually this translation is transparent. However in some (very rare) cases "
2388 "you may need to know the exact algorithm. Such cases include where you use "
2389 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
2390 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
2395 #: ../src/guestfs.pod:1058
2397 "The algorithm is applied only to I<parameters> which are known to be either "
2398 "device or partition names. Return values from functions such as L</"
2399 "guestfs_list_devices> are never changed."
2404 #: ../src/guestfs.pod:1066
2405 msgid "Is the string a parameter which is a device or partition name?"
2410 #: ../src/guestfs.pod:1070
2411 msgid "Does the string begin with C</dev/sd>?"
2416 #: ../src/guestfs.pod:1074
2418 "Does the named device exist? If so, we use that device. However if I<not> "
2419 "then we continue with this algorithm."
2424 #: ../src/guestfs.pod:1079
2425 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
2430 #: ../src/guestfs.pod:1081
2431 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
2436 #: ../src/guestfs.pod:1083
2437 msgid "If that named device exists, use it. If not, continue."
2442 #: ../src/guestfs.pod:1087
2443 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
2448 #: ../src/guestfs.pod:1089
2449 msgid "If that named device exists, use it. If not, return an error."
2454 #: ../src/guestfs.pod:1093
2455 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
2460 #: ../src/guestfs.pod:1095
2462 "Although the standard naming scheme and automatic translation is useful for "
2463 "simple programs and guestfish scripts, for larger programs it is best not to "
2464 "rely on this mechanism."
2469 #: ../src/guestfs.pod:1099
2471 "Where possible for maximum future portability programs using libguestfs "
2472 "should use these future-proof techniques:"
2477 #: ../src/guestfs.pod:1106
2479 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2480 "device names, and then use those names directly."
2485 #: ../src/guestfs.pod:1109
2487 "Since those device names exist by definition, they will never be translated."
2492 #: ../src/guestfs.pod:1114
2494 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2495 "filesystem labels."
2500 #: ../src/guestfs.pod:1119
2506 #: ../src/guestfs.pod:1121
2508 "This section discusses security implications of using libguestfs, "
2509 "particularly with untrusted or malicious guests or disk images."
2514 #: ../src/guestfs.pod:1124
2515 msgid "GENERAL SECURITY CONSIDERATIONS"
2520 #: ../src/guestfs.pod:1126
2522 "Be careful with any files or data that you download from a guest (by "
2523 "\"download\" we mean not just the L</guestfs_download> command but any "
2524 "command that reads files, filenames, directories or anything else from a "
2525 "disk image). An attacker could manipulate the data to fool your program "
2526 "into doing the wrong thing. Consider cases such as:"
2531 #: ../src/guestfs.pod:1136
2532 msgid "the data (file etc) not being present"
2537 #: ../src/guestfs.pod:1140
2538 msgid "being present but empty"
2543 #: ../src/guestfs.pod:1144
2544 msgid "being much larger than normal"
2549 #: ../src/guestfs.pod:1148
2550 msgid "containing arbitrary 8 bit data"
2555 #: ../src/guestfs.pod:1152
2556 msgid "being in an unexpected character encoding"
2561 #: ../src/guestfs.pod:1156
2562 msgid "containing homoglyphs."
2567 #: ../src/guestfs.pod:1160
2568 msgid "SECURITY OF MOUNTING FILESYSTEMS"
2573 #: ../src/guestfs.pod:1162
2575 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
2576 "(VFS) module can sometimes be escalated into exploits by deliberately "
2577 "creating a malicious, malformed filesystem. These exploits are very severe "
2578 "for two reasons. Firstly there are very many filesystem drivers in the "
2579 "kernel, and many of them are infrequently used and not much developer "
2580 "attention has been paid to the code. Linux userspace helps potential "
2581 "crackers by detecting the filesystem type and automatically choosing the "
2582 "right VFS driver, even if that filesystem type is obscure or unexpected for "
2583 "the administrator. Secondly, a kernel-level exploit is like a local root "
2584 "exploit (worse in some ways), giving immediate and total access to the "
2585 "system right down to the hardware level."
2590 #: ../src/guestfs.pod:1175
2592 "That explains why you should never mount a filesystem from an untrusted "
2593 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
2594 "inside a qemu virtual machine, usually running as a non-root user. The "
2595 "attacker would need to write a filesystem which first exploited the kernel, "
2596 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
2597 "the libguestfs protocol, and finally to be as serious as the host kernel "
2598 "exploit it would need to escalate its privileges to root. This multi-step "
2599 "escalation, performed by a static piece of data, is thought to be extremely "
2600 "hard to do, although we never say 'never' about security issues."
2605 #: ../src/guestfs.pod:1186
2607 "In any case callers can reduce the attack surface by forcing the filesystem "
2608 "type when mounting (use L</guestfs_mount_vfs>)."
2613 #: ../src/guestfs.pod:1189
2614 msgid "PROTOCOL SECURITY"
2619 #: ../src/guestfs.pod:1191
2621 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
2622 "defined upper message size. However a program that uses libguestfs must "
2623 "also take care - for example you can write a program that downloads a binary "
2624 "from a disk image and executes it locally, and no amount of protocol "
2625 "security will save you from the consequences."
2630 #: ../src/guestfs.pod:1197
2631 msgid "INSPECTION SECURITY"
2636 #: ../src/guestfs.pod:1199
2638 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
2639 "directly from the guest, and these could contain any 8 bit data. Callers "
2640 "should be careful to escape these before printing them to a structured file "
2641 "(for example, use HTML escaping if creating a web page)."
2646 #: ../src/guestfs.pod:1205
2648 "Guest configuration may be altered in unusual ways by the administrator of "
2649 "the virtual machine, and may not reflect reality (particularly for untrusted "
2650 "or actively malicious guests). For example we parse the hostname from "
2651 "configuration files like C</etc/sysconfig/network> that we find in the "
2652 "guest, but the guest administrator can easily manipulate these files to "
2653 "provide the wrong hostname."
2658 #: ../src/guestfs.pod:1213
2660 "The inspection API parses guest configuration using two external libraries: "
2661 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
2662 "designed to be robust in the face of malicious data, although denial of "
2663 "service attacks are still possible, for example with oversized configuration "
2669 #: ../src/guestfs.pod:1219
2670 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
2675 #: ../src/guestfs.pod:1221
2677 "Be very cautious about running commands from the guest. By running a "
2678 "command in the guest, you are giving CPU time to a binary that you do not "
2679 "control, under the same user account as the library, albeit wrapped in qemu "
2680 "virtualization. More information and alternatives can be found in the "
2681 "section L</RUNNING COMMANDS>."
2686 #: ../src/guestfs.pod:1227
2687 msgid "CVE-2010-3851"
2692 #: ../src/guestfs.pod:1229
2693 msgid "https://bugzilla.redhat.com/642934"
2698 #: ../src/guestfs.pod:1231
2700 "This security bug concerns the automatic disk format detection that qemu "
2701 "does on disk images."
2706 #: ../src/guestfs.pod:1234
2708 "A raw disk image is just the raw bytes, there is no header. Other disk "
2709 "images like qcow2 contain a special header. Qemu deals with this by looking "
2710 "for one of the known headers, and if none is found then assuming the disk "
2711 "image must be raw."
2716 #: ../src/guestfs.pod:1239
2718 "This allows a guest which has been given a raw disk image to write some "
2719 "other header. At next boot (or when the disk image is accessed by "
2720 "libguestfs) qemu would do autodetection and think the disk image format was, "
2721 "say, qcow2 based on the header written by the guest."
2726 #: ../src/guestfs.pod:1244
2728 "This in itself would not be a problem, but qcow2 offers many features, one "
2729 "of which is to allow a disk image to refer to another image (called the "
2730 "\"backing disk\"). It does this by placing the path to the backing disk "
2731 "into the qcow2 header. This path is not validated and could point to any "
2732 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
2733 "\"holes\" in the qcow2 disk image, which of course is completely under the "
2734 "control of the attacker."
2739 #: ../src/guestfs.pod:1252
2741 "In libguestfs this is rather hard to exploit except under two circumstances:"
2746 #: ../src/guestfs.pod:1259
2747 msgid "You have enabled the network or have opened the disk in write mode."
2752 #: ../src/guestfs.pod:1263
2754 "You are also running untrusted code from the guest (see L</RUNNING "
2760 #: ../src/guestfs.pod:1268
2762 "The way to avoid this is to specify the expected disk format when adding "
2763 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
2764 "should always do this if the disk is raw format, and it's a good idea for "
2770 #: ../src/guestfs.pod:1273
2772 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
2773 "format is fetched from libvirt and passed through."
2778 #: ../src/guestfs.pod:1276
2780 "For libguestfs tools, use the I<--format> command line parameter as "
2786 #: ../src/guestfs.pod:1279
2787 msgid "CONNECTION MANAGEMENT"
2792 #: ../src/guestfs.pod:1281
2798 #: ../src/guestfs.pod:1283
2800 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
2801 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
2802 "handle and release all resources used."
2806 #: ../src/guestfs.pod:1287
2808 "For information on using multiple handles and threads, see the section L</"
2809 "MULTIPLE HANDLES AND MULTIPLE THREADS> above."
2814 #: ../src/guestfs.pod:1290
2815 msgid "guestfs_create"
2820 #: ../src/guestfs.pod:1292
2823 " guestfs_h *guestfs_create (void);\n"
2829 #: ../src/guestfs.pod:1294
2830 msgid "Create a connection handle."
2834 #: ../src/guestfs.pod:1296
2836 "On success this returns a non-NULL pointer to a handle. On error it returns "
2841 #: ../src/guestfs.pod:1299
2843 "You have to \"configure\" the handle after creating it. This includes "
2844 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
2845 "handle at least once."
2850 #: ../src/guestfs.pod:1303
2851 msgid "After configuring the handle, you have to call L</guestfs_launch>."
2855 #: ../src/guestfs.pod:1305
2857 "You may also want to configure error handling for the handle. See the L</"
2858 "ERROR HANDLING> section below."
2863 #: ../src/guestfs.pod:1308
2864 msgid "guestfs_close"
2869 #: ../src/guestfs.pod:1310
2872 " void guestfs_close (guestfs_h *g);\n"
2878 #: ../src/guestfs.pod:1312
2879 msgid "This closes the connection handle and frees up all resources used."
2883 #: ../src/guestfs.pod:1314
2885 "If autosync was set on the handle and the handle was launched, then this "
2886 "implicitly calls various functions to unmount filesystems and sync the "
2887 "disk. See L</guestfs_set_autosync> for more details."
2891 #: ../src/guestfs.pod:1318
2892 msgid "If a close callback was set on the handle, then it is called."
2897 #: ../src/guestfs.pod:1320
2898 msgid "ERROR HANDLING"
2903 #: ../src/guestfs.pod:1322
2905 "API functions can return errors. For example, almost all functions that "
2906 "return C<int> will return C<-1> to indicate an error."
2911 #: ../src/guestfs.pod:1325
2913 "Additional information is available for errors: an error message string and "
2914 "optionally an error number (errno) if the thing that failed was a system "
2920 #: ../src/guestfs.pod:1329
2922 "You can get at the additional information about the last error on the handle "
2923 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
2924 "up an error handler with L</guestfs_set_error_handler>."
2929 #: ../src/guestfs.pod:1334
2931 "When the handle is created, a default error handler is installed which "
2932 "prints the error message string to C<stderr>. For small short-running "
2933 "command line programs it is sufficient to do:"
2938 #: ../src/guestfs.pod:1338
2941 " if (guestfs_launch (g) == -1)\n"
2942 " exit (EXIT_FAILURE);\n"
2948 #: ../src/guestfs.pod:1341
2950 "since the default error handler will ensure that an error message has been "
2951 "printed to C<stderr> before the program exits."
2956 #: ../src/guestfs.pod:1344
2958 "For other programs the caller will almost certainly want to install an "
2959 "alternate error handler or do error handling in-line like this:"
2964 #: ../src/guestfs.pod:1347
2967 " g = guestfs_create ();\n"
2973 #: ../src/guestfs.pod:1349
2976 " /* This disables the default behaviour of printing errors\n"
2978 " guestfs_set_error_handler (g, NULL, NULL);\n"
2984 #: ../src/guestfs.pod:1353
2987 " if (guestfs_launch (g) == -1) {\n"
2988 " /* Examine the error message and print it etc. */\n"
2989 " char *msg = guestfs_last_error (g);\n"
2990 " int errnum = guestfs_last_errno (g);\n"
2991 " fprintf (stderr, \"%s\\n\", msg);\n"
2999 #: ../src/guestfs.pod:1361
3001 "Out of memory errors are handled differently. The default action is to call "
3002 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
3003 "guestfs_set_out_of_memory_handler>."
3008 #: ../src/guestfs.pod:1365
3010 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
3011 "because there is no handle if this happens there is no way to get additional "
3012 "error information. However L</guestfs_create> is supposed to be a "
3013 "lightweight operation which can only fail because of insufficient memory (it "
3014 "returns NULL in this case)."
3019 #: ../src/guestfs.pod:1371
3020 msgid "guestfs_last_error"
3025 #: ../src/guestfs.pod:1373
3028 " const char *guestfs_last_error (guestfs_h *g);\n"
3034 #: ../src/guestfs.pod:1375
3036 "This returns the last error message that happened on C<g>. If there has not "
3037 "been an error since the handle was created, then this returns C<NULL>."
3042 #: ../src/guestfs.pod:1379
3044 "The lifetime of the returned string is until the next error occurs, or L</"
3045 "guestfs_close> is called."
3050 #: ../src/guestfs.pod:1382
3051 msgid "guestfs_last_errno"
3056 #: ../src/guestfs.pod:1384
3059 " int guestfs_last_errno (guestfs_h *g);\n"
3065 #: ../src/guestfs.pod:1386
3066 msgid "This returns the last error number (errno) that happened on C<g>."
3071 #: ../src/guestfs.pod:1388
3072 msgid "If successful, an errno integer not equal to zero is returned."
3077 #: ../src/guestfs.pod:1390
3079 "If no error, this returns 0. This call can return 0 in three situations:"
3084 #: ../src/guestfs.pod:1397
3085 msgid "There has not been any error on the handle."
3090 #: ../src/guestfs.pod:1401
3092 "There has been an error but the errno was meaningless. This corresponds to "
3093 "the case where the error did not come from a failed system call, but for "
3094 "some other reason."
3099 #: ../src/guestfs.pod:1407
3101 "There was an error from a failed system call, but for some reason the errno "
3102 "was not captured and returned. This usually indicates a bug in libguestfs."
3107 #: ../src/guestfs.pod:1413
3109 "Libguestfs tries to convert the errno from inside the applicance into a "
3110 "corresponding errno for the caller (not entirely trivial: the appliance "
3111 "might be running a completely different operating system from the library "
3112 "and error numbers are not standardized across Un*xen). If this could not be "
3113 "done, then the error is translated to C<EINVAL>. In practice this should "
3114 "only happen in very rare circumstances."
3119 #: ../src/guestfs.pod:1421
3120 msgid "guestfs_set_error_handler"
3125 #: ../src/guestfs.pod:1423
3128 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
3130 " const char *msg);\n"
3131 " void guestfs_set_error_handler (guestfs_h *g,\n"
3132 " guestfs_error_handler_cb cb,\n"
3139 #: ../src/guestfs.pod:1430
3141 "The callback C<cb> will be called if there is an error. The parameters "
3142 "passed to the callback are an opaque data pointer and the error message "
3148 #: ../src/guestfs.pod:1434
3150 "C<errno> is not passed to the callback. To get that the callback must call "
3151 "L</guestfs_last_errno>."
3156 #: ../src/guestfs.pod:1437
3158 "Note that the message string C<msg> is freed as soon as the callback "
3159 "function returns, so if you want to stash it somewhere you must make your "
3165 #: ../src/guestfs.pod:1441
3166 msgid "The default handler prints messages on C<stderr>."
3171 #: ../src/guestfs.pod:1443
3172 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
3177 #: ../src/guestfs.pod:1445
3178 msgid "guestfs_get_error_handler"
3183 #: ../src/guestfs.pod:1447
3186 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
3187 " void **opaque_rtn);\n"
3193 #: ../src/guestfs.pod:1450
3194 msgid "Returns the current error handler callback."
3199 #: ../src/guestfs.pod:1452
3200 msgid "guestfs_set_out_of_memory_handler"
3205 #: ../src/guestfs.pod:1454
3208 " typedef void (*guestfs_abort_cb) (void);\n"
3209 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
3210 " guestfs_abort_cb);\n"
3216 #: ../src/guestfs.pod:1458
3218 "The callback C<cb> will be called if there is an out of memory situation. "
3219 "I<Note this callback must not return>."
3224 #: ../src/guestfs.pod:1461
3225 msgid "The default is to call L<abort(3)>."
3230 #: ../src/guestfs.pod:1463
3232 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
3237 #: ../src/guestfs.pod:1466
3238 msgid "guestfs_get_out_of_memory_handler"
3243 #: ../src/guestfs.pod:1468
3246 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
3252 #: ../src/guestfs.pod:1470
3253 msgid "This returns the current out of memory handler."
3258 #: ../src/guestfs.pod:1472
3264 #: ../src/guestfs.pod:1474 ../fish/guestfish.pod:1010
3270 #: ../src/guestfs.pod:1476
3276 #: ../src/guestfs.pod:1478
3282 #: ../src/guestfs.pod:1480
3283 msgid "AVAILABILITY"
3288 #: ../src/guestfs.pod:1482
3289 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
3294 #: ../src/guestfs.pod:1484
3296 "Using L</guestfs_available> you can test availability of the following "
3297 "groups of functions. This test queries the appliance to see if the "
3298 "appliance you are currently using supports the functionality."
3303 #: ../src/guestfs.pod:1489
3304 msgid "@AVAILABILITY@"
3309 #: ../src/guestfs.pod:1491
3310 msgid "GUESTFISH supported COMMAND"
3315 #: ../src/guestfs.pod:1493
3317 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
3318 "prints out the available groups and whether they are supported by this build "
3319 "of libguestfs. Note however that you have to do C<run> first."
3324 #: ../src/guestfs.pod:1498
3325 msgid "SINGLE CALLS AT COMPILE TIME"
3330 #: ../src/guestfs.pod:1500
3332 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
3333 "function, such as:"
3338 #: ../src/guestfs.pod:1503
3341 " #define LIBGUESTFS_HAVE_DD 1\n"
3347 #: ../src/guestfs.pod:1505
3348 msgid "if L</guestfs_dd> is available."
3353 #: ../src/guestfs.pod:1507
3355 "Before version 1.5.8, if you needed to test whether a single libguestfs "
3356 "function is available at compile time, we recommended using build tools such "
3357 "as autoconf or cmake. For example in autotools you could use:"
3362 #: ../src/guestfs.pod:1512
3365 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
3366 " AC_CHECK_FUNCS([guestfs_dd])\n"
3372 #: ../src/guestfs.pod:1515
3374 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
3380 #: ../src/guestfs.pod:1518
3381 msgid "SINGLE CALLS AT RUN TIME"
3386 #: ../src/guestfs.pod:1520
3388 "Testing at compile time doesn't guarantee that a function really exists in "
3389 "the library. The reason is that you might be dynamically linked against a "
3390 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
3391 "This situation unfortunately results in a segmentation fault, which is a "
3392 "shortcoming of the C dynamic linking system itself."
3397 #: ../src/guestfs.pod:1527
3399 "You can use L<dlopen(3)> to test if a function is available at run time, as "
3400 "in this example program (note that you still need the compile time check as "
3406 #: ../src/guestfs.pod:1531
3409 " #include <stdio.h>\n"
3410 " #include <stdlib.h>\n"
3411 " #include <unistd.h>\n"
3412 " #include <dlfcn.h>\n"
3413 " #include <guestfs.h>\n"
3419 #: ../src/guestfs.pod:1537
3424 " #ifdef LIBGUESTFS_HAVE_DD\n"
3426 " int has_function;\n"
3432 #: ../src/guestfs.pod:1543
3435 " /* Test if the function guestfs_dd is really available. */\n"
3436 " dl = dlopen (NULL, RTLD_LAZY);\n"
3438 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
3439 " exit (EXIT_FAILURE);\n"
3441 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
3448 #: ../src/guestfs.pod:1552
3451 " if (!has_function)\n"
3452 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
3454 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
3455 " /* Now it's safe to call\n"
3456 " guestfs_dd (g, \"foo\", \"bar\");\n"
3460 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
3468 #: ../src/guestfs.pod:1565
3470 "You may think the above is an awful lot of hassle, and it is. There are "
3471 "other ways outside of the C linking system to ensure that this kind of "
3472 "incompatibility never arises, such as using package versioning:"
3477 #: ../src/guestfs.pod:1570
3480 " Requires: libguestfs >= 1.0.80\n"
3486 #: ../src/guestfs.pod:1572
3487 msgid "CALLS WITH OPTIONAL ARGUMENTS"
3492 #: ../src/guestfs.pod:1574
3494 "A recent feature of the API is the introduction of calls which take optional "
3495 "arguments. In C these are declared 3 ways. The main way is as a call which "
3496 "takes variable arguments (ie. C<...>), as in this example:"
3501 #: ../src/guestfs.pod:1579
3504 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
3510 #: ../src/guestfs.pod:1581
3512 "Call this with a list of optional arguments, terminated by C<-1>. So to "
3513 "call with no optional arguments specified:"
3518 #: ../src/guestfs.pod:1584
3521 " guestfs_add_drive_opts (g, filename, -1);\n"
3527 #: ../src/guestfs.pod:1586
3528 msgid "With a single optional argument:"
3533 #: ../src/guestfs.pod:1588
3536 " guestfs_add_drive_opts (g, filename,\n"
3537 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3544 #: ../src/guestfs.pod:1592
3550 #: ../src/guestfs.pod:1594
3553 " guestfs_add_drive_opts (g, filename,\n"
3554 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3555 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
3562 #: ../src/guestfs.pod:1599
3564 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
3570 #: ../src/guestfs.pod:1602
3571 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
3576 #: ../src/guestfs.pod:1604
3578 "The second variant has the same name with the suffix C<_va>, which works the "
3579 "same way but takes a C<va_list>. See the C manual for details. For the "
3580 "example function, this is declared:"
3585 #: ../src/guestfs.pod:1608
3588 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
3595 #: ../src/guestfs.pod:1611
3596 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
3601 #: ../src/guestfs.pod:1613
3603 "The third variant is useful where you need to construct these calls. You "
3604 "pass in a structure where you fill in the optional fields. The structure "
3605 "has a bitmask as the first element which you must set to indicate which "
3606 "fields you have filled in. For our example function the structure and call "
3612 #: ../src/guestfs.pod:1619
3615 " struct guestfs_add_drive_opts_argv {\n"
3616 " uint64_t bitmask;\n"
3618 " const char *format;\n"
3621 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
3622 " const struct guestfs_add_drive_opts_argv *optargs);\n"
3628 #: ../src/guestfs.pod:1628
3629 msgid "You could call it like this:"
3634 #: ../src/guestfs.pod:1630
3637 " struct guestfs_add_drive_opts_argv optargs = {\n"
3638 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
3639 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
3641 " .format = \"qcow2\"\n"
3648 #: ../src/guestfs.pod:1637
3651 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
3657 #: ../src/guestfs.pod:1639 ../src/guestfs-actions.pod:11
3658 #: ../src/guestfs-actions.pod:1861 ../fish/guestfish-actions.pod:9
3659 #: ../fish/guestfish-actions.pod:1265 ../tools/virt-win-reg.pl:532
3665 #: ../src/guestfs.pod:1645
3666 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
3671 #: ../src/guestfs.pod:1650
3672 msgid "You do not need to fill in all fields of the structure."
3677 #: ../src/guestfs.pod:1654
3679 "There must be a one-to-one correspondence between fields of the structure "
3680 "that are filled in, and bits set in the bitmask."
3685 #: ../src/guestfs.pod:1659
3686 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
3691 #: ../src/guestfs.pod:1661
3693 "In other languages, optional arguments are expressed in the way that is "
3694 "natural for that language. We refer you to the language-specific "
3695 "documentation for more details on that."
3700 #: ../src/guestfs.pod:1665
3701 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
3706 #: ../src/guestfs.pod:1667
3707 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
3711 #: ../src/guestfs.pod:1669
3713 "B<Note:> This section documents the generic event mechanism introduced in "
3714 "libguestfs 1.10, which you should use in new code if possible. The old "
3715 "functions C<guestfs_set_log_message_callback>, "
3716 "C<guestfs_set_subprocess_quit_callback>, "
3717 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
3718 "C<guestfs_set_progress_callback> are no longer documented in this manual "
3719 "page. Because of the ABI guarantee, the old functions continue to work."
3723 #: ../src/guestfs.pod:1678
3725 "Handles generate events when certain things happen, such as log messages "
3726 "being generated, progress messages during long-running operations, or the "
3727 "handle being closed. The API calls described below let you register a "
3728 "callback to be called when events happen. You can register multiple "
3729 "callbacks (for the same, different or overlapping sets of events), and "
3730 "individually remove callbacks. If callbacks are not removed, then they "
3731 "remain in force until the handle is closed."
3735 #: ../src/guestfs.pod:1686
3737 "In the current implementation, events are only generated synchronously: that "
3738 "means that events (and hence callbacks) can only happen while you are in the "
3739 "middle of making another libguestfs call. The callback is called in the "
3744 #: ../src/guestfs.pod:1691
3746 "Events may contain a payload, usually nothing (void), an array of 64 bit "
3747 "unsigned integers, or a message buffer. Payloads are discussed later on."
3751 #: ../src/guestfs.pod:1695
3752 msgid "CLASSES OF EVENTS"
3756 #: ../src/guestfs.pod:1699
3757 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
3761 #: ../src/guestfs.pod:1702
3763 "The callback function will be called while the handle is being closed "
3764 "(synchronously from L</guestfs_close>)."
3769 #: ../src/guestfs.pod:1705
3771 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
3772 "handles that are open when the program exits. This means that this callback "
3773 "might be called indirectly from L<exit(3)>, which can cause unexpected "
3774 "problems in higher-level languages (eg. if your HLL interpreter has already "
3775 "been cleaned up by the time this is called, and if your callback then jumps "
3776 "into some HLL function)."
3780 #: ../src/guestfs.pod:1712
3782 "If no callback is registered: the handle is closed without any callback "
3787 #: ../src/guestfs.pod:1715
3788 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
3792 #: ../src/guestfs.pod:1718
3794 "The callback function will be called when the child process quits, either "
3795 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
3796 "corresponds to a transition from any state to the CONFIG state)."
3800 #: ../src/guestfs.pod:1722 ../src/guestfs.pod:1731
3801 msgid "If no callback is registered: the event is ignored."
3805 #: ../src/guestfs.pod:1724
3806 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
3810 #: ../src/guestfs.pod:1727
3812 "The callback function will be called when the child process becomes ready "
3813 "first time after it has been launched. (This corresponds to a transition "
3814 "from LAUNCHING to the READY state)."
3818 #: ../src/guestfs.pod:1733
3819 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
3824 #: ../src/guestfs.pod:1736
3826 "Some long-running operations can generate progress messages. If this "
3827 "callback is registered, then it will be called each time a progress message "
3828 "is generated (usually two seconds after the operation started, and three "
3829 "times per second thereafter until it completes, although the frequency may "
3830 "change in future versions)."
3834 #: ../src/guestfs.pod:1742
3836 "The callback receives in the payload four unsigned 64 bit numbers which are "
3837 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
3841 #: ../src/guestfs.pod:1745
3843 "The units of C<total> are not defined, although for some operations C<total> "
3844 "may relate in some way to the amount of data to be transferred (eg. in bytes "
3845 "or megabytes), and C<position> may be the portion which has been transferred."
3850 #: ../src/guestfs.pod:1750
3851 msgid "The only defined and stable parts of the API are:"
3856 #: ../src/guestfs.pod:1756
3858 "The callback can display to the user some type of progress bar or indicator "
3859 "which shows the ratio of C<position>:C<total>."
3864 #: ../src/guestfs.pod:1761
3865 msgid "0 E<lt>= C<position> E<lt>= C<total>"
3869 #: ../src/guestfs.pod:1765
3871 "If any progress notification is sent during a call, then a final progress "
3872 "notification is always sent when C<position> = C<total> (I<unless> the call "
3873 "fails with an error)."
3878 #: ../src/guestfs.pod:1769
3880 "This is to simplify caller code, so callers can easily set the progress "
3881 "indicator to \"100%\" at the end of the operation, without requiring special "
3882 "code to detect this case."
3886 #: ../src/guestfs.pod:1775
3888 "For some calls we are unable to estimate the progress of the call, but we "
3889 "can still generate progress messages to indicate activity. This is known as "
3890 "\"pulse mode\", and is directly supported by certain progress bar "
3891 "implementations (eg. GtkProgressBar)."
3895 #: ../src/guestfs.pod:1780
3897 "For these calls, zero or more progress messages are generated with "
3898 "C<position = 0> and C<total = 1>, followed by a final message with "
3899 "C<position = total = 1>."
3903 #: ../src/guestfs.pod:1784
3905 "As noted above, if the call fails with an error then the final message may "
3910 #: ../src/guestfs.pod:1789
3912 "The callback also receives the procedure number (C<proc_nr>) and serial "
3913 "number (C<serial>) of the call. These are only useful for debugging "
3914 "protocol issues, and the callback can normally ignore them. The callback "
3915 "may want to print these numbers in error messages or debugging messages."
3919 #: ../src/guestfs.pod:1795
3920 msgid "If no callback is registered: progress messages are discarded."
3924 #: ../src/guestfs.pod:1797
3925 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
3929 #: ../src/guestfs.pod:1800
3931 "The callback function is called whenever a log message is generated by qemu, "
3932 "the appliance kernel, guestfsd (daemon), or utility programs."
3936 #: ../src/guestfs.pod:1803
3938 "If the verbose flag (L</guestfs_set_verbose>) is set before launch (L</"
3939 "guestfs_launch>) then additional debug messages are generated."
3943 #: ../src/guestfs.pod:1806 ../src/guestfs.pod:1820
3945 "If no callback is registered: the messages are discarded unless the verbose "
3946 "flag is set in which case they are sent to stderr. You can override the "
3947 "printing of verbose messages to stderr by setting up a callback."
3951 #: ../src/guestfs.pod:1811
3952 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
3956 #: ../src/guestfs.pod:1814
3958 "The callback function is called whenever a log message is generated by the "
3959 "library part of libguestfs."
3963 #: ../src/guestfs.pod:1817
3965 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
3966 "messages are generated."
3970 #: ../src/guestfs.pod:1825
3971 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
3975 #: ../src/guestfs.pod:1828
3977 "The callback function is called whenever a trace message is generated. This "
3978 "only applies if the trace flag (L</guestfs_set_trace>) is set."
3982 #: ../src/guestfs.pod:1831
3984 "If no callback is registered: the messages are sent to stderr. You can "
3985 "override the printing of trace messages to stderr by setting up a callback."
3989 #: ../src/guestfs.pod:1837
3990 msgid "guestfs_set_event_callback"
3994 #: ../src/guestfs.pod:1839
3997 " int guestfs_set_event_callback (guestfs_h *g,\n"
3998 " guestfs_event_callback cb,\n"
3999 " uint64_t event_bitmask,\n"
4006 #: ../src/guestfs.pod:1845
4008 "This function registers a callback (C<cb>) for all event classes in the "
4013 #: ../src/guestfs.pod:1848
4015 "For example, to register for all log message events, you could call this "
4016 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
4017 "To register a single callback for all possible classes of events, use "
4018 "C<GUESTFS_EVENT_ALL>."
4022 #: ../src/guestfs.pod:1854
4023 msgid "C<flags> should always be passed as 0."
4027 #: ../src/guestfs.pod:1856
4029 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
4030 "it for any purpose."
4034 #: ../src/guestfs.pod:1859
4036 "The return value is the event handle (an integer) which you can use to "
4037 "delete the callback (see below)."
4041 #: ../src/guestfs.pod:1862
4043 "If there is an error, this function returns C<-1>, and sets the error in the "
4044 "handle in the usual way (see L</guestfs_last_error> etc.)"
4048 #: ../src/guestfs.pod:1865
4050 "Callbacks remain in effect until they are deleted, or until the handle is "
4055 #: ../src/guestfs.pod:1868
4057 "In the case where multiple callbacks are registered for a particular event "
4058 "class, all of the callbacks are called. The order in which multiple "
4059 "callbacks are called is not defined."
4063 #: ../src/guestfs.pod:1872
4064 msgid "guestfs_delete_event_callback"
4068 #: ../src/guestfs.pod:1874
4071 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
4076 #: ../src/guestfs.pod:1876
4078 "Delete a callback that was previously registered. C<event_handle> should be "
4079 "the integer that was returned by a previous call to "
4080 "C<guestfs_set_event_callback> on the same handle."
4084 #: ../src/guestfs.pod:1880
4085 msgid "guestfs_event_callback"
4089 #: ../src/guestfs.pod:1882
4092 " typedef void (*guestfs_event_callback) (\n"
4095 " uint64_t event,\n"
4096 " int event_handle,\n"
4098 " const char *buf, size_t buf_len,\n"
4099 " const uint64_t *array, size_t array_len);\n"
4104 #: ../src/guestfs.pod:1891
4106 "This is the type of the event callback function that you have to provide."
4110 #: ../src/guestfs.pod:1894
4112 "The basic parameters are: the handle (C<g>), the opaque user pointer "
4113 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
4114 "handle, and C<flags> which in the current API you should ignore."
4118 #: ../src/guestfs.pod:1898
4120 "The remaining parameters contain the event payload (if any). Each event may "
4121 "contain a payload, which usually relates to the event class, but for future "
4122 "proofing your code should be written to handle any payload for any event "
4127 #: ../src/guestfs.pod:1903
4129 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
4130 "there is no message buffer). Note that this message buffer can contain "
4131 "arbitrary 8 bit data, including NUL bytes."
4135 #: ../src/guestfs.pod:1907
4137 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
4138 "moment this is only used for progress messages."
4142 #: ../src/guestfs.pod:1910
4143 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
4147 #: ../src/guestfs.pod:1912
4149 "One motivation for the generic event API was to allow GUI programs to "
4150 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
4151 "unconditionally to C<stderr>."
4155 #: ../src/guestfs.pod:1916
4157 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
4158 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
4159 "messages are not events; you must capture error messages separately)."
4163 #: ../src/guestfs.pod:1921
4165 "Programs have to set up a callback to capture the classes of events of "
4170 #: ../src/guestfs.pod:1924
4174 " guestfs_set_event_callback\n"
4175 " (g, message_callback,\n"
4176 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
4177 " GUESTFS_EVENT_TRACE,\n"
4178 " 0, NULL) == -1)\n"
4179 " if (eh == -1) {\n"
4180 " // handle error in the usual way\n"
4186 #: ../src/guestfs.pod:1934
4188 "The callback can then direct messages to the appropriate place. In this "
4189 "example, messages are directed to syslog:"
4193 #: ../src/guestfs.pod:1937
4197 " message_callback (\n"
4200 " uint64_t event,\n"
4201 " int event_handle,\n"
4203 " const char *buf, size_t buf_len,\n"
4204 " const uint64_t *array, size_t array_len)\n"
4206 " const int priority = LOG_USER|LOG_INFO;\n"
4207 " if (buf_len > 0)\n"
4208 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
4215 #: ../src/guestfs.pod:1952
4216 msgid "PRIVATE DATA AREA"
4220 #: ../src/guestfs.pod:1954
4222 "You can attach named pieces of private data to the libguestfs handle, fetch "
4223 "them by name, and walk over them, for the lifetime of the handle. This is "
4224 "called the private data area and is only available from the C API."
4229 #: ../src/guestfs.pod:1959
4230 msgid "To attach a named piece of data, use the following call:"
4235 #: ../src/guestfs.pod:1961
4238 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
4243 #: ../src/guestfs.pod:1963
4245 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
4246 "pointer (which can be C<NULL>). Any previous item with the same key is "
4251 #: ../src/guestfs.pod:1967
4253 "You can use any C<key> you want, but your key should I<not> start with an "
4254 "underscore character. Keys beginning with an underscore character are "
4255 "reserved for internal libguestfs purposes (eg. for implementing language "
4256 "bindings). It is recommended that you prefix the key with some unique "
4257 "string to avoid collisions with other users."
4262 #: ../src/guestfs.pod:1973
4263 msgid "To retrieve the pointer, use:"
4268 #: ../src/guestfs.pod:1975
4271 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
4277 #: ../src/guestfs.pod:1977
4279 "This function returns C<NULL> if either no data is found associated with "
4280 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
4285 #: ../src/guestfs.pod:1981
4287 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
4288 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
4289 "all. In particular, libguestfs does I<not> try to free the data when the "
4290 "handle is closed. If the data must be freed, then the caller must either "
4291 "free it before calling L</guestfs_close> or must set up a close callback to "
4292 "do it (see L</GUESTFS_EVENT_CLOSE>)."
4296 #: ../src/guestfs.pod:1988
4297 msgid "To walk over all entries, use these two functions:"
4301 #: ../src/guestfs.pod:1990
4304 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
4309 #: ../src/guestfs.pod:1992
4312 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
4317 #: ../src/guestfs.pod:1994
4319 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
4320 "not have any particular meaning -- keys are not returned in any defined "
4321 "order). A pointer to the key is returned in C<*key_rtn> and the "
4322 "corresponding data pointer is returned from the function. C<NULL> is "
4323 "returned if there are no keys stored in the handle."
4327 #: ../src/guestfs.pod:2000
4329 "C<guestfs_next_private> returns the next key, pointer pair. The return "
4330 "value of this function is also C<NULL> is there are no further entries to "
4335 #: ../src/guestfs.pod:2004
4336 msgid "Notes about walking over entries:"
4340 #: ../src/guestfs.pod:2010
4342 "You must not call C<guestfs_set_private> while walking over the entries."
4346 #: ../src/guestfs.pod:2015
4348 "The handle maintains an internal iterator which is reset when you call "
4349 "C<guestfs_first_private>. This internal iterator is invalidated when you "
4350 "call C<guestfs_set_private>."
4354 #: ../src/guestfs.pod:2021
4355 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
4359 #: ../src/guestfs.pod:2023
4362 " guestfs_set_private (g, key, NULL);\n"
4367 #: ../src/guestfs.pod:2025
4368 msgid "then that C<key> is not returned when walking."
4372 #: ../src/guestfs.pod:2029
4374 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
4375 "C<guestfs_next_private> or C<guestfs_set_private>."
4379 #: ../src/guestfs.pod:2035
4381 "The following example code shows how to print all keys and data pointers "
4382 "that are associated with the handle C<g>:"
4386 #: ../src/guestfs.pod:2038
4389 " const char *key;\n"
4390 " void *data = guestfs_first_private (g, &key);\n"
4391 " while (data != NULL)\n"
4393 " printf (\"key = %s, data = %p\\n\", key, data);\n"
4394 " data = guestfs_next_private (g, &key);\n"
4400 #: ../src/guestfs.pod:2046
4402 "More commonly you are only interested in keys that begin with an application-"
4403 "specific prefix C<foo_>. Modify the loop like so:"
4407 #: ../src/guestfs.pod:2049
4410 " const char *key;\n"
4411 " void *data = guestfs_first_private (g, &key);\n"
4412 " while (data != NULL)\n"
4414 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
4415 " printf (\"key = %s, data = %p\\n\", key, data);\n"
4416 " data = guestfs_next_private (g, &key);\n"
4422 #: ../src/guestfs.pod:2058
4424 "If you need to modify keys while walking, then you have to jump back to the "
4425 "beginning of the loop. For example, to delete all keys prefixed with "
4430 #: ../src/guestfs.pod:2062
4433 " const char *key;\n"
4436 " data = guestfs_first_private (g, &key);\n"
4437 " while (data != NULL)\n"
4439 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
4441 " guestfs_set_private (g, key, NULL);\n"
4442 " /* note that 'key' pointer is now invalid, and so is\n"
4443 " the internal iterator */\n"
4446 " data = guestfs_next_private (g, &key);\n"
4452 #: ../src/guestfs.pod:2078
4454 "Note that the above loop is guaranteed to terminate because the keys are "
4455 "being deleted, but other manipulations of keys within the loop might not "
4456 "terminate unless you also maintain an indication of which keys have been "
4462 #: ../src/guestfs.pod:2083 ../src/guestfs.pod:2088
4468 #: ../src/guestfs.pod:2085
4470 "<!-- old anchor for the next section --> <a name="
4471 "\"state_machine_and_low_level_event_api\"/>"
4476 #: ../src/guestfs.pod:2090
4477 msgid "ARCHITECTURE"
4482 #: ../src/guestfs.pod:2092
4484 "Internally, libguestfs is implemented by running an appliance (a special "
4485 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
4486 "process of the main program."
4491 #: ../src/guestfs.pod:2096
4494 " ___________________\n"
4496 " | main program |\n"
4498 " | | child process / appliance\n"
4499 " | | __________________________\n"
4501 " +-------------------+ RPC | +-----------------+ |\n"
4502 " | libguestfs <--------------------> guestfsd | |\n"
4503 " | | | +-----------------+ |\n"
4504 " \\___________________/ | | Linux kernel | |\n"
4505 " | +--^--------------+ |\n"
4506 " \\_________|________________/\n"
4512 " \\______________/\n"
4518 #: ../src/guestfs.pod:2116
4520 "The library, linked to the main program, creates the child process and hence "
4521 "the appliance in the L</guestfs_launch> function."
4526 #: ../src/guestfs.pod:2119
4528 "Inside the appliance is a Linux kernel and a complete stack of userspace "
4529 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
4530 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
4531 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
4532 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
4533 "attached to the qemu process which translates device access by the "
4534 "appliance's Linux kernel into accesses to the image."
4539 #: ../src/guestfs.pod:2128
4541 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
4542 "Although the disk image you are attached to might also be used by some "
4543 "virtual machine, libguestfs doesn't know or care about this. (But you will "
4544 "care if both libguestfs's qemu process and your virtual machine are trying "
4545 "to update the disk image at the same time, since these usually results in "
4546 "massive disk corruption)."
4551 #: ../src/guestfs.pod:2135
4552 msgid "STATE MACHINE"
4557 #: ../src/guestfs.pod:2137
4558 msgid "libguestfs uses a state machine to model the child process:"
4563 #: ../src/guestfs.pod:2139
4575 " / | \\ \\ guestfs_launch\n"
4576 " / | _\\__V______\n"
4578 " / | | LAUNCHING |\n"
4579 " / | \\___________/\n"
4581 " / | guestfs_launch\n"
4583 " ______ / __|____V\n"
4584 " / \\ ------> / \\\n"
4585 " | BUSY | | READY |\n"
4586 " \\______/ <------ \\________/\n"
4592 #: ../src/guestfs.pod:2161
4594 "The normal transitions are (1) CONFIG (when the handle is created, but there "
4595 "is no child process), (2) LAUNCHING (when the child process is booting up), "
4596 "(3) alternating between READY and BUSY as commands are issued to, and "
4597 "carried out by, the child process."
4602 #: ../src/guestfs.pod:2166
4604 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
4605 "asynchronously at any time (eg. due to some internal error), and that causes "
4606 "the state to transition back to CONFIG."
4611 #: ../src/guestfs.pod:2170
4613 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
4614 "issued when in the CONFIG state."
4619 #: ../src/guestfs.pod:2173
4621 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
4622 "L</guestfs_launch> blocks until the child process is READY to accept "
4623 "commands (or until some failure or timeout). L</guestfs_launch> internally "
4624 "moves the state from CONFIG to LAUNCHING while it is running."
4629 #: ../src/guestfs.pod:2179
4631 "API actions such as L</guestfs_mount> can only be issued when in the READY "
4632 "state. These API calls block waiting for the command to be carried out (ie. "
4633 "the state to transition to BUSY and then back to READY). There are no non-"
4634 "blocking versions, and no way to issue more than one command per handle at "
4640 #: ../src/guestfs.pod:2185
4642 "Finally, the child process sends asynchronous messages back to the main "
4643 "program, such as kernel log messages. You can register a callback to "
4644 "receive these messages."
4649 #: ../src/guestfs.pod:2189
4655 #: ../src/guestfs.pod:2191
4656 msgid "COMMUNICATION PROTOCOL"
4661 #: ../src/guestfs.pod:2193
4663 "Don't rely on using this protocol directly. This section documents how it "
4664 "currently works, but it may change at any time."
4669 #: ../src/guestfs.pod:2196
4671 "The protocol used to talk between the library and the daemon running inside "
4672 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
4673 "1014, RFC 1832, RFC 4506)."
4678 #: ../src/guestfs.pod:2200
4680 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
4681 "this file is automatically generated)."
4686 #: ../src/guestfs.pod:2203
4688 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
4689 "and C<FileOut> parameters, which are handled with very simple request/reply "
4690 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
4691 "parameters, which use the same request and reply messages, but they may also "
4692 "be followed by files sent using a chunked encoding."
4697 #: ../src/guestfs.pod:2210
4698 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
4703 #: ../src/guestfs.pod:2212
4704 msgid "For ordinary functions, the request message is:"
4709 #: ../src/guestfs.pod:2214
4712 " total length (header + arguments,\n"
4713 " but not including the length word itself)\n"
4714 " struct guestfs_message_header (encoded as XDR)\n"
4715 " struct guestfs_<foo>_args (encoded as XDR)\n"
4721 #: ../src/guestfs.pod:2219
4723 "The total length field allows the daemon to allocate a fixed size buffer "
4724 "into which it slurps the rest of the message. As a result, the total length "
4725 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
4726 "effective size of any request is limited to somewhere under this size."
4731 #: ../src/guestfs.pod:2225
4733 "Note also that many functions don't take any arguments, in which case the "
4734 "C<guestfs_I<foo>_args> is completely omitted."
4739 #: ../src/guestfs.pod:2228
4741 "The header contains the procedure number (C<guestfs_proc>) which is how the "
4742 "receiver knows what type of args structure to expect, or none at all."
4747 #: ../src/guestfs.pod:2232
4749 "For functions that take optional arguments, the optional arguments are "
4750 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
4751 "arguments. A bitmask in the header indicates which optional arguments are "
4752 "meaningful. The bitmask is also checked to see if it contains bits set "
4753 "which the daemon does not know about (eg. if more optional arguments were "
4754 "added in a later version of the library), and this causes the call to be "
4760 #: ../src/guestfs.pod:2240
4761 msgid "The reply message for ordinary functions is:"
4766 #: ../src/guestfs.pod:2242
4769 " total length (header + ret,\n"
4770 " but not including the length word itself)\n"
4771 " struct guestfs_message_header (encoded as XDR)\n"
4772 " struct guestfs_<foo>_ret (encoded as XDR)\n"
4778 #: ../src/guestfs.pod:2247
4780 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
4781 "functions that return no formal return values."
4786 #: ../src/guestfs.pod:2250
4788 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
4793 #: ../src/guestfs.pod:2253
4795 "In the case of an error, a flag is set in the header, and the reply message "
4796 "is slightly changed:"
4801 #: ../src/guestfs.pod:2256
4804 " total length (header + error,\n"
4805 " but not including the length word itself)\n"
4806 " struct guestfs_message_header (encoded as XDR)\n"
4807 " struct guestfs_message_error (encoded as XDR)\n"
4813 #: ../src/guestfs.pod:2261
4815 "The C<guestfs_message_error> structure contains the error message as a "
4821 #: ../src/guestfs.pod:2264
4822 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
4827 #: ../src/guestfs.pod:2266
4829 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
4830 "The normal request message is sent (see above). However this is followed by "
4831 "a sequence of file chunks."
4836 #: ../src/guestfs.pod:2270
4839 " total length (header + arguments,\n"
4840 " but not including the length word itself,\n"
4841 " and not including the chunks)\n"
4842 " struct guestfs_message_header (encoded as XDR)\n"
4843 " struct guestfs_<foo>_args (encoded as XDR)\n"
4844 " sequence of chunks for FileIn param #0\n"
4845 " sequence of chunks for FileIn param #1 etc.\n"
4851 #: ../src/guestfs.pod:2278
4852 msgid "The \"sequence of chunks\" is:"
4857 #: ../src/guestfs.pod:2280
4860 " length of chunk (not including length word itself)\n"
4861 " struct guestfs_chunk (encoded as XDR)\n"
4862 " length of chunk\n"
4863 " struct guestfs_chunk (encoded as XDR)\n"
4865 " length of chunk\n"
4866 " struct guestfs_chunk (with data.data_len == 0)\n"
4872 #: ../src/guestfs.pod:2288
4874 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
4875 "is set in the final chunk to indicate either successful completion or early "
4881 #: ../src/guestfs.pod:2292
4883 "At time of writing there are no functions that have more than one FileIn "
4884 "parameter. However this is (theoretically) supported, by sending the "
4885 "sequence of chunks for each FileIn parameter one after another (from left to "
4891 #: ../src/guestfs.pod:2297
4893 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
4894 "transfer. The library does this by sending a chunk with a special flag set "
4895 "to indicate cancellation. When the daemon sees this, it cancels the whole "
4896 "RPC, does I<not> send any reply, and goes back to reading the next request."
4901 #: ../src/guestfs.pod:2303
4903 "The daemon may also cancel. It does this by writing a special word "
4904 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
4905 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
4906 "cancel chunk). The special word is chosen so that even if cancellation "
4907 "happens right at the end of the transfer (after the library has finished "
4908 "writing and has started listening for the reply), the \"spurious\" cancel "
4909 "flag will not be confused with the reply message."
4914 #: ../src/guestfs.pod:2312
4916 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
4917 "limit), and also files where the size is not known in advance (eg. from "
4918 "pipes or sockets). However the chunks are rather small "
4919 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
4920 "to keep much in memory."
4925 #: ../src/guestfs.pod:2318
4926 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
4931 #: ../src/guestfs.pod:2320
4933 "The protocol for FileOut parameters is exactly the same as for FileIn "
4934 "parameters, but with the roles of daemon and library reversed."
4939 #: ../src/guestfs.pod:2323
4942 " total length (header + ret,\n"
4943 " but not including the length word itself,\n"
4944 " and not including the chunks)\n"
4945 " struct guestfs_message_header (encoded as XDR)\n"
4946 " struct guestfs_<foo>_ret (encoded as XDR)\n"
4947 " sequence of chunks for FileOut param #0\n"
4948 " sequence of chunks for FileOut param #1 etc.\n"
4954 #: ../src/guestfs.pod:2331
4955 msgid "INITIAL MESSAGE"
4960 #: ../src/guestfs.pod:2333
4962 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
4963 "which indicates that the guest and daemon is alive. This is what L</"
4964 "guestfs_launch> waits for."
4969 #: ../src/guestfs.pod:2337
4970 msgid "PROGRESS NOTIFICATION MESSAGES"
4975 #: ../src/guestfs.pod:2339
4977 "The daemon may send progress notification messages at any time. These are "
4978 "distinguished by the normal length word being replaced by "
4979 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
4983 #: ../src/guestfs.pod:2343
4985 "The library turns them into progress callbacks (see L</"
4986 "GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards them "
4992 #: ../src/guestfs.pod:2347
4994 "The daemon self-limits the frequency of progress messages it sends (see "
4995 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
5001 #: ../src/guestfs.pod:2351
5002 msgid "LIBGUESTFS VERSION NUMBERS"
5007 #: ../src/guestfs.pod:2353
5009 "Since April 2010, libguestfs has started to make separate development and "
5010 "stable releases, along with corresponding branches in our git repository. "
5011 "These separate releases can be identified by version number:"
5016 #: ../src/guestfs.pod:2358
5019 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
5020 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
5026 " | `-------- sub-version\n"
5028 " `------ always '1' because we don't change the ABI\n"
5034 #: ../src/guestfs.pod:2369
5035 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
5040 #: ../src/guestfs.pod:2371
5042 "As time passes we cherry pick fixes from the development branch and backport "
5043 "those into the stable branch, the effect being that the stable branch should "
5044 "get more stable and less buggy over time. So the stable releases are ideal "
5045 "for people who don't need new features but would just like the software to "
5051 #: ../src/guestfs.pod:2377
5052 msgid "Our criteria for backporting changes are:"
5057 #: ../src/guestfs.pod:2383
5059 "Documentation changes which don't affect any code are backported unless the "
5060 "documentation refers to a future feature which is not in stable."
5065 #: ../src/guestfs.pod:2389
5067 "Bug fixes which are not controversial, fix obvious problems, and have been "
5068 "well tested are backported."
5073 #: ../src/guestfs.pod:2394
5075 "Simple rearrangements of code which shouldn't affect how it works get "
5076 "backported. This is so that the code in the two branches doesn't get too "
5077 "far out of step, allowing us to backport future fixes more easily."
5082 #: ../src/guestfs.pod:2400
5084 "We I<don't> backport new features, new APIs, new tools etc, except in one "
5085 "exceptional case: the new feature is required in order to implement an "
5086 "important bug fix."
5091 #: ../src/guestfs.pod:2406
5093 "A new stable branch starts when we think the new features in development are "
5094 "substantial and compelling enough over the current stable branch to warrant "
5095 "it. When that happens we create new stable and development versions 1.N.0 "
5096 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
5097 "stable at this point, but by backporting fixes from development, that branch "
5098 "will stabilize over time."
5102 #: ../src/guestfs.pod:2414
5103 msgid "EXTENDING LIBGUESTFS"
5107 #: ../src/guestfs.pod:2416
5108 msgid "ADDING A NEW API ACTION"
5112 #: ../src/guestfs.pod:2418
5114 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
5115 "documentation) are generated, and this makes it easy to extend the "
5120 #: ../src/guestfs.pod:2422
5121 msgid "To add a new API action there are two changes:"
5125 #: ../src/guestfs.pod:2428
5127 "You need to add a description of the call (name, parameters, return type, "
5128 "tests, documentation) to C<generator/generator_actions.ml>."
5132 #: ../src/guestfs.pod:2431
5134 "There are two sorts of API action, depending on whether the call goes "
5135 "through to the daemon in the appliance, or is serviced entirely by the "
5136 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
5137 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
5138 "an example of the latter, since a trace flag is maintained in the handle and "
5139 "all tracing is done on the library side."
5143 #: ../src/guestfs.pod:2439
5145 "Most new actions are of the first type, and get added to the "
5146 "C<daemon_functions> list. Each function has a unique procedure number used "
5147 "in the RPC protocol which is assigned to that action when we publish "
5148 "libguestfs and cannot be reused. Take the latest procedure number and "
5153 #: ../src/guestfs.pod:2445
5155 "For library-only actions of the second type, add to the "
5156 "C<non_daemon_functions> list. Since these functions are serviced by the "
5157 "library and do not travel over the RPC mechanism to the daemon, these "
5158 "functions do not need a procedure number, and so the procedure number is set "
5163 #: ../src/guestfs.pod:2453
5164 msgid "Implement the action (in C):"
5168 #: ../src/guestfs.pod:2455
5170 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
5171 "C<daemon/> directory."
5175 #: ../src/guestfs.pod:2458
5177 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
5178 "(note: double underscore) in the C<src/> directory."
5182 #: ../src/guestfs.pod:2461
5183 msgid "In either case, use another function as an example of what to do."
5187 #: ../src/guestfs.pod:2465
5188 msgid "After making these changes, use C<make> to compile."
5192 #: ../src/guestfs.pod:2467
5194 "Note that you don't need to implement the RPC, language bindings, manual "
5195 "pages or anything else. It's all automatically generated from the OCaml "
5200 #: ../src/guestfs.pod:2471
5201 msgid "ADDING TESTS FOR AN API ACTION"
5205 #: ../src/guestfs.pod:2473
5207 "You can supply zero or as many tests as you want per API call. The tests "
5208 "can either be added as part of the API description (C<generator/"
5209 "generator_actions.ml>), or in some rarer cases you may want to drop a script "
5210 "into C<regressions/>. Note that adding a script to C<regressions/> is "
5211 "slower, so if possible use the first method."
5215 #: ../src/guestfs.pod:2479
5217 "The following describes the test environment used when you add an API test "
5218 "in C<generator_actions.ml>."
5222 #: ../src/guestfs.pod:2482
5223 msgid "The test environment has 4 block devices:"
5227 #: ../src/guestfs.pod:2486
5228 msgid "C</dev/sda> 500MB"
5232 #: ../src/guestfs.pod:2488
5233 msgid "General block device for testing."
5237 #: ../src/guestfs.pod:2490
5238 msgid "C</dev/sdb> 50MB"
5242 #: ../src/guestfs.pod:2492
5244 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
5249 #: ../src/guestfs.pod:2495
5250 msgid "C</dev/sdc> 10MB"
5254 #: ../src/guestfs.pod:2497
5255 msgid "Used in a few tests where two block devices are needed."
5259 #: ../src/guestfs.pod:2499
5264 #: ../src/guestfs.pod:2501
5265 msgid "ISO with fixed content (see C<images/test.iso>)."
5269 #: ../src/guestfs.pod:2505
5271 "To be able to run the tests in a reasonable amount of time, the libguestfs "
5272 "appliance and block devices are reused between tests. So don't try testing "
5273 "L</guestfs_kill_subprocess> :-x"
5277 #: ../src/guestfs.pod:2509
5279 "Each test starts with an initial scenario, selected using one of the "
5280 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
5281 "initialize the disks mentioned above in a particular way as documented in "
5282 "C<generator_types.ml>. You should not assume anything about the previous "
5283 "contents of other disks that are not initialized."
5287 #: ../src/guestfs.pod:2515
5289 "You can add a prerequisite clause to any individual test. This is a run-"
5290 "time check, which, if it fails, causes the test to be skipped. Useful if "
5291 "testing a command which might not work on all variations of libguestfs "
5292 "builds. A test that has prerequisite of C<Always> means to run "
5297 #: ../src/guestfs.pod:2521
5299 "In addition, packagers can skip individual tests by setting environment "
5300 "variables before running C<make check>."
5304 #: ../src/guestfs.pod:2524
5307 " SKIP_TEST_<CMD>_<NUM>=1\n"
5312 #: ../src/guestfs.pod:2526
5313 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
5317 #: ../src/guestfs.pod:2528
5322 #: ../src/guestfs.pod:2530
5325 " SKIP_TEST_<CMD>=1\n"
5330 #: ../src/guestfs.pod:2532
5331 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
5335 #: ../src/guestfs.pod:2534
5336 msgid "Packagers can run only certain tests by setting for example:"
5340 #: ../src/guestfs.pod:2536
5343 " TEST_ONLY=\"vfs_type zerofree\"\n"
5348 #: ../src/guestfs.pod:2538
5350 "See C<capitests/tests.c> for more details of how these environment variables "
5355 #: ../src/guestfs.pod:2541
5356 msgid "DEBUGGING NEW API ACTIONS"
5360 #: ../src/guestfs.pod:2543
5361 msgid "Test new actions work before submitting them."
5365 #: ../src/guestfs.pod:2545
5366 msgid "You can use guestfish to try out new commands."
5370 #: ../src/guestfs.pod:2547
5372 "Debugging the daemon is a problem because it runs inside a minimal "
5373 "environment. However you can fprintf messages in the daemon to stderr, and "
5374 "they will show up if you use C<guestfish -v>."
5378 #: ../src/guestfs.pod:2551
5379 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
5383 #: ../src/guestfs.pod:2553
5385 "Our C source code generally adheres to some basic code-formatting "
5386 "conventions. The existing code base is not totally consistent on this "
5387 "front, but we do prefer that contributed code be formatted similarly. In "
5388 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
5389 "indentation level, and other than that, follow the K&R style."
5393 #: ../src/guestfs.pod:2559
5395 "If you use Emacs, add the following to one of one of your start-up files (e."
5396 "g., ~/.emacs), to help ensure that you get indentation right:"
5400 #: ../src/guestfs.pod:2562
5403 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
5404 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
5405 " (add-hook 'find-file-hook\n"
5406 " '(lambda () (if (and buffer-file-name\n"
5407 " (string-match \"/libguestfs\\\\>\"\n"
5408 " (buffer-file-name))\n"
5409 " (not (string-equal mode-name \"Change Log\"))\n"
5410 " (not (string-equal mode-name \"Makefile\")))\n"
5411 " (setq indent-tabs-mode nil))))\n"
5416 #: ../src/guestfs.pod:2572
5419 " ;;; When editing C sources in libguestfs, use this style.\n"
5420 " (defun libguestfs-c-mode ()\n"
5421 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
5423 " (c-set-style \"K&R\")\n"
5424 " (setq c-indent-level 2)\n"
5425 " (setq c-basic-offset 2))\n"
5426 " (add-hook 'c-mode-hook\n"
5427 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
5428 " (buffer-file-name))\n"
5429 " (libguestfs-c-mode))))\n"
5434 #: ../src/guestfs.pod:2584
5435 msgid "Enable warnings when compiling (and fix any problems this finds):"
5439 #: ../src/guestfs.pod:2587
5442 " ./configure --enable-gcc-warnings\n"
5447 #: ../src/guestfs.pod:2589
5448 msgid "Useful targets are:"
5452 #: ../src/guestfs.pod:2591
5455 " make syntax-check # checks the syntax of the C code\n"
5456 " make check # runs the test suite\n"
5461 #: ../src/guestfs.pod:2594
5462 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
5466 #: ../src/guestfs.pod:2596
5468 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
5469 "which are used to do shell quoting."
5473 #: ../src/guestfs.pod:2601
5478 #: ../src/guestfs.pod:2603
5480 "Simple shell quoted string. Any spaces or other shell characters are "
5485 #: ../src/guestfs.pod:2606
5490 #: ../src/guestfs.pod:2608
5492 "Same as C<%Q> except the string is treated as a path which is prefixed by "
5498 #: ../src/guestfs.pod:2613 ../fish/guestfish.pod:242 ../fish/guestfish.pod:615
5499 msgid "For example:"
5503 #: ../src/guestfs.pod:2615
5506 " asprintf (&cmd, \"cat %R\", path);\n"
5511 #: ../src/guestfs.pod:2617
5512 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
5516 #: ../src/guestfs.pod:2619
5518 "I<Note:> Do I<not> use these when you are passing parameters to the C<command"
5519 "{,r,v,rv}()> functions. These parameters do NOT need to be quoted because "
5520 "they are not passed via the shell (instead, straight to exec). You probably "
5521 "want to use the C<sysroot_path()> function however."
5525 #: ../src/guestfs.pod:2625
5526 msgid "SUBMITTING YOUR NEW API ACTIONS"
5530 #: ../src/guestfs.pod:2627
5532 "Submit patches to the mailing list: L<http://www.redhat.com/mailman/listinfo/"
5533 "libguestfs> and CC to L<rjones@redhat.com>."
5537 #: ../src/guestfs.pod:2631
5538 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
5542 #: ../src/guestfs.pod:2633
5543 msgid "We support i18n (gettext anyhow) in the library."
5547 #: ../src/guestfs.pod:2635
5549 "However many messages come from the daemon, and we don't translate those at "
5550 "the moment. One reason is that the appliance generally has all locale files "
5551 "removed from it, because they take up a lot of space. So we'd have to readd "
5552 "some of those, as well as copying our PO files into the appliance."
5556 #: ../src/guestfs.pod:2641
5558 "Debugging messages are never translated, since they are intended for the "
5563 #: ../src/guestfs.pod:2644
5564 msgid "SOURCE CODE SUBDIRECTORIES"
5568 #: ../src/guestfs.pod:2648 ../src/guestfs-actions.pod:5820
5569 #: ../fish/guestfish-actions.pod:3913
5570 msgid "C<appliance>"
5574 #: ../src/guestfs.pod:2650
5575 msgid "The libguestfs appliance, build scripts and so on."
5579 #: ../src/guestfs.pod:2652
5580 msgid "C<capitests>"
5584 #: ../src/guestfs.pod:2654
5585 msgid "Automated tests of the C API."
5589 #: ../src/guestfs.pod:2656
5594 #: ../src/guestfs.pod:2658
5596 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
5601 #: ../src/guestfs.pod:2661
5606 #: ../src/guestfs.pod:2663
5607 msgid "Outside contributions, experimental parts."
5611 #: ../src/guestfs.pod:2665
5616 #: ../src/guestfs.pod:2667
5618 "The daemon that runs inside the libguestfs appliance and carries out actions."
5622 #: ../src/guestfs.pod:2670
5627 #: ../src/guestfs.pod:2672
5628 msgid "L<virt-df(1)> command and documentation."
5632 #: ../src/guestfs.pod:2674
5637 #: ../src/guestfs.pod:2676
5638 msgid "L<virt-edit(1)> command and documentation."
5642 #: ../src/guestfs.pod:2678
5647 #: ../src/guestfs.pod:2680
5648 msgid "C API example code."
5652 #: ../src/guestfs.pod:2682
5657 #: ../src/guestfs.pod:2684
5659 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
5660 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
5661 "L<virt-tar-out(1)>."
5665 #: ../src/guestfs.pod:2688
5670 #: ../src/guestfs.pod:2690
5672 "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
5676 #: ../src/guestfs.pod:2692
5677 msgid "C<generator>"
5681 #: ../src/guestfs.pod:2694
5683 "The crucially important generator, used to automatically generate large "
5684 "amounts of boilerplate C code for things like RPC and bindings."
5688 #: ../src/guestfs.pod:2697
5693 #: ../src/guestfs.pod:2699
5694 msgid "Files used by the test suite."
5698 #: ../src/guestfs.pod:2701
5699 msgid "Some \"phony\" guest images which we test against."
5703 #: ../src/guestfs.pod:2703
5704 msgid "C<inspector>"
5708 #: ../src/guestfs.pod:2705
5709 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
5713 #: ../src/guestfs.pod:2707
5718 #: ../src/guestfs.pod:2709
5719 msgid "Logo used on the website. The fish is called Arthur by the way."
5723 #: ../src/guestfs.pod:2711
5728 #: ../src/guestfs.pod:2713
5729 msgid "M4 macros used by autoconf."
5733 #: ../src/guestfs.pod:2715
5738 #: ../src/guestfs.pod:2717
5739 msgid "Translations of simple gettext strings."
5743 #: ../src/guestfs.pod:2719
5748 #: ../src/guestfs.pod:2721
5750 "The build infrastructure and PO files for translations of manpages and POD "
5751 "files. Eventually this will be combined with the C<po> directory, but that "
5752 "is rather complicated."
5756 #: ../src/guestfs.pod:2725
5757 msgid "C<regressions>"
5761 #: ../src/guestfs.pod:2727
5762 msgid "Regression tests."
5766 #: ../src/guestfs.pod:2729
5771 #: ../src/guestfs.pod:2731
5772 msgid "L<virt-rescue(1)> command and documentation."
5776 #: ../src/guestfs.pod:2733
5781 #: ../src/guestfs.pod:2735
5782 msgid "Source code to the C library."
5786 #: ../src/guestfs.pod:2737
5791 #: ../src/guestfs.pod:2739
5792 msgid "Command line tools written in Perl (L<virt-resize(1)> and many others)."
5796 #: ../src/guestfs.pod:2741
5797 msgid "C<test-tool>"
5801 #: ../src/guestfs.pod:2743
5803 "Test tool for end users to test if their qemu/kernel combination will work "
5808 #: ../src/guestfs.pod:2746
5813 #: ../src/guestfs.pod:2748
5818 #: ../src/guestfs.pod:2750
5823 #: ../src/guestfs.pod:2752
5828 #: ../src/guestfs.pod:2754
5833 #: ../src/guestfs.pod:2756
5838 #: ../src/guestfs.pod:2758
5843 #: ../src/guestfs.pod:2760
5848 #: ../src/guestfs.pod:2762
5849 msgid "Language bindings."
5853 #: ../src/guestfs.pod:2766
5859 #: ../src/guestfs.pod:2768
5860 msgid "PROTOCOL LIMITS"
5865 #: ../src/guestfs.pod:2770
5867 "Internally libguestfs uses a message-based protocol to pass API calls and "
5868 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
5869 "plenty more detail about this). The maximum message size used by the "
5870 "protocol is slightly less than 4 MB. For some API calls you may need to be "
5871 "aware of this limit. The API calls which may be affected are individually "
5872 "documented, with a link back to this section of the documentation."
5877 #: ../src/guestfs.pod:2778
5879 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
5880 "a simple string. Because this string is at some point internally encoded as "
5881 "a message, the maximum size that it can return is slightly under 4 MB. If "
5882 "the requested file is larger than this then you will get an error."
5887 #: ../src/guestfs.pod:2784
5889 "In order to transfer large files into and out of the guest filesystem, you "
5890 "need to use particular calls that support this. The sections L</UPLOADING> "
5891 "and L</DOWNLOADING> document how to do this."
5896 #: ../src/guestfs.pod:2788
5898 "You might also consider mounting the disk image using our FUSE filesystem "
5899 "support (L<guestmount(1)>)."
5903 #: ../src/guestfs.pod:2791
5904 msgid "MAXIMUM NUMBER OF DISKS"
5908 #: ../src/guestfs.pod:2793
5909 msgid "When using virtio disks (the default) the current limit is B<25> disks."
5913 #: ../src/guestfs.pod:2796
5915 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
5916 "slots. However febootstrap only understands disks with names C</dev/vda> "
5917 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
5922 #: ../src/guestfs.pod:2801
5924 "We are working to substantially raise this limit in future versions but it "
5925 "requires complex changes to qemu."
5929 #: ../src/guestfs.pod:2804
5931 "In future versions of libguestfs it should also be possible to \"hot plug\" "
5932 "disks (add and remove disks after calling L</guestfs_launch>). This also "
5933 "requires changes to qemu."
5937 #: ../src/guestfs.pod:2808
5938 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
5942 #: ../src/guestfs.pod:2810
5943 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
5947 #: ../src/guestfs.pod:2812
5949 "This is because it reserves 4 bits for the minor device number (thus C</dev/"
5950 "vda>, and C</dev/vda1> through C</dev/vda15>)."
5954 #: ../src/guestfs.pod:2815
5956 "If you attach a disk with more than 15 partitions, the extra partitions are "
5957 "ignored by libguestfs."
5961 #: ../src/guestfs.pod:2818
5962 msgid "MAXIMUM SIZE OF A DISK"
5966 #: ../src/guestfs.pod:2820
5967 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
5971 #: ../src/guestfs.pod:2822
5973 "We have tested block devices up to 1 exabyte (2**60 or "
5974 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
5979 #: ../src/guestfs.pod:2826
5981 "Although libguestfs probably does not impose any limit, the underlying host "
5982 "storage will. If you store disk images on a host ext4 filesystem, then the "
5983 "maximum size will be limited by the maximum ext4 file size (currently 16 "
5984 "TB). If you store disk images as host logical volumes then you are limited "
5985 "by the maximum size of an LV."
5989 #: ../src/guestfs.pod:2832
5991 "For the hugest disk image files, we recommend using XFS on the host for "
5996 #: ../src/guestfs.pod:2835
5997 msgid "MAXIMUM SIZE OF A PARTITION"
6001 #: ../src/guestfs.pod:2837
6003 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
6004 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
6005 "address a partition located beyond 2 TB on the disk."
6009 #: ../src/guestfs.pod:2841
6011 "It is recommended that you use GPT partitions on disks which are larger than "
6012 "this size. GPT uses 64 bit sector numbers and so can address partitions "
6013 "which are theoretically larger than the largest disk we could support."
6017 #: ../src/guestfs.pod:2846
6018 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
6022 #: ../src/guestfs.pod:2848
6024 "This depends on the filesystem type. libguestfs itself does not impose any "
6025 "known limit. Consult Wikipedia or the filesystem documentation to find out "
6026 "what these limits are."
6030 #: ../src/guestfs.pod:2852
6031 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
6035 #: ../src/guestfs.pod:2854
6037 "The API functions L</guestfs_upload>, L</guestfs_download>, L</"
6038 "guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
6039 "uploads and downloads."
6043 #: ../src/guestfs.pod:2858
6044 msgid "INSPECTION LIMITS"
6048 #: ../src/guestfs.pod:2860
6050 "The inspection code has several arbitrary limits on things like the size of "
6051 "Windows Registry hive it will read, and the length of product name. These "
6052 "are intended to stop a malicious guest from consuming arbitrary amounts of "
6053 "memory and disk space on the host, and should not be reached in practice. "
6054 "See the source code for more information."
6059 #: ../src/guestfs.pod:2866 ../fish/guestfish.pod:1017
6060 #: ../test-tool/libguestfs-test-tool.pod:82
6061 msgid "ENVIRONMENT VARIABLES"
6066 #: ../src/guestfs.pod:2870 ../fish/guestfish.pod:1043
6067 msgid "LIBGUESTFS_APPEND"
6072 #: ../src/guestfs.pod:2872 ../fish/guestfish.pod:1045
6073 msgid "Pass additional options to the guest kernel."
6078 #: ../src/guestfs.pod:2874 ../fish/guestfish.pod:1047
6079 msgid "LIBGUESTFS_DEBUG"
6084 #: ../src/guestfs.pod:2876
6086 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
6087 "effect as calling C<guestfs_set_verbose (g, 1)>."
6092 #: ../src/guestfs.pod:2879 ../fish/guestfish.pod:1052
6093 msgid "LIBGUESTFS_MEMSIZE"
6098 #: ../src/guestfs.pod:2881 ../fish/guestfish.pod:1054
6100 "Set the memory allocated to the qemu process, in megabytes. For example:"
6105 #: ../src/guestfs.pod:2884 ../fish/guestfish.pod:1057
6108 " LIBGUESTFS_MEMSIZE=700\n"
6114 #: ../src/guestfs.pod:2886 ../fish/guestfish.pod:1059
6115 msgid "LIBGUESTFS_PATH"
6119 #: ../src/guestfs.pod:2888
6121 "Set the path that libguestfs uses to search for a supermin appliance. See "
6122 "the discussion of paths in section L</PATH> above."
6127 #: ../src/guestfs.pod:2891 ../fish/guestfish.pod:1064
6128 msgid "LIBGUESTFS_QEMU"
6133 #: ../src/guestfs.pod:2893 ../fish/guestfish.pod:1066
6135 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
6136 "which was found at compile time by the configure script is used."
6141 #: ../src/guestfs.pod:2897
6142 msgid "See also L</QEMU WRAPPERS> above."
6147 #: ../src/guestfs.pod:2899 ../fish/guestfish.pod:1070
6148 msgid "LIBGUESTFS_TRACE"
6153 #: ../src/guestfs.pod:2901
6155 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
6156 "effect as calling C<guestfs_set_trace (g, 1)>."
6161 #: ../src/guestfs.pod:2904 ../fish/guestfish.pod:1079
6166 #: ../src/guestfs.pod:2906 ../fish/guestfish.pod:1081
6168 "Location of temporary directory, defaults to C</tmp> except for the cached "
6169 "supermin appliance which defaults to C</var/tmp>."
6173 #: ../src/guestfs.pod:2909 ../fish/guestfish.pod:1084
6175 "If libguestfs was compiled to use the supermin appliance then the real "
6176 "appliance is cached in this directory, shared between all handles belonging "
6177 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
6178 "use in case C</var/tmp> is not large enough."
6183 #: ../src/guestfs.pod:2917 ../fish/guestfish.pod:1151
6184 #: ../test-tool/libguestfs-test-tool.pod:87 ../fuse/guestmount.pod:269
6185 #: ../tools/virt-win-reg.pl:572 ../tools/virt-list-filesystems.pl:189
6186 #: ../tools/virt-tar.pl:286 ../tools/virt-make-fs.pl:539
6187 #: ../tools/virt-list-partitions.pl:257
6192 #: ../src/guestfs.pod:2919
6194 "L<guestfs-examples(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, L<guestfs-"
6195 "ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-copy-in"
6196 "(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems"
6197 "(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-"
6198 "partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-"
6199 "tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<qemu(1)"
6200 ">, L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
6205 #: ../src/guestfs.pod:2946
6207 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
6208 "(8)>, L<disktype(1)>."
6213 #: ../src/guestfs.pod:2953 ../tools/virt-win-reg.pl:587
6214 #: ../tools/virt-make-fs.pl:553
6220 #: ../src/guestfs.pod:2955
6221 msgid "To get a list of bugs against libguestfs use this link:"
6226 #: ../src/guestfs.pod:2957
6228 "L<https://bugzilla.redhat.com/buglist.cgi?"
6229 "component=libguestfs&product=Virtualization+Tools>"
6234 #: ../src/guestfs.pod:2959
6235 msgid "To report a new bug against libguestfs use this link:"
6240 #: ../src/guestfs.pod:2961
6242 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
6243 "component=libguestfs&product=Virtualization+Tools>"
6248 #: ../src/guestfs.pod:2963
6249 msgid "When reporting a bug, please check:"
6254 #: ../src/guestfs.pod:2969
6255 msgid "That the bug hasn't been reported already."
6260 #: ../src/guestfs.pod:2973
6261 msgid "That you are testing a recent version."
6266 #: ../src/guestfs.pod:2977
6267 msgid "Describe the bug accurately, and give a way to reproduce it."
6272 #: ../src/guestfs.pod:2981
6274 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
6280 #: ../src/guestfs.pod:2986 ../fish/guestfish.pod:1174
6281 #: ../test-tool/libguestfs-test-tool.pod:93 ../fuse/guestmount.pod:280
6287 #: ../src/guestfs.pod:2988 ../fish/guestfish.pod:1176
6288 #: ../test-tool/libguestfs-test-tool.pod:95 ../fuse/guestmount.pod:282
6289 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
6294 #: ../src/guestfs.pod:2990 ../fish/guestfish.pod:1178
6295 #: ../test-tool/libguestfs-test-tool.pod:97 ../fuse/guestmount.pod:284
6296 #: ../tools/virt-win-reg.pl:602 ../tools/virt-list-filesystems.pl:206
6297 #: ../tools/virt-tar.pl:305 ../tools/virt-make-fs.pl:568
6298 #: ../tools/virt-list-partitions.pl:273
6303 #: ../src/guestfs.pod:2992 ../fish/guestfish.pod:1180
6304 #: ../test-tool/libguestfs-test-tool.pod:99
6305 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
6310 #: ../src/guestfs.pod:2995
6312 "This library is free software; you can redistribute it and/or modify it "
6313 "under the terms of the GNU Lesser General Public License as published by the "
6314 "Free Software Foundation; either version 2 of the License, or (at your "
6315 "option) any later version."
6320 #: ../src/guestfs.pod:3000
6322 "This library is distributed in the hope that it will be useful, but WITHOUT "
6323 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
6324 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
6330 #: ../src/guestfs.pod:3005
6332 "You should have received a copy of the GNU Lesser General Public License "
6333 "along with this library; if not, write to the Free Software Foundation, "
6334 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
6339 #: ../src/guestfs-actions.pod:1
6340 msgid "guestfs_add_cdrom"
6345 #: ../src/guestfs-actions.pod:3
6349 " guestfs_add_cdrom (guestfs_h *g,\n"
6350 " const char *filename);\n"
6356 #: ../src/guestfs-actions.pod:7 ../fish/guestfish-actions.pod:5
6357 msgid "This function adds a virtual CD-ROM disk image to the guest."
6361 #: ../src/guestfs-actions.pod:9 ../fish/guestfish-actions.pod:7
6362 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
6367 #: ../src/guestfs-actions.pod:17
6369 "This call checks for the existence of C<filename>. This stops you from "
6370 "specifying other types of drive which are supported by qemu such as C<nbd:> "
6371 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
6377 #: ../src/guestfs-actions.pod:24
6379 "If you just want to add an ISO file (often you use this as an efficient way "
6380 "to transfer large files into the guest), then you should probably use "
6381 "C<guestfs_add_drive_ro> instead."
6386 #: ../src/guestfs-actions.pod:30 ../src/guestfs-actions.pod:140
6387 #: ../src/guestfs-actions.pod:201 ../src/guestfs-actions.pod:238
6388 #: ../src/guestfs-actions.pod:252 ../src/guestfs-actions.pod:273
6389 #: ../src/guestfs-actions.pod:293 ../src/guestfs-actions.pod:307
6390 #: ../src/guestfs-actions.pod:422 ../src/guestfs-actions.pod:442
6391 #: ../src/guestfs-actions.pod:456 ../src/guestfs-actions.pod:501
6392 #: ../src/guestfs-actions.pod:529 ../src/guestfs-actions.pod:547
6393 #: ../src/guestfs-actions.pod:614 ../src/guestfs-actions.pod:647
6394 #: ../src/guestfs-actions.pod:661 ../src/guestfs-actions.pod:676
6395 #: ../src/guestfs-actions.pod:775 ../src/guestfs-actions.pod:793
6396 #: ../src/guestfs-actions.pod:807 ../src/guestfs-actions.pod:821
6397 #: ../src/guestfs-actions.pod:982 ../src/guestfs-actions.pod:1002
6398 #: ../src/guestfs-actions.pod:1020 ../src/guestfs-actions.pod:1104
6399 #: ../src/guestfs-actions.pod:1122 ../src/guestfs-actions.pod:1141
6400 #: ../src/guestfs-actions.pod:1155 ../src/guestfs-actions.pod:1175
6401 #: ../src/guestfs-actions.pod:1245 ../src/guestfs-actions.pod:1276
6402 #: ../src/guestfs-actions.pod:1301 ../src/guestfs-actions.pod:1343
6403 #: ../src/guestfs-actions.pod:1449 ../src/guestfs-actions.pod:1483
6404 #: ../src/guestfs-actions.pod:1701 ../src/guestfs-actions.pod:1723
6405 #: ../src/guestfs-actions.pod:1810 ../src/guestfs-actions.pod:2272
6406 #: ../src/guestfs-actions.pod:2416 ../src/guestfs-actions.pod:2477
6407 #: ../src/guestfs-actions.pod:2512 ../src/guestfs-actions.pod:3465
6408 #: ../src/guestfs-actions.pod:3480 ../src/guestfs-actions.pod:3505
6409 #: ../src/guestfs-actions.pod:3660 ../src/guestfs-actions.pod:3674
6410 #: ../src/guestfs-actions.pod:3687 ../src/guestfs-actions.pod:3701
6411 #: ../src/guestfs-actions.pod:3716 ../src/guestfs-actions.pod:3752
6412 #: ../src/guestfs-actions.pod:3824 ../src/guestfs-actions.pod:3844
6413 #: ../src/guestfs-actions.pod:3861 ../src/guestfs-actions.pod:3884
6414 #: ../src/guestfs-actions.pod:3907 ../src/guestfs-actions.pod:3939
6415 #: ../src/guestfs-actions.pod:3958 ../src/guestfs-actions.pod:3977
6416 #: ../src/guestfs-actions.pod:4012 ../src/guestfs-actions.pod:4024
6417 #: ../src/guestfs-actions.pod:4060 ../src/guestfs-actions.pod:4076
6418 #: ../src/guestfs-actions.pod:4089 ../src/guestfs-actions.pod:4104
6419 #: ../src/guestfs-actions.pod:4121 ../src/guestfs-actions.pod:4214
6420 #: ../src/guestfs-actions.pod:4234 ../src/guestfs-actions.pod:4247
6421 #: ../src/guestfs-actions.pod:4298 ../src/guestfs-actions.pod:4316
6422 #: ../src/guestfs-actions.pod:4334 ../src/guestfs-actions.pod:4350
6423 #: ../src/guestfs-actions.pod:4364 ../src/guestfs-actions.pod:4378
6424 #: ../src/guestfs-actions.pod:4395 ../src/guestfs-actions.pod:4410
6425 #: ../src/guestfs-actions.pod:4430 ../src/guestfs-actions.pod:4488
6426 #: ../src/guestfs-actions.pod:4561 ../src/guestfs-actions.pod:4592
6427 #: ../src/guestfs-actions.pod:4611 ../src/guestfs-actions.pod:4630
6428 #: ../src/guestfs-actions.pod:4642 ../src/guestfs-actions.pod:4659
6429 #: ../src/guestfs-actions.pod:4672 ../src/guestfs-actions.pod:4687
6430 #: ../src/guestfs-actions.pod:4702 ../src/guestfs-actions.pod:4737
6431 #: ../src/guestfs-actions.pod:4752 ../src/guestfs-actions.pod:4772
6432 #: ../src/guestfs-actions.pod:4786 ../src/guestfs-actions.pod:4803
6433 #: ../src/guestfs-actions.pod:4852 ../src/guestfs-actions.pod:4889
6434 #: ../src/guestfs-actions.pod:4903 ../src/guestfs-actions.pod:4931
6435 #: ../src/guestfs-actions.pod:4948 ../src/guestfs-actions.pod:4966
6436 #: ../src/guestfs-actions.pod:5100 ../src/guestfs-actions.pod:5157
6437 #: ../src/guestfs-actions.pod:5179 ../src/guestfs-actions.pod:5197
6438 #: ../src/guestfs-actions.pod:5229 ../src/guestfs-actions.pod:5295
6439 #: ../src/guestfs-actions.pod:5312 ../src/guestfs-actions.pod:5325
6440 #: ../src/guestfs-actions.pod:5339 ../src/guestfs-actions.pod:5628
6441 #: ../src/guestfs-actions.pod:5647 ../src/guestfs-actions.pod:5666
6442 #: ../src/guestfs-actions.pod:5678 ../src/guestfs-actions.pod:5690
6443 #: ../src/guestfs-actions.pod:5704 ../src/guestfs-actions.pod:5716
6444 #: ../src/guestfs-actions.pod:5730 ../src/guestfs-actions.pod:5746
6445 #: ../src/guestfs-actions.pod:5767 ../src/guestfs-actions.pod:5786
6446 #: ../src/guestfs-actions.pod:5805 ../src/guestfs-actions.pod:5835
6447 #: ../src/guestfs-actions.pod:5851 ../src/guestfs-actions.pod:5874
6448 #: ../src/guestfs-actions.pod:5892 ../src/guestfs-actions.pod:5911
6449 #: ../src/guestfs-actions.pod:5932 ../src/guestfs-actions.pod:5951
6450 #: ../src/guestfs-actions.pod:5968 ../src/guestfs-actions.pod:5996
6451 #: ../src/guestfs-actions.pod:6020 ../src/guestfs-actions.pod:6039
6452 #: ../src/guestfs-actions.pod:6063 ../src/guestfs-actions.pod:6082
6453 #: ../src/guestfs-actions.pod:6097 ../src/guestfs-actions.pod:6116
6454 #: ../src/guestfs-actions.pod:6153 ../src/guestfs-actions.pod:6176
6455 #: ../src/guestfs-actions.pod:6202 ../src/guestfs-actions.pod:6310
6456 #: ../src/guestfs-actions.pod:6431 ../src/guestfs-actions.pod:6443
6457 #: ../src/guestfs-actions.pod:6456 ../src/guestfs-actions.pod:6469
6458 #: ../src/guestfs-actions.pod:6491 ../src/guestfs-actions.pod:6504
6459 #: ../src/guestfs-actions.pod:6517 ../src/guestfs-actions.pod:6530
6460 #: ../src/guestfs-actions.pod:6545 ../src/guestfs-actions.pod:6604
6461 #: ../src/guestfs-actions.pod:6621 ../src/guestfs-actions.pod:6637
6462 #: ../src/guestfs-actions.pod:6653 ../src/guestfs-actions.pod:6670
6463 #: ../src/guestfs-actions.pod:6683 ../src/guestfs-actions.pod:6703
6464 #: ../src/guestfs-actions.pod:6739 ../src/guestfs-actions.pod:6753
6465 #: ../src/guestfs-actions.pod:6794 ../src/guestfs-actions.pod:6807
6466 #: ../src/guestfs-actions.pod:6825 ../src/guestfs-actions.pod:6859
6467 #: ../src/guestfs-actions.pod:6895 ../src/guestfs-actions.pod:7014
6468 #: ../src/guestfs-actions.pod:7032 ../src/guestfs-actions.pod:7046
6469 #: ../src/guestfs-actions.pod:7101 ../src/guestfs-actions.pod:7114
6470 #: ../src/guestfs-actions.pod:7159 ../src/guestfs-actions.pod:7192
6471 #: ../src/guestfs-actions.pod:7246 ../src/guestfs-actions.pod:7272
6472 #: ../src/guestfs-actions.pod:7338 ../src/guestfs-actions.pod:7357
6473 #: ../src/guestfs-actions.pod:7386
6474 msgid "This function returns 0 on success or -1 on error."
6479 #: ../src/guestfs-actions.pod:32 ../src/guestfs-actions.pod:254
6480 #: ../src/guestfs-actions.pod:275 ../fish/guestfish-actions.pod:28
6481 #: ../fish/guestfish-actions.pod:163 ../fish/guestfish-actions.pod:177
6483 "This function is deprecated. In new code, use the C<add_drive_opts> call "
6489 #: ../src/guestfs-actions.pod:35 ../src/guestfs-actions.pod:257
6490 #: ../src/guestfs-actions.pod:278 ../src/guestfs-actions.pod:1454
6491 #: ../src/guestfs-actions.pod:1950 ../src/guestfs-actions.pod:1971
6492 #: ../src/guestfs-actions.pod:4435 ../src/guestfs-actions.pod:7280
6493 #: ../src/guestfs-actions.pod:7449 ../fish/guestfish-actions.pod:31
6494 #: ../fish/guestfish-actions.pod:166 ../fish/guestfish-actions.pod:180
6495 #: ../fish/guestfish-actions.pod:961 ../fish/guestfish-actions.pod:1324
6496 #: ../fish/guestfish-actions.pod:1338 ../fish/guestfish-actions.pod:3013
6497 #: ../fish/guestfish-actions.pod:4871 ../fish/guestfish-actions.pod:4968
6499 "Deprecated functions will not be removed from the API, but the fact that "
6500 "they are deprecated indicates that there are problems with correct use of "
6506 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:142
6507 #: ../src/guestfs-actions.pod:1106 ../src/guestfs-actions.pod:1922
6508 #: ../src/guestfs-actions.pod:2020 ../src/guestfs-actions.pod:2123
6509 #: ../src/guestfs-actions.pod:3467 ../src/guestfs-actions.pod:3487
6510 #: ../src/guestfs-actions.pod:4739 ../src/guestfs-actions.pod:5853
6511 #: ../src/guestfs-actions.pod:5970 ../src/guestfs-actions.pod:6084
6512 #: ../src/guestfs-actions.pod:6547 ../src/guestfs-actions.pod:6672
6513 #: ../src/guestfs-actions.pod:7194
6514 msgid "(Added in 0.3)"
6519 #: ../src/guestfs-actions.pod:41
6520 msgid "guestfs_add_domain"
6525 #: ../src/guestfs-actions.pod:43
6529 " guestfs_add_domain (guestfs_h *g,\n"
6530 " const char *dom,\n"
6537 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:151
6538 #: ../src/guestfs-actions.pod:4449
6540 "You may supply a list of optional arguments to this call. Use zero or more "
6541 "of the following pairs of parameters, and terminate the list with C<-1> on "
6542 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
6546 #: ../src/guestfs-actions.pod:53
6549 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
6550 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
6551 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
6552 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
6553 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
6559 #: ../src/guestfs-actions.pod:59
6561 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
6562 "It works by connecting to libvirt, requesting the domain and domain XML from "
6563 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
6569 #: ../src/guestfs-actions.pod:64 ../fish/guestfish-actions.pod:46
6571 "The number of disks added is returned. This operation is atomic: if an "
6572 "error is returned, then no disks are added."
6577 #: ../src/guestfs-actions.pod:67 ../fish/guestfish-actions.pod:49
6579 "This function does some minimal checks to make sure the libvirt domain is "
6580 "not running (unless C<readonly> is true). In a future version we will try "
6581 "to acquire the libvirt lock on each disk."
6586 #: ../src/guestfs-actions.pod:71 ../fish/guestfish-actions.pod:53
6588 "Disks must be accessible locally. This often means that adding disks from a "
6589 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
6590 "unless those disks are accessible via the same device path locally too."
6594 #: ../src/guestfs-actions.pod:76 ../fish/guestfish-actions.pod:58
6596 "The optional C<libvirturi> parameter sets the libvirt URI (see L<http://"
6597 "libvirt.org/uri.html>). If this is not set then we connect to the default "
6598 "libvirt URI (or one set through an environment variable, see the libvirt "
6599 "documentation for full details)."
6603 #: ../src/guestfs-actions.pod:82 ../fish/guestfish-actions.pod:64
6605 "The optional C<live> flag controls whether this call will try to connect to "
6606 "a running virtual machine C<guestfsd> process if it sees a suitable "
6607 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
6608 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
6609 "DAEMONS> for more information."
6613 #: ../src/guestfs-actions.pod:89 ../fish/guestfish-actions.pod:71
6615 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
6616 "passed instead of the domain name. The C<dom> string is treated as a UUID "
6617 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
6623 #: ../src/guestfs-actions.pod:94
6625 "The other optional parameters are passed directly through to "
6626 "C<guestfs_add_drive_opts>."
6631 #: ../src/guestfs-actions.pod:97 ../src/guestfs-actions.pod:350
6632 #: ../src/guestfs-actions.pod:515 ../src/guestfs-actions.pod:693
6633 #: ../src/guestfs-actions.pod:724 ../src/guestfs-actions.pod:742
6634 #: ../src/guestfs-actions.pod:761 ../src/guestfs-actions.pod:1321
6635 #: ../src/guestfs-actions.pod:1680 ../src/guestfs-actions.pod:1883
6636 #: ../src/guestfs-actions.pod:1992 ../src/guestfs-actions.pod:2032
6637 #: ../src/guestfs-actions.pod:2087 ../src/guestfs-actions.pod:2110
6638 #: ../src/guestfs-actions.pod:2403 ../src/guestfs-actions.pod:2786
6639 #: ../src/guestfs-actions.pod:2807 ../src/guestfs-actions.pod:4875
6640 #: ../src/guestfs-actions.pod:5003 ../src/guestfs-actions.pod:5409
6641 #: ../src/guestfs-actions.pod:5435 ../src/guestfs-actions.pod:6780
6642 #: ../src/guestfs-actions.pod:7205 ../src/guestfs-actions.pod:7218
6643 #: ../src/guestfs-actions.pod:7231
6644 msgid "On error this function returns -1."
6649 #: ../src/guestfs-actions.pod:99
6650 msgid "(Added in 1.7.4)"
6655 #: ../src/guestfs-actions.pod:101
6656 msgid "guestfs_add_domain_va"
6661 #: ../src/guestfs-actions.pod:103
6665 " guestfs_add_domain_va (guestfs_h *g,\n"
6666 " const char *dom,\n"
6673 #: ../src/guestfs-actions.pod:108
6674 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
6679 #: ../src/guestfs-actions.pod:110 ../src/guestfs-actions.pod:121
6680 #: ../src/guestfs-actions.pod:214 ../src/guestfs-actions.pod:225
6681 #: ../src/guestfs-actions.pod:4502 ../src/guestfs-actions.pod:4514
6682 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
6687 #: ../src/guestfs-actions.pod:112
6688 msgid "guestfs_add_domain_argv"
6693 #: ../src/guestfs-actions.pod:114
6697 " guestfs_add_domain_argv (guestfs_h *g,\n"
6698 " const char *dom,\n"
6699 " const struct guestfs_add_domain_argv *optargs);\n"
6705 #: ../src/guestfs-actions.pod:119
6706 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
6711 #: ../src/guestfs-actions.pod:123
6712 msgid "guestfs_add_drive"
6717 #: ../src/guestfs-actions.pod:125
6721 " guestfs_add_drive (guestfs_h *g,\n"
6722 " const char *filename);\n"
6728 #: ../src/guestfs-actions.pod:129
6730 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
6731 "optional parameters, so the disk is added writable, with the format being "
6732 "detected automatically."
6737 #: ../src/guestfs-actions.pod:133
6739 "Automatic detection of the format opens you up to a potential security hole "
6740 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6741 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
6742 "you should think about replacing calls to this function with calls to "
6743 "C<guestfs_add_drive_opts>, and specifying the format."
6748 #: ../src/guestfs-actions.pod:144
6749 msgid "guestfs_add_drive_opts"
6754 #: ../src/guestfs-actions.pod:146
6758 " guestfs_add_drive_opts (guestfs_h *g,\n"
6759 " const char *filename,\n"
6766 #: ../src/guestfs-actions.pod:156
6769 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
6770 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
6771 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
6777 #: ../src/guestfs-actions.pod:160 ../fish/guestfish-actions.pod:102
6779 "This function adds a virtual machine disk image C<filename> to libguestfs. "
6780 "The first time you call this function, the disk appears as C</dev/sda>, the "
6781 "second time as C</dev/sdb>, and so on."
6786 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:107
6788 "You don't necessarily need to be root when using libguestfs. However you "
6789 "obviously do need sufficient permissions to access the filename for whatever "
6790 "operations you want to perform (ie. read access if you just want to read the "
6791 "image or write access if you want to modify the image)."
6796 #: ../src/guestfs-actions.pod:171 ../fish/guestfish-actions.pod:113
6797 msgid "This call checks that C<filename> exists."
6802 #: ../src/guestfs-actions.pod:173 ../src/guestfs-actions.pod:4460
6803 #: ../fish/guestfish-actions.pod:115 ../fish/guestfish-actions.pod:3024
6804 msgid "The optional arguments are:"
6809 #: ../src/guestfs-actions.pod:177 ../fish/guestfish-actions.pod:119
6815 #: ../src/guestfs-actions.pod:179 ../fish/guestfish-actions.pod:121
6817 "If true then the image is treated as read-only. Writes are still allowed, "
6818 "but they are stored in a temporary snapshot overlay which is discarded at "
6819 "the end. The disk that you add is not modified."
6824 #: ../src/guestfs-actions.pod:183 ../fish/guestfish-actions.pod:125
6830 #: ../src/guestfs-actions.pod:185
6832 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
6833 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
6834 "Possible formats include C<raw> and C<qcow2>."
6839 #: ../src/guestfs-actions.pod:189 ../fish/guestfish-actions.pod:131
6841 "Automatic detection of the format opens you up to a potential security hole "
6842 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6843 "RHBZ#642934. Specifying the format closes this security hole."
6848 #: ../src/guestfs-actions.pod:194 ../fish/guestfish-actions.pod:136
6854 #: ../src/guestfs-actions.pod:196
6856 "This rarely-used option lets you emulate the behaviour of the deprecated "
6857 "C<guestfs_add_drive_with_if> call (q.v.)"
6862 #: ../src/guestfs-actions.pod:203
6863 msgid "(Added in 1.5.23)"
6868 #: ../src/guestfs-actions.pod:205
6869 msgid "guestfs_add_drive_opts_va"
6874 #: ../src/guestfs-actions.pod:207
6878 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
6879 " const char *filename,\n"
6886 #: ../src/guestfs-actions.pod:212
6887 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
6892 #: ../src/guestfs-actions.pod:216
6893 msgid "guestfs_add_drive_opts_argv"
6898 #: ../src/guestfs-actions.pod:218
6902 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
6903 " const char *filename,\n"
6904 " const struct guestfs_add_drive_opts_argv *optargs);\n"
6910 #: ../src/guestfs-actions.pod:223
6911 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
6916 #: ../src/guestfs-actions.pod:227
6917 msgid "guestfs_add_drive_ro"
6922 #: ../src/guestfs-actions.pod:229
6926 " guestfs_add_drive_ro (guestfs_h *g,\n"
6927 " const char *filename);\n"
6933 #: ../src/guestfs-actions.pod:233
6935 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
6936 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
6937 "disk is added read-only, with the format being detected automatically."
6942 #: ../src/guestfs-actions.pod:240
6943 msgid "(Added in 1.0.38)"
6948 #: ../src/guestfs-actions.pod:242
6949 msgid "guestfs_add_drive_ro_with_if"
6954 #: ../src/guestfs-actions.pod:244
6958 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
6959 " const char *filename,\n"
6960 " const char *iface);\n"
6966 #: ../src/guestfs-actions.pod:249
6968 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
6969 "QEMU interface emulation to use at run time."
6974 #: ../src/guestfs-actions.pod:261 ../src/guestfs-actions.pod:282
6975 #: ../src/guestfs-actions.pod:2362
6976 msgid "(Added in 1.0.84)"
6981 #: ../src/guestfs-actions.pod:263
6982 msgid "guestfs_add_drive_with_if"
6987 #: ../src/guestfs-actions.pod:265
6991 " guestfs_add_drive_with_if (guestfs_h *g,\n"
6992 " const char *filename,\n"
6993 " const char *iface);\n"
6999 #: ../src/guestfs-actions.pod:270
7001 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
7002 "QEMU interface emulation to use at run time."
7007 #: ../src/guestfs-actions.pod:284
7008 msgid "guestfs_aug_clear"
7013 #: ../src/guestfs-actions.pod:286
7017 " guestfs_aug_clear (guestfs_h *g,\n"
7018 " const char *augpath);\n"
7024 #: ../src/guestfs-actions.pod:290 ../fish/guestfish-actions.pod:188
7026 "Set the value associated with C<path> to C<NULL>. This is the same as the "
7027 "L<augtool(1)> C<clear> command."
7032 #: ../src/guestfs-actions.pod:295 ../src/guestfs-actions.pod:2112
7033 msgid "(Added in 1.3.4)"
7038 #: ../src/guestfs-actions.pod:297
7039 msgid "guestfs_aug_close"
7044 #: ../src/guestfs-actions.pod:299
7048 " guestfs_aug_close (guestfs_h *g);\n"
7054 #: ../src/guestfs-actions.pod:302
7056 "Close the current Augeas handle and free up any resources used by it. After "
7057 "calling this, you have to call C<guestfs_aug_init> again before you can use "
7058 "any other Augeas functions."
7063 #: ../src/guestfs-actions.pod:309 ../src/guestfs-actions.pod:334
7064 #: ../src/guestfs-actions.pod:352 ../src/guestfs-actions.pod:366
7065 #: ../src/guestfs-actions.pod:424 ../src/guestfs-actions.pod:444
7066 #: ../src/guestfs-actions.pod:458 ../src/guestfs-actions.pod:489
7067 #: ../src/guestfs-actions.pod:503 ../src/guestfs-actions.pod:517
7068 #: ../src/guestfs-actions.pod:531 ../src/guestfs-actions.pod:549
7069 #: ../src/guestfs-actions.pod:5486
7070 msgid "(Added in 0.7)"
7075 #: ../src/guestfs-actions.pod:311
7076 msgid "guestfs_aug_defnode"
7081 #: ../src/guestfs-actions.pod:313
7084 " struct guestfs_int_bool *\n"
7085 " guestfs_aug_defnode (guestfs_h *g,\n"
7086 " const char *name,\n"
7087 " const char *expr,\n"
7088 " const char *val);\n"
7094 #: ../src/guestfs-actions.pod:319 ../fish/guestfish-actions.pod:204
7096 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
7101 #: ../src/guestfs-actions.pod:322
7103 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
7104 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
7105 "containing that single node."
7110 #: ../src/guestfs-actions.pod:326 ../fish/guestfish-actions.pod:211
7112 "On success this returns a pair containing the number of nodes in the "
7113 "nodeset, and a boolean flag if a node was created."
7118 #: ../src/guestfs-actions.pod:330
7120 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
7121 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
7126 #: ../src/guestfs-actions.pod:336
7127 msgid "guestfs_aug_defvar"
7132 #: ../src/guestfs-actions.pod:338
7136 " guestfs_aug_defvar (guestfs_h *g,\n"
7137 " const char *name,\n"
7138 " const char *expr);\n"
7144 #: ../src/guestfs-actions.pod:343 ../fish/guestfish-actions.pod:219
7146 "Defines an Augeas variable C<name> whose value is the result of evaluating "
7147 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
7152 #: ../src/guestfs-actions.pod:347 ../fish/guestfish-actions.pod:223
7154 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
7155 "evaluates to something which is not a nodeset."
7160 #: ../src/guestfs-actions.pod:354
7161 msgid "guestfs_aug_get"
7166 #: ../src/guestfs-actions.pod:356
7170 " guestfs_aug_get (guestfs_h *g,\n"
7171 " const char *augpath);\n"
7177 #: ../src/guestfs-actions.pod:360 ../fish/guestfish-actions.pod:230
7179 "Look up the value associated with C<path>. If C<path> matches exactly one "
7180 "node, the C<value> is returned."
7185 #: ../src/guestfs-actions.pod:363 ../src/guestfs-actions.pod:863
7186 #: ../src/guestfs-actions.pod:881 ../src/guestfs-actions.pod:941
7187 #: ../src/guestfs-actions.pod:957 ../src/guestfs-actions.pod:1060
7188 #: ../src/guestfs-actions.pod:1190 ../src/guestfs-actions.pod:1207
7189 #: ../src/guestfs-actions.pod:1226 ../src/guestfs-actions.pod:1360
7190 #: ../src/guestfs-actions.pod:1551 ../src/guestfs-actions.pod:1663
7191 #: ../src/guestfs-actions.pod:1826 ../src/guestfs-actions.pod:1843
7192 #: ../src/guestfs-actions.pod:1910 ../src/guestfs-actions.pod:1944
7193 #: ../src/guestfs-actions.pod:1965 ../src/guestfs-actions.pod:2135
7194 #: ../src/guestfs-actions.pod:2327 ../src/guestfs-actions.pod:2534
7195 #: ../src/guestfs-actions.pod:2627 ../src/guestfs-actions.pod:2738
7196 #: ../src/guestfs-actions.pod:2758 ../src/guestfs-actions.pod:2878
7197 #: ../src/guestfs-actions.pod:2909 ../src/guestfs-actions.pod:2933
7198 #: ../src/guestfs-actions.pod:2970 ../src/guestfs-actions.pod:3030
7199 #: ../src/guestfs-actions.pod:3053 ../src/guestfs-actions.pod:3074
7200 #: ../src/guestfs-actions.pod:3646 ../src/guestfs-actions.pod:3996
7201 #: ../src/guestfs-actions.pod:4166 ../src/guestfs-actions.pod:4276
7202 #: ../src/guestfs-actions.pod:5021 ../src/guestfs-actions.pod:5214
7203 #: ../src/guestfs-actions.pod:5384 ../src/guestfs-actions.pod:5562
7204 #: ../src/guestfs-actions.pod:5611 ../src/guestfs-actions.pod:6223
7205 #: ../src/guestfs-actions.pod:6239 ../src/guestfs-actions.pod:6256
7206 #: ../src/guestfs-actions.pod:6280 ../src/guestfs-actions.pod:6954
7207 #: ../src/guestfs-actions.pod:6973 ../src/guestfs-actions.pod:6991
7208 #: ../src/guestfs-actions.pod:7171 ../src/guestfs-actions.pod:7443
7210 "This function returns a string, or NULL on error. I<The caller must free "
7211 "the returned string after use>."
7216 #: ../src/guestfs-actions.pod:368
7217 msgid "guestfs_aug_init"
7222 #: ../src/guestfs-actions.pod:370
7226 " guestfs_aug_init (guestfs_h *g,\n"
7227 " const char *root,\n"
7234 #: ../src/guestfs-actions.pod:375 ../fish/guestfish-actions.pod:237
7236 "Create a new Augeas handle for editing configuration files. If there was "
7237 "any previous Augeas handle associated with this guestfs session, then it is "
7243 #: ../src/guestfs-actions.pod:379
7244 msgid "You must call this before using any other C<guestfs_aug_*> commands."
7249 #: ../src/guestfs-actions.pod:382 ../fish/guestfish-actions.pod:244
7251 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
7256 #: ../src/guestfs-actions.pod:385 ../fish/guestfish-actions.pod:247
7258 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
7259 "logical I<or> of the following integers:"
7264 #: ../src/guestfs-actions.pod:391 ../fish/guestfish-actions.pod:253
7265 msgid "C<AUG_SAVE_BACKUP> = 1"
7270 #: ../src/guestfs-actions.pod:393 ../fish/guestfish-actions.pod:255
7271 msgid "Keep the original file with a C<.augsave> extension."
7276 #: ../src/guestfs-actions.pod:395 ../fish/guestfish-actions.pod:257
7277 msgid "C<AUG_SAVE_NEWFILE> = 2"
7282 #: ../src/guestfs-actions.pod:397 ../fish/guestfish-actions.pod:259
7284 "Save changes into a file with extension C<.augnew>, and do not overwrite "
7285 "original. Overrides C<AUG_SAVE_BACKUP>."
7290 #: ../src/guestfs-actions.pod:400 ../fish/guestfish-actions.pod:262
7291 msgid "C<AUG_TYPE_CHECK> = 4"
7296 #: ../src/guestfs-actions.pod:402 ../fish/guestfish-actions.pod:264
7297 msgid "Typecheck lenses (can be expensive)."
7302 #: ../src/guestfs-actions.pod:404 ../fish/guestfish-actions.pod:266
7303 msgid "C<AUG_NO_STDINC> = 8"
7308 #: ../src/guestfs-actions.pod:406 ../fish/guestfish-actions.pod:268
7309 msgid "Do not use standard load path for modules."
7314 #: ../src/guestfs-actions.pod:408 ../fish/guestfish-actions.pod:270
7315 msgid "C<AUG_SAVE_NOOP> = 16"
7320 #: ../src/guestfs-actions.pod:410 ../fish/guestfish-actions.pod:272
7321 msgid "Make save a no-op, just record what would have been changed."
7326 #: ../src/guestfs-actions.pod:412 ../fish/guestfish-actions.pod:274
7327 msgid "C<AUG_NO_LOAD> = 32"
7332 #: ../src/guestfs-actions.pod:414
7333 msgid "Do not load the tree in C<guestfs_aug_init>."
7338 #: ../src/guestfs-actions.pod:418
7339 msgid "To close the handle, you can call C<guestfs_aug_close>."
7344 #: ../src/guestfs-actions.pod:420 ../fish/guestfish-actions.pod:282
7345 msgid "To find out more about Augeas, see L<http://augeas.net/>."
7350 #: ../src/guestfs-actions.pod:426
7351 msgid "guestfs_aug_insert"
7356 #: ../src/guestfs-actions.pod:428
7360 " guestfs_aug_insert (guestfs_h *g,\n"
7361 " const char *augpath,\n"
7362 " const char *label,\n"
7369 #: ../src/guestfs-actions.pod:434 ../fish/guestfish-actions.pod:288
7371 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
7372 "or after C<path> (depending on the boolean flag C<before>)."
7377 #: ../src/guestfs-actions.pod:438 ../fish/guestfish-actions.pod:292
7379 "C<path> must match exactly one existing node in the tree, and C<label> must "
7380 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
7385 #: ../src/guestfs-actions.pod:446
7386 msgid "guestfs_aug_load"
7391 #: ../src/guestfs-actions.pod:448
7395 " guestfs_aug_load (guestfs_h *g);\n"
7401 #: ../src/guestfs-actions.pod:451 ../fish/guestfish-actions.pod:300
7402 msgid "Load files into the tree."
7407 #: ../src/guestfs-actions.pod:453 ../fish/guestfish-actions.pod:302
7408 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
7413 #: ../src/guestfs-actions.pod:460
7414 msgid "guestfs_aug_ls"
7419 #: ../src/guestfs-actions.pod:462
7423 " guestfs_aug_ls (guestfs_h *g,\n"
7424 " const char *augpath);\n"
7430 #: ../src/guestfs-actions.pod:466
7432 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
7433 "sorting the resulting nodes into alphabetical order."
7438 #: ../src/guestfs-actions.pod:469 ../src/guestfs-actions.pod:485
7439 #: ../src/guestfs-actions.pod:631 ../src/guestfs-actions.pod:1079
7440 #: ../src/guestfs-actions.pod:1375 ../src/guestfs-actions.pod:1394
7441 #: ../src/guestfs-actions.pod:1497 ../src/guestfs-actions.pod:1516
7442 #: ../src/guestfs-actions.pod:1765 ../src/guestfs-actions.pod:2207
7443 #: ../src/guestfs-actions.pod:2223 ../src/guestfs-actions.pod:2242
7444 #: ../src/guestfs-actions.pod:2285 ../src/guestfs-actions.pod:2309
7445 #: ../src/guestfs-actions.pod:2380 ../src/guestfs-actions.pod:2429
7446 #: ../src/guestfs-actions.pod:2696 ../src/guestfs-actions.pod:2987
7447 #: ../src/guestfs-actions.pod:3276 ../src/guestfs-actions.pod:3566
7448 #: ../src/guestfs-actions.pod:3628 ../src/guestfs-actions.pod:3733
7449 #: ../src/guestfs-actions.pod:4138 ../src/guestfs-actions.pod:4836
7450 #: ../src/guestfs-actions.pod:5356 ../src/guestfs-actions.pod:5482
7451 #: ../src/guestfs-actions.pod:5596 ../src/guestfs-actions.pod:6296
7452 #: ../src/guestfs-actions.pod:6357 ../src/guestfs-actions.pod:6412
7453 #: ../src/guestfs-actions.pod:6558 ../src/guestfs-actions.pod:6582
7454 #: ../src/guestfs-actions.pod:7064 ../src/guestfs-actions.pod:7084
7455 #: ../src/guestfs-actions.pod:7131 ../src/guestfs-actions.pod:7296
7456 #: ../src/guestfs-actions.pod:7315 ../src/guestfs-actions.pod:7400
7457 #: ../src/guestfs-actions.pod:7419 ../src/guestfs-actions.pod:7465
7458 #: ../src/guestfs-actions.pod:7484
7460 "This function returns a NULL-terminated array of strings (like L<environ(3)"
7461 ">), or NULL if there was an error. I<The caller must free the strings and "
7462 "the array after use>."
7467 #: ../src/guestfs-actions.pod:473 ../src/guestfs-actions.pod:1004
7468 #: ../src/guestfs-actions.pod:1022 ../src/guestfs-actions.pod:1432
7469 #: ../src/guestfs-actions.pod:3354 ../src/guestfs-actions.pod:3385
7470 #: ../src/guestfs-actions.pod:3979 ../src/guestfs-actions.pod:4029
7471 #: ../src/guestfs-actions.pod:4216 ../src/guestfs-actions.pod:4249
7472 #: ../src/guestfs-actions.pod:4412 ../src/guestfs-actions.pod:4840
7473 #: ../src/guestfs-actions.pod:5297 ../src/guestfs-actions.pod:5692
7474 #: ../src/guestfs-actions.pod:5706 ../src/guestfs-actions.pod:5718
7475 #: ../src/guestfs-actions.pod:6158 ../src/guestfs-actions.pod:6796
7476 #: ../src/guestfs-actions.pod:6809 ../src/guestfs-actions.pod:7048
7477 #: ../src/guestfs-actions.pod:7284
7478 msgid "(Added in 0.8)"
7483 #: ../src/guestfs-actions.pod:475
7484 msgid "guestfs_aug_match"
7489 #: ../src/guestfs-actions.pod:477
7493 " guestfs_aug_match (guestfs_h *g,\n"
7494 " const char *augpath);\n"
7500 #: ../src/guestfs-actions.pod:481 ../fish/guestfish-actions.pod:316
7502 "Returns a list of paths which match the path expression C<path>. The "
7503 "returned paths are sufficiently qualified so that they match exactly one "
7504 "node in the current tree."
7509 #: ../src/guestfs-actions.pod:491
7510 msgid "guestfs_aug_mv"
7515 #: ../src/guestfs-actions.pod:493
7519 " guestfs_aug_mv (guestfs_h *g,\n"
7520 " const char *src,\n"
7521 " const char *dest);\n"
7527 #: ../src/guestfs-actions.pod:498 ../fish/guestfish-actions.pod:324
7529 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
7530 "C<dest> is overwritten if it exists."
7535 #: ../src/guestfs-actions.pod:505
7536 msgid "guestfs_aug_rm"
7541 #: ../src/guestfs-actions.pod:507
7545 " guestfs_aug_rm (guestfs_h *g,\n"
7546 " const char *augpath);\n"
7552 #: ../src/guestfs-actions.pod:511 ../fish/guestfish-actions.pod:331
7553 msgid "Remove C<path> and all of its children."
7558 #: ../src/guestfs-actions.pod:513 ../fish/guestfish-actions.pod:333
7559 msgid "On success this returns the number of entries which were removed."
7564 #: ../src/guestfs-actions.pod:519
7565 msgid "guestfs_aug_save"
7570 #: ../src/guestfs-actions.pod:521
7574 " guestfs_aug_save (guestfs_h *g);\n"
7580 #: ../src/guestfs-actions.pod:524 ../fish/guestfish-actions.pod:339
7581 msgid "This writes all pending changes to disk."
7586 #: ../src/guestfs-actions.pod:526
7588 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
7594 #: ../src/guestfs-actions.pod:533
7595 msgid "guestfs_aug_set"
7600 #: ../src/guestfs-actions.pod:535
7604 " guestfs_aug_set (guestfs_h *g,\n"
7605 " const char *augpath,\n"
7606 " const char *val);\n"
7612 #: ../src/guestfs-actions.pod:540 ../fish/guestfish-actions.pod:348
7613 msgid "Set the value associated with C<path> to C<val>."
7618 #: ../src/guestfs-actions.pod:542
7620 "In the Augeas API, it is possible to clear a node by setting the value to "
7621 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
7622 "this call. Instead you must use the C<guestfs_aug_clear> call."
7627 #: ../src/guestfs-actions.pod:551
7628 msgid "guestfs_available"
7633 #: ../src/guestfs-actions.pod:553
7637 " guestfs_available (guestfs_h *g,\n"
7638 " char *const *groups);\n"
7644 #: ../src/guestfs-actions.pod:557 ../fish/guestfish-actions.pod:359
7646 "This command is used to check the availability of some groups of "
7647 "functionality in the appliance, which not all builds of the libguestfs "
7648 "appliance will be able to provide."
7653 #: ../src/guestfs-actions.pod:561
7655 "The libguestfs groups, and the functions that those groups correspond to, "
7656 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
7657 "runtime by calling C<guestfs_available_all_groups>."
7662 #: ../src/guestfs-actions.pod:566 ../fish/guestfish-actions.pod:368
7664 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
7665 "\"]> would check for the availability of the Linux inotify functions and "
7666 "Augeas (configuration file editing) functions."
7671 #: ../src/guestfs-actions.pod:571 ../fish/guestfish-actions.pod:373
7672 msgid "The command returns no error if I<all> requested groups are available."
7677 #: ../src/guestfs-actions.pod:573 ../fish/guestfish-actions.pod:375
7679 "It fails with an error if one or more of the requested groups is unavailable "
7685 #: ../src/guestfs-actions.pod:576 ../fish/guestfish-actions.pod:378
7687 "If an unknown group name is included in the list of groups then an error is "
7693 #: ../src/guestfs-actions.pod:579 ../fish/guestfish-actions.pod:381
7699 #: ../src/guestfs-actions.pod:585
7700 msgid "You must call C<guestfs_launch> before calling this function."
7705 #: ../src/guestfs-actions.pod:587 ../fish/guestfish-actions.pod:389
7707 "The reason is because we don't know what groups are supported by the "
7708 "appliance/daemon until it is running and can be queried."
7713 #: ../src/guestfs-actions.pod:593 ../fish/guestfish-actions.pod:395
7715 "If a group of functions is available, this does not necessarily mean that "
7716 "they will work. You still have to check for errors when calling individual "
7717 "API functions even if they are available."
7722 #: ../src/guestfs-actions.pod:600 ../fish/guestfish-actions.pod:402
7724 "It is usually the job of distro packagers to build complete functionality "
7725 "into the libguestfs appliance. Upstream libguestfs, if built from source "
7726 "with all requirements satisfied, will support everything."
7731 #: ../src/guestfs-actions.pod:607
7733 "This call was added in version C<1.0.80>. In previous versions of "
7734 "libguestfs all you could do would be to speculatively execute a command to "
7735 "find out if the daemon implemented it. See also C<guestfs_version>."
7740 #: ../src/guestfs-actions.pod:616 ../src/guestfs-actions.pod:1177
7741 msgid "(Added in 1.0.80)"
7746 #: ../src/guestfs-actions.pod:618
7747 msgid "guestfs_available_all_groups"
7752 #: ../src/guestfs-actions.pod:620
7756 " guestfs_available_all_groups (guestfs_h *g);\n"
7762 #: ../src/guestfs-actions.pod:623
7764 "This command returns a list of all optional groups that this daemon knows "
7765 "about. Note this returns both supported and unsupported groups. To find "
7766 "out which ones the daemon can actually support you have to call "
7767 "C<guestfs_available> on each member of the returned list."
7772 #: ../src/guestfs-actions.pod:629
7773 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
7778 #: ../src/guestfs-actions.pod:635
7779 msgid "(Added in 1.3.15)"
7784 #: ../src/guestfs-actions.pod:637
7785 msgid "guestfs_base64_in"
7790 #: ../src/guestfs-actions.pod:639
7794 " guestfs_base64_in (guestfs_h *g,\n"
7795 " const char *base64file,\n"
7796 " const char *filename);\n"
7802 #: ../src/guestfs-actions.pod:644 ../fish/guestfish-actions.pod:432
7804 "This command uploads base64-encoded data from C<base64file> to C<filename>."
7809 #: ../src/guestfs-actions.pod:649 ../src/guestfs-actions.pod:663
7810 msgid "(Added in 1.3.5)"
7815 #: ../src/guestfs-actions.pod:651
7816 msgid "guestfs_base64_out"
7821 #: ../src/guestfs-actions.pod:653
7825 " guestfs_base64_out (guestfs_h *g,\n"
7826 " const char *filename,\n"
7827 " const char *base64file);\n"
7833 #: ../src/guestfs-actions.pod:658 ../fish/guestfish-actions.pod:441
7835 "This command downloads the contents of C<filename>, writing it out to local "
7836 "file C<base64file> encoded as base64."
7841 #: ../src/guestfs-actions.pod:665
7842 msgid "guestfs_blockdev_flushbufs"
7847 #: ../src/guestfs-actions.pod:667
7851 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
7852 " const char *device);\n"
7858 #: ../src/guestfs-actions.pod:671 ../fish/guestfish-actions.pod:450
7860 "This tells the kernel to flush internal buffers associated with C<device>."
7865 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:691
7866 #: ../src/guestfs-actions.pod:706 ../src/guestfs-actions.pod:722
7867 #: ../src/guestfs-actions.pod:740 ../src/guestfs-actions.pod:759
7868 #: ../src/guestfs-actions.pod:773 ../src/guestfs-actions.pod:791
7869 #: ../src/guestfs-actions.pod:805 ../src/guestfs-actions.pod:819
7870 #: ../fish/guestfish-actions.pod:453 ../fish/guestfish-actions.pod:464
7871 #: ../fish/guestfish-actions.pod:473 ../fish/guestfish-actions.pod:483
7872 #: ../fish/guestfish-actions.pod:495 ../fish/guestfish-actions.pod:508
7873 #: ../fish/guestfish-actions.pod:516 ../fish/guestfish-actions.pod:527
7874 #: ../fish/guestfish-actions.pod:535 ../fish/guestfish-actions.pod:543
7875 msgid "This uses the L<blockdev(8)> command."
7880 #: ../src/guestfs-actions.pod:678 ../src/guestfs-actions.pod:695
7881 #: ../src/guestfs-actions.pod:710 ../src/guestfs-actions.pod:726
7882 #: ../src/guestfs-actions.pod:744 ../src/guestfs-actions.pod:763
7883 #: ../src/guestfs-actions.pod:777 ../src/guestfs-actions.pod:795
7884 #: ../src/guestfs-actions.pod:809 ../src/guestfs-actions.pod:823
7885 msgid "(Added in 0.9.3)"
7890 #: ../src/guestfs-actions.pod:680
7891 msgid "guestfs_blockdev_getbsz"
7896 #: ../src/guestfs-actions.pod:682
7900 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
7901 " const char *device);\n"
7907 #: ../src/guestfs-actions.pod:686 ../fish/guestfish-actions.pod:459
7908 msgid "This returns the block size of a device."
7913 #: ../src/guestfs-actions.pod:688 ../src/guestfs-actions.pod:788
7914 #: ../fish/guestfish-actions.pod:461 ../fish/guestfish-actions.pod:524
7916 "(Note this is different from both I<size in blocks> and I<filesystem block "
7922 #: ../src/guestfs-actions.pod:697
7923 msgid "guestfs_blockdev_getro"
7928 #: ../src/guestfs-actions.pod:699
7932 " guestfs_blockdev_getro (guestfs_h *g,\n"
7933 " const char *device);\n"
7939 #: ../src/guestfs-actions.pod:703 ../fish/guestfish-actions.pod:470
7941 "Returns a boolean indicating if the block device is read-only (true if read-"
7942 "only, false if not)."
7947 #: ../src/guestfs-actions.pod:708 ../src/guestfs-actions.pod:1415
7948 #: ../src/guestfs-actions.pod:1430 ../src/guestfs-actions.pod:1920
7949 #: ../src/guestfs-actions.pod:1931 ../src/guestfs-actions.pod:2003
7950 #: ../src/guestfs-actions.pod:2058 ../src/guestfs-actions.pod:2073
7951 #: ../src/guestfs-actions.pod:2098 ../src/guestfs-actions.pod:2121
7952 #: ../src/guestfs-actions.pod:3094 ../src/guestfs-actions.pod:3111
7953 #: ../src/guestfs-actions.pod:3130 ../src/guestfs-actions.pod:3293
7954 #: ../src/guestfs-actions.pod:3307 ../src/guestfs-actions.pod:3322
7955 #: ../src/guestfs-actions.pod:3336 ../src/guestfs-actions.pod:3352
7956 #: ../src/guestfs-actions.pod:3367 ../src/guestfs-actions.pod:3383
7957 #: ../src/guestfs-actions.pod:3397 ../src/guestfs-actions.pod:3410
7958 #: ../src/guestfs-actions.pod:3424 ../src/guestfs-actions.pod:3439
7959 #: ../src/guestfs-actions.pod:3454 ../src/guestfs-actions.pod:4985
7960 msgid "This function returns a C truth value on success or -1 on error."
7965 #: ../src/guestfs-actions.pod:712
7966 msgid "guestfs_blockdev_getsize64"
7971 #: ../src/guestfs-actions.pod:714
7975 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
7976 " const char *device);\n"
7982 #: ../src/guestfs-actions.pod:718 ../fish/guestfish-actions.pod:479
7983 msgid "This returns the size of the device in bytes."
7988 #: ../src/guestfs-actions.pod:720
7989 msgid "See also C<guestfs_blockdev_getsz>."
7994 #: ../src/guestfs-actions.pod:728
7995 msgid "guestfs_blockdev_getss"
8000 #: ../src/guestfs-actions.pod:730
8004 " guestfs_blockdev_getss (guestfs_h *g,\n"
8005 " const char *device);\n"
8011 #: ../src/guestfs-actions.pod:734 ../fish/guestfish-actions.pod:489
8013 "This returns the size of sectors on a block device. Usually 512, but can be "
8014 "larger for modern devices."
8019 #: ../src/guestfs-actions.pod:737
8021 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
8027 #: ../src/guestfs-actions.pod:746
8028 msgid "guestfs_blockdev_getsz"
8033 #: ../src/guestfs-actions.pod:748
8037 " guestfs_blockdev_getsz (guestfs_h *g,\n"
8038 " const char *device);\n"
8044 #: ../src/guestfs-actions.pod:752 ../fish/guestfish-actions.pod:501
8046 "This returns the size of the device in units of 512-byte sectors (even if "
8047 "the sectorsize isn't 512 bytes ... weird)."
8052 #: ../src/guestfs-actions.pod:755
8054 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
8055 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
8060 #: ../src/guestfs-actions.pod:765
8061 msgid "guestfs_blockdev_rereadpt"
8066 #: ../src/guestfs-actions.pod:767
8070 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
8071 " const char *device);\n"
8077 #: ../src/guestfs-actions.pod:771 ../fish/guestfish-actions.pod:514
8078 msgid "Reread the partition table on C<device>."
8083 #: ../src/guestfs-actions.pod:779
8084 msgid "guestfs_blockdev_setbsz"
8089 #: ../src/guestfs-actions.pod:781
8093 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
8094 " const char *device,\n"
8095 " int blocksize);\n"
8101 #: ../src/guestfs-actions.pod:786 ../fish/guestfish-actions.pod:522
8102 msgid "This sets the block size of a device."
8107 #: ../src/guestfs-actions.pod:797
8108 msgid "guestfs_blockdev_setro"
8113 #: ../src/guestfs-actions.pod:799
8117 " guestfs_blockdev_setro (guestfs_h *g,\n"
8118 " const char *device);\n"
8124 #: ../src/guestfs-actions.pod:803 ../fish/guestfish-actions.pod:533
8125 msgid "Sets the block device named C<device> to read-only."
8130 #: ../src/guestfs-actions.pod:811
8131 msgid "guestfs_blockdev_setrw"
8136 #: ../src/guestfs-actions.pod:813
8140 " guestfs_blockdev_setrw (guestfs_h *g,\n"
8141 " const char *device);\n"
8147 #: ../src/guestfs-actions.pod:817 ../fish/guestfish-actions.pod:541
8148 msgid "Sets the block device named C<device> to read-write."
8153 #: ../src/guestfs-actions.pod:825
8154 msgid "guestfs_case_sensitive_path"
8159 #: ../src/guestfs-actions.pod:827
8163 " guestfs_case_sensitive_path (guestfs_h *g,\n"
8164 " const char *path);\n"
8170 #: ../src/guestfs-actions.pod:831 ../fish/guestfish-actions.pod:549
8172 "This can be used to resolve case insensitive paths on a filesystem which is "
8173 "case sensitive. The use case is to resolve paths which you have read from "
8174 "Windows configuration files or the Windows Registry, to the true path."
8179 #: ../src/guestfs-actions.pod:836 ../fish/guestfish-actions.pod:554
8181 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
8182 "(and probably others), which is that although the underlying filesystem is "
8183 "case-insensitive, the driver exports the filesystem to Linux as case-"
8189 #: ../src/guestfs-actions.pod:841 ../fish/guestfish-actions.pod:559
8191 "One consequence of this is that special directories such as C<c:\\windows> "
8192 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
8193 "precise details of how they were created. In Windows itself this would not "
8199 #: ../src/guestfs-actions.pod:847 ../fish/guestfish-actions.pod:565
8201 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
8207 #: ../src/guestfs-actions.pod:850 ../fish/guestfish-actions.pod:568
8209 "This function resolves the true case of each element in the path and returns "
8210 "the case-sensitive path."
8215 #: ../src/guestfs-actions.pod:853
8217 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
8218 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
8219 "how the directories were originally created under Windows)."
8224 #: ../src/guestfs-actions.pod:858 ../fish/guestfish-actions.pod:576
8225 msgid "I<Note>: This function does not handle drive names, backslashes etc."
8230 #: ../src/guestfs-actions.pod:861
8231 msgid "See also C<guestfs_realpath>."
8236 #: ../src/guestfs-actions.pod:866 ../src/guestfs-actions.pod:6976
8237 msgid "(Added in 1.0.75)"
8242 #: ../src/guestfs-actions.pod:868
8248 #: ../src/guestfs-actions.pod:870
8252 " guestfs_cat (guestfs_h *g,\n"
8253 " const char *path);\n"
8259 #: ../src/guestfs-actions.pod:874 ../src/guestfs-actions.pod:5472
8260 #: ../fish/guestfish-actions.pod:585 ../fish/guestfish-actions.pod:3672
8261 msgid "Return the contents of the file named C<path>."
8266 #: ../src/guestfs-actions.pod:876
8268 "Note that this function cannot correctly handle binary files (specifically, "
8269 "files containing C<\\0> character which is treated as end of string). For "
8270 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
8271 "functions which have a more complex interface."
8276 #: ../src/guestfs-actions.pod:884 ../src/guestfs-actions.pod:1063
8277 #: ../src/guestfs-actions.pod:1083 ../src/guestfs-actions.pod:1379
8278 #: ../src/guestfs-actions.pod:1398 ../src/guestfs-actions.pod:1501
8279 #: ../src/guestfs-actions.pod:1520 ../src/guestfs-actions.pod:1769
8280 #: ../src/guestfs-actions.pod:2227 ../src/guestfs-actions.pod:2246
8281 #: ../src/guestfs-actions.pod:2289 ../src/guestfs-actions.pod:2313
8282 #: ../src/guestfs-actions.pod:2330 ../src/guestfs-actions.pod:2359
8283 #: ../src/guestfs-actions.pod:5254 ../src/guestfs-actions.pod:5280
8284 #: ../src/guestfs-actions.pod:5411 ../src/guestfs-actions.pod:5437
8285 #: ../src/guestfs-actions.pod:5461 ../src/guestfs-actions.pod:6361
8286 #: ../src/guestfs-actions.pod:6416 ../src/guestfs-actions.pod:6562
8287 #: ../src/guestfs-actions.pod:6586 ../src/guestfs-actions.pod:7248
8288 #: ../src/guestfs-actions.pod:7274 ../src/guestfs-actions.pod:7300
8289 #: ../src/guestfs-actions.pod:7319 ../src/guestfs-actions.pod:7404
8290 #: ../src/guestfs-actions.pod:7423 ../src/guestfs-actions.pod:7469
8291 #: ../src/guestfs-actions.pod:7488 ../fish/guestfish-actions.pod:592
8292 #: ../fish/guestfish-actions.pod:727 ../fish/guestfish-actions.pod:739
8293 #: ../fish/guestfish-actions.pod:915 ../fish/guestfish-actions.pod:925
8294 #: ../fish/guestfish-actions.pod:992 ../fish/guestfish-actions.pod:1002
8295 #: ../fish/guestfish-actions.pod:1197 ../fish/guestfish-actions.pod:1498
8296 #: ../fish/guestfish-actions.pod:1508 ../fish/guestfish-actions.pod:1536
8297 #: ../fish/guestfish-actions.pod:1551 ../fish/guestfish-actions.pod:1561
8298 #: ../fish/guestfish-actions.pod:1580 ../fish/guestfish-actions.pod:3542
8299 #: ../fish/guestfish-actions.pod:3557 ../fish/guestfish-actions.pod:3633
8300 #: ../fish/guestfish-actions.pod:3650 ../fish/guestfish-actions.pod:3665
8301 #: ../fish/guestfish-actions.pod:4291 ../fish/guestfish-actions.pod:4337
8302 #: ../fish/guestfish-actions.pod:4422 ../fish/guestfish-actions.pod:4437
8303 #: ../fish/guestfish-actions.pod:4847 ../fish/guestfish-actions.pod:4865
8304 #: ../fish/guestfish-actions.pod:4882 ../fish/guestfish-actions.pod:4892
8305 #: ../fish/guestfish-actions.pod:4940 ../fish/guestfish-actions.pod:4950
8306 #: ../fish/guestfish-actions.pod:4979 ../fish/guestfish-actions.pod:4989
8308 "Because of the message protocol, there is a transfer limit of somewhere "
8309 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
8314 #: ../src/guestfs-actions.pod:887 ../src/guestfs-actions.pod:3570
8315 #: ../src/guestfs-actions.pod:3632 ../src/guestfs-actions.pod:3649
8316 #: ../src/guestfs-actions.pod:3737 ../src/guestfs-actions.pod:4142
8317 #: ../src/guestfs-actions.pod:4156 ../src/guestfs-actions.pod:5360
8318 #: ../src/guestfs-actions.pod:5374 ../src/guestfs-actions.pod:7135
8319 #: ../src/guestfs-actions.pod:7149
8320 msgid "(Added in 0.4)"
8325 #: ../src/guestfs-actions.pod:889
8326 msgid "guestfs_checksum"
8331 #: ../src/guestfs-actions.pod:891
8335 " guestfs_checksum (guestfs_h *g,\n"
8336 " const char *csumtype,\n"
8337 " const char *path);\n"
8343 #: ../src/guestfs-actions.pod:896 ../fish/guestfish-actions.pod:599
8345 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
8350 #: ../src/guestfs-actions.pod:899 ../fish/guestfish-actions.pod:602
8352 "The type of checksum to compute is given by the C<csumtype> parameter which "
8353 "must have one of the following values:"
8358 #: ../src/guestfs-actions.pod:904 ../fish/guestfish-actions.pod:607
8364 #: ../src/guestfs-actions.pod:906 ../fish/guestfish-actions.pod:609
8366 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
8372 #: ../src/guestfs-actions.pod:909 ../fish/guestfish-actions.pod:612
8378 #: ../src/guestfs-actions.pod:911 ../fish/guestfish-actions.pod:614
8379 msgid "Compute the MD5 hash (using the C<md5sum> program)."
8384 #: ../src/guestfs-actions.pod:913 ../fish/guestfish-actions.pod:616
8390 #: ../src/guestfs-actions.pod:915 ../fish/guestfish-actions.pod:618
8391 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
8396 #: ../src/guestfs-actions.pod:917 ../fish/guestfish-actions.pod:620
8402 #: ../src/guestfs-actions.pod:919 ../fish/guestfish-actions.pod:622
8403 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
8408 #: ../src/guestfs-actions.pod:921 ../fish/guestfish-actions.pod:624
8414 #: ../src/guestfs-actions.pod:923 ../fish/guestfish-actions.pod:626
8415 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
8420 #: ../src/guestfs-actions.pod:925 ../fish/guestfish-actions.pod:628
8426 #: ../src/guestfs-actions.pod:927 ../fish/guestfish-actions.pod:630
8427 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
8432 #: ../src/guestfs-actions.pod:929 ../fish/guestfish-actions.pod:632
8438 #: ../src/guestfs-actions.pod:931 ../fish/guestfish-actions.pod:634
8439 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
8444 #: ../src/guestfs-actions.pod:935 ../fish/guestfish-actions.pod:638
8445 msgid "The checksum is returned as a printable string."
8450 #: ../src/guestfs-actions.pod:937
8451 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
8456 #: ../src/guestfs-actions.pod:939
8457 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
8462 #: ../src/guestfs-actions.pod:944 ../src/guestfs-actions.pod:1252
8463 #: ../src/guestfs-actions.pod:2089 ../src/guestfs-actions.pod:3309
8464 #: ../src/guestfs-actions.pod:3338 ../src/guestfs-actions.pod:3399
8465 #: ../src/guestfs-actions.pod:3426 ../src/guestfs-actions.pod:6832
8466 msgid "(Added in 1.0.2)"
8471 #: ../src/guestfs-actions.pod:946
8472 msgid "guestfs_checksum_device"
8477 #: ../src/guestfs-actions.pod:948
8481 " guestfs_checksum_device (guestfs_h *g,\n"
8482 " const char *csumtype,\n"
8483 " const char *device);\n"
8489 #: ../src/guestfs-actions.pod:953
8491 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
8492 "device named C<device>. For the types of checksums supported see the "
8493 "C<guestfs_checksum> command."
8498 #: ../src/guestfs-actions.pod:960 ../src/guestfs-actions.pod:4891
8499 #: ../src/guestfs-actions.pod:4950 ../src/guestfs-actions.pod:4987
8500 #: ../src/guestfs-actions.pod:5005 ../src/guestfs-actions.pod:5181
8501 #: ../src/guestfs-actions.pod:6741 ../src/guestfs-actions.pod:6755
8502 #: ../src/guestfs-actions.pod:7161
8503 msgid "(Added in 1.3.2)"
8508 #: ../src/guestfs-actions.pod:962
8509 msgid "guestfs_checksums_out"
8514 #: ../src/guestfs-actions.pod:964
8518 " guestfs_checksums_out (guestfs_h *g,\n"
8519 " const char *csumtype,\n"
8520 " const char *directory,\n"
8521 " const char *sumsfile);\n"
8527 #: ../src/guestfs-actions.pod:970 ../fish/guestfish-actions.pod:656
8529 "This command computes the checksums of all regular files in C<directory> and "
8530 "then emits a list of those checksums to the local output file C<sumsfile>."
8535 #: ../src/guestfs-actions.pod:974 ../fish/guestfish-actions.pod:660
8537 "This can be used for verifying the integrity of a virtual machine. However "
8538 "to be properly secure you should pay attention to the output of the checksum "
8539 "command (it uses the ones from GNU coreutils). In particular when the "
8540 "filename is not printable, coreutils uses a special backslash syntax. For "
8541 "more information, see the GNU coreutils info file."
8546 #: ../src/guestfs-actions.pod:984
8547 msgid "(Added in 1.3.7)"
8552 #: ../src/guestfs-actions.pod:986
8553 msgid "guestfs_chmod"
8558 #: ../src/guestfs-actions.pod:988
8562 " guestfs_chmod (guestfs_h *g,\n"
8564 " const char *path);\n"
8570 #: ../src/guestfs-actions.pod:993 ../fish/guestfish-actions.pod:674
8572 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
8578 #: ../src/guestfs-actions.pod:996 ../fish/guestfish-actions.pod:677
8580 "I<Note>: When using this command from guestfish, C<mode> by default would be "
8581 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
8587 #: ../src/guestfs-actions.pod:1000 ../src/guestfs-actions.pod:4393
8588 #: ../src/guestfs-actions.pod:4590 ../src/guestfs-actions.pod:4609
8589 #: ../src/guestfs-actions.pod:4628 ../fish/guestfish-actions.pod:681
8590 #: ../fish/guestfish-actions.pod:2988 ../fish/guestfish-actions.pod:3117
8591 #: ../fish/guestfish-actions.pod:3127 ../fish/guestfish-actions.pod:3137
8592 msgid "The mode actually set is affected by the umask."
8597 #: ../src/guestfs-actions.pod:1006
8598 msgid "guestfs_chown"
8603 #: ../src/guestfs-actions.pod:1008
8607 " guestfs_chown (guestfs_h *g,\n"
8610 " const char *path);\n"
8616 #: ../src/guestfs-actions.pod:1014 ../fish/guestfish-actions.pod:687
8617 msgid "Change the file owner to C<owner> and group to C<group>."
8622 #: ../src/guestfs-actions.pod:1016 ../src/guestfs-actions.pod:3501
8623 #: ../fish/guestfish-actions.pod:689 ../fish/guestfish-actions.pod:2446
8625 "Only numeric uid and gid are supported. If you want to use names, you will "
8626 "need to locate and parse the password file yourself (Augeas support makes "
8627 "this relatively easy)."
8632 #: ../src/guestfs-actions.pod:1024
8633 msgid "guestfs_command"
8638 #: ../src/guestfs-actions.pod:1026
8642 " guestfs_command (guestfs_h *g,\n"
8643 " char *const *arguments);\n"
8649 #: ../src/guestfs-actions.pod:1030 ../fish/guestfish-actions.pod:697
8651 "This call runs a command from the guest filesystem. The filesystem must be "
8652 "mounted, and must contain a compatible operating system (ie. something "
8653 "Linux, with the same or compatible processor architecture)."
8658 #: ../src/guestfs-actions.pod:1035
8660 "The single parameter is an argv-style list of arguments. The first element "
8661 "is the name of the program to run. Subsequent elements are parameters. The "
8662 "list must be non-empty (ie. must contain a program name). Note that the "
8663 "command runs directly, and is I<not> invoked via the shell (see "
8669 #: ../src/guestfs-actions.pod:1042 ../fish/guestfish-actions.pod:709
8670 msgid "The return value is anything printed to I<stdout> by the command."
8675 #: ../src/guestfs-actions.pod:1045 ../fish/guestfish-actions.pod:712
8677 "If the command returns a non-zero exit status, then this function returns an "
8678 "error message. The error message string is the content of I<stderr> from "
8684 #: ../src/guestfs-actions.pod:1049 ../fish/guestfish-actions.pod:716
8686 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
8687 "bin>. If you require a program from another location, you should provide "
8688 "the full path in the first parameter."
8693 #: ../src/guestfs-actions.pod:1054 ../fish/guestfish-actions.pod:721
8695 "Shared libraries and data files required by the program must be available on "
8696 "filesystems which are mounted in the correct places. It is the caller's "
8697 "responsibility to ensure all filesystems that are needed are mounted at the "
8703 #: ../src/guestfs-actions.pod:1066 ../src/guestfs-actions.pod:1086
8704 #: ../src/guestfs-actions.pod:1554
8705 msgid "(Added in 0.9.1)"
8710 #: ../src/guestfs-actions.pod:1068
8711 msgid "guestfs_command_lines"
8716 #: ../src/guestfs-actions.pod:1070
8720 " guestfs_command_lines (guestfs_h *g,\n"
8721 " char *const *arguments);\n"
8727 #: ../src/guestfs-actions.pod:1074
8729 "This is the same as C<guestfs_command>, but splits the result into a list of "
8735 #: ../src/guestfs-actions.pod:1077
8736 msgid "See also: C<guestfs_sh_lines>"
8741 #: ../src/guestfs-actions.pod:1088
8742 msgid "guestfs_config"
8747 #: ../src/guestfs-actions.pod:1090
8751 " guestfs_config (guestfs_h *g,\n"
8752 " const char *qemuparam,\n"
8753 " const char *qemuvalue);\n"
8758 #: ../src/guestfs-actions.pod:1095 ../fish/guestfish-actions.pod:746
8760 "This can be used to add arbitrary qemu command line parameters of the form "
8761 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
8762 "setting some parameters which would interfere with parameters that we use."
8767 #: ../src/guestfs-actions.pod:1100 ../fish/guestfish-actions.pod:751
8768 msgid "The first character of C<param> string must be a C<-> (dash)."
8773 #: ../src/guestfs-actions.pod:1102 ../fish/guestfish-actions.pod:753
8774 msgid "C<value> can be NULL."
8779 #: ../src/guestfs-actions.pod:1108
8780 msgid "guestfs_copy_size"
8785 #: ../src/guestfs-actions.pod:1110
8789 " guestfs_copy_size (guestfs_h *g,\n"
8790 " const char *src,\n"
8791 " const char *dest,\n"
8798 #: ../src/guestfs-actions.pod:1116 ../fish/guestfish-actions.pod:759
8800 "This command copies exactly C<size> bytes from one source device or file "
8801 "C<src> to another destination device or file C<dest>."
8806 #: ../src/guestfs-actions.pod:1119 ../fish/guestfish-actions.pod:762
8808 "Note this will fail if the source is too short or if the destination is not "
8813 #: ../src/guestfs-actions.pod:1124 ../src/guestfs-actions.pod:1247
8814 #: ../src/guestfs-actions.pod:1278 ../src/guestfs-actions.pod:1323
8815 #: ../src/guestfs-actions.pod:1703 ../src/guestfs-actions.pod:1725
8816 #: ../src/guestfs-actions.pod:3482 ../src/guestfs-actions.pod:6827
8817 #: ../src/guestfs-actions.pod:6861 ../src/guestfs-actions.pod:7340
8818 #: ../src/guestfs-actions.pod:7359
8820 "This long-running command can generate progress notification messages so "
8821 "that the caller can display a progress bar or indicator. To receive these "
8822 "messages, the caller must register a progress event callback. See L<guestfs"
8823 "(3)/GUESTFS_EVENT_PROGRESS>."
8828 #: ../src/guestfs-actions.pod:1129 ../src/guestfs-actions.pod:4169
8829 #: ../src/guestfs-actions.pod:5387 ../src/guestfs-actions.pod:7068
8830 #: ../src/guestfs-actions.pod:7088 ../src/guestfs-actions.pod:7174
8831 msgid "(Added in 1.0.87)"
8836 #: ../src/guestfs-actions.pod:1131
8842 #: ../src/guestfs-actions.pod:1133
8846 " guestfs_cp (guestfs_h *g,\n"
8847 " const char *src,\n"
8848 " const char *dest);\n"
8854 #: ../src/guestfs-actions.pod:1138 ../fish/guestfish-actions.pod:769
8856 "This copies a file from C<src> to C<dest> where C<dest> is either a "
8857 "destination filename or destination directory."
8862 #: ../src/guestfs-actions.pod:1143 ../src/guestfs-actions.pod:1157
8863 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:1303
8864 #: ../src/guestfs-actions.pod:1417 ../src/guestfs-actions.pod:4854
8865 #: ../src/guestfs-actions.pod:5231
8866 msgid "(Added in 1.0.18)"
8871 #: ../src/guestfs-actions.pod:1145
8872 msgid "guestfs_cp_a"
8877 #: ../src/guestfs-actions.pod:1147
8881 " guestfs_cp_a (guestfs_h *g,\n"
8882 " const char *src,\n"
8883 " const char *dest);\n"
8889 #: ../src/guestfs-actions.pod:1152 ../fish/guestfish-actions.pod:776
8891 "This copies a file or directory from C<src> to C<dest> recursively using the "
8897 #: ../src/guestfs-actions.pod:1159
8903 #: ../src/guestfs-actions.pod:1161
8907 " guestfs_dd (guestfs_h *g,\n"
8908 " const char *src,\n"
8909 " const char *dest);\n"
8915 #: ../src/guestfs-actions.pod:1166 ../fish/guestfish-actions.pod:783
8917 "This command copies from one source device or file C<src> to another "
8918 "destination device or file C<dest>. Normally you would use this to copy to "
8919 "or from a device or partition, for example to duplicate a filesystem."
8924 #: ../src/guestfs-actions.pod:1171
8926 "If the destination is a device, it must be as large or larger than the "
8927 "source file or device, otherwise the copy will fail. This command cannot do "
8928 "partial copies (see C<guestfs_copy_size>)."
8933 #: ../src/guestfs-actions.pod:1179
8939 #: ../src/guestfs-actions.pod:1181
8943 " guestfs_df (guestfs_h *g);\n"
8949 #: ../src/guestfs-actions.pod:1184 ../fish/guestfish-actions.pod:796
8950 msgid "This command runs the C<df> command to report disk space used."
8955 #: ../src/guestfs-actions.pod:1186 ../src/guestfs-actions.pod:1203
8957 "This command is mostly useful for interactive sessions. It is I<not> "
8958 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
8964 #: ../src/guestfs-actions.pod:1193 ../src/guestfs-actions.pod:1210
8965 #: ../src/guestfs-actions.pod:1328 ../src/guestfs-actions.pod:2292
8966 #: ../src/guestfs-actions.pod:2316 ../src/guestfs-actions.pod:2384
8967 #: ../src/guestfs-actions.pod:4279 ../src/guestfs-actions.pod:4754
8968 #: ../src/guestfs-actions.pod:6565 ../src/guestfs-actions.pod:6589
8969 #: ../src/guestfs-actions.pod:7207 ../src/guestfs-actions.pod:7220
8970 #: ../src/guestfs-actions.pod:7233
8971 msgid "(Added in 1.0.54)"
8976 #: ../src/guestfs-actions.pod:1195
8977 msgid "guestfs_df_h"
8982 #: ../src/guestfs-actions.pod:1197
8986 " guestfs_df_h (guestfs_h *g);\n"
8992 #: ../src/guestfs-actions.pod:1200 ../fish/guestfish-actions.pod:806
8994 "This command runs the C<df -h> command to report disk space used in human-"
9000 #: ../src/guestfs-actions.pod:1212
9001 msgid "guestfs_dmesg"
9006 #: ../src/guestfs-actions.pod:1214
9010 " guestfs_dmesg (guestfs_h *g);\n"
9016 #: ../src/guestfs-actions.pod:1217 ../fish/guestfish-actions.pod:817
9018 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
9019 "This is sometimes useful for extended debugging of problems."
9024 #: ../src/guestfs-actions.pod:1221
9026 "Another way to get the same information is to enable verbose messages with "
9027 "C<guestfs_set_verbose> or by setting the environment variable "
9028 "C<LIBGUESTFS_DEBUG=1> before running the program."
9033 #: ../src/guestfs-actions.pod:1231
9034 msgid "guestfs_download"
9039 #: ../src/guestfs-actions.pod:1233
9043 " guestfs_download (guestfs_h *g,\n"
9044 " const char *remotefilename,\n"
9045 " const char *filename);\n"
9051 #: ../src/guestfs-actions.pod:1238 ../src/guestfs-actions.pod:1263
9052 #: ../fish/guestfish-actions.pod:830 ../fish/guestfish-actions.pod:843
9054 "Download file C<remotefilename> and save it as C<filename> on the local "
9060 #: ../src/guestfs-actions.pod:1241 ../src/guestfs-actions.pod:6821
9061 #: ../fish/guestfish-actions.pod:833 ../fish/guestfish-actions.pod:4595
9062 msgid "C<filename> can also be a named pipe."
9067 #: ../src/guestfs-actions.pod:1243
9068 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
9073 #: ../src/guestfs-actions.pod:1254
9074 msgid "guestfs_download_offset"
9079 #: ../src/guestfs-actions.pod:1256
9083 " guestfs_download_offset (guestfs_h *g,\n"
9084 " const char *remotefilename,\n"
9085 " const char *filename,\n"
9086 " int64_t offset,\n"
9093 #: ../src/guestfs-actions.pod:1266 ../fish/guestfish-actions.pod:846
9095 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
9096 "region must be within the file or device)."
9101 #: ../src/guestfs-actions.pod:1269
9103 "Note that there is no limit on the amount of data that can be downloaded "
9104 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
9105 "full amount unless an error occurs."
9110 #: ../src/guestfs-actions.pod:1274
9111 msgid "See also C<guestfs_download>, C<guestfs_pread>."
9116 #: ../src/guestfs-actions.pod:1283 ../src/guestfs-actions.pod:6866
9117 msgid "(Added in 1.5.17)"
9122 #: ../src/guestfs-actions.pod:1285
9123 msgid "guestfs_drop_caches"
9128 #: ../src/guestfs-actions.pod:1287
9132 " guestfs_drop_caches (guestfs_h *g,\n"
9133 " int whattodrop);\n"
9139 #: ../src/guestfs-actions.pod:1291 ../fish/guestfish-actions.pod:862
9141 "This instructs the guest kernel to drop its page cache, and/or dentries and "
9142 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
9143 "to drop, see L<http://linux-mm.org/Drop_Caches>"
9148 #: ../src/guestfs-actions.pod:1296 ../fish/guestfish-actions.pod:867
9149 msgid "Setting C<whattodrop> to 3 should drop everything."
9154 #: ../src/guestfs-actions.pod:1298 ../fish/guestfish-actions.pod:869
9156 "This automatically calls L<sync(2)> before the operation, so that the "
9157 "maximum guest memory is freed."
9162 #: ../src/guestfs-actions.pod:1305
9168 #: ../src/guestfs-actions.pod:1307
9172 " guestfs_du (guestfs_h *g,\n"
9173 " const char *path);\n"
9179 #: ../src/guestfs-actions.pod:1311 ../fish/guestfish-actions.pod:876
9181 "This command runs the C<du -s> command to estimate file space usage for "
9187 #: ../src/guestfs-actions.pod:1314 ../fish/guestfish-actions.pod:879
9189 "C<path> can be a file or a directory. If C<path> is a directory then the "
9190 "estimate includes the contents of the directory and all subdirectories "
9196 #: ../src/guestfs-actions.pod:1318 ../fish/guestfish-actions.pod:883
9198 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
9203 #: ../src/guestfs-actions.pod:1330
9204 msgid "guestfs_e2fsck_f"
9209 #: ../src/guestfs-actions.pod:1332
9213 " guestfs_e2fsck_f (guestfs_h *g,\n"
9214 " const char *device);\n"
9219 #: ../src/guestfs-actions.pod:1336 ../fish/guestfish-actions.pod:890
9221 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
9222 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
9228 #: ../src/guestfs-actions.pod:1340
9230 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
9231 "Normally you should use C<guestfs_fsck>."
9236 #: ../src/guestfs-actions.pod:1345
9237 msgid "(Added in 1.0.29)"
9242 #: ../src/guestfs-actions.pod:1347
9243 msgid "guestfs_echo_daemon"
9248 #: ../src/guestfs-actions.pod:1349
9252 " guestfs_echo_daemon (guestfs_h *g,\n"
9253 " char *const *words);\n"
9259 #: ../src/guestfs-actions.pod:1353 ../fish/guestfish-actions.pod:901
9261 "This command concatenates the list of C<words> passed with single spaces "
9262 "between them and returns the resulting string."
9267 #: ../src/guestfs-actions.pod:1356 ../fish/guestfish-actions.pod:904
9268 msgid "You can use this command to test the connection through to the daemon."
9273 #: ../src/guestfs-actions.pod:1358
9274 msgid "See also C<guestfs_ping_daemon>."
9279 #: ../src/guestfs-actions.pod:1363 ../src/guestfs-actions.pod:2100
9280 #: ../src/guestfs-actions.pod:6065
9281 msgid "(Added in 1.0.69)"
9286 #: ../src/guestfs-actions.pod:1365
9287 msgid "guestfs_egrep"
9292 #: ../src/guestfs-actions.pod:1367
9296 " guestfs_egrep (guestfs_h *g,\n"
9297 " const char *regex,\n"
9298 " const char *path);\n"
9304 #: ../src/guestfs-actions.pod:1372 ../fish/guestfish-actions.pod:912
9306 "This calls the external C<egrep> program and returns the matching lines."
9311 #: ../src/guestfs-actions.pod:1382 ../src/guestfs-actions.pod:1401
9312 #: ../src/guestfs-actions.pod:1458 ../src/guestfs-actions.pod:1504
9313 #: ../src/guestfs-actions.pod:1523 ../src/guestfs-actions.pod:2230
9314 #: ../src/guestfs-actions.pod:2249 ../src/guestfs-actions.pod:2405
9315 #: ../src/guestfs-actions.pod:2418 ../src/guestfs-actions.pod:2433
9316 #: ../src/guestfs-actions.pod:2479 ../src/guestfs-actions.pod:2501
9317 #: ../src/guestfs-actions.pod:2514 ../src/guestfs-actions.pod:3662
9318 #: ../src/guestfs-actions.pod:3676 ../src/guestfs-actions.pod:3689
9319 #: ../src/guestfs-actions.pod:3703 ../src/guestfs-actions.pod:4689
9320 #: ../src/guestfs-actions.pod:5565 ../src/guestfs-actions.pod:5614
9321 #: ../src/guestfs-actions.pod:6433 ../src/guestfs-actions.pod:6445
9322 #: ../src/guestfs-actions.pod:6458 ../src/guestfs-actions.pod:6471
9323 #: ../src/guestfs-actions.pod:6493 ../src/guestfs-actions.pod:6506
9324 #: ../src/guestfs-actions.pod:6519 ../src/guestfs-actions.pod:6532
9325 #: ../src/guestfs-actions.pod:7303 ../src/guestfs-actions.pod:7322
9326 #: ../src/guestfs-actions.pod:7407 ../src/guestfs-actions.pod:7426
9327 #: ../src/guestfs-actions.pod:7472 ../src/guestfs-actions.pod:7491
9328 msgid "(Added in 1.0.66)"
9333 #: ../src/guestfs-actions.pod:1384
9334 msgid "guestfs_egrepi"
9339 #: ../src/guestfs-actions.pod:1386
9343 " guestfs_egrepi (guestfs_h *g,\n"
9344 " const char *regex,\n"
9345 " const char *path);\n"
9351 #: ../src/guestfs-actions.pod:1391 ../fish/guestfish-actions.pod:922
9353 "This calls the external C<egrep -i> program and returns the matching lines."
9358 #: ../src/guestfs-actions.pod:1403
9359 msgid "guestfs_equal"
9364 #: ../src/guestfs-actions.pod:1405
9368 " guestfs_equal (guestfs_h *g,\n"
9369 " const char *file1,\n"
9370 " const char *file2);\n"
9376 #: ../src/guestfs-actions.pod:1410 ../fish/guestfish-actions.pod:932
9378 "This compares the two files C<file1> and C<file2> and returns true if their "
9379 "content is exactly equal, or false otherwise."
9384 #: ../src/guestfs-actions.pod:1413 ../fish/guestfish-actions.pod:935
9385 msgid "The external L<cmp(1)> program is used for the comparison."
9390 #: ../src/guestfs-actions.pod:1419
9391 msgid "guestfs_exists"
9396 #: ../src/guestfs-actions.pod:1421
9400 " guestfs_exists (guestfs_h *g,\n"
9401 " const char *path);\n"
9407 #: ../src/guestfs-actions.pod:1425 ../fish/guestfish-actions.pod:941
9409 "This returns C<true> if and only if there is a file, directory (or anything) "
9410 "with the given C<path> name."
9415 #: ../src/guestfs-actions.pod:1428
9416 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
9421 #: ../src/guestfs-actions.pod:1434
9422 msgid "guestfs_fallocate"
9427 #: ../src/guestfs-actions.pod:1436
9431 " guestfs_fallocate (guestfs_h *g,\n"
9432 " const char *path,\n"
9439 #: ../src/guestfs-actions.pod:1441 ../src/guestfs-actions.pod:1467
9440 #: ../fish/guestfish-actions.pod:950 ../fish/guestfish-actions.pod:969
9442 "This command preallocates a file (containing zero bytes) named C<path> of "
9443 "size C<len> bytes. If the file exists already, it is overwritten."
9448 #: ../src/guestfs-actions.pod:1445 ../fish/guestfish-actions.pod:954
9450 "Do not confuse this with the guestfish-specific C<alloc> command which "
9451 "allocates a file in the host and attaches it as a device."
9456 #: ../src/guestfs-actions.pod:1451 ../fish/guestfish-actions.pod:958
9458 "This function is deprecated. In new code, use the C<fallocate64> call "
9464 #: ../src/guestfs-actions.pod:1460
9465 msgid "guestfs_fallocate64"
9470 #: ../src/guestfs-actions.pod:1462
9474 " guestfs_fallocate64 (guestfs_h *g,\n"
9475 " const char *path,\n"
9482 #: ../src/guestfs-actions.pod:1471
9484 "Note that this call allocates disk blocks for the file. To create a sparse "
9485 "file use C<guestfs_truncate_size> instead."
9490 #: ../src/guestfs-actions.pod:1474
9492 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
9493 "oversight it only allowed 30 bit lengths to be specified, effectively "
9494 "limiting the maximum size of files created through that call to 1GB."
9499 #: ../src/guestfs-actions.pod:1479 ../fish/guestfish-actions.pod:981
9501 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
9502 "commands which create a file in the host and attach it as a device."
9507 #: ../src/guestfs-actions.pod:1485
9508 msgid "(Added in 1.3.17)"
9513 #: ../src/guestfs-actions.pod:1487
9514 msgid "guestfs_fgrep"
9519 #: ../src/guestfs-actions.pod:1489
9523 " guestfs_fgrep (guestfs_h *g,\n"
9524 " const char *pattern,\n"
9525 " const char *path);\n"
9531 #: ../src/guestfs-actions.pod:1494 ../fish/guestfish-actions.pod:989
9533 "This calls the external C<fgrep> program and returns the matching lines."
9538 #: ../src/guestfs-actions.pod:1506
9539 msgid "guestfs_fgrepi"
9544 #: ../src/guestfs-actions.pod:1508
9548 " guestfs_fgrepi (guestfs_h *g,\n"
9549 " const char *pattern,\n"
9550 " const char *path);\n"
9556 #: ../src/guestfs-actions.pod:1513 ../fish/guestfish-actions.pod:999
9558 "This calls the external C<fgrep -i> program and returns the matching lines."
9563 #: ../src/guestfs-actions.pod:1525
9564 msgid "guestfs_file"
9569 #: ../src/guestfs-actions.pod:1527
9573 " guestfs_file (guestfs_h *g,\n"
9574 " const char *path);\n"
9580 #: ../src/guestfs-actions.pod:1531 ../fish/guestfish-actions.pod:1009
9582 "This call uses the standard L<file(1)> command to determine the type or "
9583 "contents of the file."
9588 #: ../src/guestfs-actions.pod:1534 ../fish/guestfish-actions.pod:1012
9590 "This call will also transparently look inside various types of compressed "
9595 #: ../src/guestfs-actions.pod:1537 ../fish/guestfish-actions.pod:1015
9597 "The exact command which runs is C<file -zb path>. Note in particular that "
9598 "the filename is not prepended to the output (the I<-b> option)."
9603 #: ../src/guestfs-actions.pod:1541
9605 "This command can also be used on C</dev/> devices (and partitions, LV "
9606 "names). You can for example use this to determine if a device contains a "
9607 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
9612 #: ../src/guestfs-actions.pod:1546 ../fish/guestfish-actions.pod:1024
9614 "If the C<path> does not begin with C</dev/> then this command only works for "
9615 "the content of regular files. For other file types (directory, symbolic "
9616 "link etc) it will just return the string C<directory> etc."
9621 #: ../src/guestfs-actions.pod:1556
9622 msgid "guestfs_file_architecture"
9627 #: ../src/guestfs-actions.pod:1558
9631 " guestfs_file_architecture (guestfs_h *g,\n"
9632 " const char *filename);\n"
9638 #: ../src/guestfs-actions.pod:1562 ../fish/guestfish-actions.pod:1033
9640 "This detects the architecture of the binary C<filename>, and returns it if "
9646 #: ../src/guestfs-actions.pod:1565 ../fish/guestfish-actions.pod:1036
9647 msgid "Currently defined architectures are:"
9652 #: ../src/guestfs-actions.pod:1569 ../fish/guestfish-actions.pod:1040
9658 #: ../src/guestfs-actions.pod:1571 ../fish/guestfish-actions.pod:1042
9660 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
9661 "irrespective of the precise processor requirements of the binary."
9666 #: ../src/guestfs-actions.pod:1574 ../fish/guestfish-actions.pod:1045
9672 #: ../src/guestfs-actions.pod:1576 ../fish/guestfish-actions.pod:1047
9673 msgid "64 bit x86-64."
9678 #: ../src/guestfs-actions.pod:1578 ../fish/guestfish-actions.pod:1049
9684 #: ../src/guestfs-actions.pod:1580 ../fish/guestfish-actions.pod:1051
9685 msgid "32 bit SPARC."
9690 #: ../src/guestfs-actions.pod:1582 ../fish/guestfish-actions.pod:1053
9696 #: ../src/guestfs-actions.pod:1584 ../fish/guestfish-actions.pod:1055
9697 msgid "64 bit SPARC V9 and above."
9702 #: ../src/guestfs-actions.pod:1586 ../fish/guestfish-actions.pod:1057
9708 #: ../src/guestfs-actions.pod:1588 ../fish/guestfish-actions.pod:1059
9709 msgid "Intel Itanium."
9714 #: ../src/guestfs-actions.pod:1590 ../fish/guestfish-actions.pod:1061
9720 #: ../src/guestfs-actions.pod:1592 ../fish/guestfish-actions.pod:1063
9721 msgid "32 bit Power PC."
9726 #: ../src/guestfs-actions.pod:1594 ../fish/guestfish-actions.pod:1065
9732 #: ../src/guestfs-actions.pod:1596 ../fish/guestfish-actions.pod:1067
9733 msgid "64 bit Power PC."
9738 #: ../src/guestfs-actions.pod:1600 ../fish/guestfish-actions.pod:1071
9739 msgid "Libguestfs may return other architecture strings in future."
9744 #: ../src/guestfs-actions.pod:1602 ../fish/guestfish-actions.pod:1073
9745 msgid "The function works on at least the following types of files:"
9750 #: ../src/guestfs-actions.pod:1608 ../fish/guestfish-actions.pod:1079
9751 msgid "many types of Un*x and Linux binary"
9756 #: ../src/guestfs-actions.pod:1612 ../fish/guestfish-actions.pod:1083
9757 msgid "many types of Un*x and Linux shared library"
9762 #: ../src/guestfs-actions.pod:1616 ../fish/guestfish-actions.pod:1087
9763 msgid "Windows Win32 and Win64 binaries"
9768 #: ../src/guestfs-actions.pod:1620 ../fish/guestfish-actions.pod:1091
9769 msgid "Windows Win32 and Win64 DLLs"
9774 #: ../src/guestfs-actions.pod:1622 ../fish/guestfish-actions.pod:1093
9775 msgid "Win32 binaries and DLLs return C<i386>."
9780 #: ../src/guestfs-actions.pod:1624 ../fish/guestfish-actions.pod:1095
9781 msgid "Win64 binaries and DLLs return C<x86_64>."
9786 #: ../src/guestfs-actions.pod:1628 ../fish/guestfish-actions.pod:1099
9787 msgid "Linux kernel modules"
9792 #: ../src/guestfs-actions.pod:1632 ../fish/guestfish-actions.pod:1103
9793 msgid "Linux new-style initrd images"
9798 #: ../src/guestfs-actions.pod:1636 ../fish/guestfish-actions.pod:1107
9799 msgid "some non-x86 Linux vmlinuz kernels"
9804 #: ../src/guestfs-actions.pod:1640 ../fish/guestfish-actions.pod:1111
9805 msgid "What it can't do currently:"
9810 #: ../src/guestfs-actions.pod:1646 ../fish/guestfish-actions.pod:1117
9811 msgid "static libraries (libfoo.a)"
9816 #: ../src/guestfs-actions.pod:1650 ../fish/guestfish-actions.pod:1121
9817 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
9822 #: ../src/guestfs-actions.pod:1654 ../fish/guestfish-actions.pod:1125
9823 msgid "x86 Linux vmlinuz kernels"
9828 #: ../src/guestfs-actions.pod:1656 ../fish/guestfish-actions.pod:1127
9830 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
9831 "compressed code, and are horribly hard to unpack. If you want to find the "
9832 "architecture of a kernel, use the architecture of the associated initrd or "
9833 "kernel module(s) instead."
9838 #: ../src/guestfs-actions.pod:1666 ../src/guestfs-actions.pod:1829
9839 #: ../src/guestfs-actions.pod:1846 ../src/guestfs-actions.pod:2537
9840 #: ../src/guestfs-actions.pod:2630 ../src/guestfs-actions.pod:2700
9841 #: ../src/guestfs-actions.pod:2788 ../src/guestfs-actions.pod:2809
9842 #: ../src/guestfs-actions.pod:2852 ../src/guestfs-actions.pod:2936
9843 #: ../src/guestfs-actions.pod:3033 ../src/guestfs-actions.pod:3280
9844 #: ../src/guestfs-actions.pod:3412
9845 msgid "(Added in 1.5.3)"
9850 #: ../src/guestfs-actions.pod:1668
9851 msgid "guestfs_filesize"
9856 #: ../src/guestfs-actions.pod:1670
9860 " guestfs_filesize (guestfs_h *g,\n"
9861 " const char *file);\n"
9867 #: ../src/guestfs-actions.pod:1674 ../fish/guestfish-actions.pod:1138
9868 msgid "This command returns the size of C<file> in bytes."
9873 #: ../src/guestfs-actions.pod:1676
9875 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
9876 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
9877 "devices, use C<guestfs_blockdev_getsize64>."
9882 #: ../src/guestfs-actions.pod:1682
9883 msgid "(Added in 1.0.82)"
9888 #: ../src/guestfs-actions.pod:1684
9889 msgid "guestfs_fill"
9894 #: ../src/guestfs-actions.pod:1686
9898 " guestfs_fill (guestfs_h *g,\n"
9901 " const char *path);\n"
9907 #: ../src/guestfs-actions.pod:1692 ../fish/guestfish-actions.pod:1148
9909 "This command creates a new file called C<path>. The initial content of the "
9910 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
9916 #: ../src/guestfs-actions.pod:1696
9918 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
9919 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
9920 "bytes use C<guestfs_fill_pattern>."
9925 #: ../src/guestfs-actions.pod:1708
9926 msgid "(Added in 1.0.79)"
9931 #: ../src/guestfs-actions.pod:1710
9932 msgid "guestfs_fill_pattern"
9937 #: ../src/guestfs-actions.pod:1712
9941 " guestfs_fill_pattern (guestfs_h *g,\n"
9942 " const char *pattern,\n"
9944 " const char *path);\n"
9950 #: ../src/guestfs-actions.pod:1718
9952 "This function is like C<guestfs_fill> except that it creates a new file of "
9953 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
9954 "pattern is truncated if necessary to ensure the length of the file is "
9955 "exactly C<len> bytes."
9960 #: ../src/guestfs-actions.pod:1730
9961 msgid "(Added in 1.3.12)"
9966 #: ../src/guestfs-actions.pod:1732
9967 msgid "guestfs_find"
9972 #: ../src/guestfs-actions.pod:1734
9976 " guestfs_find (guestfs_h *g,\n"
9977 " const char *directory);\n"
9983 #: ../src/guestfs-actions.pod:1738 ../fish/guestfish-actions.pod:1170
9985 "This command lists out all files and directories, recursively, starting at "
9986 "C<directory>. It is essentially equivalent to running the shell command "
9987 "C<find directory -print> but some post-processing happens on the output, "
9993 #: ../src/guestfs-actions.pod:1743 ../fish/guestfish-actions.pod:1175
9995 "This returns a list of strings I<without any prefix>. Thus if the directory "
10001 #: ../src/guestfs-actions.pod:1746 ../fish/guestfish-actions.pod:1178
10012 #: ../src/guestfs-actions.pod:1750
10014 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
10019 #: ../src/guestfs-actions.pod:1753 ../fish/guestfish-actions.pod:1185
10031 #: ../src/guestfs-actions.pod:1758 ../fish/guestfish-actions.pod:1190
10032 msgid "If C<directory> is not a directory, then this command returns an error."
10037 #: ../src/guestfs-actions.pod:1761 ../fish/guestfish-actions.pod:1193
10038 msgid "The returned list is sorted."
10043 #: ../src/guestfs-actions.pod:1763
10044 msgid "See also C<guestfs_find0>."
10049 #: ../src/guestfs-actions.pod:1772 ../src/guestfs-actions.pod:4106
10050 #: ../src/guestfs-actions.pod:5649
10051 msgid "(Added in 1.0.27)"
10056 #: ../src/guestfs-actions.pod:1774
10057 msgid "guestfs_find0"
10062 #: ../src/guestfs-actions.pod:1776
10066 " guestfs_find0 (guestfs_h *g,\n"
10067 " const char *directory,\n"
10068 " const char *files);\n"
10074 #: ../src/guestfs-actions.pod:1781 ../fish/guestfish-actions.pod:1204
10076 "This command lists out all files and directories, recursively, starting at "
10077 "C<directory>, placing the resulting list in the external file called "
10083 #: ../src/guestfs-actions.pod:1785
10085 "This command works the same way as C<guestfs_find> with the following "
10091 #: ../src/guestfs-actions.pod:1792 ../fish/guestfish-actions.pod:1215
10092 msgid "The resulting list is written to an external file."
10097 #: ../src/guestfs-actions.pod:1796 ../fish/guestfish-actions.pod:1219
10099 "Items (filenames) in the result are separated by C<\\0> characters. See "
10100 "L<find(1)> option I<-print0>."
10105 #: ../src/guestfs-actions.pod:1801 ../fish/guestfish-actions.pod:1224
10106 msgid "This command is not limited in the number of names that it can return."
10111 #: ../src/guestfs-actions.pod:1806 ../fish/guestfish-actions.pod:1229
10112 msgid "The result list is not sorted."
10117 #: ../src/guestfs-actions.pod:1812
10118 msgid "(Added in 1.0.74)"
10123 #: ../src/guestfs-actions.pod:1814
10124 msgid "guestfs_findfs_label"
10129 #: ../src/guestfs-actions.pod:1816
10133 " guestfs_findfs_label (guestfs_h *g,\n"
10134 " const char *label);\n"
10140 #: ../src/guestfs-actions.pod:1820 ../fish/guestfish-actions.pod:1239
10142 "This command searches the filesystems and returns the one which has the "
10143 "given label. An error is returned if no such filesystem can be found."
10148 #: ../src/guestfs-actions.pod:1824
10149 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
10154 #: ../src/guestfs-actions.pod:1831
10155 msgid "guestfs_findfs_uuid"
10160 #: ../src/guestfs-actions.pod:1833
10164 " guestfs_findfs_uuid (guestfs_h *g,\n"
10165 " const char *uuid);\n"
10171 #: ../src/guestfs-actions.pod:1837 ../fish/guestfish-actions.pod:1249
10173 "This command searches the filesystems and returns the one which has the "
10174 "given UUID. An error is returned if no such filesystem can be found."
10179 #: ../src/guestfs-actions.pod:1841
10180 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
10185 #: ../src/guestfs-actions.pod:1848
10186 msgid "guestfs_fsck"
10191 #: ../src/guestfs-actions.pod:1850
10195 " guestfs_fsck (guestfs_h *g,\n"
10196 " const char *fstype,\n"
10197 " const char *device);\n"
10203 #: ../src/guestfs-actions.pod:1855 ../fish/guestfish-actions.pod:1259
10205 "This runs the filesystem checker (fsck) on C<device> which should have "
10206 "filesystem type C<fstype>."
10211 #: ../src/guestfs-actions.pod:1858 ../fish/guestfish-actions.pod:1262
10213 "The returned integer is the status. See L<fsck(8)> for the list of status "
10214 "codes from C<fsck>."
10219 #: ../src/guestfs-actions.pod:1867 ../fish/guestfish-actions.pod:1271
10220 msgid "Multiple status codes can be summed together."
10225 #: ../src/guestfs-actions.pod:1871 ../fish/guestfish-actions.pod:1275
10227 "A non-zero return code can mean \"success\", for example if errors have been "
10228 "corrected on the filesystem."
10233 #: ../src/guestfs-actions.pod:1876 ../fish/guestfish-actions.pod:1280
10234 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
10239 #: ../src/guestfs-actions.pod:1881 ../fish/guestfish-actions.pod:1285
10241 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
10246 #: ../src/guestfs-actions.pod:1885 ../src/guestfs-actions.pod:7345
10247 msgid "(Added in 1.0.16)"
10252 #: ../src/guestfs-actions.pod:1887
10253 msgid "guestfs_get_append"
10258 #: ../src/guestfs-actions.pod:1889
10262 " guestfs_get_append (guestfs_h *g);\n"
10268 #: ../src/guestfs-actions.pod:1892 ../fish/guestfish-actions.pod:1291
10270 "Return the additional kernel options which are added to the guest kernel "
10276 #: ../src/guestfs-actions.pod:1895 ../fish/guestfish-actions.pod:1294
10277 msgid "If C<NULL> then no options are added."
10282 #: ../src/guestfs-actions.pod:1897
10284 "This function returns a string which may be NULL. There is no way to return "
10285 "an error from this function. The string is owned by the guest handle and "
10286 "must I<not> be freed."
10291 #: ../src/guestfs-actions.pod:1901 ../src/guestfs-actions.pod:5327
10292 #: ../src/guestfs-actions.pod:5807 ../src/guestfs-actions.pod:6207
10293 #: ../src/guestfs-actions.pod:6226 ../src/guestfs-actions.pod:6242
10294 #: ../src/guestfs-actions.pod:6259 ../src/guestfs-actions.pod:7016
10295 #: ../src/guestfs-actions.pod:7034 ../src/guestfs-actions.pod:7388
10296 msgid "(Added in 1.0.26)"
10300 #: ../src/guestfs-actions.pod:1903
10301 msgid "guestfs_get_attach_method"
10305 #: ../src/guestfs-actions.pod:1905
10309 " guestfs_get_attach_method (guestfs_h *g);\n"
10314 #: ../src/guestfs-actions.pod:1908
10315 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
10320 #: ../src/guestfs-actions.pod:1913
10321 msgid "guestfs_get_autosync"
10326 #: ../src/guestfs-actions.pod:1915
10330 " guestfs_get_autosync (guestfs_h *g);\n"
10336 #: ../src/guestfs-actions.pod:1918 ../fish/guestfish-actions.pod:1306
10337 msgid "Get the autosync flag."
10342 #: ../src/guestfs-actions.pod:1924
10343 msgid "guestfs_get_direct"
10348 #: ../src/guestfs-actions.pod:1926
10352 " guestfs_get_direct (guestfs_h *g);\n"
10358 #: ../src/guestfs-actions.pod:1929 ../fish/guestfish-actions.pod:1312
10359 msgid "Return the direct appliance mode flag."
10364 #: ../src/guestfs-actions.pod:1933 ../src/guestfs-actions.pod:5876
10365 msgid "(Added in 1.0.72)"
10370 #: ../src/guestfs-actions.pod:1935
10371 msgid "guestfs_get_e2label"
10376 #: ../src/guestfs-actions.pod:1937
10380 " guestfs_get_e2label (guestfs_h *g,\n"
10381 " const char *device);\n"
10387 #: ../src/guestfs-actions.pod:1941 ../fish/guestfish-actions.pod:1318
10389 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
10394 #: ../src/guestfs-actions.pod:1947 ../fish/guestfish-actions.pod:1321
10396 "This function is deprecated. In new code, use the C<vfs_label> call instead."
10401 #: ../src/guestfs-actions.pod:1954 ../src/guestfs-actions.pod:1975
10402 #: ../src/guestfs-actions.pod:5894 ../src/guestfs-actions.pod:5913
10403 msgid "(Added in 1.0.15)"
10408 #: ../src/guestfs-actions.pod:1956
10409 msgid "guestfs_get_e2uuid"
10414 #: ../src/guestfs-actions.pod:1958
10418 " guestfs_get_e2uuid (guestfs_h *g,\n"
10419 " const char *device);\n"
10425 #: ../src/guestfs-actions.pod:1962 ../fish/guestfish-actions.pod:1332
10427 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
10432 #: ../src/guestfs-actions.pod:1968 ../fish/guestfish-actions.pod:1335
10434 "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
10439 #: ../src/guestfs-actions.pod:1977
10440 msgid "guestfs_get_memsize"
10445 #: ../src/guestfs-actions.pod:1979
10449 " guestfs_get_memsize (guestfs_h *g);\n"
10455 #: ../src/guestfs-actions.pod:1982 ../fish/guestfish-actions.pod:1346
10457 "This gets the memory size in megabytes allocated to the qemu subprocess."
10462 #: ../src/guestfs-actions.pod:1985
10464 "If C<guestfs_set_memsize> was not called on this handle, and if "
10465 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
10466 "value for memsize."
10471 #: ../src/guestfs-actions.pod:1989 ../src/guestfs-actions.pod:2070
10472 #: ../src/guestfs-actions.pod:5929 ../src/guestfs-actions.pod:6036
10473 #: ../fish/guestfish-actions.pod:1353 ../fish/guestfish-actions.pod:1404
10474 #: ../fish/guestfish-actions.pod:3998 ../fish/guestfish-actions.pod:4085
10476 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
10481 #: ../src/guestfs-actions.pod:1994 ../src/guestfs-actions.pod:4397
10482 #: ../src/guestfs-actions.pod:4594 ../src/guestfs-actions.pod:4613
10483 #: ../src/guestfs-actions.pod:4632 ../src/guestfs-actions.pod:4644
10484 #: ../src/guestfs-actions.pod:4661 ../src/guestfs-actions.pod:4674
10485 #: ../src/guestfs-actions.pod:5552 ../src/guestfs-actions.pod:5934
10486 #: ../src/guestfs-actions.pod:6181 ../src/guestfs-actions.pod:6782
10487 msgid "(Added in 1.0.55)"
10492 #: ../src/guestfs-actions.pod:1996
10493 msgid "guestfs_get_network"
10498 #: ../src/guestfs-actions.pod:1998
10502 " guestfs_get_network (guestfs_h *g);\n"
10508 #: ../src/guestfs-actions.pod:2001 ../fish/guestfish-actions.pod:1360
10509 msgid "This returns the enable network flag."
10514 #: ../src/guestfs-actions.pod:2005 ../src/guestfs-actions.pod:5953
10515 msgid "(Added in 1.5.4)"
10520 #: ../src/guestfs-actions.pod:2007
10521 msgid "guestfs_get_path"
10526 #: ../src/guestfs-actions.pod:2009
10530 " guestfs_get_path (guestfs_h *g);\n"
10536 #: ../src/guestfs-actions.pod:2012 ../fish/guestfish-actions.pod:1366
10537 msgid "Return the current search path."
10542 #: ../src/guestfs-actions.pod:2014 ../fish/guestfish-actions.pod:1368
10544 "This is always non-NULL. If it wasn't set already, then this will return "
10545 "the default path."
10550 #: ../src/guestfs-actions.pod:2017 ../src/guestfs-actions.pod:2046
10552 "This function returns a string, or NULL on error. The string is owned by "
10553 "the guest handle and must I<not> be freed."
10558 #: ../src/guestfs-actions.pod:2022
10559 msgid "guestfs_get_pid"
10564 #: ../src/guestfs-actions.pod:2024
10568 " guestfs_get_pid (guestfs_h *g);\n"
10574 #: ../src/guestfs-actions.pod:2027 ../fish/guestfish-actions.pod:1377
10576 "Return the process ID of the qemu subprocess. If there is no qemu "
10577 "subprocess, then this will return an error."
10582 #: ../src/guestfs-actions.pod:2030 ../fish/guestfish-actions.pod:1380
10583 msgid "This is an internal call used for debugging and testing."
10588 #: ../src/guestfs-actions.pod:2034
10589 msgid "(Added in 1.0.56)"
10594 #: ../src/guestfs-actions.pod:2036
10595 msgid "guestfs_get_qemu"
10600 #: ../src/guestfs-actions.pod:2038
10604 " guestfs_get_qemu (guestfs_h *g);\n"
10610 #: ../src/guestfs-actions.pod:2041 ../fish/guestfish-actions.pod:1386
10611 msgid "Return the current qemu binary."
10616 #: ../src/guestfs-actions.pod:2043 ../fish/guestfish-actions.pod:1388
10618 "This is always non-NULL. If it wasn't set already, then this will return "
10619 "the default qemu binary name."
10624 #: ../src/guestfs-actions.pod:2049 ../src/guestfs-actions.pod:5998
10625 msgid "(Added in 1.0.6)"
10630 #: ../src/guestfs-actions.pod:2051
10631 msgid "guestfs_get_recovery_proc"
10636 #: ../src/guestfs-actions.pod:2053
10640 " guestfs_get_recovery_proc (guestfs_h *g);\n"
10646 #: ../src/guestfs-actions.pod:2056 ../fish/guestfish-actions.pod:1395
10647 msgid "Return the recovery process enabled flag."
10652 #: ../src/guestfs-actions.pod:2060 ../src/guestfs-actions.pod:3507
10653 #: ../src/guestfs-actions.pod:3804 ../src/guestfs-actions.pod:4204
10654 #: ../src/guestfs-actions.pod:4236 ../src/guestfs-actions.pod:5257
10655 #: ../src/guestfs-actions.pod:5600 ../src/guestfs-actions.pod:6022
10656 #: ../src/guestfs-actions.pod:6685 ../src/guestfs-actions.pod:6705
10657 #: ../src/guestfs-actions.pod:6897
10658 msgid "(Added in 1.0.77)"
10663 #: ../src/guestfs-actions.pod:2062
10664 msgid "guestfs_get_selinux"
10669 #: ../src/guestfs-actions.pod:2064
10673 " guestfs_get_selinux (guestfs_h *g);\n"
10679 #: ../src/guestfs-actions.pod:2067
10681 "This returns the current setting of the selinux flag which is passed to the "
10682 "appliance at boot time. See C<guestfs_set_selinux>."
10687 #: ../src/guestfs-actions.pod:2075 ../src/guestfs-actions.pod:2138
10688 #: ../src/guestfs-actions.pod:6041 ../src/guestfs-actions.pod:6099
10689 msgid "(Added in 1.0.67)"
10694 #: ../src/guestfs-actions.pod:2077
10695 msgid "guestfs_get_state"
10700 #: ../src/guestfs-actions.pod:2079
10704 " guestfs_get_state (guestfs_h *g);\n"
10710 #: ../src/guestfs-actions.pod:2082 ../fish/guestfish-actions.pod:1411
10712 "This returns the current state as an opaque integer. This is only useful "
10713 "for printing debug and internal error messages."
10718 #: ../src/guestfs-actions.pod:2085 ../src/guestfs-actions.pod:3305
10719 #: ../src/guestfs-actions.pod:3334 ../src/guestfs-actions.pod:3395
10720 #: ../src/guestfs-actions.pod:3422 ../fish/guestfish-actions.pod:1414
10721 #: ../fish/guestfish-actions.pod:2328 ../fish/guestfish-actions.pod:2346
10722 #: ../fish/guestfish-actions.pod:2384 ../fish/guestfish-actions.pod:2400
10723 msgid "For more information on states, see L<guestfs(3)>."
10728 #: ../src/guestfs-actions.pod:2091
10729 msgid "guestfs_get_trace"
10734 #: ../src/guestfs-actions.pod:2093
10738 " guestfs_get_trace (guestfs_h *g);\n"
10744 #: ../src/guestfs-actions.pod:2096 ../fish/guestfish-actions.pod:1420
10745 msgid "Return the command trace flag."
10750 #: ../src/guestfs-actions.pod:2102
10751 msgid "guestfs_get_umask"
10756 #: ../src/guestfs-actions.pod:2104
10760 " guestfs_get_umask (guestfs_h *g);\n"
10766 #: ../src/guestfs-actions.pod:2107
10768 "Return the current umask. By default the umask is C<022> unless it has been "
10769 "set by calling C<guestfs_umask>."
10774 #: ../src/guestfs-actions.pod:2114
10775 msgid "guestfs_get_verbose"
10780 #: ../src/guestfs-actions.pod:2116
10784 " guestfs_get_verbose (guestfs_h *g);\n"
10790 #: ../src/guestfs-actions.pod:2119 ../fish/guestfish-actions.pod:1433
10791 msgid "This returns the verbose messages flag."
10796 #: ../src/guestfs-actions.pod:2125
10797 msgid "guestfs_getcon"
10802 #: ../src/guestfs-actions.pod:2127
10806 " guestfs_getcon (guestfs_h *g);\n"
10812 #: ../src/guestfs-actions.pod:2130 ../fish/guestfish-actions.pod:1439
10813 msgid "This gets the SELinux security context of the daemon."
10818 #: ../src/guestfs-actions.pod:2132
10820 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
10825 #: ../src/guestfs-actions.pod:2140
10826 msgid "guestfs_getxattr"
10831 #: ../src/guestfs-actions.pod:2142
10835 " guestfs_getxattr (guestfs_h *g,\n"
10836 " const char *path,\n"
10837 " const char *name,\n"
10838 " size_t *size_r);\n"
10844 #: ../src/guestfs-actions.pod:2148
10846 "Get a single extended attribute from file C<path> named C<name>. This call "
10847 "follows symlinks. If you want to lookup an extended attribute for the "
10848 "symlink itself, use C<guestfs_lgetxattr>."
10853 #: ../src/guestfs-actions.pod:2152 ../src/guestfs-actions.pod:3521
10855 "Normally it is better to get all extended attributes from a file in one go "
10856 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
10857 "implementations are buggy and do not provide a way to list out attributes. "
10858 "For these filesystems (notably ntfs-3g) you have to know the names of the "
10859 "extended attributes you want in advance and call this function."
10864 #: ../src/guestfs-actions.pod:2159 ../src/guestfs-actions.pod:3528
10865 #: ../fish/guestfish-actions.pod:1459 ../fish/guestfish-actions.pod:2465
10867 "Extended attribute values are blobs of binary data. If there is no extended "
10868 "attribute named C<name>, this returns an error."
10873 #: ../src/guestfs-actions.pod:2162
10874 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
10879 #: ../src/guestfs-actions.pod:2164 ../src/guestfs-actions.pod:2355
10880 #: ../src/guestfs-actions.pod:3533 ../src/guestfs-actions.pod:5250
10881 #: ../src/guestfs-actions.pod:5276 ../src/guestfs-actions.pod:5457
10883 "This function returns a buffer, or NULL on error. The size of the returned "
10884 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
10889 #: ../src/guestfs-actions.pod:2168 ../src/guestfs-actions.pod:3537
10890 msgid "(Added in 1.7.24)"
10895 #: ../src/guestfs-actions.pod:2170
10896 msgid "guestfs_getxattrs"
10901 #: ../src/guestfs-actions.pod:2172
10904 " struct guestfs_xattr_list *\n"
10905 " guestfs_getxattrs (guestfs_h *g,\n"
10906 " const char *path);\n"
10912 #: ../src/guestfs-actions.pod:2176 ../fish/guestfish-actions.pod:1468
10914 "This call lists the extended attributes of the file or directory C<path>."
10919 #: ../src/guestfs-actions.pod:2179 ../fish/guestfish-actions.pod:1471
10921 "At the system call level, this is a combination of the L<listxattr(2)> and "
10922 "L<getxattr(2)> calls."
10927 #: ../src/guestfs-actions.pod:2182
10928 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
10933 #: ../src/guestfs-actions.pod:2184 ../src/guestfs-actions.pod:3549
10934 #: ../src/guestfs-actions.pod:4200
10936 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
10937 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
10942 #: ../src/guestfs-actions.pod:2188 ../src/guestfs-actions.pod:3553
10943 #: ../src/guestfs-actions.pod:3718 ../src/guestfs-actions.pod:3754
10944 #: ../src/guestfs-actions.pod:5630 ../src/guestfs-actions.pod:6118
10945 #: ../src/guestfs-actions.pod:7453
10946 msgid "(Added in 1.0.59)"
10951 #: ../src/guestfs-actions.pod:2190
10952 msgid "guestfs_glob_expand"
10957 #: ../src/guestfs-actions.pod:2192
10961 " guestfs_glob_expand (guestfs_h *g,\n"
10962 " const char *pattern);\n"
10968 #: ../src/guestfs-actions.pod:2196 ../fish/guestfish-actions.pod:1480
10970 "This command searches for all the pathnames matching C<pattern> according to "
10971 "the wildcard expansion rules used by the shell."
10976 #: ../src/guestfs-actions.pod:2200 ../fish/guestfish-actions.pod:1484
10978 "If no paths match, then this returns an empty list (note: not an error)."
10983 #: ../src/guestfs-actions.pod:2203 ../fish/guestfish-actions.pod:1487
10985 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
10986 "GLOB_BRACE>. See that manual page for more details."
10991 #: ../src/guestfs-actions.pod:2211 ../src/guestfs-actions.pod:6283
10992 #: ../src/guestfs-actions.pod:6300
10993 msgid "(Added in 1.0.50)"
10998 #: ../src/guestfs-actions.pod:2213
10999 msgid "guestfs_grep"
11004 #: ../src/guestfs-actions.pod:2215
11008 " guestfs_grep (guestfs_h *g,\n"
11009 " const char *regex,\n"
11010 " const char *path);\n"
11016 #: ../src/guestfs-actions.pod:2220 ../fish/guestfish-actions.pod:1495
11017 msgid "This calls the external C<grep> program and returns the matching lines."
11022 #: ../src/guestfs-actions.pod:2232
11023 msgid "guestfs_grepi"
11028 #: ../src/guestfs-actions.pod:2234
11032 " guestfs_grepi (guestfs_h *g,\n"
11033 " const char *regex,\n"
11034 " const char *path);\n"
11040 #: ../src/guestfs-actions.pod:2239 ../fish/guestfish-actions.pod:1505
11042 "This calls the external C<grep -i> program and returns the matching lines."
11047 #: ../src/guestfs-actions.pod:2251
11048 msgid "guestfs_grub_install"
11053 #: ../src/guestfs-actions.pod:2253
11057 " guestfs_grub_install (guestfs_h *g,\n"
11058 " const char *root,\n"
11059 " const char *device);\n"
11065 #: ../src/guestfs-actions.pod:2258 ../fish/guestfish-actions.pod:1515
11067 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
11068 "the root directory being C<root>."
11073 #: ../src/guestfs-actions.pod:2261 ../fish/guestfish-actions.pod:1518
11075 "Note: If grub-install reports the error \"No suitable drive was found in the "
11076 "generated device map.\" it may be that you need to create a C</boot/grub/"
11077 "device.map> file first that contains the mapping between grub device names "
11078 "and Linux device names. It is usually sufficient to create a file "
11084 #: ../src/guestfs-actions.pod:2268 ../fish/guestfish-actions.pod:1525
11087 " (hd0) /dev/vda\n"
11093 #: ../src/guestfs-actions.pod:2270 ../fish/guestfish-actions.pod:1527
11094 msgid "replacing C</dev/vda> with the name of the installation device."
11099 #: ../src/guestfs-actions.pod:2274
11100 msgid "(Added in 1.0.17)"
11105 #: ../src/guestfs-actions.pod:2276
11106 msgid "guestfs_head"
11111 #: ../src/guestfs-actions.pod:2278
11115 " guestfs_head (guestfs_h *g,\n"
11116 " const char *path);\n"
11122 #: ../src/guestfs-actions.pod:2282 ../fish/guestfish-actions.pod:1533
11124 "This command returns up to the first 10 lines of a file as a list of strings."
11129 #: ../src/guestfs-actions.pod:2294
11130 msgid "guestfs_head_n"
11135 #: ../src/guestfs-actions.pod:2296
11139 " guestfs_head_n (guestfs_h *g,\n"
11141 " const char *path);\n"
11147 #: ../src/guestfs-actions.pod:2301 ../fish/guestfish-actions.pod:1543
11149 "If the parameter C<nrlines> is a positive number, this returns the first "
11150 "C<nrlines> lines of the file C<path>."
11155 #: ../src/guestfs-actions.pod:2304 ../fish/guestfish-actions.pod:1546
11157 "If the parameter C<nrlines> is a negative number, this returns lines from "
11158 "the file C<path>, excluding the last C<nrlines> lines."
11163 #: ../src/guestfs-actions.pod:2307 ../src/guestfs-actions.pod:6580
11164 #: ../fish/guestfish-actions.pod:1549 ../fish/guestfish-actions.pod:4435
11165 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
11170 #: ../src/guestfs-actions.pod:2318
11171 msgid "guestfs_hexdump"
11176 #: ../src/guestfs-actions.pod:2320
11180 " guestfs_hexdump (guestfs_h *g,\n"
11181 " const char *path);\n"
11187 #: ../src/guestfs-actions.pod:2324 ../fish/guestfish-actions.pod:1558
11189 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
11190 "readable, canonical hex dump of the file."
11195 #: ../src/guestfs-actions.pod:2333 ../src/guestfs-actions.pod:6364
11196 #: ../src/guestfs-actions.pod:6419
11197 msgid "(Added in 1.0.22)"
11202 #: ../src/guestfs-actions.pod:2335
11203 msgid "guestfs_initrd_cat"
11208 #: ../src/guestfs-actions.pod:2337
11212 " guestfs_initrd_cat (guestfs_h *g,\n"
11213 " const char *initrdpath,\n"
11214 " const char *filename,\n"
11215 " size_t *size_r);\n"
11221 #: ../src/guestfs-actions.pod:2343 ../fish/guestfish-actions.pod:1568
11223 "This command unpacks the file C<filename> from the initrd file called "
11224 "C<initrdpath>. The filename must be given I<without> the initial C</> "
11230 #: ../src/guestfs-actions.pod:2347 ../fish/guestfish-actions.pod:1572
11232 "For example, in guestfish you could use the following command to examine the "
11233 "boot script (usually called C</init>) contained in a Linux initrd or "
11239 #: ../src/guestfs-actions.pod:2351 ../fish/guestfish-actions.pod:1576
11242 " initrd-cat /boot/initrd-<version>.img init\n"
11248 #: ../src/guestfs-actions.pod:2353
11249 msgid "See also C<guestfs_initrd_list>."
11254 #: ../src/guestfs-actions.pod:2364
11255 msgid "guestfs_initrd_list"
11260 #: ../src/guestfs-actions.pod:2366
11264 " guestfs_initrd_list (guestfs_h *g,\n"
11265 " const char *path);\n"
11271 #: ../src/guestfs-actions.pod:2370 ../fish/guestfish-actions.pod:1587
11272 msgid "This command lists out files contained in an initrd."
11277 #: ../src/guestfs-actions.pod:2372 ../fish/guestfish-actions.pod:1589
11279 "The files are listed without any initial C</> character. The files are "
11280 "listed in the order they appear (not necessarily alphabetical). Directory "
11281 "names are listed as separate items."
11286 #: ../src/guestfs-actions.pod:2376 ../fish/guestfish-actions.pod:1593
11288 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
11289 "initrd. We I<only> support the newer initramfs format (compressed cpio "
11295 #: ../src/guestfs-actions.pod:2386
11296 msgid "guestfs_inotify_add_watch"
11301 #: ../src/guestfs-actions.pod:2388
11305 " guestfs_inotify_add_watch (guestfs_h *g,\n"
11306 " const char *path,\n"
11313 #: ../src/guestfs-actions.pod:2393 ../fish/guestfish-actions.pod:1601
11314 msgid "Watch C<path> for the events listed in C<mask>."
11319 #: ../src/guestfs-actions.pod:2395 ../fish/guestfish-actions.pod:1603
11321 "Note that if C<path> is a directory then events within that directory are "
11322 "watched, but this does I<not> happen recursively (in subdirectories)."
11327 #: ../src/guestfs-actions.pod:2399 ../fish/guestfish-actions.pod:1607
11329 "Note for non-C or non-Linux callers: the inotify events are defined by the "
11330 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
11335 #: ../src/guestfs-actions.pod:2407
11336 msgid "guestfs_inotify_close"
11341 #: ../src/guestfs-actions.pod:2409
11345 " guestfs_inotify_close (guestfs_h *g);\n"
11351 #: ../src/guestfs-actions.pod:2412 ../fish/guestfish-actions.pod:1615
11353 "This closes the inotify handle which was previously opened by inotify_init. "
11354 "It removes all watches, throws away any pending events, and deallocates all "
11360 #: ../src/guestfs-actions.pod:2420
11361 msgid "guestfs_inotify_files"
11366 #: ../src/guestfs-actions.pod:2422
11370 " guestfs_inotify_files (guestfs_h *g);\n"
11376 #: ../src/guestfs-actions.pod:2425
11378 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
11379 "returns a list of pathnames of objects that were touched. The returned "
11380 "pathnames are sorted and deduplicated."
11385 #: ../src/guestfs-actions.pod:2435
11386 msgid "guestfs_inotify_init"
11391 #: ../src/guestfs-actions.pod:2437
11395 " guestfs_inotify_init (guestfs_h *g,\n"
11396 " int maxevents);\n"
11402 #: ../src/guestfs-actions.pod:2441 ../fish/guestfish-actions.pod:1631
11404 "This command creates a new inotify handle. The inotify subsystem can be "
11405 "used to notify events which happen to objects in the guest filesystem."
11410 #: ../src/guestfs-actions.pod:2445
11412 "C<maxevents> is the maximum number of events which will be queued up between "
11413 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
11414 "passed as C<0>, then the kernel (or previously set) default is used. For "
11415 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
11416 "throws away events, but records the fact that it threw them away by setting "
11417 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
11418 "C<guestfs_inotify_read>)."
11423 #: ../src/guestfs-actions.pod:2455
11425 "Before any events are generated, you have to add some watches to the "
11426 "internal watch list. See: C<guestfs_inotify_add_watch>, "
11427 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
11432 #: ../src/guestfs-actions.pod:2461
11434 "Queued up events should be read periodically by calling "
11435 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
11436 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
11437 "often enough then you risk the internal queue overflowing."
11442 #: ../src/guestfs-actions.pod:2468
11444 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
11445 "This also removes any watches automatically."
11450 #: ../src/guestfs-actions.pod:2472 ../fish/guestfish-actions.pod:1662
11452 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
11453 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
11454 "that there is one global inotify handle per libguestfs instance."
11459 #: ../src/guestfs-actions.pod:2481
11460 msgid "guestfs_inotify_read"
11465 #: ../src/guestfs-actions.pod:2483
11468 " struct guestfs_inotify_event_list *\n"
11469 " guestfs_inotify_read (guestfs_h *g);\n"
11475 #: ../src/guestfs-actions.pod:2486 ../fish/guestfish-actions.pod:1671
11477 "Return the complete queue of events that have happened since the previous "
11483 #: ../src/guestfs-actions.pod:2489 ../fish/guestfish-actions.pod:1674
11484 msgid "If no events have happened, this returns an empty list."
11489 #: ../src/guestfs-actions.pod:2491 ../fish/guestfish-actions.pod:1676
11491 "I<Note>: In order to make sure that all events have been read, you must call "
11492 "this function repeatedly until it returns an empty list. The reason is that "
11493 "the call will read events up to the maximum appliance-to-host message size "
11494 "and leave remaining events in the queue."
11499 #: ../src/guestfs-actions.pod:2497
11501 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
11502 "there was an error. I<The caller must call "
11503 "C<guestfs_free_inotify_event_list> after use>."
11508 #: ../src/guestfs-actions.pod:2503
11509 msgid "guestfs_inotify_rm_watch"
11514 #: ../src/guestfs-actions.pod:2505
11518 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
11525 #: ../src/guestfs-actions.pod:2509
11527 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
11532 #: ../src/guestfs-actions.pod:2516
11533 msgid "guestfs_inspect_get_arch"
11538 #: ../src/guestfs-actions.pod:2518
11542 " guestfs_inspect_get_arch (guestfs_h *g,\n"
11543 " const char *root);\n"
11549 #: ../src/guestfs-actions.pod:2522 ../src/guestfs-actions.pod:2545
11550 #: ../src/guestfs-actions.pod:2638 ../src/guestfs-actions.pod:2682
11551 #: ../src/guestfs-actions.pod:2708 ../src/guestfs-actions.pod:2747
11552 #: ../src/guestfs-actions.pod:2769 ../src/guestfs-actions.pod:2796
11553 #: ../src/guestfs-actions.pod:2817 ../src/guestfs-actions.pod:2860
11554 #: ../src/guestfs-actions.pod:2889 ../src/guestfs-actions.pod:2920
11555 #: ../src/guestfs-actions.pod:2944 ../src/guestfs-actions.pod:2999
11556 #: ../src/guestfs-actions.pod:3041 ../src/guestfs-actions.pod:3062
11557 #: ../src/guestfs-actions.pod:3085 ../src/guestfs-actions.pod:3102
11558 #: ../src/guestfs-actions.pod:3119 ../src/guestfs-actions.pod:3138
11560 "This function should only be called with a root device string as returned by "
11561 "C<guestfs_inspect_os>."
11566 #: ../src/guestfs-actions.pod:2525
11568 "This returns the architecture of the inspected operating system. The "
11569 "possible return values are listed under C<guestfs_file_architecture>."
11574 #: ../src/guestfs-actions.pod:2529 ../fish/guestfish-actions.pod:1700
11576 "If the architecture could not be determined, then the string C<unknown> is "
11582 #: ../src/guestfs-actions.pod:2532 ../src/guestfs-actions.pod:2625
11583 #: ../src/guestfs-actions.pod:2736 ../src/guestfs-actions.pod:2756
11584 #: ../src/guestfs-actions.pod:2784 ../src/guestfs-actions.pod:2876
11585 #: ../src/guestfs-actions.pod:2907 ../src/guestfs-actions.pod:2931
11586 #: ../src/guestfs-actions.pod:2985 ../src/guestfs-actions.pod:3028
11587 #: ../src/guestfs-actions.pod:3051 ../src/guestfs-actions.pod:3072
11588 #: ../src/guestfs-actions.pod:3092 ../src/guestfs-actions.pod:3109
11589 #: ../src/guestfs-actions.pod:3128 ../src/guestfs-actions.pod:3231
11590 #: ../src/guestfs-actions.pod:3272 ../fish/guestfish-actions.pod:1703
11591 #: ../fish/guestfish-actions.pod:1789 ../fish/guestfish-actions.pod:1877
11592 #: ../fish/guestfish-actions.pod:1892 ../fish/guestfish-actions.pod:1913
11593 #: ../fish/guestfish-actions.pod:1983 ../fish/guestfish-actions.pod:2007
11594 #: ../fish/guestfish-actions.pod:2024 ../fish/guestfish-actions.pod:2067
11595 #: ../fish/guestfish-actions.pod:2102 ../fish/guestfish-actions.pod:2118
11596 #: ../fish/guestfish-actions.pod:2134 ../fish/guestfish-actions.pod:2147
11597 #: ../fish/guestfish-actions.pod:2160 ../fish/guestfish-actions.pod:2175
11598 #: ../fish/guestfish-actions.pod:2274 ../fish/guestfish-actions.pod:2308
11599 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
11604 #: ../src/guestfs-actions.pod:2539
11605 msgid "guestfs_inspect_get_distro"
11610 #: ../src/guestfs-actions.pod:2541
11614 " guestfs_inspect_get_distro (guestfs_h *g,\n"
11615 " const char *root);\n"
11621 #: ../src/guestfs-actions.pod:2548 ../fish/guestfish-actions.pod:1712
11623 "This returns the distro (distribution) of the inspected operating system."
11628 #: ../src/guestfs-actions.pod:2551 ../fish/guestfish-actions.pod:1715
11629 msgid "Currently defined distros are:"
11634 #: ../src/guestfs-actions.pod:2555 ../fish/guestfish-actions.pod:1719
11635 msgid "\"archlinux\""
11640 #: ../src/guestfs-actions.pod:2557 ../fish/guestfish-actions.pod:1721
11641 msgid "Arch Linux."
11645 #: ../src/guestfs-actions.pod:2559 ../fish/guestfish-actions.pod:1723
11650 #: ../src/guestfs-actions.pod:2561 ../fish/guestfish-actions.pod:1725
11656 #: ../src/guestfs-actions.pod:2563 ../fish/guestfish-actions.pod:1727
11662 #: ../src/guestfs-actions.pod:2565 ../fish/guestfish-actions.pod:1729
11668 #: ../src/guestfs-actions.pod:2567 ../fish/guestfish-actions.pod:1731
11674 #: ../src/guestfs-actions.pod:2569 ../fish/guestfish-actions.pod:1733
11680 #: ../src/guestfs-actions.pod:2571 ../fish/guestfish-actions.pod:1735
11686 #: ../src/guestfs-actions.pod:2573 ../fish/guestfish-actions.pod:1737
11692 #: ../src/guestfs-actions.pod:2575 ../fish/guestfish-actions.pod:1739
11693 msgid "\"linuxmint\""
11698 #: ../src/guestfs-actions.pod:2577 ../fish/guestfish-actions.pod:1741
11699 msgid "Linux Mint."
11704 #: ../src/guestfs-actions.pod:2579 ../fish/guestfish-actions.pod:1743
11705 msgid "\"mandriva\""
11710 #: ../src/guestfs-actions.pod:2581 ../fish/guestfish-actions.pod:1745
11716 #: ../src/guestfs-actions.pod:2583 ../fish/guestfish-actions.pod:1747
11722 #: ../src/guestfs-actions.pod:2585 ../fish/guestfish-actions.pod:1749
11728 #: ../src/guestfs-actions.pod:2587 ../fish/guestfish-actions.pod:1751
11734 #: ../src/guestfs-actions.pod:2589 ../fish/guestfish-actions.pod:1753
11740 #: ../src/guestfs-actions.pod:2591 ../fish/guestfish-actions.pod:1755
11741 msgid "\"redhat-based\""
11746 #: ../src/guestfs-actions.pod:2593 ../fish/guestfish-actions.pod:1757
11747 msgid "Some Red Hat-derived distro."
11752 #: ../src/guestfs-actions.pod:2595 ../fish/guestfish-actions.pod:1759
11757 #: ../src/guestfs-actions.pod:2597 ../fish/guestfish-actions.pod:1761
11758 msgid "Red Hat Enterprise Linux."
11762 #: ../src/guestfs-actions.pod:2599 ../fish/guestfish-actions.pod:1763
11763 msgid "\"scientificlinux\""
11767 #: ../src/guestfs-actions.pod:2601 ../fish/guestfish-actions.pod:1765
11768 msgid "Scientific Linux."
11772 #: ../src/guestfs-actions.pod:2603 ../fish/guestfish-actions.pod:1767
11773 msgid "\"slackware\""
11777 #: ../src/guestfs-actions.pod:2605 ../fish/guestfish-actions.pod:1769
11783 #: ../src/guestfs-actions.pod:2607 ../fish/guestfish-actions.pod:1771
11789 #: ../src/guestfs-actions.pod:2609 ../fish/guestfish-actions.pod:1773
11795 #: ../src/guestfs-actions.pod:2611 ../src/guestfs-actions.pod:2727
11796 #: ../src/guestfs-actions.pod:3019 ../fish/guestfish-actions.pod:1775
11797 #: ../fish/guestfish-actions.pod:1868 ../fish/guestfish-actions.pod:2093
11798 msgid "\"unknown\""
11803 #: ../src/guestfs-actions.pod:2613 ../fish/guestfish-actions.pod:1777
11804 msgid "The distro could not be determined."
11809 #: ../src/guestfs-actions.pod:2615 ../src/guestfs-actions.pod:3011
11810 #: ../fish/guestfish-actions.pod:1779 ../fish/guestfish-actions.pod:2085
11811 msgid "\"windows\""
11816 #: ../src/guestfs-actions.pod:2617 ../fish/guestfish-actions.pod:1781
11818 "Windows does not have distributions. This string is returned if the OS type "
11824 #: ../src/guestfs-actions.pod:2622 ../src/guestfs-actions.pod:2733
11825 #: ../src/guestfs-actions.pod:3025 ../fish/guestfish-actions.pod:1786
11826 #: ../fish/guestfish-actions.pod:1874 ../fish/guestfish-actions.pod:2099
11828 "Future versions of libguestfs may return other strings here. The caller "
11829 "should be prepared to handle any string."
11833 #: ../src/guestfs-actions.pod:2632
11834 msgid "guestfs_inspect_get_drive_mappings"
11838 #: ../src/guestfs-actions.pod:2634
11842 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
11843 " const char *root);\n"
11848 #: ../src/guestfs-actions.pod:2641 ../fish/guestfish-actions.pod:1798
11850 "This call is useful for Windows which uses a primitive system of assigning "
11851 "drive letters (like \"C:\") to partitions. This inspection API examines the "
11852 "Windows Registry to find out how disks/partitions are mapped to drive "
11853 "letters, and returns a hash table as in the example below:"
11857 #: ../src/guestfs-actions.pod:2647 ../fish/guestfish-actions.pod:1804
11860 " C => /dev/vda2\n"
11861 " E => /dev/vdb1\n"
11862 " F => /dev/vdc1\n"
11867 #: ../src/guestfs-actions.pod:2651 ../fish/guestfish-actions.pod:1808
11869 "Note that keys are drive letters. For Windows, the key is case insensitive "
11870 "and just contains the drive letter, without the customary colon separator "
11875 #: ../src/guestfs-actions.pod:2655 ../fish/guestfish-actions.pod:1812
11877 "In future we may support other operating systems that also used drive "
11878 "letters, but the keys for those might not be case insensitive and might be "
11879 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
11884 #: ../src/guestfs-actions.pod:2660 ../fish/guestfish-actions.pod:1817
11886 "For Windows guests, currently only hard drive mappings are returned. "
11887 "Removable disks (eg. DVD-ROMs) are ignored."
11891 #: ../src/guestfs-actions.pod:2663 ../fish/guestfish-actions.pod:1820
11893 "For guests that do not use drive mappings, or if the drive mappings could "
11894 "not be determined, this returns an empty hash table."
11898 #: ../src/guestfs-actions.pod:2666
11900 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
11901 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
11906 #: ../src/guestfs-actions.pod:2670 ../src/guestfs-actions.pod:2846
11907 #: ../src/guestfs-actions.pod:3606 ../src/guestfs-actions.pod:4816
11908 #: ../src/guestfs-actions.pod:6721
11910 "This function returns a NULL-terminated array of strings, or NULL if there "
11911 "was an error. The array of strings will always have length C<2n+1>, where "
11912 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
11913 "caller must free the strings and the array after use>."
11918 #: ../src/guestfs-actions.pod:2676
11919 msgid "guestfs_inspect_get_filesystems"
11924 #: ../src/guestfs-actions.pod:2678
11928 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
11929 " const char *root);\n"
11935 #: ../src/guestfs-actions.pod:2685 ../fish/guestfish-actions.pod:1834
11937 "This returns a list of all the filesystems that we think are associated with "
11938 "this operating system. This includes the root filesystem, other ordinary "
11939 "filesystems, and non-mounted devices like swap partitions."
11944 #: ../src/guestfs-actions.pod:2690 ../fish/guestfish-actions.pod:1839
11946 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
11947 "to be shared between operating systems."
11952 #: ../src/guestfs-actions.pod:2693
11954 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
11955 "C<guestfs_inspect_get_mountpoints>."
11959 #: ../src/guestfs-actions.pod:2702
11960 msgid "guestfs_inspect_get_format"
11964 #: ../src/guestfs-actions.pod:2704
11968 " guestfs_inspect_get_format (guestfs_h *g,\n"
11969 " const char *root);\n"
11974 #: ../src/guestfs-actions.pod:2711 ../fish/guestfish-actions.pod:1852
11976 "This returns the format of the inspected operating system. You can use it "
11977 "to detect install images, live CDs and similar."
11981 #: ../src/guestfs-actions.pod:2714 ../fish/guestfish-actions.pod:1855
11982 msgid "Currently defined formats are:"
11986 #: ../src/guestfs-actions.pod:2718 ../fish/guestfish-actions.pod:1859
11987 msgid "\"installed\""
11991 #: ../src/guestfs-actions.pod:2720 ../fish/guestfish-actions.pod:1861
11992 msgid "This is an installed operating system."
11996 #: ../src/guestfs-actions.pod:2722 ../fish/guestfish-actions.pod:1863
11997 msgid "\"installer\""
12001 #: ../src/guestfs-actions.pod:2724 ../fish/guestfish-actions.pod:1865
12003 "The disk image being inspected is not an installed operating system, but a "
12004 "I<bootable> install disk, live CD, or similar."
12008 #: ../src/guestfs-actions.pod:2729 ../fish/guestfish-actions.pod:1870
12009 msgid "The format of this disk image is not known."
12014 #: ../src/guestfs-actions.pod:2741
12015 msgid "guestfs_inspect_get_hostname"
12020 #: ../src/guestfs-actions.pod:2743
12024 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
12025 " const char *root);\n"
12031 #: ../src/guestfs-actions.pod:2750 ../fish/guestfish-actions.pod:1886
12033 "This function returns the hostname of the operating system as found by "
12034 "inspection of the guest's configuration files."
12039 #: ../src/guestfs-actions.pod:2753 ../fish/guestfish-actions.pod:1889
12041 "If the hostname could not be determined, then the string C<unknown> is "
12047 #: ../src/guestfs-actions.pod:2761
12048 msgid "(Added in 1.7.9)"
12053 #: ../src/guestfs-actions.pod:2763
12054 msgid "guestfs_inspect_get_major_version"
12059 #: ../src/guestfs-actions.pod:2765
12063 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
12064 " const char *root);\n"
12070 #: ../src/guestfs-actions.pod:2772 ../fish/guestfish-actions.pod:1901
12072 "This returns the major version number of the inspected operating system."
12077 #: ../src/guestfs-actions.pod:2775 ../fish/guestfish-actions.pod:1904
12079 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
12080 "popular public names used by the operating system. Notably the operating "
12081 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
12082 "1). You can find out the real versions corresponding to releases of Windows "
12083 "by consulting Wikipedia or MSDN."
12088 #: ../src/guestfs-actions.pod:2782 ../src/guestfs-actions.pod:2802
12089 #: ../fish/guestfish-actions.pod:1911 ../fish/guestfish-actions.pod:1925
12090 msgid "If the version could not be determined, then C<0> is returned."
12095 #: ../src/guestfs-actions.pod:2790
12096 msgid "guestfs_inspect_get_minor_version"
12101 #: ../src/guestfs-actions.pod:2792
12105 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
12106 " const char *root);\n"
12112 #: ../src/guestfs-actions.pod:2799 ../fish/guestfish-actions.pod:1922
12114 "This returns the minor version number of the inspected operating system."
12119 #: ../src/guestfs-actions.pod:2804
12121 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
12122 "C<guestfs_inspect_get_major_version>."
12127 #: ../src/guestfs-actions.pod:2811
12128 msgid "guestfs_inspect_get_mountpoints"
12133 #: ../src/guestfs-actions.pod:2813
12137 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
12138 " const char *root);\n"
12143 #: ../src/guestfs-actions.pod:2820 ../fish/guestfish-actions.pod:1937
12145 "This returns a hash of where we think the filesystems associated with this "
12146 "operating system should be mounted. Callers should note that this is at "
12147 "best an educated guess made by reading configuration files such as C</etc/"
12148 "fstab>. I<In particular note> that this may return filesystems which are "
12149 "non-existent or not mountable and callers should be prepared to handle or "
12150 "ignore failures if they try to mount them."
12155 #: ../src/guestfs-actions.pod:2829 ../fish/guestfish-actions.pod:1946
12157 "Each element in the returned hashtable has a key which is the path of the "
12158 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
12159 "mounted there (eg. C</dev/sda1>)."
12164 #: ../src/guestfs-actions.pod:2834 ../fish/guestfish-actions.pod:1951
12166 "Non-mounted devices such as swap devices are I<not> returned in this list."
12170 #: ../src/guestfs-actions.pod:2837
12172 "For operating systems like Windows which still use drive letters, this call "
12173 "will only return an entry for the first drive \"mounted on\" C</>. For "
12174 "information about the mapping of drive letters to partitions, see "
12175 "C<guestfs_inspect_get_drive_mappings>."
12180 #: ../src/guestfs-actions.pod:2843
12182 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
12183 "C<guestfs_inspect_get_filesystems>."
12188 #: ../src/guestfs-actions.pod:2854
12189 msgid "guestfs_inspect_get_package_format"
12194 #: ../src/guestfs-actions.pod:2856
12198 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
12199 " const char *root);\n"
12205 #: ../src/guestfs-actions.pod:2863
12207 "This function and C<guestfs_inspect_get_package_management> return the "
12208 "package format and package management tool used by the inspected operating "
12209 "system. For example for Fedora these functions would return C<rpm> (package "
12210 "format) and C<yum> (package management)."
12215 #: ../src/guestfs-actions.pod:2869 ../fish/guestfish-actions.pod:1976
12217 "This returns the string C<unknown> if we could not determine the package "
12218 "format I<or> if the operating system does not have a real packaging system "
12224 #: ../src/guestfs-actions.pod:2873 ../fish/guestfish-actions.pod:1980
12226 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>. "
12227 "Future versions of libguestfs may return other strings."
12232 #: ../src/guestfs-actions.pod:2881 ../src/guestfs-actions.pod:2912
12233 msgid "(Added in 1.7.5)"
12238 #: ../src/guestfs-actions.pod:2883
12239 msgid "guestfs_inspect_get_package_management"
12244 #: ../src/guestfs-actions.pod:2885
12248 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
12249 " const char *root);\n"
12255 #: ../src/guestfs-actions.pod:2892
12257 "C<guestfs_inspect_get_package_format> and this function return the package "
12258 "format and package management tool used by the inspected operating system. "
12259 "For example for Fedora these functions would return C<rpm> (package format) "
12260 "and C<yum> (package management)."
12265 #: ../src/guestfs-actions.pod:2898 ../fish/guestfish-actions.pod:1998
12267 "This returns the string C<unknown> if we could not determine the package "
12268 "management tool I<or> if the operating system does not have a real packaging "
12269 "system (eg. Windows)."
12274 #: ../src/guestfs-actions.pod:2902 ../fish/guestfish-actions.pod:2002
12276 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
12277 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>. Future versions of "
12278 "libguestfs may return other strings."
12283 #: ../src/guestfs-actions.pod:2914
12284 msgid "guestfs_inspect_get_product_name"
12289 #: ../src/guestfs-actions.pod:2916
12293 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
12294 " const char *root);\n"
12300 #: ../src/guestfs-actions.pod:2923 ../fish/guestfish-actions.pod:2016
12302 "This returns the product name of the inspected operating system. The "
12303 "product name is generally some freeform string which can be displayed to the "
12304 "user, but should not be parsed by programs."
12309 #: ../src/guestfs-actions.pod:2928 ../fish/guestfish-actions.pod:2021
12311 "If the product name could not be determined, then the string C<unknown> is "
12316 #: ../src/guestfs-actions.pod:2938
12317 msgid "guestfs_inspect_get_product_variant"
12321 #: ../src/guestfs-actions.pod:2940
12325 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
12326 " const char *root);\n"
12331 #: ../src/guestfs-actions.pod:2947 ../fish/guestfish-actions.pod:2033
12332 msgid "This returns the product variant of the inspected operating system."
12336 #: ../src/guestfs-actions.pod:2950 ../fish/guestfish-actions.pod:2036
12338 "For Windows guests, this returns the contents of the Registry key C<HKLM"
12339 "\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> which "
12340 "is usually a string such as C<Client> or C<Server> (other values are "
12341 "possible). This can be used to distinguish consumer and enterprise versions "
12342 "of Windows that have the same version number (for example, Windows 7 and "
12343 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
12344 "the latter is C<Server>)."
12348 #: ../src/guestfs-actions.pod:2959 ../fish/guestfish-actions.pod:2045
12350 "For enterprise Linux guests, in future we intend this to return the product "
12351 "variant such as C<Desktop>, C<Server> and so on. But this is not "
12352 "implemented at present."
12356 #: ../src/guestfs-actions.pod:2963 ../fish/guestfish-actions.pod:2049
12358 "If the product variant could not be determined, then the string C<unknown> "
12363 #: ../src/guestfs-actions.pod:2966
12365 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
12366 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
12371 #: ../src/guestfs-actions.pod:2973
12372 msgid "guestfs_inspect_get_roots"
12377 #: ../src/guestfs-actions.pod:2975
12381 " guestfs_inspect_get_roots (guestfs_h *g);\n"
12387 #: ../src/guestfs-actions.pod:2978
12389 "This function is a convenient way to get the list of root devices, as "
12390 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
12391 "the whole inspection process."
12396 #: ../src/guestfs-actions.pod:2982
12398 "This returns an empty list if either no root devices were found or the "
12399 "caller has not called C<guestfs_inspect_os>."
12404 #: ../src/guestfs-actions.pod:2991
12405 msgid "(Added in 1.7.3)"
12410 #: ../src/guestfs-actions.pod:2993
12411 msgid "guestfs_inspect_get_type"
12416 #: ../src/guestfs-actions.pod:2995
12420 " guestfs_inspect_get_type (guestfs_h *g,\n"
12421 " const char *root);\n"
12427 #: ../src/guestfs-actions.pod:3002 ../fish/guestfish-actions.pod:2076
12429 "This returns the type of the inspected operating system. Currently defined "
12435 #: ../src/guestfs-actions.pod:3007 ../fish/guestfish-actions.pod:2081
12441 #: ../src/guestfs-actions.pod:3009 ../fish/guestfish-actions.pod:2083
12442 msgid "Any Linux-based operating system."
12447 #: ../src/guestfs-actions.pod:3013 ../fish/guestfish-actions.pod:2087
12448 msgid "Any Microsoft Windows operating system."
12453 #: ../src/guestfs-actions.pod:3015 ../fish/guestfish-actions.pod:2089
12454 msgid "\"freebsd\""
12459 #: ../src/guestfs-actions.pod:3017 ../fish/guestfish-actions.pod:2091
12465 #: ../src/guestfs-actions.pod:3021 ../fish/guestfish-actions.pod:2095
12466 msgid "The operating system type could not be determined."
12470 #: ../src/guestfs-actions.pod:3035
12471 msgid "guestfs_inspect_get_windows_current_control_set"
12475 #: ../src/guestfs-actions.pod:3037
12479 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
12480 " const char *root);\n"
12485 #: ../src/guestfs-actions.pod:3044 ../fish/guestfish-actions.pod:2111
12487 "This returns the Windows CurrentControlSet of the inspected guest. The "
12488 "CurrentControlSet is a registry key name such as C<ControlSet001>."
12492 #: ../src/guestfs-actions.pod:3047 ../fish/guestfish-actions.pod:2114
12494 "This call assumes that the guest is Windows and that the Registry could be "
12495 "examined by inspection. If this is not the case then an error is returned."
12500 #: ../src/guestfs-actions.pod:3056
12501 msgid "guestfs_inspect_get_windows_systemroot"
12506 #: ../src/guestfs-actions.pod:3058
12510 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
12511 " const char *root);\n"
12517 #: ../src/guestfs-actions.pod:3065 ../fish/guestfish-actions.pod:2127
12519 "This returns the Windows systemroot of the inspected guest. The systemroot "
12520 "is a directory path such as C</WINDOWS>."
12525 #: ../src/guestfs-actions.pod:3068 ../fish/guestfish-actions.pod:2130
12527 "This call assumes that the guest is Windows and that the systemroot could be "
12528 "determined by inspection. If this is not the case then an error is returned."
12533 #: ../src/guestfs-actions.pod:3077
12534 msgid "(Added in 1.5.25)"
12538 #: ../src/guestfs-actions.pod:3079
12539 msgid "guestfs_inspect_is_live"
12543 #: ../src/guestfs-actions.pod:3081
12547 " guestfs_inspect_is_live (guestfs_h *g,\n"
12548 " const char *root);\n"
12553 #: ../src/guestfs-actions.pod:3088
12555 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
12556 "disk), then this returns true if a live image was detected on the disk."
12560 #: ../src/guestfs-actions.pod:3096
12561 msgid "guestfs_inspect_is_multipart"
12565 #: ../src/guestfs-actions.pod:3098
12569 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
12570 " const char *root);\n"
12575 #: ../src/guestfs-actions.pod:3105
12577 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
12578 "disk), then this returns true if the disk is part of a set."
12582 #: ../src/guestfs-actions.pod:3113
12583 msgid "guestfs_inspect_is_netinst"
12587 #: ../src/guestfs-actions.pod:3115
12591 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
12592 " const char *root);\n"
12597 #: ../src/guestfs-actions.pod:3122
12599 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
12600 "disk), then this returns true if the disk is a network installer, ie. not a "
12601 "self-contained install CD but one which is likely to require network access "
12602 "to complete the install."
12607 #: ../src/guestfs-actions.pod:3132
12608 msgid "guestfs_inspect_list_applications"
12613 #: ../src/guestfs-actions.pod:3134
12616 " struct guestfs_application_list *\n"
12617 " guestfs_inspect_list_applications (guestfs_h *g,\n"
12618 " const char *root);\n"
12624 #: ../src/guestfs-actions.pod:3141 ../fish/guestfish-actions.pod:2184
12625 msgid "Return the list of applications installed in the operating system."
12630 #: ../src/guestfs-actions.pod:3143
12632 "I<Note:> This call works differently from other parts of the inspection "
12633 "API. You have to call C<guestfs_inspect_os>, then "
12634 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
12635 "this. Listing applications is a significantly more difficult operation "
12636 "which requires access to the full filesystem. Also note that unlike the "
12637 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
12638 "the libguestfs handle, this call actually reads parts of the mounted "
12639 "filesystems during the call."
12644 #: ../src/guestfs-actions.pod:3153 ../fish/guestfish-actions.pod:2196
12646 "This returns an empty list if the inspection code was not able to determine "
12647 "the list of applications."
12652 #: ../src/guestfs-actions.pod:3156 ../fish/guestfish-actions.pod:2199
12653 msgid "The application structure contains the following fields:"
12658 #: ../src/guestfs-actions.pod:3160 ../fish/guestfish-actions.pod:2203
12659 msgid "C<app_name>"
12664 #: ../src/guestfs-actions.pod:3162 ../fish/guestfish-actions.pod:2205
12666 "The name of the application. For Red Hat-derived and Debian-derived Linux "
12667 "guests, this is the package name."
12672 #: ../src/guestfs-actions.pod:3165 ../fish/guestfish-actions.pod:2208
12673 msgid "C<app_display_name>"
12678 #: ../src/guestfs-actions.pod:3167 ../fish/guestfish-actions.pod:2210
12680 "The display name of the application, sometimes localized to the install "
12681 "language of the guest operating system."
12686 #: ../src/guestfs-actions.pod:3170 ../fish/guestfish-actions.pod:2213
12688 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
12689 "to display something can use C<app_name> instead."
12694 #: ../src/guestfs-actions.pod:3173 ../fish/guestfish-actions.pod:2216
12695 msgid "C<app_epoch>"
12700 #: ../src/guestfs-actions.pod:3175 ../fish/guestfish-actions.pod:2218
12702 "For package managers which use epochs, this contains the epoch of the "
12703 "package (an integer). If unavailable, this is returned as C<0>."
12708 #: ../src/guestfs-actions.pod:3178 ../fish/guestfish-actions.pod:2221
12709 msgid "C<app_version>"
12714 #: ../src/guestfs-actions.pod:3180 ../fish/guestfish-actions.pod:2223
12716 "The version string of the application or package. If unavailable this is "
12717 "returned as an empty string C<\"\">."
12722 #: ../src/guestfs-actions.pod:3183 ../fish/guestfish-actions.pod:2226
12723 msgid "C<app_release>"
12728 #: ../src/guestfs-actions.pod:3185 ../fish/guestfish-actions.pod:2228
12730 "The release string of the application or package, for package managers that "
12731 "use this. If unavailable this is returned as an empty string C<\"\">."
12736 #: ../src/guestfs-actions.pod:3189 ../fish/guestfish-actions.pod:2232
12737 msgid "C<app_install_path>"
12742 #: ../src/guestfs-actions.pod:3191 ../fish/guestfish-actions.pod:2234
12744 "The installation path of the application (on operating systems such as "
12745 "Windows which use installation paths). This path is in the format used by "
12746 "the guest operating system, it is not a libguestfs path."
12751 #: ../src/guestfs-actions.pod:3196 ../fish/guestfish-actions.pod:2239
12752 msgid "If unavailable this is returned as an empty string C<\"\">."
12757 #: ../src/guestfs-actions.pod:3198 ../fish/guestfish-actions.pod:2241
12758 msgid "C<app_trans_path>"
12763 #: ../src/guestfs-actions.pod:3200 ../fish/guestfish-actions.pod:2243
12765 "The install path translated into a libguestfs path. If unavailable this is "
12766 "returned as an empty string C<\"\">."
12771 #: ../src/guestfs-actions.pod:3203 ../fish/guestfish-actions.pod:2246
12772 msgid "C<app_publisher>"
12777 #: ../src/guestfs-actions.pod:3205 ../fish/guestfish-actions.pod:2248
12779 "The name of the publisher of the application, for package managers that use "
12780 "this. If unavailable this is returned as an empty string C<\"\">."
12785 #: ../src/guestfs-actions.pod:3209 ../fish/guestfish-actions.pod:2252
12791 #: ../src/guestfs-actions.pod:3211 ../fish/guestfish-actions.pod:2254
12793 "The URL (eg. upstream URL) of the application. If unavailable this is "
12794 "returned as an empty string C<\"\">."
12799 #: ../src/guestfs-actions.pod:3214 ../fish/guestfish-actions.pod:2257
12800 msgid "C<app_source_package>"
12805 #: ../src/guestfs-actions.pod:3216 ../fish/guestfish-actions.pod:2259
12807 "For packaging systems which support this, the name of the source package. "
12808 "If unavailable this is returned as an empty string C<\"\">."
12813 #: ../src/guestfs-actions.pod:3219 ../fish/guestfish-actions.pod:2262
12814 msgid "C<app_summary>"
12819 #: ../src/guestfs-actions.pod:3221 ../fish/guestfish-actions.pod:2264
12821 "A short (usually one line) description of the application or package. If "
12822 "unavailable this is returned as an empty string C<\"\">."
12827 #: ../src/guestfs-actions.pod:3224 ../fish/guestfish-actions.pod:2267
12828 msgid "C<app_description>"
12833 #: ../src/guestfs-actions.pod:3226 ../fish/guestfish-actions.pod:2269
12835 "A longer description of the application or package. If unavailable this is "
12836 "returned as an empty string C<\"\">."
12841 #: ../src/guestfs-actions.pod:3233
12843 "This function returns a C<struct guestfs_application_list *>, or NULL if "
12844 "there was an error. I<The caller must call C<guestfs_free_application_list> "
12850 #: ../src/guestfs-actions.pod:3237
12851 msgid "(Added in 1.7.8)"
12856 #: ../src/guestfs-actions.pod:3239
12857 msgid "guestfs_inspect_os"
12862 #: ../src/guestfs-actions.pod:3241
12866 " guestfs_inspect_os (guestfs_h *g);\n"
12872 #: ../src/guestfs-actions.pod:3244 ../fish/guestfish-actions.pod:2280
12874 "This function uses other libguestfs functions and certain heuristics to "
12875 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
12876 "for operating systems."
12881 #: ../src/guestfs-actions.pod:3248 ../fish/guestfish-actions.pod:2284
12882 msgid "The list returned is empty if no operating systems were found."
12887 #: ../src/guestfs-actions.pod:3250 ../fish/guestfish-actions.pod:2286
12889 "If one operating system was found, then this returns a list with a single "
12890 "element, which is the name of the root filesystem of this operating system. "
12891 "It is also possible for this function to return a list containing more than "
12892 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
12893 "element being the root filesystem of one of the operating systems."
12898 #: ../src/guestfs-actions.pod:3257
12900 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
12901 "functions in order to query further information about each operating system, "
12902 "such as the name and version."
12907 #: ../src/guestfs-actions.pod:3262
12909 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
12910 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
12911 "the contents. This should be called with no disks currently mounted. The "
12912 "function may also use Augeas, so any existing Augeas handle will be closed."
12917 #: ../src/guestfs-actions.pod:3268 ../fish/guestfish-actions.pod:2304
12919 "This function cannot decrypt encrypted disks. The caller must do that first "
12920 "(supplying the necessary keys) if the disk is encrypted."
12925 #: ../src/guestfs-actions.pod:3274 ../src/guestfs-actions.pod:3564
12926 #: ../src/guestfs-actions.pod:3626
12927 msgid "See also C<guestfs_list_filesystems>."
12932 #: ../src/guestfs-actions.pod:3282
12933 msgid "guestfs_is_blockdev"
12938 #: ../src/guestfs-actions.pod:3284
12942 " guestfs_is_blockdev (guestfs_h *g,\n"
12943 " const char *path);\n"
12949 #: ../src/guestfs-actions.pod:3288 ../fish/guestfish-actions.pod:2316
12951 "This returns C<true> if and only if there is a block device with the given "
12957 #: ../src/guestfs-actions.pod:3291 ../src/guestfs-actions.pod:3320
12958 #: ../src/guestfs-actions.pod:3350 ../src/guestfs-actions.pod:3365
12959 #: ../src/guestfs-actions.pod:3381 ../src/guestfs-actions.pod:3437
12960 #: ../src/guestfs-actions.pod:3452
12961 msgid "See also C<guestfs_stat>."
12966 #: ../src/guestfs-actions.pod:3295 ../src/guestfs-actions.pod:3324
12967 #: ../src/guestfs-actions.pod:3369 ../src/guestfs-actions.pod:3441
12968 #: ../src/guestfs-actions.pod:3456
12969 msgid "(Added in 1.5.10)"
12974 #: ../src/guestfs-actions.pod:3297
12975 msgid "guestfs_is_busy"
12980 #: ../src/guestfs-actions.pod:3299
12984 " guestfs_is_busy (guestfs_h *g);\n"
12990 #: ../src/guestfs-actions.pod:3302 ../fish/guestfish-actions.pod:2325
12992 "This returns true iff this handle is busy processing a command (in the "
12998 #: ../src/guestfs-actions.pod:3311
12999 msgid "guestfs_is_chardev"
13004 #: ../src/guestfs-actions.pod:3313
13008 " guestfs_is_chardev (guestfs_h *g,\n"
13009 " const char *path);\n"
13015 #: ../src/guestfs-actions.pod:3317 ../fish/guestfish-actions.pod:2334
13017 "This returns C<true> if and only if there is a character device with the "
13018 "given C<path> name."
13023 #: ../src/guestfs-actions.pod:3326
13024 msgid "guestfs_is_config"
13029 #: ../src/guestfs-actions.pod:3328
13033 " guestfs_is_config (guestfs_h *g);\n"
13039 #: ../src/guestfs-actions.pod:3331 ../fish/guestfish-actions.pod:2343
13041 "This returns true iff this handle is being configured (in the C<CONFIG> "
13047 #: ../src/guestfs-actions.pod:3340
13048 msgid "guestfs_is_dir"
13053 #: ../src/guestfs-actions.pod:3342
13057 " guestfs_is_dir (guestfs_h *g,\n"
13058 " const char *path);\n"
13064 #: ../src/guestfs-actions.pod:3346 ../fish/guestfish-actions.pod:2352
13066 "This returns C<true> if and only if there is a directory with the given "
13067 "C<path> name. Note that it returns false for other objects like files."
13072 #: ../src/guestfs-actions.pod:3356
13073 msgid "guestfs_is_fifo"
13078 #: ../src/guestfs-actions.pod:3358
13082 " guestfs_is_fifo (guestfs_h *g,\n"
13083 " const char *path);\n"
13089 #: ../src/guestfs-actions.pod:3362 ../fish/guestfish-actions.pod:2362
13091 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
13092 "given C<path> name."
13097 #: ../src/guestfs-actions.pod:3371
13098 msgid "guestfs_is_file"
13103 #: ../src/guestfs-actions.pod:3373
13107 " guestfs_is_file (guestfs_h *g,\n"
13108 " const char *path);\n"
13114 #: ../src/guestfs-actions.pod:3377 ../fish/guestfish-actions.pod:2371
13116 "This returns C<true> if and only if there is a regular file with the given "
13117 "C<path> name. Note that it returns false for other objects like directories."
13122 #: ../src/guestfs-actions.pod:3387
13123 msgid "guestfs_is_launching"
13128 #: ../src/guestfs-actions.pod:3389
13132 " guestfs_is_launching (guestfs_h *g);\n"
13138 #: ../src/guestfs-actions.pod:3392 ../fish/guestfish-actions.pod:2381
13140 "This returns true iff this handle is launching the subprocess (in the "
13141 "C<LAUNCHING> state)."
13146 #: ../src/guestfs-actions.pod:3401
13147 msgid "guestfs_is_lv"
13152 #: ../src/guestfs-actions.pod:3403
13156 " guestfs_is_lv (guestfs_h *g,\n"
13157 " const char *device);\n"
13163 #: ../src/guestfs-actions.pod:3407 ../fish/guestfish-actions.pod:2390
13165 "This command tests whether C<device> is a logical volume, and returns true "
13166 "iff this is the case."
13171 #: ../src/guestfs-actions.pod:3414
13172 msgid "guestfs_is_ready"
13177 #: ../src/guestfs-actions.pod:3416
13181 " guestfs_is_ready (guestfs_h *g);\n"
13187 #: ../src/guestfs-actions.pod:3419 ../fish/guestfish-actions.pod:2397
13189 "This returns true iff this handle is ready to accept commands (in the "
13195 #: ../src/guestfs-actions.pod:3428
13196 msgid "guestfs_is_socket"
13201 #: ../src/guestfs-actions.pod:3430
13205 " guestfs_is_socket (guestfs_h *g,\n"
13206 " const char *path);\n"
13212 #: ../src/guestfs-actions.pod:3434 ../fish/guestfish-actions.pod:2406
13214 "This returns C<true> if and only if there is a Unix domain socket with the "
13215 "given C<path> name."
13220 #: ../src/guestfs-actions.pod:3443
13221 msgid "guestfs_is_symlink"
13226 #: ../src/guestfs-actions.pod:3445
13230 " guestfs_is_symlink (guestfs_h *g,\n"
13231 " const char *path);\n"
13237 #: ../src/guestfs-actions.pod:3449 ../fish/guestfish-actions.pod:2415
13239 "This returns C<true> if and only if there is a symbolic link with the given "
13245 #: ../src/guestfs-actions.pod:3458
13246 msgid "guestfs_kill_subprocess"
13251 #: ../src/guestfs-actions.pod:3460
13255 " guestfs_kill_subprocess (guestfs_h *g);\n"
13261 #: ../src/guestfs-actions.pod:3463 ../fish/guestfish-actions.pod:2424
13262 msgid "This kills the qemu subprocess. You should never need to call this."
13267 #: ../src/guestfs-actions.pod:3469
13268 msgid "guestfs_launch"
13273 #: ../src/guestfs-actions.pod:3471
13277 " guestfs_launch (guestfs_h *g);\n"
13283 #: ../src/guestfs-actions.pod:3474 ../fish/guestfish-actions.pod:2432
13285 "Internally libguestfs is implemented by running a virtual machine using "
13291 #: ../src/guestfs-actions.pod:3477 ../fish/guestfish-actions.pod:2435
13293 "You should call this after configuring the handle (eg. adding drives) but "
13294 "before performing any actions."
13299 #: ../src/guestfs-actions.pod:3489
13300 msgid "guestfs_lchown"
13305 #: ../src/guestfs-actions.pod:3491
13309 " guestfs_lchown (guestfs_h *g,\n"
13312 " const char *path);\n"
13318 #: ../src/guestfs-actions.pod:3497
13320 "Change the file owner to C<owner> and group to C<group>. This is like "
13321 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
13322 "changed, not the target."
13327 #: ../src/guestfs-actions.pod:3509
13328 msgid "guestfs_lgetxattr"
13333 #: ../src/guestfs-actions.pod:3511
13337 " guestfs_lgetxattr (guestfs_h *g,\n"
13338 " const char *path,\n"
13339 " const char *name,\n"
13340 " size_t *size_r);\n"
13346 #: ../src/guestfs-actions.pod:3517 ../fish/guestfish-actions.pod:2454
13348 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
13349 "is a symlink, then this call returns an extended attribute from the symlink."
13354 #: ../src/guestfs-actions.pod:3531
13355 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
13360 #: ../src/guestfs-actions.pod:3539
13361 msgid "guestfs_lgetxattrs"
13366 #: ../src/guestfs-actions.pod:3541
13369 " struct guestfs_xattr_list *\n"
13370 " guestfs_lgetxattrs (guestfs_h *g,\n"
13371 " const char *path);\n"
13377 #: ../src/guestfs-actions.pod:3545
13379 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
13380 "then it returns the extended attributes of the link itself."
13385 #: ../src/guestfs-actions.pod:3555
13386 msgid "guestfs_list_devices"
13391 #: ../src/guestfs-actions.pod:3557
13395 " guestfs_list_devices (guestfs_h *g);\n"
13401 #: ../src/guestfs-actions.pod:3560 ../fish/guestfish-actions.pod:2482
13402 msgid "List all the block devices."
13407 #: ../src/guestfs-actions.pod:3562 ../fish/guestfish-actions.pod:2484
13408 msgid "The full block device names are returned, eg. C</dev/sda>."
13413 #: ../src/guestfs-actions.pod:3572
13414 msgid "guestfs_list_filesystems"
13419 #: ../src/guestfs-actions.pod:3574
13423 " guestfs_list_filesystems (guestfs_h *g);\n"
13429 #: ../src/guestfs-actions.pod:3577 ../fish/guestfish-actions.pod:2492
13431 "This inspection command looks for filesystems on partitions, block devices "
13432 "and logical volumes, returning a list of devices containing filesystems and "
13438 #: ../src/guestfs-actions.pod:3581 ../fish/guestfish-actions.pod:2496
13440 "The return value is a hash, where the keys are the devices containing "
13441 "filesystems, and the values are the filesystem types. For example:"
13446 #: ../src/guestfs-actions.pod:3585 ../fish/guestfish-actions.pod:2500
13449 " \"/dev/sda1\" => \"ntfs\"\n"
13450 " \"/dev/sda2\" => \"ext2\"\n"
13451 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
13452 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
13458 #: ../src/guestfs-actions.pod:3590 ../fish/guestfish-actions.pod:2505
13460 "The value can have the special value \"unknown\", meaning the content of the "
13461 "device is undetermined or empty. \"swap\" means a Linux swap partition."
13466 #: ../src/guestfs-actions.pod:3594
13468 "This command runs other libguestfs commands, which might include "
13469 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
13470 "soon after launch and only when nothing is mounted."
13475 #: ../src/guestfs-actions.pod:3598
13477 "Not all of the filesystems returned will be mountable. In particular, swap "
13478 "partitions are returned in the list. Also this command does not check that "
13479 "each filesystem found is valid and mountable, and some filesystems might be "
13480 "mountable but require special options. Filesystems may not all belong to a "
13481 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
13486 #: ../src/guestfs-actions.pod:3612 ../src/guestfs-actions.pod:5217
13487 msgid "(Added in 1.5.15)"
13492 #: ../src/guestfs-actions.pod:3614
13493 msgid "guestfs_list_partitions"
13498 #: ../src/guestfs-actions.pod:3616
13502 " guestfs_list_partitions (guestfs_h *g);\n"
13508 #: ../src/guestfs-actions.pod:3619 ../fish/guestfish-actions.pod:2525
13509 msgid "List all the partitions detected on all block devices."
13514 #: ../src/guestfs-actions.pod:3621 ../fish/guestfish-actions.pod:2527
13515 msgid "The full partition device names are returned, eg. C</dev/sda1>"
13520 #: ../src/guestfs-actions.pod:3623
13522 "This does not return logical volumes. For that you will need to call "
13528 #: ../src/guestfs-actions.pod:3634
13534 #: ../src/guestfs-actions.pod:3636
13538 " guestfs_ll (guestfs_h *g,\n"
13539 " const char *directory);\n"
13545 #: ../src/guestfs-actions.pod:3640 ../fish/guestfish-actions.pod:2538
13547 "List the files in C<directory> (relative to the root directory, there is no "
13548 "cwd) in the format of 'ls -la'."
13553 #: ../src/guestfs-actions.pod:3643 ../fish/guestfish-actions.pod:2541
13555 "This command is mostly useful for interactive sessions. It is I<not> "
13556 "intended that you try to parse the output string."
13561 #: ../src/guestfs-actions.pod:3651
13567 #: ../src/guestfs-actions.pod:3653
13571 " guestfs_ln (guestfs_h *g,\n"
13572 " const char *target,\n"
13573 " const char *linkname);\n"
13579 #: ../src/guestfs-actions.pod:3658 ../fish/guestfish-actions.pod:2548
13580 msgid "This command creates a hard link using the C<ln> command."
13585 #: ../src/guestfs-actions.pod:3664
13586 msgid "guestfs_ln_f"
13591 #: ../src/guestfs-actions.pod:3666
13595 " guestfs_ln_f (guestfs_h *g,\n"
13596 " const char *target,\n"
13597 " const char *linkname);\n"
13602 #: ../src/guestfs-actions.pod:3671 ../fish/guestfish-actions.pod:2554
13604 "This command creates a hard link using the C<ln -f> command. The I<-f> "
13605 "option removes the link (C<linkname>) if it exists already."
13610 #: ../src/guestfs-actions.pod:3678
13611 msgid "guestfs_ln_s"
13616 #: ../src/guestfs-actions.pod:3680
13620 " guestfs_ln_s (guestfs_h *g,\n"
13621 " const char *target,\n"
13622 " const char *linkname);\n"
13628 #: ../src/guestfs-actions.pod:3685 ../fish/guestfish-actions.pod:2561
13629 msgid "This command creates a symbolic link using the C<ln -s> command."
13634 #: ../src/guestfs-actions.pod:3691
13635 msgid "guestfs_ln_sf"
13640 #: ../src/guestfs-actions.pod:3693
13644 " guestfs_ln_sf (guestfs_h *g,\n"
13645 " const char *target,\n"
13646 " const char *linkname);\n"
13651 #: ../src/guestfs-actions.pod:3698 ../fish/guestfish-actions.pod:2567
13653 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
13654 "option removes the link (C<linkname>) if it exists already."
13659 #: ../src/guestfs-actions.pod:3705
13660 msgid "guestfs_lremovexattr"
13665 #: ../src/guestfs-actions.pod:3707
13669 " guestfs_lremovexattr (guestfs_h *g,\n"
13670 " const char *xattr,\n"
13671 " const char *path);\n"
13677 #: ../src/guestfs-actions.pod:3712
13679 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
13680 "link, then it removes an extended attribute of the link itself."
13685 #: ../src/guestfs-actions.pod:3720
13691 #: ../src/guestfs-actions.pod:3722
13695 " guestfs_ls (guestfs_h *g,\n"
13696 " const char *directory);\n"
13702 #: ../src/guestfs-actions.pod:3726 ../fish/guestfish-actions.pod:2582
13704 "List the files in C<directory> (relative to the root directory, there is no "
13705 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
13710 #: ../src/guestfs-actions.pod:3730
13712 "This command is mostly useful for interactive sessions. Programs should "
13713 "probably use C<guestfs_readdir> instead."
13718 #: ../src/guestfs-actions.pod:3739
13719 msgid "guestfs_lsetxattr"
13724 #: ../src/guestfs-actions.pod:3741
13728 " guestfs_lsetxattr (guestfs_h *g,\n"
13729 " const char *xattr,\n"
13730 " const char *val,\n"
13732 " const char *path);\n"
13738 #: ../src/guestfs-actions.pod:3748
13740 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
13741 "then it sets an extended attribute of the link itself."
13746 #: ../src/guestfs-actions.pod:3756
13747 msgid "guestfs_lstat"
13752 #: ../src/guestfs-actions.pod:3758
13755 " struct guestfs_stat *\n"
13756 " guestfs_lstat (guestfs_h *g,\n"
13757 " const char *path);\n"
13763 #: ../src/guestfs-actions.pod:3762 ../src/guestfs-actions.pod:6320
13764 #: ../fish/guestfish-actions.pod:2601 ../fish/guestfish-actions.pod:4270
13765 msgid "Returns file information for the given C<path>."
13770 #: ../src/guestfs-actions.pod:3764
13772 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
13773 "link, then the link is stat-ed, not the file it refers to."
13778 #: ../src/guestfs-actions.pod:3768 ../fish/guestfish-actions.pod:2607
13779 msgid "This is the same as the C<lstat(2)> system call."
13784 #: ../src/guestfs-actions.pod:3770 ../src/guestfs-actions.pod:6324
13786 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
13787 "error. I<The caller must call C<guestfs_free_stat> after use>."
13792 #: ../src/guestfs-actions.pod:3774 ../src/guestfs-actions.pod:6328
13793 #: ../src/guestfs-actions.pod:6346 ../src/guestfs-actions.pod:6727
13794 msgid "(Added in 0.9.2)"
13799 #: ../src/guestfs-actions.pod:3776
13800 msgid "guestfs_lstatlist"
13805 #: ../src/guestfs-actions.pod:3778
13808 " struct guestfs_stat_list *\n"
13809 " guestfs_lstatlist (guestfs_h *g,\n"
13810 " const char *path,\n"
13811 " char *const *names);\n"
13817 #: ../src/guestfs-actions.pod:3783
13819 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
13820 "files, where all files are in the directory C<path>. C<names> is the list "
13821 "of files from this directory."
13826 #: ../src/guestfs-actions.pod:3787 ../fish/guestfish-actions.pod:2617
13828 "On return you get a list of stat structs, with a one-to-one correspondence "
13829 "to the C<names> list. If any name did not exist or could not be lstat'd, "
13830 "then the C<ino> field of that structure is set to C<-1>."
13835 #: ../src/guestfs-actions.pod:3792
13837 "This call is intended for programs that want to efficiently list a directory "
13838 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
13839 "for a similarly efficient call for getting extended attributes. Very long "
13840 "directory listings might cause the protocol message size to be exceeded, "
13841 "causing this call to fail. The caller must split up such requests into "
13842 "smaller groups of names."
13847 #: ../src/guestfs-actions.pod:3800
13849 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
13850 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
13855 #: ../src/guestfs-actions.pod:3806
13856 msgid "guestfs_luks_add_key"
13861 #: ../src/guestfs-actions.pod:3808
13865 " guestfs_luks_add_key (guestfs_h *g,\n"
13866 " const char *device,\n"
13867 " const char *key,\n"
13868 " const char *newkey,\n"
13875 #: ../src/guestfs-actions.pod:3815 ../fish/guestfish-actions.pod:2634
13877 "This command adds a new key on LUKS device C<device>. C<key> is any "
13878 "existing key, and is used to access the device. C<newkey> is the new key to "
13879 "add. C<keyslot> is the key slot that will be replaced."
13884 #: ../src/guestfs-actions.pod:3820
13886 "Note that if C<keyslot> already contains a key, then this command will "
13887 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
13892 #: ../src/guestfs-actions.pod:3826 ../src/guestfs-actions.pod:3866
13893 #: ../src/guestfs-actions.pod:3889 ../src/guestfs-actions.pod:3909
13894 #: ../src/guestfs-actions.pod:3941 ../src/guestfs-actions.pod:3960
13896 "This function takes a key or passphrase parameter which could contain "
13897 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
13903 #: ../src/guestfs-actions.pod:3830 ../src/guestfs-actions.pod:3870
13904 #: ../src/guestfs-actions.pod:3893 ../src/guestfs-actions.pod:3913
13905 msgid "(Added in 1.5.2)"
13910 #: ../src/guestfs-actions.pod:3832
13911 msgid "guestfs_luks_close"
13916 #: ../src/guestfs-actions.pod:3834
13920 " guestfs_luks_close (guestfs_h *g,\n"
13921 " const char *device);\n"
13927 #: ../src/guestfs-actions.pod:3838
13929 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
13930 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
13931 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
13932 "underlying block device."
13937 #: ../src/guestfs-actions.pod:3846 ../src/guestfs-actions.pod:3945
13938 #: ../src/guestfs-actions.pod:3964 ../src/guestfs-actions.pod:4014
13939 #: ../src/guestfs-actions.pod:4062
13940 msgid "(Added in 1.5.1)"
13945 #: ../src/guestfs-actions.pod:3848
13946 msgid "guestfs_luks_format"
13951 #: ../src/guestfs-actions.pod:3850
13955 " guestfs_luks_format (guestfs_h *g,\n"
13956 " const char *device,\n"
13957 " const char *key,\n"
13964 #: ../src/guestfs-actions.pod:3856 ../fish/guestfish-actions.pod:2660
13966 "This command erases existing data on C<device> and formats the device as a "
13967 "LUKS encrypted device. C<key> is the initial key, which is added to key "
13968 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
13973 #: ../src/guestfs-actions.pod:3863 ../src/guestfs-actions.pod:3886
13974 #: ../src/guestfs-actions.pod:4026 ../src/guestfs-actions.pod:4968
13975 #: ../src/guestfs-actions.pod:5748 ../src/guestfs-actions.pod:6155
13976 #: ../src/guestfs-actions.pod:6178 ../src/guestfs-actions.pod:6204
13977 #: ../src/guestfs-actions.pod:7364 ../fish/guestfish-actions.pod:2668
13978 #: ../fish/guestfish-actions.pod:2681 ../fish/guestfish-actions.pod:2765
13979 #: ../fish/guestfish-actions.pod:3339 ../fish/guestfish-actions.pod:3859
13980 #: ../fish/guestfish-actions.pod:4169 ../fish/guestfish-actions.pod:4185
13981 #: ../fish/guestfish-actions.pod:4200 ../fish/guestfish-actions.pod:4915
13983 "B<This command is dangerous. Without careful use you can easily destroy all "
13989 #: ../src/guestfs-actions.pod:3872
13990 msgid "guestfs_luks_format_cipher"
13995 #: ../src/guestfs-actions.pod:3874
13999 " guestfs_luks_format_cipher (guestfs_h *g,\n"
14000 " const char *device,\n"
14001 " const char *key,\n"
14003 " const char *cipher);\n"
14009 #: ../src/guestfs-actions.pod:3881
14011 "This command is the same as C<guestfs_luks_format> but it also allows you to "
14012 "set the C<cipher> used."
14017 #: ../src/guestfs-actions.pod:3895
14018 msgid "guestfs_luks_kill_slot"
14023 #: ../src/guestfs-actions.pod:3897
14027 " guestfs_luks_kill_slot (guestfs_h *g,\n"
14028 " const char *device,\n"
14029 " const char *key,\n"
14036 #: ../src/guestfs-actions.pod:3903 ../fish/guestfish-actions.pod:2688
14038 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
14039 "device C<device>. C<key> must be one of the I<other> keys."
14044 #: ../src/guestfs-actions.pod:3915
14045 msgid "guestfs_luks_open"
14050 #: ../src/guestfs-actions.pod:3917
14054 " guestfs_luks_open (guestfs_h *g,\n"
14055 " const char *device,\n"
14056 " const char *key,\n"
14057 " const char *mapname);\n"
14063 #: ../src/guestfs-actions.pod:3923 ../fish/guestfish-actions.pod:2699
14065 "This command opens a block device which has been encrypted according to the "
14066 "Linux Unified Key Setup (LUKS) standard."
14071 #: ../src/guestfs-actions.pod:3926 ../fish/guestfish-actions.pod:2702
14072 msgid "C<device> is the encrypted block device or partition."
14077 #: ../src/guestfs-actions.pod:3928 ../fish/guestfish-actions.pod:2704
14079 "The caller must supply one of the keys associated with the LUKS block "
14080 "device, in the C<key> parameter."
14085 #: ../src/guestfs-actions.pod:3931 ../fish/guestfish-actions.pod:2707
14087 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
14088 "writes to this block device are decrypted from and encrypted to the "
14089 "underlying C<device> respectively."
14094 #: ../src/guestfs-actions.pod:3935
14096 "If this block device contains LVM volume groups, then calling "
14097 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
14103 #: ../src/guestfs-actions.pod:3947
14104 msgid "guestfs_luks_open_ro"
14109 #: ../src/guestfs-actions.pod:3949
14113 " guestfs_luks_open_ro (guestfs_h *g,\n"
14114 " const char *device,\n"
14115 " const char *key,\n"
14116 " const char *mapname);\n"
14122 #: ../src/guestfs-actions.pod:3955
14124 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
14130 #: ../src/guestfs-actions.pod:3966
14131 msgid "guestfs_lvcreate"
14136 #: ../src/guestfs-actions.pod:3968
14140 " guestfs_lvcreate (guestfs_h *g,\n"
14141 " const char *logvol,\n"
14142 " const char *volgroup,\n"
14149 #: ../src/guestfs-actions.pod:3974 ../fish/guestfish-actions.pod:2732
14151 "This creates an LVM logical volume called C<logvol> on the volume group "
14152 "C<volgroup>, with C<size> megabytes."
14157 #: ../src/guestfs-actions.pod:3981
14158 msgid "guestfs_lvm_canonical_lv_name"
14163 #: ../src/guestfs-actions.pod:3983
14167 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
14168 " const char *lvname);\n"
14174 #: ../src/guestfs-actions.pod:3987 ../fish/guestfish-actions.pod:2739
14176 "This converts alternative naming schemes for LVs that you might find to the "
14177 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
14183 #: ../src/guestfs-actions.pod:3991 ../fish/guestfish-actions.pod:2743
14185 "This command returns an error if the C<lvname> parameter does not refer to a "
14191 #: ../src/guestfs-actions.pod:3994
14192 msgid "See also C<guestfs_is_lv>."
14197 #: ../src/guestfs-actions.pod:3999
14198 msgid "(Added in 1.5.24)"
14203 #: ../src/guestfs-actions.pod:4001
14204 msgid "guestfs_lvm_clear_filter"
14209 #: ../src/guestfs-actions.pod:4003
14213 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
14219 #: ../src/guestfs-actions.pod:4006
14221 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
14222 "see every block device."
14227 #: ../src/guestfs-actions.pod:4009 ../src/guestfs-actions.pod:4051
14228 #: ../fish/guestfish-actions.pod:2755 ../fish/guestfish-actions.pod:2786
14230 "This command also clears the LVM cache and performs a volume group scan."
14235 #: ../src/guestfs-actions.pod:4016
14236 msgid "guestfs_lvm_remove_all"
14241 #: ../src/guestfs-actions.pod:4018
14245 " guestfs_lvm_remove_all (guestfs_h *g);\n"
14251 #: ../src/guestfs-actions.pod:4021 ../fish/guestfish-actions.pod:2762
14253 "This command removes all LVM logical volumes, volume groups and physical "
14259 #: ../src/guestfs-actions.pod:4031
14260 msgid "guestfs_lvm_set_filter"
14265 #: ../src/guestfs-actions.pod:4033
14269 " guestfs_lvm_set_filter (guestfs_h *g,\n"
14270 " char *const *devices);\n"
14276 #: ../src/guestfs-actions.pod:4037 ../fish/guestfish-actions.pod:2772
14278 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
14279 "block devices in the list C<devices>, and will ignore all other attached "
14285 #: ../src/guestfs-actions.pod:4041 ../fish/guestfish-actions.pod:2776
14287 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
14288 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
14289 "there are two types of duplication possible: either cloned PVs/VGs which "
14290 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
14291 "same name. In normal operation you cannot create this situation, but you "
14292 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
14293 "inside the LVM metadata."
14298 #: ../src/guestfs-actions.pod:4054 ../fish/guestfish-actions.pod:2789
14299 msgid "You can filter whole block devices or individual partitions."
14304 #: ../src/guestfs-actions.pod:4056 ../fish/guestfish-actions.pod:2791
14306 "You cannot use this if any VG is currently in use (eg. contains a mounted "
14307 "filesystem), even if you are not filtering out that VG."
14312 #: ../src/guestfs-actions.pod:4064
14313 msgid "guestfs_lvremove"
14318 #: ../src/guestfs-actions.pod:4066
14322 " guestfs_lvremove (guestfs_h *g,\n"
14323 " const char *device);\n"
14329 #: ../src/guestfs-actions.pod:4070 ../fish/guestfish-actions.pod:2799
14331 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
14332 "LV, such as C</dev/VG/LV>."
14337 #: ../src/guestfs-actions.pod:4073 ../fish/guestfish-actions.pod:2802
14339 "You can also remove all LVs in a volume group by specifying the VG name, C</"
14345 #: ../src/guestfs-actions.pod:4078 ../src/guestfs-actions.pod:5314
14346 #: ../src/guestfs-actions.pod:7103
14347 msgid "(Added in 1.0.13)"
14352 #: ../src/guestfs-actions.pod:4080
14353 msgid "guestfs_lvrename"
14358 #: ../src/guestfs-actions.pod:4082
14362 " guestfs_lvrename (guestfs_h *g,\n"
14363 " const char *logvol,\n"
14364 " const char *newlogvol);\n"
14370 #: ../src/guestfs-actions.pod:4087 ../fish/guestfish-actions.pod:2809
14371 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
14376 #: ../src/guestfs-actions.pod:4091 ../src/guestfs-actions.pod:7116
14377 msgid "(Added in 1.0.83)"
14382 #: ../src/guestfs-actions.pod:4093
14383 msgid "guestfs_lvresize"
14388 #: ../src/guestfs-actions.pod:4095
14392 " guestfs_lvresize (guestfs_h *g,\n"
14393 " const char *device,\n"
14400 #: ../src/guestfs-actions.pod:4100 ../fish/guestfish-actions.pod:2815
14402 "This resizes (expands or shrinks) an existing LVM logical volume to "
14403 "C<mbytes>. When reducing, data in the reduced part is lost."
14408 #: ../src/guestfs-actions.pod:4108
14409 msgid "guestfs_lvresize_free"
14414 #: ../src/guestfs-actions.pod:4110
14418 " guestfs_lvresize_free (guestfs_h *g,\n"
14419 " const char *lv,\n"
14426 #: ../src/guestfs-actions.pod:4115 ../fish/guestfish-actions.pod:2823
14428 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
14429 "remaining free space in the volume group. Commonly you would call this with "
14430 "pc = 100 which expands the logical volume as much as possible, using all "
14431 "remaining free space in the volume group."
14436 #: ../src/guestfs-actions.pod:4123
14437 msgid "(Added in 1.3.3)"
14442 #: ../src/guestfs-actions.pod:4125
14443 msgid "guestfs_lvs"
14448 #: ../src/guestfs-actions.pod:4127
14452 " guestfs_lvs (guestfs_h *g);\n"
14458 #: ../src/guestfs-actions.pod:4130 ../fish/guestfish-actions.pod:2833
14460 "List all the logical volumes detected. This is the equivalent of the L<lvs"
14466 #: ../src/guestfs-actions.pod:4133 ../fish/guestfish-actions.pod:2836
14468 "This returns a list of the logical volume device names (eg. C</dev/"
14469 "VolGroup00/LogVol00>)."
14474 #: ../src/guestfs-actions.pod:4136
14475 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
14480 #: ../src/guestfs-actions.pod:4144
14481 msgid "guestfs_lvs_full"
14486 #: ../src/guestfs-actions.pod:4146
14489 " struct guestfs_lvm_lv_list *\n"
14490 " guestfs_lvs_full (guestfs_h *g);\n"
14496 #: ../src/guestfs-actions.pod:4149 ../fish/guestfish-actions.pod:2845
14498 "List all the logical volumes detected. This is the equivalent of the L<lvs"
14499 "(8)> command. The \"full\" version includes all fields."
14504 #: ../src/guestfs-actions.pod:4152
14506 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
14507 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after use>."
14512 #: ../src/guestfs-actions.pod:4158
14513 msgid "guestfs_lvuuid"
14518 #: ../src/guestfs-actions.pod:4160
14522 " guestfs_lvuuid (guestfs_h *g,\n"
14523 " const char *device);\n"
14529 #: ../src/guestfs-actions.pod:4164 ../fish/guestfish-actions.pod:2852
14530 msgid "This command returns the UUID of the LVM LV C<device>."
14535 #: ../src/guestfs-actions.pod:4171
14536 msgid "guestfs_lxattrlist"
14541 #: ../src/guestfs-actions.pod:4173
14544 " struct guestfs_xattr_list *\n"
14545 " guestfs_lxattrlist (guestfs_h *g,\n"
14546 " const char *path,\n"
14547 " char *const *names);\n"
14553 #: ../src/guestfs-actions.pod:4178 ../fish/guestfish-actions.pod:2858
14555 "This call allows you to get the extended attributes of multiple files, where "
14556 "all files are in the directory C<path>. C<names> is the list of files from "
14562 #: ../src/guestfs-actions.pod:4182 ../fish/guestfish-actions.pod:2862
14564 "On return you get a flat list of xattr structs which must be interpreted "
14565 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
14566 "C<attrval> in this struct is zero-length to indicate there was an error "
14567 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
14568 "number (the number of following attributes for this file, which could be C<"
14569 "\"0\">). Then after the first xattr struct are the zero or more attributes "
14570 "for the first named file. This repeats for the second and subsequent files."
14575 #: ../src/guestfs-actions.pod:4192
14577 "This call is intended for programs that want to efficiently list a directory "
14578 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
14579 "a similarly efficient call for getting standard stats. Very long directory "
14580 "listings might cause the protocol message size to be exceeded, causing this "
14581 "call to fail. The caller must split up such requests into smaller groups of "
14587 #: ../src/guestfs-actions.pod:4206
14588 msgid "guestfs_mkdir"
14593 #: ../src/guestfs-actions.pod:4208
14597 " guestfs_mkdir (guestfs_h *g,\n"
14598 " const char *path);\n"
14604 #: ../src/guestfs-actions.pod:4212 ../fish/guestfish-actions.pod:2884
14605 msgid "Create a directory named C<path>."
14610 #: ../src/guestfs-actions.pod:4218
14611 msgid "guestfs_mkdir_mode"
14616 #: ../src/guestfs-actions.pod:4220
14620 " guestfs_mkdir_mode (guestfs_h *g,\n"
14621 " const char *path,\n"
14628 #: ../src/guestfs-actions.pod:4225 ../fish/guestfish-actions.pod:2890
14630 "This command creates a directory, setting the initial permissions of the "
14631 "directory to C<mode>."
14636 #: ../src/guestfs-actions.pod:4228 ../fish/guestfish-actions.pod:2893
14638 "For common Linux filesystems, the actual mode which is set will be C<mode & "
14639 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
14645 #: ../src/guestfs-actions.pod:4232
14646 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
14651 #: ../src/guestfs-actions.pod:4238
14652 msgid "guestfs_mkdir_p"
14657 #: ../src/guestfs-actions.pod:4240
14661 " guestfs_mkdir_p (guestfs_h *g,\n"
14662 " const char *path);\n"
14668 #: ../src/guestfs-actions.pod:4244 ../fish/guestfish-actions.pod:2903
14670 "Create a directory named C<path>, creating any parent directories as "
14671 "necessary. This is like the C<mkdir -p> shell command."
14676 #: ../src/guestfs-actions.pod:4251
14677 msgid "guestfs_mkdtemp"
14682 #: ../src/guestfs-actions.pod:4253
14686 " guestfs_mkdtemp (guestfs_h *g,\n"
14687 " const char *template);\n"
14693 #: ../src/guestfs-actions.pod:4257 ../fish/guestfish-actions.pod:2910
14695 "This command creates a temporary directory. The C<template> parameter "
14696 "should be a full pathname for the temporary directory name with the final "
14697 "six characters being \"XXXXXX\"."
14702 #: ../src/guestfs-actions.pod:4262 ../fish/guestfish-actions.pod:2915
14704 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
14705 "being suitable for Windows filesystems."
14710 #: ../src/guestfs-actions.pod:4265 ../fish/guestfish-actions.pod:2918
14711 msgid "The name of the temporary directory that was created is returned."
14716 #: ../src/guestfs-actions.pod:4268 ../fish/guestfish-actions.pod:2921
14717 msgid "The temporary directory is created with mode 0700 and is owned by root."
14722 #: ../src/guestfs-actions.pod:4271 ../fish/guestfish-actions.pod:2924
14724 "The caller is responsible for deleting the temporary directory and its "
14725 "contents after use."
14730 #: ../src/guestfs-actions.pod:4274 ../fish/guestfish-actions.pod:2927
14731 msgid "See also: L<mkdtemp(3)>"
14736 #: ../src/guestfs-actions.pod:4281
14737 msgid "guestfs_mke2fs_J"
14742 #: ../src/guestfs-actions.pod:4283
14746 " guestfs_mke2fs_J (guestfs_h *g,\n"
14747 " const char *fstype,\n"
14748 " int blocksize,\n"
14749 " const char *device,\n"
14750 " const char *journal);\n"
14756 #: ../src/guestfs-actions.pod:4290 ../fish/guestfish-actions.pod:2933
14758 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
14759 "C<journal>. It is equivalent to the command:"
14764 #: ../src/guestfs-actions.pod:4294 ../fish/guestfish-actions.pod:2937
14767 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
14773 #: ../src/guestfs-actions.pod:4296
14774 msgid "See also C<guestfs_mke2journal>."
14779 #: ../src/guestfs-actions.pod:4300 ../src/guestfs-actions.pod:4318
14780 #: ../src/guestfs-actions.pod:4336 ../src/guestfs-actions.pod:4352
14781 #: ../src/guestfs-actions.pod:4366 ../src/guestfs-actions.pod:4380
14782 #: ../src/guestfs-actions.pod:4439 ../src/guestfs-actions.pod:4704
14783 msgid "(Added in 1.0.68)"
14788 #: ../src/guestfs-actions.pod:4302
14789 msgid "guestfs_mke2fs_JL"
14794 #: ../src/guestfs-actions.pod:4304
14798 " guestfs_mke2fs_JL (guestfs_h *g,\n"
14799 " const char *fstype,\n"
14800 " int blocksize,\n"
14801 " const char *device,\n"
14802 " const char *label);\n"
14808 #: ../src/guestfs-actions.pod:4311 ../fish/guestfish-actions.pod:2945
14810 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
14811 "the journal labeled C<label>."
14816 #: ../src/guestfs-actions.pod:4314
14817 msgid "See also C<guestfs_mke2journal_L>."
14822 #: ../src/guestfs-actions.pod:4320
14823 msgid "guestfs_mke2fs_JU"
14828 #: ../src/guestfs-actions.pod:4322
14832 " guestfs_mke2fs_JU (guestfs_h *g,\n"
14833 " const char *fstype,\n"
14834 " int blocksize,\n"
14835 " const char *device,\n"
14836 " const char *uuid);\n"
14842 #: ../src/guestfs-actions.pod:4329 ../fish/guestfish-actions.pod:2954
14844 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
14845 "the journal with UUID C<uuid>."
14850 #: ../src/guestfs-actions.pod:4332
14851 msgid "See also C<guestfs_mke2journal_U>."
14856 #: ../src/guestfs-actions.pod:4338
14857 msgid "guestfs_mke2journal"
14862 #: ../src/guestfs-actions.pod:4340
14866 " guestfs_mke2journal (guestfs_h *g,\n"
14867 " int blocksize,\n"
14868 " const char *device);\n"
14874 #: ../src/guestfs-actions.pod:4345 ../fish/guestfish-actions.pod:2963
14876 "This creates an ext2 external journal on C<device>. It is equivalent to the "
14882 #: ../src/guestfs-actions.pod:4348 ../fish/guestfish-actions.pod:2966
14885 " mke2fs -O journal_dev -b blocksize device\n"
14891 #: ../src/guestfs-actions.pod:4354
14892 msgid "guestfs_mke2journal_L"
14897 #: ../src/guestfs-actions.pod:4356
14901 " guestfs_mke2journal_L (guestfs_h *g,\n"
14902 " int blocksize,\n"
14903 " const char *label,\n"
14904 " const char *device);\n"
14910 #: ../src/guestfs-actions.pod:4362 ../fish/guestfish-actions.pod:2972
14911 msgid "This creates an ext2 external journal on C<device> with label C<label>."
14916 #: ../src/guestfs-actions.pod:4368
14917 msgid "guestfs_mke2journal_U"
14922 #: ../src/guestfs-actions.pod:4370
14926 " guestfs_mke2journal_U (guestfs_h *g,\n"
14927 " int blocksize,\n"
14928 " const char *uuid,\n"
14929 " const char *device);\n"
14935 #: ../src/guestfs-actions.pod:4376 ../fish/guestfish-actions.pod:2978
14936 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
14941 #: ../src/guestfs-actions.pod:4382
14942 msgid "guestfs_mkfifo"
14947 #: ../src/guestfs-actions.pod:4384
14951 " guestfs_mkfifo (guestfs_h *g,\n"
14953 " const char *path);\n"
14959 #: ../src/guestfs-actions.pod:4389
14961 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
14962 "is just a convenient wrapper around C<guestfs_mknod>."
14967 #: ../src/guestfs-actions.pod:4399
14968 msgid "guestfs_mkfs"
14973 #: ../src/guestfs-actions.pod:4401
14977 " guestfs_mkfs (guestfs_h *g,\n"
14978 " const char *fstype,\n"
14979 " const char *device);\n"
14985 #: ../src/guestfs-actions.pod:4406 ../fish/guestfish-actions.pod:2994
14987 "This creates a filesystem on C<device> (usually a partition or LVM logical "
14988 "volume). The filesystem type is C<fstype>, for example C<ext3>."
14993 #: ../src/guestfs-actions.pod:4414
14994 msgid "guestfs_mkfs_b"
14999 #: ../src/guestfs-actions.pod:4416
15003 " guestfs_mkfs_b (guestfs_h *g,\n"
15004 " const char *fstype,\n"
15005 " int blocksize,\n"
15006 " const char *device);\n"
15012 #: ../src/guestfs-actions.pod:4422
15014 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
15015 "block size of the resulting filesystem. Supported block sizes depend on the "
15016 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
15021 #: ../src/guestfs-actions.pod:4427 ../src/guestfs-actions.pod:4470
15022 #: ../fish/guestfish-actions.pod:3007 ../fish/guestfish-actions.pod:3034
15024 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
15030 #: ../src/guestfs-actions.pod:4432 ../fish/guestfish-actions.pod:3010
15032 "This function is deprecated. In new code, use the C<mkfs_opts> call instead."
15037 #: ../src/guestfs-actions.pod:4441
15038 msgid "guestfs_mkfs_opts"
15043 #: ../src/guestfs-actions.pod:4443
15047 " guestfs_mkfs_opts (guestfs_h *g,\n"
15048 " const char *fstype,\n"
15049 " const char *device,\n"
15055 #: ../src/guestfs-actions.pod:4454
15058 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
15059 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
15065 #: ../src/guestfs-actions.pod:4457 ../fish/guestfish-actions.pod:3021
15067 "This function creates a filesystem on C<device>. The filesystem type is "
15068 "C<fstype>, for example C<ext3>."
15073 #: ../src/guestfs-actions.pod:4464 ../fish/guestfish-actions.pod:3028
15074 msgid "C<blocksize>"
15079 #: ../src/guestfs-actions.pod:4466 ../fish/guestfish-actions.pod:3030
15081 "The filesystem block size. Supported block sizes depend on the filesystem "
15082 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
15087 #: ../src/guestfs-actions.pod:4473 ../fish/guestfish-actions.pod:3037
15088 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
15092 #: ../src/guestfs-actions.pod:4475 ../fish/guestfish-actions.pod:3039
15093 msgid "C<features>"
15097 #: ../src/guestfs-actions.pod:4477 ../fish/guestfish-actions.pod:3041
15098 msgid "This passes the I<-O> parameter to the external mkfs program."
15102 #: ../src/guestfs-actions.pod:4479 ../fish/guestfish-actions.pod:3043
15104 "For certain filesystem types, this allows extra filesystem features to be "
15105 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
15109 #: ../src/guestfs-actions.pod:4483 ../fish/guestfish-actions.pod:3047
15111 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
15116 #: ../src/guestfs-actions.pod:4490
15117 msgid "(Added in 1.7.19)"
15122 #: ../src/guestfs-actions.pod:4492
15123 msgid "guestfs_mkfs_opts_va"
15128 #: ../src/guestfs-actions.pod:4494
15132 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
15133 " const char *fstype,\n"
15134 " const char *device,\n"
15135 " va_list args);\n"
15141 #: ../src/guestfs-actions.pod:4500
15142 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
15147 #: ../src/guestfs-actions.pod:4504
15148 msgid "guestfs_mkfs_opts_argv"
15153 #: ../src/guestfs-actions.pod:4506
15157 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
15158 " const char *fstype,\n"
15159 " const char *device,\n"
15160 " const struct guestfs_mkfs_opts_argv *optargs);\n"
15166 #: ../src/guestfs-actions.pod:4512
15167 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
15172 #: ../src/guestfs-actions.pod:4516
15173 msgid "guestfs_mkmountpoint"
15178 #: ../src/guestfs-actions.pod:4518
15182 " guestfs_mkmountpoint (guestfs_h *g,\n"
15183 " const char *exemptpath);\n"
15189 #: ../src/guestfs-actions.pod:4522
15191 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
15192 "that can be used to create extra mountpoints before mounting the first "
15198 #: ../src/guestfs-actions.pod:4526 ../fish/guestfish-actions.pod:3062
15200 "These calls are I<only> necessary in some very limited circumstances, mainly "
15201 "the case where you want to mount a mix of unrelated and/or read-only "
15202 "filesystems together."
15207 #: ../src/guestfs-actions.pod:4530 ../fish/guestfish-actions.pod:3066
15209 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
15210 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
15211 "inside that. You can unpack this as follows in guestfish:"
15216 #: ../src/guestfs-actions.pod:4535 ../fish/guestfish-actions.pod:3071
15219 " add-ro Fedora-11-i686-Live.iso\n"
15221 " mkmountpoint /cd\n"
15222 " mkmountpoint /sqsh\n"
15223 " mkmountpoint /ext3fs\n"
15224 " mount /dev/sda /cd\n"
15225 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
15226 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
15232 #: ../src/guestfs-actions.pod:4544 ../fish/guestfish-actions.pod:3080
15233 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
15238 #: ../src/guestfs-actions.pod:4546
15240 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
15241 "may get unexpected errors if you try to mix these calls. It is safest to "
15242 "manually unmount filesystems and remove mountpoints after use."
15247 #: ../src/guestfs-actions.pod:4550
15249 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
15250 "first, so for this to work for manual mountpoints, you must ensure that the "
15251 "innermost mountpoints have the longest pathnames, as in the example code "
15257 #: ../src/guestfs-actions.pod:4555 ../fish/guestfish-actions.pod:3091
15259 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
15263 #: ../src/guestfs-actions.pod:4557
15265 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
15266 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
15267 "can also trigger these issues."
15272 #: ../src/guestfs-actions.pod:4563 ../src/guestfs-actions.pod:4822
15273 #: ../src/guestfs-actions.pod:5732
15274 msgid "(Added in 1.0.62)"
15279 #: ../src/guestfs-actions.pod:4565
15280 msgid "guestfs_mknod"
15285 #: ../src/guestfs-actions.pod:4567
15289 " guestfs_mknod (guestfs_h *g,\n"
15293 " const char *path);\n"
15299 #: ../src/guestfs-actions.pod:4574 ../fish/guestfish-actions.pod:3101
15301 "This call creates block or character special devices, or named pipes (FIFOs)."
15306 #: ../src/guestfs-actions.pod:4577 ../fish/guestfish-actions.pod:3104
15308 "The C<mode> parameter should be the mode, using the standard constants. "
15309 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
15310 "used when creating block and character special devices."
15315 #: ../src/guestfs-actions.pod:4582
15317 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
15318 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
15319 "regular file). These constants are available in the standard Linux header "
15320 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
15321 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
15322 "the appropriate constant for you."
15327 #: ../src/guestfs-actions.pod:4596
15328 msgid "guestfs_mknod_b"
15333 #: ../src/guestfs-actions.pod:4598
15337 " guestfs_mknod_b (guestfs_h *g,\n"
15341 " const char *path);\n"
15347 #: ../src/guestfs-actions.pod:4605
15349 "This call creates a block device node called C<path> with mode C<mode> and "
15350 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
15351 "wrapper around C<guestfs_mknod>."
15356 #: ../src/guestfs-actions.pod:4615
15357 msgid "guestfs_mknod_c"
15362 #: ../src/guestfs-actions.pod:4617
15366 " guestfs_mknod_c (guestfs_h *g,\n"
15370 " const char *path);\n"
15376 #: ../src/guestfs-actions.pod:4624
15378 "This call creates a char device node called C<path> with mode C<mode> and "
15379 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
15380 "wrapper around C<guestfs_mknod>."
15385 #: ../src/guestfs-actions.pod:4634
15386 msgid "guestfs_mkswap"
15391 #: ../src/guestfs-actions.pod:4636
15395 " guestfs_mkswap (guestfs_h *g,\n"
15396 " const char *device);\n"
15402 #: ../src/guestfs-actions.pod:4640 ../fish/guestfish-actions.pod:3143
15403 msgid "Create a swap partition on C<device>."
15408 #: ../src/guestfs-actions.pod:4646
15409 msgid "guestfs_mkswap_L"
15414 #: ../src/guestfs-actions.pod:4648
15418 " guestfs_mkswap_L (guestfs_h *g,\n"
15419 " const char *label,\n"
15420 " const char *device);\n"
15426 #: ../src/guestfs-actions.pod:4653 ../fish/guestfish-actions.pod:3149
15427 msgid "Create a swap partition on C<device> with label C<label>."
15432 #: ../src/guestfs-actions.pod:4655 ../fish/guestfish-actions.pod:3151
15434 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
15435 "sda>), just to a partition. This appears to be a limitation of the kernel "
15441 #: ../src/guestfs-actions.pod:4663
15442 msgid "guestfs_mkswap_U"
15447 #: ../src/guestfs-actions.pod:4665
15451 " guestfs_mkswap_U (guestfs_h *g,\n"
15452 " const char *uuid,\n"
15453 " const char *device);\n"
15459 #: ../src/guestfs-actions.pod:4670 ../fish/guestfish-actions.pod:3159
15460 msgid "Create a swap partition on C<device> with UUID C<uuid>."
15465 #: ../src/guestfs-actions.pod:4676
15466 msgid "guestfs_mkswap_file"
15471 #: ../src/guestfs-actions.pod:4678
15475 " guestfs_mkswap_file (guestfs_h *g,\n"
15476 " const char *path);\n"
15482 #: ../src/guestfs-actions.pod:4682 ../fish/guestfish-actions.pod:3165
15483 msgid "Create a swap file."
15488 #: ../src/guestfs-actions.pod:4684
15490 "This command just writes a swap file signature to an existing file. To "
15491 "create the file itself, use something like C<guestfs_fallocate>."
15496 #: ../src/guestfs-actions.pod:4691
15497 msgid "guestfs_modprobe"
15502 #: ../src/guestfs-actions.pod:4693
15506 " guestfs_modprobe (guestfs_h *g,\n"
15507 " const char *modulename);\n"
15513 #: ../src/guestfs-actions.pod:4697 ../fish/guestfish-actions.pod:3174
15514 msgid "This loads a kernel module in the appliance."
15519 #: ../src/guestfs-actions.pod:4699 ../fish/guestfish-actions.pod:3176
15521 "The kernel module must have been whitelisted when libguestfs was built (see "
15522 "C<appliance/kmod.whitelist.in> in the source)."
15527 #: ../src/guestfs-actions.pod:4706
15528 msgid "guestfs_mount"
15533 #: ../src/guestfs-actions.pod:4708
15537 " guestfs_mount (guestfs_h *g,\n"
15538 " const char *device,\n"
15539 " const char *mountpoint);\n"
15545 #: ../src/guestfs-actions.pod:4713 ../fish/guestfish-actions.pod:3183
15547 "Mount a guest disk at a position in the filesystem. Block devices are named "
15548 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
15549 "those block devices contain partitions, they will have the usual names (eg. "
15550 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
15555 #: ../src/guestfs-actions.pod:4719 ../fish/guestfish-actions.pod:3189
15557 "The rules are the same as for L<mount(2)>: A filesystem must first be "
15558 "mounted on C</> before others can be mounted. Other filesystems can only be "
15559 "mounted on directories which already exist."
15564 #: ../src/guestfs-actions.pod:4724 ../fish/guestfish-actions.pod:3194
15566 "The mounted filesystem is writable, if we have sufficient permissions on the "
15567 "underlying device."
15572 #: ../src/guestfs-actions.pod:4727
15574 "B<Important note:> When you use this call, the filesystem options C<sync> "
15575 "and C<noatime> are set implicitly. This was originally done because we "
15576 "thought it would improve reliability, but it turns out that I<-o sync> has a "
15577 "very large negative performance impact and negligible effect on "
15578 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
15579 "in any code that needs performance, and instead use C<guestfs_mount_options> "
15580 "(use an empty string for the first parameter if you don't want any options)."
15585 #: ../src/guestfs-actions.pod:4741
15586 msgid "guestfs_mount_loop"
15591 #: ../src/guestfs-actions.pod:4743
15595 " guestfs_mount_loop (guestfs_h *g,\n"
15596 " const char *file,\n"
15597 " const char *mountpoint);\n"
15603 #: ../src/guestfs-actions.pod:4748 ../fish/guestfish-actions.pod:3211
15605 "This command lets you mount C<file> (a filesystem image in a file) on a "
15606 "mount point. It is entirely equivalent to the command C<mount -o loop file "
15612 #: ../src/guestfs-actions.pod:4756
15613 msgid "guestfs_mount_options"
15618 #: ../src/guestfs-actions.pod:4758
15622 " guestfs_mount_options (guestfs_h *g,\n"
15623 " const char *options,\n"
15624 " const char *device,\n"
15625 " const char *mountpoint);\n"
15631 #: ../src/guestfs-actions.pod:4764
15633 "This is the same as the C<guestfs_mount> command, but it allows you to set "
15634 "the mount options as for the L<mount(8)> I<-o> flag."
15639 #: ../src/guestfs-actions.pod:4768 ../fish/guestfish-actions.pod:3223
15641 "If the C<options> parameter is an empty string, then no options are passed "
15642 "(all options default to whatever the filesystem uses)."
15647 #: ../src/guestfs-actions.pod:4774 ../src/guestfs-actions.pod:4788
15648 #: ../src/guestfs-actions.pod:4805
15649 msgid "(Added in 1.0.10)"
15654 #: ../src/guestfs-actions.pod:4776
15655 msgid "guestfs_mount_ro"
15660 #: ../src/guestfs-actions.pod:4778
15664 " guestfs_mount_ro (guestfs_h *g,\n"
15665 " const char *device,\n"
15666 " const char *mountpoint);\n"
15672 #: ../src/guestfs-actions.pod:4783
15674 "This is the same as the C<guestfs_mount> command, but it mounts the "
15675 "filesystem with the read-only (I<-o ro>) flag."
15680 #: ../src/guestfs-actions.pod:4790
15681 msgid "guestfs_mount_vfs"
15686 #: ../src/guestfs-actions.pod:4792
15690 " guestfs_mount_vfs (guestfs_h *g,\n"
15691 " const char *options,\n"
15692 " const char *vfstype,\n"
15693 " const char *device,\n"
15694 " const char *mountpoint);\n"
15700 #: ../src/guestfs-actions.pod:4799
15702 "This is the same as the C<guestfs_mount> command, but it allows you to set "
15703 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
15709 #: ../src/guestfs-actions.pod:4807
15710 msgid "guestfs_mountpoints"
15715 #: ../src/guestfs-actions.pod:4809
15719 " guestfs_mountpoints (guestfs_h *g);\n"
15725 #: ../src/guestfs-actions.pod:4812
15727 "This call is similar to C<guestfs_mounts>. That call returns a list of "
15728 "devices. This one returns a hash table (map) of device name to directory "
15729 "where the device is mounted."
15734 #: ../src/guestfs-actions.pod:4824
15735 msgid "guestfs_mounts"
15740 #: ../src/guestfs-actions.pod:4826
15744 " guestfs_mounts (guestfs_h *g);\n"
15750 #: ../src/guestfs-actions.pod:4829 ../fish/guestfish-actions.pod:3254
15752 "This returns the list of currently mounted filesystems. It returns the list "
15753 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
15758 #: ../src/guestfs-actions.pod:4832 ../fish/guestfish-actions.pod:3257
15759 msgid "Some internal mounts are not shown."
15764 #: ../src/guestfs-actions.pod:4834
15765 msgid "See also: C<guestfs_mountpoints>"
15770 #: ../src/guestfs-actions.pod:4842
15776 #: ../src/guestfs-actions.pod:4844
15780 " guestfs_mv (guestfs_h *g,\n"
15781 " const char *src,\n"
15782 " const char *dest);\n"
15788 #: ../src/guestfs-actions.pod:4849 ../fish/guestfish-actions.pod:3265
15790 "This moves a file from C<src> to C<dest> where C<dest> is either a "
15791 "destination filename or destination directory."
15796 #: ../src/guestfs-actions.pod:4856
15797 msgid "guestfs_ntfs_3g_probe"
15802 #: ../src/guestfs-actions.pod:4858
15806 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
15808 " const char *device);\n"
15814 #: ../src/guestfs-actions.pod:4863 ../fish/guestfish-actions.pod:3272
15816 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
15817 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
15818 "write, and some cannot be mounted at all)."
15823 #: ../src/guestfs-actions.pod:4867 ../fish/guestfish-actions.pod:3276
15825 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
15826 "can be mounted read-write. Set it to false if you want to test if the "
15827 "volume can be mounted read-only."
15832 #: ../src/guestfs-actions.pod:4871 ../fish/guestfish-actions.pod:3280
15834 "The return value is an integer which C<0> if the operation would succeed, or "
15835 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
15840 #: ../src/guestfs-actions.pod:4877
15841 msgid "(Added in 1.0.43)"
15846 #: ../src/guestfs-actions.pod:4879
15847 msgid "guestfs_ntfsresize"
15852 #: ../src/guestfs-actions.pod:4881
15856 " guestfs_ntfsresize (guestfs_h *g,\n"
15857 " const char *device);\n"
15863 #: ../src/guestfs-actions.pod:4885 ../fish/guestfish-actions.pod:3288
15865 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
15866 "size of the underlying device. See also L<ntfsresize(8)>."
15871 #: ../src/guestfs-actions.pod:4893
15872 msgid "guestfs_ntfsresize_size"
15877 #: ../src/guestfs-actions.pod:4895
15881 " guestfs_ntfsresize_size (guestfs_h *g,\n"
15882 " const char *device,\n"
15883 " int64_t size);\n"
15889 #: ../src/guestfs-actions.pod:4900
15891 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
15892 "to specify the new size (in bytes) explicitly."
15897 #: ../src/guestfs-actions.pod:4905 ../src/guestfs-actions.pod:5341
15898 #: ../src/guestfs-actions.pod:5414 ../src/guestfs-actions.pod:5680
15899 #: ../src/guestfs-actions.pod:7251
15900 msgid "(Added in 1.3.14)"
15905 #: ../src/guestfs-actions.pod:4907
15906 msgid "guestfs_part_add"
15911 #: ../src/guestfs-actions.pod:4909
15915 " guestfs_part_add (guestfs_h *g,\n"
15916 " const char *device,\n"
15917 " const char *prlogex,\n"
15918 " int64_t startsect,\n"
15919 " int64_t endsect);\n"
15925 #: ../src/guestfs-actions.pod:4916
15927 "This command adds a partition to C<device>. If there is no partition table "
15928 "on the device, call C<guestfs_part_init> first."
15933 #: ../src/guestfs-actions.pod:4919 ../fish/guestfish-actions.pod:3306
15935 "The C<prlogex> parameter is the type of partition. Normally you should pass "
15936 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
15937 "C<logical>) and C<e> (or C<extended>) partition types."
15942 #: ../src/guestfs-actions.pod:4924 ../fish/guestfish-actions.pod:3311
15944 "C<startsect> and C<endsect> are the start and end of the partition in "
15945 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
15946 "from the end of the disk (C<-1> is the last sector)."
15951 #: ../src/guestfs-actions.pod:4928
15953 "Creating a partition which covers the whole disk is not so easy. Use "
15954 "C<guestfs_part_disk> to do that."
15959 #: ../src/guestfs-actions.pod:4933 ../src/guestfs-actions.pod:4971
15960 #: ../src/guestfs-actions.pod:5024 ../src/guestfs-actions.pod:5102
15961 #: ../src/guestfs-actions.pod:5140 ../src/guestfs-actions.pod:5159
15962 #: ../src/guestfs-actions.pod:5199
15963 msgid "(Added in 1.0.78)"
15968 #: ../src/guestfs-actions.pod:4935
15969 msgid "guestfs_part_del"
15974 #: ../src/guestfs-actions.pod:4937
15978 " guestfs_part_del (guestfs_h *g,\n"
15979 " const char *device,\n"
15986 #: ../src/guestfs-actions.pod:4942 ../fish/guestfish-actions.pod:3322
15987 msgid "This command deletes the partition numbered C<partnum> on C<device>."
15992 #: ../src/guestfs-actions.pod:4944 ../fish/guestfish-actions.pod:3324
15994 "Note that in the case of MBR partitioning, deleting an extended partition "
15995 "also deletes any logical partitions it contains."
16000 #: ../src/guestfs-actions.pod:4952
16001 msgid "guestfs_part_disk"
16006 #: ../src/guestfs-actions.pod:4954
16010 " guestfs_part_disk (guestfs_h *g,\n"
16011 " const char *device,\n"
16012 " const char *parttype);\n"
16018 #: ../src/guestfs-actions.pod:4959
16020 "This command is simply a combination of C<guestfs_part_init> followed by "
16021 "C<guestfs_part_add> to create a single primary partition covering the whole "
16027 #: ../src/guestfs-actions.pod:4963
16029 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
16030 "possible values are described in C<guestfs_part_init>."
16035 #: ../src/guestfs-actions.pod:4973
16036 msgid "guestfs_part_get_bootable"
16041 #: ../src/guestfs-actions.pod:4975
16045 " guestfs_part_get_bootable (guestfs_h *g,\n"
16046 " const char *device,\n"
16053 #: ../src/guestfs-actions.pod:4980 ../fish/guestfish-actions.pod:3346
16055 "This command returns true if the partition C<partnum> on C<device> has the "
16056 "bootable flag set."
16061 #: ../src/guestfs-actions.pod:4983
16062 msgid "See also C<guestfs_part_set_bootable>."
16067 #: ../src/guestfs-actions.pod:4989
16068 msgid "guestfs_part_get_mbr_id"
16073 #: ../src/guestfs-actions.pod:4991
16077 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
16078 " const char *device,\n"
16085 #: ../src/guestfs-actions.pod:4996 ../fish/guestfish-actions.pod:3355
16087 "Returns the MBR type byte (also known as the ID byte) from the numbered "
16088 "partition C<partnum>."
16093 #: ../src/guestfs-actions.pod:4999 ../src/guestfs-actions.pod:5175
16095 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
16096 "undefined results for other partition table types (see "
16097 "C<guestfs_part_get_parttype>)."
16102 #: ../src/guestfs-actions.pod:5007
16103 msgid "guestfs_part_get_parttype"
16108 #: ../src/guestfs-actions.pod:5009
16112 " guestfs_part_get_parttype (guestfs_h *g,\n"
16113 " const char *device);\n"
16119 #: ../src/guestfs-actions.pod:5013 ../fish/guestfish-actions.pod:3366
16121 "This command examines the partition table on C<device> and returns the "
16122 "partition table type (format) being used."
16127 #: ../src/guestfs-actions.pod:5016
16129 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
16130 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
16131 "possible, although unusual. See C<guestfs_part_init> for a full list."
16136 #: ../src/guestfs-actions.pod:5026
16137 msgid "guestfs_part_init"
16142 #: ../src/guestfs-actions.pod:5028
16146 " guestfs_part_init (guestfs_h *g,\n"
16147 " const char *device,\n"
16148 " const char *parttype);\n"
16154 #: ../src/guestfs-actions.pod:5033 ../fish/guestfish-actions.pod:3378
16156 "This creates an empty partition table on C<device> of one of the partition "
16157 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
16158 "(for large disks)."
16163 #: ../src/guestfs-actions.pod:5037
16165 "Initially there are no partitions. Following this, you should call "
16166 "C<guestfs_part_add> for each partition required."
16171 #: ../src/guestfs-actions.pod:5040 ../fish/guestfish-actions.pod:3385
16172 msgid "Possible values for C<parttype> are:"
16177 #: ../src/guestfs-actions.pod:5044 ../fish/guestfish-actions.pod:3389
16178 msgid "B<efi> | B<gpt>"
16183 #: ../src/guestfs-actions.pod:5046 ../fish/guestfish-actions.pod:3391
16184 msgid "Intel EFI / GPT partition table."
16189 #: ../src/guestfs-actions.pod:5048 ../fish/guestfish-actions.pod:3393
16191 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
16192 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
16193 "the C<mbr> format."
16198 #: ../src/guestfs-actions.pod:5052 ../fish/guestfish-actions.pod:3397
16199 msgid "B<mbr> | B<msdos>"
16204 #: ../src/guestfs-actions.pod:5054 ../fish/guestfish-actions.pod:3399
16206 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
16207 "Windows. This partition type will B<only> work for device sizes up to 2 "
16208 "TB. For large disks we recommend using C<gpt>."
16213 #: ../src/guestfs-actions.pod:5061 ../fish/guestfish-actions.pod:3406
16215 "Other partition table types that may work but are not supported include:"
16220 #: ../src/guestfs-actions.pod:5066 ../fish/guestfish-actions.pod:3411
16226 #: ../src/guestfs-actions.pod:5068 ../fish/guestfish-actions.pod:3413
16227 msgid "AIX disk labels."
16232 #: ../src/guestfs-actions.pod:5070 ../fish/guestfish-actions.pod:3415
16233 msgid "B<amiga> | B<rdb>"
16238 #: ../src/guestfs-actions.pod:5072 ../fish/guestfish-actions.pod:3417
16239 msgid "Amiga \"Rigid Disk Block\" format."
16244 #: ../src/guestfs-actions.pod:5074 ../fish/guestfish-actions.pod:3419
16250 #: ../src/guestfs-actions.pod:5076 ../fish/guestfish-actions.pod:3421
16251 msgid "BSD disk labels."
16256 #: ../src/guestfs-actions.pod:5078 ../fish/guestfish-actions.pod:3423
16262 #: ../src/guestfs-actions.pod:5080 ../fish/guestfish-actions.pod:3425
16263 msgid "DASD, used on IBM mainframes."
16268 #: ../src/guestfs-actions.pod:5082 ../fish/guestfish-actions.pod:3427
16274 #: ../src/guestfs-actions.pod:5084 ../fish/guestfish-actions.pod:3429
16275 msgid "MIPS/SGI volumes."
16280 #: ../src/guestfs-actions.pod:5086 ../fish/guestfish-actions.pod:3431
16286 #: ../src/guestfs-actions.pod:5088 ../fish/guestfish-actions.pod:3433
16287 msgid "Old Mac partition format. Modern Macs use C<gpt>."
16292 #: ../src/guestfs-actions.pod:5090 ../fish/guestfish-actions.pod:3435
16298 #: ../src/guestfs-actions.pod:5092 ../fish/guestfish-actions.pod:3437
16299 msgid "NEC PC-98 format, common in Japan apparently."
16304 #: ../src/guestfs-actions.pod:5094 ../fish/guestfish-actions.pod:3439
16310 #: ../src/guestfs-actions.pod:5096 ../fish/guestfish-actions.pod:3441
16311 msgid "Sun disk labels."
16316 #: ../src/guestfs-actions.pod:5104
16317 msgid "guestfs_part_list"
16322 #: ../src/guestfs-actions.pod:5106
16325 " struct guestfs_partition_list *\n"
16326 " guestfs_part_list (guestfs_h *g,\n"
16327 " const char *device);\n"
16333 #: ../src/guestfs-actions.pod:5110 ../fish/guestfish-actions.pod:3449
16335 "This command parses the partition table on C<device> and returns the list of "
16336 "partitions found."
16341 #: ../src/guestfs-actions.pod:5113 ../fish/guestfish-actions.pod:3452
16342 msgid "The fields in the returned structure are:"
16347 #: ../src/guestfs-actions.pod:5117 ../fish/guestfish-actions.pod:3456
16348 msgid "B<part_num>"
16353 #: ../src/guestfs-actions.pod:5119 ../fish/guestfish-actions.pod:3458
16354 msgid "Partition number, counting from 1."
16359 #: ../src/guestfs-actions.pod:5121 ../fish/guestfish-actions.pod:3460
16360 msgid "B<part_start>"
16365 #: ../src/guestfs-actions.pod:5123
16367 "Start of the partition I<in bytes>. To get sectors you have to divide by "
16368 "the device's sector size, see C<guestfs_blockdev_getss>."
16373 #: ../src/guestfs-actions.pod:5126 ../fish/guestfish-actions.pod:3465
16374 msgid "B<part_end>"
16379 #: ../src/guestfs-actions.pod:5128 ../fish/guestfish-actions.pod:3467
16380 msgid "End of the partition in bytes."
16385 #: ../src/guestfs-actions.pod:5130 ../fish/guestfish-actions.pod:3469
16386 msgid "B<part_size>"
16391 #: ../src/guestfs-actions.pod:5132 ../fish/guestfish-actions.pod:3471
16392 msgid "Size of the partition in bytes."
16397 #: ../src/guestfs-actions.pod:5136
16399 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
16400 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
16406 #: ../src/guestfs-actions.pod:5142
16407 msgid "guestfs_part_set_bootable"
16412 #: ../src/guestfs-actions.pod:5144
16416 " guestfs_part_set_bootable (guestfs_h *g,\n"
16417 " const char *device,\n"
16419 " int bootable);\n"
16425 #: ../src/guestfs-actions.pod:5150 ../fish/guestfish-actions.pod:3479
16427 "This sets the bootable flag on partition numbered C<partnum> on device "
16428 "C<device>. Note that partitions are numbered from 1."
16433 #: ../src/guestfs-actions.pod:5153 ../fish/guestfish-actions.pod:3482
16435 "The bootable flag is used by some operating systems (notably Windows) to "
16436 "determine which partition to boot from. It is by no means universally "
16442 #: ../src/guestfs-actions.pod:5161
16443 msgid "guestfs_part_set_mbr_id"
16448 #: ../src/guestfs-actions.pod:5163
16452 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
16453 " const char *device,\n"
16461 #: ../src/guestfs-actions.pod:5169 ../fish/guestfish-actions.pod:3490
16463 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
16464 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
16465 "documentation are in fact hexadecimal numbers, but usually documented "
16466 "without any leading \"0x\" which might be confusing."
16471 #: ../src/guestfs-actions.pod:5183
16472 msgid "guestfs_part_set_name"
16477 #: ../src/guestfs-actions.pod:5185
16481 " guestfs_part_set_name (guestfs_h *g,\n"
16482 " const char *device,\n"
16484 " const char *name);\n"
16490 #: ../src/guestfs-actions.pod:5191 ../fish/guestfish-actions.pod:3504
16492 "This sets the partition name on partition numbered C<partnum> on device "
16493 "C<device>. Note that partitions are numbered from 1."
16498 #: ../src/guestfs-actions.pod:5194 ../fish/guestfish-actions.pod:3507
16500 "The partition name can only be set on certain types of partition table. "
16501 "This works on C<gpt> but not on C<mbr> partitions."
16506 #: ../src/guestfs-actions.pod:5201
16507 msgid "guestfs_part_to_dev"
16512 #: ../src/guestfs-actions.pod:5203
16516 " guestfs_part_to_dev (guestfs_h *g,\n"
16517 " const char *partition);\n"
16523 #: ../src/guestfs-actions.pod:5207 ../fish/guestfish-actions.pod:3514
16525 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
16526 "partition number, returning the device name (eg. \"/dev/sdb\")."
16531 #: ../src/guestfs-actions.pod:5211
16533 "The named partition must exist, for example as a string returned from "
16534 "C<guestfs_list_partitions>."
16539 #: ../src/guestfs-actions.pod:5219
16540 msgid "guestfs_ping_daemon"
16545 #: ../src/guestfs-actions.pod:5221
16549 " guestfs_ping_daemon (guestfs_h *g);\n"
16555 #: ../src/guestfs-actions.pod:5224 ../fish/guestfish-actions.pod:3525
16557 "This is a test probe into the guestfs daemon running inside the qemu "
16558 "subprocess. Calling this function checks that the daemon responds to the "
16559 "ping message, without affecting the daemon or attached block device(s) in "
16565 #: ../src/guestfs-actions.pod:5233
16566 msgid "guestfs_pread"
16571 #: ../src/guestfs-actions.pod:5235
16575 " guestfs_pread (guestfs_h *g,\n"
16576 " const char *path,\n"
16578 " int64_t offset,\n"
16579 " size_t *size_r);\n"
16585 #: ../src/guestfs-actions.pod:5242 ../fish/guestfish-actions.pod:3534
16587 "This command lets you read part of a file. It reads C<count> bytes of the "
16588 "file, starting at C<offset>, from file C<path>."
16593 #: ../src/guestfs-actions.pod:5245 ../src/guestfs-actions.pod:5271
16594 #: ../fish/guestfish-actions.pod:3537 ../fish/guestfish-actions.pod:3552
16596 "This may read fewer bytes than requested. For further details see the "
16597 "L<pread(2)> system call."
16602 #: ../src/guestfs-actions.pod:5248
16603 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
16608 #: ../src/guestfs-actions.pod:5259
16609 msgid "guestfs_pread_device"
16614 #: ../src/guestfs-actions.pod:5261
16618 " guestfs_pread_device (guestfs_h *g,\n"
16619 " const char *device,\n"
16621 " int64_t offset,\n"
16622 " size_t *size_r);\n"
16628 #: ../src/guestfs-actions.pod:5268 ../fish/guestfish-actions.pod:3549
16630 "This command lets you read part of a file. It reads C<count> bytes of "
16631 "C<device>, starting at C<offset>."
16636 #: ../src/guestfs-actions.pod:5274
16637 msgid "See also C<guestfs_pread>."
16642 #: ../src/guestfs-actions.pod:5283
16643 msgid "(Added in 1.5.21)"
16648 #: ../src/guestfs-actions.pod:5285
16649 msgid "guestfs_pvcreate"
16654 #: ../src/guestfs-actions.pod:5287
16658 " guestfs_pvcreate (guestfs_h *g,\n"
16659 " const char *device);\n"
16665 #: ../src/guestfs-actions.pod:5291 ../fish/guestfish-actions.pod:3564
16667 "This creates an LVM physical volume on the named C<device>, where C<device> "
16668 "should usually be a partition name such as C</dev/sda1>."
16673 #: ../src/guestfs-actions.pod:5299
16674 msgid "guestfs_pvremove"
16679 #: ../src/guestfs-actions.pod:5301
16683 " guestfs_pvremove (guestfs_h *g,\n"
16684 " const char *device);\n"
16690 #: ../src/guestfs-actions.pod:5305 ../fish/guestfish-actions.pod:3572
16692 "This wipes a physical volume C<device> so that LVM will no longer recognise "
16698 #: ../src/guestfs-actions.pod:5308 ../fish/guestfish-actions.pod:3575
16700 "The implementation uses the C<pvremove> command which refuses to wipe "
16701 "physical volumes that contain any volume groups, so you have to remove those "
16707 #: ../src/guestfs-actions.pod:5316
16708 msgid "guestfs_pvresize"
16713 #: ../src/guestfs-actions.pod:5318
16717 " guestfs_pvresize (guestfs_h *g,\n"
16718 " const char *device);\n"
16724 #: ../src/guestfs-actions.pod:5322 ../fish/guestfish-actions.pod:3583
16726 "This resizes (expands or shrinks) an existing LVM physical volume to match "
16727 "the new size of the underlying device."
16732 #: ../src/guestfs-actions.pod:5329
16733 msgid "guestfs_pvresize_size"
16738 #: ../src/guestfs-actions.pod:5331
16742 " guestfs_pvresize_size (guestfs_h *g,\n"
16743 " const char *device,\n"
16744 " int64_t size);\n"
16750 #: ../src/guestfs-actions.pod:5336
16752 "This command is the same as C<guestfs_pvresize> except that it allows you to "
16753 "specify the new size (in bytes) explicitly."
16758 #: ../src/guestfs-actions.pod:5343
16759 msgid "guestfs_pvs"
16764 #: ../src/guestfs-actions.pod:5345
16768 " guestfs_pvs (guestfs_h *g);\n"
16774 #: ../src/guestfs-actions.pod:5348 ../fish/guestfish-actions.pod:3597
16776 "List all the physical volumes detected. This is the equivalent of the L<pvs"
16782 #: ../src/guestfs-actions.pod:5351 ../fish/guestfish-actions.pod:3600
16784 "This returns a list of just the device names that contain PVs (eg. C</dev/"
16790 #: ../src/guestfs-actions.pod:5354
16791 msgid "See also C<guestfs_pvs_full>."
16796 #: ../src/guestfs-actions.pod:5362
16797 msgid "guestfs_pvs_full"
16802 #: ../src/guestfs-actions.pod:5364
16805 " struct guestfs_lvm_pv_list *\n"
16806 " guestfs_pvs_full (guestfs_h *g);\n"
16812 #: ../src/guestfs-actions.pod:5367 ../fish/guestfish-actions.pod:3609
16814 "List all the physical volumes detected. This is the equivalent of the L<pvs"
16815 "(8)> command. The \"full\" version includes all fields."
16820 #: ../src/guestfs-actions.pod:5370
16822 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
16823 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after use>."
16828 #: ../src/guestfs-actions.pod:5376
16829 msgid "guestfs_pvuuid"
16834 #: ../src/guestfs-actions.pod:5378
16838 " guestfs_pvuuid (guestfs_h *g,\n"
16839 " const char *device);\n"
16845 #: ../src/guestfs-actions.pod:5382 ../fish/guestfish-actions.pod:3616
16846 msgid "This command returns the UUID of the LVM PV C<device>."
16851 #: ../src/guestfs-actions.pod:5389
16852 msgid "guestfs_pwrite"
16857 #: ../src/guestfs-actions.pod:5391
16861 " guestfs_pwrite (guestfs_h *g,\n"
16862 " const char *path,\n"
16863 " const char *content,\n"
16864 " size_t content_size,\n"
16865 " int64_t offset);\n"
16871 #: ../src/guestfs-actions.pod:5398 ../fish/guestfish-actions.pod:3622
16873 "This command writes to part of a file. It writes the data buffer C<content> "
16874 "to the file C<path> starting at offset C<offset>."
16879 #: ../src/guestfs-actions.pod:5401 ../fish/guestfish-actions.pod:3625
16881 "This command implements the L<pwrite(2)> system call, and like that system "
16882 "call it may not write the full data requested. The return value is the "
16883 "number of bytes that were actually written to the file. This could even be "
16884 "0, although short writes are unlikely for regular files in ordinary "
16890 #: ../src/guestfs-actions.pod:5407
16891 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
16896 #: ../src/guestfs-actions.pod:5416
16897 msgid "guestfs_pwrite_device"
16902 #: ../src/guestfs-actions.pod:5418
16906 " guestfs_pwrite_device (guestfs_h *g,\n"
16907 " const char *device,\n"
16908 " const char *content,\n"
16909 " size_t content_size,\n"
16910 " int64_t offset);\n"
16916 #: ../src/guestfs-actions.pod:5425 ../fish/guestfish-actions.pod:3640
16918 "This command writes to part of a device. It writes the data buffer "
16919 "C<content> to C<device> starting at offset C<offset>."
16924 #: ../src/guestfs-actions.pod:5428 ../fish/guestfish-actions.pod:3643
16926 "This command implements the L<pwrite(2)> system call, and like that system "
16927 "call it may not write the full data requested (although short writes to disk "
16928 "devices and partitions are probably impossible with standard Linux kernels)."
16933 #: ../src/guestfs-actions.pod:5433
16934 msgid "See also C<guestfs_pwrite>."
16939 #: ../src/guestfs-actions.pod:5440
16940 msgid "(Added in 1.5.20)"
16945 #: ../src/guestfs-actions.pod:5442
16946 msgid "guestfs_read_file"
16951 #: ../src/guestfs-actions.pod:5444
16955 " guestfs_read_file (guestfs_h *g,\n"
16956 " const char *path,\n"
16957 " size_t *size_r);\n"
16963 #: ../src/guestfs-actions.pod:5449 ../fish/guestfish-actions.pod:3657
16964 msgid "This calls returns the contents of the file C<path> as a buffer."
16969 #: ../src/guestfs-actions.pod:5452
16971 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
16972 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
16973 "function is limited in the total size of file that can be handled."
16978 #: ../src/guestfs-actions.pod:5464
16979 msgid "(Added in 1.0.63)"
16984 #: ../src/guestfs-actions.pod:5466
16985 msgid "guestfs_read_lines"
16990 #: ../src/guestfs-actions.pod:5468
16994 " guestfs_read_lines (guestfs_h *g,\n"
16995 " const char *path);\n"
17001 #: ../src/guestfs-actions.pod:5474 ../fish/guestfish-actions.pod:3674
17003 "The file contents are returned as a list of lines. Trailing C<LF> and "
17004 "C<CRLF> character sequences are I<not> returned."
17009 #: ../src/guestfs-actions.pod:5477
17011 "Note that this function cannot correctly handle binary files (specifically, "
17012 "files containing C<\\0> character which is treated as end of line). For "
17013 "those you need to use the C<guestfs_read_file> function which has a more "
17014 "complex interface."
17019 #: ../src/guestfs-actions.pod:5488
17020 msgid "guestfs_readdir"
17025 #: ../src/guestfs-actions.pod:5490
17028 " struct guestfs_dirent_list *\n"
17029 " guestfs_readdir (guestfs_h *g,\n"
17030 " const char *dir);\n"
17036 #: ../src/guestfs-actions.pod:5494 ../fish/guestfish-actions.pod:3686
17037 msgid "This returns the list of directory entries in directory C<dir>."
17042 #: ../src/guestfs-actions.pod:5496 ../fish/guestfish-actions.pod:3688
17044 "All entries in the directory are returned, including C<.> and C<..>. The "
17045 "entries are I<not> sorted, but returned in the same order as the underlying "
17051 #: ../src/guestfs-actions.pod:5500 ../fish/guestfish-actions.pod:3692
17053 "Also this call returns basic file type information about each file. The "
17054 "C<ftyp> field will contain one of the following characters:"
17059 #: ../src/guestfs-actions.pod:5505 ../fish/guestfish-actions.pod:3697
17065 #: ../src/guestfs-actions.pod:5507 ../fish/guestfish-actions.pod:3699
17066 msgid "Block special"
17071 #: ../src/guestfs-actions.pod:5509 ../fish/guestfish-actions.pod:3701
17077 #: ../src/guestfs-actions.pod:5511 ../fish/guestfish-actions.pod:3703
17078 msgid "Char special"
17083 #: ../src/guestfs-actions.pod:5513 ../fish/guestfish-actions.pod:3705
17089 #: ../src/guestfs-actions.pod:5515 ../fish/guestfish-actions.pod:3707
17095 #: ../src/guestfs-actions.pod:5517 ../fish/guestfish-actions.pod:3709
17101 #: ../src/guestfs-actions.pod:5519 ../fish/guestfish-actions.pod:3711
17102 msgid "FIFO (named pipe)"
17107 #: ../src/guestfs-actions.pod:5521 ../fish/guestfish-actions.pod:3713
17113 #: ../src/guestfs-actions.pod:5523 ../fish/guestfish-actions.pod:3715
17114 msgid "Symbolic link"
17119 #: ../src/guestfs-actions.pod:5525 ../fish/guestfish-actions.pod:3717
17125 #: ../src/guestfs-actions.pod:5527 ../fish/guestfish-actions.pod:3719
17126 msgid "Regular file"
17131 #: ../src/guestfs-actions.pod:5529 ../fish/guestfish-actions.pod:3721
17137 #: ../src/guestfs-actions.pod:5531 ../fish/guestfish-actions.pod:3723
17143 #: ../src/guestfs-actions.pod:5533 ../fish/guestfish-actions.pod:3725
17149 #: ../src/guestfs-actions.pod:5535 ../fish/guestfish-actions.pod:3727
17150 msgid "Unknown file type"
17155 #: ../src/guestfs-actions.pod:5537 ../fish/guestfish-actions.pod:3729
17161 #: ../src/guestfs-actions.pod:5539 ../fish/guestfish-actions.pod:3731
17163 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
17168 #: ../src/guestfs-actions.pod:5544
17170 "This function is primarily intended for use by programs. To get a simple "
17171 "list of names, use C<guestfs_ls>. To get a printable directory for human "
17172 "consumption, use C<guestfs_ll>."
17177 #: ../src/guestfs-actions.pod:5548
17179 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
17180 "was an error. I<The caller must call C<guestfs_free_dirent_list> after use>."
17185 #: ../src/guestfs-actions.pod:5554
17186 msgid "guestfs_readlink"
17191 #: ../src/guestfs-actions.pod:5556
17195 " guestfs_readlink (guestfs_h *g,\n"
17196 " const char *path);\n"
17202 #: ../src/guestfs-actions.pod:5560 ../fish/guestfish-actions.pod:3744
17203 msgid "This command reads the target of a symbolic link."
17208 #: ../src/guestfs-actions.pod:5567
17209 msgid "guestfs_readlinklist"
17214 #: ../src/guestfs-actions.pod:5569
17218 " guestfs_readlinklist (guestfs_h *g,\n"
17219 " const char *path,\n"
17220 " char *const *names);\n"
17226 #: ../src/guestfs-actions.pod:5574 ../fish/guestfish-actions.pod:3750
17228 "This call allows you to do a C<readlink> operation on multiple files, where "
17229 "all files are in the directory C<path>. C<names> is the list of files from "
17235 #: ../src/guestfs-actions.pod:5578 ../fish/guestfish-actions.pod:3754
17237 "On return you get a list of strings, with a one-to-one correspondence to the "
17238 "C<names> list. Each string is the value of the symbolic link."
17243 #: ../src/guestfs-actions.pod:5582 ../fish/guestfish-actions.pod:3758
17245 "If the C<readlink(2)> operation fails on any name, then the corresponding "
17246 "result string is the empty string C<\"\">. However the whole operation is "
17247 "completed even if there were C<readlink(2)> errors, and so you can call this "
17248 "function with names where you don't know if they are symbolic links already "
17249 "(albeit slightly less efficient)."
17254 #: ../src/guestfs-actions.pod:5589 ../fish/guestfish-actions.pod:3765
17256 "This call is intended for programs that want to efficiently list a directory "
17257 "contents without making many round-trips. Very long directory listings "
17258 "might cause the protocol message size to be exceeded, causing this call to "
17259 "fail. The caller must split up such requests into smaller groups of names."
17264 #: ../src/guestfs-actions.pod:5602
17265 msgid "guestfs_realpath"
17270 #: ../src/guestfs-actions.pod:5604
17274 " guestfs_realpath (guestfs_h *g,\n"
17275 " const char *path);\n"
17281 #: ../src/guestfs-actions.pod:5608 ../fish/guestfish-actions.pod:3776
17283 "Return the canonicalized absolute pathname of C<path>. The returned path "
17284 "has no C<.>, C<..> or symbolic link path elements."
17289 #: ../src/guestfs-actions.pod:5616
17290 msgid "guestfs_removexattr"
17295 #: ../src/guestfs-actions.pod:5618
17299 " guestfs_removexattr (guestfs_h *g,\n"
17300 " const char *xattr,\n"
17301 " const char *path);\n"
17307 #: ../src/guestfs-actions.pod:5623 ../fish/guestfish-actions.pod:3783
17309 "This call removes the extended attribute named C<xattr> of the file C<path>."
17314 #: ../src/guestfs-actions.pod:5626
17315 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
17320 #: ../src/guestfs-actions.pod:5632
17321 msgid "guestfs_resize2fs"
17326 #: ../src/guestfs-actions.pod:5634
17330 " guestfs_resize2fs (guestfs_h *g,\n"
17331 " const char *device);\n"
17337 #: ../src/guestfs-actions.pod:5638 ../fish/guestfish-actions.pod:3792
17339 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
17340 "underlying device."
17345 #: ../src/guestfs-actions.pod:5641
17347 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
17348 "C<device> before calling this command. For unknown reasons C<resize2fs> "
17349 "sometimes gives an error about this and sometimes not. In any case, it is "
17350 "always safe to call C<guestfs_e2fsck_f> before calling this function."
17354 #: ../src/guestfs-actions.pod:5651
17355 msgid "guestfs_resize2fs_M"
17359 #: ../src/guestfs-actions.pod:5653
17363 " guestfs_resize2fs_M (guestfs_h *g,\n"
17364 " const char *device);\n"
17369 #: ../src/guestfs-actions.pod:5657
17371 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
17372 "resized to its minimum size. This works like the I<-M> option to the "
17373 "C<resize2fs> command."
17377 #: ../src/guestfs-actions.pod:5661
17379 "To get the resulting size of the filesystem you should call "
17380 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
17381 "These two numbers, multiplied together, give the resulting size of the "
17382 "minimal filesystem in bytes."
17387 #: ../src/guestfs-actions.pod:5668
17388 msgid "guestfs_resize2fs_size"
17393 #: ../src/guestfs-actions.pod:5670
17397 " guestfs_resize2fs_size (guestfs_h *g,\n"
17398 " const char *device,\n"
17399 " int64_t size);\n"
17405 #: ../src/guestfs-actions.pod:5675
17407 "This command is the same as C<guestfs_resize2fs> except that it allows you "
17408 "to specify the new size (in bytes) explicitly."
17413 #: ../src/guestfs-actions.pod:5682
17419 #: ../src/guestfs-actions.pod:5684
17423 " guestfs_rm (guestfs_h *g,\n"
17424 " const char *path);\n"
17430 #: ../src/guestfs-actions.pod:5688 ../fish/guestfish-actions.pod:3825
17431 msgid "Remove the single file C<path>."
17436 #: ../src/guestfs-actions.pod:5694
17437 msgid "guestfs_rm_rf"
17442 #: ../src/guestfs-actions.pod:5696
17446 " guestfs_rm_rf (guestfs_h *g,\n"
17447 " const char *path);\n"
17453 #: ../src/guestfs-actions.pod:5700 ../fish/guestfish-actions.pod:3831
17455 "Remove the file or directory C<path>, recursively removing the contents if "
17456 "its a directory. This is like the C<rm -rf> shell command."
17461 #: ../src/guestfs-actions.pod:5708
17462 msgid "guestfs_rmdir"
17467 #: ../src/guestfs-actions.pod:5710
17471 " guestfs_rmdir (guestfs_h *g,\n"
17472 " const char *path);\n"
17478 #: ../src/guestfs-actions.pod:5714 ../fish/guestfish-actions.pod:3839
17479 msgid "Remove the single directory C<path>."
17484 #: ../src/guestfs-actions.pod:5720
17485 msgid "guestfs_rmmountpoint"
17490 #: ../src/guestfs-actions.pod:5722
17494 " guestfs_rmmountpoint (guestfs_h *g,\n"
17495 " const char *exemptpath);\n"
17501 #: ../src/guestfs-actions.pod:5726
17503 "This calls removes a mountpoint that was previously created with "
17504 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
17509 #: ../src/guestfs-actions.pod:5734
17510 msgid "guestfs_scrub_device"
17515 #: ../src/guestfs-actions.pod:5736
17519 " guestfs_scrub_device (guestfs_h *g,\n"
17520 " const char *device);\n"
17526 #: ../src/guestfs-actions.pod:5740 ../fish/guestfish-actions.pod:3853
17528 "This command writes patterns over C<device> to make data retrieval more "
17534 #: ../src/guestfs-actions.pod:5743 ../src/guestfs-actions.pod:5764
17535 #: ../src/guestfs-actions.pod:5783 ../fish/guestfish-actions.pod:3856
17536 #: ../fish/guestfish-actions.pod:3871 ../fish/guestfish-actions.pod:3884
17538 "It is an interface to the L<scrub(1)> program. See that manual page for "
17544 #: ../src/guestfs-actions.pod:5751 ../src/guestfs-actions.pod:5769
17545 #: ../src/guestfs-actions.pod:5788
17546 msgid "(Added in 1.0.52)"
17551 #: ../src/guestfs-actions.pod:5753
17552 msgid "guestfs_scrub_file"
17557 #: ../src/guestfs-actions.pod:5755
17561 " guestfs_scrub_file (guestfs_h *g,\n"
17562 " const char *file);\n"
17568 #: ../src/guestfs-actions.pod:5759 ../fish/guestfish-actions.pod:3866
17570 "This command writes patterns over a file to make data retrieval more "
17576 #: ../src/guestfs-actions.pod:5762 ../fish/guestfish-actions.pod:3869
17577 msgid "The file is I<removed> after scrubbing."
17582 #: ../src/guestfs-actions.pod:5771
17583 msgid "guestfs_scrub_freespace"
17588 #: ../src/guestfs-actions.pod:5773
17592 " guestfs_scrub_freespace (guestfs_h *g,\n"
17593 " const char *dir);\n"
17599 #: ../src/guestfs-actions.pod:5777
17601 "This command creates the directory C<dir> and then fills it with files until "
17602 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
17603 "and deletes them. The intention is to scrub any free space on the partition "
17604 "containing C<dir>."
17609 #: ../src/guestfs-actions.pod:5790
17610 msgid "guestfs_set_append"
17615 #: ../src/guestfs-actions.pod:5792
17619 " guestfs_set_append (guestfs_h *g,\n"
17620 " const char *append);\n"
17626 #: ../src/guestfs-actions.pod:5796 ../fish/guestfish-actions.pod:3893
17628 "This function is used to add additional options to the guest kernel command "
17634 #: ../src/guestfs-actions.pod:5799 ../fish/guestfish-actions.pod:3896
17636 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
17637 "environment variable."
17642 #: ../src/guestfs-actions.pod:5802 ../fish/guestfish-actions.pod:3899
17644 "Setting C<append> to C<NULL> means I<no> additional options are passed "
17645 "(libguestfs always adds a few of its own)."
17649 #: ../src/guestfs-actions.pod:5809
17650 msgid "guestfs_set_attach_method"
17654 #: ../src/guestfs-actions.pod:5811
17658 " guestfs_set_attach_method (guestfs_h *g,\n"
17659 " const char *attachmethod);\n"
17664 #: ../src/guestfs-actions.pod:5815 ../fish/guestfish-actions.pod:3908
17666 "Set the method that libguestfs uses to connect to the back end guestfsd "
17667 "daemon. Possible methods are:"
17671 #: ../src/guestfs-actions.pod:5822 ../fish/guestfish-actions.pod:3915
17673 "Launch an appliance and connect to it. This is the ordinary method and the "
17678 #: ../src/guestfs-actions.pod:5825 ../fish/guestfish-actions.pod:3918
17679 msgid "C<unix:I<path>>"
17683 #: ../src/guestfs-actions.pod:5827 ../fish/guestfish-actions.pod:3920
17684 msgid "Connect to the Unix domain socket I<path>."
17688 #: ../src/guestfs-actions.pod:5829 ../fish/guestfish-actions.pod:3922
17690 "This method lets you connect to an existing daemon or (using virtio-serial) "
17691 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
17692 "RUNNING DAEMONS>."
17697 #: ../src/guestfs-actions.pod:5837
17698 msgid "guestfs_set_autosync"
17703 #: ../src/guestfs-actions.pod:5839
17707 " guestfs_set_autosync (guestfs_h *g,\n"
17708 " int autosync);\n"
17713 #: ../src/guestfs-actions.pod:5843 ../fish/guestfish-actions.pod:3934
17715 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
17716 "effort attempt to make filesystems consistent and synchronized when the "
17717 "handle is closed (also if the program exits without closing handles)."
17722 #: ../src/guestfs-actions.pod:5848 ../fish/guestfish-actions.pod:3939
17724 "This is enabled by default (since libguestfs 1.5.24, previously it was "
17725 "disabled by default)."
17730 #: ../src/guestfs-actions.pod:5855
17731 msgid "guestfs_set_direct"
17736 #: ../src/guestfs-actions.pod:5857
17740 " guestfs_set_direct (guestfs_h *g,\n"
17747 #: ../src/guestfs-actions.pod:5861 ../fish/guestfish-actions.pod:3948
17749 "If the direct appliance mode flag is enabled, then stdin and stdout are "
17750 "passed directly through to the appliance once it is launched."
17755 #: ../src/guestfs-actions.pod:5865
17757 "One consequence of this is that log messages aren't caught by the library "
17758 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
17764 #: ../src/guestfs-actions.pod:5869 ../fish/guestfish-actions.pod:3956
17765 msgid "You probably don't want to use this unless you know what you are doing."
17770 #: ../src/guestfs-actions.pod:5872 ../fish/guestfish-actions.pod:3959
17771 msgid "The default is disabled."
17776 #: ../src/guestfs-actions.pod:5878
17777 msgid "guestfs_set_e2label"
17782 #: ../src/guestfs-actions.pod:5880
17786 " guestfs_set_e2label (guestfs_h *g,\n"
17787 " const char *device,\n"
17788 " const char *label);\n"
17794 #: ../src/guestfs-actions.pod:5885 ../fish/guestfish-actions.pod:3965
17796 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
17797 "C<label>. Filesystem labels are limited to 16 characters."
17802 #: ../src/guestfs-actions.pod:5889
17804 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
17805 "the existing label on a filesystem."
17810 #: ../src/guestfs-actions.pod:5896
17811 msgid "guestfs_set_e2uuid"
17816 #: ../src/guestfs-actions.pod:5898
17820 " guestfs_set_e2uuid (guestfs_h *g,\n"
17821 " const char *device,\n"
17822 " const char *uuid);\n"
17828 #: ../src/guestfs-actions.pod:5903 ../fish/guestfish-actions.pod:3976
17830 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
17831 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
17832 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
17837 #: ../src/guestfs-actions.pod:5908
17839 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
17840 "the existing UUID of a filesystem."
17845 #: ../src/guestfs-actions.pod:5915
17846 msgid "guestfs_set_memsize"
17851 #: ../src/guestfs-actions.pod:5917
17855 " guestfs_set_memsize (guestfs_h *g,\n"
17862 #: ../src/guestfs-actions.pod:5921
17864 "This sets the memory size in megabytes allocated to the qemu subprocess. "
17865 "This only has any effect if called before C<guestfs_launch>."
17870 #: ../src/guestfs-actions.pod:5925 ../fish/guestfish-actions.pod:3994
17872 "You can also change this by setting the environment variable "
17873 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
17878 #: ../src/guestfs-actions.pod:5936
17879 msgid "guestfs_set_network"
17884 #: ../src/guestfs-actions.pod:5938
17888 " guestfs_set_network (guestfs_h *g,\n"
17895 #: ../src/guestfs-actions.pod:5942 ../fish/guestfish-actions.pod:4007
17897 "If C<network> is true, then the network is enabled in the libguestfs "
17898 "appliance. The default is false."
17903 #: ../src/guestfs-actions.pod:5945 ../fish/guestfish-actions.pod:4010
17905 "This affects whether commands are able to access the network (see L<guestfs"
17906 "(3)/RUNNING COMMANDS>)."
17911 #: ../src/guestfs-actions.pod:5948
17913 "You must call this before calling C<guestfs_launch>, otherwise it has no "
17919 #: ../src/guestfs-actions.pod:5955
17920 msgid "guestfs_set_path"
17925 #: ../src/guestfs-actions.pod:5957
17929 " guestfs_set_path (guestfs_h *g,\n"
17930 " const char *searchpath);\n"
17936 #: ../src/guestfs-actions.pod:5961 ../fish/guestfish-actions.pod:4022
17937 msgid "Set the path that libguestfs searches for kernel and initrd.img."
17942 #: ../src/guestfs-actions.pod:5963 ../fish/guestfish-actions.pod:4024
17944 "The default is C<$libdir/guestfs> unless overridden by setting "
17945 "C<LIBGUESTFS_PATH> environment variable."
17950 #: ../src/guestfs-actions.pod:5966 ../fish/guestfish-actions.pod:4027
17951 msgid "Setting C<path> to C<NULL> restores the default path."
17956 #: ../src/guestfs-actions.pod:5972
17957 msgid "guestfs_set_qemu"
17962 #: ../src/guestfs-actions.pod:5974
17966 " guestfs_set_qemu (guestfs_h *g,\n"
17967 " const char *qemu);\n"
17973 #: ../src/guestfs-actions.pod:5978 ../fish/guestfish-actions.pod:4035
17974 msgid "Set the qemu binary that we will use."
17979 #: ../src/guestfs-actions.pod:5980 ../fish/guestfish-actions.pod:4037
17981 "The default is chosen when the library was compiled by the configure script."
17986 #: ../src/guestfs-actions.pod:5983 ../fish/guestfish-actions.pod:4040
17988 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
17994 #: ../src/guestfs-actions.pod:5986 ../fish/guestfish-actions.pod:4043
17995 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
18000 #: ../src/guestfs-actions.pod:5988 ../fish/guestfish-actions.pod:4045
18002 "Note that you should call this function as early as possible after creating "
18003 "the handle. This is because some pre-launch operations depend on testing "
18004 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
18005 "don't retest features, and so you might see inconsistent results. Using the "
18006 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
18007 "the qemu binary at the same time as the handle is created."
18012 #: ../src/guestfs-actions.pod:6000
18013 msgid "guestfs_set_recovery_proc"
18018 #: ../src/guestfs-actions.pod:6002
18022 " guestfs_set_recovery_proc (guestfs_h *g,\n"
18023 " int recoveryproc);\n"
18029 #: ../src/guestfs-actions.pod:6006
18031 "If this is called with the parameter C<false> then C<guestfs_launch> does "
18032 "not create a recovery process. The purpose of the recovery process is to "
18033 "stop runaway qemu processes in the case where the main program aborts "
18039 #: ../src/guestfs-actions.pod:6011
18041 "This only has any effect if called before C<guestfs_launch>, and the default "
18047 #: ../src/guestfs-actions.pod:6014 ../fish/guestfish-actions.pod:4067
18049 "About the only time when you would want to disable this is if the main "
18050 "process will fork itself into the background (\"daemonize\" itself). In "
18051 "this case the recovery process thinks that the main program has disappeared "
18052 "and so kills qemu, which is not very helpful."
18057 #: ../src/guestfs-actions.pod:6024
18058 msgid "guestfs_set_selinux"
18063 #: ../src/guestfs-actions.pod:6026
18067 " guestfs_set_selinux (guestfs_h *g,\n"
18074 #: ../src/guestfs-actions.pod:6030 ../fish/guestfish-actions.pod:4079
18076 "This sets the selinux flag that is passed to the appliance at boot time. "
18077 "The default is C<selinux=0> (disabled)."
18082 #: ../src/guestfs-actions.pod:6033 ../fish/guestfish-actions.pod:4082
18084 "Note that if SELinux is enabled, it is always in Permissive mode "
18085 "(C<enforcing=0>)."
18090 #: ../src/guestfs-actions.pod:6043
18091 msgid "guestfs_set_trace"
18096 #: ../src/guestfs-actions.pod:6045
18100 " guestfs_set_trace (guestfs_h *g,\n"
18106 #: ../src/guestfs-actions.pod:6049 ../fish/guestfish-actions.pod:4094
18108 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
18109 "return values are traced."
18114 #: ../src/guestfs-actions.pod:6052 ../fish/guestfish-actions.pod:4097
18116 "If you want to trace C API calls into libguestfs (and other libraries) then "
18117 "possibly a better way is to use the external ltrace(1) command."
18122 #: ../src/guestfs-actions.pod:6056 ../fish/guestfish-actions.pod:4101
18124 "Command traces are disabled unless the environment variable "
18125 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
18129 #: ../src/guestfs-actions.pod:6059
18131 "Trace messages are normally sent to C<stderr>, unless you register a "
18132 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
18137 #: ../src/guestfs-actions.pod:6067
18138 msgid "guestfs_set_verbose"
18143 #: ../src/guestfs-actions.pod:6069
18147 " guestfs_set_verbose (guestfs_h *g,\n"
18153 #: ../src/guestfs-actions.pod:6073 ../fish/guestfish-actions.pod:4114
18154 msgid "If C<verbose> is true, this turns on verbose messages."
18159 #: ../src/guestfs-actions.pod:6075 ../fish/guestfish-actions.pod:4116
18161 "Verbose messages are disabled unless the environment variable "
18162 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
18166 #: ../src/guestfs-actions.pod:6078
18168 "Verbose messages are normally sent to C<stderr>, unless you register a "
18169 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
18174 #: ../src/guestfs-actions.pod:6086
18175 msgid "guestfs_setcon"
18180 #: ../src/guestfs-actions.pod:6088
18184 " guestfs_setcon (guestfs_h *g,\n"
18185 " const char *context);\n"
18191 #: ../src/guestfs-actions.pod:6092 ../fish/guestfish-actions.pod:4127
18193 "This sets the SELinux security context of the daemon to the string "
18199 #: ../src/guestfs-actions.pod:6095 ../fish/guestfish-actions.pod:4130
18200 msgid "See the documentation about SELINUX in L<guestfs(3)>."
18205 #: ../src/guestfs-actions.pod:6101
18206 msgid "guestfs_setxattr"
18211 #: ../src/guestfs-actions.pod:6103
18215 " guestfs_setxattr (guestfs_h *g,\n"
18216 " const char *xattr,\n"
18217 " const char *val,\n"
18219 " const char *path);\n"
18225 #: ../src/guestfs-actions.pod:6110 ../fish/guestfish-actions.pod:4136
18227 "This call sets the extended attribute named C<xattr> of the file C<path> to "
18228 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
18233 #: ../src/guestfs-actions.pod:6114
18234 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
18239 #: ../src/guestfs-actions.pod:6120
18240 msgid "guestfs_sfdisk"
18245 #: ../src/guestfs-actions.pod:6122
18249 " guestfs_sfdisk (guestfs_h *g,\n"
18250 " const char *device,\n"
18254 " char *const *lines);\n"
18260 #: ../src/guestfs-actions.pod:6130 ../fish/guestfish-actions.pod:4146
18262 "This is a direct interface to the L<sfdisk(8)> program for creating "
18263 "partitions on block devices."
18268 #: ../src/guestfs-actions.pod:6133 ../fish/guestfish-actions.pod:4149
18269 msgid "C<device> should be a block device, for example C</dev/sda>."
18274 #: ../src/guestfs-actions.pod:6135 ../fish/guestfish-actions.pod:4151
18276 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
18277 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
18278 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
18279 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
18280 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
18281 "the kernel) cannot work out the right geometry and you will need to tell it."
18286 #: ../src/guestfs-actions.pod:6143 ../fish/guestfish-actions.pod:4159
18288 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
18289 "refer to the L<sfdisk(8)> manpage."
18294 #: ../src/guestfs-actions.pod:6146 ../fish/guestfish-actions.pod:4162
18296 "To create a single partition occupying the whole disk, you would pass "
18297 "C<lines> as a single element list, when the single element being the string "
18303 #: ../src/guestfs-actions.pod:6150
18305 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
18310 #: ../src/guestfs-actions.pod:6160
18311 msgid "guestfs_sfdiskM"
18316 #: ../src/guestfs-actions.pod:6162
18320 " guestfs_sfdiskM (guestfs_h *g,\n"
18321 " const char *device,\n"
18322 " char *const *lines);\n"
18328 #: ../src/guestfs-actions.pod:6167
18330 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
18331 "partition sizes are specified in megabytes only (rounded to the nearest "
18332 "cylinder) and you don't need to specify the cyls, heads and sectors "
18333 "parameters which were rarely if ever used anyway."
18338 #: ../src/guestfs-actions.pod:6173
18340 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
18341 "C<guestfs_part_disk>"
18346 #: ../src/guestfs-actions.pod:6183
18347 msgid "guestfs_sfdisk_N"
18352 #: ../src/guestfs-actions.pod:6185
18356 " guestfs_sfdisk_N (guestfs_h *g,\n"
18357 " const char *device,\n"
18362 " const char *line);\n"
18368 #: ../src/guestfs-actions.pod:6194 ../fish/guestfish-actions.pod:4192
18370 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
18371 "(note: C<n> counts from 1)."
18376 #: ../src/guestfs-actions.pod:6197
18378 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
18379 "for the cyls/heads/sectors parameters."
18384 #: ../src/guestfs-actions.pod:6200
18385 msgid "See also: C<guestfs_part_add>"
18390 #: ../src/guestfs-actions.pod:6209
18391 msgid "guestfs_sfdisk_disk_geometry"
18396 #: ../src/guestfs-actions.pod:6211
18400 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
18401 " const char *device);\n"
18407 #: ../src/guestfs-actions.pod:6215
18409 "This displays the disk geometry of C<device> read from the partition table. "
18410 "Especially in the case where the underlying block device has been resized, "
18411 "this can be different from the kernel's idea of the geometry (see "
18412 "C<guestfs_sfdisk_kernel_geometry>)."
18417 #: ../src/guestfs-actions.pod:6220 ../src/guestfs-actions.pod:6236
18418 #: ../fish/guestfish-actions.pod:4212 ../fish/guestfish-actions.pod:4221
18419 msgid "The result is in human-readable format, and not designed to be parsed."
18424 #: ../src/guestfs-actions.pod:6228
18425 msgid "guestfs_sfdisk_kernel_geometry"
18430 #: ../src/guestfs-actions.pod:6230
18434 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
18435 " const char *device);\n"
18441 #: ../src/guestfs-actions.pod:6234 ../fish/guestfish-actions.pod:4219
18442 msgid "This displays the kernel's idea of the geometry of C<device>."
18447 #: ../src/guestfs-actions.pod:6244
18448 msgid "guestfs_sfdisk_l"
18453 #: ../src/guestfs-actions.pod:6246
18457 " guestfs_sfdisk_l (guestfs_h *g,\n"
18458 " const char *device);\n"
18464 #: ../src/guestfs-actions.pod:6250 ../fish/guestfish-actions.pod:4228
18466 "This displays the partition table on C<device>, in the human-readable output "
18467 "of the L<sfdisk(8)> command. It is not intended to be parsed."
18472 #: ../src/guestfs-actions.pod:6254
18473 msgid "See also: C<guestfs_part_list>"
18478 #: ../src/guestfs-actions.pod:6261
18484 #: ../src/guestfs-actions.pod:6263
18488 " guestfs_sh (guestfs_h *g,\n"
18489 " const char *command);\n"
18495 #: ../src/guestfs-actions.pod:6267 ../fish/guestfish-actions.pod:4238
18497 "This call runs a command from the guest filesystem via the guest's C</bin/"
18503 #: ../src/guestfs-actions.pod:6270
18504 msgid "This is like C<guestfs_command>, but passes the command to:"
18509 #: ../src/guestfs-actions.pod:6272 ../fish/guestfish-actions.pod:4243
18512 " /bin/sh -c \"command\"\n"
18518 #: ../src/guestfs-actions.pod:6274 ../fish/guestfish-actions.pod:4245
18520 "Depending on the guest's shell, this usually results in wildcards being "
18521 "expanded, shell expressions being interpolated and so on."
18526 #: ../src/guestfs-actions.pod:6278
18527 msgid "All the provisos about C<guestfs_command> apply to this call."
18532 #: ../src/guestfs-actions.pod:6285
18533 msgid "guestfs_sh_lines"
18538 #: ../src/guestfs-actions.pod:6287
18542 " guestfs_sh_lines (guestfs_h *g,\n"
18543 " const char *command);\n"
18549 #: ../src/guestfs-actions.pod:6291
18551 "This is the same as C<guestfs_sh>, but splits the result into a list of "
18557 #: ../src/guestfs-actions.pod:6294
18558 msgid "See also: C<guestfs_command_lines>"
18563 #: ../src/guestfs-actions.pod:6302
18564 msgid "guestfs_sleep"
18569 #: ../src/guestfs-actions.pod:6304
18573 " guestfs_sleep (guestfs_h *g,\n"
18580 #: ../src/guestfs-actions.pod:6308 ../fish/guestfish-actions.pod:4264
18581 msgid "Sleep for C<secs> seconds."
18586 #: ../src/guestfs-actions.pod:6312
18587 msgid "(Added in 1.0.41)"
18592 #: ../src/guestfs-actions.pod:6314 ../src/guestfs-structs.pod:109
18593 msgid "guestfs_stat"
18598 #: ../src/guestfs-actions.pod:6316
18601 " struct guestfs_stat *\n"
18602 " guestfs_stat (guestfs_h *g,\n"
18603 " const char *path);\n"
18609 #: ../src/guestfs-actions.pod:6322 ../fish/guestfish-actions.pod:4272
18610 msgid "This is the same as the C<stat(2)> system call."
18615 #: ../src/guestfs-actions.pod:6330 ../src/guestfs-structs.pod:135
18616 msgid "guestfs_statvfs"
18621 #: ../src/guestfs-actions.pod:6332
18624 " struct guestfs_statvfs *\n"
18625 " guestfs_statvfs (guestfs_h *g,\n"
18626 " const char *path);\n"
18632 #: ../src/guestfs-actions.pod:6336 ../fish/guestfish-actions.pod:4278
18634 "Returns file system statistics for any mounted file system. C<path> should "
18635 "be a file or directory in the mounted file system (typically it is the mount "
18636 "point itself, but it doesn't need to be)."
18641 #: ../src/guestfs-actions.pod:6340 ../fish/guestfish-actions.pod:4282
18642 msgid "This is the same as the C<statvfs(2)> system call."
18647 #: ../src/guestfs-actions.pod:6342
18649 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
18650 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
18655 #: ../src/guestfs-actions.pod:6348
18656 msgid "guestfs_strings"
18661 #: ../src/guestfs-actions.pod:6350
18665 " guestfs_strings (guestfs_h *g,\n"
18666 " const char *path);\n"
18672 #: ../src/guestfs-actions.pod:6354 ../fish/guestfish-actions.pod:4288
18674 "This runs the L<strings(1)> command on a file and returns the list of "
18675 "printable strings found."
18680 #: ../src/guestfs-actions.pod:6366
18681 msgid "guestfs_strings_e"
18686 #: ../src/guestfs-actions.pod:6368
18690 " guestfs_strings_e (guestfs_h *g,\n"
18691 " const char *encoding,\n"
18692 " const char *path);\n"
18698 #: ../src/guestfs-actions.pod:6373
18700 "This is like the C<guestfs_strings> command, but allows you to specify the "
18701 "encoding of strings that are looked for in the source file C<path>."
18706 #: ../src/guestfs-actions.pod:6377 ../fish/guestfish-actions.pod:4302
18707 msgid "Allowed encodings are:"
18712 #: ../src/guestfs-actions.pod:6381 ../fish/guestfish-actions.pod:4306
18718 #: ../src/guestfs-actions.pod:6383
18720 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
18721 "ISO-8859-X (this is what C<guestfs_strings> uses)."
18726 #: ../src/guestfs-actions.pod:6386 ../fish/guestfish-actions.pod:4311
18732 #: ../src/guestfs-actions.pod:6388 ../fish/guestfish-actions.pod:4313
18733 msgid "Single 8-bit-byte characters."
18738 #: ../src/guestfs-actions.pod:6390 ../fish/guestfish-actions.pod:4315
18744 #: ../src/guestfs-actions.pod:6392 ../fish/guestfish-actions.pod:4317
18745 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
18750 #: ../src/guestfs-actions.pod:6395 ../fish/guestfish-actions.pod:4320
18751 msgid "l (lower case letter L)"
18756 #: ../src/guestfs-actions.pod:6397 ../fish/guestfish-actions.pod:4322
18758 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
18759 "examining binaries in Windows guests."
18764 #: ../src/guestfs-actions.pod:6400 ../fish/guestfish-actions.pod:4325
18770 #: ../src/guestfs-actions.pod:6402 ../fish/guestfish-actions.pod:4327
18771 msgid "32-bit big endian such as UCS-4BE."
18776 #: ../src/guestfs-actions.pod:6404 ../fish/guestfish-actions.pod:4329
18782 #: ../src/guestfs-actions.pod:6406 ../fish/guestfish-actions.pod:4331
18783 msgid "32-bit little endian such as UCS-4LE."
18788 #: ../src/guestfs-actions.pod:6410 ../fish/guestfish-actions.pod:4335
18789 msgid "The returned strings are transcoded to UTF-8."
18794 #: ../src/guestfs-actions.pod:6421
18795 msgid "guestfs_swapoff_device"
18800 #: ../src/guestfs-actions.pod:6423
18804 " guestfs_swapoff_device (guestfs_h *g,\n"
18805 " const char *device);\n"
18811 #: ../src/guestfs-actions.pod:6427
18813 "This command disables the libguestfs appliance swap device or partition "
18814 "named C<device>. See C<guestfs_swapon_device>."
18819 #: ../src/guestfs-actions.pod:6435
18820 msgid "guestfs_swapoff_file"
18825 #: ../src/guestfs-actions.pod:6437
18829 " guestfs_swapoff_file (guestfs_h *g,\n"
18830 " const char *file);\n"
18836 #: ../src/guestfs-actions.pod:6441 ../fish/guestfish-actions.pod:4352
18837 msgid "This command disables the libguestfs appliance swap on file."
18842 #: ../src/guestfs-actions.pod:6447
18843 msgid "guestfs_swapoff_label"
18848 #: ../src/guestfs-actions.pod:6449
18852 " guestfs_swapoff_label (guestfs_h *g,\n"
18853 " const char *label);\n"
18859 #: ../src/guestfs-actions.pod:6453 ../fish/guestfish-actions.pod:4358
18861 "This command disables the libguestfs appliance swap on labeled swap "
18867 #: ../src/guestfs-actions.pod:6460
18868 msgid "guestfs_swapoff_uuid"
18873 #: ../src/guestfs-actions.pod:6462
18877 " guestfs_swapoff_uuid (guestfs_h *g,\n"
18878 " const char *uuid);\n"
18884 #: ../src/guestfs-actions.pod:6466 ../fish/guestfish-actions.pod:4365
18886 "This command disables the libguestfs appliance swap partition with the given "
18892 #: ../src/guestfs-actions.pod:6473
18893 msgid "guestfs_swapon_device"
18898 #: ../src/guestfs-actions.pod:6475
18902 " guestfs_swapon_device (guestfs_h *g,\n"
18903 " const char *device);\n"
18909 #: ../src/guestfs-actions.pod:6479
18911 "This command enables the libguestfs appliance to use the swap device or "
18912 "partition named C<device>. The increased memory is made available for all "
18913 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
18918 #: ../src/guestfs-actions.pod:6484 ../fish/guestfish-actions.pod:4377
18920 "Note that you should not swap to existing guest swap partitions unless you "
18921 "know what you are doing. They may contain hibernation information, or other "
18922 "information that the guest doesn't want you to trash. You also risk leaking "
18923 "information about the host to the guest this way. Instead, attach a new "
18924 "host device to the guest and swap on that."
18929 #: ../src/guestfs-actions.pod:6495
18930 msgid "guestfs_swapon_file"
18935 #: ../src/guestfs-actions.pod:6497
18939 " guestfs_swapon_file (guestfs_h *g,\n"
18940 " const char *file);\n"
18946 #: ../src/guestfs-actions.pod:6501
18948 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
18954 #: ../src/guestfs-actions.pod:6508
18955 msgid "guestfs_swapon_label"
18960 #: ../src/guestfs-actions.pod:6510
18964 " guestfs_swapon_label (guestfs_h *g,\n"
18965 " const char *label);\n"
18971 #: ../src/guestfs-actions.pod:6514
18973 "This command enables swap to a labeled swap partition. See "
18974 "C<guestfs_swapon_device> for other notes."
18979 #: ../src/guestfs-actions.pod:6521
18980 msgid "guestfs_swapon_uuid"
18985 #: ../src/guestfs-actions.pod:6523
18989 " guestfs_swapon_uuid (guestfs_h *g,\n"
18990 " const char *uuid);\n"
18996 #: ../src/guestfs-actions.pod:6527
18998 "This command enables swap to a swap partition with the given UUID. See "
18999 "C<guestfs_swapon_device> for other notes."
19004 #: ../src/guestfs-actions.pod:6534
19005 msgid "guestfs_sync"
19010 #: ../src/guestfs-actions.pod:6536
19014 " guestfs_sync (guestfs_h *g);\n"
19020 #: ../src/guestfs-actions.pod:6539 ../fish/guestfish-actions.pod:4409
19022 "This syncs the disk, so that any writes are flushed through to the "
19023 "underlying disk image."
19028 #: ../src/guestfs-actions.pod:6542 ../fish/guestfish-actions.pod:4412
19030 "You should always call this if you have modified a disk image, before "
19031 "closing the handle."
19036 #: ../src/guestfs-actions.pod:6549
19037 msgid "guestfs_tail"
19042 #: ../src/guestfs-actions.pod:6551
19046 " guestfs_tail (guestfs_h *g,\n"
19047 " const char *path);\n"
19053 #: ../src/guestfs-actions.pod:6555 ../fish/guestfish-actions.pod:4419
19055 "This command returns up to the last 10 lines of a file as a list of strings."
19060 #: ../src/guestfs-actions.pod:6567
19061 msgid "guestfs_tail_n"
19066 #: ../src/guestfs-actions.pod:6569
19070 " guestfs_tail_n (guestfs_h *g,\n"
19072 " const char *path);\n"
19078 #: ../src/guestfs-actions.pod:6574 ../fish/guestfish-actions.pod:4429
19080 "If the parameter C<nrlines> is a positive number, this returns the last "
19081 "C<nrlines> lines of the file C<path>."
19086 #: ../src/guestfs-actions.pod:6577 ../fish/guestfish-actions.pod:4432
19088 "If the parameter C<nrlines> is a negative number, this returns lines from "
19089 "the file C<path>, starting with the C<-nrlines>th line."
19094 #: ../src/guestfs-actions.pod:6591
19095 msgid "guestfs_tar_in"
19100 #: ../src/guestfs-actions.pod:6593
19104 " guestfs_tar_in (guestfs_h *g,\n"
19105 " const char *tarfile,\n"
19106 " const char *directory);\n"
19112 #: ../src/guestfs-actions.pod:6598 ../fish/guestfish-actions.pod:4444
19114 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
19115 "tar file) into C<directory>."
19120 #: ../src/guestfs-actions.pod:6601
19122 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
19127 #: ../src/guestfs-actions.pod:6606 ../src/guestfs-actions.pod:6623
19128 #: ../src/guestfs-actions.pod:6639 ../src/guestfs-actions.pod:6655
19129 msgid "(Added in 1.0.3)"
19134 #: ../src/guestfs-actions.pod:6608
19135 msgid "guestfs_tar_out"
19140 #: ../src/guestfs-actions.pod:6610
19144 " guestfs_tar_out (guestfs_h *g,\n"
19145 " const char *directory,\n"
19146 " const char *tarfile);\n"
19152 #: ../src/guestfs-actions.pod:6615 ../fish/guestfish-actions.pod:4456
19154 "This command packs the contents of C<directory> and downloads it to local "
19160 #: ../src/guestfs-actions.pod:6618
19162 "To download a compressed tarball, use C<guestfs_tgz_out> or "
19163 "C<guestfs_txz_out>."
19168 #: ../src/guestfs-actions.pod:6625
19169 msgid "guestfs_tgz_in"
19174 #: ../src/guestfs-actions.pod:6627
19178 " guestfs_tgz_in (guestfs_h *g,\n"
19179 " const char *tarball,\n"
19180 " const char *directory);\n"
19186 #: ../src/guestfs-actions.pod:6632 ../fish/guestfish-actions.pod:4468
19188 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
19189 "tar file) into C<directory>."
19194 #: ../src/guestfs-actions.pod:6635
19195 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
19200 #: ../src/guestfs-actions.pod:6641
19201 msgid "guestfs_tgz_out"
19206 #: ../src/guestfs-actions.pod:6643
19210 " guestfs_tgz_out (guestfs_h *g,\n"
19211 " const char *directory,\n"
19212 " const char *tarball);\n"
19218 #: ../src/guestfs-actions.pod:6648 ../fish/guestfish-actions.pod:4479
19220 "This command packs the contents of C<directory> and downloads it to local "
19226 #: ../src/guestfs-actions.pod:6651
19227 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
19232 #: ../src/guestfs-actions.pod:6657
19233 msgid "guestfs_touch"
19238 #: ../src/guestfs-actions.pod:6659
19242 " guestfs_touch (guestfs_h *g,\n"
19243 " const char *path);\n"
19249 #: ../src/guestfs-actions.pod:6663 ../fish/guestfish-actions.pod:4490
19251 "Touch acts like the L<touch(1)> command. It can be used to update the "
19252 "timestamps on a file, or, if the file does not exist, to create a new zero-"
19258 #: ../src/guestfs-actions.pod:6667 ../fish/guestfish-actions.pod:4494
19260 "This command only works on regular files, and will fail on other file types "
19261 "such as directories, symbolic links, block special etc."
19266 #: ../src/guestfs-actions.pod:6674
19267 msgid "guestfs_truncate"
19272 #: ../src/guestfs-actions.pod:6676
19276 " guestfs_truncate (guestfs_h *g,\n"
19277 " const char *path);\n"
19283 #: ../src/guestfs-actions.pod:6680 ../fish/guestfish-actions.pod:4501
19285 "This command truncates C<path> to a zero-length file. The file must exist "
19291 #: ../src/guestfs-actions.pod:6687
19292 msgid "guestfs_truncate_size"
19297 #: ../src/guestfs-actions.pod:6689
19301 " guestfs_truncate_size (guestfs_h *g,\n"
19302 " const char *path,\n"
19303 " int64_t size);\n"
19309 #: ../src/guestfs-actions.pod:6694 ../fish/guestfish-actions.pod:4508
19311 "This command truncates C<path> to size C<size> bytes. The file must exist "
19317 #: ../src/guestfs-actions.pod:6697
19319 "If the current file size is less than C<size> then the file is extended to "
19320 "the required size with zero bytes. This creates a sparse file (ie. disk "
19321 "blocks are not allocated for the file until you write to it). To create a "
19322 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
19327 #: ../src/guestfs-actions.pod:6707
19328 msgid "guestfs_tune2fs_l"
19333 #: ../src/guestfs-actions.pod:6709
19337 " guestfs_tune2fs_l (guestfs_h *g,\n"
19338 " const char *device);\n"
19344 #: ../src/guestfs-actions.pod:6713 ../fish/guestfish-actions.pod:4521
19346 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
19352 #: ../src/guestfs-actions.pod:6716 ../fish/guestfish-actions.pod:4524
19354 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
19355 "for more details. The list of fields returned isn't clearly defined, and "
19356 "depends on both the version of C<tune2fs> that libguestfs was built against, "
19357 "and the filesystem itself."
19362 #: ../src/guestfs-actions.pod:6729
19363 msgid "guestfs_txz_in"
19368 #: ../src/guestfs-actions.pod:6731
19372 " guestfs_txz_in (guestfs_h *g,\n"
19373 " const char *tarball,\n"
19374 " const char *directory);\n"
19380 #: ../src/guestfs-actions.pod:6736 ../fish/guestfish-actions.pod:4533
19382 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
19383 "tar file) into C<directory>."
19388 #: ../src/guestfs-actions.pod:6743
19389 msgid "guestfs_txz_out"
19394 #: ../src/guestfs-actions.pod:6745
19398 " guestfs_txz_out (guestfs_h *g,\n"
19399 " const char *directory,\n"
19400 " const char *tarball);\n"
19406 #: ../src/guestfs-actions.pod:6750 ../fish/guestfish-actions.pod:4542
19408 "This command packs the contents of C<directory> and downloads it to local "
19409 "file C<tarball> (as an xz compressed tar archive)."
19414 #: ../src/guestfs-actions.pod:6757
19415 msgid "guestfs_umask"
19420 #: ../src/guestfs-actions.pod:6759
19424 " guestfs_umask (guestfs_h *g,\n"
19431 #: ../src/guestfs-actions.pod:6763 ../fish/guestfish-actions.pod:4551
19433 "This function sets the mask used for creating new files and device nodes to "
19439 #: ../src/guestfs-actions.pod:6766 ../fish/guestfish-actions.pod:4554
19441 "Typical umask values would be C<022> which creates new files with "
19442 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
19443 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
19448 #: ../src/guestfs-actions.pod:6771 ../fish/guestfish-actions.pod:4559
19450 "The default umask is C<022>. This is important because it means that "
19451 "directories and device nodes will be created with C<0644> or C<0755> mode "
19452 "even if you specify C<0777>."
19457 #: ../src/guestfs-actions.pod:6775
19459 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
19460 "C<guestfs_mkdir>."
19465 #: ../src/guestfs-actions.pod:6778 ../fish/guestfish-actions.pod:4566
19466 msgid "This call returns the previous umask."
19471 #: ../src/guestfs-actions.pod:6784
19472 msgid "guestfs_umount"
19477 #: ../src/guestfs-actions.pod:6786
19481 " guestfs_umount (guestfs_h *g,\n"
19482 " const char *pathordevice);\n"
19488 #: ../src/guestfs-actions.pod:6790 ../fish/guestfish-actions.pod:4574
19490 "This unmounts the given filesystem. The filesystem may be specified either "
19491 "by its mountpoint (path) or the device which contains the filesystem."
19496 #: ../src/guestfs-actions.pod:6798
19497 msgid "guestfs_umount_all"
19502 #: ../src/guestfs-actions.pod:6800
19506 " guestfs_umount_all (guestfs_h *g);\n"
19512 #: ../src/guestfs-actions.pod:6803 ../fish/guestfish-actions.pod:4584
19513 msgid "This unmounts all mounted filesystems."
19518 #: ../src/guestfs-actions.pod:6805 ../fish/guestfish-actions.pod:4586
19519 msgid "Some internal mounts are not unmounted by this call."
19524 #: ../src/guestfs-actions.pod:6811
19525 msgid "guestfs_upload"
19530 #: ../src/guestfs-actions.pod:6813
19534 " guestfs_upload (guestfs_h *g,\n"
19535 " const char *filename,\n"
19536 " const char *remotefilename);\n"
19542 #: ../src/guestfs-actions.pod:6818 ../src/guestfs-actions.pod:6842
19543 #: ../fish/guestfish-actions.pod:4592 ../fish/guestfish-actions.pod:4605
19544 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
19549 #: ../src/guestfs-actions.pod:6823
19550 msgid "See also C<guestfs_download>."
19555 #: ../src/guestfs-actions.pod:6834
19556 msgid "guestfs_upload_offset"
19561 #: ../src/guestfs-actions.pod:6836
19565 " guestfs_upload_offset (guestfs_h *g,\n"
19566 " const char *filename,\n"
19567 " const char *remotefilename,\n"
19568 " int64_t offset);\n"
19574 #: ../src/guestfs-actions.pod:6845 ../fish/guestfish-actions.pod:4608
19576 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
19577 "The intention is to overwrite parts of existing files or devices, although "
19578 "if a non-existant file is specified then it is created with a \"hole\" "
19579 "before C<offset>. The size of the data written is implicit in the size of "
19580 "the source C<filename>."
19585 #: ../src/guestfs-actions.pod:6852
19587 "Note that there is no limit on the amount of data that can be uploaded with "
19588 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
19589 "full amount unless an error occurs."
19594 #: ../src/guestfs-actions.pod:6857
19595 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
19600 #: ../src/guestfs-actions.pod:6868
19601 msgid "guestfs_utimens"
19606 #: ../src/guestfs-actions.pod:6870
19610 " guestfs_utimens (guestfs_h *g,\n"
19611 " const char *path,\n"
19612 " int64_t atsecs,\n"
19613 " int64_t atnsecs,\n"
19614 " int64_t mtsecs,\n"
19615 " int64_t mtnsecs);\n"
19621 #: ../src/guestfs-actions.pod:6878 ../fish/guestfish-actions.pod:4628
19622 msgid "This command sets the timestamps of a file with nanosecond precision."
19627 #: ../src/guestfs-actions.pod:6881 ../fish/guestfish-actions.pod:4631
19629 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
19635 #: ../src/guestfs-actions.pod:6884 ../fish/guestfish-actions.pod:4634
19637 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
19638 "nanoseconds from the epoch."
19643 #: ../src/guestfs-actions.pod:6887 ../fish/guestfish-actions.pod:4637
19645 "If the C<*nsecs> field contains the special value C<-1> then the "
19646 "corresponding timestamp is set to the current time. (The C<*secs> field is "
19647 "ignored in this case)."
19652 #: ../src/guestfs-actions.pod:6891 ../fish/guestfish-actions.pod:4641
19654 "If the C<*nsecs> field contains the special value C<-2> then the "
19655 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
19661 #: ../src/guestfs-actions.pod:6899 ../src/guestfs-structs.pod:175
19662 msgid "guestfs_version"
19667 #: ../src/guestfs-actions.pod:6901
19670 " struct guestfs_version *\n"
19671 " guestfs_version (guestfs_h *g);\n"
19677 #: ../src/guestfs-actions.pod:6904 ../fish/guestfish-actions.pod:4649
19679 "Return the libguestfs version number that the program is linked against."
19684 #: ../src/guestfs-actions.pod:6907 ../fish/guestfish-actions.pod:4652
19686 "Note that because of dynamic linking this is not necessarily the version of "
19687 "libguestfs that you compiled against. You can compile the program, and then "
19688 "at runtime dynamically link against a completely different C<libguestfs.so> "
19694 #: ../src/guestfs-actions.pod:6912 ../fish/guestfish-actions.pod:4657
19696 "This call was added in version C<1.0.58>. In previous versions of "
19697 "libguestfs there was no way to get the version number. From C code you can "
19698 "use dynamic linker functions to find out if this symbol exists (if it "
19699 "doesn't, then it's an earlier version)."
19704 #: ../src/guestfs-actions.pod:6918 ../fish/guestfish-actions.pod:4663
19706 "The call returns a structure with four elements. The first three (C<major>, "
19707 "C<minor> and C<release>) are numbers and correspond to the usual version "
19708 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
19709 "but may be used for distro-specific information."
19714 #: ../src/guestfs-actions.pod:6924 ../fish/guestfish-actions.pod:4669
19716 "To construct the original version string: C<$major.$minor.$release$extra>"
19721 #: ../src/guestfs-actions.pod:6927 ../fish/guestfish-actions.pod:4672
19722 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
19727 #: ../src/guestfs-actions.pod:6929
19729 "I<Note:> Don't use this call to test for availability of features. In "
19730 "enterprise distributions we backport features from later versions into "
19731 "earlier versions, making this an unreliable way to test for features. Use "
19732 "C<guestfs_available> instead."
19737 #: ../src/guestfs-actions.pod:6935
19739 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
19740 "error. I<The caller must call C<guestfs_free_version> after use>."
19745 #: ../src/guestfs-actions.pod:6939
19746 msgid "(Added in 1.0.58)"
19751 #: ../src/guestfs-actions.pod:6941
19752 msgid "guestfs_vfs_label"
19757 #: ../src/guestfs-actions.pod:6943
19761 " guestfs_vfs_label (guestfs_h *g,\n"
19762 " const char *device);\n"
19768 #: ../src/guestfs-actions.pod:6947 ../fish/guestfish-actions.pod:4684
19769 msgid "This returns the filesystem label of the filesystem on C<device>."
19774 #: ../src/guestfs-actions.pod:6950 ../fish/guestfish-actions.pod:4687
19775 msgid "If the filesystem is unlabeled, this returns the empty string."
19780 #: ../src/guestfs-actions.pod:6952
19781 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
19786 #: ../src/guestfs-actions.pod:6957 ../src/guestfs-actions.pod:6994
19787 msgid "(Added in 1.3.18)"
19792 #: ../src/guestfs-actions.pod:6959
19793 msgid "guestfs_vfs_type"
19798 #: ../src/guestfs-actions.pod:6961
19802 " guestfs_vfs_type (guestfs_h *g,\n"
19803 " const char *device);\n"
19809 #: ../src/guestfs-actions.pod:6965 ../fish/guestfish-actions.pod:4695
19811 "This command gets the filesystem type corresponding to the filesystem on "
19817 #: ../src/guestfs-actions.pod:6968 ../fish/guestfish-actions.pod:4698
19819 "For most filesystems, the result is the name of the Linux VFS module which "
19820 "would be used to mount this filesystem if you mounted it without specifying "
19821 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
19826 #: ../src/guestfs-actions.pod:6978
19827 msgid "guestfs_vfs_uuid"
19832 #: ../src/guestfs-actions.pod:6980
19836 " guestfs_vfs_uuid (guestfs_h *g,\n"
19837 " const char *device);\n"
19843 #: ../src/guestfs-actions.pod:6984 ../fish/guestfish-actions.pod:4707
19844 msgid "This returns the filesystem UUID of the filesystem on C<device>."
19849 #: ../src/guestfs-actions.pod:6987 ../fish/guestfish-actions.pod:4710
19850 msgid "If the filesystem does not have a UUID, this returns the empty string."
19855 #: ../src/guestfs-actions.pod:6989
19856 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
19861 #: ../src/guestfs-actions.pod:6996
19862 msgid "guestfs_vg_activate"
19867 #: ../src/guestfs-actions.pod:6998
19871 " guestfs_vg_activate (guestfs_h *g,\n"
19873 " char *const *volgroups);\n"
19879 #: ../src/guestfs-actions.pod:7003 ../fish/guestfish-actions.pod:4718
19881 "This command activates or (if C<activate> is false) deactivates all logical "
19882 "volumes in the listed volume groups C<volgroups>. If activated, then they "
19883 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
19884 "deactivated, then those devices disappear."
19889 #: ../src/guestfs-actions.pod:7009 ../fish/guestfish-actions.pod:4724
19890 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
19895 #: ../src/guestfs-actions.pod:7011 ../fish/guestfish-actions.pod:4726
19897 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
19898 "activated or deactivated."
19903 #: ../src/guestfs-actions.pod:7018
19904 msgid "guestfs_vg_activate_all"
19909 #: ../src/guestfs-actions.pod:7020
19913 " guestfs_vg_activate_all (guestfs_h *g,\n"
19914 " int activate);\n"
19920 #: ../src/guestfs-actions.pod:7024 ../fish/guestfish-actions.pod:4733
19922 "This command activates or (if C<activate> is false) deactivates all logical "
19923 "volumes in all volume groups. If activated, then they are made known to the "
19924 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
19925 "those devices disappear."
19930 #: ../src/guestfs-actions.pod:7030 ../fish/guestfish-actions.pod:4739
19931 msgid "This command is the same as running C<vgchange -a y|n>"
19936 #: ../src/guestfs-actions.pod:7036
19937 msgid "guestfs_vgcreate"
19942 #: ../src/guestfs-actions.pod:7038
19946 " guestfs_vgcreate (guestfs_h *g,\n"
19947 " const char *volgroup,\n"
19948 " char *const *physvols);\n"
19954 #: ../src/guestfs-actions.pod:7043 ../fish/guestfish-actions.pod:4745
19956 "This creates an LVM volume group called C<volgroup> from the non-empty list "
19957 "of physical volumes C<physvols>."
19962 #: ../src/guestfs-actions.pod:7050
19963 msgid "guestfs_vglvuuids"
19968 #: ../src/guestfs-actions.pod:7052
19972 " guestfs_vglvuuids (guestfs_h *g,\n"
19973 " const char *vgname);\n"
19979 #: ../src/guestfs-actions.pod:7056 ../fish/guestfish-actions.pod:4752
19981 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
19982 "volumes created in this volume group."
19987 #: ../src/guestfs-actions.pod:7059
19989 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
19990 "associate logical volumes and volume groups."
19995 #: ../src/guestfs-actions.pod:7062
19996 msgid "See also C<guestfs_vgpvuuids>."
20001 #: ../src/guestfs-actions.pod:7070
20002 msgid "guestfs_vgpvuuids"
20007 #: ../src/guestfs-actions.pod:7072
20011 " guestfs_vgpvuuids (guestfs_h *g,\n"
20012 " const char *vgname);\n"
20018 #: ../src/guestfs-actions.pod:7076 ../fish/guestfish-actions.pod:4764
20020 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
20021 "volumes that this volume group resides on."
20026 #: ../src/guestfs-actions.pod:7079
20028 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
20029 "associate physical volumes and volume groups."
20034 #: ../src/guestfs-actions.pod:7082
20035 msgid "See also C<guestfs_vglvuuids>."
20040 #: ../src/guestfs-actions.pod:7090
20041 msgid "guestfs_vgremove"
20046 #: ../src/guestfs-actions.pod:7092
20050 " guestfs_vgremove (guestfs_h *g,\n"
20051 " const char *vgname);\n"
20057 #: ../src/guestfs-actions.pod:7096 ../fish/guestfish-actions.pod:4776
20058 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
20063 #: ../src/guestfs-actions.pod:7098 ../fish/guestfish-actions.pod:4778
20065 "This also forcibly removes all logical volumes in the volume group (if any)."
20070 #: ../src/guestfs-actions.pod:7105
20071 msgid "guestfs_vgrename"
20076 #: ../src/guestfs-actions.pod:7107
20080 " guestfs_vgrename (guestfs_h *g,\n"
20081 " const char *volgroup,\n"
20082 " const char *newvolgroup);\n"
20088 #: ../src/guestfs-actions.pod:7112 ../fish/guestfish-actions.pod:4785
20089 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
20094 #: ../src/guestfs-actions.pod:7118
20095 msgid "guestfs_vgs"
20100 #: ../src/guestfs-actions.pod:7120
20104 " guestfs_vgs (guestfs_h *g);\n"
20110 #: ../src/guestfs-actions.pod:7123 ../fish/guestfish-actions.pod:4791
20112 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
20118 #: ../src/guestfs-actions.pod:7126 ../fish/guestfish-actions.pod:4794
20120 "This returns a list of just the volume group names that were detected (eg. "
20126 #: ../src/guestfs-actions.pod:7129
20127 msgid "See also C<guestfs_vgs_full>."
20132 #: ../src/guestfs-actions.pod:7137
20133 msgid "guestfs_vgs_full"
20138 #: ../src/guestfs-actions.pod:7139
20141 " struct guestfs_lvm_vg_list *\n"
20142 " guestfs_vgs_full (guestfs_h *g);\n"
20148 #: ../src/guestfs-actions.pod:7142 ../fish/guestfish-actions.pod:4803
20150 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
20151 "> command. The \"full\" version includes all fields."
20156 #: ../src/guestfs-actions.pod:7145
20158 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
20159 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after use>."
20164 #: ../src/guestfs-actions.pod:7151
20165 msgid "guestfs_vgscan"
20170 #: ../src/guestfs-actions.pod:7153
20174 " guestfs_vgscan (guestfs_h *g);\n"
20180 #: ../src/guestfs-actions.pod:7156 ../fish/guestfish-actions.pod:4810
20182 "This rescans all block devices and rebuilds the list of LVM physical "
20183 "volumes, volume groups and logical volumes."
20188 #: ../src/guestfs-actions.pod:7163
20189 msgid "guestfs_vguuid"
20194 #: ../src/guestfs-actions.pod:7165
20198 " guestfs_vguuid (guestfs_h *g,\n"
20199 " const char *vgname);\n"
20205 #: ../src/guestfs-actions.pod:7169 ../fish/guestfish-actions.pod:4817
20206 msgid "This command returns the UUID of the LVM VG named C<vgname>."
20211 #: ../src/guestfs-actions.pod:7176
20212 msgid "guestfs_wait_ready"
20217 #: ../src/guestfs-actions.pod:7178
20221 " guestfs_wait_ready (guestfs_h *g);\n"
20227 #: ../src/guestfs-actions.pod:7181
20228 msgid "This function is a no op."
20233 #: ../src/guestfs-actions.pod:7183
20235 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
20236 "calling C<guestfs_launch> to wait for the launch to complete. However this "
20237 "is no longer necessary because C<guestfs_launch> now does the waiting."
20242 #: ../src/guestfs-actions.pod:7188
20244 "If you see any calls to this function in code then you can just remove them, "
20245 "unless you want to retain compatibility with older versions of the API."
20250 #: ../src/guestfs-actions.pod:7196
20251 msgid "guestfs_wc_c"
20256 #: ../src/guestfs-actions.pod:7198
20260 " guestfs_wc_c (guestfs_h *g,\n"
20261 " const char *path);\n"
20267 #: ../src/guestfs-actions.pod:7202 ../fish/guestfish-actions.pod:4823
20269 "This command counts the characters in a file, using the C<wc -c> external "
20275 #: ../src/guestfs-actions.pod:7209
20276 msgid "guestfs_wc_l"
20281 #: ../src/guestfs-actions.pod:7211
20285 " guestfs_wc_l (guestfs_h *g,\n"
20286 " const char *path);\n"
20292 #: ../src/guestfs-actions.pod:7215 ../fish/guestfish-actions.pod:4830
20294 "This command counts the lines in a file, using the C<wc -l> external command."
20299 #: ../src/guestfs-actions.pod:7222
20300 msgid "guestfs_wc_w"
20305 #: ../src/guestfs-actions.pod:7224
20309 " guestfs_wc_w (guestfs_h *g,\n"
20310 " const char *path);\n"
20316 #: ../src/guestfs-actions.pod:7228 ../fish/guestfish-actions.pod:4837
20318 "This command counts the words in a file, using the C<wc -w> external command."
20323 #: ../src/guestfs-actions.pod:7235
20324 msgid "guestfs_write"
20329 #: ../src/guestfs-actions.pod:7237
20333 " guestfs_write (guestfs_h *g,\n"
20334 " const char *path,\n"
20335 " const char *content,\n"
20336 " size_t content_size);\n"
20342 #: ../src/guestfs-actions.pod:7243 ../fish/guestfish-actions.pod:4844
20344 "This call creates a file called C<path>. The content of the file is the "
20345 "string C<content> (which can contain any 8 bit data)."
20350 #: ../src/guestfs-actions.pod:7253
20351 msgid "guestfs_write_file"
20356 #: ../src/guestfs-actions.pod:7255
20360 " guestfs_write_file (guestfs_h *g,\n"
20361 " const char *path,\n"
20362 " const char *content,\n"
20369 #: ../src/guestfs-actions.pod:7261 ../fish/guestfish-actions.pod:4854
20371 "This call creates a file called C<path>. The contents of the file is the "
20372 "string C<content> (which can contain any 8 bit data), with length C<size>."
20377 #: ../src/guestfs-actions.pod:7265 ../fish/guestfish-actions.pod:4858
20379 "As a special case, if C<size> is C<0> then the length is calculated using "
20380 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
20385 #: ../src/guestfs-actions.pod:7269 ../fish/guestfish-actions.pod:4862
20387 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
20388 "I<not> work, even if the length is specified."
20393 #: ../src/guestfs-actions.pod:7277 ../fish/guestfish-actions.pod:4868
20395 "This function is deprecated. In new code, use the C<write> call instead."
20400 #: ../src/guestfs-actions.pod:7286
20401 msgid "guestfs_zegrep"
20406 #: ../src/guestfs-actions.pod:7288
20410 " guestfs_zegrep (guestfs_h *g,\n"
20411 " const char *regex,\n"
20412 " const char *path);\n"
20418 #: ../src/guestfs-actions.pod:7293 ../fish/guestfish-actions.pod:4879
20420 "This calls the external C<zegrep> program and returns the matching lines."
20425 #: ../src/guestfs-actions.pod:7305
20426 msgid "guestfs_zegrepi"
20431 #: ../src/guestfs-actions.pod:7307
20435 " guestfs_zegrepi (guestfs_h *g,\n"
20436 " const char *regex,\n"
20437 " const char *path);\n"
20443 #: ../src/guestfs-actions.pod:7312 ../fish/guestfish-actions.pod:4889
20445 "This calls the external C<zegrep -i> program and returns the matching lines."
20450 #: ../src/guestfs-actions.pod:7324
20451 msgid "guestfs_zero"
20456 #: ../src/guestfs-actions.pod:7326
20460 " guestfs_zero (guestfs_h *g,\n"
20461 " const char *device);\n"
20467 #: ../src/guestfs-actions.pod:7330 ../fish/guestfish-actions.pod:4899
20468 msgid "This command writes zeroes over the first few blocks of C<device>."
20473 #: ../src/guestfs-actions.pod:7332 ../fish/guestfish-actions.pod:4901
20475 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
20476 "securely wipe the device). It should be sufficient to remove any partition "
20477 "tables, filesystem superblocks and so on."
20482 #: ../src/guestfs-actions.pod:7336
20483 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
20488 #: ../src/guestfs-actions.pod:7347
20489 msgid "guestfs_zero_device"
20494 #: ../src/guestfs-actions.pod:7349
20498 " guestfs_zero_device (guestfs_h *g,\n"
20499 " const char *device);\n"
20505 #: ../src/guestfs-actions.pod:7353
20507 "This command writes zeroes over the entire C<device>. Compare with "
20508 "C<guestfs_zero> which just zeroes the first few blocks of a device."
20513 #: ../src/guestfs-actions.pod:7367
20514 msgid "(Added in 1.3.1)"
20519 #: ../src/guestfs-actions.pod:7369
20520 msgid "guestfs_zerofree"
20525 #: ../src/guestfs-actions.pod:7371
20529 " guestfs_zerofree (guestfs_h *g,\n"
20530 " const char *device);\n"
20536 #: ../src/guestfs-actions.pod:7375 ../fish/guestfish-actions.pod:4922
20538 "This runs the I<zerofree> program on C<device>. This program claims to zero "
20539 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
20540 "possible to compress the filesystem more effectively."
20545 #: ../src/guestfs-actions.pod:7380 ../fish/guestfish-actions.pod:4927
20546 msgid "You should B<not> run this program if the filesystem is mounted."
20551 #: ../src/guestfs-actions.pod:7383 ../fish/guestfish-actions.pod:4930
20553 "It is possible that using this program can damage the filesystem or data on "
20559 #: ../src/guestfs-actions.pod:7390
20560 msgid "guestfs_zfgrep"
20565 #: ../src/guestfs-actions.pod:7392
20569 " guestfs_zfgrep (guestfs_h *g,\n"
20570 " const char *pattern,\n"
20571 " const char *path);\n"
20577 #: ../src/guestfs-actions.pod:7397 ../fish/guestfish-actions.pod:4937
20579 "This calls the external C<zfgrep> program and returns the matching lines."
20584 #: ../src/guestfs-actions.pod:7409
20585 msgid "guestfs_zfgrepi"
20590 #: ../src/guestfs-actions.pod:7411
20594 " guestfs_zfgrepi (guestfs_h *g,\n"
20595 " const char *pattern,\n"
20596 " const char *path);\n"
20602 #: ../src/guestfs-actions.pod:7416 ../fish/guestfish-actions.pod:4947
20604 "This calls the external C<zfgrep -i> program and returns the matching lines."
20609 #: ../src/guestfs-actions.pod:7428
20610 msgid "guestfs_zfile"
20615 #: ../src/guestfs-actions.pod:7430
20619 " guestfs_zfile (guestfs_h *g,\n"
20620 " const char *meth,\n"
20621 " const char *path);\n"
20627 #: ../src/guestfs-actions.pod:7435 ../fish/guestfish-actions.pod:4957
20629 "This command runs C<file> after first decompressing C<path> using C<method>."
20634 #: ../src/guestfs-actions.pod:7438 ../fish/guestfish-actions.pod:4960
20635 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
20640 #: ../src/guestfs-actions.pod:7440
20642 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
20648 #: ../src/guestfs-actions.pod:7446 ../fish/guestfish-actions.pod:4965
20650 "This function is deprecated. In new code, use the C<file> call instead."
20655 #: ../src/guestfs-actions.pod:7455
20656 msgid "guestfs_zgrep"
20661 #: ../src/guestfs-actions.pod:7457
20665 " guestfs_zgrep (guestfs_h *g,\n"
20666 " const char *regex,\n"
20667 " const char *path);\n"
20673 #: ../src/guestfs-actions.pod:7462 ../fish/guestfish-actions.pod:4976
20675 "This calls the external C<zgrep> program and returns the matching lines."
20680 #: ../src/guestfs-actions.pod:7474
20681 msgid "guestfs_zgrepi"
20686 #: ../src/guestfs-actions.pod:7476
20690 " guestfs_zgrepi (guestfs_h *g,\n"
20691 " const char *regex,\n"
20692 " const char *path);\n"
20698 #: ../src/guestfs-actions.pod:7481 ../fish/guestfish-actions.pod:4986
20700 "This calls the external C<zgrep -i> program and returns the matching lines."
20705 #: ../src/guestfs-availability.pod:3
20711 #: ../src/guestfs-availability.pod:5
20713 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
20714 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
20715 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
20716 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
20717 "L</guestfs_aug_save> L</guestfs_aug_set>"
20722 #: ../src/guestfs-availability.pod:21
20728 #: ../src/guestfs-availability.pod:23
20730 "The following functions: L</guestfs_inotify_add_watch> L</"
20731 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
20732 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
20737 #: ../src/guestfs-availability.pod:31
20738 msgid "B<linuxfsuuid>"
20743 #: ../src/guestfs-availability.pod:33
20745 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
20746 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
20751 #: ../src/guestfs-availability.pod:40
20752 msgid "B<linuxmodules>"
20757 #: ../src/guestfs-availability.pod:42
20758 msgid "The following functions: L</guestfs_modprobe>"
20763 #: ../src/guestfs-availability.pod:45
20764 msgid "B<linuxxattrs>"
20769 #: ../src/guestfs-availability.pod:47
20771 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> L</"
20772 "guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> L</"
20773 "guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> L</"
20774 "guestfs_setxattr>"
20779 #: ../src/guestfs-availability.pod:58
20785 #: ../src/guestfs-availability.pod:60
20787 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
20788 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
20789 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
20794 #: ../src/guestfs-availability.pod:69
20800 #: ../src/guestfs-availability.pod:71
20802 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
20803 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
20804 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
20805 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
20806 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
20807 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
20808 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
20813 #: ../src/guestfs-availability.pod:94
20819 #: ../src/guestfs-availability.pod:96
20821 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
20822 "guestfs_mknod_b> L</guestfs_mknod_c>"
20827 #: ../src/guestfs-availability.pod:102
20833 #: ../src/guestfs-availability.pod:104
20834 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
20839 #: ../src/guestfs-availability.pod:107
20840 msgid "B<ntfsprogs>"
20845 #: ../src/guestfs-availability.pod:109
20847 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
20852 #: ../src/guestfs-availability.pod:113
20853 msgid "B<realpath>"
20858 #: ../src/guestfs-availability.pod:115
20859 msgid "The following functions: L</guestfs_realpath>"
20864 #: ../src/guestfs-availability.pod:118
20870 #: ../src/guestfs-availability.pod:120
20872 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
20873 "guestfs_scrub_freespace>"
20878 #: ../src/guestfs-availability.pod:125
20884 #: ../src/guestfs-availability.pod:127
20885 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
20890 #: ../src/guestfs-availability.pod:131
20896 #: ../src/guestfs-availability.pod:133
20897 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
20902 #: ../src/guestfs-availability.pod:137
20903 msgid "B<zerofree>"
20908 #: ../src/guestfs-availability.pod:139
20909 msgid "The following functions: L</guestfs_zerofree>"
20914 #: ../src/guestfs-structs.pod:1
20915 msgid "guestfs_int_bool"
20920 #: ../src/guestfs-structs.pod:3
20923 " struct guestfs_int_bool {\n"
20932 #: ../src/guestfs-structs.pod:8
20935 " struct guestfs_int_bool_list {\n"
20936 " uint32_t len; /* Number of elements in list. */\n"
20937 " struct guestfs_int_bool *val; /* Elements. */\n"
20944 #: ../src/guestfs-structs.pod:13
20947 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
20948 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
20954 #: ../src/guestfs-structs.pod:16
20955 msgid "guestfs_lvm_pv"
20960 #: ../src/guestfs-structs.pod:18
20963 " struct guestfs_lvm_pv {\n"
20964 " char *pv_name;\n"
20965 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
20966 " char pv_uuid[32];\n"
20968 " uint64_t pv_size;\n"
20969 " uint64_t dev_size;\n"
20970 " uint64_t pv_free;\n"
20971 " uint64_t pv_used;\n"
20972 " char *pv_attr;\n"
20973 " int64_t pv_pe_count;\n"
20974 " int64_t pv_pe_alloc_count;\n"
20975 " char *pv_tags;\n"
20976 " uint64_t pe_start;\n"
20977 " int64_t pv_mda_count;\n"
20978 " uint64_t pv_mda_free;\n"
20985 #: ../src/guestfs-structs.pod:36
20988 " struct guestfs_lvm_pv_list {\n"
20989 " uint32_t len; /* Number of elements in list. */\n"
20990 " struct guestfs_lvm_pv *val; /* Elements. */\n"
20997 #: ../src/guestfs-structs.pod:41
21000 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
21001 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
21007 #: ../src/guestfs-structs.pod:44
21008 msgid "guestfs_lvm_vg"
21013 #: ../src/guestfs-structs.pod:46
21016 " struct guestfs_lvm_vg {\n"
21017 " char *vg_name;\n"
21018 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
21019 " char vg_uuid[32];\n"
21021 " char *vg_attr;\n"
21022 " uint64_t vg_size;\n"
21023 " uint64_t vg_free;\n"
21024 " char *vg_sysid;\n"
21025 " uint64_t vg_extent_size;\n"
21026 " int64_t vg_extent_count;\n"
21027 " int64_t vg_free_count;\n"
21028 " int64_t max_lv;\n"
21029 " int64_t max_pv;\n"
21030 " int64_t pv_count;\n"
21031 " int64_t lv_count;\n"
21032 " int64_t snap_count;\n"
21033 " int64_t vg_seqno;\n"
21034 " char *vg_tags;\n"
21035 " int64_t vg_mda_count;\n"
21036 " uint64_t vg_mda_free;\n"
21043 #: ../src/guestfs-structs.pod:69
21046 " struct guestfs_lvm_vg_list {\n"
21047 " uint32_t len; /* Number of elements in list. */\n"
21048 " struct guestfs_lvm_vg *val; /* Elements. */\n"
21055 #: ../src/guestfs-structs.pod:74
21058 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
21059 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
21065 #: ../src/guestfs-structs.pod:77
21066 msgid "guestfs_lvm_lv"
21071 #: ../src/guestfs-structs.pod:79
21074 " struct guestfs_lvm_lv {\n"
21075 " char *lv_name;\n"
21076 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
21077 " char lv_uuid[32];\n"
21078 " char *lv_attr;\n"
21079 " int64_t lv_major;\n"
21080 " int64_t lv_minor;\n"
21081 " int64_t lv_kernel_major;\n"
21082 " int64_t lv_kernel_minor;\n"
21083 " uint64_t lv_size;\n"
21084 " int64_t seg_count;\n"
21086 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
21087 " float snap_percent;\n"
21088 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
21089 " float copy_percent;\n"
21090 " char *move_pv;\n"
21091 " char *lv_tags;\n"
21092 " char *mirror_log;\n"
21093 " char *modules;\n"
21100 #: ../src/guestfs-structs.pod:101
21103 " struct guestfs_lvm_lv_list {\n"
21104 " uint32_t len; /* Number of elements in list. */\n"
21105 " struct guestfs_lvm_lv *val; /* Elements. */\n"
21112 #: ../src/guestfs-structs.pod:106
21115 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
21116 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
21122 #: ../src/guestfs-structs.pod:111
21125 " struct guestfs_stat {\n"
21129 " int64_t nlink;\n"
21134 " int64_t blksize;\n"
21135 " int64_t blocks;\n"
21136 " int64_t atime;\n"
21137 " int64_t mtime;\n"
21138 " int64_t ctime;\n"
21145 #: ../src/guestfs-structs.pod:127
21148 " struct guestfs_stat_list {\n"
21149 " uint32_t len; /* Number of elements in list. */\n"
21150 " struct guestfs_stat *val; /* Elements. */\n"
21157 #: ../src/guestfs-structs.pod:132
21160 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
21161 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
21167 #: ../src/guestfs-structs.pod:137
21170 " struct guestfs_statvfs {\n"
21171 " int64_t bsize;\n"
21172 " int64_t frsize;\n"
21173 " int64_t blocks;\n"
21174 " int64_t bfree;\n"
21175 " int64_t bavail;\n"
21176 " int64_t files;\n"
21177 " int64_t ffree;\n"
21178 " int64_t favail;\n"
21181 " int64_t namemax;\n"
21188 #: ../src/guestfs-structs.pod:151
21191 " struct guestfs_statvfs_list {\n"
21192 " uint32_t len; /* Number of elements in list. */\n"
21193 " struct guestfs_statvfs *val; /* Elements. */\n"
21200 #: ../src/guestfs-structs.pod:156
21203 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
21204 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
21210 #: ../src/guestfs-structs.pod:159
21211 msgid "guestfs_dirent"
21216 #: ../src/guestfs-structs.pod:161
21219 " struct guestfs_dirent {\n"
21229 #: ../src/guestfs-structs.pod:167
21232 " struct guestfs_dirent_list {\n"
21233 " uint32_t len; /* Number of elements in list. */\n"
21234 " struct guestfs_dirent *val; /* Elements. */\n"
21241 #: ../src/guestfs-structs.pod:172
21244 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
21245 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
21251 #: ../src/guestfs-structs.pod:177
21254 " struct guestfs_version {\n"
21255 " int64_t major;\n"
21256 " int64_t minor;\n"
21257 " int64_t release;\n"
21265 #: ../src/guestfs-structs.pod:184
21268 " struct guestfs_version_list {\n"
21269 " uint32_t len; /* Number of elements in list. */\n"
21270 " struct guestfs_version *val; /* Elements. */\n"
21277 #: ../src/guestfs-structs.pod:189
21280 " void guestfs_free_version (struct guestfs_free_version *);\n"
21281 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
21287 #: ../src/guestfs-structs.pod:192
21288 msgid "guestfs_xattr"
21293 #: ../src/guestfs-structs.pod:194
21296 " struct guestfs_xattr {\n"
21297 " char *attrname;\n"
21298 " /* The next two fields describe a byte array. */\n"
21299 " uint32_t attrval_len;\n"
21300 " char *attrval;\n"
21307 #: ../src/guestfs-structs.pod:201
21310 " struct guestfs_xattr_list {\n"
21311 " uint32_t len; /* Number of elements in list. */\n"
21312 " struct guestfs_xattr *val; /* Elements. */\n"
21319 #: ../src/guestfs-structs.pod:206
21322 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
21323 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
21329 #: ../src/guestfs-structs.pod:209
21330 msgid "guestfs_inotify_event"
21335 #: ../src/guestfs-structs.pod:211
21338 " struct guestfs_inotify_event {\n"
21339 " int64_t in_wd;\n"
21340 " uint32_t in_mask;\n"
21341 " uint32_t in_cookie;\n"
21342 " char *in_name;\n"
21349 #: ../src/guestfs-structs.pod:218
21352 " struct guestfs_inotify_event_list {\n"
21353 " uint32_t len; /* Number of elements in list. */\n"
21354 " struct guestfs_inotify_event *val; /* Elements. */\n"
21361 #: ../src/guestfs-structs.pod:223
21364 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
21365 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
21371 #: ../src/guestfs-structs.pod:226
21372 msgid "guestfs_partition"
21377 #: ../src/guestfs-structs.pod:228
21380 " struct guestfs_partition {\n"
21381 " int32_t part_num;\n"
21382 " uint64_t part_start;\n"
21383 " uint64_t part_end;\n"
21384 " uint64_t part_size;\n"
21391 #: ../src/guestfs-structs.pod:235
21394 " struct guestfs_partition_list {\n"
21395 " uint32_t len; /* Number of elements in list. */\n"
21396 " struct guestfs_partition *val; /* Elements. */\n"
21403 #: ../src/guestfs-structs.pod:240
21406 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
21407 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
21413 #: ../src/guestfs-structs.pod:243
21414 msgid "guestfs_application"
21419 #: ../src/guestfs-structs.pod:245
21422 " struct guestfs_application {\n"
21423 " char *app_name;\n"
21424 " char *app_display_name;\n"
21425 " int32_t app_epoch;\n"
21426 " char *app_version;\n"
21427 " char *app_release;\n"
21428 " char *app_install_path;\n"
21429 " char *app_trans_path;\n"
21430 " char *app_publisher;\n"
21431 " char *app_url;\n"
21432 " char *app_source_package;\n"
21433 " char *app_summary;\n"
21434 " char *app_description;\n"
21441 #: ../src/guestfs-structs.pod:260
21444 " struct guestfs_application_list {\n"
21445 " uint32_t len; /* Number of elements in list. */\n"
21446 " struct guestfs_application *val; /* Elements. */\n"
21453 #: ../src/guestfs-structs.pod:265
21456 " void guestfs_free_application (struct guestfs_free_application *);\n"
21457 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
21463 #: ../fish/guestfish.pod:5
21464 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
21469 #: ../fish/guestfish.pod:9
21472 " guestfish [--options] [commands]\n"
21478 #: ../fish/guestfish.pod:11
21487 #: ../fish/guestfish.pod:13
21490 " guestfish [--ro|--rw] -a disk.img\n"
21496 #: ../fish/guestfish.pod:15
21499 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
21505 #: ../fish/guestfish.pod:17
21508 " guestfish -d libvirt-domain\n"
21514 #: ../fish/guestfish.pod:19
21517 " guestfish [--ro|--rw] -a disk.img -i\n"
21523 #: ../fish/guestfish.pod:21
21526 " guestfish -d libvirt-domain -i\n"
21532 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:15
21533 #: ../tools/virt-win-reg.pl:51 ../tools/virt-tar.pl:64
21539 #: ../fish/guestfish.pod:25
21541 "Using guestfish in read/write mode on live virtual machines can be "
21542 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
21543 "option to use guestfish safely if the disk image or virtual machine might be "
21549 #: ../fish/guestfish.pod:32
21551 "Guestfish is a shell and command-line tool for examining and modifying "
21552 "virtual machine filesystems. It uses libguestfs and exposes all of the "
21553 "functionality of the guestfs API, see L<guestfs(3)>."
21558 #: ../fish/guestfish.pod:36
21560 "Guestfish gives you structured access to the libguestfs API, from shell "
21561 "scripts or the command line or interactively. If you want to rescue a "
21562 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
21568 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:949
21569 #: ../fuse/guestmount.pod:39 ../tools/virt-tar.pl:50
21575 #: ../fish/guestfish.pod:43
21576 msgid "As an interactive shell"
21581 #: ../fish/guestfish.pod:45
21590 #: ../fish/guestfish.pod:47
21593 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
21594 " editing virtual machine filesystems.\n"
21600 #: ../fish/guestfish.pod:50
21603 " Type: 'help' for a list of commands\n"
21604 " 'man' to read the manual\n"
21605 " 'quit' to quit the shell\n"
21611 #: ../fish/guestfish.pod:54
21614 " ><fs> add-ro disk.img\n"
21616 " ><fs> list-filesystems\n"
21617 " /dev/sda1: ext4\n"
21618 " /dev/vg_guest/lv_root: ext4\n"
21619 " /dev/vg_guest/lv_swap: swap\n"
21620 " ><fs> mount /dev/vg_guest/lv_root /\n"
21621 " ><fs> cat /etc/fstab\n"
21623 " # Created by anaconda\n"
21631 #: ../fish/guestfish.pod:67
21632 msgid "From shell scripts"
21637 #: ../fish/guestfish.pod:69
21638 msgid "Create a new C</etc/motd> file in a guest or disk image:"
21643 #: ../fish/guestfish.pod:71
21646 " guestfish <<_EOF_\n"
21649 " mount /dev/vg_guest/lv_root /\n"
21650 " write /etc/motd \"Welcome, new users\"\n"
21657 #: ../fish/guestfish.pod:78
21658 msgid "List the LVM logical volumes in a disk image:"
21663 #: ../fish/guestfish.pod:80
21666 " guestfish -a disk.img --ro <<_EOF_\n"
21675 #: ../fish/guestfish.pod:85
21676 msgid "List all the filesystems in a disk image:"
21681 #: ../fish/guestfish.pod:87
21684 " guestfish -a disk.img --ro <<_EOF_\n"
21686 " list-filesystems\n"
21693 #: ../fish/guestfish.pod:92
21694 msgid "On one command line"
21699 #: ../fish/guestfish.pod:94
21700 msgid "Update C</etc/resolv.conf> in a guest:"
21705 #: ../fish/guestfish.pod:96
21709 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
21710 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
21716 #: ../fish/guestfish.pod:100
21717 msgid "Edit C</boot/grub/grub.conf> interactively:"
21722 #: ../fish/guestfish.pod:102
21725 " guestfish --rw --add disk.img \\\n"
21726 " --mount /dev/vg_guest/lv_root \\\n"
21727 " --mount /dev/sda1:/boot \\\n"
21728 " edit /boot/grub/grub.conf\n"
21734 #: ../fish/guestfish.pod:107
21735 msgid "Mount disks automatically"
21740 #: ../fish/guestfish.pod:109
21742 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
21747 #: ../fish/guestfish.pod:112
21750 " guestfish --ro -a disk.img -i cat /etc/group\n"
21756 #: ../fish/guestfish.pod:114
21759 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
21765 #: ../fish/guestfish.pod:116
21766 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
21771 #: ../fish/guestfish.pod:118
21774 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
21780 #: ../fish/guestfish.pod:120
21781 msgid "As a script interpreter"
21786 #: ../fish/guestfish.pod:122
21787 msgid "Create a 100MB disk containing an ext2-formatted partition:"
21792 #: ../fish/guestfish.pod:124
21795 " #!/usr/bin/guestfish -f\n"
21796 " sparse test1.img 100M\n"
21798 " part-disk /dev/sda mbr\n"
21799 " mkfs ext2 /dev/sda1\n"
21805 #: ../fish/guestfish.pod:130
21806 msgid "Start with a prepared disk"
21811 #: ../fish/guestfish.pod:132
21813 "An alternate way to create a 100MB disk called C<test1.img> containing a "
21814 "single ext2-formatted partition:"
21819 #: ../fish/guestfish.pod:135
21822 " guestfish -N fs\n"
21828 #: ../fish/guestfish.pod:137
21829 msgid "To list what is available do:"
21834 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:940
21837 " guestfish -N help | less\n"
21843 #: ../fish/guestfish.pod:141
21844 msgid "Remote control"
21849 #: ../fish/guestfish.pod:143
21852 " eval \"`guestfish --listen`\"\n"
21853 " guestfish --remote add-ro disk.img\n"
21854 " guestfish --remote run\n"
21855 " guestfish --remote lvs\n"
21861 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37
21862 #: ../fuse/guestmount.pod:73 ../tools/virt-win-reg.pl:96
21863 #: ../tools/virt-list-filesystems.pl:53 ../tools/virt-tar.pl:103
21864 #: ../tools/virt-make-fs.pl:153 ../tools/virt-list-partitions.pl:54
21870 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:133
21871 #: ../tools/virt-win-reg.pl:104 ../tools/virt-list-filesystems.pl:61
21872 #: ../tools/virt-tar.pl:111 ../tools/virt-make-fs.pl:161
21873 #: ../tools/virt-list-partitions.pl:62
21879 #: ../fish/guestfish.pod:154
21880 msgid "Displays general help on options."
21885 #: ../fish/guestfish.pod:156
21891 #: ../fish/guestfish.pod:158
21892 msgid "B<--cmd-help>"
21897 #: ../fish/guestfish.pod:160
21898 msgid "Lists all available guestfish commands."
21903 #: ../fish/guestfish.pod:162
21909 #: ../fish/guestfish.pod:164
21910 msgid "B<--cmd-help cmd>"
21915 #: ../fish/guestfish.pod:166
21916 msgid "Displays detailed help on a single command C<cmd>."
21921 #: ../fish/guestfish.pod:168
21922 msgid "B<-a image>"
21927 #: ../fish/guestfish.pod:170
21928 msgid "B<--add image>"
21933 #: ../fish/guestfish.pod:172
21934 msgid "Add a block device or virtual machine image to the shell."
21939 #: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:81
21941 "The format of the disk image is auto-detected. To override this and force a "
21942 "particular format use the I<--format=..> option."
21946 #: ../fish/guestfish.pod:177
21948 "Using this flag is mostly equivalent to using the C<add> command, with "
21949 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
21950 "the I<--format=...> flag was given."
21955 #: ../fish/guestfish.pod:181
21961 #: ../fish/guestfish.pod:183
21962 msgid "B<--connect URI>"
21967 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:86
21969 "When used in conjunction with the I<-d> option, this specifies the libvirt "
21970 "URI to use. The default is to use the default libvirt connection."
21975 #: ../fish/guestfish.pod:189
21981 #: ../fish/guestfish.pod:191
21983 "If using the I<--listen> option and a csh-like shell, use this option. See "
21984 "section L</REMOTE CONTROL AND CSH> below."
21989 #: ../fish/guestfish.pod:194
21990 msgid "B<-d libvirt-domain>"
21995 #: ../fish/guestfish.pod:196
21996 msgid "B<--domain libvirt-domain>"
22001 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:92
22003 "Add disks from the named libvirt domain. If the I<--ro> option is also "
22004 "used, then any libvirt domain can be used. However in write mode, only "
22005 "libvirt domains which are shut down can be named here."
22009 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:96
22010 msgid "Domain UUIDs can be used instead of names."
22015 #: ../fish/guestfish.pod:204
22017 "Using this flag is mostly equivalent to using the C<add-domain> command, "
22018 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
22019 "if the I<--format:...> flag was given."
22024 #: ../fish/guestfish.pod:208
22030 #: ../fish/guestfish.pod:210
22031 msgid "B<--no-dest-paths>"
22036 #: ../fish/guestfish.pod:212
22038 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
22039 "to hit the tab key to complete paths on the guest filesystem, but this "
22040 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
22041 "allow this feature to be disabled."
22046 #: ../fish/guestfish.pod:217 ../fuse/guestmount.pod:110
22047 msgid "B<--echo-keys>"
22052 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:112
22054 "When prompting for keys and passphrases, guestfish normally turns echoing "
22055 "off so you cannot see what you are typing. If you are not worried about "
22056 "Tempest attacks and there is no one else in the room you can specify this "
22057 "flag to see what you are typing."
22062 #: ../fish/guestfish.pod:224
22068 #: ../fish/guestfish.pod:226
22069 msgid "B<--file file>"
22074 #: ../fish/guestfish.pod:228
22075 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
22080 #: ../fish/guestfish.pod:231
22083 " #!/usr/bin/guestfish -f\n"
22089 #: ../fish/guestfish.pod:233
22090 msgid "B<--format=raw|qcow2|..>"
22095 #: ../fish/guestfish.pod:235
22096 msgid "B<--format>"
22101 #: ../fish/guestfish.pod:237 ../fuse/guestmount.pod:119
22103 "The default for the I<-a> option is to auto-detect the format of the disk "
22104 "image. Using this forces the disk format for I<-a> options which follow on "
22105 "the command line. Using I<--format> with no argument switches back to auto-"
22106 "detection for subsequent I<-a> options."
22111 #: ../fish/guestfish.pod:244
22114 " guestfish --format=raw -a disk.img\n"
22120 #: ../fish/guestfish.pod:246
22121 msgid "forces raw format (no auto-detection) for C<disk.img>."
22126 #: ../fish/guestfish.pod:248
22129 " guestfish --format=raw -a disk.img --format -a another.img\n"
22135 #: ../fish/guestfish.pod:250
22137 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
22138 "detection for C<another.img>."
22143 #: ../fish/guestfish.pod:253
22145 "If you have untrusted raw-format guest disk images, you should use this "
22146 "option to specify the disk format. This avoids a possible security problem "
22147 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
22152 #: ../fish/guestfish.pod:258
22158 #: ../fish/guestfish.pod:260
22159 msgid "B<--inspector>"
22164 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:139
22166 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
22167 "system and mount filesystems as they would be mounted on the real virtual "
22173 #: ../fish/guestfish.pod:266
22174 msgid "Typical usage is either:"
22179 #: ../fish/guestfish.pod:268
22182 " guestfish -d myguest -i\n"
22188 #: ../fish/guestfish.pod:270
22189 msgid "(for an inactive libvirt domain called I<myguest>), or:"
22194 #: ../fish/guestfish.pod:272
22197 " guestfish --ro -d myguest -i\n"
22203 #: ../fish/guestfish.pod:274
22204 msgid "(for active domains, readonly), or specify the block device directly:"
22209 #: ../fish/guestfish.pod:276
22212 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
22218 #: ../fish/guestfish.pod:278
22220 "Note that the command line syntax changed slightly over older versions of "
22221 "guestfish. You can still use the old syntax:"
22226 #: ../fish/guestfish.pod:281
22229 " guestfish [--ro] -i disk.img\n"
22235 #: ../fish/guestfish.pod:283
22238 " guestfish [--ro] -i libvirt-domain\n"
22244 #: ../fish/guestfish.pod:285
22246 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
22247 "then using other commands to mount the filesystems that were found."
22252 #: ../fish/guestfish.pod:289 ../fuse/guestmount.pod:143
22253 msgid "B<--keys-from-stdin>"
22258 #: ../fish/guestfish.pod:291 ../fuse/guestmount.pod:145
22260 "Read key or passphrase parameters from stdin. The default is to try to read "
22261 "passphrases from the user by opening C</dev/tty>."
22266 #: ../fish/guestfish.pod:294
22267 msgid "B<--listen>"
22272 #: ../fish/guestfish.pod:296
22274 "Fork into the background and listen for remote commands. See section L</"
22275 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
22279 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:148
22284 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:150
22286 "Connect to a live virtual machine. (Experimental, see L<guestfs(3)/"
22287 "ATTACHING TO RUNNING DAEMONS>)."
22291 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:153
22292 msgid "B<-m dev[:mountpoint[:options]]>"
22296 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:155
22297 msgid "B<--mount dev[:mountpoint[:options]]>"
22302 #: ../fish/guestfish.pod:308
22303 msgid "Mount the named partition or logical volume on the given mountpoint."
22308 #: ../fish/guestfish.pod:310
22309 msgid "If the mountpoint is omitted, it defaults to C</>."
22314 #: ../fish/guestfish.pod:312
22315 msgid "You have to mount something on C</> before most commands will work."
22320 #: ../fish/guestfish.pod:314
22322 "If any I<-m> or I<--mount> options are given, the guest is automatically "
22328 #: ../fish/guestfish.pod:317
22330 "If you don't know what filesystems a disk image contains, you can either run "
22331 "guestfish without this option, then list the partitions, filesystems and LVs "
22332 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
22333 "commands), or you can use the L<virt-filesystems(1)> program."
22337 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:163
22339 "The third (and rarely used) part of the mount parameter is the list of mount "
22340 "options used to mount the underlying filesystem. If this is not given, then "
22341 "the mount options are either the empty string or C<ro> (the latter if the "
22342 "I<--ro> flag is used). By specifying the mount options, you override this "
22343 "default choice. Probably the only time you would use this is to enable ACLs "
22344 "and/or extended attributes if the filesystem can support them:"
22348 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:171
22351 " -m /dev/sda1:/:acl,user_xattr\n"
22356 #: ../fish/guestfish.pod:333
22357 msgid "Using this flag is equivalent to using the C<mount-options> command."
22362 #: ../fish/guestfish.pod:335
22368 #: ../fish/guestfish.pod:337
22369 msgid "B<--no-sync>"
22374 #: ../fish/guestfish.pod:339
22376 "Disable autosync. This is enabled by default. See the discussion of "
22377 "autosync in the L<guestfs(3)> manpage."
22382 #: ../fish/guestfish.pod:342
22388 #: ../fish/guestfish.pod:344
22389 msgid "B<--new type>"
22394 #: ../fish/guestfish.pod:346
22400 #: ../fish/guestfish.pod:348
22402 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
22403 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
22404 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
22410 #: ../fish/guestfish.pod:353
22411 msgid "B<--progress-bars>"
22416 #: ../fish/guestfish.pod:355
22417 msgid "Enable progress bars, even when guestfish is used non-interactively."
22422 #: ../fish/guestfish.pod:357
22424 "Progress bars are enabled by default when guestfish is used as an "
22425 "interactive shell."
22430 #: ../fish/guestfish.pod:360
22431 msgid "B<--no-progress-bars>"
22436 #: ../fish/guestfish.pod:362
22437 msgid "Disable progress bars."
22442 #: ../fish/guestfish.pod:364
22443 msgid "B<--remote[=pid]>"
22448 #: ../fish/guestfish.pod:366
22450 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
22451 "CONTROL GUESTFISH OVER A SOCKET> below."
22456 #: ../fish/guestfish.pod:369
22462 #: ../fish/guestfish.pod:371
22468 #: ../fish/guestfish.pod:373
22470 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
22471 "mounts are done read-only."
22476 #: ../fish/guestfish.pod:376
22478 "The option must always be used if the disk image or virtual machine might be "
22479 "running, and is generally recommended in cases where you don't need write "
22480 "access to the disk."
22485 #: ../fish/guestfish.pod:380
22487 "Note that prepared disk images created with I<-N> are not affected by this "
22488 "option. Also commands like C<add> are not affected - you have to specify "
22489 "the C<readonly:true> option explicitly if you need it."
22494 #: ../fish/guestfish.pod:384
22495 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
22500 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:227
22501 msgid "B<--selinux>"
22506 #: ../fish/guestfish.pod:388
22507 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
22512 #: ../fish/guestfish.pod:390
22518 #: ../fish/guestfish.pod:392
22519 msgid "B<--verbose>"
22524 #: ../fish/guestfish.pod:394
22526 "Enable very verbose messages. This is particularly useful if you find a bug."
22531 #: ../fish/guestfish.pod:397
22537 #: ../fish/guestfish.pod:399 ../tools/virt-win-reg.pl:112
22538 #: ../tools/virt-list-filesystems.pl:69 ../tools/virt-tar.pl:119
22539 #: ../tools/virt-make-fs.pl:169 ../tools/virt-list-partitions.pl:70
22540 msgid "B<--version>"
22545 #: ../fish/guestfish.pod:401
22546 msgid "Display the guestfish / libguestfs version number and exit."
22551 #: ../fish/guestfish.pod:403
22557 #: ../fish/guestfish.pod:405
22562 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:241
22564 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
22565 "mounts are done read-write."
22569 #: ../fish/guestfish.pod:410
22570 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
22575 #: ../fish/guestfish.pod:412
22581 #: ../fish/guestfish.pod:414
22582 msgid "Echo each command before executing it."
22587 #: ../fish/guestfish.pod:418
22588 msgid "COMMANDS ON COMMAND LINE"
22593 #: ../fish/guestfish.pod:420
22595 "Any additional (non-option) arguments are treated as commands to execute."
22600 #: ../fish/guestfish.pod:423
22602 "Commands to execute should be separated by a colon (C<:>), where the colon "
22603 "is a separate parameter. Thus:"
22608 #: ../fish/guestfish.pod:426
22611 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
22617 #: ../fish/guestfish.pod:428
22619 "If there are no additional arguments, then we enter a shell, either an "
22620 "interactive shell with a prompt (if the input is a terminal) or a non-"
22621 "interactive shell."
22626 #: ../fish/guestfish.pod:432
22628 "In either command line mode or non-interactive shell, the first command that "
22629 "gives an error causes the whole shell to exit. In interactive mode (with a "
22630 "prompt) if a command fails, you can continue to enter commands."
22635 #: ../fish/guestfish.pod:437
22636 msgid "USING launch (OR run)"
22641 #: ../fish/guestfish.pod:439
22643 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
22644 "then launch it, then mount any disks you need, and finally issue actions/"
22645 "commands. So the general order of the day is:"
22650 #: ../fish/guestfish.pod:447
22651 msgid "add or -a/--add"
22656 #: ../fish/guestfish.pod:451
22657 msgid "launch (aka run)"
22662 #: ../fish/guestfish.pod:455
22663 msgid "mount or -m/--mount"
22668 #: ../fish/guestfish.pod:459
22669 msgid "any other commands"
22674 #: ../fish/guestfish.pod:463
22676 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
22677 "guest before mounting or performing any other commands."
22682 #: ../fish/guestfish.pod:466
22684 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
22685 "I<--new> options were given then C<run> is done automatically, simply "
22686 "because guestfish can't perform the action you asked for without doing this."
22691 #: ../fish/guestfish.pod:471
22692 msgid "OPENING DISKS FOR READ AND WRITE"
22696 #: ../fish/guestfish.pod:473
22698 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
22699 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
22700 "I<-i> and I<-m> open disk images read-only or for writing."
22704 #: ../fish/guestfish.pod:478
22706 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
22707 "opening disk images supplied on the command line for write. To open a disk "
22708 "image read-only you have to do I<-a image --ro>."
22713 #: ../fish/guestfish.pod:482
22715 "This matters: If you accidentally open a live VM disk image writable then "
22716 "you will cause irreversible disk corruption."
22720 #: ../fish/guestfish.pod:485
22722 "By libguestfs 1.12 we intend to change the default the other way. Disk "
22723 "images will be opened read-only. You will have to either specify "
22724 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
22725 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
22726 "access for disk images specified by those other command line options."
22730 #: ../fish/guestfish.pod:492
22732 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
22733 "which does nothing (it is already the default). However it is highly "
22734 "recommended that you use this option to indicate that you need write access, "
22735 "and prepare your scripts for the day when this option will be required for "
22741 #: ../fish/guestfish.pod:498
22743 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
22744 "other libguestfs program apart from guestfish and guestmount."
22749 #: ../fish/guestfish.pod:501
22755 #: ../fish/guestfish.pod:503
22757 "You can quote ordinary parameters using either single or double quotes. For "
22763 #: ../fish/guestfish.pod:506
22766 " add \"file with a space.img\"\n"
22772 #: ../fish/guestfish.pod:508
22775 " rm '/file name'\n"
22781 #: ../fish/guestfish.pod:510
22790 #: ../fish/guestfish.pod:512
22792 "A few commands require a list of strings to be passed. For these, use a "
22793 "whitespace-separated list, enclosed in quotes. Strings containing "
22794 "whitespace to be passed through must be enclosed in single quotes. A "
22795 "literal single quote must be escaped with a backslash."
22800 #: ../fish/guestfish.pod:517
22803 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
22804 " command \"/bin/echo 'foo bar'\"\n"
22805 " command \"/bin/echo \\'foo\\'\"\n"
22811 #: ../fish/guestfish.pod:521
22812 msgid "OPTIONAL ARGUMENTS"
22817 #: ../fish/guestfish.pod:523
22819 "Some commands take optional arguments. These arguments appear in this "
22820 "documentation as C<[argname:..]>. You can use them as in these examples:"
22825 #: ../fish/guestfish.pod:527
22828 " add-drive-opts filename\n"
22834 #: ../fish/guestfish.pod:529
22837 " add-drive-opts filename readonly:true\n"
22843 #: ../fish/guestfish.pod:531
22846 " add-drive-opts filename format:qcow2 readonly:false\n"
22852 #: ../fish/guestfish.pod:533
22854 "Each optional argument can appear at most once. All optional arguments must "
22855 "appear after the required ones."
22860 #: ../fish/guestfish.pod:536
22866 #: ../fish/guestfish.pod:538
22868 "This section applies to all commands which can take integers as parameters."
22873 #: ../fish/guestfish.pod:541
22874 msgid "SIZE SUFFIX"
22879 #: ../fish/guestfish.pod:543
22881 "When the command takes a parameter measured in bytes, you can use one of the "
22882 "following suffixes to specify kilobytes, megabytes and larger sizes:"
22887 #: ../fish/guestfish.pod:549
22888 msgid "B<k> or B<K> or B<KiB>"
22893 #: ../fish/guestfish.pod:551
22894 msgid "The size in kilobytes (multiplied by 1024)."
22899 #: ../fish/guestfish.pod:553
22905 #: ../fish/guestfish.pod:555
22906 msgid "The size in SI 1000 byte units."
22911 #: ../fish/guestfish.pod:557
22912 msgid "B<M> or B<MiB>"
22917 #: ../fish/guestfish.pod:559
22918 msgid "The size in megabytes (multiplied by 1048576)."
22923 #: ../fish/guestfish.pod:561
22929 #: ../fish/guestfish.pod:563
22930 msgid "The size in SI 1000000 byte units."
22935 #: ../fish/guestfish.pod:565
22936 msgid "B<G> or B<GiB>"
22941 #: ../fish/guestfish.pod:567
22942 msgid "The size in gigabytes (multiplied by 2**30)."
22947 #: ../fish/guestfish.pod:569
22953 #: ../fish/guestfish.pod:571
22954 msgid "The size in SI 10**9 byte units."
22959 #: ../fish/guestfish.pod:573
22960 msgid "B<T> or B<TiB>"
22965 #: ../fish/guestfish.pod:575
22966 msgid "The size in terabytes (multiplied by 2**40)."
22971 #: ../fish/guestfish.pod:577
22977 #: ../fish/guestfish.pod:579
22978 msgid "The size in SI 10**12 byte units."
22983 #: ../fish/guestfish.pod:581
22984 msgid "B<P> or B<PiB>"
22989 #: ../fish/guestfish.pod:583
22990 msgid "The size in petabytes (multiplied by 2**50)."
22995 #: ../fish/guestfish.pod:585
23001 #: ../fish/guestfish.pod:587
23002 msgid "The size in SI 10**15 byte units."
23007 #: ../fish/guestfish.pod:589
23008 msgid "B<E> or B<EiB>"
23013 #: ../fish/guestfish.pod:591
23014 msgid "The size in exabytes (multiplied by 2**60)."
23019 #: ../fish/guestfish.pod:593
23025 #: ../fish/guestfish.pod:595
23026 msgid "The size in SI 10**18 byte units."
23031 #: ../fish/guestfish.pod:597
23032 msgid "B<Z> or B<ZiB>"
23037 #: ../fish/guestfish.pod:599
23038 msgid "The size in zettabytes (multiplied by 2**70)."
23043 #: ../fish/guestfish.pod:601
23049 #: ../fish/guestfish.pod:603
23050 msgid "The size in SI 10**21 byte units."
23055 #: ../fish/guestfish.pod:605
23056 msgid "B<Y> or B<YiB>"
23061 #: ../fish/guestfish.pod:607
23062 msgid "The size in yottabytes (multiplied by 2**80)."
23067 #: ../fish/guestfish.pod:609
23073 #: ../fish/guestfish.pod:611
23074 msgid "The size in SI 10**24 byte units."
23079 #: ../fish/guestfish.pod:617
23082 " truncate-size /file 1G\n"
23088 #: ../fish/guestfish.pod:619
23089 msgid "would truncate the file to 1 gigabyte."
23094 #: ../fish/guestfish.pod:621
23096 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
23097 "the parameter to L</memsize> is specified in megabytes already). Adding a "
23098 "suffix will probably not do what you expect."
23103 #: ../fish/guestfish.pod:625
23104 msgid "OCTAL AND HEXADECIMAL NUMBERS"
23109 #: ../fish/guestfish.pod:627
23111 "For specifying the radix (base) use the C convention: C<0> to prefix an "
23112 "octal number or C<0x> to prefix a hexadecimal number. For example:"
23117 #: ../fish/guestfish.pod:630
23120 " 1234 decimal number 1234\n"
23121 " 02322 octal number, equivalent to decimal 1234\n"
23122 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
23128 #: ../fish/guestfish.pod:634
23130 "When using the C<chmod> command, you almost always want to specify an octal "
23131 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
23132 "L<chmod(1)> program):"
23137 #: ../fish/guestfish.pod:638
23140 " chmod 0777 /public # OK\n"
23141 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
23147 #: ../fish/guestfish.pod:641
23149 "Commands that return numbers usually print them in decimal, but some "
23150 "commands print numbers in other radices (eg. C<umask> prints the mode in "
23151 "octal, preceeded by C<0>)."
23156 #: ../fish/guestfish.pod:645
23157 msgid "WILDCARDS AND GLOBBING"
23162 #: ../fish/guestfish.pod:647
23164 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
23165 "(globbing) by default. So for example the following will not do what you "
23171 #: ../fish/guestfish.pod:651
23180 #: ../fish/guestfish.pod:653
23182 "Assuming you don't have a directory called literally C</home/*> then the "
23183 "above command will return an error."
23188 #: ../fish/guestfish.pod:656
23189 msgid "To perform wildcard expansion, use the C<glob> command."
23194 #: ../fish/guestfish.pod:658
23197 " glob rm-rf /home/*\n"
23203 #: ../fish/guestfish.pod:660
23205 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
23206 "many times), equivalent to:"
23211 #: ../fish/guestfish.pod:663
23214 " rm-rf /home/jim\n"
23215 " rm-rf /home/joe\n"
23216 " rm-rf /home/mary\n"
23222 #: ../fish/guestfish.pod:667
23223 msgid "C<glob> only works on simple guest paths and not on device names."
23228 #: ../fish/guestfish.pod:669
23230 "If you have several parameters, each containing a wildcard, then glob will "
23231 "perform a Cartesian product."
23236 #: ../fish/guestfish.pod:672
23242 #: ../fish/guestfish.pod:674
23244 "Any line which starts with a I<#> character is treated as a comment and "
23245 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
23246 "a command. For example:"
23251 #: ../fish/guestfish.pod:678
23254 " # this is a comment\n"
23255 " # this is a comment\n"
23256 " foo # NOT a comment\n"
23262 #: ../fish/guestfish.pod:682
23263 msgid "Blank lines are also ignored."
23268 #: ../fish/guestfish.pod:684
23269 msgid "RUNNING COMMANDS LOCALLY"
23274 #: ../fish/guestfish.pod:686
23276 "Any line which starts with a I<!> character is treated as a command sent to "
23277 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
23282 #: ../fish/guestfish.pod:690
23286 " tgz-out /remote local/remote-data.tar.gz\n"
23292 #: ../fish/guestfish.pod:693
23294 "will create a directory C<local> on the host, and then export the contents "
23295 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
23296 "(See C<tgz-out>)."
23301 #: ../fish/guestfish.pod:697
23303 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
23304 "effect, due to the way that subprocesses work in Unix."
23308 #: ../fish/guestfish.pod:700
23309 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
23313 #: ../fish/guestfish.pod:702
23315 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
23316 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
23317 "and executed as guestfish commands."
23321 #: ../fish/guestfish.pod:706
23323 "Thus you can use shell script to construct arbitrary guestfish commands "
23324 "which are then parsed by guestfish."
23328 #: ../fish/guestfish.pod:709
23330 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
23331 "through C</foo.100>) using guestfish commands alone. However this is simple "
23332 "if we use a shell script to create the guestfish commands for us:"
23336 #: ../fish/guestfish.pod:714
23339 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
23344 #: ../fish/guestfish.pod:716
23345 msgid "or with names like C</foo.001>:"
23349 #: ../fish/guestfish.pod:718
23352 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
23357 #: ../fish/guestfish.pod:720
23359 "When using guestfish interactively it can be helpful to just run the shell "
23360 "script first (ie. remove the initial C<E<lt>> character so it is just an "
23361 "ordinary I<!> local command), see what guestfish commands it would run, and "
23362 "when you are happy with those prepend the C<E<lt>> character to run the "
23363 "guestfish commands for real."
23368 #: ../fish/guestfish.pod:726
23374 #: ../fish/guestfish.pod:728
23376 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
23377 "command (a guestfish command) to the second command (any host command). For "
23383 #: ../fish/guestfish.pod:732
23386 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
23392 #: ../fish/guestfish.pod:734
23394 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
23395 "program). The above command would list all accounts in the guest filesystem "
23396 "which have UID 0, ie. root accounts including backdoors. Other examples:"
23401 #: ../fish/guestfish.pod:739
23404 " hexdump /bin/ls | head\n"
23405 " list-devices | tail -1\n"
23406 " tgz-out / - | tar ztf -\n"
23412 #: ../fish/guestfish.pod:743
23414 "The space before the pipe symbol is required, any space after the pipe "
23415 "symbol is optional. Everything after the pipe symbol is just passed "
23416 "straight to the host shell, so it can contain redirections, globs and "
23417 "anything else that makes sense on the host side."
23422 #: ../fish/guestfish.pod:748
23424 "To use a literal argument which begins with a pipe symbol, you have to quote "
23430 #: ../fish/guestfish.pod:751
23439 #: ../fish/guestfish.pod:753
23440 msgid "HOME DIRECTORIES"
23445 #: ../fish/guestfish.pod:755
23447 "If a parameter starts with the character C<~> then the tilde may be expanded "
23448 "as a home directory path (either C<~> for the current user's home directory, "
23449 "or C<~user> for another user)."
23454 #: ../fish/guestfish.pod:759
23456 "Note that home directory expansion happens for users known I<on the host>, "
23457 "not in the guest filesystem."
23462 #: ../fish/guestfish.pod:762
23464 "To use a literal argument which begins with a tilde, you have to quote it, "
23470 #: ../fish/guestfish.pod:765
23479 #: ../fish/guestfish.pod:769
23481 "Libguestfs has some support for Linux guests encrypted according to the "
23482 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
23483 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
23484 "LUKS is supported."
23489 #: ../fish/guestfish.pod:774
23490 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
23495 #: ../fish/guestfish.pod:776
23498 " ><fs> vfs-type /dev/sda2\n"
23505 #: ../fish/guestfish.pod:779
23507 "Then open those devices using L</luks-open>. This creates a device-mapper "
23508 "device called C</dev/mapper/luksdev>."
23513 #: ../fish/guestfish.pod:782
23516 " ><fs> luks-open /dev/sda2 luksdev\n"
23517 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
23523 #: ../fish/guestfish.pod:785
23525 "Finally you have to tell LVM to scan for volume groups on the newly created "
23531 #: ../fish/guestfish.pod:788
23535 " vg-activate-all true\n"
23541 #: ../fish/guestfish.pod:791
23542 msgid "The logical volume(s) can now be mounted in the usual way."
23547 #: ../fish/guestfish.pod:793
23549 "Before closing a LUKS device you must unmount any logical volumes on it and "
23550 "deactivate the volume groups by calling C<vg-activate false VG> on each "
23551 "one. Then you can close the mapper device:"
23556 #: ../fish/guestfish.pod:797
23559 " vg-activate false /dev/VG\n"
23560 " luks-close /dev/mapper/luksdev\n"
23566 #: ../fish/guestfish.pod:800
23567 msgid "WINDOWS PATHS"
23571 #: ../fish/guestfish.pod:802
23573 "If a path is prefixed with C<win:> then you can use Windows-style drive "
23574 "letters and paths (with some limitations). The following commands are "
23580 #: ../fish/guestfish.pod:806
23583 " file /WINDOWS/system32/config/system.LOG\n"
23589 #: ../fish/guestfish.pod:808
23592 " file win:\\windows\\system32\\config\\system.log\n"
23597 #: ../fish/guestfish.pod:810
23600 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
23605 #: ../fish/guestfish.pod:812
23607 "The parameter is rewritten \"behind the scenes\" by looking up the position "
23608 "where the drive is mounted, prepending that to the path, changing all "
23609 "backslash characters to forward slash, then resolving the result using L</"
23610 "case-sensitive-path>. For example if the E: drive was mounted on C</e> then "
23611 "the parameter might be rewritten like this:"
23615 #: ../fish/guestfish.pod:818
23618 " win:e:\\foo\\bar => /e/FOO/bar\n"
23623 #: ../fish/guestfish.pod:820
23624 msgid "This only works in argument positions that expect a path."
23629 #: ../fish/guestfish.pod:822
23630 msgid "UPLOADING AND DOWNLOADING FILES"
23635 #: ../fish/guestfish.pod:824
23637 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
23638 "others which upload from or download to a local file, you can use the "
23639 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
23644 #: ../fish/guestfish.pod:828
23653 #: ../fish/guestfish.pod:830
23655 "reads stdin and creates from that a file C</foo> in the disk image, and:"
23660 #: ../fish/guestfish.pod:833
23663 " tar-out /etc - | tar tf -\n"
23669 #: ../fish/guestfish.pod:835
23671 "writes the tarball to stdout and then pipes that into the external \"tar\" "
23672 "command (see L</PIPES>)."
23677 #: ../fish/guestfish.pod:838
23679 "When using C<-> to read from stdin, the input is read up to the end of "
23680 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
23681 "some arbitrary end marker:"
23686 #: ../fish/guestfish.pod:842
23689 " upload -<<END /foo\n"
23699 #: ../fish/guestfish.pod:848
23701 "Any string of characters can be used instead of C<END>. The end marker must "
23702 "appear on a line of its own, without any preceeding or following characters "
23703 "(not even spaces)."
23708 #: ../fish/guestfish.pod:852
23710 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
23711 "upload local files (so-called \"FileIn\" parameters in the generator)."
23716 #: ../fish/guestfish.pod:855
23717 msgid "EXIT ON ERROR BEHAVIOUR"
23722 #: ../fish/guestfish.pod:857
23724 "By default, guestfish will ignore any errors when in interactive mode (ie. "
23725 "taking commands from a human over a tty), and will exit on the first error "
23726 "in non-interactive mode (scripts, commands given on the command line)."
23731 #: ../fish/guestfish.pod:862
23733 "If you prefix a command with a I<-> character, then that command will not "
23734 "cause guestfish to exit, even if that (one) command returns an error."
23739 #: ../fish/guestfish.pod:866
23740 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
23745 #: ../fish/guestfish.pod:868
23747 "Guestfish can be remote-controlled over a socket. This is useful "
23748 "particularly in shell scripts where you want to make several different "
23749 "changes to a filesystem, but you don't want the overhead of starting up a "
23750 "guestfish process each time."
23755 #: ../fish/guestfish.pod:873
23756 msgid "Start a guestfish server process using:"
23761 #: ../fish/guestfish.pod:875
23764 " eval \"`guestfish --listen`\"\n"
23770 #: ../fish/guestfish.pod:877
23771 msgid "and then send it commands by doing:"
23776 #: ../fish/guestfish.pod:879
23779 " guestfish --remote cmd [...]\n"
23785 #: ../fish/guestfish.pod:881
23786 msgid "To cause the server to exit, send it the exit command:"
23791 #: ../fish/guestfish.pod:883
23794 " guestfish --remote exit\n"
23800 #: ../fish/guestfish.pod:885
23802 "Note that the server will normally exit if there is an error in a command. "
23803 "You can change this in the usual way. See section L</EXIT ON ERROR "
23809 #: ../fish/guestfish.pod:889
23810 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
23815 #: ../fish/guestfish.pod:891
23817 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
23818 "is how the I<--remote> option knows where to send the commands. You can "
23819 "have several guestfish listener processes running using:"
23824 #: ../fish/guestfish.pod:895
23827 " eval \"`guestfish --listen`\"\n"
23828 " pid1=$GUESTFISH_PID\n"
23829 " eval \"`guestfish --listen`\"\n"
23830 " pid2=$GUESTFISH_PID\n"
23832 " guestfish --remote=$pid1 cmd\n"
23833 " guestfish --remote=$pid2 cmd\n"
23839 #: ../fish/guestfish.pod:903
23840 msgid "REMOTE CONTROL AND CSH"
23845 #: ../fish/guestfish.pod:905
23847 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
23853 #: ../fish/guestfish.pod:908
23856 " eval \"`guestfish --listen --csh`\"\n"
23862 #: ../fish/guestfish.pod:910
23863 msgid "REMOTE CONTROL DETAILS"
23868 #: ../fish/guestfish.pod:912
23870 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
23871 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
23872 "and C<$PID> is the process ID of the server."
23877 #: ../fish/guestfish.pod:916
23878 msgid "Guestfish client and server versions must match exactly."
23883 #: ../fish/guestfish.pod:918
23884 msgid "PREPARED DISK IMAGES"
23889 #: ../fish/guestfish.pod:920
23891 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
23892 "preformatted disk images that guestfish can make for you to save typing. "
23893 "This is particularly useful for testing purposes. This option is used "
23894 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
23895 "can be mixed with I<-a>)."
23900 #: ../fish/guestfish.pod:926
23902 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
23903 "the second and so on. Existing files in the current directory are "
23909 #: ../fish/guestfish.pod:930
23911 "The type briefly describes how the disk should be sized, partitioned, how "
23912 "filesystem(s) should be created, and how content should be added. "
23913 "Optionally the type can be followed by extra parameters, separated by C<:> "
23914 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
23915 "allocated disk, containing a single partition, with the partition formatted "
23916 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
23922 #: ../fish/guestfish.pod:938
23923 msgid "To list the available types and any extra parameters they take, run:"
23928 #: ../fish/guestfish.pod:942
23930 "Note that the prepared filesystem is not mounted. You would usually have to "
23931 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
23936 #: ../fish/guestfish.pod:946
23938 "If any I<-N> or I<--new> options are given, the guest is automatically "
23944 #: ../fish/guestfish.pod:951
23945 msgid "Create a 100MB disk with an ext4-formatted partition:"
23950 #: ../fish/guestfish.pod:953
23953 " guestfish -N fs:ext4\n"
23959 #: ../fish/guestfish.pod:955
23960 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
23965 #: ../fish/guestfish.pod:957
23968 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
23974 #: ../fish/guestfish.pod:959
23975 msgid "Create a blank 200MB disk:"
23980 #: ../fish/guestfish.pod:961
23983 " guestfish -N disk:200M\n"
23989 #: ../fish/guestfish.pod:963
23990 msgid "PROGRESS BARS"
23995 #: ../fish/guestfish.pod:965
23997 "Some (not all) long-running commands send progress notification messages as "
23998 "they are running. Guestfish turns these messages into progress bars."
24003 #: ../fish/guestfish.pod:969
24005 "When a command that supports progress bars takes longer than two seconds to "
24006 "run, and if progress bars are enabled, then you will see one appearing below "
24012 #: ../fish/guestfish.pod:973
24015 " ><fs> copy-size /large-file /another-file 2048M\n"
24016 " / 10% [#####-----------------------------------------] 00:30\n"
24022 #: ../fish/guestfish.pod:976
24024 "The spinner on the left hand side moves round once for every progress "
24025 "notification received from the backend. This is a (reasonably) golden "
24026 "assurance that the command is \"doing something\" even if the progress bar "
24027 "is not moving, because the command is able to send the progress "
24028 "notifications. When the bar reaches 100% and the command finishes, the "
24029 "spinner disappears."
24034 #: ../fish/guestfish.pod:983
24036 "Progress bars are enabled by default when guestfish is used interactively. "
24037 "You can enable them even for non-interactive modes using I<--progress-bars>, "
24038 "and you can disable them completely using I<--no-progress-bars>."
24043 #: ../fish/guestfish.pod:988
24044 msgid "GUESTFISH COMMANDS"
24049 #: ../fish/guestfish.pod:990
24051 "The commands in this section are guestfish convenience commands, in other "
24052 "words, they are not part of the L<guestfs(3)> API."
24057 #: ../fish/guestfish.pod:993
24063 #: ../fish/guestfish.pod:995
24073 #: ../fish/guestfish.pod:998
24074 msgid "Without any parameter, this provides general help."
24079 #: ../fish/guestfish.pod:1000
24080 msgid "With a C<cmd> parameter, this displays detailed help for that command."
24085 #: ../fish/guestfish.pod:1002
24086 msgid "quit | exit"
24091 #: ../fish/guestfish.pod:1004
24092 msgid "This exits guestfish. You can also use C<^D> key."
24097 #: ../fish/guestfish.pod:1006
24098 msgid "@FISH_COMMANDS@"
24103 #: ../fish/guestfish.pod:1008
24109 #: ../fish/guestfish.pod:1012 ../test-tool/libguestfs-test-tool.pod:77
24115 #: ../fish/guestfish.pod:1014
24117 "guestfish returns 0 if the commands completed without error, or 1 if there "
24123 #: ../fish/guestfish.pod:1021
24129 #: ../fish/guestfish.pod:1023
24131 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
24137 #: ../fish/guestfish.pod:1026
24138 msgid "GUESTFISH_PID"
24143 #: ../fish/guestfish.pod:1028
24145 "Used with the I<--remote> option to specify the remote guestfish process to "
24146 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
24151 #: ../fish/guestfish.pod:1032
24157 #: ../fish/guestfish.pod:1034
24159 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
24160 "not specified, the external L<hexedit(1)> program is used."
24165 #: ../fish/guestfish.pod:1038
24171 #: ../fish/guestfish.pod:1040
24173 "If compiled with GNU readline support, various files in the home directory "
24174 "can be used. See L</FILES>."
24179 #: ../fish/guestfish.pod:1049
24181 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
24182 "effect as using the B<-v> option."
24187 #: ../fish/guestfish.pod:1061
24189 "Set the path that guestfish uses to search for kernel and initrd.img. See "
24190 "the discussion of paths in L<guestfs(3)>."
24195 #: ../fish/guestfish.pod:1072
24196 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
24201 #: ../fish/guestfish.pod:1074
24207 #: ../fish/guestfish.pod:1076
24209 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
24215 #: ../fish/guestfish.pod:1092 ../fuse/guestmount.pod:254
24220 #: ../fish/guestfish.pod:1096 ../fuse/guestmount.pod:258
24221 msgid "$HOME/.libguestfs-tools.rc"
24225 #: ../fish/guestfish.pod:1098 ../fuse/guestmount.pod:260
24226 msgid "/etc/libguestfs-tools.conf"
24230 #: ../fish/guestfish.pod:1100 ../fuse/guestmount.pod:262
24232 "This configuration file controls the default read-only or read-write mode "
24233 "(I<--ro> or I<--rw>)."
24237 #: ../fish/guestfish.pod:1103
24238 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
24243 #: ../fish/guestfish.pod:1105
24244 msgid "$HOME/.guestfish"
24249 #: ../fish/guestfish.pod:1107
24251 "If compiled with GNU readline support, then the command history is saved in "
24257 #: ../fish/guestfish.pod:1110
24258 msgid "$HOME/.inputrc"
24263 #: ../fish/guestfish.pod:1112
24264 msgid "/etc/inputrc"
24269 #: ../fish/guestfish.pod:1114
24271 "If compiled with GNU readline support, then these files can be used to "
24272 "configure readline. For further information, please see L<readline(3)/"
24273 "INITIALIZATION FILE>."
24278 #: ../fish/guestfish.pod:1118
24279 msgid "To write rules which only apply to guestfish, use:"
24284 #: ../fish/guestfish.pod:1120
24295 #: ../fish/guestfish.pod:1124
24297 "Variables that you can set in inputrc that change the behaviour of guestfish "
24298 "in useful ways include:"
24303 #: ../fish/guestfish.pod:1129
24304 msgid "completion-ignore-case (default: on)"
24309 #: ../fish/guestfish.pod:1131
24311 "By default, guestfish will ignore case when tab-completing paths on the "
24317 #: ../fish/guestfish.pod:1134
24320 " set completion-ignore-case off\n"
24326 #: ../fish/guestfish.pod:1136
24327 msgid "to make guestfish case sensitive."
24332 #: ../fish/guestfish.pod:1140
24338 #: ../fish/guestfish.pod:1142
24339 msgid "test2.img (etc)"
24343 #: ../fish/guestfish.pod:1144
24345 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
24346 "will be created in the file C<test1.img> in the current directory. The "
24347 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
24348 "the same name will be overwritten."
24352 #: ../fish/guestfish.pod:1153
24354 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-copy-in(1)"
24355 ">, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)"
24356 ">, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions"
24357 "(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)"
24358 ">, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)"
24359 ">, L<hexedit(1)>."
24364 #: ../fish/guestfish.pod:1183 ../test-tool/libguestfs-test-tool.pod:102
24365 #: ../fuse/guestmount.pod:289 ../tools/virt-win-reg.pl:606
24366 #: ../tools/virt-list-filesystems.pl:210 ../tools/virt-tar.pl:309
24367 #: ../tools/virt-make-fs.pl:572 ../tools/virt-list-partitions.pl:277
24369 "This program is free software; you can redistribute it and/or modify it "
24370 "under the terms of the GNU General Public License as published by the Free "
24371 "Software Foundation; either version 2 of the License, or (at your option) "
24372 "any later version."
24377 #: ../fish/guestfish.pod:1188 ../test-tool/libguestfs-test-tool.pod:107
24378 #: ../fuse/guestmount.pod:294 ../tools/virt-win-reg.pl:611
24379 #: ../tools/virt-list-filesystems.pl:215 ../tools/virt-tar.pl:314
24380 #: ../tools/virt-make-fs.pl:577 ../tools/virt-list-partitions.pl:282
24382 "This program is distributed in the hope that it will be useful, but WITHOUT "
24383 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
24384 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
24390 #: ../fish/guestfish.pod:1193 ../test-tool/libguestfs-test-tool.pod:112
24391 #: ../fuse/guestmount.pod:299 ../tools/virt-win-reg.pl:616
24392 #: ../tools/virt-list-filesystems.pl:220 ../tools/virt-tar.pl:319
24393 #: ../tools/virt-make-fs.pl:582 ../tools/virt-list-partitions.pl:287
24395 "You should have received a copy of the GNU General Public License along with "
24396 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
24397 "Ave, Cambridge, MA 02139, USA."
24402 #: ../fish/guestfish-actions.pod:1
24408 #: ../fish/guestfish-actions.pod:3
24411 " add-cdrom filename\n"
24417 #: ../fish/guestfish-actions.pod:15
24419 "This call checks for the existence of C<filename>. This stops you from "
24420 "specifying other types of drive which are supported by qemu such as C<nbd:> "
24421 "and C<http:> URLs. To specify those, use the general L</config> call "
24427 #: ../fish/guestfish-actions.pod:22
24429 "If you just want to add an ISO file (often you use this as an efficient way "
24430 "to transfer large files into the guest), then you should probably use L</add-"
24431 "drive-ro> instead."
24436 #: ../fish/guestfish-actions.pod:35
24442 #: ../fish/guestfish-actions.pod:37
24447 #: ../fish/guestfish-actions.pod:39
24450 " add-domain dom [libvirturi:..] [readonly:..] [iface:..] [live:..] [allowuuid:..]\n"
24456 #: ../fish/guestfish-actions.pod:41
24458 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
24459 "It works by connecting to libvirt, requesting the domain and domain XML from "
24460 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
24465 #: ../fish/guestfish-actions.pod:76
24467 "The other optional parameters are passed directly through to L</add-drive-"
24473 #: ../fish/guestfish-actions.pod:79 ../fish/guestfish-actions.pod:143
24474 #: ../fish/guestfish-actions.pod:3052
24476 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
24481 #: ../fish/guestfish-actions.pod:81
24487 #: ../fish/guestfish-actions.pod:83
24490 " add-drive filename\n"
24496 #: ../fish/guestfish-actions.pod:85
24498 "This function is the equivalent of calling L</add-drive-opts> with no "
24499 "optional parameters, so the disk is added writable, with the format being "
24500 "detected automatically."
24505 #: ../fish/guestfish-actions.pod:89
24507 "Automatic detection of the format opens you up to a potential security hole "
24508 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
24509 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
24510 "you should think about replacing calls to this function with calls to L</add-"
24511 "drive-opts>, and specifying the format."
24516 #: ../fish/guestfish-actions.pod:96
24517 msgid "add-drive-opts"
24522 #: ../fish/guestfish-actions.pod:98
24528 #: ../fish/guestfish-actions.pod:100
24531 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
24537 #: ../fish/guestfish-actions.pod:127
24539 "This forces the image format. If you omit this (or use L</add-drive> or L</"
24540 "add-drive-ro>) then the format is automatically detected. Possible formats "
24541 "include C<raw> and C<qcow2>."
24546 #: ../fish/guestfish-actions.pod:138
24548 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
24549 "add-drive-with-if> call (q.v.)"
24554 #: ../fish/guestfish-actions.pod:145
24555 msgid "add-drive-ro"
24560 #: ../fish/guestfish-actions.pod:147
24566 #: ../fish/guestfish-actions.pod:149
24569 " add-drive-ro filename\n"
24575 #: ../fish/guestfish-actions.pod:151
24577 "This function is the equivalent of calling L</add-drive-opts> with the "
24578 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
24579 "is added read-only, with the format being detected automatically."
24584 #: ../fish/guestfish-actions.pod:156
24585 msgid "add-drive-ro-with-if"
24590 #: ../fish/guestfish-actions.pod:158
24593 " add-drive-ro-with-if filename iface\n"
24599 #: ../fish/guestfish-actions.pod:160
24601 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
24602 "interface emulation to use at run time."
24607 #: ../fish/guestfish-actions.pod:170
24608 msgid "add-drive-with-if"
24613 #: ../fish/guestfish-actions.pod:172
24616 " add-drive-with-if filename iface\n"
24622 #: ../fish/guestfish-actions.pod:174
24624 "This is the same as L</add-drive> but it allows you to specify the QEMU "
24625 "interface emulation to use at run time."
24630 #: ../fish/guestfish-actions.pod:184
24636 #: ../fish/guestfish-actions.pod:186
24639 " aug-clear augpath\n"
24645 #: ../fish/guestfish-actions.pod:191
24651 #: ../fish/guestfish-actions.pod:193
24660 #: ../fish/guestfish-actions.pod:195
24662 "Close the current Augeas handle and free up any resources used by it. After "
24663 "calling this, you have to call L</aug-init> again before you can use any "
24664 "other Augeas functions."
24669 #: ../fish/guestfish-actions.pod:200
24670 msgid "aug-defnode"
24675 #: ../fish/guestfish-actions.pod:202
24678 " aug-defnode name expr val\n"
24684 #: ../fish/guestfish-actions.pod:207
24686 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
24687 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
24688 "containing that single node."
24693 #: ../fish/guestfish-actions.pod:215
24699 #: ../fish/guestfish-actions.pod:217
24702 " aug-defvar name expr\n"
24708 #: ../fish/guestfish-actions.pod:226
24714 #: ../fish/guestfish-actions.pod:228
24717 " aug-get augpath\n"
24723 #: ../fish/guestfish-actions.pod:233
24729 #: ../fish/guestfish-actions.pod:235
24732 " aug-init root flags\n"
24738 #: ../fish/guestfish-actions.pod:241
24739 msgid "You must call this before using any other L</aug-*> commands."
24744 #: ../fish/guestfish-actions.pod:276
24745 msgid "Do not load the tree in L</aug-init>."
24750 #: ../fish/guestfish-actions.pod:280
24751 msgid "To close the handle, you can call L</aug-close>."
24756 #: ../fish/guestfish-actions.pod:284
24762 #: ../fish/guestfish-actions.pod:286
24765 " aug-insert augpath label true|false\n"
24771 #: ../fish/guestfish-actions.pod:296
24777 #: ../fish/guestfish-actions.pod:298
24786 #: ../fish/guestfish-actions.pod:305
24792 #: ../fish/guestfish-actions.pod:307
24795 " aug-ls augpath\n"
24801 #: ../fish/guestfish-actions.pod:309
24803 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
24804 "resulting nodes into alphabetical order."
24809 #: ../fish/guestfish-actions.pod:312
24815 #: ../fish/guestfish-actions.pod:314
24818 " aug-match augpath\n"
24824 #: ../fish/guestfish-actions.pod:320
24830 #: ../fish/guestfish-actions.pod:322
24833 " aug-mv src dest\n"
24839 #: ../fish/guestfish-actions.pod:327
24845 #: ../fish/guestfish-actions.pod:329
24848 " aug-rm augpath\n"
24854 #: ../fish/guestfish-actions.pod:335
24860 #: ../fish/guestfish-actions.pod:337
24869 #: ../fish/guestfish-actions.pod:341
24871 "The flags which were passed to L</aug-init> affect exactly how files are "
24877 #: ../fish/guestfish-actions.pod:344
24883 #: ../fish/guestfish-actions.pod:346
24886 " aug-set augpath val\n"
24892 #: ../fish/guestfish-actions.pod:350
24894 "In the Augeas API, it is possible to clear a node by setting the value to "
24895 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
24896 "this call. Instead you must use the L</aug-clear> call."
24901 #: ../fish/guestfish-actions.pod:355
24907 #: ../fish/guestfish-actions.pod:357
24910 " available 'groups ...'\n"
24916 #: ../fish/guestfish-actions.pod:363
24918 "The libguestfs groups, and the functions that those groups correspond to, "
24919 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
24920 "runtime by calling L</available-all-groups>."
24925 #: ../fish/guestfish-actions.pod:387
24926 msgid "You must call L</launch> before calling this function."
24931 #: ../fish/guestfish-actions.pod:409
24933 "This call was added in version C<1.0.80>. In previous versions of "
24934 "libguestfs all you could do would be to speculatively execute a command to "
24935 "find out if the daemon implemented it. See also L</version>."
24940 #: ../fish/guestfish-actions.pod:416
24941 msgid "available-all-groups"
24946 #: ../fish/guestfish-actions.pod:418
24949 " available-all-groups\n"
24955 #: ../fish/guestfish-actions.pod:420
24957 "This command returns a list of all optional groups that this daemon knows "
24958 "about. Note this returns both supported and unsupported groups. To find "
24959 "out which ones the daemon can actually support you have to call L</"
24960 "available> on each member of the returned list."
24965 #: ../fish/guestfish-actions.pod:426
24966 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
24971 #: ../fish/guestfish-actions.pod:428
24977 #: ../fish/guestfish-actions.pod:430
24980 " base64-in (base64file|-) filename\n"
24986 #: ../fish/guestfish-actions.pod:435 ../fish/guestfish-actions.pod:444
24987 #: ../fish/guestfish-actions.pod:668 ../fish/guestfish-actions.pod:837
24988 #: ../fish/guestfish-actions.pod:856 ../fish/guestfish-actions.pod:1233
24989 #: ../fish/guestfish-actions.pod:4450 ../fish/guestfish-actions.pod:4462
24990 #: ../fish/guestfish-actions.pod:4473 ../fish/guestfish-actions.pod:4484
24991 #: ../fish/guestfish-actions.pod:4536 ../fish/guestfish-actions.pod:4545
24992 #: ../fish/guestfish-actions.pod:4599 ../fish/guestfish-actions.pod:4622
24993 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
24998 #: ../fish/guestfish-actions.pod:437
25004 #: ../fish/guestfish-actions.pod:439
25007 " base64-out filename (base64file|-)\n"
25013 #: ../fish/guestfish-actions.pod:446
25014 msgid "blockdev-flushbufs"
25019 #: ../fish/guestfish-actions.pod:448
25022 " blockdev-flushbufs device\n"
25028 #: ../fish/guestfish-actions.pod:455
25029 msgid "blockdev-getbsz"
25034 #: ../fish/guestfish-actions.pod:457
25037 " blockdev-getbsz device\n"
25043 #: ../fish/guestfish-actions.pod:466
25044 msgid "blockdev-getro"
25049 #: ../fish/guestfish-actions.pod:468
25052 " blockdev-getro device\n"
25058 #: ../fish/guestfish-actions.pod:475
25059 msgid "blockdev-getsize64"
25064 #: ../fish/guestfish-actions.pod:477
25067 " blockdev-getsize64 device\n"
25073 #: ../fish/guestfish-actions.pod:481
25074 msgid "See also L</blockdev-getsz>."
25079 #: ../fish/guestfish-actions.pod:485
25080 msgid "blockdev-getss"
25085 #: ../fish/guestfish-actions.pod:487
25088 " blockdev-getss device\n"
25094 #: ../fish/guestfish-actions.pod:492
25096 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
25101 #: ../fish/guestfish-actions.pod:497
25102 msgid "blockdev-getsz"
25107 #: ../fish/guestfish-actions.pod:499
25110 " blockdev-getsz device\n"
25116 #: ../fish/guestfish-actions.pod:504
25118 "See also L</blockdev-getss> for the real sector size of the device, and L</"
25119 "blockdev-getsize64> for the more useful I<size in bytes>."
25124 #: ../fish/guestfish-actions.pod:510
25125 msgid "blockdev-rereadpt"
25130 #: ../fish/guestfish-actions.pod:512
25133 " blockdev-rereadpt device\n"
25139 #: ../fish/guestfish-actions.pod:518
25140 msgid "blockdev-setbsz"
25145 #: ../fish/guestfish-actions.pod:520
25148 " blockdev-setbsz device blocksize\n"
25154 #: ../fish/guestfish-actions.pod:529
25155 msgid "blockdev-setro"
25160 #: ../fish/guestfish-actions.pod:531
25163 " blockdev-setro device\n"
25169 #: ../fish/guestfish-actions.pod:537
25170 msgid "blockdev-setrw"
25175 #: ../fish/guestfish-actions.pod:539
25178 " blockdev-setrw device\n"
25184 #: ../fish/guestfish-actions.pod:545
25185 msgid "case-sensitive-path"
25190 #: ../fish/guestfish-actions.pod:547
25193 " case-sensitive-path path\n"
25199 #: ../fish/guestfish-actions.pod:571
25201 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
25202 "WINDOWS/system32\"> (the exact return value would depend on details of how "
25203 "the directories were originally created under Windows)."
25208 #: ../fish/guestfish-actions.pod:579
25209 msgid "See also L</realpath>."
25214 #: ../fish/guestfish-actions.pod:581
25220 #: ../fish/guestfish-actions.pod:583
25229 #: ../fish/guestfish-actions.pod:587
25231 "Note that this function cannot correctly handle binary files (specifically, "
25232 "files containing C<\\0> character which is treated as end of string). For "
25233 "those you need to use the L</read-file> or L</download> functions which have "
25234 "a more complex interface."
25239 #: ../fish/guestfish-actions.pod:595
25245 #: ../fish/guestfish-actions.pod:597
25248 " checksum csumtype path\n"
25254 #: ../fish/guestfish-actions.pod:640
25255 msgid "To get the checksum for a device, use L</checksum-device>."
25260 #: ../fish/guestfish-actions.pod:642
25261 msgid "To get the checksums for many files, use L</checksums-out>."
25266 #: ../fish/guestfish-actions.pod:644
25267 msgid "checksum-device"
25272 #: ../fish/guestfish-actions.pod:646
25275 " checksum-device csumtype device\n"
25281 #: ../fish/guestfish-actions.pod:648
25283 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
25284 "device named C<device>. For the types of checksums supported see the L</"
25285 "checksum> command."
25290 #: ../fish/guestfish-actions.pod:652
25291 msgid "checksums-out"
25296 #: ../fish/guestfish-actions.pod:654
25299 " checksums-out csumtype directory (sumsfile|-)\n"
25305 #: ../fish/guestfish-actions.pod:670
25311 #: ../fish/guestfish-actions.pod:672
25314 " chmod mode path\n"
25320 #: ../fish/guestfish-actions.pod:683
25326 #: ../fish/guestfish-actions.pod:685
25329 " chown owner group path\n"
25335 #: ../fish/guestfish-actions.pod:693
25341 #: ../fish/guestfish-actions.pod:695
25344 " command 'arguments ...'\n"
25350 #: ../fish/guestfish-actions.pod:702
25352 "The single parameter is an argv-style list of arguments. The first element "
25353 "is the name of the program to run. Subsequent elements are parameters. The "
25354 "list must be non-empty (ie. must contain a program name). Note that the "
25355 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
25360 #: ../fish/guestfish-actions.pod:730
25361 msgid "command-lines"
25366 #: ../fish/guestfish-actions.pod:732
25369 " command-lines 'arguments ...'\n"
25375 #: ../fish/guestfish-actions.pod:734
25377 "This is the same as L</command>, but splits the result into a list of lines."
25382 #: ../fish/guestfish-actions.pod:737
25383 msgid "See also: L</sh-lines>"
25388 #: ../fish/guestfish-actions.pod:742
25394 #: ../fish/guestfish-actions.pod:744
25397 " config qemuparam qemuvalue\n"
25403 #: ../fish/guestfish-actions.pod:755
25409 #: ../fish/guestfish-actions.pod:757
25412 " copy-size src dest size\n"
25418 #: ../fish/guestfish-actions.pod:765
25424 #: ../fish/guestfish-actions.pod:767
25433 #: ../fish/guestfish-actions.pod:772
25439 #: ../fish/guestfish-actions.pod:774
25448 #: ../fish/guestfish-actions.pod:779
25454 #: ../fish/guestfish-actions.pod:781
25463 #: ../fish/guestfish-actions.pod:788
25465 "If the destination is a device, it must be as large or larger than the "
25466 "source file or device, otherwise the copy will fail. This command cannot do "
25467 "partial copies (see L</copy-size>)."
25472 #: ../fish/guestfish-actions.pod:792
25478 #: ../fish/guestfish-actions.pod:794
25487 #: ../fish/guestfish-actions.pod:798 ../fish/guestfish-actions.pod:809
25489 "This command is mostly useful for interactive sessions. It is I<not> "
25490 "intended that you try to parse the output string. Use L</statvfs> from "
25496 #: ../fish/guestfish-actions.pod:802
25502 #: ../fish/guestfish-actions.pod:804
25511 #: ../fish/guestfish-actions.pod:813
25517 #: ../fish/guestfish-actions.pod:815
25526 #: ../fish/guestfish-actions.pod:821
25528 "Another way to get the same information is to enable verbose messages with "
25529 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
25530 "before running the program."
25535 #: ../fish/guestfish-actions.pod:826
25541 #: ../fish/guestfish-actions.pod:828
25544 " download remotefilename (filename|-)\n"
25550 #: ../fish/guestfish-actions.pod:835
25551 msgid "See also L</upload>, L</cat>."
25556 #: ../fish/guestfish-actions.pod:839
25557 msgid "download-offset"
25562 #: ../fish/guestfish-actions.pod:841
25565 " download-offset remotefilename (filename|-) offset size\n"
25571 #: ../fish/guestfish-actions.pod:849
25573 "Note that there is no limit on the amount of data that can be downloaded "
25574 "with this call, unlike with L</pread>, and this call always reads the full "
25575 "amount unless an error occurs."
25580 #: ../fish/guestfish-actions.pod:854
25581 msgid "See also L</download>, L</pread>."
25586 #: ../fish/guestfish-actions.pod:858
25587 msgid "drop-caches"
25592 #: ../fish/guestfish-actions.pod:860
25595 " drop-caches whattodrop\n"
25601 #: ../fish/guestfish-actions.pod:872
25607 #: ../fish/guestfish-actions.pod:874
25616 #: ../fish/guestfish-actions.pod:886
25622 #: ../fish/guestfish-actions.pod:888
25625 " e2fsck-f device\n"
25631 #: ../fish/guestfish-actions.pod:894
25633 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
25634 "should use L</fsck>."
25639 #: ../fish/guestfish-actions.pod:897
25640 msgid "echo-daemon"
25645 #: ../fish/guestfish-actions.pod:899
25648 " echo-daemon 'words ...'\n"
25654 #: ../fish/guestfish-actions.pod:906
25655 msgid "See also L</ping-daemon>."
25660 #: ../fish/guestfish-actions.pod:908
25666 #: ../fish/guestfish-actions.pod:910
25669 " egrep regex path\n"
25675 #: ../fish/guestfish-actions.pod:918
25681 #: ../fish/guestfish-actions.pod:920
25684 " egrepi regex path\n"
25690 #: ../fish/guestfish-actions.pod:928
25696 #: ../fish/guestfish-actions.pod:930
25699 " equal file1 file2\n"
25705 #: ../fish/guestfish-actions.pod:937
25711 #: ../fish/guestfish-actions.pod:939
25720 #: ../fish/guestfish-actions.pod:944
25721 msgid "See also L</is-file>, L</is-dir>, L</stat>."
25726 #: ../fish/guestfish-actions.pod:946
25732 #: ../fish/guestfish-actions.pod:948
25735 " fallocate path len\n"
25741 #: ../fish/guestfish-actions.pod:965
25742 msgid "fallocate64"
25747 #: ../fish/guestfish-actions.pod:967
25750 " fallocate64 path len\n"
25756 #: ../fish/guestfish-actions.pod:973
25758 "Note that this call allocates disk blocks for the file. To create a sparse "
25759 "file use L</truncate-size> instead."
25764 #: ../fish/guestfish-actions.pod:976
25766 "The deprecated call L</fallocate> does the same, but owing to an oversight "
25767 "it only allowed 30 bit lengths to be specified, effectively limiting the "
25768 "maximum size of files created through that call to 1GB."
25773 #: ../fish/guestfish-actions.pod:985
25779 #: ../fish/guestfish-actions.pod:987
25782 " fgrep pattern path\n"
25788 #: ../fish/guestfish-actions.pod:995
25794 #: ../fish/guestfish-actions.pod:997
25797 " fgrepi pattern path\n"
25803 #: ../fish/guestfish-actions.pod:1005
25809 #: ../fish/guestfish-actions.pod:1007
25818 #: ../fish/guestfish-actions.pod:1019
25820 "This command can also be used on C</dev/> devices (and partitions, LV "
25821 "names). You can for example use this to determine if a device contains a "
25822 "filesystem, although it's usually better to use L</vfs-type>."
25827 #: ../fish/guestfish-actions.pod:1029
25828 msgid "file-architecture"
25833 #: ../fish/guestfish-actions.pod:1031
25836 " file-architecture filename\n"
25842 #: ../fish/guestfish-actions.pod:1134
25848 #: ../fish/guestfish-actions.pod:1136
25857 #: ../fish/guestfish-actions.pod:1140
25859 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
25860 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
25865 #: ../fish/guestfish-actions.pod:1144
25871 #: ../fish/guestfish-actions.pod:1146
25874 " fill c len path\n"
25880 #: ../fish/guestfish-actions.pod:1152
25882 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
25883 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
25884 "L</fill-pattern>."
25889 #: ../fish/guestfish-actions.pod:1157
25890 msgid "fill-pattern"
25895 #: ../fish/guestfish-actions.pod:1159
25898 " fill-pattern pattern len path\n"
25904 #: ../fish/guestfish-actions.pod:1161
25906 "This function is like L</fill> except that it creates a new file of length "
25907 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
25908 "is truncated if necessary to ensure the length of the file is exactly C<len> "
25914 #: ../fish/guestfish-actions.pod:1166
25920 #: ../fish/guestfish-actions.pod:1168
25923 " find directory\n"
25929 #: ../fish/guestfish-actions.pod:1182
25930 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
25935 #: ../fish/guestfish-actions.pod:1195
25936 msgid "See also L</find0>."
25941 #: ../fish/guestfish-actions.pod:1200
25947 #: ../fish/guestfish-actions.pod:1202
25950 " find0 directory (files|-)\n"
25956 #: ../fish/guestfish-actions.pod:1208
25958 "This command works the same way as L</find> with the following exceptions:"
25963 #: ../fish/guestfish-actions.pod:1235
25964 msgid "findfs-label"
25969 #: ../fish/guestfish-actions.pod:1237
25972 " findfs-label label\n"
25978 #: ../fish/guestfish-actions.pod:1243
25979 msgid "To find the label of a filesystem, use L</vfs-label>."
25984 #: ../fish/guestfish-actions.pod:1245
25985 msgid "findfs-uuid"
25990 #: ../fish/guestfish-actions.pod:1247
25993 " findfs-uuid uuid\n"
25999 #: ../fish/guestfish-actions.pod:1253
26000 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
26005 #: ../fish/guestfish-actions.pod:1255
26011 #: ../fish/guestfish-actions.pod:1257
26014 " fsck fstype device\n"
26020 #: ../fish/guestfish-actions.pod:1287
26026 #: ../fish/guestfish-actions.pod:1289
26034 #: ../fish/guestfish-actions.pod:1296
26035 msgid "get-attach-method"
26039 #: ../fish/guestfish-actions.pod:1298
26042 " get-attach-method\n"
26047 #: ../fish/guestfish-actions.pod:1300
26048 msgid "Return the current attach method. See L</set-attach-method>."
26053 #: ../fish/guestfish-actions.pod:1302
26054 msgid "get-autosync"
26059 #: ../fish/guestfish-actions.pod:1304
26068 #: ../fish/guestfish-actions.pod:1308
26074 #: ../fish/guestfish-actions.pod:1310
26083 #: ../fish/guestfish-actions.pod:1314
26084 msgid "get-e2label"
26089 #: ../fish/guestfish-actions.pod:1316
26092 " get-e2label device\n"
26098 #: ../fish/guestfish-actions.pod:1328
26104 #: ../fish/guestfish-actions.pod:1330
26107 " get-e2uuid device\n"
26113 #: ../fish/guestfish-actions.pod:1342
26114 msgid "get-memsize"
26119 #: ../fish/guestfish-actions.pod:1344
26128 #: ../fish/guestfish-actions.pod:1349
26130 "If L</set-memsize> was not called on this handle, and if "
26131 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
26132 "value for memsize."
26137 #: ../fish/guestfish-actions.pod:1356
26138 msgid "get-network"
26143 #: ../fish/guestfish-actions.pod:1358
26152 #: ../fish/guestfish-actions.pod:1362
26158 #: ../fish/guestfish-actions.pod:1364
26167 #: ../fish/guestfish-actions.pod:1371
26173 #: ../fish/guestfish-actions.pod:1373
26179 #: ../fish/guestfish-actions.pod:1375
26188 #: ../fish/guestfish-actions.pod:1382
26194 #: ../fish/guestfish-actions.pod:1384
26203 #: ../fish/guestfish-actions.pod:1391
26204 msgid "get-recovery-proc"
26209 #: ../fish/guestfish-actions.pod:1393
26212 " get-recovery-proc\n"
26218 #: ../fish/guestfish-actions.pod:1397
26219 msgid "get-selinux"
26224 #: ../fish/guestfish-actions.pod:1399
26233 #: ../fish/guestfish-actions.pod:1401
26235 "This returns the current setting of the selinux flag which is passed to the "
26236 "appliance at boot time. See L</set-selinux>."
26241 #: ../fish/guestfish-actions.pod:1407
26247 #: ../fish/guestfish-actions.pod:1409
26256 #: ../fish/guestfish-actions.pod:1416
26262 #: ../fish/guestfish-actions.pod:1418
26271 #: ../fish/guestfish-actions.pod:1422
26277 #: ../fish/guestfish-actions.pod:1424
26286 #: ../fish/guestfish-actions.pod:1426
26288 "Return the current umask. By default the umask is C<022> unless it has been "
26289 "set by calling L</umask>."
26294 #: ../fish/guestfish-actions.pod:1429
26295 msgid "get-verbose"
26300 #: ../fish/guestfish-actions.pod:1431
26309 #: ../fish/guestfish-actions.pod:1435
26315 #: ../fish/guestfish-actions.pod:1437
26324 #: ../fish/guestfish-actions.pod:1441
26325 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
26330 #: ../fish/guestfish-actions.pod:1444
26336 #: ../fish/guestfish-actions.pod:1446
26339 " getxattr path name\n"
26345 #: ../fish/guestfish-actions.pod:1448
26347 "Get a single extended attribute from file C<path> named C<name>. This call "
26348 "follows symlinks. If you want to lookup an extended attribute for the "
26349 "symlink itself, use L</lgetxattr>."
26354 #: ../fish/guestfish-actions.pod:1452 ../fish/guestfish-actions.pod:2458
26356 "Normally it is better to get all extended attributes from a file in one go "
26357 "by calling L</getxattrs>. However some Linux filesystem implementations are "
26358 "buggy and do not provide a way to list out attributes. For these "
26359 "filesystems (notably ntfs-3g) you have to know the names of the extended "
26360 "attributes you want in advance and call this function."
26365 #: ../fish/guestfish-actions.pod:1462
26366 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
26371 #: ../fish/guestfish-actions.pod:1464
26377 #: ../fish/guestfish-actions.pod:1466
26380 " getxattrs path\n"
26386 #: ../fish/guestfish-actions.pod:1474
26387 msgid "See also: L</lgetxattrs>, L<attr(5)>."
26392 #: ../fish/guestfish-actions.pod:1476
26393 msgid "glob-expand"
26398 #: ../fish/guestfish-actions.pod:1478
26401 " glob-expand pattern\n"
26407 #: ../fish/guestfish-actions.pod:1491
26413 #: ../fish/guestfish-actions.pod:1493
26416 " grep regex path\n"
26422 #: ../fish/guestfish-actions.pod:1501
26428 #: ../fish/guestfish-actions.pod:1503
26431 " grepi regex path\n"
26437 #: ../fish/guestfish-actions.pod:1511
26438 msgid "grub-install"
26443 #: ../fish/guestfish-actions.pod:1513
26446 " grub-install root device\n"
26452 #: ../fish/guestfish-actions.pod:1529
26458 #: ../fish/guestfish-actions.pod:1531
26467 #: ../fish/guestfish-actions.pod:1539
26473 #: ../fish/guestfish-actions.pod:1541
26476 " head-n nrlines path\n"
26482 #: ../fish/guestfish-actions.pod:1554
26488 #: ../fish/guestfish-actions.pod:1556
26497 #: ../fish/guestfish-actions.pod:1564
26503 #: ../fish/guestfish-actions.pod:1566
26506 " initrd-cat initrdpath filename\n"
26512 #: ../fish/guestfish-actions.pod:1578
26513 msgid "See also L</initrd-list>."
26518 #: ../fish/guestfish-actions.pod:1583
26519 msgid "initrd-list"
26524 #: ../fish/guestfish-actions.pod:1585
26527 " initrd-list path\n"
26533 #: ../fish/guestfish-actions.pod:1597
26534 msgid "inotify-add-watch"
26539 #: ../fish/guestfish-actions.pod:1599
26542 " inotify-add-watch path mask\n"
26548 #: ../fish/guestfish-actions.pod:1611
26549 msgid "inotify-close"
26554 #: ../fish/guestfish-actions.pod:1613
26563 #: ../fish/guestfish-actions.pod:1619
26564 msgid "inotify-files"
26569 #: ../fish/guestfish-actions.pod:1621
26578 #: ../fish/guestfish-actions.pod:1623
26580 "This function is a helpful wrapper around L</inotify-read> which just "
26581 "returns a list of pathnames of objects that were touched. The returned "
26582 "pathnames are sorted and deduplicated."
26587 #: ../fish/guestfish-actions.pod:1627
26588 msgid "inotify-init"
26593 #: ../fish/guestfish-actions.pod:1629
26596 " inotify-init maxevents\n"
26602 #: ../fish/guestfish-actions.pod:1635
26604 "C<maxevents> is the maximum number of events which will be queued up between "
26605 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
26606 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
26607 "default was 16384 events. Beyond this limit, the kernel throws away events, "
26608 "but records the fact that it threw them away by setting a flag "
26609 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
26614 #: ../fish/guestfish-actions.pod:1645
26616 "Before any events are generated, you have to add some watches to the "
26617 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
26618 "L</inotify-watch-all>."
26623 #: ../fish/guestfish-actions.pod:1651
26625 "Queued up events should be read periodically by calling L</inotify-read> (or "
26626 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
26627 "If you don't read the events out often enough then you risk the internal "
26628 "queue overflowing."
26633 #: ../fish/guestfish-actions.pod:1658
26635 "The handle should be closed after use by calling L</inotify-close>. This "
26636 "also removes any watches automatically."
26641 #: ../fish/guestfish-actions.pod:1667
26642 msgid "inotify-read"
26647 #: ../fish/guestfish-actions.pod:1669
26656 #: ../fish/guestfish-actions.pod:1682
26657 msgid "inotify-rm-watch"
26662 #: ../fish/guestfish-actions.pod:1684
26665 " inotify-rm-watch wd\n"
26671 #: ../fish/guestfish-actions.pod:1686
26672 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
26677 #: ../fish/guestfish-actions.pod:1689
26678 msgid "inspect-get-arch"
26683 #: ../fish/guestfish-actions.pod:1691
26686 " inspect-get-arch root\n"
26692 #: ../fish/guestfish-actions.pod:1693 ../fish/guestfish-actions.pod:1709
26693 #: ../fish/guestfish-actions.pod:1795 ../fish/guestfish-actions.pod:1831
26694 #: ../fish/guestfish-actions.pod:1849 ../fish/guestfish-actions.pod:1883
26695 #: ../fish/guestfish-actions.pod:1898 ../fish/guestfish-actions.pod:1919
26696 #: ../fish/guestfish-actions.pod:1934 ../fish/guestfish-actions.pod:1967
26697 #: ../fish/guestfish-actions.pod:1989 ../fish/guestfish-actions.pod:2013
26698 #: ../fish/guestfish-actions.pod:2030 ../fish/guestfish-actions.pod:2073
26699 #: ../fish/guestfish-actions.pod:2108 ../fish/guestfish-actions.pod:2124
26700 #: ../fish/guestfish-actions.pod:2140 ../fish/guestfish-actions.pod:2153
26701 #: ../fish/guestfish-actions.pod:2166 ../fish/guestfish-actions.pod:2181
26703 "This function should only be called with a root device string as returned by "
26709 #: ../fish/guestfish-actions.pod:1696
26711 "This returns the architecture of the inspected operating system. The "
26712 "possible return values are listed under L</file-architecture>."
26717 #: ../fish/guestfish-actions.pod:1705
26718 msgid "inspect-get-distro"
26723 #: ../fish/guestfish-actions.pod:1707
26726 " inspect-get-distro root\n"
26731 #: ../fish/guestfish-actions.pod:1791
26732 msgid "inspect-get-drive-mappings"
26736 #: ../fish/guestfish-actions.pod:1793
26739 " inspect-get-drive-mappings root\n"
26744 #: ../fish/guestfish-actions.pod:1823
26746 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
26747 "get-mountpoints>, L</inspect-get-filesystems>."
26752 #: ../fish/guestfish-actions.pod:1827
26753 msgid "inspect-get-filesystems"
26758 #: ../fish/guestfish-actions.pod:1829
26761 " inspect-get-filesystems root\n"
26767 #: ../fish/guestfish-actions.pod:1842
26769 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
26770 "get-mountpoints>."
26774 #: ../fish/guestfish-actions.pod:1845
26775 msgid "inspect-get-format"
26779 #: ../fish/guestfish-actions.pod:1847
26782 " inspect-get-format root\n"
26788 #: ../fish/guestfish-actions.pod:1879
26789 msgid "inspect-get-hostname"
26794 #: ../fish/guestfish-actions.pod:1881
26797 " inspect-get-hostname root\n"
26803 #: ../fish/guestfish-actions.pod:1894
26804 msgid "inspect-get-major-version"
26809 #: ../fish/guestfish-actions.pod:1896
26812 " inspect-get-major-version root\n"
26818 #: ../fish/guestfish-actions.pod:1915
26819 msgid "inspect-get-minor-version"
26824 #: ../fish/guestfish-actions.pod:1917
26827 " inspect-get-minor-version root\n"
26833 #: ../fish/guestfish-actions.pod:1927
26835 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
26836 "get-major-version>."
26841 #: ../fish/guestfish-actions.pod:1930
26842 msgid "inspect-get-mountpoints"
26847 #: ../fish/guestfish-actions.pod:1932
26850 " inspect-get-mountpoints root\n"
26855 #: ../fish/guestfish-actions.pod:1954
26857 "For operating systems like Windows which still use drive letters, this call "
26858 "will only return an entry for the first drive \"mounted on\" C</>. For "
26859 "information about the mapping of drive letters to partitions, see L</inspect-"
26860 "get-drive-mappings>."
26865 #: ../fish/guestfish-actions.pod:1960
26867 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
26868 "get-filesystems>."
26873 #: ../fish/guestfish-actions.pod:1963
26874 msgid "inspect-get-package-format"
26879 #: ../fish/guestfish-actions.pod:1965
26882 " inspect-get-package-format root\n"
26888 #: ../fish/guestfish-actions.pod:1970
26890 "This function and L</inspect-get-package-management> return the package "
26891 "format and package management tool used by the inspected operating system. "
26892 "For example for Fedora these functions would return C<rpm> (package format) "
26893 "and C<yum> (package management)."
26898 #: ../fish/guestfish-actions.pod:1985
26899 msgid "inspect-get-package-management"
26904 #: ../fish/guestfish-actions.pod:1987
26907 " inspect-get-package-management root\n"
26913 #: ../fish/guestfish-actions.pod:1992
26915 "L</inspect-get-package-format> and this function return the package format "
26916 "and package management tool used by the inspected operating system. For "
26917 "example for Fedora these functions would return C<rpm> (package format) and "
26918 "C<yum> (package management)."
26923 #: ../fish/guestfish-actions.pod:2009
26924 msgid "inspect-get-product-name"
26929 #: ../fish/guestfish-actions.pod:2011
26932 " inspect-get-product-name root\n"
26937 #: ../fish/guestfish-actions.pod:2026
26938 msgid "inspect-get-product-variant"
26942 #: ../fish/guestfish-actions.pod:2028
26945 " inspect-get-product-variant root\n"
26950 #: ../fish/guestfish-actions.pod:2052
26952 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
26953 "get-product-name>, L</inspect-get-major-version>."
26958 #: ../fish/guestfish-actions.pod:2056
26959 msgid "inspect-get-roots"
26964 #: ../fish/guestfish-actions.pod:2058
26967 " inspect-get-roots\n"
26973 #: ../fish/guestfish-actions.pod:2060
26975 "This function is a convenient way to get the list of root devices, as "
26976 "returned from a previous call to L</inspect-os>, but without redoing the "
26977 "whole inspection process."
26982 #: ../fish/guestfish-actions.pod:2064
26984 "This returns an empty list if either no root devices were found or the "
26985 "caller has not called L</inspect-os>."
26990 #: ../fish/guestfish-actions.pod:2069
26991 msgid "inspect-get-type"
26996 #: ../fish/guestfish-actions.pod:2071
26999 " inspect-get-type root\n"
27004 #: ../fish/guestfish-actions.pod:2104
27005 msgid "inspect-get-windows-current-control-set"
27009 #: ../fish/guestfish-actions.pod:2106
27012 " inspect-get-windows-current-control-set root\n"
27018 #: ../fish/guestfish-actions.pod:2120
27019 msgid "inspect-get-windows-systemroot"
27024 #: ../fish/guestfish-actions.pod:2122
27027 " inspect-get-windows-systemroot root\n"
27032 #: ../fish/guestfish-actions.pod:2136
27033 msgid "inspect-is-live"
27037 #: ../fish/guestfish-actions.pod:2138
27040 " inspect-is-live root\n"
27045 #: ../fish/guestfish-actions.pod:2143
27047 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
27048 "then this returns true if a live image was detected on the disk."
27052 #: ../fish/guestfish-actions.pod:2149
27053 msgid "inspect-is-multipart"
27057 #: ../fish/guestfish-actions.pod:2151
27060 " inspect-is-multipart root\n"
27065 #: ../fish/guestfish-actions.pod:2156
27067 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
27068 "then this returns true if the disk is part of a set."
27072 #: ../fish/guestfish-actions.pod:2162
27073 msgid "inspect-is-netinst"
27077 #: ../fish/guestfish-actions.pod:2164
27080 " inspect-is-netinst root\n"
27085 #: ../fish/guestfish-actions.pod:2169
27087 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
27088 "then this returns true if the disk is a network installer, ie. not a self-"
27089 "contained install CD but one which is likely to require network access to "
27090 "complete the install."
27095 #: ../fish/guestfish-actions.pod:2177
27096 msgid "inspect-list-applications"
27101 #: ../fish/guestfish-actions.pod:2179
27104 " inspect-list-applications root\n"
27110 #: ../fish/guestfish-actions.pod:2186
27112 "I<Note:> This call works differently from other parts of the inspection "
27113 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
27114 "then mount up the disks, before calling this. Listing applications is a "
27115 "significantly more difficult operation which requires access to the full "
27116 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
27117 "are just returning data cached in the libguestfs handle, this call actually "
27118 "reads parts of the mounted filesystems during the call."
27123 #: ../fish/guestfish-actions.pod:2276
27129 #: ../fish/guestfish-actions.pod:2278
27138 #: ../fish/guestfish-actions.pod:2293
27140 "You can pass the root string(s) returned to other L</inspect-get-*> "
27141 "functions in order to query further information about each operating system, "
27142 "such as the name and version."
27147 #: ../fish/guestfish-actions.pod:2298
27149 "This function uses other libguestfs features such as L</mount-ro> and L</"
27150 "umount-all> in order to mount and unmount filesystems and look at the "
27151 "contents. This should be called with no disks currently mounted. The "
27152 "function may also use Augeas, so any existing Augeas handle will be closed."
27157 #: ../fish/guestfish-actions.pod:2310 ../fish/guestfish-actions.pod:2486
27158 #: ../fish/guestfish-actions.pod:2532
27159 msgid "See also L</list-filesystems>."
27164 #: ../fish/guestfish-actions.pod:2312
27165 msgid "is-blockdev"
27170 #: ../fish/guestfish-actions.pod:2314
27173 " is-blockdev path\n"
27179 #: ../fish/guestfish-actions.pod:2319 ../fish/guestfish-actions.pod:2337
27180 #: ../fish/guestfish-actions.pod:2356 ../fish/guestfish-actions.pod:2365
27181 #: ../fish/guestfish-actions.pod:2375 ../fish/guestfish-actions.pod:2409
27182 #: ../fish/guestfish-actions.pod:2418
27183 msgid "See also L</stat>."
27188 #: ../fish/guestfish-actions.pod:2321
27194 #: ../fish/guestfish-actions.pod:2323
27203 #: ../fish/guestfish-actions.pod:2330
27209 #: ../fish/guestfish-actions.pod:2332
27212 " is-chardev path\n"
27218 #: ../fish/guestfish-actions.pod:2339
27224 #: ../fish/guestfish-actions.pod:2341
27233 #: ../fish/guestfish-actions.pod:2348
27239 #: ../fish/guestfish-actions.pod:2350
27248 #: ../fish/guestfish-actions.pod:2358
27254 #: ../fish/guestfish-actions.pod:2360
27263 #: ../fish/guestfish-actions.pod:2367
27269 #: ../fish/guestfish-actions.pod:2369
27278 #: ../fish/guestfish-actions.pod:2377
27279 msgid "is-launching"
27284 #: ../fish/guestfish-actions.pod:2379
27293 #: ../fish/guestfish-actions.pod:2386
27299 #: ../fish/guestfish-actions.pod:2388
27308 #: ../fish/guestfish-actions.pod:2393
27314 #: ../fish/guestfish-actions.pod:2395
27323 #: ../fish/guestfish-actions.pod:2402
27329 #: ../fish/guestfish-actions.pod:2404
27332 " is-socket path\n"
27338 #: ../fish/guestfish-actions.pod:2411
27344 #: ../fish/guestfish-actions.pod:2413
27347 " is-symlink path\n"
27353 #: ../fish/guestfish-actions.pod:2420
27354 msgid "kill-subprocess"
27359 #: ../fish/guestfish-actions.pod:2422
27362 " kill-subprocess\n"
27368 #: ../fish/guestfish-actions.pod:2426
27374 #: ../fish/guestfish-actions.pod:2428
27380 #: ../fish/guestfish-actions.pod:2430
27389 #: ../fish/guestfish-actions.pod:2438
27395 #: ../fish/guestfish-actions.pod:2440
27398 " lchown owner group path\n"
27404 #: ../fish/guestfish-actions.pod:2442
27406 "Change the file owner to C<owner> and group to C<group>. This is like L</"
27407 "chown> but if C<path> is a symlink then the link itself is changed, not the "
27413 #: ../fish/guestfish-actions.pod:2450
27419 #: ../fish/guestfish-actions.pod:2452
27422 " lgetxattr path name\n"
27428 #: ../fish/guestfish-actions.pod:2468
27429 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
27434 #: ../fish/guestfish-actions.pod:2470
27440 #: ../fish/guestfish-actions.pod:2472
27443 " lgetxattrs path\n"
27449 #: ../fish/guestfish-actions.pod:2474
27451 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
27452 "it returns the extended attributes of the link itself."
27457 #: ../fish/guestfish-actions.pod:2478
27458 msgid "list-devices"
27463 #: ../fish/guestfish-actions.pod:2480
27472 #: ../fish/guestfish-actions.pod:2488
27473 msgid "list-filesystems"
27478 #: ../fish/guestfish-actions.pod:2490
27481 " list-filesystems\n"
27487 #: ../fish/guestfish-actions.pod:2509
27489 "This command runs other libguestfs commands, which might include L</mount> "
27490 "and L</umount>, and therefore you should use this soon after launch and only "
27491 "when nothing is mounted."
27496 #: ../fish/guestfish-actions.pod:2513
27498 "Not all of the filesystems returned will be mountable. In particular, swap "
27499 "partitions are returned in the list. Also this command does not check that "
27500 "each filesystem found is valid and mountable, and some filesystems might be "
27501 "mountable but require special options. Filesystems may not all belong to a "
27502 "single logical operating system (use L</inspect-os> to look for OSes)."
27507 #: ../fish/guestfish-actions.pod:2521
27508 msgid "list-partitions"
27513 #: ../fish/guestfish-actions.pod:2523
27516 " list-partitions\n"
27522 #: ../fish/guestfish-actions.pod:2529
27524 "This does not return logical volumes. For that you will need to call L</"
27530 #: ../fish/guestfish-actions.pod:2534
27536 #: ../fish/guestfish-actions.pod:2536
27545 #: ../fish/guestfish-actions.pod:2544
27551 #: ../fish/guestfish-actions.pod:2546
27554 " ln target linkname\n"
27560 #: ../fish/guestfish-actions.pod:2550
27566 #: ../fish/guestfish-actions.pod:2552
27569 " ln-f target linkname\n"
27575 #: ../fish/guestfish-actions.pod:2557
27581 #: ../fish/guestfish-actions.pod:2559
27584 " ln-s target linkname\n"
27590 #: ../fish/guestfish-actions.pod:2563
27596 #: ../fish/guestfish-actions.pod:2565
27599 " ln-sf target linkname\n"
27605 #: ../fish/guestfish-actions.pod:2570
27606 msgid "lremovexattr"
27611 #: ../fish/guestfish-actions.pod:2572
27614 " lremovexattr xattr path\n"
27620 #: ../fish/guestfish-actions.pod:2574
27622 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
27623 "it removes an extended attribute of the link itself."
27628 #: ../fish/guestfish-actions.pod:2578
27634 #: ../fish/guestfish-actions.pod:2580
27643 #: ../fish/guestfish-actions.pod:2586
27645 "This command is mostly useful for interactive sessions. Programs should "
27646 "probably use L</readdir> instead."
27651 #: ../fish/guestfish-actions.pod:2589
27657 #: ../fish/guestfish-actions.pod:2591
27660 " lsetxattr xattr val vallen path\n"
27666 #: ../fish/guestfish-actions.pod:2593
27668 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
27669 "sets an extended attribute of the link itself."
27674 #: ../fish/guestfish-actions.pod:2597
27680 #: ../fish/guestfish-actions.pod:2599
27689 #: ../fish/guestfish-actions.pod:2603
27691 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
27692 "the link is stat-ed, not the file it refers to."
27697 #: ../fish/guestfish-actions.pod:2609
27703 #: ../fish/guestfish-actions.pod:2611
27706 " lstatlist path 'names ...'\n"
27712 #: ../fish/guestfish-actions.pod:2613
27714 "This call allows you to perform the L</lstat> operation on multiple files, "
27715 "where all files are in the directory C<path>. C<names> is the list of files "
27716 "from this directory."
27721 #: ../fish/guestfish-actions.pod:2622
27723 "This call is intended for programs that want to efficiently list a directory "
27724 "contents without making many round-trips. See also L</lxattrlist> for a "
27725 "similarly efficient call for getting extended attributes. Very long "
27726 "directory listings might cause the protocol message size to be exceeded, "
27727 "causing this call to fail. The caller must split up such requests into "
27728 "smaller groups of names."
27733 #: ../fish/guestfish-actions.pod:2630
27734 msgid "luks-add-key"
27739 #: ../fish/guestfish-actions.pod:2632
27742 " luks-add-key device keyslot\n"
27748 #: ../fish/guestfish-actions.pod:2639
27750 "Note that if C<keyslot> already contains a key, then this command will "
27751 "fail. You have to use L</luks-kill-slot> first to remove that key."
27756 #: ../fish/guestfish-actions.pod:2643 ../fish/guestfish-actions.pod:2665
27757 #: ../fish/guestfish-actions.pod:2678 ../fish/guestfish-actions.pod:2692
27758 #: ../fish/guestfish-actions.pod:2715 ../fish/guestfish-actions.pod:2725
27760 "This command has one or more key or passphrase parameters. Guestfish will "
27761 "prompt for these separately."
27766 #: ../fish/guestfish-actions.pod:2646
27772 #: ../fish/guestfish-actions.pod:2648
27775 " luks-close device\n"
27781 #: ../fish/guestfish-actions.pod:2650
27783 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
27784 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
27785 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
27791 #: ../fish/guestfish-actions.pod:2656
27792 msgid "luks-format"
27797 #: ../fish/guestfish-actions.pod:2658
27800 " luks-format device keyslot\n"
27806 #: ../fish/guestfish-actions.pod:2671
27807 msgid "luks-format-cipher"
27812 #: ../fish/guestfish-actions.pod:2673
27815 " luks-format-cipher device keyslot cipher\n"
27821 #: ../fish/guestfish-actions.pod:2675
27823 "This command is the same as L</luks-format> but it also allows you to set "
27824 "the C<cipher> used."
27829 #: ../fish/guestfish-actions.pod:2684
27830 msgid "luks-kill-slot"
27835 #: ../fish/guestfish-actions.pod:2686
27838 " luks-kill-slot device keyslot\n"
27844 #: ../fish/guestfish-actions.pod:2695
27850 #: ../fish/guestfish-actions.pod:2697
27853 " luks-open device mapname\n"
27859 #: ../fish/guestfish-actions.pod:2711
27861 "If this block device contains LVM volume groups, then calling L</vgscan> "
27862 "followed by L</vg-activate-all> will make them visible."
27867 #: ../fish/guestfish-actions.pod:2718
27868 msgid "luks-open-ro"
27873 #: ../fish/guestfish-actions.pod:2720
27876 " luks-open-ro device mapname\n"
27882 #: ../fish/guestfish-actions.pod:2722
27884 "This is the same as L</luks-open> except that a read-only mapping is created."
27889 #: ../fish/guestfish-actions.pod:2728
27895 #: ../fish/guestfish-actions.pod:2730
27898 " lvcreate logvol volgroup mbytes\n"
27904 #: ../fish/guestfish-actions.pod:2735
27905 msgid "lvm-canonical-lv-name"
27910 #: ../fish/guestfish-actions.pod:2737
27913 " lvm-canonical-lv-name lvname\n"
27919 #: ../fish/guestfish-actions.pod:2746
27920 msgid "See also L</is-lv>."
27925 #: ../fish/guestfish-actions.pod:2748
27926 msgid "lvm-clear-filter"
27931 #: ../fish/guestfish-actions.pod:2750
27934 " lvm-clear-filter\n"
27940 #: ../fish/guestfish-actions.pod:2752
27942 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
27948 #: ../fish/guestfish-actions.pod:2758
27949 msgid "lvm-remove-all"
27954 #: ../fish/guestfish-actions.pod:2760
27957 " lvm-remove-all\n"
27963 #: ../fish/guestfish-actions.pod:2768
27964 msgid "lvm-set-filter"
27969 #: ../fish/guestfish-actions.pod:2770
27972 " lvm-set-filter 'devices ...'\n"
27978 #: ../fish/guestfish-actions.pod:2795
27984 #: ../fish/guestfish-actions.pod:2797
27987 " lvremove device\n"
27993 #: ../fish/guestfish-actions.pod:2805
27999 #: ../fish/guestfish-actions.pod:2807
28002 " lvrename logvol newlogvol\n"
28008 #: ../fish/guestfish-actions.pod:2811
28014 #: ../fish/guestfish-actions.pod:2813
28017 " lvresize device mbytes\n"
28023 #: ../fish/guestfish-actions.pod:2819
28024 msgid "lvresize-free"
28029 #: ../fish/guestfish-actions.pod:2821
28032 " lvresize-free lv percent\n"
28038 #: ../fish/guestfish-actions.pod:2829
28044 #: ../fish/guestfish-actions.pod:2831
28053 #: ../fish/guestfish-actions.pod:2839
28054 msgid "See also L</lvs-full>, L</list-filesystems>."
28059 #: ../fish/guestfish-actions.pod:2841
28065 #: ../fish/guestfish-actions.pod:2843
28074 #: ../fish/guestfish-actions.pod:2848
28080 #: ../fish/guestfish-actions.pod:2850
28089 #: ../fish/guestfish-actions.pod:2854
28095 #: ../fish/guestfish-actions.pod:2856
28098 " lxattrlist path 'names ...'\n"
28104 #: ../fish/guestfish-actions.pod:2872
28106 "This call is intended for programs that want to efficiently list a directory "
28107 "contents without making many round-trips. See also L</lstatlist> for a "
28108 "similarly efficient call for getting standard stats. Very long directory "
28109 "listings might cause the protocol message size to be exceeded, causing this "
28110 "call to fail. The caller must split up such requests into smaller groups of "
28116 #: ../fish/guestfish-actions.pod:2880
28122 #: ../fish/guestfish-actions.pod:2882
28131 #: ../fish/guestfish-actions.pod:2886
28137 #: ../fish/guestfish-actions.pod:2888
28140 " mkdir-mode path mode\n"
28146 #: ../fish/guestfish-actions.pod:2897
28147 msgid "See also L</mkdir>, L</umask>"
28152 #: ../fish/guestfish-actions.pod:2899
28158 #: ../fish/guestfish-actions.pod:2901
28167 #: ../fish/guestfish-actions.pod:2906
28173 #: ../fish/guestfish-actions.pod:2908
28176 " mkdtemp template\n"
28182 #: ../fish/guestfish-actions.pod:2929
28188 #: ../fish/guestfish-actions.pod:2931
28191 " mke2fs-J fstype blocksize device journal\n"
28197 #: ../fish/guestfish-actions.pod:2939
28198 msgid "See also L</mke2journal>."
28203 #: ../fish/guestfish-actions.pod:2941
28209 #: ../fish/guestfish-actions.pod:2943
28212 " mke2fs-JL fstype blocksize device label\n"
28218 #: ../fish/guestfish-actions.pod:2948
28219 msgid "See also L</mke2journal-L>."
28224 #: ../fish/guestfish-actions.pod:2950
28230 #: ../fish/guestfish-actions.pod:2952
28233 " mke2fs-JU fstype blocksize device uuid\n"
28239 #: ../fish/guestfish-actions.pod:2957
28240 msgid "See also L</mke2journal-U>."
28245 #: ../fish/guestfish-actions.pod:2959
28246 msgid "mke2journal"
28251 #: ../fish/guestfish-actions.pod:2961
28254 " mke2journal blocksize device\n"
28260 #: ../fish/guestfish-actions.pod:2968
28261 msgid "mke2journal-L"
28266 #: ../fish/guestfish-actions.pod:2970
28269 " mke2journal-L blocksize label device\n"
28275 #: ../fish/guestfish-actions.pod:2974
28276 msgid "mke2journal-U"
28281 #: ../fish/guestfish-actions.pod:2976
28284 " mke2journal-U blocksize uuid device\n"
28290 #: ../fish/guestfish-actions.pod:2980
28296 #: ../fish/guestfish-actions.pod:2982
28299 " mkfifo mode path\n"
28305 #: ../fish/guestfish-actions.pod:2984
28307 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
28308 "is just a convenient wrapper around L</mknod>."
28313 #: ../fish/guestfish-actions.pod:2990
28319 #: ../fish/guestfish-actions.pod:2992
28322 " mkfs fstype device\n"
28328 #: ../fish/guestfish-actions.pod:2998
28334 #: ../fish/guestfish-actions.pod:3000
28337 " mkfs-b fstype blocksize device\n"
28343 #: ../fish/guestfish-actions.pod:3002
28345 "This call is similar to L</mkfs>, but it allows you to control the block "
28346 "size of the resulting filesystem. Supported block sizes depend on the "
28347 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
28352 #: ../fish/guestfish-actions.pod:3017
28357 #: ../fish/guestfish-actions.pod:3019
28360 " mkfs-opts fstype device [blocksize:..] [features:..]\n"
28366 #: ../fish/guestfish-actions.pod:3054
28367 msgid "mkmountpoint"
28372 #: ../fish/guestfish-actions.pod:3056
28375 " mkmountpoint exemptpath\n"
28381 #: ../fish/guestfish-actions.pod:3058
28383 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
28384 "to create extra mountpoints before mounting the first filesystem."
28389 #: ../fish/guestfish-actions.pod:3082
28391 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
28392 "unexpected errors if you try to mix these calls. It is safest to manually "
28393 "unmount filesystems and remove mountpoints after use."
28398 #: ../fish/guestfish-actions.pod:3086
28400 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
28401 "for this to work for manual mountpoints, you must ensure that the innermost "
28402 "mountpoints have the longest pathnames, as in the example code above."
28406 #: ../fish/guestfish-actions.pod:3093
28408 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
28409 "L</umount-all> to be called when the handle is closed which can also trigger "
28415 #: ../fish/guestfish-actions.pod:3097
28421 #: ../fish/guestfish-actions.pod:3099
28424 " mknod mode devmajor devminor path\n"
28430 #: ../fish/guestfish-actions.pod:3109
28432 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
28433 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
28434 "regular file). These constants are available in the standard Linux header "
28435 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
28436 "wrappers around this command which bitwise OR in the appropriate constant "
28442 #: ../fish/guestfish-actions.pod:3119
28448 #: ../fish/guestfish-actions.pod:3121
28451 " mknod-b mode devmajor devminor path\n"
28457 #: ../fish/guestfish-actions.pod:3123
28459 "This call creates a block device node called C<path> with mode C<mode> and "
28460 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
28461 "wrapper around L</mknod>."
28466 #: ../fish/guestfish-actions.pod:3129
28472 #: ../fish/guestfish-actions.pod:3131
28475 " mknod-c mode devmajor devminor path\n"
28481 #: ../fish/guestfish-actions.pod:3133
28483 "This call creates a char device node called C<path> with mode C<mode> and "
28484 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
28485 "wrapper around L</mknod>."
28490 #: ../fish/guestfish-actions.pod:3139
28496 #: ../fish/guestfish-actions.pod:3141
28505 #: ../fish/guestfish-actions.pod:3145
28511 #: ../fish/guestfish-actions.pod:3147
28514 " mkswap-L label device\n"
28520 #: ../fish/guestfish-actions.pod:3155
28526 #: ../fish/guestfish-actions.pod:3157
28529 " mkswap-U uuid device\n"
28535 #: ../fish/guestfish-actions.pod:3161
28536 msgid "mkswap-file"
28541 #: ../fish/guestfish-actions.pod:3163
28544 " mkswap-file path\n"
28550 #: ../fish/guestfish-actions.pod:3167
28552 "This command just writes a swap file signature to an existing file. To "
28553 "create the file itself, use something like L</fallocate>."
28558 #: ../fish/guestfish-actions.pod:3170
28564 #: ../fish/guestfish-actions.pod:3172
28567 " modprobe modulename\n"
28573 #: ../fish/guestfish-actions.pod:3179
28579 #: ../fish/guestfish-actions.pod:3181
28582 " mount device mountpoint\n"
28588 #: ../fish/guestfish-actions.pod:3197
28590 "B<Important note:> When you use this call, the filesystem options C<sync> "
28591 "and C<noatime> are set implicitly. This was originally done because we "
28592 "thought it would improve reliability, but it turns out that I<-o sync> has a "
28593 "very large negative performance impact and negligible effect on "
28594 "reliability. Therefore we recommend that you avoid using L</mount> in any "
28595 "code that needs performance, and instead use L</mount-options> (use an empty "
28596 "string for the first parameter if you don't want any options)."
28601 #: ../fish/guestfish-actions.pod:3207
28607 #: ../fish/guestfish-actions.pod:3209
28610 " mount-loop file mountpoint\n"
28616 #: ../fish/guestfish-actions.pod:3215
28617 msgid "mount-options"
28622 #: ../fish/guestfish-actions.pod:3217
28625 " mount-options options device mountpoint\n"
28631 #: ../fish/guestfish-actions.pod:3219
28633 "This is the same as the L</mount> command, but it allows you to set the "
28634 "mount options as for the L<mount(8)> I<-o> flag."
28639 #: ../fish/guestfish-actions.pod:3227
28645 #: ../fish/guestfish-actions.pod:3229
28648 " mount-ro device mountpoint\n"
28654 #: ../fish/guestfish-actions.pod:3231
28656 "This is the same as the L</mount> command, but it mounts the filesystem with "
28657 "the read-only (I<-o ro>) flag."
28662 #: ../fish/guestfish-actions.pod:3234
28668 #: ../fish/guestfish-actions.pod:3236
28671 " mount-vfs options vfstype device mountpoint\n"
28677 #: ../fish/guestfish-actions.pod:3238
28679 "This is the same as the L</mount> command, but it allows you to set both the "
28680 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
28685 #: ../fish/guestfish-actions.pod:3242
28686 msgid "mountpoints"
28691 #: ../fish/guestfish-actions.pod:3244
28700 #: ../fish/guestfish-actions.pod:3246
28702 "This call is similar to L</mounts>. That call returns a list of devices. "
28703 "This one returns a hash table (map) of device name to directory where the "
28704 "device is mounted."
28709 #: ../fish/guestfish-actions.pod:3250
28715 #: ../fish/guestfish-actions.pod:3252
28724 #: ../fish/guestfish-actions.pod:3259
28725 msgid "See also: L</mountpoints>"
28730 #: ../fish/guestfish-actions.pod:3261
28736 #: ../fish/guestfish-actions.pod:3263
28745 #: ../fish/guestfish-actions.pod:3268
28746 msgid "ntfs-3g-probe"
28751 #: ../fish/guestfish-actions.pod:3270
28754 " ntfs-3g-probe true|false device\n"
28760 #: ../fish/guestfish-actions.pod:3284
28766 #: ../fish/guestfish-actions.pod:3286
28769 " ntfsresize device\n"
28775 #: ../fish/guestfish-actions.pod:3292
28776 msgid "ntfsresize-size"
28781 #: ../fish/guestfish-actions.pod:3294
28784 " ntfsresize-size device size\n"
28790 #: ../fish/guestfish-actions.pod:3296
28792 "This command is the same as L</ntfsresize> except that it allows you to "
28793 "specify the new size (in bytes) explicitly."
28798 #: ../fish/guestfish-actions.pod:3299
28804 #: ../fish/guestfish-actions.pod:3301
28807 " part-add device prlogex startsect endsect\n"
28813 #: ../fish/guestfish-actions.pod:3303
28815 "This command adds a partition to C<device>. If there is no partition table "
28816 "on the device, call L</part-init> first."
28821 #: ../fish/guestfish-actions.pod:3315
28823 "Creating a partition which covers the whole disk is not so easy. Use L</"
28824 "part-disk> to do that."
28829 #: ../fish/guestfish-actions.pod:3318
28835 #: ../fish/guestfish-actions.pod:3320
28838 " part-del device partnum\n"
28844 #: ../fish/guestfish-actions.pod:3328
28850 #: ../fish/guestfish-actions.pod:3330
28853 " part-disk device parttype\n"
28859 #: ../fish/guestfish-actions.pod:3332
28861 "This command is simply a combination of L</part-init> followed by L</part-"
28862 "add> to create a single primary partition covering the whole disk."
28867 #: ../fish/guestfish-actions.pod:3336
28869 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
28870 "possible values are described in L</part-init>."
28875 #: ../fish/guestfish-actions.pod:3342
28876 msgid "part-get-bootable"
28881 #: ../fish/guestfish-actions.pod:3344
28884 " part-get-bootable device partnum\n"
28890 #: ../fish/guestfish-actions.pod:3349
28891 msgid "See also L</part-set-bootable>."
28896 #: ../fish/guestfish-actions.pod:3351
28897 msgid "part-get-mbr-id"
28902 #: ../fish/guestfish-actions.pod:3353
28905 " part-get-mbr-id device partnum\n"
28911 #: ../fish/guestfish-actions.pod:3358 ../fish/guestfish-actions.pod:3496
28913 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
28914 "undefined results for other partition table types (see L</part-get-"
28920 #: ../fish/guestfish-actions.pod:3362
28921 msgid "part-get-parttype"
28926 #: ../fish/guestfish-actions.pod:3364
28929 " part-get-parttype device\n"
28935 #: ../fish/guestfish-actions.pod:3369
28937 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
28938 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
28939 "possible, although unusual. See L</part-init> for a full list."
28944 #: ../fish/guestfish-actions.pod:3374
28950 #: ../fish/guestfish-actions.pod:3376
28953 " part-init device parttype\n"
28959 #: ../fish/guestfish-actions.pod:3382
28961 "Initially there are no partitions. Following this, you should call L</part-"
28962 "add> for each partition required."
28967 #: ../fish/guestfish-actions.pod:3445
28973 #: ../fish/guestfish-actions.pod:3447
28976 " part-list device\n"
28982 #: ../fish/guestfish-actions.pod:3462
28984 "Start of the partition I<in bytes>. To get sectors you have to divide by "
28985 "the device's sector size, see L</blockdev-getss>."
28990 #: ../fish/guestfish-actions.pod:3475
28991 msgid "part-set-bootable"
28996 #: ../fish/guestfish-actions.pod:3477
28999 " part-set-bootable device partnum true|false\n"
29005 #: ../fish/guestfish-actions.pod:3486
29006 msgid "part-set-mbr-id"
29011 #: ../fish/guestfish-actions.pod:3488
29014 " part-set-mbr-id device partnum idbyte\n"
29020 #: ../fish/guestfish-actions.pod:3500
29021 msgid "part-set-name"
29026 #: ../fish/guestfish-actions.pod:3502
29029 " part-set-name device partnum name\n"
29035 #: ../fish/guestfish-actions.pod:3510
29036 msgid "part-to-dev"
29041 #: ../fish/guestfish-actions.pod:3512
29044 " part-to-dev partition\n"
29050 #: ../fish/guestfish-actions.pod:3518
29052 "The named partition must exist, for example as a string returned from L</"
29053 "list-partitions>."
29058 #: ../fish/guestfish-actions.pod:3521
29059 msgid "ping-daemon"
29064 #: ../fish/guestfish-actions.pod:3523
29073 #: ../fish/guestfish-actions.pod:3530
29079 #: ../fish/guestfish-actions.pod:3532
29082 " pread path count offset\n"
29088 #: ../fish/guestfish-actions.pod:3540
29089 msgid "See also L</pwrite>, L</pread-device>."
29094 #: ../fish/guestfish-actions.pod:3545
29095 msgid "pread-device"
29100 #: ../fish/guestfish-actions.pod:3547
29103 " pread-device device count offset\n"
29109 #: ../fish/guestfish-actions.pod:3555
29110 msgid "See also L</pread>."
29115 #: ../fish/guestfish-actions.pod:3560
29121 #: ../fish/guestfish-actions.pod:3562
29124 " pvcreate device\n"
29130 #: ../fish/guestfish-actions.pod:3568
29136 #: ../fish/guestfish-actions.pod:3570
29139 " pvremove device\n"
29145 #: ../fish/guestfish-actions.pod:3579
29151 #: ../fish/guestfish-actions.pod:3581
29154 " pvresize device\n"
29160 #: ../fish/guestfish-actions.pod:3586
29161 msgid "pvresize-size"
29166 #: ../fish/guestfish-actions.pod:3588
29169 " pvresize-size device size\n"
29175 #: ../fish/guestfish-actions.pod:3590
29177 "This command is the same as L</pvresize> except that it allows you to "
29178 "specify the new size (in bytes) explicitly."
29183 #: ../fish/guestfish-actions.pod:3593
29189 #: ../fish/guestfish-actions.pod:3595
29198 #: ../fish/guestfish-actions.pod:3603
29199 msgid "See also L</pvs-full>."
29204 #: ../fish/guestfish-actions.pod:3605
29210 #: ../fish/guestfish-actions.pod:3607
29219 #: ../fish/guestfish-actions.pod:3612
29225 #: ../fish/guestfish-actions.pod:3614
29234 #: ../fish/guestfish-actions.pod:3618
29240 #: ../fish/guestfish-actions.pod:3620
29243 " pwrite path content offset\n"
29249 #: ../fish/guestfish-actions.pod:3631
29250 msgid "See also L</pread>, L</pwrite-device>."
29255 #: ../fish/guestfish-actions.pod:3636
29256 msgid "pwrite-device"
29261 #: ../fish/guestfish-actions.pod:3638
29264 " pwrite-device device content offset\n"
29270 #: ../fish/guestfish-actions.pod:3648
29271 msgid "See also L</pwrite>."
29276 #: ../fish/guestfish-actions.pod:3653
29282 #: ../fish/guestfish-actions.pod:3655
29285 " read-file path\n"
29291 #: ../fish/guestfish-actions.pod:3660
29293 "Unlike L</cat>, this function can correctly handle files that contain "
29294 "embedded ASCII NUL characters. However unlike L</download>, this function "
29295 "is limited in the total size of file that can be handled."
29300 #: ../fish/guestfish-actions.pod:3668
29306 #: ../fish/guestfish-actions.pod:3670
29309 " read-lines path\n"
29315 #: ../fish/guestfish-actions.pod:3677
29317 "Note that this function cannot correctly handle binary files (specifically, "
29318 "files containing C<\\0> character which is treated as end of line). For "
29319 "those you need to use the L</read-file> function which has a more complex "
29325 #: ../fish/guestfish-actions.pod:3682
29331 #: ../fish/guestfish-actions.pod:3684
29340 #: ../fish/guestfish-actions.pod:3736
29342 "This function is primarily intended for use by programs. To get a simple "
29343 "list of names, use L</ls>. To get a printable directory for human "
29344 "consumption, use L</ll>."
29349 #: ../fish/guestfish-actions.pod:3740
29355 #: ../fish/guestfish-actions.pod:3742
29364 #: ../fish/guestfish-actions.pod:3746
29365 msgid "readlinklist"
29370 #: ../fish/guestfish-actions.pod:3748
29373 " readlinklist path 'names ...'\n"
29379 #: ../fish/guestfish-actions.pod:3772
29385 #: ../fish/guestfish-actions.pod:3774
29394 #: ../fish/guestfish-actions.pod:3779
29395 msgid "removexattr"
29400 #: ../fish/guestfish-actions.pod:3781
29403 " removexattr xattr path\n"
29409 #: ../fish/guestfish-actions.pod:3786
29410 msgid "See also: L</lremovexattr>, L<attr(5)>."
29415 #: ../fish/guestfish-actions.pod:3788
29421 #: ../fish/guestfish-actions.pod:3790
29424 " resize2fs device\n"
29430 #: ../fish/guestfish-actions.pod:3795
29432 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
29433 "before calling this command. For unknown reasons C<resize2fs> sometimes "
29434 "gives an error about this and sometimes not. In any case, it is always safe "
29435 "to call L</e2fsck-f> before calling this function."
29439 #: ../fish/guestfish-actions.pod:3801
29440 msgid "resize2fs-M"
29444 #: ../fish/guestfish-actions.pod:3803
29447 " resize2fs-M device\n"
29452 #: ../fish/guestfish-actions.pod:3805
29454 "This command is the same as L</resize2fs>, but the filesystem is resized to "
29455 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
29460 #: ../fish/guestfish-actions.pod:3809
29462 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
29463 "and read the C<Block size> and C<Block count> values. These two numbers, "
29464 "multiplied together, give the resulting size of the minimal filesystem in "
29470 #: ../fish/guestfish-actions.pod:3814
29471 msgid "resize2fs-size"
29476 #: ../fish/guestfish-actions.pod:3816
29479 " resize2fs-size device size\n"
29485 #: ../fish/guestfish-actions.pod:3818
29487 "This command is the same as L</resize2fs> except that it allows you to "
29488 "specify the new size (in bytes) explicitly."
29493 #: ../fish/guestfish-actions.pod:3821
29499 #: ../fish/guestfish-actions.pod:3823
29508 #: ../fish/guestfish-actions.pod:3827
29514 #: ../fish/guestfish-actions.pod:3829
29523 #: ../fish/guestfish-actions.pod:3835
29529 #: ../fish/guestfish-actions.pod:3837
29538 #: ../fish/guestfish-actions.pod:3841
29539 msgid "rmmountpoint"
29544 #: ../fish/guestfish-actions.pod:3843
29547 " rmmountpoint exemptpath\n"
29553 #: ../fish/guestfish-actions.pod:3845
29555 "This calls removes a mountpoint that was previously created with L</"
29556 "mkmountpoint>. See L</mkmountpoint> for full details."
29561 #: ../fish/guestfish-actions.pod:3849
29562 msgid "scrub-device"
29567 #: ../fish/guestfish-actions.pod:3851
29570 " scrub-device device\n"
29576 #: ../fish/guestfish-actions.pod:3862
29582 #: ../fish/guestfish-actions.pod:3864
29585 " scrub-file file\n"
29591 #: ../fish/guestfish-actions.pod:3874
29592 msgid "scrub-freespace"
29597 #: ../fish/guestfish-actions.pod:3876
29600 " scrub-freespace dir\n"
29606 #: ../fish/guestfish-actions.pod:3878
29608 "This command creates the directory C<dir> and then fills it with files until "
29609 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
29610 "deletes them. The intention is to scrub any free space on the partition "
29611 "containing C<dir>."
29616 #: ../fish/guestfish-actions.pod:3887
29622 #: ../fish/guestfish-actions.pod:3889
29628 #: ../fish/guestfish-actions.pod:3891
29631 " set-append append\n"
29636 #: ../fish/guestfish-actions.pod:3902
29637 msgid "set-attach-method"
29641 #: ../fish/guestfish-actions.pod:3904
29642 msgid "attach-method"
29646 #: ../fish/guestfish-actions.pod:3906
29649 " set-attach-method attachmethod\n"
29655 #: ../fish/guestfish-actions.pod:3928
29656 msgid "set-autosync"
29661 #: ../fish/guestfish-actions.pod:3930
29667 #: ../fish/guestfish-actions.pod:3932
29670 " set-autosync true|false\n"
29676 #: ../fish/guestfish-actions.pod:3942
29682 #: ../fish/guestfish-actions.pod:3944
29688 #: ../fish/guestfish-actions.pod:3946
29691 " set-direct true|false\n"
29697 #: ../fish/guestfish-actions.pod:3952
29699 "One consequence of this is that log messages aren't caught by the library "
29700 "and handled by L</set-log-message-callback>, but go straight to stdout."
29705 #: ../fish/guestfish-actions.pod:3961
29706 msgid "set-e2label"
29711 #: ../fish/guestfish-actions.pod:3963
29714 " set-e2label device label\n"
29720 #: ../fish/guestfish-actions.pod:3969
29722 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
29723 "label on a filesystem."
29728 #: ../fish/guestfish-actions.pod:3972
29734 #: ../fish/guestfish-actions.pod:3974
29737 " set-e2uuid device uuid\n"
29743 #: ../fish/guestfish-actions.pod:3981
29745 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
29746 "UUID of a filesystem."
29751 #: ../fish/guestfish-actions.pod:3984
29752 msgid "set-memsize"
29757 #: ../fish/guestfish-actions.pod:3986
29763 #: ../fish/guestfish-actions.pod:3988
29766 " set-memsize memsize\n"
29772 #: ../fish/guestfish-actions.pod:3990
29774 "This sets the memory size in megabytes allocated to the qemu subprocess. "
29775 "This only has any effect if called before L</launch>."
29780 #: ../fish/guestfish-actions.pod:4001
29781 msgid "set-network"
29786 #: ../fish/guestfish-actions.pod:4003
29792 #: ../fish/guestfish-actions.pod:4005
29795 " set-network true|false\n"
29801 #: ../fish/guestfish-actions.pod:4013
29803 "You must call this before calling L</launch>, otherwise it has no effect."
29808 #: ../fish/guestfish-actions.pod:4016
29814 #: ../fish/guestfish-actions.pod:4018
29820 #: ../fish/guestfish-actions.pod:4020
29823 " set-path searchpath\n"
29829 #: ../fish/guestfish-actions.pod:4029
29835 #: ../fish/guestfish-actions.pod:4031
29841 #: ../fish/guestfish-actions.pod:4033
29850 #: ../fish/guestfish-actions.pod:4053
29851 msgid "set-recovery-proc"
29856 #: ../fish/guestfish-actions.pod:4055
29857 msgid "recovery-proc"
29862 #: ../fish/guestfish-actions.pod:4057
29865 " set-recovery-proc true|false\n"
29871 #: ../fish/guestfish-actions.pod:4059
29873 "If this is called with the parameter C<false> then L</launch> does not "
29874 "create a recovery process. The purpose of the recovery process is to stop "
29875 "runaway qemu processes in the case where the main program aborts abruptly."
29880 #: ../fish/guestfish-actions.pod:4064
29882 "This only has any effect if called before L</launch>, and the default is "
29888 #: ../fish/guestfish-actions.pod:4073
29889 msgid "set-selinux"
29894 #: ../fish/guestfish-actions.pod:4075
29900 #: ../fish/guestfish-actions.pod:4077
29903 " set-selinux true|false\n"
29909 #: ../fish/guestfish-actions.pod:4088
29915 #: ../fish/guestfish-actions.pod:4090
29921 #: ../fish/guestfish-actions.pod:4092
29924 " set-trace true|false\n"
29929 #: ../fish/guestfish-actions.pod:4104
29931 "Trace messages are normally sent to C<stderr>, unless you register a "
29932 "callback to send them somewhere else (see L</set-event-callback>)."
29937 #: ../fish/guestfish-actions.pod:4108
29938 msgid "set-verbose"
29943 #: ../fish/guestfish-actions.pod:4110
29949 #: ../fish/guestfish-actions.pod:4112
29952 " set-verbose true|false\n"
29957 #: ../fish/guestfish-actions.pod:4119
29959 "Verbose messages are normally sent to C<stderr>, unless you register a "
29960 "callback to send them somewhere else (see L</set-event-callback>)."
29965 #: ../fish/guestfish-actions.pod:4123
29971 #: ../fish/guestfish-actions.pod:4125
29974 " setcon context\n"
29980 #: ../fish/guestfish-actions.pod:4132
29986 #: ../fish/guestfish-actions.pod:4134
29989 " setxattr xattr val vallen path\n"
29995 #: ../fish/guestfish-actions.pod:4140
29996 msgid "See also: L</lsetxattr>, L<attr(5)>."
30001 #: ../fish/guestfish-actions.pod:4142
30007 #: ../fish/guestfish-actions.pod:4144
30010 " sfdisk device cyls heads sectors 'lines ...'\n"
30016 #: ../fish/guestfish-actions.pod:4166
30017 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
30022 #: ../fish/guestfish-actions.pod:4172
30028 #: ../fish/guestfish-actions.pod:4174
30031 " sfdiskM device 'lines ...'\n"
30037 #: ../fish/guestfish-actions.pod:4176
30039 "This is a simplified interface to the L</sfdisk> command, where partition "
30040 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
30041 "you don't need to specify the cyls, heads and sectors parameters which were "
30042 "rarely if ever used anyway."
30047 #: ../fish/guestfish-actions.pod:4182
30048 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
30053 #: ../fish/guestfish-actions.pod:4188
30059 #: ../fish/guestfish-actions.pod:4190
30062 " sfdisk-N device partnum cyls heads sectors line\n"
30068 #: ../fish/guestfish-actions.pod:4195
30070 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
30071 "cyls/heads/sectors parameters."
30076 #: ../fish/guestfish-actions.pod:4198
30077 msgid "See also: L</part-add>"
30082 #: ../fish/guestfish-actions.pod:4203
30083 msgid "sfdisk-disk-geometry"
30088 #: ../fish/guestfish-actions.pod:4205
30091 " sfdisk-disk-geometry device\n"
30097 #: ../fish/guestfish-actions.pod:4207
30099 "This displays the disk geometry of C<device> read from the partition table. "
30100 "Especially in the case where the underlying block device has been resized, "
30101 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
30102 "kernel-geometry>)."
30107 #: ../fish/guestfish-actions.pod:4215
30108 msgid "sfdisk-kernel-geometry"
30113 #: ../fish/guestfish-actions.pod:4217
30116 " sfdisk-kernel-geometry device\n"
30122 #: ../fish/guestfish-actions.pod:4224
30128 #: ../fish/guestfish-actions.pod:4226
30131 " sfdisk-l device\n"
30137 #: ../fish/guestfish-actions.pod:4232
30138 msgid "See also: L</part-list>"
30143 #: ../fish/guestfish-actions.pod:4234
30149 #: ../fish/guestfish-actions.pod:4236
30158 #: ../fish/guestfish-actions.pod:4241
30159 msgid "This is like L</command>, but passes the command to:"
30164 #: ../fish/guestfish-actions.pod:4249
30165 msgid "All the provisos about L</command> apply to this call."
30170 #: ../fish/guestfish-actions.pod:4251
30176 #: ../fish/guestfish-actions.pod:4253
30179 " sh-lines command\n"
30185 #: ../fish/guestfish-actions.pod:4255
30186 msgid "This is the same as L</sh>, but splits the result into a list of lines."
30191 #: ../fish/guestfish-actions.pod:4258
30192 msgid "See also: L</command-lines>"
30197 #: ../fish/guestfish-actions.pod:4260
30203 #: ../fish/guestfish-actions.pod:4262
30212 #: ../fish/guestfish-actions.pod:4266
30218 #: ../fish/guestfish-actions.pod:4268
30227 #: ../fish/guestfish-actions.pod:4274
30233 #: ../fish/guestfish-actions.pod:4276
30242 #: ../fish/guestfish-actions.pod:4284
30248 #: ../fish/guestfish-actions.pod:4286
30257 #: ../fish/guestfish-actions.pod:4294
30263 #: ../fish/guestfish-actions.pod:4296
30266 " strings-e encoding path\n"
30272 #: ../fish/guestfish-actions.pod:4298
30274 "This is like the L</strings> command, but allows you to specify the encoding "
30275 "of strings that are looked for in the source file C<path>."
30280 #: ../fish/guestfish-actions.pod:4308
30282 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
30283 "ISO-8859-X (this is what L</strings> uses)."
30288 #: ../fish/guestfish-actions.pod:4340
30289 msgid "swapoff-device"
30294 #: ../fish/guestfish-actions.pod:4342
30297 " swapoff-device device\n"
30303 #: ../fish/guestfish-actions.pod:4344
30305 "This command disables the libguestfs appliance swap device or partition "
30306 "named C<device>. See L</swapon-device>."
30311 #: ../fish/guestfish-actions.pod:4348
30312 msgid "swapoff-file"
30317 #: ../fish/guestfish-actions.pod:4350
30320 " swapoff-file file\n"
30326 #: ../fish/guestfish-actions.pod:4354
30327 msgid "swapoff-label"
30332 #: ../fish/guestfish-actions.pod:4356
30335 " swapoff-label label\n"
30341 #: ../fish/guestfish-actions.pod:4361
30342 msgid "swapoff-uuid"
30347 #: ../fish/guestfish-actions.pod:4363
30350 " swapoff-uuid uuid\n"
30356 #: ../fish/guestfish-actions.pod:4368
30357 msgid "swapon-device"
30362 #: ../fish/guestfish-actions.pod:4370
30365 " swapon-device device\n"
30371 #: ../fish/guestfish-actions.pod:4372
30373 "This command enables the libguestfs appliance to use the swap device or "
30374 "partition named C<device>. The increased memory is made available for all "
30375 "commands, for example those run using L</command> or L</sh>."
30380 #: ../fish/guestfish-actions.pod:4384
30381 msgid "swapon-file"
30386 #: ../fish/guestfish-actions.pod:4386
30389 " swapon-file file\n"
30395 #: ../fish/guestfish-actions.pod:4388
30397 "This command enables swap to a file. See L</swapon-device> for other notes."
30402 #: ../fish/guestfish-actions.pod:4391
30403 msgid "swapon-label"
30408 #: ../fish/guestfish-actions.pod:4393
30411 " swapon-label label\n"
30417 #: ../fish/guestfish-actions.pod:4395
30419 "This command enables swap to a labeled swap partition. See L</swapon-"
30420 "device> for other notes."
30425 #: ../fish/guestfish-actions.pod:4398
30426 msgid "swapon-uuid"
30431 #: ../fish/guestfish-actions.pod:4400
30434 " swapon-uuid uuid\n"
30440 #: ../fish/guestfish-actions.pod:4402
30442 "This command enables swap to a swap partition with the given UUID. See L</"
30443 "swapon-device> for other notes."
30448 #: ../fish/guestfish-actions.pod:4405
30454 #: ../fish/guestfish-actions.pod:4407
30463 #: ../fish/guestfish-actions.pod:4415
30469 #: ../fish/guestfish-actions.pod:4417
30478 #: ../fish/guestfish-actions.pod:4425
30484 #: ../fish/guestfish-actions.pod:4427
30487 " tail-n nrlines path\n"
30493 #: ../fish/guestfish-actions.pod:4440
30499 #: ../fish/guestfish-actions.pod:4442
30502 " tar-in (tarfile|-) directory\n"
30508 #: ../fish/guestfish-actions.pod:4447
30509 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
30514 #: ../fish/guestfish-actions.pod:4452
30520 #: ../fish/guestfish-actions.pod:4454
30523 " tar-out directory (tarfile|-)\n"
30529 #: ../fish/guestfish-actions.pod:4459
30530 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
30535 #: ../fish/guestfish-actions.pod:4464
30541 #: ../fish/guestfish-actions.pod:4466
30544 " tgz-in (tarball|-) directory\n"
30550 #: ../fish/guestfish-actions.pod:4471
30551 msgid "To upload an uncompressed tarball, use L</tar-in>."
30556 #: ../fish/guestfish-actions.pod:4475
30562 #: ../fish/guestfish-actions.pod:4477
30565 " tgz-out directory (tarball|-)\n"
30571 #: ../fish/guestfish-actions.pod:4482
30572 msgid "To download an uncompressed tarball, use L</tar-out>."
30577 #: ../fish/guestfish-actions.pod:4486
30583 #: ../fish/guestfish-actions.pod:4488
30592 #: ../fish/guestfish-actions.pod:4497
30598 #: ../fish/guestfish-actions.pod:4499
30607 #: ../fish/guestfish-actions.pod:4504
30608 msgid "truncate-size"
30613 #: ../fish/guestfish-actions.pod:4506
30616 " truncate-size path size\n"
30622 #: ../fish/guestfish-actions.pod:4511
30624 "If the current file size is less than C<size> then the file is extended to "
30625 "the required size with zero bytes. This creates a sparse file (ie. disk "
30626 "blocks are not allocated for the file until you write to it). To create a "
30627 "non-sparse file of zeroes, use L</fallocate64> instead."
30632 #: ../fish/guestfish-actions.pod:4517
30638 #: ../fish/guestfish-actions.pod:4519
30641 " tune2fs-l device\n"
30647 #: ../fish/guestfish-actions.pod:4529
30653 #: ../fish/guestfish-actions.pod:4531
30656 " txz-in (tarball|-) directory\n"
30662 #: ../fish/guestfish-actions.pod:4538
30668 #: ../fish/guestfish-actions.pod:4540
30671 " txz-out directory (tarball|-)\n"
30677 #: ../fish/guestfish-actions.pod:4547
30683 #: ../fish/guestfish-actions.pod:4549
30692 #: ../fish/guestfish-actions.pod:4563
30693 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
30698 #: ../fish/guestfish-actions.pod:4568
30704 #: ../fish/guestfish-actions.pod:4570
30710 #: ../fish/guestfish-actions.pod:4572
30713 " umount pathordevice\n"
30719 #: ../fish/guestfish-actions.pod:4578
30725 #: ../fish/guestfish-actions.pod:4580
30726 msgid "unmount-all"
30731 #: ../fish/guestfish-actions.pod:4582
30740 #: ../fish/guestfish-actions.pod:4588
30746 #: ../fish/guestfish-actions.pod:4590
30749 " upload (filename|-) remotefilename\n"
30755 #: ../fish/guestfish-actions.pod:4597
30756 msgid "See also L</download>."
30761 #: ../fish/guestfish-actions.pod:4601
30762 msgid "upload-offset"
30767 #: ../fish/guestfish-actions.pod:4603
30770 " upload-offset (filename|-) remotefilename offset\n"
30776 #: ../fish/guestfish-actions.pod:4615
30778 "Note that there is no limit on the amount of data that can be uploaded with "
30779 "this call, unlike with L</pwrite>, and this call always writes the full "
30780 "amount unless an error occurs."
30785 #: ../fish/guestfish-actions.pod:4620
30786 msgid "See also L</upload>, L</pwrite>."
30791 #: ../fish/guestfish-actions.pod:4624
30797 #: ../fish/guestfish-actions.pod:4626
30800 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
30806 #: ../fish/guestfish-actions.pod:4645
30812 #: ../fish/guestfish-actions.pod:4647
30821 #: ../fish/guestfish-actions.pod:4674
30823 "I<Note:> Don't use this call to test for availability of features. In "
30824 "enterprise distributions we backport features from later versions into "
30825 "earlier versions, making this an unreliable way to test for features. Use "
30826 "L</available> instead."
30831 #: ../fish/guestfish-actions.pod:4680
30837 #: ../fish/guestfish-actions.pod:4682
30840 " vfs-label device\n"
30846 #: ../fish/guestfish-actions.pod:4689
30847 msgid "To find a filesystem from the label, use L</findfs-label>."
30852 #: ../fish/guestfish-actions.pod:4691
30858 #: ../fish/guestfish-actions.pod:4693
30861 " vfs-type device\n"
30867 #: ../fish/guestfish-actions.pod:4703
30873 #: ../fish/guestfish-actions.pod:4705
30876 " vfs-uuid device\n"
30882 #: ../fish/guestfish-actions.pod:4712
30883 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
30888 #: ../fish/guestfish-actions.pod:4714
30889 msgid "vg-activate"
30894 #: ../fish/guestfish-actions.pod:4716
30897 " vg-activate true|false 'volgroups ...'\n"
30903 #: ../fish/guestfish-actions.pod:4729
30904 msgid "vg-activate-all"
30909 #: ../fish/guestfish-actions.pod:4731
30912 " vg-activate-all true|false\n"
30918 #: ../fish/guestfish-actions.pod:4741
30924 #: ../fish/guestfish-actions.pod:4743
30927 " vgcreate volgroup 'physvols ...'\n"
30933 #: ../fish/guestfish-actions.pod:4748
30939 #: ../fish/guestfish-actions.pod:4750
30942 " vglvuuids vgname\n"
30948 #: ../fish/guestfish-actions.pod:4755
30950 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
30951 "logical volumes and volume groups."
30956 #: ../fish/guestfish-actions.pod:4758
30957 msgid "See also L</vgpvuuids>."
30962 #: ../fish/guestfish-actions.pod:4760
30968 #: ../fish/guestfish-actions.pod:4762
30971 " vgpvuuids vgname\n"
30977 #: ../fish/guestfish-actions.pod:4767
30979 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
30980 "physical volumes and volume groups."
30985 #: ../fish/guestfish-actions.pod:4770
30986 msgid "See also L</vglvuuids>."
30991 #: ../fish/guestfish-actions.pod:4772
30997 #: ../fish/guestfish-actions.pod:4774
31000 " vgremove vgname\n"
31006 #: ../fish/guestfish-actions.pod:4781
31012 #: ../fish/guestfish-actions.pod:4783
31015 " vgrename volgroup newvolgroup\n"
31021 #: ../fish/guestfish-actions.pod:4787
31027 #: ../fish/guestfish-actions.pod:4789
31036 #: ../fish/guestfish-actions.pod:4797
31037 msgid "See also L</vgs-full>."
31042 #: ../fish/guestfish-actions.pod:4799
31048 #: ../fish/guestfish-actions.pod:4801
31057 #: ../fish/guestfish-actions.pod:4806
31063 #: ../fish/guestfish-actions.pod:4808
31072 #: ../fish/guestfish-actions.pod:4813
31078 #: ../fish/guestfish-actions.pod:4815
31087 #: ../fish/guestfish-actions.pod:4819
31093 #: ../fish/guestfish-actions.pod:4821
31102 #: ../fish/guestfish-actions.pod:4826
31108 #: ../fish/guestfish-actions.pod:4828
31117 #: ../fish/guestfish-actions.pod:4833
31123 #: ../fish/guestfish-actions.pod:4835
31132 #: ../fish/guestfish-actions.pod:4840
31138 #: ../fish/guestfish-actions.pod:4842
31141 " write path content\n"
31147 #: ../fish/guestfish-actions.pod:4850
31153 #: ../fish/guestfish-actions.pod:4852
31156 " write-file path content size\n"
31162 #: ../fish/guestfish-actions.pod:4875
31168 #: ../fish/guestfish-actions.pod:4877
31171 " zegrep regex path\n"
31177 #: ../fish/guestfish-actions.pod:4885
31183 #: ../fish/guestfish-actions.pod:4887
31186 " zegrepi regex path\n"
31192 #: ../fish/guestfish-actions.pod:4895
31198 #: ../fish/guestfish-actions.pod:4897
31207 #: ../fish/guestfish-actions.pod:4905
31208 msgid "See also: L</zero-device>, L</scrub-device>."
31213 #: ../fish/guestfish-actions.pod:4907
31214 msgid "zero-device"
31219 #: ../fish/guestfish-actions.pod:4909
31222 " zero-device device\n"
31228 #: ../fish/guestfish-actions.pod:4911
31230 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
31231 "which just zeroes the first few blocks of a device."
31236 #: ../fish/guestfish-actions.pod:4918
31242 #: ../fish/guestfish-actions.pod:4920
31245 " zerofree device\n"
31251 #: ../fish/guestfish-actions.pod:4933
31257 #: ../fish/guestfish-actions.pod:4935
31260 " zfgrep pattern path\n"
31266 #: ../fish/guestfish-actions.pod:4943
31272 #: ../fish/guestfish-actions.pod:4945
31275 " zfgrepi pattern path\n"
31281 #: ../fish/guestfish-actions.pod:4953
31287 #: ../fish/guestfish-actions.pod:4955
31290 " zfile meth path\n"
31296 #: ../fish/guestfish-actions.pod:4962
31298 "Since 1.0.63, use L</file> instead which can now process compressed files."
31303 #: ../fish/guestfish-actions.pod:4972
31309 #: ../fish/guestfish-actions.pod:4974
31312 " zgrep regex path\n"
31318 #: ../fish/guestfish-actions.pod:4982
31324 #: ../fish/guestfish-actions.pod:4984
31327 " zgrepi regex path\n"
31333 #: ../fish/guestfish-commands.pod:1
31339 #: ../fish/guestfish-commands.pod:3
31345 #: ../fish/guestfish-commands.pod:5
31348 " alloc filename size\n"
31354 #: ../fish/guestfish-commands.pod:7
31356 "This creates an empty (zeroed) file of the given size, and then adds so it "
31357 "can be further examined."
31362 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
31363 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
31368 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
31369 msgid "Size can be specified using standard suffixes, eg. C<1M>."
31374 #: ../fish/guestfish-commands.pod:14
31376 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
31377 "image, see L</PREPARED DISK IMAGES>."
31382 #: ../fish/guestfish-commands.pod:17
31388 #: ../fish/guestfish-commands.pod:19
31391 " copy-in local [local ...] /remotedir\n"
31397 #: ../fish/guestfish-commands.pod:21
31399 "C<copy-in> copies local files or directories recursively into the disk "
31400 "image, placing them in the directory called C</remotedir> (which must "
31401 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
31402 "other commands as necessary."
31407 #: ../fish/guestfish-commands.pod:26
31409 "Multiple local files and directories can be specified, but the last "
31410 "parameter must always be a remote directory. Wildcards cannot be used."
31415 #: ../fish/guestfish-commands.pod:30
31421 #: ../fish/guestfish-commands.pod:32
31424 " copy-out remote [remote ...] localdir\n"
31430 #: ../fish/guestfish-commands.pod:34
31432 "C<copy-out> copies remote files or directories recursively out of the disk "
31433 "image, placing them on the host disk in a local directory called C<localdir> "
31434 "(which must exist). This guestfish meta-command turns into a sequence of L</"
31435 "download>, L</tar-out> and other commands as necessary."
31440 #: ../fish/guestfish-commands.pod:40
31442 "Multiple remote files and directories can be specified, but the last "
31443 "parameter must always be a local directory. To download to the current "
31444 "directory, use C<.> as in:"
31449 #: ../fish/guestfish-commands.pod:44
31452 " copy-out /home .\n"
31458 #: ../fish/guestfish-commands.pod:46
31460 "Wildcards cannot be used in the ordinary command, but you can use them with "
31461 "the help of L</glob> like this:"
31466 #: ../fish/guestfish-commands.pod:49
31469 " glob copy-out /home/* .\n"
31475 #: ../fish/guestfish-commands.pod:51
31481 #: ../fish/guestfish-commands.pod:53
31484 " echo [params ...]\n"
31490 #: ../fish/guestfish-commands.pod:55
31491 msgid "This echos the parameters to the terminal."
31496 #: ../fish/guestfish-commands.pod:57
31502 #: ../fish/guestfish-commands.pod:59
31508 #: ../fish/guestfish-commands.pod:61
31514 #: ../fish/guestfish-commands.pod:63
31523 #: ../fish/guestfish-commands.pod:65
31525 "This is used to edit a file. It downloads the file, edits it locally using "
31526 "your editor, then uploads the result."
31531 #: ../fish/guestfish-commands.pod:68
31533 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
31534 "or C<emacs> you will get those corresponding editors."
31539 #: ../fish/guestfish-commands.pod:72
31545 #: ../fish/guestfish-commands.pod:74
31548 " glob command args...\n"
31554 #: ../fish/guestfish-commands.pod:76
31556 "Expand wildcards in any paths in the args list, and run C<command> "
31557 "repeatedly on each matching path."
31562 #: ../fish/guestfish-commands.pod:79
31563 msgid "See L</WILDCARDS AND GLOBBING>."
31568 #: ../fish/guestfish-commands.pod:81
31574 #: ../fish/guestfish-commands.pod:83
31577 " hexedit <filename|device>\n"
31578 " hexedit <filename|device> <max>\n"
31579 " hexedit <filename|device> <start> <max>\n"
31585 #: ../fish/guestfish-commands.pod:87
31587 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
31593 #: ../fish/guestfish-commands.pod:90
31595 "This command works by downloading potentially the whole file or device, "
31596 "editing it locally, then uploading it. If the file or device is large, you "
31597 "have to specify which part you wish to edit by using C<max> and/or C<start> "
31598 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
31599 "usual modifiers allowed such as C<1M> (1 megabyte)."
31604 #: ../fish/guestfish-commands.pod:97
31605 msgid "For example to edit the first few sectors of a disk you might do:"
31610 #: ../fish/guestfish-commands.pod:100
31613 " hexedit /dev/sda 1M\n"
31619 #: ../fish/guestfish-commands.pod:102
31621 "which would allow you to edit anywhere within the first megabyte of the disk."
31626 #: ../fish/guestfish-commands.pod:105
31627 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
31632 #: ../fish/guestfish-commands.pod:107
31635 " hexedit /dev/sda1 0x400 0x400\n"
31641 #: ../fish/guestfish-commands.pod:109
31642 msgid "(assuming the superblock is in the standard location)."
31647 #: ../fish/guestfish-commands.pod:111
31649 "This command requires the external L<hexedit(1)> program. You can specify "
31650 "another program to use by setting the C<HEXEDITOR> environment variable."
31655 #: ../fish/guestfish-commands.pod:115
31656 msgid "See also L</hexdump>."
31661 #: ../fish/guestfish-commands.pod:117
31667 #: ../fish/guestfish-commands.pod:119
31676 #: ../fish/guestfish-commands.pod:121
31678 "Change the local directory, ie. the current directory of guestfish itself."
31683 #: ../fish/guestfish-commands.pod:124
31684 msgid "Note that C<!cd> won't do what you might expect."
31689 #: ../fish/guestfish-commands.pod:126
31695 #: ../fish/guestfish-commands.pod:128
31701 #: ../fish/guestfish-commands.pod:130
31710 #: ../fish/guestfish-commands.pod:132
31711 msgid "Opens the manual page for guestfish."
31716 #: ../fish/guestfish-commands.pod:134
31722 #: ../fish/guestfish-commands.pod:136
31728 #: ../fish/guestfish-commands.pod:138
31737 #: ../fish/guestfish-commands.pod:140
31746 #: ../fish/guestfish-commands.pod:142
31747 msgid "This is used to view a file."
31752 #: ../fish/guestfish-commands.pod:144
31754 "The default viewer is C<$PAGER>. However if you use the alternate command "
31755 "C<less> you will get the C<less> command specifically."
31760 #: ../fish/guestfish-commands.pod:147
31766 #: ../fish/guestfish-commands.pod:149
31775 #: ../fish/guestfish-commands.pod:151
31777 "Close and reopen the libguestfs handle. It is not necessary to use this "
31778 "normally, because the handle is closed properly when guestfish exits. "
31779 "However this is occasionally useful for testing."
31784 #: ../fish/guestfish-commands.pod:155
31790 #: ../fish/guestfish-commands.pod:157
31793 " sparse filename size\n"
31799 #: ../fish/guestfish-commands.pod:159
31801 "This creates an empty sparse file of the given size, and then adds so it can "
31802 "be further examined."
31807 #: ../fish/guestfish-commands.pod:162
31809 "In all respects it works the same as the L</alloc> command, except that the "
31810 "image file is allocated sparsely, which means that disk blocks are not "
31811 "assigned to the file until they are needed. Sparse disk files only use "
31812 "space when written to, but they are slower and there is a danger you could "
31813 "run out of real disk space during a write operation."
31818 #: ../fish/guestfish-commands.pod:172
31824 #: ../fish/guestfish-commands.pod:174
31833 #: ../fish/guestfish-commands.pod:176
31835 "This command returns a list of the optional groups known to the daemon, and "
31836 "indicates which ones are supported by this build of the libguestfs appliance."
31841 #: ../fish/guestfish-commands.pod:180
31842 msgid "See also L<guestfs(3)/AVAILABILITY>."
31847 #: ../fish/guestfish-commands.pod:182
31853 #: ../fish/guestfish-commands.pod:184
31856 " time command args...\n"
31862 #: ../fish/guestfish-commands.pod:186
31864 "Run the command as usual, but print the elapsed time afterwards. This can "
31865 "be useful for benchmarking operations."
31870 #: ../test-tool/libguestfs-test-tool.pod:5
31871 msgid "libguestfs-test-tool - End user tests for libguestfs"
31876 #: ../test-tool/libguestfs-test-tool.pod:9
31879 " libguestfs-test-tool [--options]\n"
31885 #: ../test-tool/libguestfs-test-tool.pod:13
31887 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
31888 "and developers, to allow them to check basic libguestfs functionality is "
31889 "working. This is needed because libguestfs occasionally breaks for reasons "
31890 "beyond our control: usually because of changes in the underlying qemu or "
31891 "kernel packages, or the host environment."
31896 #: ../test-tool/libguestfs-test-tool.pod:20
31897 msgid "If you suspect a problem in libguestfs, then just run:"
31902 #: ../test-tool/libguestfs-test-tool.pod:22
31905 " libguestfs-test-tool\n"
31911 #: ../test-tool/libguestfs-test-tool.pod:24
31912 msgid "It will print lots of diagnostic messages."
31917 #: ../test-tool/libguestfs-test-tool.pod:26
31918 msgid "If it runs to completion successfully, you will see this near the end:"
31923 #: ../test-tool/libguestfs-test-tool.pod:28
31926 " ===== TEST FINISHED OK =====\n"
31932 #: ../test-tool/libguestfs-test-tool.pod:30
31933 msgid "and the test tool will exit with code 0."
31938 #: ../test-tool/libguestfs-test-tool.pod:32
31940 "If it fails (and/or exits with non-zero error code), please paste the "
31941 "B<complete, unedited> output of the test tool into a bug report. More "
31942 "information about reporting bugs can be found on the L<http://libguestfs.org/"
31948 #: ../test-tool/libguestfs-test-tool.pod:41
31954 #: ../test-tool/libguestfs-test-tool.pod:43
31955 msgid "Display short usage information and exit."
31960 #: ../test-tool/libguestfs-test-tool.pod:45
31961 msgid "I<--qemu qemu_binary>"
31966 #: ../test-tool/libguestfs-test-tool.pod:47
31968 "If you have downloaded another qemu binary, point this option at the full "
31969 "path of the binary to try it."
31974 #: ../test-tool/libguestfs-test-tool.pod:50
31975 msgid "I<--qemudir qemu_source_dir>"
31980 #: ../test-tool/libguestfs-test-tool.pod:52
31982 "If you have compiled qemu from source, point this option at the source "
31983 "directory to try it."
31988 #: ../test-tool/libguestfs-test-tool.pod:55
31989 msgid "I<--timeout N>"
31994 #: ../test-tool/libguestfs-test-tool.pod:57
31996 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
31997 "does not usually need to be adjusted unless your machine is very slow."
32002 #: ../test-tool/libguestfs-test-tool.pod:63
32003 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
32008 #: ../test-tool/libguestfs-test-tool.pod:65
32010 "If you have compiled another version of qemu from source and would like to "
32011 "try that, then you can use the I<--qemudir> option to point to the qemu "
32012 "source directory."
32017 #: ../test-tool/libguestfs-test-tool.pod:69
32019 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
32020 "option to point to the binary."
32025 #: ../test-tool/libguestfs-test-tool.pod:72
32027 "When using an alternate qemu with libguestfs, usually you would need to "
32028 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in L<guestfs(3)"
32029 ">). libguestfs-test-tool writes a temporary qemu wrapper script when you "
32030 "use either of the I<--qemudir> or I<--qemu> options."
32035 #: ../test-tool/libguestfs-test-tool.pod:79
32037 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
32038 "I<1> if there was an error."
32043 #: ../test-tool/libguestfs-test-tool.pod:84
32045 "For the full list of environment variables which may affect libguestfs, "
32046 "please see the L<guestfs(3)> manual page."
32051 #: ../test-tool/libguestfs-test-tool.pod:89
32052 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
32057 #: ../fuse/guestmount.pod:5
32059 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
32064 #: ../fuse/guestmount.pod:9
32067 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
32073 #: ../fuse/guestmount.pod:11
32076 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
32082 #: ../fuse/guestmount.pod:13
32085 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
32091 #: ../fuse/guestmount.pod:17
32093 "You must I<not> use C<guestmount> in read-write mode on live virtual "
32094 "machines. If you do this, you risk disk corruption in the VM."
32099 #: ../fuse/guestmount.pod:22
32101 "The guestmount program can be used to mount virtual machine filesystems and "
32102 "other disk images on the host. It uses libguestfs for access to the guest "
32103 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
32104 "a mountable device."
32109 #: ../fuse/guestmount.pod:27
32111 "Along with other options, you have to give at least one device (I<-a> "
32112 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
32113 "option) or use the I<-i> inspection option. How this works is better "
32114 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
32120 #: ../fuse/guestmount.pod:33
32122 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
32123 "by you, and the filesystem will not be visible to any other users unless you "
32124 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
32125 "the filesystem, use the C<fusermount -u> command."
32130 #: ../fuse/guestmount.pod:41
32132 "For a typical Windows guest which has its main filesystem on the first "
32138 #: ../fuse/guestmount.pod:44
32141 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
32147 #: ../fuse/guestmount.pod:46
32149 "For a typical Linux guest which has a /boot filesystem on the first "
32150 "partition, and the root filesystem on a logical volume:"
32155 #: ../fuse/guestmount.pod:49
32158 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
32164 #: ../fuse/guestmount.pod:51
32165 msgid "To get libguestfs to detect guest mountpoints for you:"
32170 #: ../fuse/guestmount.pod:53
32173 " guestmount -a guest.img -i --ro /mnt\n"
32179 #: ../fuse/guestmount.pod:55
32180 msgid "For a libvirt guest called \"Guest\" you could do:"
32185 #: ../fuse/guestmount.pod:57
32188 " guestmount -d Guest -i --ro /mnt\n"
32194 #: ../fuse/guestmount.pod:59
32196 "If you don't know what filesystems are contained in a guest or disk image, "
32197 "use L<virt-filesystems(1)> first:"
32202 #: ../fuse/guestmount.pod:62
32205 " virt-filesystems MyGuest\n"
32211 #: ../fuse/guestmount.pod:64
32213 "If you want to trace the libguestfs calls but without excessive debugging "
32214 "information, we recommend:"
32219 #: ../fuse/guestmount.pod:67
32222 " guestmount [...] --trace /mnt\n"
32228 #: ../fuse/guestmount.pod:69
32229 msgid "If you want to debug the program, we recommend:"
32234 #: ../fuse/guestmount.pod:71
32237 " guestmount [...] --trace --verbose /mnt\n"
32243 #: ../fuse/guestmount.pod:77
32244 msgid "B<-a image> | B<--add image>"
32249 #: ../fuse/guestmount.pod:79
32250 msgid "Add a block device or virtual machine image."
32255 #: ../fuse/guestmount.pod:84
32256 msgid "B<-c URI> | B<--connect URI>"
32261 #: ../fuse/guestmount.pod:90
32262 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
32267 #: ../fuse/guestmount.pod:98
32268 msgid "B<--dir-cache-timeout N>"
32273 #: ../fuse/guestmount.pod:100
32275 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
32276 "seconds. The readdir cache [actually, there are several semi-independent "
32277 "caches] is populated after a readdir(2) call with the stat and extended "
32278 "attributes of the files in the directory, in anticipation that they will be "
32279 "requested soon after."
32284 #: ../fuse/guestmount.pod:106
32286 "There is also a different attribute cache implemented by FUSE (see the FUSE "
32287 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
32288 "requests, only cache existing ones."
32293 #: ../fuse/guestmount.pod:117
32294 msgid "B<--format=raw|qcow2|..> | B<--format>"
32299 #: ../fuse/guestmount.pod:124
32301 "If you have untrusted raw-format guest disk images, you should use this "
32302 "option to specify the disk format. This avoids a possible security problem "
32303 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
32304 "guestfs_add_drive_opts>."
32309 #: ../fuse/guestmount.pod:129
32310 msgid "B<--fuse-help>"
32315 #: ../fuse/guestmount.pod:131
32316 msgid "Display help on special FUSE options (see I<-o> below)."
32321 #: ../fuse/guestmount.pod:135
32322 msgid "Display brief help and exit."
32327 #: ../fuse/guestmount.pod:137
32328 msgid "B<-i> | B<--inspector>"
32333 #: ../fuse/guestmount.pod:157
32335 "Mount the named partition or logical volume on the given mountpoint B<in the "
32336 "guest> (this has nothing to do with mountpoints in the host)."
32341 #: ../fuse/guestmount.pod:160
32343 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
32344 "something on C</>."
32349 #: ../fuse/guestmount.pod:173
32350 msgid "B<-n> | B<--no-sync>"
32355 #: ../fuse/guestmount.pod:175
32357 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
32358 "unmounted. If you specify this option, then we don't attempt to sync the "
32359 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
32364 #: ../fuse/guestmount.pod:180
32365 msgid "B<-o option> | B<--option option>"
32370 #: ../fuse/guestmount.pod:182
32371 msgid "Pass extra options to FUSE."
32376 #: ../fuse/guestmount.pod:184
32378 "To get a list of all the extra options supported by FUSE, use the command "
32379 "below. Note that only the FUSE I<-o> options can be passed, and only some "
32380 "of them are a good idea."
32385 #: ../fuse/guestmount.pod:188
32388 " guestmount --fuse-help\n"
32394 #: ../fuse/guestmount.pod:190
32395 msgid "Some potentially useful FUSE options:"
32400 #: ../fuse/guestmount.pod:194
32401 msgid "B<-o allow_other>"
32406 #: ../fuse/guestmount.pod:196
32407 msgid "Allow other users to see the filesystem."
32412 #: ../fuse/guestmount.pod:198
32413 msgid "B<-o attr_timeout=N>"
32418 #: ../fuse/guestmount.pod:200
32419 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
32424 #: ../fuse/guestmount.pod:202
32425 msgid "B<-o kernel_cache>"
32430 #: ../fuse/guestmount.pod:204
32432 "Allow the kernel to cache files (reduces the number of reads that have to go "
32433 "through the L<guestfs(3)> API). This is generally a good idea if you can "
32434 "afford the extra memory usage."
32439 #: ../fuse/guestmount.pod:208
32440 msgid "B<-o uid=N> B<-o gid=N>"
32445 #: ../fuse/guestmount.pod:210
32447 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
32448 "the chosen values."
32453 #: ../fuse/guestmount.pod:215
32454 msgid "B<-r> | B<--ro>"
32459 #: ../fuse/guestmount.pod:217
32461 "Add devices and mount everything read-only. Also disallow writes and make "
32462 "the disk appear read-only to FUSE."
32467 #: ../fuse/guestmount.pod:220
32469 "This is highly recommended if you are not going to edit the guest disk. If "
32470 "the guest is running and this option is I<not> supplied, then there is a "
32471 "strong risk of disk corruption in the guest. We try to prevent this from "
32472 "happening, but it is not always possible."
32477 #: ../fuse/guestmount.pod:225
32478 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
32483 #: ../fuse/guestmount.pod:229
32484 msgid "Enable SELinux support for the guest."
32489 #: ../fuse/guestmount.pod:231
32490 msgid "B<-v> | B<--verbose>"
32495 #: ../fuse/guestmount.pod:233
32496 msgid "Enable verbose messages from underlying libguestfs."
32501 #: ../fuse/guestmount.pod:235
32502 msgid "B<-V> | B<--version>"
32507 #: ../fuse/guestmount.pod:237
32508 msgid "Display the program version and exit."
32513 #: ../fuse/guestmount.pod:239
32514 msgid "B<-w> | B<--rw>"
32518 #: ../fuse/guestmount.pod:244 ../fuse/guestmount.pod:265
32519 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
32524 #: ../fuse/guestmount.pod:246
32525 msgid "B<-x> | B<--trace>"
32530 #: ../fuse/guestmount.pod:248
32531 msgid "Trace libguestfs calls and entry into each FUSE function."
32536 #: ../fuse/guestmount.pod:250
32537 msgid "This also stops the daemon from forking into the background."
32542 #: ../fuse/guestmount.pod:271
32544 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
32545 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
32551 #: ../fuse/guestmount.pod:286
32552 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
32557 #: ../tools/virt-win-reg.pl:37
32559 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
32564 #: ../tools/virt-win-reg.pl:41
32567 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
32573 #: ../tools/virt-win-reg.pl:43
32576 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
32582 #: ../tools/virt-win-reg.pl:45
32585 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
32591 #: ../tools/virt-win-reg.pl:47
32594 " virt-win-reg --merge domname [input.reg ...]\n"
32600 #: ../tools/virt-win-reg.pl:49
32603 " virt-win-reg [--options] disk.img ... # instead of domname\n"
32608 #: ../tools/virt-win-reg.pl:53
32610 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
32611 "virtual machines. If you do this, you I<will> get irreversible disk "
32612 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
32613 "but doesn't catch all cases."
32617 #: ../tools/virt-win-reg.pl:58
32619 "Modifying the Windows Registry is an inherently risky operation. The format "
32620 "is deliberately obscure and undocumented, and Registry changes can leave the "
32621 "system unbootable. Therefore when using the I<--merge> option, make sure "
32622 "you have a reliable backup first."
32627 #: ../tools/virt-win-reg.pl:65
32629 "This program can export and merge Windows Registry entries from a Windows "
32635 #: ../tools/virt-win-reg.pl:68
32637 "The first parameter is the libvirt guest name or the raw disk image of a "
32642 #: ../tools/virt-win-reg.pl:71
32644 "If I<--merge> is I<not> specified, then the chosen registry key is displayed/"
32645 "exported (recursively). For example:"
32650 #: ../tools/virt-win-reg.pl:74
32653 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
32659 #: ../tools/virt-win-reg.pl:76
32661 "You can also display single values from within registry keys, for example:"
32666 #: ../tools/virt-win-reg.pl:79
32669 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
32670 " $ virt-win-reg Windows7 $cvkey ProductName\n"
32671 " Windows 7 Enterprise\n"
32676 #: ../tools/virt-win-reg.pl:83
32678 "With I<--merge>, you can merge a textual regedit file into the Windows "
32684 #: ../tools/virt-win-reg.pl:86
32687 " $ virt-win-reg --merge Windows7 changes.reg\n"
32693 #: ../tools/virt-win-reg.pl:88 ../tools/virt-tar.pl:45
32699 #: ../tools/virt-win-reg.pl:90
32701 "This program is only meant for simple access to the registry. If you want "
32702 "to do complicated things with the registry, we suggest you download the "
32703 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
32704 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
32705 "L<hivexregedit(1)>."
32710 #: ../tools/virt-win-reg.pl:106 ../tools/virt-list-filesystems.pl:63
32711 #: ../tools/virt-tar.pl:113 ../tools/virt-make-fs.pl:163
32712 #: ../tools/virt-list-partitions.pl:64
32713 msgid "Display brief help."
32718 #: ../tools/virt-win-reg.pl:114 ../tools/virt-list-filesystems.pl:71
32719 #: ../tools/virt-tar.pl:121 ../tools/virt-make-fs.pl:171
32720 #: ../tools/virt-list-partitions.pl:72
32721 msgid "Display version number and exit."
32726 #: ../tools/virt-win-reg.pl:120 ../tools/virt-make-fs.pl:177
32732 #: ../tools/virt-win-reg.pl:122
32733 msgid "Enable debugging messages."
32738 #: ../tools/virt-win-reg.pl:128 ../tools/virt-list-filesystems.pl:77
32739 #: ../tools/virt-tar.pl:127 ../tools/virt-list-partitions.pl:78
32740 msgid "B<--connect URI> | B<-c URI>"
32745 #: ../tools/virt-win-reg.pl:130 ../tools/virt-list-filesystems.pl:79
32746 #: ../tools/virt-tar.pl:129 ../tools/virt-list-partitions.pl:80
32748 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
32749 "to the default libvirt hypervisor."
32754 #: ../tools/virt-win-reg.pl:133 ../tools/virt-list-filesystems.pl:82
32755 #: ../tools/virt-tar.pl:132 ../tools/virt-list-partitions.pl:83
32757 "If you specify guest block devices directly, then libvirt is not used at all."
32762 #: ../tools/virt-win-reg.pl:140 ../tools/virt-list-filesystems.pl:89
32763 #: ../tools/virt-tar.pl:139 ../tools/virt-list-partitions.pl:90
32764 msgid "B<--format> raw"
32769 #: ../tools/virt-win-reg.pl:142 ../tools/virt-list-filesystems.pl:91
32770 #: ../tools/virt-tar.pl:141 ../tools/virt-list-partitions.pl:92
32772 "Specify the format of disk images given on the command line. If this is "
32773 "omitted then the format is autodetected from the content of the disk image."
32778 #: ../tools/virt-win-reg.pl:146 ../tools/virt-list-filesystems.pl:95
32779 #: ../tools/virt-tar.pl:145 ../tools/virt-list-partitions.pl:96
32781 "If disk images are requested from libvirt, then this program asks libvirt "
32782 "for this information. In this case, the value of the format parameter is "
32788 #: ../tools/virt-win-reg.pl:150 ../tools/virt-list-filesystems.pl:99
32789 #: ../tools/virt-tar.pl:149 ../tools/virt-list-partitions.pl:100
32791 "If working with untrusted raw-format guest disk images, you should ensure "
32792 "the format is always specified."
32797 #: ../tools/virt-win-reg.pl:157
32803 #: ../tools/virt-win-reg.pl:159
32805 "In merge mode, this merges a textual regedit file into the Windows Registry "
32806 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
32807 "displays or exports Registry entries instead."
32811 #: ../tools/virt-win-reg.pl:163
32813 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
32814 "result in disk corruption. However exporting (without this flag) is always "
32820 #: ../tools/virt-win-reg.pl:171
32821 msgid "B<--encoding> UTF-16LE|ASCII"
32826 #: ../tools/virt-win-reg.pl:173
32828 "When merging (only), you may need to specify the encoding for strings to be "
32829 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
32830 "(3)/ENCODING STRINGS>."
32835 #: ../tools/virt-win-reg.pl:177
32837 "The default is to use UTF-16LE, which should work with recent versions of "
32843 #: ../tools/virt-win-reg.pl:402
32844 msgid "SUPPORTED SYSTEMS"
32849 #: ../tools/virt-win-reg.pl:404
32851 "The program currently supports Windows NT-derived guests starting with "
32852 "Windows XP through to at least Windows 7."
32857 #: ../tools/virt-win-reg.pl:407
32859 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, C<HKEY_LOCAL_MACHINE"
32860 "\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, C<HKEY_LOCAL_MACHINE\\SYSTEM> "
32861 "and C<HKEY_USERS\\.DEFAULT>."
32866 #: ../tools/virt-win-reg.pl:411
32868 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
32874 #: ../tools/virt-win-reg.pl:414
32876 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
32882 #: ../tools/virt-win-reg.pl:417
32888 #: ../tools/virt-win-reg.pl:419
32890 "C<virt-win-reg> expects that regedit files have already been reencoded in "
32891 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
32892 "style line endings. Since Windows regedit files are often in UTF-16LE with "
32893 "Windows-style line endings, you may need to reencode the whole file before "
32894 "or after processing."
32898 #: ../tools/virt-win-reg.pl:425
32900 "To reencode a file from Windows format to Linux (before processing it with "
32901 "the I<--merge> option), you would do something like this:"
32906 #: ../tools/virt-win-reg.pl:428
32909 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
32915 #: ../tools/virt-win-reg.pl:430
32917 "To go in the opposite direction, after exporting and before sending the file "
32918 "to a Windows user, do something like this:"
32923 #: ../tools/virt-win-reg.pl:433
32926 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
32932 #: ../tools/virt-win-reg.pl:435
32933 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
32938 #: ../tools/virt-win-reg.pl:437
32940 "If you are unsure about the current encoding, use the L<file(1)> command. "
32941 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
32942 "style (CRLF) line endings, like this:"
32947 #: ../tools/virt-win-reg.pl:441
32950 " $ file software.reg\n"
32951 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
32952 " with CRLF line terminators\n"
32957 #: ../tools/virt-win-reg.pl:445
32958 msgid "This file would need conversion before you could I<--merge> it."
32963 #: ../tools/virt-win-reg.pl:447
32964 msgid "CurrentControlSet etc."
32969 #: ../tools/virt-win-reg.pl:449
32971 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
32972 "Registry at the level of the hive file, and therefore you cannot modify "
32978 #: ../tools/virt-win-reg.pl:453
32980 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
32981 "circumstances it might refer to another control set. The way to find out is "
32982 "to look at the C<HKLM\\SYSTEM\\Select> key:"
32987 #: ../tools/virt-win-reg.pl:457
32990 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
32991 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
32992 " \"Current\"=dword:00000001\n"
32993 " \"Default\"=dword:00000001\n"
32994 " \"Failed\"=dword:00000000\n"
32995 " \"LastKnownGood\"=dword:00000002\n"
33001 #: ../tools/virt-win-reg.pl:464
33002 msgid "\"Current\" is the one which Windows will choose when it boots."
33007 #: ../tools/virt-win-reg.pl:466
33009 "Similarly, other C<Current...> keys in the path may need to be replaced."
33014 #: ../tools/virt-win-reg.pl:469
33015 msgid "WINDOWS TIPS"
33020 #: ../tools/virt-win-reg.pl:471
33022 "Note that some of these tips modify the guest disk image. The guest I<must> "
33023 "be shut off, else you will get disk corruption."
33028 #: ../tools/virt-win-reg.pl:474
33029 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
33034 #: ../tools/virt-win-reg.pl:476
33036 "Prepare a DOS batch script, VBScript or executable. Upload this using "
33037 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
33038 "is uploaded into C<C:\\>:"
33043 #: ../tools/virt-win-reg.pl:480
33046 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
33052 #: ../tools/virt-win-reg.pl:482
33053 msgid "Prepare a regedit file containing the registry change:"
33058 #: ../tools/virt-win-reg.pl:484
33061 " cat > test.reg <<'EOF'\n"
33062 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
33063 " \"Test\"=\"c:\\\\test.bat\"\n"
33070 #: ../tools/virt-win-reg.pl:489
33072 "In this example we use the key C<RunOnce> which means that the script will "
33073 "run precisely once when the first user logs in. If you want it to run every "
33074 "time a user logs in, replace C<RunOnce> with C<Run>."
33079 #: ../tools/virt-win-reg.pl:493
33080 msgid "Now update the registry:"
33085 #: ../tools/virt-win-reg.pl:495
33088 " virt-win-reg --merge WindowsGuest test.reg\n"
33094 #: ../tools/virt-win-reg.pl:497
33095 msgid "INSTALLING A SERVICE"
33100 #: ../tools/virt-win-reg.pl:499
33102 "This section assumes you are familiar with Windows services, and you either "
33103 "have a program which handles the Windows Service Control Protocol directly "
33104 "or you want to run any program using a service wrapper like SrvAny or the "
33110 #: ../tools/virt-win-reg.pl:504
33112 "First upload the program and optionally the service wrapper. In this case "
33113 "the test program is called C<test.exe> and we are using the RHSrvAny wrapper:"
33118 #: ../tools/virt-win-reg.pl:508
33121 " guestfish -i -d WindowsGuest <<EOF\n"
33122 " upload rhsrvany.exe /rhsrvany.exe\n"
33123 " upload test.exe /test.exe\n"
33130 #: ../tools/virt-win-reg.pl:513
33132 "Prepare a regedit file containing the registry changes. In this example, "
33133 "the first registry change is needed for the service itself or the service "
33134 "wrapper (if used). The second registry change is only needed because I am "
33135 "using the RHSrvAny service wrapper."
33140 #: ../tools/virt-win-reg.pl:518
33143 " cat > service.reg <<'EOF'\n"
33144 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
33145 " \"Type\"=dword:00000010\n"
33146 " \"Start\"=dword:00000002\n"
33147 " \"ErrorControl\"=dword:00000001\n"
33148 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
33149 " \"DisplayName\"=\"RHSrvAny\"\n"
33150 " \"ObjectName\"=\"NetworkService\"\n"
33156 #: ../tools/virt-win-reg.pl:527
33159 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
33160 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
33161 " \"PWD\"=\"c:\\\\Temp\"\n"
33168 #: ../tools/virt-win-reg.pl:538
33170 "For use of C<ControlSet001> see the section above in this manual page. You "
33171 "may need to adjust this according to the control set that is in use by the "
33177 #: ../tools/virt-win-reg.pl:544
33179 "C<\"ObjectName\"> controls the privileges that the service will have. An "
33180 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
33181 "privileged account."
33186 #: ../tools/virt-win-reg.pl:550
33188 "For the meaning of the magic numbers, see this Microsoft KB article: "
33189 "L<http://support.microsoft.com/kb/103000>."
33194 #: ../tools/virt-win-reg.pl:555
33195 msgid "Update the registry:"
33200 #: ../tools/virt-win-reg.pl:557
33203 " virt-win-reg --merge WindowsGuest service.reg\n"
33209 #: ../tools/virt-win-reg.pl:559 ../tools/virt-list-filesystems.pl:182
33210 #: ../tools/virt-tar.pl:279 ../tools/virt-make-fs.pl:532
33211 #: ../tools/virt-list-partitions.pl:250
33212 msgid "SHELL QUOTING"
33217 #: ../tools/virt-win-reg.pl:561
33219 "Be careful when passing parameters containing C<\\> (backslash) in the "
33220 "shell. Usually you will have to use 'single quotes' or double backslashes "
33221 "(but not both) to protect them from the shell."
33226 #: ../tools/virt-win-reg.pl:565
33227 msgid "Paths and value names are case-insensitive."
33232 #: ../tools/virt-win-reg.pl:567 ../tools/virt-list-filesystems.pl:184
33233 #: ../tools/virt-tar.pl:281 ../tools/virt-make-fs.pl:534
33234 #: ../tools/virt-list-partitions.pl:252
33236 "Libvirt guest names can contain arbitrary characters, some of which have "
33237 "meaning to the shell such as C<#> and space. You may need to quote or "
33238 "escape these characters on the command line. See the shell manual page L<sh"
33239 "(1)> for details."
33244 #: ../tools/virt-win-reg.pl:574
33246 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
33247 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
33248 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
33253 #: ../tools/virt-win-reg.pl:589 ../tools/virt-make-fs.pl:555
33255 "When reporting bugs, please enable debugging and capture the I<complete> "
33261 #: ../tools/virt-win-reg.pl:592
33264 " export LIBGUESTFS_DEBUG=1\n"
33265 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
33271 #: ../tools/virt-win-reg.pl:595
33273 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."
33279 #: ../tools/virt-win-reg.pl:598 ../tools/virt-list-filesystems.pl:202
33280 #: ../tools/virt-tar.pl:301 ../tools/virt-make-fs.pl:564
33281 #: ../tools/virt-list-partitions.pl:269
33287 #: ../tools/virt-win-reg.pl:600 ../tools/virt-list-filesystems.pl:204
33288 #: ../tools/virt-tar.pl:303 ../tools/virt-make-fs.pl:566
33289 #: ../tools/virt-list-partitions.pl:271
33290 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
33295 #: ../tools/virt-win-reg.pl:604 ../tools/virt-make-fs.pl:570
33296 msgid "Copyright (C) 2010 Red Hat Inc."
33301 #: ../tools/virt-list-filesystems.pl:32
33303 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
33308 #: ../tools/virt-list-filesystems.pl:36
33311 " virt-list-filesystems [--options] domname\n"
33317 #: ../tools/virt-list-filesystems.pl:38
33320 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
33326 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
33328 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
33334 #: ../tools/virt-list-filesystems.pl:45
33336 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
33337 "are contained in a virtual machine or disk image."
33342 #: ../tools/virt-list-filesystems.pl:49
33344 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
33345 "functionality. For more complex cases you should look at the L<guestfish(1)"
33351 #: ../tools/virt-list-filesystems.pl:106 ../tools/virt-list-partitions.pl:115
33352 msgid "B<-l> | B<--long>"
33357 #: ../tools/virt-list-filesystems.pl:108
33359 "With this option, C<virt-list-filesystems> displays the type of each "
33360 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
33365 #: ../tools/virt-list-filesystems.pl:115
33366 msgid "B<-a> | B<--all>"
33371 #: ../tools/virt-list-filesystems.pl:117
33373 "Normally we only show mountable filesystems. If this option is given then "
33374 "swap devices are shown too."
33379 #: ../tools/virt-list-filesystems.pl:191
33381 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-"
33382 "filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::"
33383 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
33388 #: ../tools/virt-list-filesystems.pl:208 ../tools/virt-tar.pl:307
33389 msgid "Copyright (C) 2009 Red Hat Inc."
33394 #: ../tools/virt-tar.pl:33
33395 msgid "virt-tar - Extract or upload files to a virtual machine"
33400 #: ../tools/virt-tar.pl:37
33403 " virt-tar [--options] -x domname directory tarball\n"
33409 #: ../tools/virt-tar.pl:39
33412 " virt-tar [--options] -u domname tarball directory\n"
33418 #: ../tools/virt-tar.pl:41
33421 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
33427 #: ../tools/virt-tar.pl:43
33430 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
33435 #: ../tools/virt-tar.pl:47
33437 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-"
33438 "tar-in(1)>, L<virt-tar-out(1)> as replacements."
33443 #: ../tools/virt-tar.pl:52
33444 msgid "Download C</home> from the VM into a local tarball:"
33449 #: ../tools/virt-tar.pl:54
33452 " virt-tar -x domname /home home.tar\n"
33458 #: ../tools/virt-tar.pl:56
33461 " virt-tar -zx domname /home home.tar.gz\n"
33467 #: ../tools/virt-tar.pl:58
33468 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
33473 #: ../tools/virt-tar.pl:60
33476 " virt-tar -u domname uploadstuff.tar /tmp\n"
33482 #: ../tools/virt-tar.pl:62
33485 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
33490 #: ../tools/virt-tar.pl:66
33492 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
33493 "virtual machines. If you do this, you risk disk corruption in the VM. "
33494 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
33498 #: ../tools/virt-tar.pl:71
33500 "You can use I<-x> (extract) on live virtual machines, but you might get "
33501 "inconsistent results or errors if there is filesystem activity inside the "
33502 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
33503 "work, but the only way to guarantee consistent results is if the virtual "
33504 "machine is shut down."
33509 #: ../tools/virt-tar.pl:79
33511 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
33512 "parts of a guest filesystem. There are many possibilities: making backups, "
33513 "uploading data files, snooping on guest activity, fixing or customizing "
33519 #: ../tools/virt-tar.pl:84
33521 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
33522 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
33523 "should look at the L<guestfish(1)> tool."
33527 #: ../tools/virt-tar.pl:88
33529 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
33530 "its contents (recursively) from the virtual machine into a local tarball. "
33531 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
33532 "virtual machine. You cannot use these two options together."
33536 #: ../tools/virt-tar.pl:94
33538 "In addition, you may need to use the I<-z> (gZip) option to enable "
33539 "compression. When uploading, you have to specify I<-z> if the upload file "
33540 "is compressed because virt-tar won't detect this on its own."
33545 #: ../tools/virt-tar.pl:98
33547 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
33548 "example it cannot do PKZip files or bzip2 compression. If you want that "
33549 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
33550 "the L<libguestfs(3)> API)."
33555 #: ../tools/virt-tar.pl:156
33556 msgid "B<-x> | B<--extract> | B<--download>"
33561 #: ../tools/virt-tar.pl:158
33562 msgid "B<-u> | B<--upload>"
33566 #: ../tools/virt-tar.pl:160
33568 "Use I<-x> to extract (download) a directory from a virtual machine to a "
33573 #: ../tools/virt-tar.pl:163
33575 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
33576 "Please read the L</WARNING> section above before using this option."
33581 #: ../tools/virt-tar.pl:167
33582 msgid "You must specify exactly one of these options."
33587 #: ../tools/virt-tar.pl:173
33588 msgid "B<-z> | B<--gzip>"
33593 #: ../tools/virt-tar.pl:175
33594 msgid "Specify that the input or output tarball is gzip-compressed."
33598 #: ../tools/virt-tar.pl:288
33600 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-copy-"
33601 "in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<Sys::"
33602 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
33608 #: ../tools/virt-make-fs.pl:37
33609 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
33614 #: ../tools/virt-make-fs.pl:41
33617 " virt-make-fs [--options] input.tar output.img\n"
33623 #: ../tools/virt-make-fs.pl:43
33626 " virt-make-fs [--options] input.tar.gz output.img\n"
33632 #: ../tools/virt-make-fs.pl:45
33635 " virt-make-fs [--options] directory output.img\n"
33641 #: ../tools/virt-make-fs.pl:49
33643 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
33644 "archive or some files in a directory. It is similar to tools like L<mkisofs"
33645 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
33646 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
33647 "you want to attach these filesystems to existing virtual machines (eg. to "
33648 "import large amounts of read-only data to a VM)."
33653 #: ../tools/virt-make-fs.pl:57
33654 msgid "Basic usage is:"
33659 #: ../tools/virt-make-fs.pl:59
33662 " virt-make-fs input output\n"
33668 #: ../tools/virt-make-fs.pl:61
33670 "where C<input> is either a directory containing files that you want to add, "
33671 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
33672 "C<output> is a disk image. The input type is detected automatically. The "
33673 "output disk image defaults to a raw ext2 image unless you specify extra "
33674 "flags (see L</OPTIONS> below)."
33679 #: ../tools/virt-make-fs.pl:67
33680 msgid "EXTRA SPACE"
33684 #: ../tools/virt-make-fs.pl:69
33686 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
33687 "the files that it contains, but might have extra space. Depending on how "
33688 "you are going to use the output, you might think this extra space is wasted "
33689 "and want to minimize it, or you might want to leave space so that more files "
33690 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
33691 "but you can use the I<--size> flag to leave space in the filesystem if you "
33696 #: ../tools/virt-make-fs.pl:77
33698 "An alternative way to leave extra space but not make the output image any "
33699 "bigger is to use an alternative disk image format (instead of the default "
33700 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
33701 "image format (check your hypervisor supports this before using it). This "
33702 "allows you to choose a large I<--size> but the extra space won't actually be "
33703 "allocated in the image until you try to store something in it."
33707 #: ../tools/virt-make-fs.pl:85
33709 "Don't forget that you can also use local commands including L<resize2fs(8)> "
33710 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
33711 "to build another image from scratch."
33716 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123
33717 #: ../tools/virt-make-fs.pl:142
33723 #: ../tools/virt-make-fs.pl:91
33726 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
33732 #: ../tools/virt-make-fs.pl:93
33733 msgid "FILESYSTEM TYPE"
33738 #: ../tools/virt-make-fs.pl:95
33740 "The default filesystem type is C<ext2>. Just about any filesystem type that "
33741 "libguestfs supports can be used (but I<not> read-only formats like "
33742 "ISO9660). Here are some of the more common choices:"
33747 #: ../tools/virt-make-fs.pl:101
33753 #: ../tools/virt-make-fs.pl:103
33755 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
33756 "you are not going to use the filesystem in a way that requires the journal, "
33757 "then this is just wasted overhead."
33762 #: ../tools/virt-make-fs.pl:107
33763 msgid "I<ntfs> or I<vfat>"
33768 #: ../tools/virt-make-fs.pl:109
33769 msgid "Useful if exporting data to a Windows guest."
33774 #: ../tools/virt-make-fs.pl:111
33776 "I<Note for vfat>: The tar archive or local directory must only contain files "
33777 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
33778 "program running within libguestfs is unable to change the ownership of non-"
33779 "root files, since vfat itself does not support this."
33784 #: ../tools/virt-make-fs.pl:116
33790 #: ../tools/virt-make-fs.pl:118
33792 "Lower overhead than C<ext2>, but certain limitations on filename length and "
33793 "total filesystem size."
33798 #: ../tools/virt-make-fs.pl:125
33801 " virt-make-fs --type=minix input minixfs.img\n"
33807 #: ../tools/virt-make-fs.pl:127
33808 msgid "TO PARTITION OR NOT TO PARTITION"
33813 #: ../tools/virt-make-fs.pl:129
33814 msgid "Optionally virt-make-fs can add a partition table to the output disk."
33819 #: ../tools/virt-make-fs.pl:131
33821 "Adding a partition can make the disk image more compatible with certain "
33822 "virtualized operating systems which don't expect to see a filesystem "
33823 "directly located on a block device (Linux doesn't care and will happily "
33824 "handle both types)."
33829 #: ../tools/virt-make-fs.pl:136
33831 "On the other hand, if you have a partition table then the output image is no "
33832 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
33833 "directly on a partitioned disk image. (However libguestfs tools such as "
33834 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
33839 #: ../tools/virt-make-fs.pl:144
33840 msgid "Add an MBR partition:"
33845 #: ../tools/virt-make-fs.pl:146
33848 " virt-make-fs --partition -- input disk.img\n"
33854 #: ../tools/virt-make-fs.pl:148
33856 "If the output disk image could be terabyte-sized or larger, it's better to "
33857 "use an EFI/GPT-compatible partition table:"
33862 #: ../tools/virt-make-fs.pl:151
33865 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
33871 #: ../tools/virt-make-fs.pl:179
33872 msgid "Enable debugging information."
33877 #: ../tools/virt-make-fs.pl:185
33878 msgid "B<--size=E<lt>NE<gt>>"
33883 #: ../tools/virt-make-fs.pl:187
33884 msgid "B<--size=+E<lt>NE<gt>>"
33889 #: ../tools/virt-make-fs.pl:189
33890 msgid "B<-s E<lt>NE<gt>>"
33895 #: ../tools/virt-make-fs.pl:191
33896 msgid "B<-s +E<lt>NE<gt>>"
33900 #: ../tools/virt-make-fs.pl:193
33902 "Use the I<--size> (or I<-s>) option to choose the size of the output image."
33907 #: ../tools/virt-make-fs.pl:196
33909 "If this option is I<not> given, then the output image will be just large "
33910 "enough to contain all the files, with not much wasted space."
33915 #: ../tools/virt-make-fs.pl:199
33917 "To choose a fixed size output disk, specify an absolute number followed by b/"
33918 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
33919 "Petabytes or Exabytes. This must be large enough to contain all the input "
33920 "files, else you will get an error."
33924 #: ../tools/virt-make-fs.pl:204
33926 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
33927 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
33928 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
33929 "the input files, and (approximately) an extra 200 MB free space."
33934 #: ../tools/virt-make-fs.pl:210
33936 "Note that virt-make-fs estimates free space, and therefore will not produce "
33937 "filesystems containing precisely the free space requested. (It is much more "
33938 "expensive and time-consuming to produce a filesystem which has precisely the "
33939 "desired free space)."
33944 #: ../tools/virt-make-fs.pl:219
33945 msgid "B<--format=E<lt>fmtE<gt>>"
33950 #: ../tools/virt-make-fs.pl:221
33951 msgid "B<-F E<lt>fmtE<gt>>"
33956 #: ../tools/virt-make-fs.pl:223
33957 msgid "Choose the output disk image format."
33962 #: ../tools/virt-make-fs.pl:225
33963 msgid "The default is C<raw> (raw disk image)."
33968 #: ../tools/virt-make-fs.pl:227
33970 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
33971 "that would really make sense here is C<qcow2>."
33976 #: ../tools/virt-make-fs.pl:234
33977 msgid "B<--type=E<lt>fsE<gt>>"
33982 #: ../tools/virt-make-fs.pl:236
33983 msgid "B<-t E<lt>fsE<gt>>"
33988 #: ../tools/virt-make-fs.pl:238
33989 msgid "Choose the output filesystem type."
33994 #: ../tools/virt-make-fs.pl:240
33995 msgid "The default is C<ext2>."
34000 #: ../tools/virt-make-fs.pl:242
34002 "Any filesystem which is supported read-write by libguestfs can be used here."
34007 #: ../tools/virt-make-fs.pl:249
34008 msgid "B<--partition>"
34013 #: ../tools/virt-make-fs.pl:251
34014 msgid "B<--partition=E<lt>parttypeE<gt>>"
34019 #: ../tools/virt-make-fs.pl:253
34021 "If specified, this flag adds an MBR partition table to the output disk image."
34025 #: ../tools/virt-make-fs.pl:256
34027 "You can change the partition table type, eg. I<--partition=gpt> for large "
34032 #: ../tools/virt-make-fs.pl:259
34034 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
34035 "might consider the next parameter to be the partition type. For example:"
34040 #: ../tools/virt-make-fs.pl:263
34043 " virt-make-fs --partition input.tar ...\n"
34048 #: ../tools/virt-make-fs.pl:265
34050 "would cause virt-make-fs to think you wanted to use a partition type of "
34051 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
34052 "dash) between options and the input file argument:"
34057 #: ../tools/virt-make-fs.pl:269
34060 " virt-make-fs --partition -- input.tar ...\n"
34065 #: ../tools/virt-make-fs.pl:541
34067 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
34068 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
34069 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
34074 #: ../tools/virt-make-fs.pl:558
34077 " export LIBGUESTFS_DEBUG=1\n"
34078 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
34084 #: ../tools/virt-make-fs.pl:561
34086 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
34092 #: ../tools/virt-list-partitions.pl:32
34094 "virt-list-partitions - List partitions in a virtual machine or disk image"
34099 #: ../tools/virt-list-partitions.pl:36
34102 " virt-list-partitions [--options] domname\n"
34108 #: ../tools/virt-list-partitions.pl:38
34111 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
34117 #: ../tools/virt-list-partitions.pl:45
34119 "C<virt-list-partitions> is a command line tool to list the partitions that "
34120 "are contained in a virtual machine or disk image. It is mainly useful as a "
34121 "first step to using L<virt-resize(1)>."
34126 #: ../tools/virt-list-partitions.pl:50
34128 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
34129 "functionality. For more complex cases you should look at the L<guestfish(1)"
34135 #: ../tools/virt-list-partitions.pl:107
34136 msgid "B<-h> | B<--human-readable>"
34141 #: ../tools/virt-list-partitions.pl:109
34142 msgid "Show sizes in human-readable form (eg. \"1G\")."
34147 #: ../tools/virt-list-partitions.pl:117
34149 "With this option, C<virt-list-partitions> displays the type and size of each "
34150 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
34155 #: ../tools/virt-list-partitions.pl:124
34156 msgid "B<-t> | B<--total>"
34161 #: ../tools/virt-list-partitions.pl:126
34163 "Display the total size of each block device (as a separate row or rows)."
34168 #: ../tools/virt-list-partitions.pl:259
34170 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-list-"
34171 "filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib"
34172 "(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
34177 #: ../tools/virt-list-partitions.pl:275
34178 msgid "Copyright (C) 2009-2010 Red Hat Inc."