1 # SOME DESCRIPTIVE TITLE.
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
10 "POT-Creation-Date: 2011-07-12 19:46+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:2972 ../src/guestfs.pod:2976 ../src/guestfs.pod:2980
927 #: ../src/guestfs.pod:2984 ../src/guestfs-actions.pod:15
928 #: ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:583
929 #: ../src/guestfs-actions.pod:591 ../src/guestfs-actions.pod:598
930 #: ../src/guestfs-actions.pod:605 ../src/guestfs-actions.pod:1603
931 #: ../src/guestfs-actions.pod:1607 ../src/guestfs-actions.pod:1611
932 #: ../src/guestfs-actions.pod:1615 ../src/guestfs-actions.pod:1623
933 #: ../src/guestfs-actions.pod:1627 ../src/guestfs-actions.pod:1631
934 #: ../src/guestfs-actions.pod:1641 ../src/guestfs-actions.pod:1645
935 #: ../src/guestfs-actions.pod:1649 ../src/guestfs-actions.pod:1787
936 #: ../src/guestfs-actions.pod:1791 ../src/guestfs-actions.pod:1796
937 #: ../src/guestfs-actions.pod:1801 ../src/guestfs-actions.pod:1862
938 #: ../src/guestfs-actions.pod:1866 ../src/guestfs-actions.pod:1871
939 #: ../src/guestfs-actions.pod:2789 ../src/guestfs-actions.pod:2795
940 #: ../src/guestfs-actions.pod:2803 ../src/guestfs-actions.pod:2810
941 #: ../src/guestfs-actions.pod:2817 ../fish/guestfish.pod:445
942 #: ../fish/guestfish.pod:449 ../fish/guestfish.pod:453
943 #: ../fish/guestfish.pod:457 ../fish/guestfish-actions.pod:13
944 #: ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:385
945 #: ../fish/guestfish-actions.pod:393 ../fish/guestfish-actions.pod:400
946 #: ../fish/guestfish-actions.pod:407 ../fish/guestfish-actions.pod:1074
947 #: ../fish/guestfish-actions.pod:1078 ../fish/guestfish-actions.pod:1082
948 #: ../fish/guestfish-actions.pod:1086 ../fish/guestfish-actions.pod:1094
949 #: ../fish/guestfish-actions.pod:1098 ../fish/guestfish-actions.pod:1102
950 #: ../fish/guestfish-actions.pod:1112 ../fish/guestfish-actions.pod:1116
951 #: ../fish/guestfish-actions.pod:1120 ../fish/guestfish-actions.pod:1210
952 #: ../fish/guestfish-actions.pod:1214 ../fish/guestfish-actions.pod:1219
953 #: ../fish/guestfish-actions.pod:1224 ../fish/guestfish-actions.pod:1266
954 #: ../fish/guestfish-actions.pod:1270 ../fish/guestfish-actions.pod:1275
955 #: ../fish/guestfish-actions.pod:1902 ../fish/guestfish-actions.pod:1908
956 #: ../fish/guestfish-actions.pod:1916 ../fish/guestfish-actions.pod:1923
957 #: ../fish/guestfish-actions.pod:1930 ../tools/virt-win-reg.pl:195
958 #: ../tools/virt-win-reg.pl:200 ../tools/virt-win-reg.pl:206
959 #: ../tools/virt-win-reg.pl:708 ../tools/virt-win-reg.pl:714
960 #: ../tools/virt-win-reg.pl:720
966 #: ../src/guestfs.pod:390
968 "The kernel version that the command runs under will be different from what "
974 #: ../src/guestfs.pod:395
976 "If the command needs to communicate with daemons, then most likely they "
982 #: ../src/guestfs.pod:400
983 msgid "The command will be running in limited memory."
988 #: ../src/guestfs.pod:404
990 "The network may not be available unless you enable it (see L</"
991 "guestfs_set_network>)."
996 #: ../src/guestfs.pod:409
997 msgid "Only supports Linux guests (not Windows, BSD, etc)."
1002 #: ../src/guestfs.pod:413
1004 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
1009 #: ../src/guestfs.pod:418
1011 "For SELinux guests, you may need to enable SELinux and load policy first. "
1012 "See L</SELINUX> in this manpage."
1017 #: ../src/guestfs.pod:423
1019 "I<Security:> It is not safe to run commands from untrusted, possibly "
1020 "malicious guests. These commands may attempt to exploit your program by "
1021 "sending unexpected output. They could also try to exploit the Linux kernel "
1022 "or qemu provided by the libguestfs appliance. They could use the network "
1023 "provided by the libguestfs appliance to bypass ordinary network partitions "
1024 "and firewalls. They could use the elevated privileges or different SELinux "
1025 "context of your program to their advantage."
1030 #: ../src/guestfs.pod:432
1032 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
1033 "(a script which runs when the guest next boots normally), and to have this "
1034 "script run the commands you want in the normal context of the running guest, "
1035 "network security and so on. For information about other security issues, "
1041 #: ../src/guestfs.pod:440
1043 "The two main API calls to run commands are L</guestfs_command> and L</"
1044 "guestfs_sh> (there are also variations)."
1049 #: ../src/guestfs.pod:443
1051 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
1052 "shell globs, redirections, etc will work."
1057 #: ../src/guestfs.pod:446
1058 msgid "CONFIGURATION FILES"
1063 #: ../src/guestfs.pod:448
1065 "To read and write configuration files in Linux guest filesystems, we "
1066 "strongly recommend using Augeas. For example, Augeas understands how to "
1067 "read and write, say, a Linux shadow password file or X.org configuration "
1068 "file, and so avoids you having to write that code."
1073 #: ../src/guestfs.pod:453
1075 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
1076 "document Augeas itself here because there is excellent documentation on the "
1077 "L<http://augeas.net/> website."
1082 #: ../src/guestfs.pod:457
1084 "If you don't want to use Augeas (you fool!) then try calling L</"
1085 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
1091 #: ../src/guestfs.pod:461
1097 #: ../src/guestfs.pod:463
1099 "We support SELinux guests. To ensure that labeling happens correctly in "
1100 "SELinux guests, you need to enable SELinux and load the guest's policy:"
1105 #: ../src/guestfs.pod:469 ../src/guestfs.pod:1257 ../src/guestfs.pod:1395
1106 #: ../src/guestfs.pod:2426
1112 #: ../src/guestfs.pod:471
1113 msgid "Before launching, do:"
1118 #: ../src/guestfs.pod:473
1121 " guestfs_set_selinux (g, 1);\n"
1127 #: ../src/guestfs.pod:475 ../src/guestfs.pod:1261 ../src/guestfs.pod:1399
1128 #: ../src/guestfs.pod:2451
1134 #: ../src/guestfs.pod:477
1136 "After mounting the guest's filesystem(s), load the policy. This is best "
1137 "done by running the L<load_policy(8)> command in the guest itself:"
1142 #: ../src/guestfs.pod:481
1145 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
1151 #: ../src/guestfs.pod:483
1153 "(Older versions of C<load_policy> require you to specify the name of the "
1159 #: ../src/guestfs.pod:486 ../src/guestfs.pod:1405
1165 #: ../src/guestfs.pod:488
1167 "Optionally, set the security context for the API. The correct security "
1168 "context to use can only be known by inspecting the guest. As an example:"
1173 #: ../src/guestfs.pod:492
1176 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
1182 #: ../src/guestfs.pod:496
1183 msgid "This will work for running commands and editing existing files."
1188 #: ../src/guestfs.pod:498
1190 "When new files are created, you may need to label them explicitly, for "
1191 "example by running the external command C<restorecon pathname>."
1196 #: ../src/guestfs.pod:502
1202 #: ../src/guestfs.pod:504
1204 "Certain calls are affected by the current file mode creation mask (the "
1205 "\"umask\"). In particular ones which create files or directories, such as "
1206 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
1207 "either the default mode that the file is created with or modifies the mode "
1213 #: ../src/guestfs.pod:510
1215 "The default umask is C<022>, so files are created with modes such as C<0644> "
1216 "and directories with C<0755>."
1221 #: ../src/guestfs.pod:513
1223 "There are two ways to avoid being affected by umask. Either set umask to 0 "
1224 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
1225 "guestfs_chmod> after creating each file or directory."
1230 #: ../src/guestfs.pod:517
1231 msgid "For more information about umask, see L<umask(2)>."
1236 #: ../src/guestfs.pod:519 ../fish/guestfish.pod:767
1237 msgid "ENCRYPTED DISKS"
1242 #: ../src/guestfs.pod:521
1244 "Libguestfs allows you to access Linux guests which have been encrypted using "
1245 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1246 "standard. This includes nearly all whole disk encryption systems used by "
1247 "modern Linux guests."
1252 #: ../src/guestfs.pod:527
1254 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1255 "returns the string C<crypto_LUKS>)."
1260 #: ../src/guestfs.pod:530
1262 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
1263 "will require the passphrase!"
1268 #: ../src/guestfs.pod:533
1270 "Opening a LUKS device creates a new device mapper device called C</dev/"
1271 "mapper/mapname> (where C<mapname> is the string you supply to L</"
1272 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
1273 "from and encrypted to the underlying block device respectively."
1278 #: ../src/guestfs.pod:539
1280 "LVM volume groups on the device can be made visible by calling L</"
1281 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
1282 "(s) can now be mounted in the usual way."
1287 #: ../src/guestfs.pod:543
1289 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1290 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1291 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
1292 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1293 "underlying encrypted block device)."
1298 #: ../src/guestfs.pod:550
1303 #: ../src/guestfs.pod:552
1305 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1306 "contains operating systems, an install CD or a live CD. (These APIs used to "
1307 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
1308 "version 1.5.3 the most frequently used part of this library has been "
1309 "rewritten in C and moved into the core code)."
1314 #: ../src/guestfs.pod:559
1316 "Add all disks belonging to the unknown virtual machine and call L</"
1317 "guestfs_launch> in the usual way."
1322 #: ../src/guestfs.pod:562
1324 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1325 "and certain heuristics, and returns a list of operating systems that were "
1326 "found. An empty list means none were found. A single element is the root "
1327 "filesystem of the operating system. For dual- or multi-boot guests, "
1328 "multiple roots can be returned, each one corresponding to a separate "
1329 "operating system. (Multi-boot virtual machines are extremely rare in the "
1330 "world of virtualization, but since this scenario can happen, we have built "
1331 "libguestfs to deal with it.)"
1336 #: ../src/guestfs.pod:571
1338 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1339 "to get additional details about that operating system. For example, call L</"
1340 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1341 "Windows and Linux-based operating systems respectively."
1346 #: ../src/guestfs.pod:577
1348 "Un*x-like and Linux-based operating systems usually consist of several "
1349 "filesystems which are mounted at boot time (for example, a separate boot "
1350 "partition mounted on C</boot>). The inspection rules are able to detect how "
1351 "filesystems correspond to mount points. Call "
1352 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1353 "hash table like this example:"
1358 #: ../src/guestfs.pod:584
1361 " /boot => /dev/sda1\n"
1362 " / => /dev/vg_guest/lv_root\n"
1363 " /usr => /dev/vg_guest/lv_usr\n"
1369 #: ../src/guestfs.pod:588
1371 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1372 "filesystems as suggested."
1377 #: ../src/guestfs.pod:591
1379 "Be careful to mount filesystems in the right order (eg. C</> before C</"
1380 "usr>). Sorting the keys of the hash by length, shortest first, should work."
1385 #: ../src/guestfs.pod:595
1387 "Inspection currently only works for some common operating systems. "
1388 "Contributors are welcome to send patches for other operating systems that we "
1389 "currently cannot detect."
1394 #: ../src/guestfs.pod:599
1396 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1397 "for more details. The L</guestfs_inspect_os> function just ignores any "
1398 "encrypted devices."
1403 #: ../src/guestfs.pod:603
1405 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1406 "inspection and caches the results in the guest handle. Subsequent calls to "
1407 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
1408 "read the disks. If you change the content of the guest disks, you can redo "
1409 "inspection by calling L</guestfs_inspect_os> again. (L</"
1410 "guestfs_inspect_list_applications> works a little differently from the other "
1411 "calls and does read the disks. See documentation for that function for "
1416 #: ../src/guestfs.pod:612
1417 msgid "INSPECTING INSTALL DISKS"
1421 #: ../src/guestfs.pod:614
1423 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
1428 #: ../src/guestfs.pod:617
1430 "Call L</guestfs_inspect_get_format> to return the format of the operating "
1431 "system, which currently can be C<installed> (a regular operating system) or "
1432 "C<installer> (some sort of install disk)."
1436 #: ../src/guestfs.pod:621
1438 "Further information is available about the operating system that can be "
1439 "installed using the regular inspection APIs like L</"
1440 "guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> etc."
1444 #: ../src/guestfs.pod:626
1446 "Some additional information specific to installer disks is also available "
1447 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and L</"
1448 "guestfs_inspect_is_multipart> calls."
1453 #: ../src/guestfs.pod:631
1454 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1459 #: ../src/guestfs.pod:633
1461 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
1462 "ntfs-3g.org/> driver."
1467 #: ../src/guestfs.pod:636
1468 msgid "DRIVE LETTERS AND PATHS"
1473 #: ../src/guestfs.pod:638
1475 "DOS and Windows still use drive letters, and the filesystems are always "
1476 "treated as case insensitive by Windows itself, and therefore you might find "
1477 "a Windows configuration file referring to a path like C<c:\\windows"
1478 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
1479 "might be referred to as C</WINDOWS/System32>."
1483 #: ../src/guestfs.pod:644
1485 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
1486 "L</guestfs_inspect_get_drive_mappings>)"
1490 #: ../src/guestfs.pod:647
1492 "Dealing with separator characters (backslash vs forward slash) is outside "
1493 "the scope of libguestfs, but usually a simple character replacement will "
1498 #: ../src/guestfs.pod:651
1500 "To resolve the case insensitivity of paths, call L</"
1501 "guestfs_case_sensitive_path>."
1506 #: ../src/guestfs.pod:654
1507 msgid "ACCESSING THE WINDOWS REGISTRY"
1512 #: ../src/guestfs.pod:656
1514 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1515 "files, through the library C<hivex> which is part of the libguestfs project "
1516 "although ships as a separate tarball. You have to locate and download the "
1517 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1518 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
1519 "reg(1)> for more help on this issue."
1524 #: ../src/guestfs.pod:664
1525 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
1530 #: ../src/guestfs.pod:666
1532 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
1533 "provide something which looks like a Linux symlink. The way it tries to do "
1534 "the rewriting is described here:"
1539 #: ../src/guestfs.pod:670
1541 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
1547 #: ../src/guestfs.pod:672
1549 "The essential problem is that ntfs-3g simply does not have enough "
1550 "information to do a correct job. NTFS links can contain drive letters and "
1551 "references to external device GUIDs that ntfs-3g has no way of resolving. "
1552 "It is almost certainly the case that libguestfs callers should ignore what "
1553 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
1558 #: ../src/guestfs.pod:679
1560 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use L</"
1561 "guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
1562 "attribute, and read the raw reparse data from that (you can find the format "
1563 "documented in various places around the web)."
1568 #: ../src/guestfs.pod:684
1569 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
1574 #: ../src/guestfs.pod:686
1576 "There are other useful extended attributes that can be read from ntfs-3g "
1577 "filesystems (using L</guestfs_getxattr>). See:"
1582 #: ../src/guestfs.pod:689
1584 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
1589 #: ../src/guestfs.pod:691
1590 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1595 #: ../src/guestfs.pod:693
1597 "Although we don't want to discourage you from using the C API, we will "
1598 "mention here that the same API is also available in other languages."
1602 #: ../src/guestfs.pod:696
1604 "The API is broadly identical in all supported languages. This means that "
1605 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
1606 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
1607 "OCaml. In other words, a straightforward, predictable isomorphism between "
1613 #: ../src/guestfs.pod:702
1615 "Error messages are automatically transformed into exceptions if the language "
1621 #: ../src/guestfs.pod:705
1623 "We don't try to \"object orientify\" parts of the API in OO languages, "
1624 "although contributors are welcome to write higher level APIs above what we "
1625 "provide in their favourite languages if they wish."
1630 #: ../src/guestfs.pod:711
1636 #: ../src/guestfs.pod:713
1638 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1639 "identical to the C API. C++ classes and exceptions are not used."
1644 #: ../src/guestfs.pod:717
1650 #: ../src/guestfs.pod:719
1652 "The C# bindings are highly experimental. Please read the warnings at the "
1653 "top of C<csharp/Libguestfs.cs>."
1658 #: ../src/guestfs.pod:722
1664 #: ../src/guestfs.pod:724
1666 "This is the only language binding that is working but incomplete. Only "
1667 "calls which return simple integers have been bound in Haskell, and we are "
1668 "looking for help to complete this binding."
1673 #: ../src/guestfs.pod:728
1679 #: ../src/guestfs.pod:730
1681 "Full documentation is contained in the Javadoc which is distributed with "
1687 #: ../src/guestfs.pod:733
1692 #: ../src/guestfs.pod:735
1693 msgid "See L<guestfs-ocaml(3)>."
1698 #: ../src/guestfs.pod:737
1703 #: ../src/guestfs.pod:739
1704 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
1709 #: ../src/guestfs.pod:741
1715 #: ../src/guestfs.pod:743
1717 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1718 "the php-libguestfs package for your distribution."
1723 #: ../src/guestfs.pod:746
1724 msgid "The PHP binding only works correctly on 64 bit machines."
1729 #: ../src/guestfs.pod:748
1734 #: ../src/guestfs.pod:750
1735 msgid "See L<guestfs-python(3)>."
1740 #: ../src/guestfs.pod:752
1745 #: ../src/guestfs.pod:754
1746 msgid "See L<guestfs-ruby(3)>."
1751 #: ../src/guestfs.pod:756
1752 msgid "B<shell scripts>"
1756 #: ../src/guestfs.pod:758
1757 msgid "See L<guestfish(1)>."
1762 #: ../src/guestfs.pod:762
1763 msgid "LIBGUESTFS GOTCHAS"
1768 #: ../src/guestfs.pod:764
1770 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1771 "system [...] that works in the way it is documented but is counterintuitive "
1772 "and almost invites mistakes.\""
1777 #: ../src/guestfs.pod:768
1779 "Since we developed libguestfs and the associated tools, there are several "
1780 "things we would have designed differently, but are now stuck with for "
1781 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1782 "release, you can expect these to change. Beware of them."
1787 #: ../src/guestfs.pod:776
1788 msgid "Autosync / forgetting to sync."
1792 #: ../src/guestfs.pod:778
1794 "I<Update:> Autosync is enabled by default for all API users starting from "
1795 "libguestfs 1.5.24. This section only applies to older versions."
1800 #: ../src/guestfs.pod:781
1802 "When modifying a filesystem from C or another language, you B<must> unmount "
1803 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1804 "libguestfs handle. You can also call:"
1809 #: ../src/guestfs.pod:785
1812 " guestfs_set_autosync (g, 1);\n"
1818 #: ../src/guestfs.pod:787
1820 "to have the unmount/sync done automatically for you when the handle 'g' is "
1821 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
1826 #: ../src/guestfs.pod:791
1828 "If you forget to do this, then it is entirely possible that your changes "
1829 "won't be written out, or will be partially written, or (very rarely) that "
1830 "you'll get disk corruption."
1835 #: ../src/guestfs.pod:795
1837 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1838 "guestfish scripts that forget to sync will work just fine, which can make "
1839 "this very puzzling if you are trying to debug a problem."
1844 #: ../src/guestfs.pod:799
1845 msgid "Mount option C<-o sync> should not be the default."
1850 #: ../src/guestfs.pod:801
1852 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1853 "However C<-o sync> does not add any reliability benefit, but does have a "
1854 "very large performance impact."
1859 #: ../src/guestfs.pod:805
1861 "The work around is to use L</guestfs_mount_options> and set the mount "
1862 "options that you actually want to use."
1867 #: ../src/guestfs.pod:808
1868 msgid "Read-only should be the default."
1873 #: ../src/guestfs.pod:810
1875 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1876 "specify I<--rw> if you want to make changes to the image."
1881 #: ../src/guestfs.pod:813
1882 msgid "This would reduce the potential to corrupt live VM images."
1887 #: ../src/guestfs.pod:815
1889 "Note that many filesystems change the disk when you just mount and unmount, "
1890 "even if you didn't perform any writes. You need to use L</"
1891 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
1896 #: ../src/guestfs.pod:819
1897 msgid "guestfish command line is hard to use."
1902 #: ../src/guestfs.pod:821
1904 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1905 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1906 "exist, so it fails. In earlier versions of guestfish the error message was "
1907 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1908 "we should have used C<guestfish -c command> to run commands."
1913 #: ../src/guestfs.pod:828
1914 msgid "guestfish megabyte modifiers don't work right on all commands"
1919 #: ../src/guestfs.pod:830
1921 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1922 "other modifiers). What guestfish actually does is to multiply the number "
1923 "part by the modifier part and pass the result to the C API. However this "
1924 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1925 "expecting some other unit (eg. megabytes)."
1930 #: ../src/guestfs.pod:837
1931 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1936 #: ../src/guestfs.pod:839
1939 " lvcreate LV VG 100M\n"
1945 #: ../src/guestfs.pod:841
1947 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1948 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1949 "megabytes * megabytes) logical volume. The error message you get from this "
1950 "is also a little obscure."
1955 #: ../src/guestfs.pod:846
1957 "This could be fixed in the generator by specially marking parameters and "
1958 "return values which take bytes or other units."
1963 #: ../src/guestfs.pod:849
1964 msgid "Ambiguity between devices and paths"
1969 #: ../src/guestfs.pod:851
1971 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
1972 "sdb2>) and a similar pathname. A file might just happen to be called "
1973 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1978 #: ../src/guestfs.pod:856
1980 "In the current API we usually resolve this ambiguity by having two separate "
1981 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1982 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1983 "detecting if the path supplied begins with C</dev/>."
1988 #: ../src/guestfs.pod:862
1990 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1991 "make paths/devices into structured names. One way to do this would be to "
1992 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1993 "aspect of grub. Another way would be to use a structured type, equivalent "
1994 "to this OCaml type:"
1999 #: ../src/guestfs.pod:868
2002 " type path = Path of string | Device of int | Partition of int * int\n"
2008 #: ../src/guestfs.pod:870
2009 msgid "which would allow you to pass arguments like:"
2014 #: ../src/guestfs.pod:872
2017 " Path \"/foo/bar\"\n"
2018 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
2019 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
2020 " Path \"/dev/sdb2\" (* not a device *)\n"
2026 #: ../src/guestfs.pod:877
2028 "As you can see there are still problems to resolve even with this "
2029 "representation. Also consider how it might work in guestfish."
2034 #: ../src/guestfs.pod:882
2035 msgid "KEYS AND PASSPHRASES"
2040 #: ../src/guestfs.pod:884
2042 "Certain libguestfs calls take a parameter that contains sensitive key "
2043 "material, passed in as a C string."
2048 #: ../src/guestfs.pod:887
2050 "In the future we would hope to change the libguestfs implementation so that "
2051 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
2052 "swap. However this is I<not> done at the moment, because of the complexity "
2053 "of such an implementation."
2058 #: ../src/guestfs.pod:892
2060 "Therefore you should be aware that any key parameter you pass to libguestfs "
2061 "might end up being written out to the swap partition. If this is a concern, "
2062 "scrub the swap partition or don't use libguestfs on encrypted devices."
2067 #: ../src/guestfs.pod:897
2068 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
2073 #: ../src/guestfs.pod:899
2075 "All high-level libguestfs actions are synchronous. If you want to use "
2076 "libguestfs asynchronously then you must create a thread."
2081 #: ../src/guestfs.pod:902
2083 "Only use the handle from a single thread. Either use the handle exclusively "
2084 "from one thread, or provide your own mutex so that two threads cannot issue "
2085 "calls on the same handle at the same time."
2090 #: ../src/guestfs.pod:906
2092 "See the graphical program guestfs-browser for one possible architecture for "
2093 "multithreaded programs using libvirt and libguestfs."
2098 #: ../src/guestfs.pod:909
2103 #: ../src/guestfs.pod:911
2105 "Libguestfs needs a supermin appliance, which it finds by looking along an "
2111 #: ../src/guestfs.pod:914
2113 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
2114 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
2119 #: ../src/guestfs.pod:917
2121 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
2122 "to change the directories that libguestfs will search in. The value is a "
2123 "colon-separated list of paths. The current directory is I<not> searched "
2124 "unless the path contains an empty element or C<.>. For example "
2125 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
2126 "then C</usr/lib/guestfs>."
2131 #: ../src/guestfs.pod:924
2132 msgid "QEMU WRAPPERS"
2137 #: ../src/guestfs.pod:926
2139 "If you want to compile your own qemu, run qemu from a non-standard location, "
2140 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
2146 #: ../src/guestfs.pod:930
2148 "There is one important rule to remember: you I<must C<exec qemu>> as the "
2149 "last command in the shell script (so that qemu replaces the shell and "
2150 "becomes the direct child of the libguestfs-using program). If you don't do "
2151 "this, then the qemu process won't be cleaned up correctly."
2156 #: ../src/guestfs.pod:935
2158 "Here is an example of a wrapper, where I have built my own copy of qemu from "
2164 #: ../src/guestfs.pod:938
2168 " qemudir=/home/rjones/d/qemu\n"
2169 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
2175 #: ../src/guestfs.pod:942
2177 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
2178 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
2184 #: ../src/guestfs.pod:946
2187 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
2193 #: ../src/guestfs.pod:948
2195 "Note that libguestfs also calls qemu with the -help and -version options in "
2196 "order to determine features."
2200 #: ../src/guestfs.pod:951
2201 msgid "ATTACHING TO RUNNING DAEMONS"
2205 #: ../src/guestfs.pod:953
2207 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
2208 "babies. Use with caution."
2212 #: ../src/guestfs.pod:956
2214 "I<Note (2):> This section explains how to attach to a running daemon from a "
2215 "low level perspective. For most users, simply using virt tools such as "
2216 "L<guestfish(1)> with the I<--live> option will \"just work\"."
2220 #: ../src/guestfs.pod:960
2221 msgid "Using guestfs_set_attach_method"
2225 #: ../src/guestfs.pod:962
2227 "By calling L</guestfs_set_attach_method> you can change how the library "
2228 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read L</"
2229 "ARCHITECTURE> for some background)."
2233 #: ../src/guestfs.pod:966
2235 "The normal attach method is C<appliance>, where a small appliance is created "
2236 "containing the daemon, and then the library connects to this."
2240 #: ../src/guestfs.pod:969
2242 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
2243 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
2244 "daemon over the Unix domain socket."
2248 #: ../src/guestfs.pod:973
2250 "The normal use for this is to connect to a running virtual machine that "
2251 "contains a C<guestfsd> daemon, and send commands so you can read and write "
2252 "files inside the live virtual machine."
2256 #: ../src/guestfs.pod:977
2257 msgid "Using guestfs_add_domain with live flag"
2261 #: ../src/guestfs.pod:979
2263 "L</guestfs_add_domain> provides some help for getting the correct attach "
2264 "method. If you pass the C<live> option to this function, then (if the "
2265 "virtual machine is running) it will examine the libvirt XML looking for a "
2266 "virtio-serial channel to connect to:"
2270 #: ../src/guestfs.pod:985
2277 " <channel type='unix'>\n"
2278 " <source mode='bind' path='/path/to/socket'/>\n"
2279 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
2288 #: ../src/guestfs.pod:997
2290 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
2291 "method to C<unix:/path/to/socket>."
2295 #: ../src/guestfs.pod:1000
2297 "Some of the libguestfs tools (including guestfish) support a I<--live> "
2298 "option which is passed through to L</guestfs_add_domain> thus allowing you "
2299 "to attach to and modify live virtual machines."
2303 #: ../src/guestfs.pod:1004
2305 "The virtual machine needs to have been set up beforehand so that it has the "
2306 "virtio-serial channel and so that guestfsd is running inside it."
2311 #: ../src/guestfs.pod:1008
2312 msgid "ABI GUARANTEE"
2317 #: ../src/guestfs.pod:1010
2319 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
2320 "actions as outlined in this section. Although we will deprecate some "
2321 "actions, for example if they get replaced by newer calls, we will keep the "
2322 "old actions forever. This allows you the developer to program in confidence "
2323 "against the libguestfs API."
2328 #: ../src/guestfs.pod:1016
2329 msgid "BLOCK DEVICE NAMING"
2334 #: ../src/guestfs.pod:1018
2336 "In the kernel there is now quite a profusion of schemata for naming block "
2337 "devices (in this context, by I<block device> I mean a physical or virtual "
2338 "hard drive). The original Linux IDE driver used names starting with C</dev/"
2339 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
2340 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
2341 "for the old IDE driver (particularly for SATA devices) those devices also "
2342 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
2343 "paravirtualized drivers. This has created several different naming systems, "
2344 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
2349 #: ../src/guestfs.pod:1030
2351 "As discussed above, libguestfs uses a qemu appliance running an embedded "
2352 "Linux kernel to access block devices. We can run a variety of appliances "
2353 "based on a variety of Linux kernels."
2358 #: ../src/guestfs.pod:1034
2360 "This causes a problem for libguestfs because many API calls use device or "
2361 "partition names. Working scripts and the recipe (example) scripts that we "
2362 "make available over the internet could fail if the naming scheme changes."
2367 #: ../src/guestfs.pod:1039
2369 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2370 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2371 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2372 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2377 #: ../src/guestfs.pod:1045
2379 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2380 "L</guestfs_list_partitions> and similar calls return the true names of the "
2381 "devices and partitions as known to the appliance."
2386 #: ../src/guestfs.pod:1050
2387 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2392 #: ../src/guestfs.pod:1052
2394 "Usually this translation is transparent. However in some (very rare) cases "
2395 "you may need to know the exact algorithm. Such cases include where you use "
2396 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
2397 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
2402 #: ../src/guestfs.pod:1058
2404 "The algorithm is applied only to I<parameters> which are known to be either "
2405 "device or partition names. Return values from functions such as L</"
2406 "guestfs_list_devices> are never changed."
2411 #: ../src/guestfs.pod:1066
2412 msgid "Is the string a parameter which is a device or partition name?"
2417 #: ../src/guestfs.pod:1070
2418 msgid "Does the string begin with C</dev/sd>?"
2423 #: ../src/guestfs.pod:1074
2425 "Does the named device exist? If so, we use that device. However if I<not> "
2426 "then we continue with this algorithm."
2431 #: ../src/guestfs.pod:1079
2432 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
2437 #: ../src/guestfs.pod:1081
2438 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
2443 #: ../src/guestfs.pod:1083
2444 msgid "If that named device exists, use it. If not, continue."
2449 #: ../src/guestfs.pod:1087
2450 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
2455 #: ../src/guestfs.pod:1089
2456 msgid "If that named device exists, use it. If not, return an error."
2461 #: ../src/guestfs.pod:1093
2462 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
2467 #: ../src/guestfs.pod:1095
2469 "Although the standard naming scheme and automatic translation is useful for "
2470 "simple programs and guestfish scripts, for larger programs it is best not to "
2471 "rely on this mechanism."
2476 #: ../src/guestfs.pod:1099
2478 "Where possible for maximum future portability programs using libguestfs "
2479 "should use these future-proof techniques:"
2484 #: ../src/guestfs.pod:1106
2486 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2487 "device names, and then use those names directly."
2492 #: ../src/guestfs.pod:1109
2494 "Since those device names exist by definition, they will never be translated."
2499 #: ../src/guestfs.pod:1114
2501 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2502 "filesystem labels."
2507 #: ../src/guestfs.pod:1119
2513 #: ../src/guestfs.pod:1121
2515 "This section discusses security implications of using libguestfs, "
2516 "particularly with untrusted or malicious guests or disk images."
2521 #: ../src/guestfs.pod:1124
2522 msgid "GENERAL SECURITY CONSIDERATIONS"
2527 #: ../src/guestfs.pod:1126
2529 "Be careful with any files or data that you download from a guest (by "
2530 "\"download\" we mean not just the L</guestfs_download> command but any "
2531 "command that reads files, filenames, directories or anything else from a "
2532 "disk image). An attacker could manipulate the data to fool your program "
2533 "into doing the wrong thing. Consider cases such as:"
2538 #: ../src/guestfs.pod:1136
2539 msgid "the data (file etc) not being present"
2544 #: ../src/guestfs.pod:1140
2545 msgid "being present but empty"
2550 #: ../src/guestfs.pod:1144
2551 msgid "being much larger than normal"
2556 #: ../src/guestfs.pod:1148
2557 msgid "containing arbitrary 8 bit data"
2562 #: ../src/guestfs.pod:1152
2563 msgid "being in an unexpected character encoding"
2568 #: ../src/guestfs.pod:1156
2569 msgid "containing homoglyphs."
2574 #: ../src/guestfs.pod:1160
2575 msgid "SECURITY OF MOUNTING FILESYSTEMS"
2580 #: ../src/guestfs.pod:1162
2582 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
2583 "(VFS) module can sometimes be escalated into exploits by deliberately "
2584 "creating a malicious, malformed filesystem. These exploits are very severe "
2585 "for two reasons. Firstly there are very many filesystem drivers in the "
2586 "kernel, and many of them are infrequently used and not much developer "
2587 "attention has been paid to the code. Linux userspace helps potential "
2588 "crackers by detecting the filesystem type and automatically choosing the "
2589 "right VFS driver, even if that filesystem type is obscure or unexpected for "
2590 "the administrator. Secondly, a kernel-level exploit is like a local root "
2591 "exploit (worse in some ways), giving immediate and total access to the "
2592 "system right down to the hardware level."
2597 #: ../src/guestfs.pod:1175
2599 "That explains why you should never mount a filesystem from an untrusted "
2600 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
2601 "inside a qemu virtual machine, usually running as a non-root user. The "
2602 "attacker would need to write a filesystem which first exploited the kernel, "
2603 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
2604 "the libguestfs protocol, and finally to be as serious as the host kernel "
2605 "exploit it would need to escalate its privileges to root. This multi-step "
2606 "escalation, performed by a static piece of data, is thought to be extremely "
2607 "hard to do, although we never say 'never' about security issues."
2612 #: ../src/guestfs.pod:1186
2614 "In any case callers can reduce the attack surface by forcing the filesystem "
2615 "type when mounting (use L</guestfs_mount_vfs>)."
2620 #: ../src/guestfs.pod:1189
2621 msgid "PROTOCOL SECURITY"
2626 #: ../src/guestfs.pod:1191
2628 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
2629 "defined upper message size. However a program that uses libguestfs must "
2630 "also take care - for example you can write a program that downloads a binary "
2631 "from a disk image and executes it locally, and no amount of protocol "
2632 "security will save you from the consequences."
2637 #: ../src/guestfs.pod:1197
2638 msgid "INSPECTION SECURITY"
2643 #: ../src/guestfs.pod:1199
2645 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
2646 "directly from the guest, and these could contain any 8 bit data. Callers "
2647 "should be careful to escape these before printing them to a structured file "
2648 "(for example, use HTML escaping if creating a web page)."
2653 #: ../src/guestfs.pod:1205
2655 "Guest configuration may be altered in unusual ways by the administrator of "
2656 "the virtual machine, and may not reflect reality (particularly for untrusted "
2657 "or actively malicious guests). For example we parse the hostname from "
2658 "configuration files like C</etc/sysconfig/network> that we find in the "
2659 "guest, but the guest administrator can easily manipulate these files to "
2660 "provide the wrong hostname."
2665 #: ../src/guestfs.pod:1213
2667 "The inspection API parses guest configuration using two external libraries: "
2668 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
2669 "designed to be robust in the face of malicious data, although denial of "
2670 "service attacks are still possible, for example with oversized configuration "
2676 #: ../src/guestfs.pod:1219
2677 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
2682 #: ../src/guestfs.pod:1221
2684 "Be very cautious about running commands from the guest. By running a "
2685 "command in the guest, you are giving CPU time to a binary that you do not "
2686 "control, under the same user account as the library, albeit wrapped in qemu "
2687 "virtualization. More information and alternatives can be found in the "
2688 "section L</RUNNING COMMANDS>."
2693 #: ../src/guestfs.pod:1227
2694 msgid "CVE-2010-3851"
2699 #: ../src/guestfs.pod:1229
2700 msgid "https://bugzilla.redhat.com/642934"
2705 #: ../src/guestfs.pod:1231
2707 "This security bug concerns the automatic disk format detection that qemu "
2708 "does on disk images."
2713 #: ../src/guestfs.pod:1234
2715 "A raw disk image is just the raw bytes, there is no header. Other disk "
2716 "images like qcow2 contain a special header. Qemu deals with this by looking "
2717 "for one of the known headers, and if none is found then assuming the disk "
2718 "image must be raw."
2723 #: ../src/guestfs.pod:1239
2725 "This allows a guest which has been given a raw disk image to write some "
2726 "other header. At next boot (or when the disk image is accessed by "
2727 "libguestfs) qemu would do autodetection and think the disk image format was, "
2728 "say, qcow2 based on the header written by the guest."
2733 #: ../src/guestfs.pod:1244
2735 "This in itself would not be a problem, but qcow2 offers many features, one "
2736 "of which is to allow a disk image to refer to another image (called the "
2737 "\"backing disk\"). It does this by placing the path to the backing disk "
2738 "into the qcow2 header. This path is not validated and could point to any "
2739 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
2740 "\"holes\" in the qcow2 disk image, which of course is completely under the "
2741 "control of the attacker."
2746 #: ../src/guestfs.pod:1252
2748 "In libguestfs this is rather hard to exploit except under two circumstances:"
2753 #: ../src/guestfs.pod:1259
2754 msgid "You have enabled the network or have opened the disk in write mode."
2759 #: ../src/guestfs.pod:1263
2761 "You are also running untrusted code from the guest (see L</RUNNING "
2767 #: ../src/guestfs.pod:1268
2769 "The way to avoid this is to specify the expected disk format when adding "
2770 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
2771 "should always do this if the disk is raw format, and it's a good idea for "
2777 #: ../src/guestfs.pod:1273
2779 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
2780 "format is fetched from libvirt and passed through."
2785 #: ../src/guestfs.pod:1276
2787 "For libguestfs tools, use the I<--format> command line parameter as "
2793 #: ../src/guestfs.pod:1279
2794 msgid "CONNECTION MANAGEMENT"
2799 #: ../src/guestfs.pod:1281
2805 #: ../src/guestfs.pod:1283
2807 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
2808 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
2809 "handle and release all resources used."
2813 #: ../src/guestfs.pod:1287
2815 "For information on using multiple handles and threads, see the section L</"
2816 "MULTIPLE HANDLES AND MULTIPLE THREADS> above."
2821 #: ../src/guestfs.pod:1290
2822 msgid "guestfs_create"
2827 #: ../src/guestfs.pod:1292
2830 " guestfs_h *guestfs_create (void);\n"
2836 #: ../src/guestfs.pod:1294
2837 msgid "Create a connection handle."
2841 #: ../src/guestfs.pod:1296
2843 "On success this returns a non-NULL pointer to a handle. On error it returns "
2848 #: ../src/guestfs.pod:1299
2850 "You have to \"configure\" the handle after creating it. This includes "
2851 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
2852 "handle at least once."
2857 #: ../src/guestfs.pod:1303
2858 msgid "After configuring the handle, you have to call L</guestfs_launch>."
2862 #: ../src/guestfs.pod:1305
2864 "You may also want to configure error handling for the handle. See the L</"
2865 "ERROR HANDLING> section below."
2870 #: ../src/guestfs.pod:1308
2871 msgid "guestfs_close"
2876 #: ../src/guestfs.pod:1310
2879 " void guestfs_close (guestfs_h *g);\n"
2885 #: ../src/guestfs.pod:1312
2886 msgid "This closes the connection handle and frees up all resources used."
2890 #: ../src/guestfs.pod:1314
2892 "If autosync was set on the handle and the handle was launched, then this "
2893 "implicitly calls various functions to unmount filesystems and sync the "
2894 "disk. See L</guestfs_set_autosync> for more details."
2898 #: ../src/guestfs.pod:1318
2899 msgid "If a close callback was set on the handle, then it is called."
2904 #: ../src/guestfs.pod:1320
2905 msgid "ERROR HANDLING"
2910 #: ../src/guestfs.pod:1322
2912 "API functions can return errors. For example, almost all functions that "
2913 "return C<int> will return C<-1> to indicate an error."
2918 #: ../src/guestfs.pod:1325
2920 "Additional information is available for errors: an error message string and "
2921 "optionally an error number (errno) if the thing that failed was a system "
2927 #: ../src/guestfs.pod:1329
2929 "You can get at the additional information about the last error on the handle "
2930 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
2931 "up an error handler with L</guestfs_set_error_handler>."
2936 #: ../src/guestfs.pod:1334
2938 "When the handle is created, a default error handler is installed which "
2939 "prints the error message string to C<stderr>. For small short-running "
2940 "command line programs it is sufficient to do:"
2945 #: ../src/guestfs.pod:1338
2948 " if (guestfs_launch (g) == -1)\n"
2949 " exit (EXIT_FAILURE);\n"
2955 #: ../src/guestfs.pod:1341
2957 "since the default error handler will ensure that an error message has been "
2958 "printed to C<stderr> before the program exits."
2963 #: ../src/guestfs.pod:1344
2965 "For other programs the caller will almost certainly want to install an "
2966 "alternate error handler or do error handling in-line like this:"
2971 #: ../src/guestfs.pod:1347
2974 " g = guestfs_create ();\n"
2980 #: ../src/guestfs.pod:1349
2983 " /* This disables the default behaviour of printing errors\n"
2985 " guestfs_set_error_handler (g, NULL, NULL);\n"
2991 #: ../src/guestfs.pod:1353
2994 " if (guestfs_launch (g) == -1) {\n"
2995 " /* Examine the error message and print it etc. */\n"
2996 " char *msg = guestfs_last_error (g);\n"
2997 " int errnum = guestfs_last_errno (g);\n"
2998 " fprintf (stderr, \"%s\\n\", msg);\n"
3006 #: ../src/guestfs.pod:1361
3008 "Out of memory errors are handled differently. The default action is to call "
3009 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
3010 "guestfs_set_out_of_memory_handler>."
3015 #: ../src/guestfs.pod:1365
3017 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
3018 "because there is no handle if this happens there is no way to get additional "
3019 "error information. However L</guestfs_create> is supposed to be a "
3020 "lightweight operation which can only fail because of insufficient memory (it "
3021 "returns NULL in this case)."
3026 #: ../src/guestfs.pod:1371
3027 msgid "guestfs_last_error"
3032 #: ../src/guestfs.pod:1373
3035 " const char *guestfs_last_error (guestfs_h *g);\n"
3041 #: ../src/guestfs.pod:1375
3043 "This returns the last error message that happened on C<g>. If there has not "
3044 "been an error since the handle was created, then this returns C<NULL>."
3049 #: ../src/guestfs.pod:1379
3051 "The lifetime of the returned string is until the next error occurs, or L</"
3052 "guestfs_close> is called."
3057 #: ../src/guestfs.pod:1382
3058 msgid "guestfs_last_errno"
3063 #: ../src/guestfs.pod:1384
3066 " int guestfs_last_errno (guestfs_h *g);\n"
3072 #: ../src/guestfs.pod:1386
3073 msgid "This returns the last error number (errno) that happened on C<g>."
3078 #: ../src/guestfs.pod:1388
3079 msgid "If successful, an errno integer not equal to zero is returned."
3084 #: ../src/guestfs.pod:1390
3086 "If no error, this returns 0. This call can return 0 in three situations:"
3091 #: ../src/guestfs.pod:1397
3092 msgid "There has not been any error on the handle."
3097 #: ../src/guestfs.pod:1401
3099 "There has been an error but the errno was meaningless. This corresponds to "
3100 "the case where the error did not come from a failed system call, but for "
3101 "some other reason."
3106 #: ../src/guestfs.pod:1407
3108 "There was an error from a failed system call, but for some reason the errno "
3109 "was not captured and returned. This usually indicates a bug in libguestfs."
3114 #: ../src/guestfs.pod:1413
3116 "Libguestfs tries to convert the errno from inside the applicance into a "
3117 "corresponding errno for the caller (not entirely trivial: the appliance "
3118 "might be running a completely different operating system from the library "
3119 "and error numbers are not standardized across Un*xen). If this could not be "
3120 "done, then the error is translated to C<EINVAL>. In practice this should "
3121 "only happen in very rare circumstances."
3126 #: ../src/guestfs.pod:1421
3127 msgid "guestfs_set_error_handler"
3132 #: ../src/guestfs.pod:1423
3135 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
3137 " const char *msg);\n"
3138 " void guestfs_set_error_handler (guestfs_h *g,\n"
3139 " guestfs_error_handler_cb cb,\n"
3146 #: ../src/guestfs.pod:1430
3148 "The callback C<cb> will be called if there is an error. The parameters "
3149 "passed to the callback are an opaque data pointer and the error message "
3155 #: ../src/guestfs.pod:1434
3157 "C<errno> is not passed to the callback. To get that the callback must call "
3158 "L</guestfs_last_errno>."
3163 #: ../src/guestfs.pod:1437
3165 "Note that the message string C<msg> is freed as soon as the callback "
3166 "function returns, so if you want to stash it somewhere you must make your "
3172 #: ../src/guestfs.pod:1441
3173 msgid "The default handler prints messages on C<stderr>."
3178 #: ../src/guestfs.pod:1443
3179 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
3184 #: ../src/guestfs.pod:1445
3185 msgid "guestfs_get_error_handler"
3190 #: ../src/guestfs.pod:1447
3193 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
3194 " void **opaque_rtn);\n"
3200 #: ../src/guestfs.pod:1450
3201 msgid "Returns the current error handler callback."
3206 #: ../src/guestfs.pod:1452
3207 msgid "guestfs_set_out_of_memory_handler"
3212 #: ../src/guestfs.pod:1454
3215 " typedef void (*guestfs_abort_cb) (void);\n"
3216 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
3217 " guestfs_abort_cb);\n"
3223 #: ../src/guestfs.pod:1458
3225 "The callback C<cb> will be called if there is an out of memory situation. "
3226 "I<Note this callback must not return>."
3231 #: ../src/guestfs.pod:1461
3232 msgid "The default is to call L<abort(3)>."
3237 #: ../src/guestfs.pod:1463
3239 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
3244 #: ../src/guestfs.pod:1466
3245 msgid "guestfs_get_out_of_memory_handler"
3250 #: ../src/guestfs.pod:1468
3253 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
3259 #: ../src/guestfs.pod:1470
3260 msgid "This returns the current out of memory handler."
3265 #: ../src/guestfs.pod:1472
3271 #: ../src/guestfs.pod:1474 ../fish/guestfish.pod:1010
3277 #: ../src/guestfs.pod:1476
3283 #: ../src/guestfs.pod:1478
3289 #: ../src/guestfs.pod:1480
3290 msgid "AVAILABILITY"
3295 #: ../src/guestfs.pod:1482
3296 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
3301 #: ../src/guestfs.pod:1484
3303 "Using L</guestfs_available> you can test availability of the following "
3304 "groups of functions. This test queries the appliance to see if the "
3305 "appliance you are currently using supports the functionality."
3310 #: ../src/guestfs.pod:1489
3311 msgid "@AVAILABILITY@"
3316 #: ../src/guestfs.pod:1491
3317 msgid "GUESTFISH supported COMMAND"
3322 #: ../src/guestfs.pod:1493
3324 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
3325 "prints out the available groups and whether they are supported by this build "
3326 "of libguestfs. Note however that you have to do C<run> first."
3331 #: ../src/guestfs.pod:1498
3332 msgid "SINGLE CALLS AT COMPILE TIME"
3337 #: ../src/guestfs.pod:1500
3339 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
3340 "function, such as:"
3345 #: ../src/guestfs.pod:1503
3348 " #define LIBGUESTFS_HAVE_DD 1\n"
3354 #: ../src/guestfs.pod:1505
3355 msgid "if L</guestfs_dd> is available."
3360 #: ../src/guestfs.pod:1507
3362 "Before version 1.5.8, if you needed to test whether a single libguestfs "
3363 "function is available at compile time, we recommended using build tools such "
3364 "as autoconf or cmake. For example in autotools you could use:"
3369 #: ../src/guestfs.pod:1512
3372 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
3373 " AC_CHECK_FUNCS([guestfs_dd])\n"
3379 #: ../src/guestfs.pod:1515
3381 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
3387 #: ../src/guestfs.pod:1518
3388 msgid "SINGLE CALLS AT RUN TIME"
3393 #: ../src/guestfs.pod:1520
3395 "Testing at compile time doesn't guarantee that a function really exists in "
3396 "the library. The reason is that you might be dynamically linked against a "
3397 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
3398 "This situation unfortunately results in a segmentation fault, which is a "
3399 "shortcoming of the C dynamic linking system itself."
3404 #: ../src/guestfs.pod:1527
3406 "You can use L<dlopen(3)> to test if a function is available at run time, as "
3407 "in this example program (note that you still need the compile time check as "
3413 #: ../src/guestfs.pod:1531
3416 " #include <stdio.h>\n"
3417 " #include <stdlib.h>\n"
3418 " #include <unistd.h>\n"
3419 " #include <dlfcn.h>\n"
3420 " #include <guestfs.h>\n"
3426 #: ../src/guestfs.pod:1537
3431 " #ifdef LIBGUESTFS_HAVE_DD\n"
3433 " int has_function;\n"
3439 #: ../src/guestfs.pod:1543
3442 " /* Test if the function guestfs_dd is really available. */\n"
3443 " dl = dlopen (NULL, RTLD_LAZY);\n"
3445 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
3446 " exit (EXIT_FAILURE);\n"
3448 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
3455 #: ../src/guestfs.pod:1552
3458 " if (!has_function)\n"
3459 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
3461 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
3462 " /* Now it's safe to call\n"
3463 " guestfs_dd (g, \"foo\", \"bar\");\n"
3467 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
3475 #: ../src/guestfs.pod:1565
3477 "You may think the above is an awful lot of hassle, and it is. There are "
3478 "other ways outside of the C linking system to ensure that this kind of "
3479 "incompatibility never arises, such as using package versioning:"
3484 #: ../src/guestfs.pod:1570
3487 " Requires: libguestfs >= 1.0.80\n"
3493 #: ../src/guestfs.pod:1572
3494 msgid "CALLS WITH OPTIONAL ARGUMENTS"
3499 #: ../src/guestfs.pod:1574
3501 "A recent feature of the API is the introduction of calls which take optional "
3502 "arguments. In C these are declared 3 ways. The main way is as a call which "
3503 "takes variable arguments (ie. C<...>), as in this example:"
3508 #: ../src/guestfs.pod:1579
3511 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
3517 #: ../src/guestfs.pod:1581
3519 "Call this with a list of optional arguments, terminated by C<-1>. So to "
3520 "call with no optional arguments specified:"
3525 #: ../src/guestfs.pod:1584
3528 " guestfs_add_drive_opts (g, filename, -1);\n"
3534 #: ../src/guestfs.pod:1586
3535 msgid "With a single optional argument:"
3540 #: ../src/guestfs.pod:1588
3543 " guestfs_add_drive_opts (g, filename,\n"
3544 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3551 #: ../src/guestfs.pod:1592
3557 #: ../src/guestfs.pod:1594
3560 " guestfs_add_drive_opts (g, filename,\n"
3561 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3562 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
3569 #: ../src/guestfs.pod:1599
3571 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
3577 #: ../src/guestfs.pod:1602
3578 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
3583 #: ../src/guestfs.pod:1604
3585 "The second variant has the same name with the suffix C<_va>, which works the "
3586 "same way but takes a C<va_list>. See the C manual for details. For the "
3587 "example function, this is declared:"
3592 #: ../src/guestfs.pod:1608
3595 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
3602 #: ../src/guestfs.pod:1611
3603 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
3608 #: ../src/guestfs.pod:1613
3610 "The third variant is useful where you need to construct these calls. You "
3611 "pass in a structure where you fill in the optional fields. The structure "
3612 "has a bitmask as the first element which you must set to indicate which "
3613 "fields you have filled in. For our example function the structure and call "
3619 #: ../src/guestfs.pod:1619
3622 " struct guestfs_add_drive_opts_argv {\n"
3623 " uint64_t bitmask;\n"
3625 " const char *format;\n"
3628 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
3629 " const struct guestfs_add_drive_opts_argv *optargs);\n"
3635 #: ../src/guestfs.pod:1628
3636 msgid "You could call it like this:"
3641 #: ../src/guestfs.pod:1630
3644 " struct guestfs_add_drive_opts_argv optargs = {\n"
3645 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
3646 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
3648 " .format = \"qcow2\"\n"
3655 #: ../src/guestfs.pod:1637
3658 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
3664 #: ../src/guestfs.pod:1639 ../src/guestfs-actions.pod:11
3665 #: ../src/guestfs-actions.pod:1858 ../src/guestfs-actions.pod:2785
3666 #: ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1262
3667 #: ../fish/guestfish-actions.pod:1898 ../tools/virt-win-reg.pl:704
3673 #: ../src/guestfs.pod:1645
3674 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
3679 #: ../src/guestfs.pod:1650
3680 msgid "You do not need to fill in all fields of the structure."
3685 #: ../src/guestfs.pod:1654
3687 "There must be a one-to-one correspondence between fields of the structure "
3688 "that are filled in, and bits set in the bitmask."
3693 #: ../src/guestfs.pod:1659
3694 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
3699 #: ../src/guestfs.pod:1661
3701 "In other languages, optional arguments are expressed in the way that is "
3702 "natural for that language. We refer you to the language-specific "
3703 "documentation for more details on that."
3708 #: ../src/guestfs.pod:1665
3709 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
3714 #: ../src/guestfs.pod:1667
3715 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
3719 #: ../src/guestfs.pod:1669
3721 "B<Note:> This section documents the generic event mechanism introduced in "
3722 "libguestfs 1.10, which you should use in new code if possible. The old "
3723 "functions C<guestfs_set_log_message_callback>, "
3724 "C<guestfs_set_subprocess_quit_callback>, "
3725 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
3726 "C<guestfs_set_progress_callback> are no longer documented in this manual "
3727 "page. Because of the ABI guarantee, the old functions continue to work."
3731 #: ../src/guestfs.pod:1678
3733 "Handles generate events when certain things happen, such as log messages "
3734 "being generated, progress messages during long-running operations, or the "
3735 "handle being closed. The API calls described below let you register a "
3736 "callback to be called when events happen. You can register multiple "
3737 "callbacks (for the same, different or overlapping sets of events), and "
3738 "individually remove callbacks. If callbacks are not removed, then they "
3739 "remain in force until the handle is closed."
3743 #: ../src/guestfs.pod:1686
3745 "In the current implementation, events are only generated synchronously: that "
3746 "means that events (and hence callbacks) can only happen while you are in the "
3747 "middle of making another libguestfs call. The callback is called in the "
3752 #: ../src/guestfs.pod:1691
3754 "Events may contain a payload, usually nothing (void), an array of 64 bit "
3755 "unsigned integers, or a message buffer. Payloads are discussed later on."
3759 #: ../src/guestfs.pod:1695
3760 msgid "CLASSES OF EVENTS"
3764 #: ../src/guestfs.pod:1699
3765 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
3769 #: ../src/guestfs.pod:1702
3771 "The callback function will be called while the handle is being closed "
3772 "(synchronously from L</guestfs_close>)."
3777 #: ../src/guestfs.pod:1705
3779 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
3780 "handles that are open when the program exits. This means that this callback "
3781 "might be called indirectly from L<exit(3)>, which can cause unexpected "
3782 "problems in higher-level languages (eg. if your HLL interpreter has already "
3783 "been cleaned up by the time this is called, and if your callback then jumps "
3784 "into some HLL function)."
3788 #: ../src/guestfs.pod:1712
3790 "If no callback is registered: the handle is closed without any callback "
3795 #: ../src/guestfs.pod:1715
3796 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
3800 #: ../src/guestfs.pod:1718
3802 "The callback function will be called when the child process quits, either "
3803 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
3804 "corresponds to a transition from any state to the CONFIG state)."
3808 #: ../src/guestfs.pod:1722 ../src/guestfs.pod:1731
3809 msgid "If no callback is registered: the event is ignored."
3813 #: ../src/guestfs.pod:1724
3814 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
3818 #: ../src/guestfs.pod:1727
3820 "The callback function will be called when the child process becomes ready "
3821 "first time after it has been launched. (This corresponds to a transition "
3822 "from LAUNCHING to the READY state)."
3826 #: ../src/guestfs.pod:1733
3827 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
3832 #: ../src/guestfs.pod:1736
3834 "Some long-running operations can generate progress messages. If this "
3835 "callback is registered, then it will be called each time a progress message "
3836 "is generated (usually two seconds after the operation started, and three "
3837 "times per second thereafter until it completes, although the frequency may "
3838 "change in future versions)."
3842 #: ../src/guestfs.pod:1742
3844 "The callback receives in the payload four unsigned 64 bit numbers which are "
3845 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
3849 #: ../src/guestfs.pod:1745
3851 "The units of C<total> are not defined, although for some operations C<total> "
3852 "may relate in some way to the amount of data to be transferred (eg. in bytes "
3853 "or megabytes), and C<position> may be the portion which has been transferred."
3858 #: ../src/guestfs.pod:1750
3859 msgid "The only defined and stable parts of the API are:"
3864 #: ../src/guestfs.pod:1756
3866 "The callback can display to the user some type of progress bar or indicator "
3867 "which shows the ratio of C<position>:C<total>."
3872 #: ../src/guestfs.pod:1761
3873 msgid "0 E<lt>= C<position> E<lt>= C<total>"
3877 #: ../src/guestfs.pod:1765
3879 "If any progress notification is sent during a call, then a final progress "
3880 "notification is always sent when C<position> = C<total> (I<unless> the call "
3881 "fails with an error)."
3886 #: ../src/guestfs.pod:1769
3888 "This is to simplify caller code, so callers can easily set the progress "
3889 "indicator to \"100%\" at the end of the operation, without requiring special "
3890 "code to detect this case."
3894 #: ../src/guestfs.pod:1775
3896 "For some calls we are unable to estimate the progress of the call, but we "
3897 "can still generate progress messages to indicate activity. This is known as "
3898 "\"pulse mode\", and is directly supported by certain progress bar "
3899 "implementations (eg. GtkProgressBar)."
3903 #: ../src/guestfs.pod:1780
3905 "For these calls, zero or more progress messages are generated with "
3906 "C<position = 0> and C<total = 1>, followed by a final message with "
3907 "C<position = total = 1>."
3911 #: ../src/guestfs.pod:1784
3913 "As noted above, if the call fails with an error then the final message may "
3918 #: ../src/guestfs.pod:1789
3920 "The callback also receives the procedure number (C<proc_nr>) and serial "
3921 "number (C<serial>) of the call. These are only useful for debugging "
3922 "protocol issues, and the callback can normally ignore them. The callback "
3923 "may want to print these numbers in error messages or debugging messages."
3927 #: ../src/guestfs.pod:1795
3928 msgid "If no callback is registered: progress messages are discarded."
3932 #: ../src/guestfs.pod:1797
3933 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
3937 #: ../src/guestfs.pod:1800
3939 "The callback function is called whenever a log message is generated by qemu, "
3940 "the appliance kernel, guestfsd (daemon), or utility programs."
3944 #: ../src/guestfs.pod:1803
3946 "If the verbose flag (L</guestfs_set_verbose>) is set before launch (L</"
3947 "guestfs_launch>) then additional debug messages are generated."
3951 #: ../src/guestfs.pod:1806 ../src/guestfs.pod:1820
3953 "If no callback is registered: the messages are discarded unless the verbose "
3954 "flag is set in which case they are sent to stderr. You can override the "
3955 "printing of verbose messages to stderr by setting up a callback."
3959 #: ../src/guestfs.pod:1811
3960 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
3964 #: ../src/guestfs.pod:1814
3966 "The callback function is called whenever a log message is generated by the "
3967 "library part of libguestfs."
3971 #: ../src/guestfs.pod:1817
3973 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
3974 "messages are generated."
3978 #: ../src/guestfs.pod:1825
3979 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
3983 #: ../src/guestfs.pod:1828
3985 "The callback function is called whenever a trace message is generated. This "
3986 "only applies if the trace flag (L</guestfs_set_trace>) is set."
3990 #: ../src/guestfs.pod:1831
3992 "If no callback is registered: the messages are sent to stderr. You can "
3993 "override the printing of trace messages to stderr by setting up a callback."
3997 #: ../src/guestfs.pod:1837
3998 msgid "guestfs_set_event_callback"
4002 #: ../src/guestfs.pod:1839
4005 " int guestfs_set_event_callback (guestfs_h *g,\n"
4006 " guestfs_event_callback cb,\n"
4007 " uint64_t event_bitmask,\n"
4014 #: ../src/guestfs.pod:1845
4016 "This function registers a callback (C<cb>) for all event classes in the "
4021 #: ../src/guestfs.pod:1848
4023 "For example, to register for all log message events, you could call this "
4024 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
4025 "To register a single callback for all possible classes of events, use "
4026 "C<GUESTFS_EVENT_ALL>."
4030 #: ../src/guestfs.pod:1854
4031 msgid "C<flags> should always be passed as 0."
4035 #: ../src/guestfs.pod:1856
4037 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
4038 "it for any purpose."
4042 #: ../src/guestfs.pod:1859
4044 "The return value is the event handle (an integer) which you can use to "
4045 "delete the callback (see below)."
4049 #: ../src/guestfs.pod:1862
4051 "If there is an error, this function returns C<-1>, and sets the error in the "
4052 "handle in the usual way (see L</guestfs_last_error> etc.)"
4056 #: ../src/guestfs.pod:1865
4058 "Callbacks remain in effect until they are deleted, or until the handle is "
4063 #: ../src/guestfs.pod:1868
4065 "In the case where multiple callbacks are registered for a particular event "
4066 "class, all of the callbacks are called. The order in which multiple "
4067 "callbacks are called is not defined."
4071 #: ../src/guestfs.pod:1872
4072 msgid "guestfs_delete_event_callback"
4076 #: ../src/guestfs.pod:1874
4079 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
4084 #: ../src/guestfs.pod:1876
4086 "Delete a callback that was previously registered. C<event_handle> should be "
4087 "the integer that was returned by a previous call to "
4088 "C<guestfs_set_event_callback> on the same handle."
4092 #: ../src/guestfs.pod:1880
4093 msgid "guestfs_event_callback"
4097 #: ../src/guestfs.pod:1882
4100 " typedef void (*guestfs_event_callback) (\n"
4103 " uint64_t event,\n"
4104 " int event_handle,\n"
4106 " const char *buf, size_t buf_len,\n"
4107 " const uint64_t *array, size_t array_len);\n"
4112 #: ../src/guestfs.pod:1891
4114 "This is the type of the event callback function that you have to provide."
4118 #: ../src/guestfs.pod:1894
4120 "The basic parameters are: the handle (C<g>), the opaque user pointer "
4121 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
4122 "handle, and C<flags> which in the current API you should ignore."
4126 #: ../src/guestfs.pod:1898
4128 "The remaining parameters contain the event payload (if any). Each event may "
4129 "contain a payload, which usually relates to the event class, but for future "
4130 "proofing your code should be written to handle any payload for any event "
4135 #: ../src/guestfs.pod:1903
4137 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
4138 "there is no message buffer). Note that this message buffer can contain "
4139 "arbitrary 8 bit data, including NUL bytes."
4143 #: ../src/guestfs.pod:1907
4145 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
4146 "moment this is only used for progress messages."
4150 #: ../src/guestfs.pod:1910
4151 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
4155 #: ../src/guestfs.pod:1912
4157 "One motivation for the generic event API was to allow GUI programs to "
4158 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
4159 "unconditionally to C<stderr>."
4163 #: ../src/guestfs.pod:1916
4165 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
4166 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
4167 "messages are not events; you must capture error messages separately)."
4171 #: ../src/guestfs.pod:1921
4173 "Programs have to set up a callback to capture the classes of events of "
4178 #: ../src/guestfs.pod:1924
4182 " guestfs_set_event_callback\n"
4183 " (g, message_callback,\n"
4184 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
4185 " GUESTFS_EVENT_TRACE,\n"
4186 " 0, NULL) == -1)\n"
4187 " if (eh == -1) {\n"
4188 " // handle error in the usual way\n"
4194 #: ../src/guestfs.pod:1934
4196 "The callback can then direct messages to the appropriate place. In this "
4197 "example, messages are directed to syslog:"
4201 #: ../src/guestfs.pod:1937
4205 " message_callback (\n"
4208 " uint64_t event,\n"
4209 " int event_handle,\n"
4211 " const char *buf, size_t buf_len,\n"
4212 " const uint64_t *array, size_t array_len)\n"
4214 " const int priority = LOG_USER|LOG_INFO;\n"
4215 " if (buf_len > 0)\n"
4216 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
4223 #: ../src/guestfs.pod:1952
4224 msgid "PRIVATE DATA AREA"
4228 #: ../src/guestfs.pod:1954
4230 "You can attach named pieces of private data to the libguestfs handle, fetch "
4231 "them by name, and walk over them, for the lifetime of the handle. This is "
4232 "called the private data area and is only available from the C API."
4237 #: ../src/guestfs.pod:1959
4238 msgid "To attach a named piece of data, use the following call:"
4243 #: ../src/guestfs.pod:1961
4246 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
4251 #: ../src/guestfs.pod:1963
4253 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
4254 "pointer (which can be C<NULL>). Any previous item with the same key is "
4259 #: ../src/guestfs.pod:1967
4261 "You can use any C<key> you want, but your key should I<not> start with an "
4262 "underscore character. Keys beginning with an underscore character are "
4263 "reserved for internal libguestfs purposes (eg. for implementing language "
4264 "bindings). It is recommended that you prefix the key with some unique "
4265 "string to avoid collisions with other users."
4270 #: ../src/guestfs.pod:1973
4271 msgid "To retrieve the pointer, use:"
4276 #: ../src/guestfs.pod:1975
4279 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
4285 #: ../src/guestfs.pod:1977
4287 "This function returns C<NULL> if either no data is found associated with "
4288 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
4293 #: ../src/guestfs.pod:1981
4295 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
4296 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
4297 "all. In particular, libguestfs does I<not> try to free the data when the "
4298 "handle is closed. If the data must be freed, then the caller must either "
4299 "free it before calling L</guestfs_close> or must set up a close callback to "
4300 "do it (see L</GUESTFS_EVENT_CLOSE>)."
4304 #: ../src/guestfs.pod:1988
4305 msgid "To walk over all entries, use these two functions:"
4309 #: ../src/guestfs.pod:1990
4312 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
4317 #: ../src/guestfs.pod:1992
4320 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
4325 #: ../src/guestfs.pod:1994
4327 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
4328 "not have any particular meaning -- keys are not returned in any defined "
4329 "order). A pointer to the key is returned in C<*key_rtn> and the "
4330 "corresponding data pointer is returned from the function. C<NULL> is "
4331 "returned if there are no keys stored in the handle."
4335 #: ../src/guestfs.pod:2000
4337 "C<guestfs_next_private> returns the next key, pointer pair. The return "
4338 "value of this function is also C<NULL> is there are no further entries to "
4343 #: ../src/guestfs.pod:2004
4344 msgid "Notes about walking over entries:"
4348 #: ../src/guestfs.pod:2010
4350 "You must not call C<guestfs_set_private> while walking over the entries."
4354 #: ../src/guestfs.pod:2015
4356 "The handle maintains an internal iterator which is reset when you call "
4357 "C<guestfs_first_private>. This internal iterator is invalidated when you "
4358 "call C<guestfs_set_private>."
4362 #: ../src/guestfs.pod:2021
4363 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
4367 #: ../src/guestfs.pod:2023
4370 " guestfs_set_private (g, key, NULL);\n"
4375 #: ../src/guestfs.pod:2025
4376 msgid "then that C<key> is not returned when walking."
4380 #: ../src/guestfs.pod:2029
4382 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
4383 "C<guestfs_next_private> or C<guestfs_set_private>."
4387 #: ../src/guestfs.pod:2035
4389 "The following example code shows how to print all keys and data pointers "
4390 "that are associated with the handle C<g>:"
4394 #: ../src/guestfs.pod:2038
4397 " const char *key;\n"
4398 " void *data = guestfs_first_private (g, &key);\n"
4399 " while (data != NULL)\n"
4401 " printf (\"key = %s, data = %p\\n\", key, data);\n"
4402 " data = guestfs_next_private (g, &key);\n"
4408 #: ../src/guestfs.pod:2046
4410 "More commonly you are only interested in keys that begin with an application-"
4411 "specific prefix C<foo_>. Modify the loop like so:"
4415 #: ../src/guestfs.pod:2049
4418 " const char *key;\n"
4419 " void *data = guestfs_first_private (g, &key);\n"
4420 " while (data != NULL)\n"
4422 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
4423 " printf (\"key = %s, data = %p\\n\", key, data);\n"
4424 " data = guestfs_next_private (g, &key);\n"
4430 #: ../src/guestfs.pod:2058
4432 "If you need to modify keys while walking, then you have to jump back to the "
4433 "beginning of the loop. For example, to delete all keys prefixed with "
4438 #: ../src/guestfs.pod:2062
4441 " const char *key;\n"
4444 " data = guestfs_first_private (g, &key);\n"
4445 " while (data != NULL)\n"
4447 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
4449 " guestfs_set_private (g, key, NULL);\n"
4450 " /* note that 'key' pointer is now invalid, and so is\n"
4451 " the internal iterator */\n"
4454 " data = guestfs_next_private (g, &key);\n"
4460 #: ../src/guestfs.pod:2078
4462 "Note that the above loop is guaranteed to terminate because the keys are "
4463 "being deleted, but other manipulations of keys within the loop might not "
4464 "terminate unless you also maintain an indication of which keys have been "
4470 #: ../src/guestfs.pod:2083 ../src/guestfs.pod:2088
4476 #: ../src/guestfs.pod:2085
4478 "<!-- old anchor for the next section --> <a name="
4479 "\"state_machine_and_low_level_event_api\"/>"
4484 #: ../src/guestfs.pod:2090
4485 msgid "ARCHITECTURE"
4490 #: ../src/guestfs.pod:2092
4492 "Internally, libguestfs is implemented by running an appliance (a special "
4493 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
4494 "process of the main program."
4499 #: ../src/guestfs.pod:2096
4502 " ___________________\n"
4504 " | main program |\n"
4506 " | | child process / appliance\n"
4507 " | | __________________________\n"
4509 " +-------------------+ RPC | +-----------------+ |\n"
4510 " | libguestfs <--------------------> guestfsd | |\n"
4511 " | | | +-----------------+ |\n"
4512 " \\___________________/ | | Linux kernel | |\n"
4513 " | +--^--------------+ |\n"
4514 " \\_________|________________/\n"
4520 " \\______________/\n"
4526 #: ../src/guestfs.pod:2116
4528 "The library, linked to the main program, creates the child process and hence "
4529 "the appliance in the L</guestfs_launch> function."
4534 #: ../src/guestfs.pod:2119
4536 "Inside the appliance is a Linux kernel and a complete stack of userspace "
4537 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
4538 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
4539 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
4540 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
4541 "attached to the qemu process which translates device access by the "
4542 "appliance's Linux kernel into accesses to the image."
4547 #: ../src/guestfs.pod:2128
4549 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
4550 "Although the disk image you are attached to might also be used by some "
4551 "virtual machine, libguestfs doesn't know or care about this. (But you will "
4552 "care if both libguestfs's qemu process and your virtual machine are trying "
4553 "to update the disk image at the same time, since these usually results in "
4554 "massive disk corruption)."
4559 #: ../src/guestfs.pod:2135
4560 msgid "STATE MACHINE"
4565 #: ../src/guestfs.pod:2137
4566 msgid "libguestfs uses a state machine to model the child process:"
4571 #: ../src/guestfs.pod:2139
4583 " / | \\ \\ guestfs_launch\n"
4584 " / | _\\__V______\n"
4586 " / | | LAUNCHING |\n"
4587 " / | \\___________/\n"
4589 " / | guestfs_launch\n"
4591 " ______ / __|____V\n"
4592 " / \\ ------> / \\\n"
4593 " | BUSY | | READY |\n"
4594 " \\______/ <------ \\________/\n"
4600 #: ../src/guestfs.pod:2161
4602 "The normal transitions are (1) CONFIG (when the handle is created, but there "
4603 "is no child process), (2) LAUNCHING (when the child process is booting up), "
4604 "(3) alternating between READY and BUSY as commands are issued to, and "
4605 "carried out by, the child process."
4610 #: ../src/guestfs.pod:2166
4612 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
4613 "asynchronously at any time (eg. due to some internal error), and that causes "
4614 "the state to transition back to CONFIG."
4619 #: ../src/guestfs.pod:2170
4621 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
4622 "issued when in the CONFIG state."
4627 #: ../src/guestfs.pod:2173
4629 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
4630 "L</guestfs_launch> blocks until the child process is READY to accept "
4631 "commands (or until some failure or timeout). L</guestfs_launch> internally "
4632 "moves the state from CONFIG to LAUNCHING while it is running."
4637 #: ../src/guestfs.pod:2179
4639 "API actions such as L</guestfs_mount> can only be issued when in the READY "
4640 "state. These API calls block waiting for the command to be carried out (ie. "
4641 "the state to transition to BUSY and then back to READY). There are no non-"
4642 "blocking versions, and no way to issue more than one command per handle at "
4648 #: ../src/guestfs.pod:2185
4650 "Finally, the child process sends asynchronous messages back to the main "
4651 "program, such as kernel log messages. You can register a callback to "
4652 "receive these messages."
4657 #: ../src/guestfs.pod:2189
4663 #: ../src/guestfs.pod:2191
4664 msgid "COMMUNICATION PROTOCOL"
4669 #: ../src/guestfs.pod:2193
4671 "Don't rely on using this protocol directly. This section documents how it "
4672 "currently works, but it may change at any time."
4677 #: ../src/guestfs.pod:2196
4679 "The protocol used to talk between the library and the daemon running inside "
4680 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
4681 "1014, RFC 1832, RFC 4506)."
4686 #: ../src/guestfs.pod:2200
4688 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
4689 "this file is automatically generated)."
4694 #: ../src/guestfs.pod:2203
4696 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
4697 "and C<FileOut> parameters, which are handled with very simple request/reply "
4698 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
4699 "parameters, which use the same request and reply messages, but they may also "
4700 "be followed by files sent using a chunked encoding."
4705 #: ../src/guestfs.pod:2210
4706 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
4711 #: ../src/guestfs.pod:2212
4712 msgid "For ordinary functions, the request message is:"
4717 #: ../src/guestfs.pod:2214
4720 " total length (header + arguments,\n"
4721 " but not including the length word itself)\n"
4722 " struct guestfs_message_header (encoded as XDR)\n"
4723 " struct guestfs_<foo>_args (encoded as XDR)\n"
4729 #: ../src/guestfs.pod:2219
4731 "The total length field allows the daemon to allocate a fixed size buffer "
4732 "into which it slurps the rest of the message. As a result, the total length "
4733 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
4734 "effective size of any request is limited to somewhere under this size."
4739 #: ../src/guestfs.pod:2225
4741 "Note also that many functions don't take any arguments, in which case the "
4742 "C<guestfs_I<foo>_args> is completely omitted."
4747 #: ../src/guestfs.pod:2228
4749 "The header contains the procedure number (C<guestfs_proc>) which is how the "
4750 "receiver knows what type of args structure to expect, or none at all."
4755 #: ../src/guestfs.pod:2232
4757 "For functions that take optional arguments, the optional arguments are "
4758 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
4759 "arguments. A bitmask in the header indicates which optional arguments are "
4760 "meaningful. The bitmask is also checked to see if it contains bits set "
4761 "which the daemon does not know about (eg. if more optional arguments were "
4762 "added in a later version of the library), and this causes the call to be "
4768 #: ../src/guestfs.pod:2240
4769 msgid "The reply message for ordinary functions is:"
4774 #: ../src/guestfs.pod:2242
4777 " total length (header + ret,\n"
4778 " but not including the length word itself)\n"
4779 " struct guestfs_message_header (encoded as XDR)\n"
4780 " struct guestfs_<foo>_ret (encoded as XDR)\n"
4786 #: ../src/guestfs.pod:2247
4788 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
4789 "functions that return no formal return values."
4794 #: ../src/guestfs.pod:2250
4796 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
4801 #: ../src/guestfs.pod:2253
4803 "In the case of an error, a flag is set in the header, and the reply message "
4804 "is slightly changed:"
4809 #: ../src/guestfs.pod:2256
4812 " total length (header + error,\n"
4813 " but not including the length word itself)\n"
4814 " struct guestfs_message_header (encoded as XDR)\n"
4815 " struct guestfs_message_error (encoded as XDR)\n"
4821 #: ../src/guestfs.pod:2261
4823 "The C<guestfs_message_error> structure contains the error message as a "
4829 #: ../src/guestfs.pod:2264
4830 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
4835 #: ../src/guestfs.pod:2266
4837 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
4838 "The normal request message is sent (see above). However this is followed by "
4839 "a sequence of file chunks."
4844 #: ../src/guestfs.pod:2270
4847 " total length (header + arguments,\n"
4848 " but not including the length word itself,\n"
4849 " and not including the chunks)\n"
4850 " struct guestfs_message_header (encoded as XDR)\n"
4851 " struct guestfs_<foo>_args (encoded as XDR)\n"
4852 " sequence of chunks for FileIn param #0\n"
4853 " sequence of chunks for FileIn param #1 etc.\n"
4859 #: ../src/guestfs.pod:2278
4860 msgid "The \"sequence of chunks\" is:"
4865 #: ../src/guestfs.pod:2280
4868 " length of chunk (not including length word itself)\n"
4869 " struct guestfs_chunk (encoded as XDR)\n"
4870 " length of chunk\n"
4871 " struct guestfs_chunk (encoded as XDR)\n"
4873 " length of chunk\n"
4874 " struct guestfs_chunk (with data.data_len == 0)\n"
4880 #: ../src/guestfs.pod:2288
4882 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
4883 "is set in the final chunk to indicate either successful completion or early "
4889 #: ../src/guestfs.pod:2292
4891 "At time of writing there are no functions that have more than one FileIn "
4892 "parameter. However this is (theoretically) supported, by sending the "
4893 "sequence of chunks for each FileIn parameter one after another (from left to "
4899 #: ../src/guestfs.pod:2297
4901 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
4902 "transfer. The library does this by sending a chunk with a special flag set "
4903 "to indicate cancellation. When the daemon sees this, it cancels the whole "
4904 "RPC, does I<not> send any reply, and goes back to reading the next request."
4909 #: ../src/guestfs.pod:2303
4911 "The daemon may also cancel. It does this by writing a special word "
4912 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
4913 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
4914 "cancel chunk). The special word is chosen so that even if cancellation "
4915 "happens right at the end of the transfer (after the library has finished "
4916 "writing and has started listening for the reply), the \"spurious\" cancel "
4917 "flag will not be confused with the reply message."
4922 #: ../src/guestfs.pod:2312
4924 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
4925 "limit), and also files where the size is not known in advance (eg. from "
4926 "pipes or sockets). However the chunks are rather small "
4927 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
4928 "to keep much in memory."
4933 #: ../src/guestfs.pod:2318
4934 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
4939 #: ../src/guestfs.pod:2320
4941 "The protocol for FileOut parameters is exactly the same as for FileIn "
4942 "parameters, but with the roles of daemon and library reversed."
4947 #: ../src/guestfs.pod:2323
4950 " total length (header + ret,\n"
4951 " but not including the length word itself,\n"
4952 " and not including the chunks)\n"
4953 " struct guestfs_message_header (encoded as XDR)\n"
4954 " struct guestfs_<foo>_ret (encoded as XDR)\n"
4955 " sequence of chunks for FileOut param #0\n"
4956 " sequence of chunks for FileOut param #1 etc.\n"
4962 #: ../src/guestfs.pod:2331
4963 msgid "INITIAL MESSAGE"
4968 #: ../src/guestfs.pod:2333
4970 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
4971 "which indicates that the guest and daemon is alive. This is what L</"
4972 "guestfs_launch> waits for."
4977 #: ../src/guestfs.pod:2337
4978 msgid "PROGRESS NOTIFICATION MESSAGES"
4983 #: ../src/guestfs.pod:2339
4985 "The daemon may send progress notification messages at any time. These are "
4986 "distinguished by the normal length word being replaced by "
4987 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
4991 #: ../src/guestfs.pod:2343
4993 "The library turns them into progress callbacks (see L</"
4994 "GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards them "
5000 #: ../src/guestfs.pod:2347
5002 "The daemon self-limits the frequency of progress messages it sends (see "
5003 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
5009 #: ../src/guestfs.pod:2351
5010 msgid "LIBGUESTFS VERSION NUMBERS"
5015 #: ../src/guestfs.pod:2353
5017 "Since April 2010, libguestfs has started to make separate development and "
5018 "stable releases, along with corresponding branches in our git repository. "
5019 "These separate releases can be identified by version number:"
5024 #: ../src/guestfs.pod:2358
5027 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
5028 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
5034 " | `-------- sub-version\n"
5036 " `------ always '1' because we don't change the ABI\n"
5042 #: ../src/guestfs.pod:2369
5043 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
5048 #: ../src/guestfs.pod:2371
5050 "As time passes we cherry pick fixes from the development branch and backport "
5051 "those into the stable branch, the effect being that the stable branch should "
5052 "get more stable and less buggy over time. So the stable releases are ideal "
5053 "for people who don't need new features but would just like the software to "
5059 #: ../src/guestfs.pod:2377
5060 msgid "Our criteria for backporting changes are:"
5065 #: ../src/guestfs.pod:2383
5067 "Documentation changes which don't affect any code are backported unless the "
5068 "documentation refers to a future feature which is not in stable."
5073 #: ../src/guestfs.pod:2389
5075 "Bug fixes which are not controversial, fix obvious problems, and have been "
5076 "well tested are backported."
5081 #: ../src/guestfs.pod:2394
5083 "Simple rearrangements of code which shouldn't affect how it works get "
5084 "backported. This is so that the code in the two branches doesn't get too "
5085 "far out of step, allowing us to backport future fixes more easily."
5090 #: ../src/guestfs.pod:2400
5092 "We I<don't> backport new features, new APIs, new tools etc, except in one "
5093 "exceptional case: the new feature is required in order to implement an "
5094 "important bug fix."
5099 #: ../src/guestfs.pod:2406
5101 "A new stable branch starts when we think the new features in development are "
5102 "substantial and compelling enough over the current stable branch to warrant "
5103 "it. When that happens we create new stable and development versions 1.N.0 "
5104 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
5105 "stable at this point, but by backporting fixes from development, that branch "
5106 "will stabilize over time."
5110 #: ../src/guestfs.pod:2414
5111 msgid "EXTENDING LIBGUESTFS"
5115 #: ../src/guestfs.pod:2416
5116 msgid "ADDING A NEW API ACTION"
5120 #: ../src/guestfs.pod:2418
5122 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
5123 "documentation) are generated, and this makes it easy to extend the "
5128 #: ../src/guestfs.pod:2422
5129 msgid "To add a new API action there are two changes:"
5133 #: ../src/guestfs.pod:2428
5135 "You need to add a description of the call (name, parameters, return type, "
5136 "tests, documentation) to C<generator/generator_actions.ml>."
5140 #: ../src/guestfs.pod:2431
5142 "There are two sorts of API action, depending on whether the call goes "
5143 "through to the daemon in the appliance, or is serviced entirely by the "
5144 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
5145 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
5146 "an example of the latter, since a trace flag is maintained in the handle and "
5147 "all tracing is done on the library side."
5151 #: ../src/guestfs.pod:2439
5153 "Most new actions are of the first type, and get added to the "
5154 "C<daemon_functions> list. Each function has a unique procedure number used "
5155 "in the RPC protocol which is assigned to that action when we publish "
5156 "libguestfs and cannot be reused. Take the latest procedure number and "
5161 #: ../src/guestfs.pod:2445
5163 "For library-only actions of the second type, add to the "
5164 "C<non_daemon_functions> list. Since these functions are serviced by the "
5165 "library and do not travel over the RPC mechanism to the daemon, these "
5166 "functions do not need a procedure number, and so the procedure number is set "
5171 #: ../src/guestfs.pod:2453
5172 msgid "Implement the action (in C):"
5176 #: ../src/guestfs.pod:2455
5178 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
5179 "C<daemon/> directory."
5183 #: ../src/guestfs.pod:2458
5185 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
5186 "(note: double underscore) in the C<src/> directory."
5190 #: ../src/guestfs.pod:2461
5191 msgid "In either case, use another function as an example of what to do."
5195 #: ../src/guestfs.pod:2465
5196 msgid "After making these changes, use C<make> to compile."
5200 #: ../src/guestfs.pod:2467
5202 "Note that you don't need to implement the RPC, language bindings, manual "
5203 "pages or anything else. It's all automatically generated from the OCaml "
5208 #: ../src/guestfs.pod:2471
5209 msgid "ADDING TESTS FOR AN API ACTION"
5213 #: ../src/guestfs.pod:2473
5215 "You can supply zero or as many tests as you want per API call. The tests "
5216 "can either be added as part of the API description (C<generator/"
5217 "generator_actions.ml>), or in some rarer cases you may want to drop a script "
5218 "into C<regressions/>. Note that adding a script to C<regressions/> is "
5219 "slower, so if possible use the first method."
5223 #: ../src/guestfs.pod:2479
5225 "The following describes the test environment used when you add an API test "
5226 "in C<generator_actions.ml>."
5230 #: ../src/guestfs.pod:2482
5231 msgid "The test environment has 4 block devices:"
5235 #: ../src/guestfs.pod:2486
5236 msgid "C</dev/sda> 500MB"
5240 #: ../src/guestfs.pod:2488
5241 msgid "General block device for testing."
5245 #: ../src/guestfs.pod:2490
5246 msgid "C</dev/sdb> 50MB"
5250 #: ../src/guestfs.pod:2492
5252 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
5257 #: ../src/guestfs.pod:2495
5258 msgid "C</dev/sdc> 10MB"
5262 #: ../src/guestfs.pod:2497
5263 msgid "Used in a few tests where two block devices are needed."
5267 #: ../src/guestfs.pod:2499
5272 #: ../src/guestfs.pod:2501
5273 msgid "ISO with fixed content (see C<images/test.iso>)."
5277 #: ../src/guestfs.pod:2505
5279 "To be able to run the tests in a reasonable amount of time, the libguestfs "
5280 "appliance and block devices are reused between tests. So don't try testing "
5281 "L</guestfs_kill_subprocess> :-x"
5285 #: ../src/guestfs.pod:2509
5287 "Each test starts with an initial scenario, selected using one of the "
5288 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
5289 "initialize the disks mentioned above in a particular way as documented in "
5290 "C<generator_types.ml>. You should not assume anything about the previous "
5291 "contents of other disks that are not initialized."
5295 #: ../src/guestfs.pod:2515
5297 "You can add a prerequisite clause to any individual test. This is a run-"
5298 "time check, which, if it fails, causes the test to be skipped. Useful if "
5299 "testing a command which might not work on all variations of libguestfs "
5300 "builds. A test that has prerequisite of C<Always> means to run "
5305 #: ../src/guestfs.pod:2521
5307 "In addition, packagers can skip individual tests by setting environment "
5308 "variables before running C<make check>."
5312 #: ../src/guestfs.pod:2524
5315 " SKIP_TEST_<CMD>_<NUM>=1\n"
5320 #: ../src/guestfs.pod:2526
5321 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
5325 #: ../src/guestfs.pod:2528
5330 #: ../src/guestfs.pod:2530
5333 " SKIP_TEST_<CMD>=1\n"
5338 #: ../src/guestfs.pod:2532
5339 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
5343 #: ../src/guestfs.pod:2534
5344 msgid "Packagers can run only certain tests by setting for example:"
5348 #: ../src/guestfs.pod:2536
5351 " TEST_ONLY=\"vfs_type zerofree\"\n"
5356 #: ../src/guestfs.pod:2538
5358 "See C<capitests/tests.c> for more details of how these environment variables "
5363 #: ../src/guestfs.pod:2541
5364 msgid "DEBUGGING NEW API ACTIONS"
5368 #: ../src/guestfs.pod:2543
5369 msgid "Test new actions work before submitting them."
5373 #: ../src/guestfs.pod:2545
5374 msgid "You can use guestfish to try out new commands."
5378 #: ../src/guestfs.pod:2547
5380 "Debugging the daemon is a problem because it runs inside a minimal "
5381 "environment. However you can fprintf messages in the daemon to stderr, and "
5382 "they will show up if you use C<guestfish -v>."
5386 #: ../src/guestfs.pod:2551
5387 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
5391 #: ../src/guestfs.pod:2553
5393 "Our C source code generally adheres to some basic code-formatting "
5394 "conventions. The existing code base is not totally consistent on this "
5395 "front, but we do prefer that contributed code be formatted similarly. In "
5396 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
5397 "indentation level, and other than that, follow the K&R style."
5401 #: ../src/guestfs.pod:2559
5403 "If you use Emacs, add the following to one of one of your start-up files (e."
5404 "g., ~/.emacs), to help ensure that you get indentation right:"
5408 #: ../src/guestfs.pod:2562
5411 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
5412 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
5413 " (add-hook 'find-file-hook\n"
5414 " '(lambda () (if (and buffer-file-name\n"
5415 " (string-match \"/libguestfs\\\\>\"\n"
5416 " (buffer-file-name))\n"
5417 " (not (string-equal mode-name \"Change Log\"))\n"
5418 " (not (string-equal mode-name \"Makefile\")))\n"
5419 " (setq indent-tabs-mode nil))))\n"
5424 #: ../src/guestfs.pod:2572
5427 " ;;; When editing C sources in libguestfs, use this style.\n"
5428 " (defun libguestfs-c-mode ()\n"
5429 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
5431 " (c-set-style \"K&R\")\n"
5432 " (setq c-indent-level 2)\n"
5433 " (setq c-basic-offset 2))\n"
5434 " (add-hook 'c-mode-hook\n"
5435 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
5436 " (buffer-file-name))\n"
5437 " (libguestfs-c-mode))))\n"
5442 #: ../src/guestfs.pod:2584
5443 msgid "Enable warnings when compiling (and fix any problems this finds):"
5447 #: ../src/guestfs.pod:2587
5450 " ./configure --enable-gcc-warnings\n"
5455 #: ../src/guestfs.pod:2589
5456 msgid "Useful targets are:"
5460 #: ../src/guestfs.pod:2591
5463 " make syntax-check # checks the syntax of the C code\n"
5464 " make check # runs the test suite\n"
5469 #: ../src/guestfs.pod:2594
5470 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
5474 #: ../src/guestfs.pod:2596
5476 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
5477 "which are used to do shell quoting."
5481 #: ../src/guestfs.pod:2601
5486 #: ../src/guestfs.pod:2603
5488 "Simple shell quoted string. Any spaces or other shell characters are "
5493 #: ../src/guestfs.pod:2606
5498 #: ../src/guestfs.pod:2608
5500 "Same as C<%Q> except the string is treated as a path which is prefixed by "
5506 #: ../src/guestfs.pod:2613 ../fish/guestfish.pod:242 ../fish/guestfish.pod:615
5507 msgid "For example:"
5511 #: ../src/guestfs.pod:2615
5514 " asprintf (&cmd, \"cat %R\", path);\n"
5519 #: ../src/guestfs.pod:2617
5520 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
5524 #: ../src/guestfs.pod:2619
5526 "I<Note:> Do I<not> use these when you are passing parameters to the C<command"
5527 "{,r,v,rv}()> functions. These parameters do NOT need to be quoted because "
5528 "they are not passed via the shell (instead, straight to exec). You probably "
5529 "want to use the C<sysroot_path()> function however."
5533 #: ../src/guestfs.pod:2625
5534 msgid "SUBMITTING YOUR NEW API ACTIONS"
5538 #: ../src/guestfs.pod:2627
5540 "Submit patches to the mailing list: L<http://www.redhat.com/mailman/listinfo/"
5541 "libguestfs> and CC to L<rjones@redhat.com>."
5545 #: ../src/guestfs.pod:2631
5546 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
5550 #: ../src/guestfs.pod:2633
5551 msgid "We support i18n (gettext anyhow) in the library."
5555 #: ../src/guestfs.pod:2635
5557 "However many messages come from the daemon, and we don't translate those at "
5558 "the moment. One reason is that the appliance generally has all locale files "
5559 "removed from it, because they take up a lot of space. So we'd have to readd "
5560 "some of those, as well as copying our PO files into the appliance."
5564 #: ../src/guestfs.pod:2641
5566 "Debugging messages are never translated, since they are intended for the "
5571 #: ../src/guestfs.pod:2644
5572 msgid "SOURCE CODE SUBDIRECTORIES"
5576 #: ../src/guestfs.pod:2648 ../src/guestfs-actions.pod:6102
5577 #: ../fish/guestfish-actions.pod:4041
5578 msgid "C<appliance>"
5582 #: ../src/guestfs.pod:2650
5583 msgid "The libguestfs appliance, build scripts and so on."
5587 #: ../src/guestfs.pod:2652
5588 msgid "C<capitests>"
5592 #: ../src/guestfs.pod:2654
5593 msgid "Automated tests of the C API."
5597 #: ../src/guestfs.pod:2656
5602 #: ../src/guestfs.pod:2658
5604 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
5609 #: ../src/guestfs.pod:2661
5614 #: ../src/guestfs.pod:2663
5616 "Safety and liveness tests of components that libguestfs depends upon (not of "
5617 "libguestfs itself). Mainly this is for qemu and the kernel."
5621 #: ../src/guestfs.pod:2666
5626 #: ../src/guestfs.pod:2668
5627 msgid "Outside contributions, experimental parts."
5631 #: ../src/guestfs.pod:2670
5636 #: ../src/guestfs.pod:2672
5638 "The daemon that runs inside the libguestfs appliance and carries out actions."
5642 #: ../src/guestfs.pod:2675
5647 #: ../src/guestfs.pod:2677
5648 msgid "L<virt-df(1)> command and documentation."
5652 #: ../src/guestfs.pod:2679
5657 #: ../src/guestfs.pod:2681
5658 msgid "L<virt-edit(1)> command and documentation."
5662 #: ../src/guestfs.pod:2683
5667 #: ../src/guestfs.pod:2685
5668 msgid "C API example code."
5672 #: ../src/guestfs.pod:2687
5677 #: ../src/guestfs.pod:2689
5679 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
5680 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
5681 "L<virt-tar-out(1)>."
5685 #: ../src/guestfs.pod:2693
5690 #: ../src/guestfs.pod:2695
5692 "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
5696 #: ../src/guestfs.pod:2697
5697 msgid "C<generator>"
5701 #: ../src/guestfs.pod:2699
5703 "The crucially important generator, used to automatically generate large "
5704 "amounts of boilerplate C code for things like RPC and bindings."
5708 #: ../src/guestfs.pod:2702
5713 #: ../src/guestfs.pod:2704
5714 msgid "Files used by the test suite."
5718 #: ../src/guestfs.pod:2706
5719 msgid "Some \"phony\" guest images which we test against."
5723 #: ../src/guestfs.pod:2708
5724 msgid "C<inspector>"
5728 #: ../src/guestfs.pod:2710
5729 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
5733 #: ../src/guestfs.pod:2712
5738 #: ../src/guestfs.pod:2714
5739 msgid "Logo used on the website. The fish is called Arthur by the way."
5743 #: ../src/guestfs.pod:2716
5748 #: ../src/guestfs.pod:2718
5749 msgid "M4 macros used by autoconf."
5753 #: ../src/guestfs.pod:2720
5758 #: ../src/guestfs.pod:2722
5759 msgid "Translations of simple gettext strings."
5763 #: ../src/guestfs.pod:2724
5768 #: ../src/guestfs.pod:2726
5770 "The build infrastructure and PO files for translations of manpages and POD "
5771 "files. Eventually this will be combined with the C<po> directory, but that "
5772 "is rather complicated."
5776 #: ../src/guestfs.pod:2730
5777 msgid "C<regressions>"
5781 #: ../src/guestfs.pod:2732
5782 msgid "Regression tests."
5786 #: ../src/guestfs.pod:2734
5791 #: ../src/guestfs.pod:2736
5792 msgid "L<virt-rescue(1)> command and documentation."
5796 #: ../src/guestfs.pod:2738
5801 #: ../src/guestfs.pod:2740
5802 msgid "Source code to the C library."
5806 #: ../src/guestfs.pod:2742
5811 #: ../src/guestfs.pod:2744
5812 msgid "Command line tools written in Perl (L<virt-resize(1)> and many others)."
5816 #: ../src/guestfs.pod:2746
5817 msgid "C<test-tool>"
5821 #: ../src/guestfs.pod:2748
5823 "Test tool for end users to test if their qemu/kernel combination will work "
5828 #: ../src/guestfs.pod:2751
5833 #: ../src/guestfs.pod:2753
5838 #: ../src/guestfs.pod:2755
5843 #: ../src/guestfs.pod:2757
5848 #: ../src/guestfs.pod:2759
5853 #: ../src/guestfs.pod:2761
5858 #: ../src/guestfs.pod:2763
5863 #: ../src/guestfs.pod:2765
5868 #: ../src/guestfs.pod:2767
5869 msgid "Language bindings."
5873 #: ../src/guestfs.pod:2771
5879 #: ../src/guestfs.pod:2773
5880 msgid "PROTOCOL LIMITS"
5885 #: ../src/guestfs.pod:2775
5887 "Internally libguestfs uses a message-based protocol to pass API calls and "
5888 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
5889 "plenty more detail about this). The maximum message size used by the "
5890 "protocol is slightly less than 4 MB. For some API calls you may need to be "
5891 "aware of this limit. The API calls which may be affected are individually "
5892 "documented, with a link back to this section of the documentation."
5897 #: ../src/guestfs.pod:2783
5899 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
5900 "a simple string. Because this string is at some point internally encoded as "
5901 "a message, the maximum size that it can return is slightly under 4 MB. If "
5902 "the requested file is larger than this then you will get an error."
5907 #: ../src/guestfs.pod:2789
5909 "In order to transfer large files into and out of the guest filesystem, you "
5910 "need to use particular calls that support this. The sections L</UPLOADING> "
5911 "and L</DOWNLOADING> document how to do this."
5916 #: ../src/guestfs.pod:2793
5918 "You might also consider mounting the disk image using our FUSE filesystem "
5919 "support (L<guestmount(1)>)."
5923 #: ../src/guestfs.pod:2796
5924 msgid "MAXIMUM NUMBER OF DISKS"
5928 #: ../src/guestfs.pod:2798
5929 msgid "When using virtio disks (the default) the current limit is B<25> disks."
5933 #: ../src/guestfs.pod:2801
5935 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
5936 "slots. However febootstrap only understands disks with names C</dev/vda> "
5937 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
5942 #: ../src/guestfs.pod:2806
5944 "We are working to substantially raise this limit in future versions but it "
5945 "requires complex changes to qemu."
5949 #: ../src/guestfs.pod:2809
5951 "In future versions of libguestfs it should also be possible to \"hot plug\" "
5952 "disks (add and remove disks after calling L</guestfs_launch>). This also "
5953 "requires changes to qemu."
5957 #: ../src/guestfs.pod:2813
5958 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
5962 #: ../src/guestfs.pod:2815
5963 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
5967 #: ../src/guestfs.pod:2817
5969 "This is because it reserves 4 bits for the minor device number (thus C</dev/"
5970 "vda>, and C</dev/vda1> through C</dev/vda15>)."
5974 #: ../src/guestfs.pod:2820
5976 "If you attach a disk with more than 15 partitions, the extra partitions are "
5977 "ignored by libguestfs."
5981 #: ../src/guestfs.pod:2823
5982 msgid "MAXIMUM SIZE OF A DISK"
5986 #: ../src/guestfs.pod:2825
5987 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
5991 #: ../src/guestfs.pod:2827
5993 "We have tested block devices up to 1 exabyte (2**60 or "
5994 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
5999 #: ../src/guestfs.pod:2831
6001 "Although libguestfs probably does not impose any limit, the underlying host "
6002 "storage will. If you store disk images on a host ext4 filesystem, then the "
6003 "maximum size will be limited by the maximum ext4 file size (currently 16 "
6004 "TB). If you store disk images as host logical volumes then you are limited "
6005 "by the maximum size of an LV."
6009 #: ../src/guestfs.pod:2837
6011 "For the hugest disk image files, we recommend using XFS on the host for "
6016 #: ../src/guestfs.pod:2840
6017 msgid "MAXIMUM SIZE OF A PARTITION"
6021 #: ../src/guestfs.pod:2842
6023 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
6024 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
6025 "address a partition located beyond 2 TB on the disk."
6029 #: ../src/guestfs.pod:2846
6031 "It is recommended that you use GPT partitions on disks which are larger than "
6032 "this size. GPT uses 64 bit sector numbers and so can address partitions "
6033 "which are theoretically larger than the largest disk we could support."
6037 #: ../src/guestfs.pod:2851
6038 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
6042 #: ../src/guestfs.pod:2853
6044 "This depends on the filesystem type. libguestfs itself does not impose any "
6045 "known limit. Consult Wikipedia or the filesystem documentation to find out "
6046 "what these limits are."
6050 #: ../src/guestfs.pod:2857
6051 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
6055 #: ../src/guestfs.pod:2859
6057 "The API functions L</guestfs_upload>, L</guestfs_download>, L</"
6058 "guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
6059 "uploads and downloads."
6063 #: ../src/guestfs.pod:2863
6064 msgid "INSPECTION LIMITS"
6068 #: ../src/guestfs.pod:2865
6070 "The inspection code has several arbitrary limits on things like the size of "
6071 "Windows Registry hive it will read, and the length of product name. These "
6072 "are intended to stop a malicious guest from consuming arbitrary amounts of "
6073 "memory and disk space on the host, and should not be reached in practice. "
6074 "See the source code for more information."
6079 #: ../src/guestfs.pod:2871 ../fish/guestfish.pod:1017
6080 #: ../test-tool/libguestfs-test-tool.pod:82
6081 msgid "ENVIRONMENT VARIABLES"
6086 #: ../src/guestfs.pod:2875 ../fish/guestfish.pod:1048
6087 msgid "LIBGUESTFS_APPEND"
6092 #: ../src/guestfs.pod:2877 ../fish/guestfish.pod:1050
6093 msgid "Pass additional options to the guest kernel."
6098 #: ../src/guestfs.pod:2879 ../fish/guestfish.pod:1052
6099 msgid "LIBGUESTFS_DEBUG"
6104 #: ../src/guestfs.pod:2881
6106 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
6107 "effect as calling C<guestfs_set_verbose (g, 1)>."
6112 #: ../src/guestfs.pod:2884 ../fish/guestfish.pod:1057
6113 msgid "LIBGUESTFS_MEMSIZE"
6118 #: ../src/guestfs.pod:2886 ../fish/guestfish.pod:1059
6120 "Set the memory allocated to the qemu process, in megabytes. For example:"
6125 #: ../src/guestfs.pod:2889 ../fish/guestfish.pod:1062
6128 " LIBGUESTFS_MEMSIZE=700\n"
6134 #: ../src/guestfs.pod:2891 ../fish/guestfish.pod:1064
6135 msgid "LIBGUESTFS_PATH"
6139 #: ../src/guestfs.pod:2893
6141 "Set the path that libguestfs uses to search for a supermin appliance. See "
6142 "the discussion of paths in section L</PATH> above."
6147 #: ../src/guestfs.pod:2896 ../fish/guestfish.pod:1069
6148 msgid "LIBGUESTFS_QEMU"
6153 #: ../src/guestfs.pod:2898 ../fish/guestfish.pod:1071
6155 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
6156 "which was found at compile time by the configure script is used."
6161 #: ../src/guestfs.pod:2902
6162 msgid "See also L</QEMU WRAPPERS> above."
6167 #: ../src/guestfs.pod:2904 ../fish/guestfish.pod:1075
6168 msgid "LIBGUESTFS_TRACE"
6173 #: ../src/guestfs.pod:2906
6175 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
6176 "effect as calling C<guestfs_set_trace (g, 1)>."
6181 #: ../src/guestfs.pod:2909 ../fish/guestfish.pod:1084
6186 #: ../src/guestfs.pod:2911 ../fish/guestfish.pod:1086
6188 "Location of temporary directory, defaults to C</tmp> except for the cached "
6189 "supermin appliance which defaults to C</var/tmp>."
6193 #: ../src/guestfs.pod:2914 ../fish/guestfish.pod:1089
6195 "If libguestfs was compiled to use the supermin appliance then the real "
6196 "appliance is cached in this directory, shared between all handles belonging "
6197 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
6198 "use in case C</var/tmp> is not large enough."
6203 #: ../src/guestfs.pod:2922 ../fish/guestfish.pod:1156
6204 #: ../test-tool/libguestfs-test-tool.pod:87 ../fuse/guestmount.pod:279
6205 #: ../tools/virt-win-reg.pl:744 ../tools/virt-list-filesystems.pl:189
6206 #: ../tools/virt-tar.pl:286 ../tools/virt-make-fs.pl:539
6207 #: ../tools/virt-list-partitions.pl:257
6212 #: ../src/guestfs.pod:2924
6214 "L<guestfs-examples(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, L<guestfs-"
6215 "ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-copy-in"
6216 "(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems"
6217 "(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-"
6218 "partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-"
6219 "tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<qemu(1)"
6220 ">, L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
6225 #: ../src/guestfs.pod:2951
6227 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
6228 "(8)>, L<disktype(1)>."
6233 #: ../src/guestfs.pod:2958 ../tools/virt-win-reg.pl:759
6234 #: ../tools/virt-make-fs.pl:553
6240 #: ../src/guestfs.pod:2960
6241 msgid "To get a list of bugs against libguestfs use this link:"
6246 #: ../src/guestfs.pod:2962
6248 "L<https://bugzilla.redhat.com/buglist.cgi?"
6249 "component=libguestfs&product=Virtualization+Tools>"
6254 #: ../src/guestfs.pod:2964
6255 msgid "To report a new bug against libguestfs use this link:"
6260 #: ../src/guestfs.pod:2966
6262 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
6263 "component=libguestfs&product=Virtualization+Tools>"
6268 #: ../src/guestfs.pod:2968
6269 msgid "When reporting a bug, please check:"
6274 #: ../src/guestfs.pod:2974
6275 msgid "That the bug hasn't been reported already."
6280 #: ../src/guestfs.pod:2978
6281 msgid "That you are testing a recent version."
6286 #: ../src/guestfs.pod:2982
6287 msgid "Describe the bug accurately, and give a way to reproduce it."
6292 #: ../src/guestfs.pod:2986
6294 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
6300 #: ../src/guestfs.pod:2991 ../fish/guestfish.pod:1180
6301 #: ../test-tool/libguestfs-test-tool.pod:93 ../fuse/guestmount.pod:290
6307 #: ../src/guestfs.pod:2993 ../fish/guestfish.pod:1182
6308 #: ../test-tool/libguestfs-test-tool.pod:95 ../fuse/guestmount.pod:292
6309 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
6314 #: ../src/guestfs.pod:2995 ../fish/guestfish.pod:1184
6315 #: ../test-tool/libguestfs-test-tool.pod:97 ../fuse/guestmount.pod:294
6316 #: ../tools/virt-win-reg.pl:774 ../tools/virt-list-filesystems.pl:206
6317 #: ../tools/virt-tar.pl:305 ../tools/virt-make-fs.pl:568
6318 #: ../tools/virt-list-partitions.pl:273
6323 #: ../src/guestfs.pod:2997 ../fish/guestfish.pod:1186
6324 #: ../test-tool/libguestfs-test-tool.pod:99
6325 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
6330 #: ../src/guestfs.pod:3000
6332 "This library is free software; you can redistribute it and/or modify it "
6333 "under the terms of the GNU Lesser General Public License as published by the "
6334 "Free Software Foundation; either version 2 of the License, or (at your "
6335 "option) any later version."
6340 #: ../src/guestfs.pod:3005
6342 "This library is distributed in the hope that it will be useful, but WITHOUT "
6343 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
6344 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
6350 #: ../src/guestfs.pod:3010
6352 "You should have received a copy of the GNU Lesser General Public License "
6353 "along with this library; if not, write to the Free Software Foundation, "
6354 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
6359 #: ../src/guestfs-actions.pod:1
6360 msgid "guestfs_add_cdrom"
6365 #: ../src/guestfs-actions.pod:3
6369 " guestfs_add_cdrom (guestfs_h *g,\n"
6370 " const char *filename);\n"
6376 #: ../src/guestfs-actions.pod:7 ../fish/guestfish-actions.pod:5
6377 msgid "This function adds a virtual CD-ROM disk image to the guest."
6381 #: ../src/guestfs-actions.pod:9 ../fish/guestfish-actions.pod:7
6382 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
6387 #: ../src/guestfs-actions.pod:17
6389 "This call checks for the existence of C<filename>. This stops you from "
6390 "specifying other types of drive which are supported by qemu such as C<nbd:> "
6391 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
6397 #: ../src/guestfs-actions.pod:24
6399 "If you just want to add an ISO file (often you use this as an efficient way "
6400 "to transfer large files into the guest), then you should probably use "
6401 "C<guestfs_add_drive_ro> instead."
6406 #: ../src/guestfs-actions.pod:30 ../src/guestfs-actions.pod:140
6407 #: ../src/guestfs-actions.pod:201 ../src/guestfs-actions.pod:238
6408 #: ../src/guestfs-actions.pod:252 ../src/guestfs-actions.pod:273
6409 #: ../src/guestfs-actions.pod:293 ../src/guestfs-actions.pod:307
6410 #: ../src/guestfs-actions.pod:422 ../src/guestfs-actions.pod:442
6411 #: ../src/guestfs-actions.pod:456 ../src/guestfs-actions.pod:501
6412 #: ../src/guestfs-actions.pod:529 ../src/guestfs-actions.pod:547
6413 #: ../src/guestfs-actions.pod:614 ../src/guestfs-actions.pod:647
6414 #: ../src/guestfs-actions.pod:661 ../src/guestfs-actions.pod:676
6415 #: ../src/guestfs-actions.pod:775 ../src/guestfs-actions.pod:793
6416 #: ../src/guestfs-actions.pod:807 ../src/guestfs-actions.pod:821
6417 #: ../src/guestfs-actions.pod:982 ../src/guestfs-actions.pod:1002
6418 #: ../src/guestfs-actions.pod:1020 ../src/guestfs-actions.pod:1104
6419 #: ../src/guestfs-actions.pod:1122 ../src/guestfs-actions.pod:1141
6420 #: ../src/guestfs-actions.pod:1155 ../src/guestfs-actions.pod:1175
6421 #: ../src/guestfs-actions.pod:1245 ../src/guestfs-actions.pod:1276
6422 #: ../src/guestfs-actions.pod:1301 ../src/guestfs-actions.pod:1343
6423 #: ../src/guestfs-actions.pod:1449 ../src/guestfs-actions.pod:1483
6424 #: ../src/guestfs-actions.pod:1698 ../src/guestfs-actions.pod:1720
6425 #: ../src/guestfs-actions.pod:1807 ../src/guestfs-actions.pod:2271
6426 #: ../src/guestfs-actions.pod:2415 ../src/guestfs-actions.pod:2476
6427 #: ../src/guestfs-actions.pod:2511 ../src/guestfs-actions.pod:3551
6428 #: ../src/guestfs-actions.pod:3566 ../src/guestfs-actions.pod:3591
6429 #: ../src/guestfs-actions.pod:3778 ../src/guestfs-actions.pod:3792
6430 #: ../src/guestfs-actions.pod:3805 ../src/guestfs-actions.pod:3819
6431 #: ../src/guestfs-actions.pod:3834 ../src/guestfs-actions.pod:3870
6432 #: ../src/guestfs-actions.pod:3942 ../src/guestfs-actions.pod:3962
6433 #: ../src/guestfs-actions.pod:3979 ../src/guestfs-actions.pod:4002
6434 #: ../src/guestfs-actions.pod:4025 ../src/guestfs-actions.pod:4060
6435 #: ../src/guestfs-actions.pod:4079 ../src/guestfs-actions.pod:4098
6436 #: ../src/guestfs-actions.pod:4133 ../src/guestfs-actions.pod:4145
6437 #: ../src/guestfs-actions.pod:4181 ../src/guestfs-actions.pod:4197
6438 #: ../src/guestfs-actions.pod:4210 ../src/guestfs-actions.pod:4225
6439 #: ../src/guestfs-actions.pod:4242 ../src/guestfs-actions.pod:4335
6440 #: ../src/guestfs-actions.pod:4355 ../src/guestfs-actions.pod:4368
6441 #: ../src/guestfs-actions.pod:4419 ../src/guestfs-actions.pod:4437
6442 #: ../src/guestfs-actions.pod:4455 ../src/guestfs-actions.pod:4471
6443 #: ../src/guestfs-actions.pod:4485 ../src/guestfs-actions.pod:4499
6444 #: ../src/guestfs-actions.pod:4516 ../src/guestfs-actions.pod:4531
6445 #: ../src/guestfs-actions.pod:4551 ../src/guestfs-actions.pod:4621
6446 #: ../src/guestfs-actions.pod:4694 ../src/guestfs-actions.pod:4725
6447 #: ../src/guestfs-actions.pod:4744 ../src/guestfs-actions.pod:4763
6448 #: ../src/guestfs-actions.pod:4775 ../src/guestfs-actions.pod:4792
6449 #: ../src/guestfs-actions.pod:4805 ../src/guestfs-actions.pod:4820
6450 #: ../src/guestfs-actions.pod:4835 ../src/guestfs-actions.pod:4870
6451 #: ../src/guestfs-actions.pod:4903 ../src/guestfs-actions.pod:4942
6452 #: ../src/guestfs-actions.pod:4962 ../src/guestfs-actions.pod:4976
6453 #: ../src/guestfs-actions.pod:4993 ../src/guestfs-actions.pod:5042
6454 #: ../src/guestfs-actions.pod:5088 ../src/guestfs-actions.pod:5142
6455 #: ../src/guestfs-actions.pod:5176 ../src/guestfs-actions.pod:5211
6456 #: ../src/guestfs-actions.pod:5228 ../src/guestfs-actions.pod:5246
6457 #: ../src/guestfs-actions.pod:5380 ../src/guestfs-actions.pod:5437
6458 #: ../src/guestfs-actions.pod:5459 ../src/guestfs-actions.pod:5477
6459 #: ../src/guestfs-actions.pod:5509 ../src/guestfs-actions.pod:5575
6460 #: ../src/guestfs-actions.pod:5592 ../src/guestfs-actions.pod:5605
6461 #: ../src/guestfs-actions.pod:5619 ../src/guestfs-actions.pod:5908
6462 #: ../src/guestfs-actions.pod:5927 ../src/guestfs-actions.pod:5946
6463 #: ../src/guestfs-actions.pod:5960 ../src/guestfs-actions.pod:5972
6464 #: ../src/guestfs-actions.pod:5986 ../src/guestfs-actions.pod:5998
6465 #: ../src/guestfs-actions.pod:6012 ../src/guestfs-actions.pod:6028
6466 #: ../src/guestfs-actions.pod:6049 ../src/guestfs-actions.pod:6068
6467 #: ../src/guestfs-actions.pod:6087 ../src/guestfs-actions.pod:6117
6468 #: ../src/guestfs-actions.pod:6135 ../src/guestfs-actions.pod:6158
6469 #: ../src/guestfs-actions.pod:6176 ../src/guestfs-actions.pod:6195
6470 #: ../src/guestfs-actions.pod:6216 ../src/guestfs-actions.pod:6235
6471 #: ../src/guestfs-actions.pod:6252 ../src/guestfs-actions.pod:6280
6472 #: ../src/guestfs-actions.pod:6304 ../src/guestfs-actions.pod:6323
6473 #: ../src/guestfs-actions.pod:6347 ../src/guestfs-actions.pod:6366
6474 #: ../src/guestfs-actions.pod:6381 ../src/guestfs-actions.pod:6400
6475 #: ../src/guestfs-actions.pod:6437 ../src/guestfs-actions.pod:6467
6476 #: ../src/guestfs-actions.pod:6500 ../src/guestfs-actions.pod:6622
6477 #: ../src/guestfs-actions.pod:6743 ../src/guestfs-actions.pod:6755
6478 #: ../src/guestfs-actions.pod:6768 ../src/guestfs-actions.pod:6781
6479 #: ../src/guestfs-actions.pod:6803 ../src/guestfs-actions.pod:6816
6480 #: ../src/guestfs-actions.pod:6829 ../src/guestfs-actions.pod:6842
6481 #: ../src/guestfs-actions.pod:6857 ../src/guestfs-actions.pod:6916
6482 #: ../src/guestfs-actions.pod:6933 ../src/guestfs-actions.pod:6949
6483 #: ../src/guestfs-actions.pod:6965 ../src/guestfs-actions.pod:6982
6484 #: ../src/guestfs-actions.pod:6995 ../src/guestfs-actions.pod:7015
6485 #: ../src/guestfs-actions.pod:7051 ../src/guestfs-actions.pod:7065
6486 #: ../src/guestfs-actions.pod:7106 ../src/guestfs-actions.pod:7119
6487 #: ../src/guestfs-actions.pod:7137 ../src/guestfs-actions.pod:7171
6488 #: ../src/guestfs-actions.pod:7207 ../src/guestfs-actions.pod:7323
6489 #: ../src/guestfs-actions.pod:7338 ../src/guestfs-actions.pod:7352
6490 #: ../src/guestfs-actions.pod:7407 ../src/guestfs-actions.pod:7420
6491 #: ../src/guestfs-actions.pod:7465 ../src/guestfs-actions.pod:7498
6492 #: ../src/guestfs-actions.pod:7559 ../src/guestfs-actions.pod:7585
6493 #: ../src/guestfs-actions.pod:7652 ../src/guestfs-actions.pod:7671
6494 #: ../src/guestfs-actions.pod:7700
6495 msgid "This function returns 0 on success or -1 on error."
6500 #: ../src/guestfs-actions.pod:32 ../src/guestfs-actions.pod:254
6501 #: ../src/guestfs-actions.pod:275 ../fish/guestfish-actions.pod:28
6502 #: ../fish/guestfish-actions.pod:163 ../fish/guestfish-actions.pod:177
6504 "This function is deprecated. In new code, use the C<add_drive_opts> call "
6510 #: ../src/guestfs-actions.pod:35 ../src/guestfs-actions.pod:257
6511 #: ../src/guestfs-actions.pod:278 ../src/guestfs-actions.pod:1454
6512 #: ../src/guestfs-actions.pod:1949 ../src/guestfs-actions.pod:1970
6513 #: ../src/guestfs-actions.pod:4556 ../src/guestfs-actions.pod:4875
6514 #: ../src/guestfs-actions.pod:5093 ../src/guestfs-actions.pod:5181
6515 #: ../src/guestfs-actions.pod:6445 ../src/guestfs-actions.pod:6475
6516 #: ../src/guestfs-actions.pod:6508 ../src/guestfs-actions.pod:6567
6517 #: ../src/guestfs-actions.pod:7503 ../src/guestfs-actions.pod:7593
6518 #: ../src/guestfs-actions.pod:7763 ../fish/guestfish-actions.pod:31
6519 #: ../fish/guestfish-actions.pod:166 ../fish/guestfish-actions.pod:180
6520 #: ../fish/guestfish-actions.pod:961 ../fish/guestfish-actions.pod:1321
6521 #: ../fish/guestfish-actions.pod:1335 ../fish/guestfish-actions.pod:3054
6522 #: ../fish/guestfish-actions.pod:3261 ../fish/guestfish-actions.pod:3375
6523 #: ../fish/guestfish-actions.pod:3423 ../fish/guestfish-actions.pod:4303
6524 #: ../fish/guestfish-actions.pod:4326 ../fish/guestfish-actions.pod:4348
6525 #: ../fish/guestfish-actions.pod:4386 ../fish/guestfish-actions.pod:5021
6526 #: ../fish/guestfish-actions.pod:5119
6528 "Deprecated functions will not be removed from the API, but the fact that "
6529 "they are deprecated indicates that there are problems with correct use of "
6535 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:142
6536 #: ../src/guestfs-actions.pod:1106 ../src/guestfs-actions.pod:1921
6537 #: ../src/guestfs-actions.pod:2019 ../src/guestfs-actions.pod:2122
6538 #: ../src/guestfs-actions.pod:3553 ../src/guestfs-actions.pod:3573
6539 #: ../src/guestfs-actions.pod:4879 ../src/guestfs-actions.pod:6137
6540 #: ../src/guestfs-actions.pod:6254 ../src/guestfs-actions.pod:6368
6541 #: ../src/guestfs-actions.pod:6859 ../src/guestfs-actions.pod:6984
6542 #: ../src/guestfs-actions.pod:7507
6543 msgid "(Added in 0.3)"
6548 #: ../src/guestfs-actions.pod:41
6549 msgid "guestfs_add_domain"
6554 #: ../src/guestfs-actions.pod:43
6558 " guestfs_add_domain (guestfs_h *g,\n"
6559 " const char *dom,\n"
6566 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:151
6567 #: ../src/guestfs-actions.pod:2756 ../src/guestfs-actions.pod:4570
6568 #: ../src/guestfs-actions.pod:4889 ../src/guestfs-actions.pod:5106
6570 "You may supply a list of optional arguments to this call. Use zero or more "
6571 "of the following pairs of parameters, and terminate the list with C<-1> on "
6572 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
6576 #: ../src/guestfs-actions.pod:53
6579 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
6580 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
6581 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
6582 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
6583 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
6589 #: ../src/guestfs-actions.pod:59
6591 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
6592 "It works by connecting to libvirt, requesting the domain and domain XML from "
6593 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
6599 #: ../src/guestfs-actions.pod:64 ../fish/guestfish-actions.pod:46
6601 "The number of disks added is returned. This operation is atomic: if an "
6602 "error is returned, then no disks are added."
6607 #: ../src/guestfs-actions.pod:67 ../fish/guestfish-actions.pod:49
6609 "This function does some minimal checks to make sure the libvirt domain is "
6610 "not running (unless C<readonly> is true). In a future version we will try "
6611 "to acquire the libvirt lock on each disk."
6616 #: ../src/guestfs-actions.pod:71 ../fish/guestfish-actions.pod:53
6618 "Disks must be accessible locally. This often means that adding disks from a "
6619 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
6620 "unless those disks are accessible via the same device path locally too."
6624 #: ../src/guestfs-actions.pod:76 ../fish/guestfish-actions.pod:58
6626 "The optional C<libvirturi> parameter sets the libvirt URI (see L<http://"
6627 "libvirt.org/uri.html>). If this is not set then we connect to the default "
6628 "libvirt URI (or one set through an environment variable, see the libvirt "
6629 "documentation for full details)."
6633 #: ../src/guestfs-actions.pod:82 ../fish/guestfish-actions.pod:64
6635 "The optional C<live> flag controls whether this call will try to connect to "
6636 "a running virtual machine C<guestfsd> process if it sees a suitable "
6637 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
6638 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
6639 "DAEMONS> for more information."
6643 #: ../src/guestfs-actions.pod:89 ../fish/guestfish-actions.pod:71
6645 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
6646 "passed instead of the domain name. The C<dom> string is treated as a UUID "
6647 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
6653 #: ../src/guestfs-actions.pod:94
6655 "The other optional parameters are passed directly through to "
6656 "C<guestfs_add_drive_opts>."
6661 #: ../src/guestfs-actions.pod:97 ../src/guestfs-actions.pod:350
6662 #: ../src/guestfs-actions.pod:515 ../src/guestfs-actions.pod:693
6663 #: ../src/guestfs-actions.pod:724 ../src/guestfs-actions.pod:742
6664 #: ../src/guestfs-actions.pod:761 ../src/guestfs-actions.pod:1321
6665 #: ../src/guestfs-actions.pod:1677 ../src/guestfs-actions.pod:1880
6666 #: ../src/guestfs-actions.pod:1991 ../src/guestfs-actions.pod:2031
6667 #: ../src/guestfs-actions.pod:2086 ../src/guestfs-actions.pod:2109
6668 #: ../src/guestfs-actions.pod:2402 ../src/guestfs-actions.pod:2874
6669 #: ../src/guestfs-actions.pod:2892 ../src/guestfs-actions.pod:5065
6670 #: ../src/guestfs-actions.pod:5283 ../src/guestfs-actions.pod:5689
6671 #: ../src/guestfs-actions.pod:5715 ../src/guestfs-actions.pod:7092
6672 #: ../src/guestfs-actions.pod:7518 ../src/guestfs-actions.pod:7531
6673 #: ../src/guestfs-actions.pod:7544
6674 msgid "On error this function returns -1."
6679 #: ../src/guestfs-actions.pod:99
6680 msgid "(Added in 1.7.4)"
6685 #: ../src/guestfs-actions.pod:101
6686 msgid "guestfs_add_domain_va"
6691 #: ../src/guestfs-actions.pod:103
6695 " guestfs_add_domain_va (guestfs_h *g,\n"
6696 " const char *dom,\n"
6703 #: ../src/guestfs-actions.pod:108
6704 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
6709 #: ../src/guestfs-actions.pod:110 ../src/guestfs-actions.pod:121
6710 #: ../src/guestfs-actions.pod:214 ../src/guestfs-actions.pod:225
6711 #: ../src/guestfs-actions.pod:2840 ../src/guestfs-actions.pod:2852
6712 #: ../src/guestfs-actions.pod:4635 ../src/guestfs-actions.pod:4647
6713 #: ../src/guestfs-actions.pod:4917 ../src/guestfs-actions.pod:4929
6714 #: ../src/guestfs-actions.pod:5153 ../src/guestfs-actions.pod:5164
6715 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
6720 #: ../src/guestfs-actions.pod:112
6721 msgid "guestfs_add_domain_argv"
6726 #: ../src/guestfs-actions.pod:114
6730 " guestfs_add_domain_argv (guestfs_h *g,\n"
6731 " const char *dom,\n"
6732 " const struct guestfs_add_domain_argv *optargs);\n"
6738 #: ../src/guestfs-actions.pod:119
6739 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
6744 #: ../src/guestfs-actions.pod:123
6745 msgid "guestfs_add_drive"
6750 #: ../src/guestfs-actions.pod:125
6754 " guestfs_add_drive (guestfs_h *g,\n"
6755 " const char *filename);\n"
6761 #: ../src/guestfs-actions.pod:129
6763 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
6764 "optional parameters, so the disk is added writable, with the format being "
6765 "detected automatically."
6770 #: ../src/guestfs-actions.pod:133
6772 "Automatic detection of the format opens you up to a potential security hole "
6773 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6774 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
6775 "you should think about replacing calls to this function with calls to "
6776 "C<guestfs_add_drive_opts>, and specifying the format."
6781 #: ../src/guestfs-actions.pod:144
6782 msgid "guestfs_add_drive_opts"
6787 #: ../src/guestfs-actions.pod:146
6791 " guestfs_add_drive_opts (guestfs_h *g,\n"
6792 " const char *filename,\n"
6799 #: ../src/guestfs-actions.pod:156
6802 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
6803 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
6804 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
6810 #: ../src/guestfs-actions.pod:160 ../fish/guestfish-actions.pod:102
6812 "This function adds a virtual machine disk image C<filename> to libguestfs. "
6813 "The first time you call this function, the disk appears as C</dev/sda>, the "
6814 "second time as C</dev/sdb>, and so on."
6819 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:107
6821 "You don't necessarily need to be root when using libguestfs. However you "
6822 "obviously do need sufficient permissions to access the filename for whatever "
6823 "operations you want to perform (ie. read access if you just want to read the "
6824 "image or write access if you want to modify the image)."
6829 #: ../src/guestfs-actions.pod:171 ../fish/guestfish-actions.pod:113
6830 msgid "This call checks that C<filename> exists."
6835 #: ../src/guestfs-actions.pod:173 ../src/guestfs-actions.pod:4583
6836 #: ../fish/guestfish-actions.pod:115 ../fish/guestfish-actions.pod:3065
6837 msgid "The optional arguments are:"
6842 #: ../src/guestfs-actions.pod:177 ../fish/guestfish-actions.pod:119
6848 #: ../src/guestfs-actions.pod:179 ../fish/guestfish-actions.pod:121
6850 "If true then the image is treated as read-only. Writes are still allowed, "
6851 "but they are stored in a temporary snapshot overlay which is discarded at "
6852 "the end. The disk that you add is not modified."
6857 #: ../src/guestfs-actions.pod:183 ../fish/guestfish-actions.pod:125
6863 #: ../src/guestfs-actions.pod:185
6865 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
6866 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
6867 "Possible formats include C<raw> and C<qcow2>."
6872 #: ../src/guestfs-actions.pod:189 ../fish/guestfish-actions.pod:131
6874 "Automatic detection of the format opens you up to a potential security hole "
6875 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6876 "RHBZ#642934. Specifying the format closes this security hole."
6881 #: ../src/guestfs-actions.pod:194 ../fish/guestfish-actions.pod:136
6887 #: ../src/guestfs-actions.pod:196
6889 "This rarely-used option lets you emulate the behaviour of the deprecated "
6890 "C<guestfs_add_drive_with_if> call (q.v.)"
6895 #: ../src/guestfs-actions.pod:203
6896 msgid "(Added in 1.5.23)"
6901 #: ../src/guestfs-actions.pod:205
6902 msgid "guestfs_add_drive_opts_va"
6907 #: ../src/guestfs-actions.pod:207
6911 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
6912 " const char *filename,\n"
6919 #: ../src/guestfs-actions.pod:212
6920 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
6925 #: ../src/guestfs-actions.pod:216
6926 msgid "guestfs_add_drive_opts_argv"
6931 #: ../src/guestfs-actions.pod:218
6935 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
6936 " const char *filename,\n"
6937 " const struct guestfs_add_drive_opts_argv *optargs);\n"
6943 #: ../src/guestfs-actions.pod:223
6944 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
6949 #: ../src/guestfs-actions.pod:227
6950 msgid "guestfs_add_drive_ro"
6955 #: ../src/guestfs-actions.pod:229
6959 " guestfs_add_drive_ro (guestfs_h *g,\n"
6960 " const char *filename);\n"
6966 #: ../src/guestfs-actions.pod:233
6968 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
6969 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
6970 "disk is added read-only, with the format being detected automatically."
6975 #: ../src/guestfs-actions.pod:240
6976 msgid "(Added in 1.0.38)"
6981 #: ../src/guestfs-actions.pod:242
6982 msgid "guestfs_add_drive_ro_with_if"
6987 #: ../src/guestfs-actions.pod:244
6991 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
6992 " const char *filename,\n"
6993 " const char *iface);\n"
6999 #: ../src/guestfs-actions.pod:249
7001 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
7002 "QEMU interface emulation to use at run time."
7007 #: ../src/guestfs-actions.pod:261 ../src/guestfs-actions.pod:282
7008 #: ../src/guestfs-actions.pod:2361
7009 msgid "(Added in 1.0.84)"
7014 #: ../src/guestfs-actions.pod:263
7015 msgid "guestfs_add_drive_with_if"
7020 #: ../src/guestfs-actions.pod:265
7024 " guestfs_add_drive_with_if (guestfs_h *g,\n"
7025 " const char *filename,\n"
7026 " const char *iface);\n"
7032 #: ../src/guestfs-actions.pod:270
7034 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
7035 "QEMU interface emulation to use at run time."
7040 #: ../src/guestfs-actions.pod:284
7041 msgid "guestfs_aug_clear"
7046 #: ../src/guestfs-actions.pod:286
7050 " guestfs_aug_clear (guestfs_h *g,\n"
7051 " const char *augpath);\n"
7057 #: ../src/guestfs-actions.pod:290 ../fish/guestfish-actions.pod:188
7059 "Set the value associated with C<path> to C<NULL>. This is the same as the "
7060 "L<augtool(1)> C<clear> command."
7065 #: ../src/guestfs-actions.pod:295 ../src/guestfs-actions.pod:2111
7066 msgid "(Added in 1.3.4)"
7071 #: ../src/guestfs-actions.pod:297
7072 msgid "guestfs_aug_close"
7077 #: ../src/guestfs-actions.pod:299
7081 " guestfs_aug_close (guestfs_h *g);\n"
7087 #: ../src/guestfs-actions.pod:302
7089 "Close the current Augeas handle and free up any resources used by it. After "
7090 "calling this, you have to call C<guestfs_aug_init> again before you can use "
7091 "any other Augeas functions."
7096 #: ../src/guestfs-actions.pod:309 ../src/guestfs-actions.pod:334
7097 #: ../src/guestfs-actions.pod:352 ../src/guestfs-actions.pod:366
7098 #: ../src/guestfs-actions.pod:424 ../src/guestfs-actions.pod:444
7099 #: ../src/guestfs-actions.pod:458 ../src/guestfs-actions.pod:489
7100 #: ../src/guestfs-actions.pod:503 ../src/guestfs-actions.pod:517
7101 #: ../src/guestfs-actions.pod:531 ../src/guestfs-actions.pod:549
7102 #: ../src/guestfs-actions.pod:5766
7103 msgid "(Added in 0.7)"
7108 #: ../src/guestfs-actions.pod:311
7109 msgid "guestfs_aug_defnode"
7114 #: ../src/guestfs-actions.pod:313
7117 " struct guestfs_int_bool *\n"
7118 " guestfs_aug_defnode (guestfs_h *g,\n"
7119 " const char *name,\n"
7120 " const char *expr,\n"
7121 " const char *val);\n"
7127 #: ../src/guestfs-actions.pod:319 ../fish/guestfish-actions.pod:204
7129 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
7134 #: ../src/guestfs-actions.pod:322
7136 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
7137 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
7138 "containing that single node."
7143 #: ../src/guestfs-actions.pod:326 ../fish/guestfish-actions.pod:211
7145 "On success this returns a pair containing the number of nodes in the "
7146 "nodeset, and a boolean flag if a node was created."
7151 #: ../src/guestfs-actions.pod:330
7153 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
7154 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
7159 #: ../src/guestfs-actions.pod:336
7160 msgid "guestfs_aug_defvar"
7165 #: ../src/guestfs-actions.pod:338
7169 " guestfs_aug_defvar (guestfs_h *g,\n"
7170 " const char *name,\n"
7171 " const char *expr);\n"
7177 #: ../src/guestfs-actions.pod:343 ../fish/guestfish-actions.pod:219
7179 "Defines an Augeas variable C<name> whose value is the result of evaluating "
7180 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
7185 #: ../src/guestfs-actions.pod:347 ../fish/guestfish-actions.pod:223
7187 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
7188 "evaluates to something which is not a nodeset."
7193 #: ../src/guestfs-actions.pod:354
7194 msgid "guestfs_aug_get"
7199 #: ../src/guestfs-actions.pod:356
7203 " guestfs_aug_get (guestfs_h *g,\n"
7204 " const char *augpath);\n"
7210 #: ../src/guestfs-actions.pod:360 ../fish/guestfish-actions.pod:230
7212 "Look up the value associated with C<path>. If C<path> matches exactly one "
7213 "node, the C<value> is returned."
7218 #: ../src/guestfs-actions.pod:363 ../src/guestfs-actions.pod:863
7219 #: ../src/guestfs-actions.pod:881 ../src/guestfs-actions.pod:941
7220 #: ../src/guestfs-actions.pod:957 ../src/guestfs-actions.pod:1060
7221 #: ../src/guestfs-actions.pod:1190 ../src/guestfs-actions.pod:1207
7222 #: ../src/guestfs-actions.pod:1226 ../src/guestfs-actions.pod:1360
7223 #: ../src/guestfs-actions.pod:1548 ../src/guestfs-actions.pod:1660
7224 #: ../src/guestfs-actions.pod:1823 ../src/guestfs-actions.pod:1840
7225 #: ../src/guestfs-actions.pod:1907 ../src/guestfs-actions.pod:1943
7226 #: ../src/guestfs-actions.pod:1964 ../src/guestfs-actions.pod:2134
7227 #: ../src/guestfs-actions.pod:2326 ../src/guestfs-actions.pod:2530
7228 #: ../src/guestfs-actions.pod:2620 ../src/guestfs-actions.pod:2724
7229 #: ../src/guestfs-actions.pod:2743 ../src/guestfs-actions.pod:2957
7230 #: ../src/guestfs-actions.pod:2985 ../src/guestfs-actions.pod:3006
7231 #: ../src/guestfs-actions.pod:3040 ../src/guestfs-actions.pod:3099
7232 #: ../src/guestfs-actions.pod:3119 ../src/guestfs-actions.pod:3139
7233 #: ../src/guestfs-actions.pod:3764 ../src/guestfs-actions.pod:4117
7234 #: ../src/guestfs-actions.pod:4287 ../src/guestfs-actions.pod:4397
7235 #: ../src/guestfs-actions.pod:5301 ../src/guestfs-actions.pod:5494
7236 #: ../src/guestfs-actions.pod:5664 ../src/guestfs-actions.pod:5842
7237 #: ../src/guestfs-actions.pod:5891 ../src/guestfs-actions.pod:6528
7238 #: ../src/guestfs-actions.pod:6544 ../src/guestfs-actions.pod:6561
7239 #: ../src/guestfs-actions.pod:6592 ../src/guestfs-actions.pod:7266
7240 #: ../src/guestfs-actions.pod:7285 ../src/guestfs-actions.pod:7303
7241 #: ../src/guestfs-actions.pod:7477 ../src/guestfs-actions.pod:7757
7243 "This function returns a string, or NULL on error. I<The caller must free "
7244 "the returned string after use>."
7249 #: ../src/guestfs-actions.pod:368
7250 msgid "guestfs_aug_init"
7255 #: ../src/guestfs-actions.pod:370
7259 " guestfs_aug_init (guestfs_h *g,\n"
7260 " const char *root,\n"
7267 #: ../src/guestfs-actions.pod:375 ../fish/guestfish-actions.pod:237
7269 "Create a new Augeas handle for editing configuration files. If there was "
7270 "any previous Augeas handle associated with this guestfs session, then it is "
7276 #: ../src/guestfs-actions.pod:379
7277 msgid "You must call this before using any other C<guestfs_aug_*> commands."
7282 #: ../src/guestfs-actions.pod:382 ../fish/guestfish-actions.pod:244
7284 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
7289 #: ../src/guestfs-actions.pod:385 ../fish/guestfish-actions.pod:247
7291 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
7292 "logical I<or> of the following integers:"
7297 #: ../src/guestfs-actions.pod:391 ../fish/guestfish-actions.pod:253
7298 msgid "C<AUG_SAVE_BACKUP> = 1"
7303 #: ../src/guestfs-actions.pod:393 ../fish/guestfish-actions.pod:255
7304 msgid "Keep the original file with a C<.augsave> extension."
7309 #: ../src/guestfs-actions.pod:395 ../fish/guestfish-actions.pod:257
7310 msgid "C<AUG_SAVE_NEWFILE> = 2"
7315 #: ../src/guestfs-actions.pod:397 ../fish/guestfish-actions.pod:259
7317 "Save changes into a file with extension C<.augnew>, and do not overwrite "
7318 "original. Overrides C<AUG_SAVE_BACKUP>."
7323 #: ../src/guestfs-actions.pod:400 ../fish/guestfish-actions.pod:262
7324 msgid "C<AUG_TYPE_CHECK> = 4"
7329 #: ../src/guestfs-actions.pod:402 ../fish/guestfish-actions.pod:264
7330 msgid "Typecheck lenses (can be expensive)."
7335 #: ../src/guestfs-actions.pod:404 ../fish/guestfish-actions.pod:266
7336 msgid "C<AUG_NO_STDINC> = 8"
7341 #: ../src/guestfs-actions.pod:406 ../fish/guestfish-actions.pod:268
7342 msgid "Do not use standard load path for modules."
7347 #: ../src/guestfs-actions.pod:408 ../fish/guestfish-actions.pod:270
7348 msgid "C<AUG_SAVE_NOOP> = 16"
7353 #: ../src/guestfs-actions.pod:410 ../fish/guestfish-actions.pod:272
7354 msgid "Make save a no-op, just record what would have been changed."
7359 #: ../src/guestfs-actions.pod:412 ../fish/guestfish-actions.pod:274
7360 msgid "C<AUG_NO_LOAD> = 32"
7365 #: ../src/guestfs-actions.pod:414
7366 msgid "Do not load the tree in C<guestfs_aug_init>."
7371 #: ../src/guestfs-actions.pod:418
7372 msgid "To close the handle, you can call C<guestfs_aug_close>."
7377 #: ../src/guestfs-actions.pod:420 ../fish/guestfish-actions.pod:282
7378 msgid "To find out more about Augeas, see L<http://augeas.net/>."
7383 #: ../src/guestfs-actions.pod:426
7384 msgid "guestfs_aug_insert"
7389 #: ../src/guestfs-actions.pod:428
7393 " guestfs_aug_insert (guestfs_h *g,\n"
7394 " const char *augpath,\n"
7395 " const char *label,\n"
7402 #: ../src/guestfs-actions.pod:434 ../fish/guestfish-actions.pod:288
7404 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
7405 "or after C<path> (depending on the boolean flag C<before>)."
7410 #: ../src/guestfs-actions.pod:438 ../fish/guestfish-actions.pod:292
7412 "C<path> must match exactly one existing node in the tree, and C<label> must "
7413 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
7418 #: ../src/guestfs-actions.pod:446
7419 msgid "guestfs_aug_load"
7424 #: ../src/guestfs-actions.pod:448
7428 " guestfs_aug_load (guestfs_h *g);\n"
7434 #: ../src/guestfs-actions.pod:451 ../fish/guestfish-actions.pod:300
7435 msgid "Load files into the tree."
7440 #: ../src/guestfs-actions.pod:453 ../fish/guestfish-actions.pod:302
7441 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
7446 #: ../src/guestfs-actions.pod:460
7447 msgid "guestfs_aug_ls"
7452 #: ../src/guestfs-actions.pod:462
7456 " guestfs_aug_ls (guestfs_h *g,\n"
7457 " const char *augpath);\n"
7463 #: ../src/guestfs-actions.pod:466
7465 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
7466 "sorting the resulting nodes into alphabetical order."
7471 #: ../src/guestfs-actions.pod:469 ../src/guestfs-actions.pod:485
7472 #: ../src/guestfs-actions.pod:631 ../src/guestfs-actions.pod:1079
7473 #: ../src/guestfs-actions.pod:1375 ../src/guestfs-actions.pod:1394
7474 #: ../src/guestfs-actions.pod:1497 ../src/guestfs-actions.pod:1516
7475 #: ../src/guestfs-actions.pod:1762 ../src/guestfs-actions.pod:2206
7476 #: ../src/guestfs-actions.pod:2222 ../src/guestfs-actions.pod:2241
7477 #: ../src/guestfs-actions.pod:2284 ../src/guestfs-actions.pod:2308
7478 #: ../src/guestfs-actions.pod:2379 ../src/guestfs-actions.pod:2428
7479 #: ../src/guestfs-actions.pod:2685 ../src/guestfs-actions.pod:3059
7480 #: ../src/guestfs-actions.pod:3335 ../src/guestfs-actions.pod:3649
7481 #: ../src/guestfs-actions.pod:3666 ../src/guestfs-actions.pod:3686
7482 #: ../src/guestfs-actions.pod:3746 ../src/guestfs-actions.pod:3851
7483 #: ../src/guestfs-actions.pod:4259 ../src/guestfs-actions.pod:5026
7484 #: ../src/guestfs-actions.pod:5636 ../src/guestfs-actions.pod:5762
7485 #: ../src/guestfs-actions.pod:5876 ../src/guestfs-actions.pod:6608
7486 #: ../src/guestfs-actions.pod:6669 ../src/guestfs-actions.pod:6724
7487 #: ../src/guestfs-actions.pod:6870 ../src/guestfs-actions.pod:6894
7488 #: ../src/guestfs-actions.pod:7370 ../src/guestfs-actions.pod:7390
7489 #: ../src/guestfs-actions.pod:7437 ../src/guestfs-actions.pod:7609
7490 #: ../src/guestfs-actions.pod:7628 ../src/guestfs-actions.pod:7714
7491 #: ../src/guestfs-actions.pod:7733 ../src/guestfs-actions.pod:7779
7492 #: ../src/guestfs-actions.pod:7798
7494 "This function returns a NULL-terminated array of strings (like L<environ(3)"
7495 ">), or NULL if there was an error. I<The caller must free the strings and "
7496 "the array after use>."
7501 #: ../src/guestfs-actions.pod:473 ../src/guestfs-actions.pod:1004
7502 #: ../src/guestfs-actions.pod:1022 ../src/guestfs-actions.pod:1432
7503 #: ../src/guestfs-actions.pod:3413 ../src/guestfs-actions.pod:3444
7504 #: ../src/guestfs-actions.pod:4100 ../src/guestfs-actions.pod:4150
7505 #: ../src/guestfs-actions.pod:4337 ../src/guestfs-actions.pod:4370
7506 #: ../src/guestfs-actions.pod:4533 ../src/guestfs-actions.pod:5030
7507 #: ../src/guestfs-actions.pod:5577 ../src/guestfs-actions.pod:5974
7508 #: ../src/guestfs-actions.pod:5988 ../src/guestfs-actions.pod:6000
7509 #: ../src/guestfs-actions.pod:6449 ../src/guestfs-actions.pod:7108
7510 #: ../src/guestfs-actions.pod:7121 ../src/guestfs-actions.pod:7354
7511 #: ../src/guestfs-actions.pod:7597
7512 msgid "(Added in 0.8)"
7517 #: ../src/guestfs-actions.pod:475
7518 msgid "guestfs_aug_match"
7523 #: ../src/guestfs-actions.pod:477
7527 " guestfs_aug_match (guestfs_h *g,\n"
7528 " const char *augpath);\n"
7534 #: ../src/guestfs-actions.pod:481 ../fish/guestfish-actions.pod:316
7536 "Returns a list of paths which match the path expression C<path>. The "
7537 "returned paths are sufficiently qualified so that they match exactly one "
7538 "node in the current tree."
7543 #: ../src/guestfs-actions.pod:491
7544 msgid "guestfs_aug_mv"
7549 #: ../src/guestfs-actions.pod:493
7553 " guestfs_aug_mv (guestfs_h *g,\n"
7554 " const char *src,\n"
7555 " const char *dest);\n"
7561 #: ../src/guestfs-actions.pod:498 ../fish/guestfish-actions.pod:324
7563 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
7564 "C<dest> is overwritten if it exists."
7569 #: ../src/guestfs-actions.pod:505
7570 msgid "guestfs_aug_rm"
7575 #: ../src/guestfs-actions.pod:507
7579 " guestfs_aug_rm (guestfs_h *g,\n"
7580 " const char *augpath);\n"
7586 #: ../src/guestfs-actions.pod:511 ../fish/guestfish-actions.pod:331
7587 msgid "Remove C<path> and all of its children."
7592 #: ../src/guestfs-actions.pod:513 ../fish/guestfish-actions.pod:333
7593 msgid "On success this returns the number of entries which were removed."
7598 #: ../src/guestfs-actions.pod:519
7599 msgid "guestfs_aug_save"
7604 #: ../src/guestfs-actions.pod:521
7608 " guestfs_aug_save (guestfs_h *g);\n"
7614 #: ../src/guestfs-actions.pod:524 ../fish/guestfish-actions.pod:339
7615 msgid "This writes all pending changes to disk."
7620 #: ../src/guestfs-actions.pod:526
7622 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
7628 #: ../src/guestfs-actions.pod:533
7629 msgid "guestfs_aug_set"
7634 #: ../src/guestfs-actions.pod:535
7638 " guestfs_aug_set (guestfs_h *g,\n"
7639 " const char *augpath,\n"
7640 " const char *val);\n"
7646 #: ../src/guestfs-actions.pod:540 ../fish/guestfish-actions.pod:348
7647 msgid "Set the value associated with C<path> to C<val>."
7652 #: ../src/guestfs-actions.pod:542
7654 "In the Augeas API, it is possible to clear a node by setting the value to "
7655 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
7656 "this call. Instead you must use the C<guestfs_aug_clear> call."
7661 #: ../src/guestfs-actions.pod:551
7662 msgid "guestfs_available"
7667 #: ../src/guestfs-actions.pod:553
7671 " guestfs_available (guestfs_h *g,\n"
7672 " char *const *groups);\n"
7678 #: ../src/guestfs-actions.pod:557 ../fish/guestfish-actions.pod:359
7680 "This command is used to check the availability of some groups of "
7681 "functionality in the appliance, which not all builds of the libguestfs "
7682 "appliance will be able to provide."
7687 #: ../src/guestfs-actions.pod:561
7689 "The libguestfs groups, and the functions that those groups correspond to, "
7690 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
7691 "runtime by calling C<guestfs_available_all_groups>."
7696 #: ../src/guestfs-actions.pod:566 ../fish/guestfish-actions.pod:368
7698 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
7699 "\"]> would check for the availability of the Linux inotify functions and "
7700 "Augeas (configuration file editing) functions."
7705 #: ../src/guestfs-actions.pod:571 ../fish/guestfish-actions.pod:373
7706 msgid "The command returns no error if I<all> requested groups are available."
7711 #: ../src/guestfs-actions.pod:573 ../fish/guestfish-actions.pod:375
7713 "It fails with an error if one or more of the requested groups is unavailable "
7719 #: ../src/guestfs-actions.pod:576 ../fish/guestfish-actions.pod:378
7721 "If an unknown group name is included in the list of groups then an error is "
7727 #: ../src/guestfs-actions.pod:579 ../fish/guestfish-actions.pod:381
7733 #: ../src/guestfs-actions.pod:585
7734 msgid "You must call C<guestfs_launch> before calling this function."
7739 #: ../src/guestfs-actions.pod:587 ../fish/guestfish-actions.pod:389
7741 "The reason is because we don't know what groups are supported by the "
7742 "appliance/daemon until it is running and can be queried."
7747 #: ../src/guestfs-actions.pod:593 ../fish/guestfish-actions.pod:395
7749 "If a group of functions is available, this does not necessarily mean that "
7750 "they will work. You still have to check for errors when calling individual "
7751 "API functions even if they are available."
7756 #: ../src/guestfs-actions.pod:600 ../fish/guestfish-actions.pod:402
7758 "It is usually the job of distro packagers to build complete functionality "
7759 "into the libguestfs appliance. Upstream libguestfs, if built from source "
7760 "with all requirements satisfied, will support everything."
7765 #: ../src/guestfs-actions.pod:607
7767 "This call was added in version C<1.0.80>. In previous versions of "
7768 "libguestfs all you could do would be to speculatively execute a command to "
7769 "find out if the daemon implemented it. See also C<guestfs_version>."
7774 #: ../src/guestfs-actions.pod:616 ../src/guestfs-actions.pod:1177
7775 msgid "(Added in 1.0.80)"
7780 #: ../src/guestfs-actions.pod:618
7781 msgid "guestfs_available_all_groups"
7786 #: ../src/guestfs-actions.pod:620
7790 " guestfs_available_all_groups (guestfs_h *g);\n"
7796 #: ../src/guestfs-actions.pod:623
7798 "This command returns a list of all optional groups that this daemon knows "
7799 "about. Note this returns both supported and unsupported groups. To find "
7800 "out which ones the daemon can actually support you have to call "
7801 "C<guestfs_available> on each member of the returned list."
7806 #: ../src/guestfs-actions.pod:629
7807 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
7812 #: ../src/guestfs-actions.pod:635
7813 msgid "(Added in 1.3.15)"
7818 #: ../src/guestfs-actions.pod:637
7819 msgid "guestfs_base64_in"
7824 #: ../src/guestfs-actions.pod:639
7828 " guestfs_base64_in (guestfs_h *g,\n"
7829 " const char *base64file,\n"
7830 " const char *filename);\n"
7836 #: ../src/guestfs-actions.pod:644 ../fish/guestfish-actions.pod:432
7838 "This command uploads base64-encoded data from C<base64file> to C<filename>."
7843 #: ../src/guestfs-actions.pod:649 ../src/guestfs-actions.pod:663
7844 msgid "(Added in 1.3.5)"
7849 #: ../src/guestfs-actions.pod:651
7850 msgid "guestfs_base64_out"
7855 #: ../src/guestfs-actions.pod:653
7859 " guestfs_base64_out (guestfs_h *g,\n"
7860 " const char *filename,\n"
7861 " const char *base64file);\n"
7867 #: ../src/guestfs-actions.pod:658 ../fish/guestfish-actions.pod:441
7869 "This command downloads the contents of C<filename>, writing it out to local "
7870 "file C<base64file> encoded as base64."
7875 #: ../src/guestfs-actions.pod:665
7876 msgid "guestfs_blockdev_flushbufs"
7881 #: ../src/guestfs-actions.pod:667
7885 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
7886 " const char *device);\n"
7892 #: ../src/guestfs-actions.pod:671 ../fish/guestfish-actions.pod:450
7894 "This tells the kernel to flush internal buffers associated with C<device>."
7899 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:691
7900 #: ../src/guestfs-actions.pod:706 ../src/guestfs-actions.pod:722
7901 #: ../src/guestfs-actions.pod:740 ../src/guestfs-actions.pod:759
7902 #: ../src/guestfs-actions.pod:773 ../src/guestfs-actions.pod:791
7903 #: ../src/guestfs-actions.pod:805 ../src/guestfs-actions.pod:819
7904 #: ../fish/guestfish-actions.pod:453 ../fish/guestfish-actions.pod:464
7905 #: ../fish/guestfish-actions.pod:473 ../fish/guestfish-actions.pod:483
7906 #: ../fish/guestfish-actions.pod:495 ../fish/guestfish-actions.pod:508
7907 #: ../fish/guestfish-actions.pod:516 ../fish/guestfish-actions.pod:527
7908 #: ../fish/guestfish-actions.pod:535 ../fish/guestfish-actions.pod:543
7909 msgid "This uses the L<blockdev(8)> command."
7914 #: ../src/guestfs-actions.pod:678 ../src/guestfs-actions.pod:695
7915 #: ../src/guestfs-actions.pod:710 ../src/guestfs-actions.pod:726
7916 #: ../src/guestfs-actions.pod:744 ../src/guestfs-actions.pod:763
7917 #: ../src/guestfs-actions.pod:777 ../src/guestfs-actions.pod:795
7918 #: ../src/guestfs-actions.pod:809 ../src/guestfs-actions.pod:823
7919 msgid "(Added in 0.9.3)"
7924 #: ../src/guestfs-actions.pod:680
7925 msgid "guestfs_blockdev_getbsz"
7930 #: ../src/guestfs-actions.pod:682
7934 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
7935 " const char *device);\n"
7941 #: ../src/guestfs-actions.pod:686 ../fish/guestfish-actions.pod:459
7942 msgid "This returns the block size of a device."
7947 #: ../src/guestfs-actions.pod:688 ../src/guestfs-actions.pod:788
7948 #: ../fish/guestfish-actions.pod:461 ../fish/guestfish-actions.pod:524
7950 "(Note this is different from both I<size in blocks> and I<filesystem block "
7956 #: ../src/guestfs-actions.pod:697
7957 msgid "guestfs_blockdev_getro"
7962 #: ../src/guestfs-actions.pod:699
7966 " guestfs_blockdev_getro (guestfs_h *g,\n"
7967 " const char *device);\n"
7973 #: ../src/guestfs-actions.pod:703 ../fish/guestfish-actions.pod:470
7975 "Returns a boolean indicating if the block device is read-only (true if read-"
7976 "only, false if not)."
7981 #: ../src/guestfs-actions.pod:708 ../src/guestfs-actions.pod:1415
7982 #: ../src/guestfs-actions.pod:1430 ../src/guestfs-actions.pod:1919
7983 #: ../src/guestfs-actions.pod:1930 ../src/guestfs-actions.pod:2002
7984 #: ../src/guestfs-actions.pod:2057 ../src/guestfs-actions.pod:2072
7985 #: ../src/guestfs-actions.pod:2097 ../src/guestfs-actions.pod:2120
7986 #: ../src/guestfs-actions.pod:3156 ../src/guestfs-actions.pod:3172
7987 #: ../src/guestfs-actions.pod:3190 ../src/guestfs-actions.pod:3352
7988 #: ../src/guestfs-actions.pod:3366 ../src/guestfs-actions.pod:3381
7989 #: ../src/guestfs-actions.pod:3395 ../src/guestfs-actions.pod:3411
7990 #: ../src/guestfs-actions.pod:3426 ../src/guestfs-actions.pod:3442
7991 #: ../src/guestfs-actions.pod:3456 ../src/guestfs-actions.pod:3469
7992 #: ../src/guestfs-actions.pod:3483 ../src/guestfs-actions.pod:3498
7993 #: ../src/guestfs-actions.pod:3513 ../src/guestfs-actions.pod:3526
7994 #: ../src/guestfs-actions.pod:3540 ../src/guestfs-actions.pod:5265
7995 msgid "This function returns a C truth value on success or -1 on error."
8000 #: ../src/guestfs-actions.pod:712
8001 msgid "guestfs_blockdev_getsize64"
8006 #: ../src/guestfs-actions.pod:714
8010 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
8011 " const char *device);\n"
8017 #: ../src/guestfs-actions.pod:718 ../fish/guestfish-actions.pod:479
8018 msgid "This returns the size of the device in bytes."
8023 #: ../src/guestfs-actions.pod:720
8024 msgid "See also C<guestfs_blockdev_getsz>."
8029 #: ../src/guestfs-actions.pod:728
8030 msgid "guestfs_blockdev_getss"
8035 #: ../src/guestfs-actions.pod:730
8039 " guestfs_blockdev_getss (guestfs_h *g,\n"
8040 " const char *device);\n"
8046 #: ../src/guestfs-actions.pod:734 ../fish/guestfish-actions.pod:489
8048 "This returns the size of sectors on a block device. Usually 512, but can be "
8049 "larger for modern devices."
8054 #: ../src/guestfs-actions.pod:737
8056 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
8062 #: ../src/guestfs-actions.pod:746
8063 msgid "guestfs_blockdev_getsz"
8068 #: ../src/guestfs-actions.pod:748
8072 " guestfs_blockdev_getsz (guestfs_h *g,\n"
8073 " const char *device);\n"
8079 #: ../src/guestfs-actions.pod:752 ../fish/guestfish-actions.pod:501
8081 "This returns the size of the device in units of 512-byte sectors (even if "
8082 "the sectorsize isn't 512 bytes ... weird)."
8087 #: ../src/guestfs-actions.pod:755
8089 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
8090 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
8095 #: ../src/guestfs-actions.pod:765
8096 msgid "guestfs_blockdev_rereadpt"
8101 #: ../src/guestfs-actions.pod:767
8105 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
8106 " const char *device);\n"
8112 #: ../src/guestfs-actions.pod:771 ../fish/guestfish-actions.pod:514
8113 msgid "Reread the partition table on C<device>."
8118 #: ../src/guestfs-actions.pod:779
8119 msgid "guestfs_blockdev_setbsz"
8124 #: ../src/guestfs-actions.pod:781
8128 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
8129 " const char *device,\n"
8130 " int blocksize);\n"
8136 #: ../src/guestfs-actions.pod:786 ../fish/guestfish-actions.pod:522
8137 msgid "This sets the block size of a device."
8142 #: ../src/guestfs-actions.pod:797
8143 msgid "guestfs_blockdev_setro"
8148 #: ../src/guestfs-actions.pod:799
8152 " guestfs_blockdev_setro (guestfs_h *g,\n"
8153 " const char *device);\n"
8159 #: ../src/guestfs-actions.pod:803 ../fish/guestfish-actions.pod:533
8160 msgid "Sets the block device named C<device> to read-only."
8165 #: ../src/guestfs-actions.pod:811
8166 msgid "guestfs_blockdev_setrw"
8171 #: ../src/guestfs-actions.pod:813
8175 " guestfs_blockdev_setrw (guestfs_h *g,\n"
8176 " const char *device);\n"
8182 #: ../src/guestfs-actions.pod:817 ../fish/guestfish-actions.pod:541
8183 msgid "Sets the block device named C<device> to read-write."
8188 #: ../src/guestfs-actions.pod:825
8189 msgid "guestfs_case_sensitive_path"
8194 #: ../src/guestfs-actions.pod:827
8198 " guestfs_case_sensitive_path (guestfs_h *g,\n"
8199 " const char *path);\n"
8205 #: ../src/guestfs-actions.pod:831 ../fish/guestfish-actions.pod:549
8207 "This can be used to resolve case insensitive paths on a filesystem which is "
8208 "case sensitive. The use case is to resolve paths which you have read from "
8209 "Windows configuration files or the Windows Registry, to the true path."
8214 #: ../src/guestfs-actions.pod:836 ../fish/guestfish-actions.pod:554
8216 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
8217 "(and probably others), which is that although the underlying filesystem is "
8218 "case-insensitive, the driver exports the filesystem to Linux as case-"
8224 #: ../src/guestfs-actions.pod:841 ../fish/guestfish-actions.pod:559
8226 "One consequence of this is that special directories such as C<c:\\windows> "
8227 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
8228 "precise details of how they were created. In Windows itself this would not "
8234 #: ../src/guestfs-actions.pod:847 ../fish/guestfish-actions.pod:565
8236 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
8242 #: ../src/guestfs-actions.pod:850 ../fish/guestfish-actions.pod:568
8244 "This function resolves the true case of each element in the path and returns "
8245 "the case-sensitive path."
8250 #: ../src/guestfs-actions.pod:853
8252 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
8253 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
8254 "how the directories were originally created under Windows)."
8259 #: ../src/guestfs-actions.pod:858 ../fish/guestfish-actions.pod:576
8260 msgid "I<Note>: This function does not handle drive names, backslashes etc."
8265 #: ../src/guestfs-actions.pod:861
8266 msgid "See also C<guestfs_realpath>."
8271 #: ../src/guestfs-actions.pod:866 ../src/guestfs-actions.pod:7288
8272 msgid "(Added in 1.0.75)"
8277 #: ../src/guestfs-actions.pod:868
8283 #: ../src/guestfs-actions.pod:870
8287 " guestfs_cat (guestfs_h *g,\n"
8288 " const char *path);\n"
8294 #: ../src/guestfs-actions.pod:874 ../src/guestfs-actions.pod:5752
8295 #: ../fish/guestfish-actions.pod:585 ../fish/guestfish-actions.pod:3800
8296 msgid "Return the contents of the file named C<path>."
8301 #: ../src/guestfs-actions.pod:876
8303 "Note that this function cannot correctly handle binary files (specifically, "
8304 "files containing C<\\0> character which is treated as end of string). For "
8305 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
8306 "functions which have a more complex interface."
8311 #: ../src/guestfs-actions.pod:884 ../src/guestfs-actions.pod:1063
8312 #: ../src/guestfs-actions.pod:1083 ../src/guestfs-actions.pod:1379
8313 #: ../src/guestfs-actions.pod:1398 ../src/guestfs-actions.pod:1501
8314 #: ../src/guestfs-actions.pod:1520 ../src/guestfs-actions.pod:1766
8315 #: ../src/guestfs-actions.pod:2226 ../src/guestfs-actions.pod:2245
8316 #: ../src/guestfs-actions.pod:2288 ../src/guestfs-actions.pod:2312
8317 #: ../src/guestfs-actions.pod:2329 ../src/guestfs-actions.pod:2358
8318 #: ../src/guestfs-actions.pod:5534 ../src/guestfs-actions.pod:5560
8319 #: ../src/guestfs-actions.pod:5691 ../src/guestfs-actions.pod:5717
8320 #: ../src/guestfs-actions.pod:5741 ../src/guestfs-actions.pod:6673
8321 #: ../src/guestfs-actions.pod:6728 ../src/guestfs-actions.pod:6874
8322 #: ../src/guestfs-actions.pod:6898 ../src/guestfs-actions.pod:7561
8323 #: ../src/guestfs-actions.pod:7587 ../src/guestfs-actions.pod:7613
8324 #: ../src/guestfs-actions.pod:7632 ../src/guestfs-actions.pod:7718
8325 #: ../src/guestfs-actions.pod:7737 ../src/guestfs-actions.pod:7783
8326 #: ../src/guestfs-actions.pod:7802 ../fish/guestfish-actions.pod:592
8327 #: ../fish/guestfish-actions.pod:727 ../fish/guestfish-actions.pod:739
8328 #: ../fish/guestfish-actions.pod:915 ../fish/guestfish-actions.pod:925
8329 #: ../fish/guestfish-actions.pod:992 ../fish/guestfish-actions.pod:1002
8330 #: ../fish/guestfish-actions.pod:1194 ../fish/guestfish-actions.pod:1495
8331 #: ../fish/guestfish-actions.pod:1505 ../fish/guestfish-actions.pod:1533
8332 #: ../fish/guestfish-actions.pod:1548 ../fish/guestfish-actions.pod:1558
8333 #: ../fish/guestfish-actions.pod:1577 ../fish/guestfish-actions.pod:3670
8334 #: ../fish/guestfish-actions.pod:3685 ../fish/guestfish-actions.pod:3761
8335 #: ../fish/guestfish-actions.pod:3778 ../fish/guestfish-actions.pod:3793
8336 #: ../fish/guestfish-actions.pod:4447 ../fish/guestfish-actions.pod:4493
8337 #: ../fish/guestfish-actions.pod:4578 ../fish/guestfish-actions.pod:4593
8338 #: ../fish/guestfish-actions.pod:4997 ../fish/guestfish-actions.pod:5015
8339 #: ../fish/guestfish-actions.pod:5032 ../fish/guestfish-actions.pod:5042
8340 #: ../fish/guestfish-actions.pod:5091 ../fish/guestfish-actions.pod:5101
8341 #: ../fish/guestfish-actions.pod:5130 ../fish/guestfish-actions.pod:5140
8343 "Because of the message protocol, there is a transfer limit of somewhere "
8344 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
8349 #: ../src/guestfs-actions.pod:887 ../src/guestfs-actions.pod:3670
8350 #: ../src/guestfs-actions.pod:3750 ../src/guestfs-actions.pod:3767
8351 #: ../src/guestfs-actions.pod:3855 ../src/guestfs-actions.pod:4263
8352 #: ../src/guestfs-actions.pod:4277 ../src/guestfs-actions.pod:5640
8353 #: ../src/guestfs-actions.pod:5654 ../src/guestfs-actions.pod:7441
8354 #: ../src/guestfs-actions.pod:7455
8355 msgid "(Added in 0.4)"
8360 #: ../src/guestfs-actions.pod:889
8361 msgid "guestfs_checksum"
8366 #: ../src/guestfs-actions.pod:891
8370 " guestfs_checksum (guestfs_h *g,\n"
8371 " const char *csumtype,\n"
8372 " const char *path);\n"
8378 #: ../src/guestfs-actions.pod:896 ../fish/guestfish-actions.pod:599
8380 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
8385 #: ../src/guestfs-actions.pod:899 ../fish/guestfish-actions.pod:602
8387 "The type of checksum to compute is given by the C<csumtype> parameter which "
8388 "must have one of the following values:"
8393 #: ../src/guestfs-actions.pod:904 ../fish/guestfish-actions.pod:607
8399 #: ../src/guestfs-actions.pod:906 ../fish/guestfish-actions.pod:609
8401 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
8407 #: ../src/guestfs-actions.pod:909 ../fish/guestfish-actions.pod:612
8413 #: ../src/guestfs-actions.pod:911 ../fish/guestfish-actions.pod:614
8414 msgid "Compute the MD5 hash (using the C<md5sum> program)."
8419 #: ../src/guestfs-actions.pod:913 ../fish/guestfish-actions.pod:616
8425 #: ../src/guestfs-actions.pod:915 ../fish/guestfish-actions.pod:618
8426 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
8431 #: ../src/guestfs-actions.pod:917 ../fish/guestfish-actions.pod:620
8437 #: ../src/guestfs-actions.pod:919 ../fish/guestfish-actions.pod:622
8438 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
8443 #: ../src/guestfs-actions.pod:921 ../fish/guestfish-actions.pod:624
8449 #: ../src/guestfs-actions.pod:923 ../fish/guestfish-actions.pod:626
8450 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
8455 #: ../src/guestfs-actions.pod:925 ../fish/guestfish-actions.pod:628
8461 #: ../src/guestfs-actions.pod:927 ../fish/guestfish-actions.pod:630
8462 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
8467 #: ../src/guestfs-actions.pod:929 ../fish/guestfish-actions.pod:632
8473 #: ../src/guestfs-actions.pod:931 ../fish/guestfish-actions.pod:634
8474 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
8479 #: ../src/guestfs-actions.pod:935 ../fish/guestfish-actions.pod:638
8480 msgid "The checksum is returned as a printable string."
8485 #: ../src/guestfs-actions.pod:937
8486 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
8491 #: ../src/guestfs-actions.pod:939
8492 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
8497 #: ../src/guestfs-actions.pod:944 ../src/guestfs-actions.pod:1252
8498 #: ../src/guestfs-actions.pod:2088 ../src/guestfs-actions.pod:3368
8499 #: ../src/guestfs-actions.pod:3397 ../src/guestfs-actions.pod:3458
8500 #: ../src/guestfs-actions.pod:3485 ../src/guestfs-actions.pod:7144
8501 msgid "(Added in 1.0.2)"
8506 #: ../src/guestfs-actions.pod:946
8507 msgid "guestfs_checksum_device"
8512 #: ../src/guestfs-actions.pod:948
8516 " guestfs_checksum_device (guestfs_h *g,\n"
8517 " const char *csumtype,\n"
8518 " const char *device);\n"
8524 #: ../src/guestfs-actions.pod:953
8526 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
8527 "device named C<device>. For the types of checksums supported see the "
8528 "C<guestfs_checksum> command."
8533 #: ../src/guestfs-actions.pod:960 ../src/guestfs-actions.pod:5097
8534 #: ../src/guestfs-actions.pod:5230 ../src/guestfs-actions.pod:5267
8535 #: ../src/guestfs-actions.pod:5285 ../src/guestfs-actions.pod:5461
8536 #: ../src/guestfs-actions.pod:7053 ../src/guestfs-actions.pod:7067
8537 #: ../src/guestfs-actions.pod:7467
8538 msgid "(Added in 1.3.2)"
8543 #: ../src/guestfs-actions.pod:962
8544 msgid "guestfs_checksums_out"
8549 #: ../src/guestfs-actions.pod:964
8553 " guestfs_checksums_out (guestfs_h *g,\n"
8554 " const char *csumtype,\n"
8555 " const char *directory,\n"
8556 " const char *sumsfile);\n"
8562 #: ../src/guestfs-actions.pod:970 ../fish/guestfish-actions.pod:656
8564 "This command computes the checksums of all regular files in C<directory> and "
8565 "then emits a list of those checksums to the local output file C<sumsfile>."
8570 #: ../src/guestfs-actions.pod:974 ../fish/guestfish-actions.pod:660
8572 "This can be used for verifying the integrity of a virtual machine. However "
8573 "to be properly secure you should pay attention to the output of the checksum "
8574 "command (it uses the ones from GNU coreutils). In particular when the "
8575 "filename is not printable, coreutils uses a special backslash syntax. For "
8576 "more information, see the GNU coreutils info file."
8581 #: ../src/guestfs-actions.pod:984
8582 msgid "(Added in 1.3.7)"
8587 #: ../src/guestfs-actions.pod:986
8588 msgid "guestfs_chmod"
8593 #: ../src/guestfs-actions.pod:988
8597 " guestfs_chmod (guestfs_h *g,\n"
8599 " const char *path);\n"
8605 #: ../src/guestfs-actions.pod:993 ../fish/guestfish-actions.pod:674
8607 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
8613 #: ../src/guestfs-actions.pod:996 ../fish/guestfish-actions.pod:677
8615 "I<Note>: When using this command from guestfish, C<mode> by default would be "
8616 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
8622 #: ../src/guestfs-actions.pod:1000 ../src/guestfs-actions.pod:4514
8623 #: ../src/guestfs-actions.pod:4723 ../src/guestfs-actions.pod:4742
8624 #: ../src/guestfs-actions.pod:4761 ../fish/guestfish-actions.pod:681
8625 #: ../fish/guestfish-actions.pod:3029 ../fish/guestfish-actions.pod:3168
8626 #: ../fish/guestfish-actions.pod:3178 ../fish/guestfish-actions.pod:3188
8627 msgid "The mode actually set is affected by the umask."
8632 #: ../src/guestfs-actions.pod:1006
8633 msgid "guestfs_chown"
8638 #: ../src/guestfs-actions.pod:1008
8642 " guestfs_chown (guestfs_h *g,\n"
8645 " const char *path);\n"
8651 #: ../src/guestfs-actions.pod:1014 ../fish/guestfish-actions.pod:687
8652 msgid "Change the file owner to C<owner> and group to C<group>."
8657 #: ../src/guestfs-actions.pod:1016 ../src/guestfs-actions.pod:3587
8658 #: ../fish/guestfish-actions.pod:689 ../fish/guestfish-actions.pod:2464
8660 "Only numeric uid and gid are supported. If you want to use names, you will "
8661 "need to locate and parse the password file yourself (Augeas support makes "
8662 "this relatively easy)."
8667 #: ../src/guestfs-actions.pod:1024
8668 msgid "guestfs_command"
8673 #: ../src/guestfs-actions.pod:1026
8677 " guestfs_command (guestfs_h *g,\n"
8678 " char *const *arguments);\n"
8684 #: ../src/guestfs-actions.pod:1030 ../fish/guestfish-actions.pod:697
8686 "This call runs a command from the guest filesystem. The filesystem must be "
8687 "mounted, and must contain a compatible operating system (ie. something "
8688 "Linux, with the same or compatible processor architecture)."
8693 #: ../src/guestfs-actions.pod:1035
8695 "The single parameter is an argv-style list of arguments. The first element "
8696 "is the name of the program to run. Subsequent elements are parameters. The "
8697 "list must be non-empty (ie. must contain a program name). Note that the "
8698 "command runs directly, and is I<not> invoked via the shell (see "
8704 #: ../src/guestfs-actions.pod:1042 ../fish/guestfish-actions.pod:709
8705 msgid "The return value is anything printed to I<stdout> by the command."
8710 #: ../src/guestfs-actions.pod:1045 ../fish/guestfish-actions.pod:712
8712 "If the command returns a non-zero exit status, then this function returns an "
8713 "error message. The error message string is the content of I<stderr> from "
8719 #: ../src/guestfs-actions.pod:1049 ../fish/guestfish-actions.pod:716
8721 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
8722 "bin>. If you require a program from another location, you should provide "
8723 "the full path in the first parameter."
8728 #: ../src/guestfs-actions.pod:1054 ../fish/guestfish-actions.pod:721
8730 "Shared libraries and data files required by the program must be available on "
8731 "filesystems which are mounted in the correct places. It is the caller's "
8732 "responsibility to ensure all filesystems that are needed are mounted at the "
8738 #: ../src/guestfs-actions.pod:1066 ../src/guestfs-actions.pod:1086
8739 #: ../src/guestfs-actions.pod:1551
8740 msgid "(Added in 0.9.1)"
8745 #: ../src/guestfs-actions.pod:1068
8746 msgid "guestfs_command_lines"
8751 #: ../src/guestfs-actions.pod:1070
8755 " guestfs_command_lines (guestfs_h *g,\n"
8756 " char *const *arguments);\n"
8762 #: ../src/guestfs-actions.pod:1074
8764 "This is the same as C<guestfs_command>, but splits the result into a list of "
8770 #: ../src/guestfs-actions.pod:1077
8771 msgid "See also: C<guestfs_sh_lines>"
8776 #: ../src/guestfs-actions.pod:1088
8777 msgid "guestfs_config"
8782 #: ../src/guestfs-actions.pod:1090
8786 " guestfs_config (guestfs_h *g,\n"
8787 " const char *qemuparam,\n"
8788 " const char *qemuvalue);\n"
8793 #: ../src/guestfs-actions.pod:1095 ../fish/guestfish-actions.pod:746
8795 "This can be used to add arbitrary qemu command line parameters of the form "
8796 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
8797 "setting some parameters which would interfere with parameters that we use."
8802 #: ../src/guestfs-actions.pod:1100 ../fish/guestfish-actions.pod:751
8803 msgid "The first character of C<param> string must be a C<-> (dash)."
8808 #: ../src/guestfs-actions.pod:1102 ../fish/guestfish-actions.pod:753
8809 msgid "C<value> can be NULL."
8814 #: ../src/guestfs-actions.pod:1108
8815 msgid "guestfs_copy_size"
8820 #: ../src/guestfs-actions.pod:1110
8824 " guestfs_copy_size (guestfs_h *g,\n"
8825 " const char *src,\n"
8826 " const char *dest,\n"
8833 #: ../src/guestfs-actions.pod:1116 ../fish/guestfish-actions.pod:759
8835 "This command copies exactly C<size> bytes from one source device or file "
8836 "C<src> to another destination device or file C<dest>."
8841 #: ../src/guestfs-actions.pod:1119 ../fish/guestfish-actions.pod:762
8843 "Note this will fail if the source is too short or if the destination is not "
8848 #: ../src/guestfs-actions.pod:1124 ../src/guestfs-actions.pod:1247
8849 #: ../src/guestfs-actions.pod:1278 ../src/guestfs-actions.pod:1323
8850 #: ../src/guestfs-actions.pod:1700 ../src/guestfs-actions.pod:1722
8851 #: ../src/guestfs-actions.pod:3568 ../src/guestfs-actions.pod:7139
8852 #: ../src/guestfs-actions.pod:7173 ../src/guestfs-actions.pod:7654
8853 #: ../src/guestfs-actions.pod:7673
8855 "This long-running command can generate progress notification messages so "
8856 "that the caller can display a progress bar or indicator. To receive these "
8857 "messages, the caller must register a progress event callback. See L<guestfs"
8858 "(3)/GUESTFS_EVENT_PROGRESS>."
8863 #: ../src/guestfs-actions.pod:1129 ../src/guestfs-actions.pod:4290
8864 #: ../src/guestfs-actions.pod:5667 ../src/guestfs-actions.pod:7374
8865 #: ../src/guestfs-actions.pod:7394 ../src/guestfs-actions.pod:7480
8866 msgid "(Added in 1.0.87)"
8871 #: ../src/guestfs-actions.pod:1131
8877 #: ../src/guestfs-actions.pod:1133
8881 " guestfs_cp (guestfs_h *g,\n"
8882 " const char *src,\n"
8883 " const char *dest);\n"
8889 #: ../src/guestfs-actions.pod:1138 ../fish/guestfish-actions.pod:769
8891 "This copies a file from C<src> to C<dest> where C<dest> is either a "
8892 "destination filename or destination directory."
8897 #: ../src/guestfs-actions.pod:1143 ../src/guestfs-actions.pod:1157
8898 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:1303
8899 #: ../src/guestfs-actions.pod:1417 ../src/guestfs-actions.pod:5044
8900 #: ../src/guestfs-actions.pod:5511
8901 msgid "(Added in 1.0.18)"
8906 #: ../src/guestfs-actions.pod:1145
8907 msgid "guestfs_cp_a"
8912 #: ../src/guestfs-actions.pod:1147
8916 " guestfs_cp_a (guestfs_h *g,\n"
8917 " const char *src,\n"
8918 " const char *dest);\n"
8924 #: ../src/guestfs-actions.pod:1152 ../fish/guestfish-actions.pod:776
8926 "This copies a file or directory from C<src> to C<dest> recursively using the "
8932 #: ../src/guestfs-actions.pod:1159
8938 #: ../src/guestfs-actions.pod:1161
8942 " guestfs_dd (guestfs_h *g,\n"
8943 " const char *src,\n"
8944 " const char *dest);\n"
8950 #: ../src/guestfs-actions.pod:1166 ../fish/guestfish-actions.pod:783
8952 "This command copies from one source device or file C<src> to another "
8953 "destination device or file C<dest>. Normally you would use this to copy to "
8954 "or from a device or partition, for example to duplicate a filesystem."
8959 #: ../src/guestfs-actions.pod:1171
8961 "If the destination is a device, it must be as large or larger than the "
8962 "source file or device, otherwise the copy will fail. This command cannot do "
8963 "partial copies (see C<guestfs_copy_size>)."
8968 #: ../src/guestfs-actions.pod:1179
8974 #: ../src/guestfs-actions.pod:1181
8978 " guestfs_df (guestfs_h *g);\n"
8984 #: ../src/guestfs-actions.pod:1184 ../fish/guestfish-actions.pod:796
8985 msgid "This command runs the C<df> command to report disk space used."
8990 #: ../src/guestfs-actions.pod:1186 ../src/guestfs-actions.pod:1203
8992 "This command is mostly useful for interactive sessions. It is I<not> "
8993 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
8999 #: ../src/guestfs-actions.pod:1193 ../src/guestfs-actions.pod:1210
9000 #: ../src/guestfs-actions.pod:1328 ../src/guestfs-actions.pod:2291
9001 #: ../src/guestfs-actions.pod:2315 ../src/guestfs-actions.pod:2383
9002 #: ../src/guestfs-actions.pod:4400 ../src/guestfs-actions.pod:4944
9003 #: ../src/guestfs-actions.pod:6877 ../src/guestfs-actions.pod:6901
9004 #: ../src/guestfs-actions.pod:7520 ../src/guestfs-actions.pod:7533
9005 #: ../src/guestfs-actions.pod:7546
9006 msgid "(Added in 1.0.54)"
9011 #: ../src/guestfs-actions.pod:1195
9012 msgid "guestfs_df_h"
9017 #: ../src/guestfs-actions.pod:1197
9021 " guestfs_df_h (guestfs_h *g);\n"
9027 #: ../src/guestfs-actions.pod:1200 ../fish/guestfish-actions.pod:806
9029 "This command runs the C<df -h> command to report disk space used in human-"
9035 #: ../src/guestfs-actions.pod:1212
9036 msgid "guestfs_dmesg"
9041 #: ../src/guestfs-actions.pod:1214
9045 " guestfs_dmesg (guestfs_h *g);\n"
9051 #: ../src/guestfs-actions.pod:1217 ../fish/guestfish-actions.pod:817
9053 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
9054 "This is sometimes useful for extended debugging of problems."
9059 #: ../src/guestfs-actions.pod:1221
9061 "Another way to get the same information is to enable verbose messages with "
9062 "C<guestfs_set_verbose> or by setting the environment variable "
9063 "C<LIBGUESTFS_DEBUG=1> before running the program."
9068 #: ../src/guestfs-actions.pod:1231
9069 msgid "guestfs_download"
9074 #: ../src/guestfs-actions.pod:1233
9078 " guestfs_download (guestfs_h *g,\n"
9079 " const char *remotefilename,\n"
9080 " const char *filename);\n"
9086 #: ../src/guestfs-actions.pod:1238 ../src/guestfs-actions.pod:1263
9087 #: ../fish/guestfish-actions.pod:830 ../fish/guestfish-actions.pod:843
9089 "Download file C<remotefilename> and save it as C<filename> on the local "
9095 #: ../src/guestfs-actions.pod:1241 ../src/guestfs-actions.pod:7133
9096 #: ../fish/guestfish-actions.pod:833 ../fish/guestfish-actions.pod:4751
9097 msgid "C<filename> can also be a named pipe."
9102 #: ../src/guestfs-actions.pod:1243
9103 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
9108 #: ../src/guestfs-actions.pod:1254
9109 msgid "guestfs_download_offset"
9114 #: ../src/guestfs-actions.pod:1256
9118 " guestfs_download_offset (guestfs_h *g,\n"
9119 " const char *remotefilename,\n"
9120 " const char *filename,\n"
9121 " int64_t offset,\n"
9128 #: ../src/guestfs-actions.pod:1266 ../fish/guestfish-actions.pod:846
9130 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
9131 "region must be within the file or device)."
9136 #: ../src/guestfs-actions.pod:1269
9138 "Note that there is no limit on the amount of data that can be downloaded "
9139 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
9140 "full amount unless an error occurs."
9145 #: ../src/guestfs-actions.pod:1274
9146 msgid "See also C<guestfs_download>, C<guestfs_pread>."
9151 #: ../src/guestfs-actions.pod:1283 ../src/guestfs-actions.pod:7178
9152 msgid "(Added in 1.5.17)"
9157 #: ../src/guestfs-actions.pod:1285
9158 msgid "guestfs_drop_caches"
9163 #: ../src/guestfs-actions.pod:1287
9167 " guestfs_drop_caches (guestfs_h *g,\n"
9168 " int whattodrop);\n"
9174 #: ../src/guestfs-actions.pod:1291 ../fish/guestfish-actions.pod:862
9176 "This instructs the guest kernel to drop its page cache, and/or dentries and "
9177 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
9178 "to drop, see L<http://linux-mm.org/Drop_Caches>"
9183 #: ../src/guestfs-actions.pod:1296 ../fish/guestfish-actions.pod:867
9184 msgid "Setting C<whattodrop> to 3 should drop everything."
9189 #: ../src/guestfs-actions.pod:1298 ../fish/guestfish-actions.pod:869
9191 "This automatically calls L<sync(2)> before the operation, so that the "
9192 "maximum guest memory is freed."
9197 #: ../src/guestfs-actions.pod:1305
9203 #: ../src/guestfs-actions.pod:1307
9207 " guestfs_du (guestfs_h *g,\n"
9208 " const char *path);\n"
9214 #: ../src/guestfs-actions.pod:1311 ../fish/guestfish-actions.pod:876
9216 "This command runs the C<du -s> command to estimate file space usage for "
9222 #: ../src/guestfs-actions.pod:1314 ../fish/guestfish-actions.pod:879
9224 "C<path> can be a file or a directory. If C<path> is a directory then the "
9225 "estimate includes the contents of the directory and all subdirectories "
9231 #: ../src/guestfs-actions.pod:1318 ../fish/guestfish-actions.pod:883
9233 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
9238 #: ../src/guestfs-actions.pod:1330
9239 msgid "guestfs_e2fsck_f"
9244 #: ../src/guestfs-actions.pod:1332
9248 " guestfs_e2fsck_f (guestfs_h *g,\n"
9249 " const char *device);\n"
9254 #: ../src/guestfs-actions.pod:1336 ../fish/guestfish-actions.pod:890
9256 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
9257 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
9263 #: ../src/guestfs-actions.pod:1340
9265 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
9266 "Normally you should use C<guestfs_fsck>."
9271 #: ../src/guestfs-actions.pod:1345
9272 msgid "(Added in 1.0.29)"
9277 #: ../src/guestfs-actions.pod:1347
9278 msgid "guestfs_echo_daemon"
9283 #: ../src/guestfs-actions.pod:1349
9287 " guestfs_echo_daemon (guestfs_h *g,\n"
9288 " char *const *words);\n"
9294 #: ../src/guestfs-actions.pod:1353 ../fish/guestfish-actions.pod:901
9296 "This command concatenates the list of C<words> passed with single spaces "
9297 "between them and returns the resulting string."
9302 #: ../src/guestfs-actions.pod:1356 ../fish/guestfish-actions.pod:904
9303 msgid "You can use this command to test the connection through to the daemon."
9308 #: ../src/guestfs-actions.pod:1358
9309 msgid "See also C<guestfs_ping_daemon>."
9314 #: ../src/guestfs-actions.pod:1363 ../src/guestfs-actions.pod:2099
9315 #: ../src/guestfs-actions.pod:6349
9316 msgid "(Added in 1.0.69)"
9321 #: ../src/guestfs-actions.pod:1365
9322 msgid "guestfs_egrep"
9327 #: ../src/guestfs-actions.pod:1367
9331 " guestfs_egrep (guestfs_h *g,\n"
9332 " const char *regex,\n"
9333 " const char *path);\n"
9339 #: ../src/guestfs-actions.pod:1372 ../fish/guestfish-actions.pod:912
9341 "This calls the external C<egrep> program and returns the matching lines."
9346 #: ../src/guestfs-actions.pod:1382 ../src/guestfs-actions.pod:1401
9347 #: ../src/guestfs-actions.pod:1458 ../src/guestfs-actions.pod:1504
9348 #: ../src/guestfs-actions.pod:1523 ../src/guestfs-actions.pod:2229
9349 #: ../src/guestfs-actions.pod:2248 ../src/guestfs-actions.pod:2404
9350 #: ../src/guestfs-actions.pod:2417 ../src/guestfs-actions.pod:2432
9351 #: ../src/guestfs-actions.pod:2478 ../src/guestfs-actions.pod:2500
9352 #: ../src/guestfs-actions.pod:2513 ../src/guestfs-actions.pod:3780
9353 #: ../src/guestfs-actions.pod:3794 ../src/guestfs-actions.pod:3807
9354 #: ../src/guestfs-actions.pod:3821 ../src/guestfs-actions.pod:4822
9355 #: ../src/guestfs-actions.pod:5845 ../src/guestfs-actions.pod:5894
9356 #: ../src/guestfs-actions.pod:6745 ../src/guestfs-actions.pod:6757
9357 #: ../src/guestfs-actions.pod:6770 ../src/guestfs-actions.pod:6783
9358 #: ../src/guestfs-actions.pod:6805 ../src/guestfs-actions.pod:6818
9359 #: ../src/guestfs-actions.pod:6831 ../src/guestfs-actions.pod:6844
9360 #: ../src/guestfs-actions.pod:7616 ../src/guestfs-actions.pod:7635
9361 #: ../src/guestfs-actions.pod:7721 ../src/guestfs-actions.pod:7740
9362 #: ../src/guestfs-actions.pod:7786 ../src/guestfs-actions.pod:7805
9363 msgid "(Added in 1.0.66)"
9368 #: ../src/guestfs-actions.pod:1384
9369 msgid "guestfs_egrepi"
9374 #: ../src/guestfs-actions.pod:1386
9378 " guestfs_egrepi (guestfs_h *g,\n"
9379 " const char *regex,\n"
9380 " const char *path);\n"
9386 #: ../src/guestfs-actions.pod:1391 ../fish/guestfish-actions.pod:922
9388 "This calls the external C<egrep -i> program and returns the matching lines."
9393 #: ../src/guestfs-actions.pod:1403
9394 msgid "guestfs_equal"
9399 #: ../src/guestfs-actions.pod:1405
9403 " guestfs_equal (guestfs_h *g,\n"
9404 " const char *file1,\n"
9405 " const char *file2);\n"
9411 #: ../src/guestfs-actions.pod:1410 ../fish/guestfish-actions.pod:932
9413 "This compares the two files C<file1> and C<file2> and returns true if their "
9414 "content is exactly equal, or false otherwise."
9419 #: ../src/guestfs-actions.pod:1413 ../fish/guestfish-actions.pod:935
9420 msgid "The external L<cmp(1)> program is used for the comparison."
9425 #: ../src/guestfs-actions.pod:1419
9426 msgid "guestfs_exists"
9431 #: ../src/guestfs-actions.pod:1421
9435 " guestfs_exists (guestfs_h *g,\n"
9436 " const char *path);\n"
9442 #: ../src/guestfs-actions.pod:1425 ../fish/guestfish-actions.pod:941
9444 "This returns C<true> if and only if there is a file, directory (or anything) "
9445 "with the given C<path> name."
9450 #: ../src/guestfs-actions.pod:1428
9451 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
9456 #: ../src/guestfs-actions.pod:1434
9457 msgid "guestfs_fallocate"
9462 #: ../src/guestfs-actions.pod:1436
9466 " guestfs_fallocate (guestfs_h *g,\n"
9467 " const char *path,\n"
9474 #: ../src/guestfs-actions.pod:1441 ../src/guestfs-actions.pod:1467
9475 #: ../fish/guestfish-actions.pod:950 ../fish/guestfish-actions.pod:969
9477 "This command preallocates a file (containing zero bytes) named C<path> of "
9478 "size C<len> bytes. If the file exists already, it is overwritten."
9483 #: ../src/guestfs-actions.pod:1445 ../fish/guestfish-actions.pod:954
9485 "Do not confuse this with the guestfish-specific C<alloc> command which "
9486 "allocates a file in the host and attaches it as a device."
9491 #: ../src/guestfs-actions.pod:1451 ../fish/guestfish-actions.pod:958
9493 "This function is deprecated. In new code, use the C<fallocate64> call "
9499 #: ../src/guestfs-actions.pod:1460
9500 msgid "guestfs_fallocate64"
9505 #: ../src/guestfs-actions.pod:1462
9509 " guestfs_fallocate64 (guestfs_h *g,\n"
9510 " const char *path,\n"
9517 #: ../src/guestfs-actions.pod:1471
9519 "Note that this call allocates disk blocks for the file. To create a sparse "
9520 "file use C<guestfs_truncate_size> instead."
9525 #: ../src/guestfs-actions.pod:1474
9527 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
9528 "oversight it only allowed 30 bit lengths to be specified, effectively "
9529 "limiting the maximum size of files created through that call to 1GB."
9534 #: ../src/guestfs-actions.pod:1479 ../fish/guestfish-actions.pod:981
9536 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
9537 "commands which create a file in the host and attach it as a device."
9542 #: ../src/guestfs-actions.pod:1485
9543 msgid "(Added in 1.3.17)"
9548 #: ../src/guestfs-actions.pod:1487
9549 msgid "guestfs_fgrep"
9554 #: ../src/guestfs-actions.pod:1489
9558 " guestfs_fgrep (guestfs_h *g,\n"
9559 " const char *pattern,\n"
9560 " const char *path);\n"
9566 #: ../src/guestfs-actions.pod:1494 ../fish/guestfish-actions.pod:989
9568 "This calls the external C<fgrep> program and returns the matching lines."
9573 #: ../src/guestfs-actions.pod:1506
9574 msgid "guestfs_fgrepi"
9579 #: ../src/guestfs-actions.pod:1508
9583 " guestfs_fgrepi (guestfs_h *g,\n"
9584 " const char *pattern,\n"
9585 " const char *path);\n"
9591 #: ../src/guestfs-actions.pod:1513 ../fish/guestfish-actions.pod:999
9593 "This calls the external C<fgrep -i> program and returns the matching lines."
9598 #: ../src/guestfs-actions.pod:1525
9599 msgid "guestfs_file"
9604 #: ../src/guestfs-actions.pod:1527
9608 " guestfs_file (guestfs_h *g,\n"
9609 " const char *path);\n"
9615 #: ../src/guestfs-actions.pod:1531 ../fish/guestfish-actions.pod:1009
9617 "This call uses the standard L<file(1)> command to determine the type or "
9618 "contents of the file."
9623 #: ../src/guestfs-actions.pod:1534 ../fish/guestfish-actions.pod:1012
9625 "This call will also transparently look inside various types of compressed "
9630 #: ../src/guestfs-actions.pod:1537 ../fish/guestfish-actions.pod:1015
9632 "The exact command which runs is C<file -zb path>. Note in particular that "
9633 "the filename is not prepended to the output (the I<-b> option)."
9637 #: ../src/guestfs-actions.pod:1541 ../fish/guestfish-actions.pod:1019
9639 "The output depends on the output of the underlying L<file(1)> command and it "
9640 "can change in future in ways beyond our control. In other words, the output "
9641 "is not guaranteed by the ABI."
9645 #: ../src/guestfs-actions.pod:1545
9647 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
9648 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
9653 #: ../src/guestfs-actions.pod:1553
9654 msgid "guestfs_file_architecture"
9659 #: ../src/guestfs-actions.pod:1555
9663 " guestfs_file_architecture (guestfs_h *g,\n"
9664 " const char *filename);\n"
9670 #: ../src/guestfs-actions.pod:1559 ../fish/guestfish-actions.pod:1030
9672 "This detects the architecture of the binary C<filename>, and returns it if "
9678 #: ../src/guestfs-actions.pod:1562 ../fish/guestfish-actions.pod:1033
9679 msgid "Currently defined architectures are:"
9684 #: ../src/guestfs-actions.pod:1566 ../fish/guestfish-actions.pod:1037
9690 #: ../src/guestfs-actions.pod:1568 ../fish/guestfish-actions.pod:1039
9692 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
9693 "irrespective of the precise processor requirements of the binary."
9698 #: ../src/guestfs-actions.pod:1571 ../fish/guestfish-actions.pod:1042
9704 #: ../src/guestfs-actions.pod:1573 ../fish/guestfish-actions.pod:1044
9705 msgid "64 bit x86-64."
9710 #: ../src/guestfs-actions.pod:1575 ../fish/guestfish-actions.pod:1046
9716 #: ../src/guestfs-actions.pod:1577 ../fish/guestfish-actions.pod:1048
9717 msgid "32 bit SPARC."
9722 #: ../src/guestfs-actions.pod:1579 ../fish/guestfish-actions.pod:1050
9728 #: ../src/guestfs-actions.pod:1581 ../fish/guestfish-actions.pod:1052
9729 msgid "64 bit SPARC V9 and above."
9734 #: ../src/guestfs-actions.pod:1583 ../fish/guestfish-actions.pod:1054
9740 #: ../src/guestfs-actions.pod:1585 ../fish/guestfish-actions.pod:1056
9741 msgid "Intel Itanium."
9746 #: ../src/guestfs-actions.pod:1587 ../fish/guestfish-actions.pod:1058
9752 #: ../src/guestfs-actions.pod:1589 ../fish/guestfish-actions.pod:1060
9753 msgid "32 bit Power PC."
9758 #: ../src/guestfs-actions.pod:1591 ../fish/guestfish-actions.pod:1062
9764 #: ../src/guestfs-actions.pod:1593 ../fish/guestfish-actions.pod:1064
9765 msgid "64 bit Power PC."
9770 #: ../src/guestfs-actions.pod:1597 ../fish/guestfish-actions.pod:1068
9771 msgid "Libguestfs may return other architecture strings in future."
9776 #: ../src/guestfs-actions.pod:1599 ../fish/guestfish-actions.pod:1070
9777 msgid "The function works on at least the following types of files:"
9782 #: ../src/guestfs-actions.pod:1605 ../fish/guestfish-actions.pod:1076
9783 msgid "many types of Un*x and Linux binary"
9788 #: ../src/guestfs-actions.pod:1609 ../fish/guestfish-actions.pod:1080
9789 msgid "many types of Un*x and Linux shared library"
9794 #: ../src/guestfs-actions.pod:1613 ../fish/guestfish-actions.pod:1084
9795 msgid "Windows Win32 and Win64 binaries"
9800 #: ../src/guestfs-actions.pod:1617 ../fish/guestfish-actions.pod:1088
9801 msgid "Windows Win32 and Win64 DLLs"
9806 #: ../src/guestfs-actions.pod:1619 ../fish/guestfish-actions.pod:1090
9807 msgid "Win32 binaries and DLLs return C<i386>."
9812 #: ../src/guestfs-actions.pod:1621 ../fish/guestfish-actions.pod:1092
9813 msgid "Win64 binaries and DLLs return C<x86_64>."
9818 #: ../src/guestfs-actions.pod:1625 ../fish/guestfish-actions.pod:1096
9819 msgid "Linux kernel modules"
9824 #: ../src/guestfs-actions.pod:1629 ../fish/guestfish-actions.pod:1100
9825 msgid "Linux new-style initrd images"
9830 #: ../src/guestfs-actions.pod:1633 ../fish/guestfish-actions.pod:1104
9831 msgid "some non-x86 Linux vmlinuz kernels"
9836 #: ../src/guestfs-actions.pod:1637 ../fish/guestfish-actions.pod:1108
9837 msgid "What it can't do currently:"
9842 #: ../src/guestfs-actions.pod:1643 ../fish/guestfish-actions.pod:1114
9843 msgid "static libraries (libfoo.a)"
9848 #: ../src/guestfs-actions.pod:1647 ../fish/guestfish-actions.pod:1118
9849 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
9854 #: ../src/guestfs-actions.pod:1651 ../fish/guestfish-actions.pod:1122
9855 msgid "x86 Linux vmlinuz kernels"
9860 #: ../src/guestfs-actions.pod:1653 ../fish/guestfish-actions.pod:1124
9862 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
9863 "compressed code, and are horribly hard to unpack. If you want to find the "
9864 "architecture of a kernel, use the architecture of the associated initrd or "
9865 "kernel module(s) instead."
9870 #: ../src/guestfs-actions.pod:1663 ../src/guestfs-actions.pod:1826
9871 #: ../src/guestfs-actions.pod:1843 ../src/guestfs-actions.pod:2533
9872 #: ../src/guestfs-actions.pod:2623 ../src/guestfs-actions.pod:2689
9873 #: ../src/guestfs-actions.pod:2876 ../src/guestfs-actions.pod:2894
9874 #: ../src/guestfs-actions.pod:2934 ../src/guestfs-actions.pod:3009
9875 #: ../src/guestfs-actions.pod:3102 ../src/guestfs-actions.pod:3339
9876 #: ../src/guestfs-actions.pod:3471
9877 msgid "(Added in 1.5.3)"
9882 #: ../src/guestfs-actions.pod:1665
9883 msgid "guestfs_filesize"
9888 #: ../src/guestfs-actions.pod:1667
9892 " guestfs_filesize (guestfs_h *g,\n"
9893 " const char *file);\n"
9899 #: ../src/guestfs-actions.pod:1671 ../fish/guestfish-actions.pod:1135
9900 msgid "This command returns the size of C<file> in bytes."
9905 #: ../src/guestfs-actions.pod:1673
9907 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
9908 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
9909 "devices, use C<guestfs_blockdev_getsize64>."
9914 #: ../src/guestfs-actions.pod:1679
9915 msgid "(Added in 1.0.82)"
9920 #: ../src/guestfs-actions.pod:1681
9921 msgid "guestfs_fill"
9926 #: ../src/guestfs-actions.pod:1683
9930 " guestfs_fill (guestfs_h *g,\n"
9933 " const char *path);\n"
9939 #: ../src/guestfs-actions.pod:1689 ../fish/guestfish-actions.pod:1145
9941 "This command creates a new file called C<path>. The initial content of the "
9942 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
9948 #: ../src/guestfs-actions.pod:1693
9950 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
9951 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
9952 "bytes use C<guestfs_fill_pattern>."
9957 #: ../src/guestfs-actions.pod:1705
9958 msgid "(Added in 1.0.79)"
9963 #: ../src/guestfs-actions.pod:1707
9964 msgid "guestfs_fill_pattern"
9969 #: ../src/guestfs-actions.pod:1709
9973 " guestfs_fill_pattern (guestfs_h *g,\n"
9974 " const char *pattern,\n"
9976 " const char *path);\n"
9982 #: ../src/guestfs-actions.pod:1715
9984 "This function is like C<guestfs_fill> except that it creates a new file of "
9985 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
9986 "pattern is truncated if necessary to ensure the length of the file is "
9987 "exactly C<len> bytes."
9992 #: ../src/guestfs-actions.pod:1727
9993 msgid "(Added in 1.3.12)"
9998 #: ../src/guestfs-actions.pod:1729
9999 msgid "guestfs_find"
10004 #: ../src/guestfs-actions.pod:1731
10008 " guestfs_find (guestfs_h *g,\n"
10009 " const char *directory);\n"
10015 #: ../src/guestfs-actions.pod:1735 ../fish/guestfish-actions.pod:1167
10017 "This command lists out all files and directories, recursively, starting at "
10018 "C<directory>. It is essentially equivalent to running the shell command "
10019 "C<find directory -print> but some post-processing happens on the output, "
10025 #: ../src/guestfs-actions.pod:1740 ../fish/guestfish-actions.pod:1172
10027 "This returns a list of strings I<without any prefix>. Thus if the directory "
10033 #: ../src/guestfs-actions.pod:1743 ../fish/guestfish-actions.pod:1175
10044 #: ../src/guestfs-actions.pod:1747
10046 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
10051 #: ../src/guestfs-actions.pod:1750 ../fish/guestfish-actions.pod:1182
10063 #: ../src/guestfs-actions.pod:1755 ../fish/guestfish-actions.pod:1187
10064 msgid "If C<directory> is not a directory, then this command returns an error."
10069 #: ../src/guestfs-actions.pod:1758 ../fish/guestfish-actions.pod:1190
10070 msgid "The returned list is sorted."
10075 #: ../src/guestfs-actions.pod:1760
10076 msgid "See also C<guestfs_find0>."
10081 #: ../src/guestfs-actions.pod:1769 ../src/guestfs-actions.pod:4227
10082 #: ../src/guestfs-actions.pod:5929
10083 msgid "(Added in 1.0.27)"
10088 #: ../src/guestfs-actions.pod:1771
10089 msgid "guestfs_find0"
10094 #: ../src/guestfs-actions.pod:1773
10098 " guestfs_find0 (guestfs_h *g,\n"
10099 " const char *directory,\n"
10100 " const char *files);\n"
10106 #: ../src/guestfs-actions.pod:1778 ../fish/guestfish-actions.pod:1201
10108 "This command lists out all files and directories, recursively, starting at "
10109 "C<directory>, placing the resulting list in the external file called "
10115 #: ../src/guestfs-actions.pod:1782
10117 "This command works the same way as C<guestfs_find> with the following "
10123 #: ../src/guestfs-actions.pod:1789 ../fish/guestfish-actions.pod:1212
10124 msgid "The resulting list is written to an external file."
10129 #: ../src/guestfs-actions.pod:1793 ../fish/guestfish-actions.pod:1216
10131 "Items (filenames) in the result are separated by C<\\0> characters. See "
10132 "L<find(1)> option I<-print0>."
10137 #: ../src/guestfs-actions.pod:1798 ../fish/guestfish-actions.pod:1221
10138 msgid "This command is not limited in the number of names that it can return."
10143 #: ../src/guestfs-actions.pod:1803 ../fish/guestfish-actions.pod:1226
10144 msgid "The result list is not sorted."
10149 #: ../src/guestfs-actions.pod:1809
10150 msgid "(Added in 1.0.74)"
10155 #: ../src/guestfs-actions.pod:1811
10156 msgid "guestfs_findfs_label"
10161 #: ../src/guestfs-actions.pod:1813
10165 " guestfs_findfs_label (guestfs_h *g,\n"
10166 " const char *label);\n"
10172 #: ../src/guestfs-actions.pod:1817 ../fish/guestfish-actions.pod:1236
10174 "This command searches the filesystems and returns the one which has the "
10175 "given label. An error is returned if no such filesystem can be found."
10180 #: ../src/guestfs-actions.pod:1821
10181 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
10186 #: ../src/guestfs-actions.pod:1828
10187 msgid "guestfs_findfs_uuid"
10192 #: ../src/guestfs-actions.pod:1830
10196 " guestfs_findfs_uuid (guestfs_h *g,\n"
10197 " const char *uuid);\n"
10203 #: ../src/guestfs-actions.pod:1834 ../fish/guestfish-actions.pod:1246
10205 "This command searches the filesystems and returns the one which has the "
10206 "given UUID. An error is returned if no such filesystem can be found."
10211 #: ../src/guestfs-actions.pod:1838
10212 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
10217 #: ../src/guestfs-actions.pod:1845
10218 msgid "guestfs_fsck"
10223 #: ../src/guestfs-actions.pod:1847
10227 " guestfs_fsck (guestfs_h *g,\n"
10228 " const char *fstype,\n"
10229 " const char *device);\n"
10235 #: ../src/guestfs-actions.pod:1852 ../fish/guestfish-actions.pod:1256
10237 "This runs the filesystem checker (fsck) on C<device> which should have "
10238 "filesystem type C<fstype>."
10243 #: ../src/guestfs-actions.pod:1855 ../fish/guestfish-actions.pod:1259
10245 "The returned integer is the status. See L<fsck(8)> for the list of status "
10246 "codes from C<fsck>."
10251 #: ../src/guestfs-actions.pod:1864 ../fish/guestfish-actions.pod:1268
10252 msgid "Multiple status codes can be summed together."
10257 #: ../src/guestfs-actions.pod:1868 ../fish/guestfish-actions.pod:1272
10259 "A non-zero return code can mean \"success\", for example if errors have been "
10260 "corrected on the filesystem."
10265 #: ../src/guestfs-actions.pod:1873 ../fish/guestfish-actions.pod:1277
10266 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
10271 #: ../src/guestfs-actions.pod:1878 ../fish/guestfish-actions.pod:1282
10273 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
10278 #: ../src/guestfs-actions.pod:1882 ../src/guestfs-actions.pod:7659
10279 msgid "(Added in 1.0.16)"
10284 #: ../src/guestfs-actions.pod:1884
10285 msgid "guestfs_get_append"
10290 #: ../src/guestfs-actions.pod:1886
10294 " guestfs_get_append (guestfs_h *g);\n"
10300 #: ../src/guestfs-actions.pod:1889 ../fish/guestfish-actions.pod:1288
10302 "Return the additional kernel options which are added to the guest kernel "
10308 #: ../src/guestfs-actions.pod:1892 ../fish/guestfish-actions.pod:1291
10309 msgid "If C<NULL> then no options are added."
10314 #: ../src/guestfs-actions.pod:1894
10316 "This function returns a string which may be NULL. There is no way to return "
10317 "an error from this function. The string is owned by the guest handle and "
10318 "must I<not> be freed."
10323 #: ../src/guestfs-actions.pod:1898 ../src/guestfs-actions.pod:5607
10324 #: ../src/guestfs-actions.pod:6089 ../src/guestfs-actions.pod:6512
10325 #: ../src/guestfs-actions.pod:6531 ../src/guestfs-actions.pod:6547
10326 #: ../src/guestfs-actions.pod:6571 ../src/guestfs-actions.pod:7325
10327 #: ../src/guestfs-actions.pod:7340 ../src/guestfs-actions.pod:7702
10328 msgid "(Added in 1.0.26)"
10332 #: ../src/guestfs-actions.pod:1900
10333 msgid "guestfs_get_attach_method"
10337 #: ../src/guestfs-actions.pod:1902
10341 " guestfs_get_attach_method (guestfs_h *g);\n"
10346 #: ../src/guestfs-actions.pod:1905
10347 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
10351 #: ../src/guestfs-actions.pod:1910 ../src/guestfs-actions.pod:6119
10352 msgid "(Added in 1.9.8)"
10357 #: ../src/guestfs-actions.pod:1912
10358 msgid "guestfs_get_autosync"
10363 #: ../src/guestfs-actions.pod:1914
10367 " guestfs_get_autosync (guestfs_h *g);\n"
10373 #: ../src/guestfs-actions.pod:1917 ../fish/guestfish-actions.pod:1303
10374 msgid "Get the autosync flag."
10379 #: ../src/guestfs-actions.pod:1923
10380 msgid "guestfs_get_direct"
10385 #: ../src/guestfs-actions.pod:1925
10389 " guestfs_get_direct (guestfs_h *g);\n"
10395 #: ../src/guestfs-actions.pod:1928 ../fish/guestfish-actions.pod:1309
10396 msgid "Return the direct appliance mode flag."
10401 #: ../src/guestfs-actions.pod:1932 ../src/guestfs-actions.pod:6160
10402 msgid "(Added in 1.0.72)"
10407 #: ../src/guestfs-actions.pod:1934
10408 msgid "guestfs_get_e2label"
10413 #: ../src/guestfs-actions.pod:1936
10417 " guestfs_get_e2label (guestfs_h *g,\n"
10418 " const char *device);\n"
10424 #: ../src/guestfs-actions.pod:1940 ../fish/guestfish-actions.pod:1315
10426 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
10431 #: ../src/guestfs-actions.pod:1946 ../fish/guestfish-actions.pod:1318
10433 "This function is deprecated. In new code, use the C<vfs_label> call instead."
10438 #: ../src/guestfs-actions.pod:1953 ../src/guestfs-actions.pod:1974
10439 #: ../src/guestfs-actions.pod:6178 ../src/guestfs-actions.pod:6197
10440 msgid "(Added in 1.0.15)"
10445 #: ../src/guestfs-actions.pod:1955
10446 msgid "guestfs_get_e2uuid"
10451 #: ../src/guestfs-actions.pod:1957
10455 " guestfs_get_e2uuid (guestfs_h *g,\n"
10456 " const char *device);\n"
10462 #: ../src/guestfs-actions.pod:1961 ../fish/guestfish-actions.pod:1329
10464 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
10469 #: ../src/guestfs-actions.pod:1967 ../fish/guestfish-actions.pod:1332
10471 "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
10476 #: ../src/guestfs-actions.pod:1976
10477 msgid "guestfs_get_memsize"
10482 #: ../src/guestfs-actions.pod:1978
10486 " guestfs_get_memsize (guestfs_h *g);\n"
10492 #: ../src/guestfs-actions.pod:1981 ../fish/guestfish-actions.pod:1343
10494 "This gets the memory size in megabytes allocated to the qemu subprocess."
10499 #: ../src/guestfs-actions.pod:1984
10501 "If C<guestfs_set_memsize> was not called on this handle, and if "
10502 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
10503 "value for memsize."
10508 #: ../src/guestfs-actions.pod:1988 ../src/guestfs-actions.pod:2069
10509 #: ../src/guestfs-actions.pod:6213 ../src/guestfs-actions.pod:6320
10510 #: ../fish/guestfish-actions.pod:1350 ../fish/guestfish-actions.pod:1401
10511 #: ../fish/guestfish-actions.pod:4126 ../fish/guestfish-actions.pod:4213
10513 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
10518 #: ../src/guestfs-actions.pod:1993 ../src/guestfs-actions.pod:4518
10519 #: ../src/guestfs-actions.pod:4727 ../src/guestfs-actions.pod:4746
10520 #: ../src/guestfs-actions.pod:4765 ../src/guestfs-actions.pod:4777
10521 #: ../src/guestfs-actions.pod:4794 ../src/guestfs-actions.pod:4807
10522 #: ../src/guestfs-actions.pod:5832 ../src/guestfs-actions.pod:6218
10523 #: ../src/guestfs-actions.pod:6479 ../src/guestfs-actions.pod:7094
10524 msgid "(Added in 1.0.55)"
10529 #: ../src/guestfs-actions.pod:1995
10530 msgid "guestfs_get_network"
10535 #: ../src/guestfs-actions.pod:1997
10539 " guestfs_get_network (guestfs_h *g);\n"
10545 #: ../src/guestfs-actions.pod:2000 ../fish/guestfish-actions.pod:1357
10546 msgid "This returns the enable network flag."
10551 #: ../src/guestfs-actions.pod:2004 ../src/guestfs-actions.pod:6237
10552 msgid "(Added in 1.5.4)"
10557 #: ../src/guestfs-actions.pod:2006
10558 msgid "guestfs_get_path"
10563 #: ../src/guestfs-actions.pod:2008
10567 " guestfs_get_path (guestfs_h *g);\n"
10573 #: ../src/guestfs-actions.pod:2011 ../fish/guestfish-actions.pod:1363
10574 msgid "Return the current search path."
10579 #: ../src/guestfs-actions.pod:2013 ../fish/guestfish-actions.pod:1365
10581 "This is always non-NULL. If it wasn't set already, then this will return "
10582 "the default path."
10587 #: ../src/guestfs-actions.pod:2016 ../src/guestfs-actions.pod:2045
10589 "This function returns a string, or NULL on error. The string is owned by "
10590 "the guest handle and must I<not> be freed."
10595 #: ../src/guestfs-actions.pod:2021
10596 msgid "guestfs_get_pid"
10601 #: ../src/guestfs-actions.pod:2023
10605 " guestfs_get_pid (guestfs_h *g);\n"
10611 #: ../src/guestfs-actions.pod:2026 ../fish/guestfish-actions.pod:1374
10613 "Return the process ID of the qemu subprocess. If there is no qemu "
10614 "subprocess, then this will return an error."
10619 #: ../src/guestfs-actions.pod:2029 ../fish/guestfish-actions.pod:1377
10620 msgid "This is an internal call used for debugging and testing."
10625 #: ../src/guestfs-actions.pod:2033
10626 msgid "(Added in 1.0.56)"
10631 #: ../src/guestfs-actions.pod:2035
10632 msgid "guestfs_get_qemu"
10637 #: ../src/guestfs-actions.pod:2037
10641 " guestfs_get_qemu (guestfs_h *g);\n"
10647 #: ../src/guestfs-actions.pod:2040 ../fish/guestfish-actions.pod:1383
10648 msgid "Return the current qemu binary."
10653 #: ../src/guestfs-actions.pod:2042 ../fish/guestfish-actions.pod:1385
10655 "This is always non-NULL. If it wasn't set already, then this will return "
10656 "the default qemu binary name."
10661 #: ../src/guestfs-actions.pod:2048 ../src/guestfs-actions.pod:6282
10662 msgid "(Added in 1.0.6)"
10667 #: ../src/guestfs-actions.pod:2050
10668 msgid "guestfs_get_recovery_proc"
10673 #: ../src/guestfs-actions.pod:2052
10677 " guestfs_get_recovery_proc (guestfs_h *g);\n"
10683 #: ../src/guestfs-actions.pod:2055 ../fish/guestfish-actions.pod:1392
10684 msgid "Return the recovery process enabled flag."
10689 #: ../src/guestfs-actions.pod:2059 ../src/guestfs-actions.pod:3593
10690 #: ../src/guestfs-actions.pod:3922 ../src/guestfs-actions.pod:4325
10691 #: ../src/guestfs-actions.pod:4357 ../src/guestfs-actions.pod:5537
10692 #: ../src/guestfs-actions.pod:5880 ../src/guestfs-actions.pod:6306
10693 #: ../src/guestfs-actions.pod:6997 ../src/guestfs-actions.pod:7017
10694 #: ../src/guestfs-actions.pod:7209
10695 msgid "(Added in 1.0.77)"
10700 #: ../src/guestfs-actions.pod:2061
10701 msgid "guestfs_get_selinux"
10706 #: ../src/guestfs-actions.pod:2063
10710 " guestfs_get_selinux (guestfs_h *g);\n"
10716 #: ../src/guestfs-actions.pod:2066
10718 "This returns the current setting of the selinux flag which is passed to the "
10719 "appliance at boot time. See C<guestfs_set_selinux>."
10724 #: ../src/guestfs-actions.pod:2074 ../src/guestfs-actions.pod:2137
10725 #: ../src/guestfs-actions.pod:6325 ../src/guestfs-actions.pod:6383
10726 msgid "(Added in 1.0.67)"
10731 #: ../src/guestfs-actions.pod:2076
10732 msgid "guestfs_get_state"
10737 #: ../src/guestfs-actions.pod:2078
10741 " guestfs_get_state (guestfs_h *g);\n"
10747 #: ../src/guestfs-actions.pod:2081 ../fish/guestfish-actions.pod:1408
10749 "This returns the current state as an opaque integer. This is only useful "
10750 "for printing debug and internal error messages."
10755 #: ../src/guestfs-actions.pod:2084 ../src/guestfs-actions.pod:3364
10756 #: ../src/guestfs-actions.pod:3393 ../src/guestfs-actions.pod:3454
10757 #: ../src/guestfs-actions.pod:3481 ../fish/guestfish-actions.pod:1411
10758 #: ../fish/guestfish-actions.pod:2331 ../fish/guestfish-actions.pod:2349
10759 #: ../fish/guestfish-actions.pod:2387 ../fish/guestfish-actions.pod:2403
10760 msgid "For more information on states, see L<guestfs(3)>."
10765 #: ../src/guestfs-actions.pod:2090
10766 msgid "guestfs_get_trace"
10771 #: ../src/guestfs-actions.pod:2092
10775 " guestfs_get_trace (guestfs_h *g);\n"
10781 #: ../src/guestfs-actions.pod:2095 ../fish/guestfish-actions.pod:1417
10782 msgid "Return the command trace flag."
10787 #: ../src/guestfs-actions.pod:2101
10788 msgid "guestfs_get_umask"
10793 #: ../src/guestfs-actions.pod:2103
10797 " guestfs_get_umask (guestfs_h *g);\n"
10803 #: ../src/guestfs-actions.pod:2106
10805 "Return the current umask. By default the umask is C<022> unless it has been "
10806 "set by calling C<guestfs_umask>."
10811 #: ../src/guestfs-actions.pod:2113
10812 msgid "guestfs_get_verbose"
10817 #: ../src/guestfs-actions.pod:2115
10821 " guestfs_get_verbose (guestfs_h *g);\n"
10827 #: ../src/guestfs-actions.pod:2118 ../fish/guestfish-actions.pod:1430
10828 msgid "This returns the verbose messages flag."
10833 #: ../src/guestfs-actions.pod:2124
10834 msgid "guestfs_getcon"
10839 #: ../src/guestfs-actions.pod:2126
10843 " guestfs_getcon (guestfs_h *g);\n"
10849 #: ../src/guestfs-actions.pod:2129 ../fish/guestfish-actions.pod:1436
10850 msgid "This gets the SELinux security context of the daemon."
10855 #: ../src/guestfs-actions.pod:2131
10857 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
10862 #: ../src/guestfs-actions.pod:2139
10863 msgid "guestfs_getxattr"
10868 #: ../src/guestfs-actions.pod:2141
10872 " guestfs_getxattr (guestfs_h *g,\n"
10873 " const char *path,\n"
10874 " const char *name,\n"
10875 " size_t *size_r);\n"
10881 #: ../src/guestfs-actions.pod:2147
10883 "Get a single extended attribute from file C<path> named C<name>. This call "
10884 "follows symlinks. If you want to lookup an extended attribute for the "
10885 "symlink itself, use C<guestfs_lgetxattr>."
10890 #: ../src/guestfs-actions.pod:2151 ../src/guestfs-actions.pod:3607
10892 "Normally it is better to get all extended attributes from a file in one go "
10893 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
10894 "implementations are buggy and do not provide a way to list out attributes. "
10895 "For these filesystems (notably ntfs-3g) you have to know the names of the "
10896 "extended attributes you want in advance and call this function."
10901 #: ../src/guestfs-actions.pod:2158 ../src/guestfs-actions.pod:3614
10902 #: ../fish/guestfish-actions.pod:1456 ../fish/guestfish-actions.pod:2483
10904 "Extended attribute values are blobs of binary data. If there is no extended "
10905 "attribute named C<name>, this returns an error."
10910 #: ../src/guestfs-actions.pod:2161
10911 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
10916 #: ../src/guestfs-actions.pod:2163 ../src/guestfs-actions.pod:2354
10917 #: ../src/guestfs-actions.pod:2824 ../src/guestfs-actions.pod:3619
10918 #: ../src/guestfs-actions.pod:5530 ../src/guestfs-actions.pod:5556
10919 #: ../src/guestfs-actions.pod:5737
10921 "This function returns a buffer, or NULL on error. The size of the returned "
10922 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
10927 #: ../src/guestfs-actions.pod:2167 ../src/guestfs-actions.pod:3623
10928 msgid "(Added in 1.7.24)"
10933 #: ../src/guestfs-actions.pod:2169
10934 msgid "guestfs_getxattrs"
10939 #: ../src/guestfs-actions.pod:2171
10942 " struct guestfs_xattr_list *\n"
10943 " guestfs_getxattrs (guestfs_h *g,\n"
10944 " const char *path);\n"
10950 #: ../src/guestfs-actions.pod:2175 ../fish/guestfish-actions.pod:1465
10952 "This call lists the extended attributes of the file or directory C<path>."
10957 #: ../src/guestfs-actions.pod:2178 ../fish/guestfish-actions.pod:1468
10959 "At the system call level, this is a combination of the L<listxattr(2)> and "
10960 "L<getxattr(2)> calls."
10965 #: ../src/guestfs-actions.pod:2181
10966 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
10971 #: ../src/guestfs-actions.pod:2183 ../src/guestfs-actions.pod:3635
10972 #: ../src/guestfs-actions.pod:4321
10974 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
10975 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
10980 #: ../src/guestfs-actions.pod:2187 ../src/guestfs-actions.pod:3639
10981 #: ../src/guestfs-actions.pod:3836 ../src/guestfs-actions.pod:3872
10982 #: ../src/guestfs-actions.pod:5910 ../src/guestfs-actions.pod:6402
10983 #: ../src/guestfs-actions.pod:7767
10984 msgid "(Added in 1.0.59)"
10989 #: ../src/guestfs-actions.pod:2189
10990 msgid "guestfs_glob_expand"
10995 #: ../src/guestfs-actions.pod:2191
10999 " guestfs_glob_expand (guestfs_h *g,\n"
11000 " const char *pattern);\n"
11006 #: ../src/guestfs-actions.pod:2195 ../fish/guestfish-actions.pod:1477
11008 "This command searches for all the pathnames matching C<pattern> according to "
11009 "the wildcard expansion rules used by the shell."
11014 #: ../src/guestfs-actions.pod:2199 ../fish/guestfish-actions.pod:1481
11016 "If no paths match, then this returns an empty list (note: not an error)."
11021 #: ../src/guestfs-actions.pod:2202 ../fish/guestfish-actions.pod:1484
11023 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
11024 "GLOB_BRACE>. See that manual page for more details."
11029 #: ../src/guestfs-actions.pod:2210 ../src/guestfs-actions.pod:6595
11030 #: ../src/guestfs-actions.pod:6612
11031 msgid "(Added in 1.0.50)"
11036 #: ../src/guestfs-actions.pod:2212
11037 msgid "guestfs_grep"
11042 #: ../src/guestfs-actions.pod:2214
11046 " guestfs_grep (guestfs_h *g,\n"
11047 " const char *regex,\n"
11048 " const char *path);\n"
11054 #: ../src/guestfs-actions.pod:2219 ../fish/guestfish-actions.pod:1492
11055 msgid "This calls the external C<grep> program and returns the matching lines."
11060 #: ../src/guestfs-actions.pod:2231
11061 msgid "guestfs_grepi"
11066 #: ../src/guestfs-actions.pod:2233
11070 " guestfs_grepi (guestfs_h *g,\n"
11071 " const char *regex,\n"
11072 " const char *path);\n"
11078 #: ../src/guestfs-actions.pod:2238 ../fish/guestfish-actions.pod:1502
11080 "This calls the external C<grep -i> program and returns the matching lines."
11085 #: ../src/guestfs-actions.pod:2250
11086 msgid "guestfs_grub_install"
11091 #: ../src/guestfs-actions.pod:2252
11095 " guestfs_grub_install (guestfs_h *g,\n"
11096 " const char *root,\n"
11097 " const char *device);\n"
11103 #: ../src/guestfs-actions.pod:2257 ../fish/guestfish-actions.pod:1512
11105 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
11106 "the root directory being C<root>."
11111 #: ../src/guestfs-actions.pod:2260 ../fish/guestfish-actions.pod:1515
11113 "Note: If grub-install reports the error \"No suitable drive was found in the "
11114 "generated device map.\" it may be that you need to create a C</boot/grub/"
11115 "device.map> file first that contains the mapping between grub device names "
11116 "and Linux device names. It is usually sufficient to create a file "
11122 #: ../src/guestfs-actions.pod:2267 ../fish/guestfish-actions.pod:1522
11125 " (hd0) /dev/vda\n"
11131 #: ../src/guestfs-actions.pod:2269 ../fish/guestfish-actions.pod:1524
11132 msgid "replacing C</dev/vda> with the name of the installation device."
11137 #: ../src/guestfs-actions.pod:2273
11138 msgid "(Added in 1.0.17)"
11143 #: ../src/guestfs-actions.pod:2275
11144 msgid "guestfs_head"
11149 #: ../src/guestfs-actions.pod:2277
11153 " guestfs_head (guestfs_h *g,\n"
11154 " const char *path);\n"
11160 #: ../src/guestfs-actions.pod:2281 ../fish/guestfish-actions.pod:1530
11162 "This command returns up to the first 10 lines of a file as a list of strings."
11167 #: ../src/guestfs-actions.pod:2293
11168 msgid "guestfs_head_n"
11173 #: ../src/guestfs-actions.pod:2295
11177 " guestfs_head_n (guestfs_h *g,\n"
11179 " const char *path);\n"
11185 #: ../src/guestfs-actions.pod:2300 ../fish/guestfish-actions.pod:1540
11187 "If the parameter C<nrlines> is a positive number, this returns the first "
11188 "C<nrlines> lines of the file C<path>."
11193 #: ../src/guestfs-actions.pod:2303 ../fish/guestfish-actions.pod:1543
11195 "If the parameter C<nrlines> is a negative number, this returns lines from "
11196 "the file C<path>, excluding the last C<nrlines> lines."
11201 #: ../src/guestfs-actions.pod:2306 ../src/guestfs-actions.pod:6892
11202 #: ../fish/guestfish-actions.pod:1546 ../fish/guestfish-actions.pod:4591
11203 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
11208 #: ../src/guestfs-actions.pod:2317
11209 msgid "guestfs_hexdump"
11214 #: ../src/guestfs-actions.pod:2319
11218 " guestfs_hexdump (guestfs_h *g,\n"
11219 " const char *path);\n"
11225 #: ../src/guestfs-actions.pod:2323 ../fish/guestfish-actions.pod:1555
11227 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
11228 "readable, canonical hex dump of the file."
11233 #: ../src/guestfs-actions.pod:2332 ../src/guestfs-actions.pod:6676
11234 #: ../src/guestfs-actions.pod:6731
11235 msgid "(Added in 1.0.22)"
11240 #: ../src/guestfs-actions.pod:2334
11241 msgid "guestfs_initrd_cat"
11246 #: ../src/guestfs-actions.pod:2336
11250 " guestfs_initrd_cat (guestfs_h *g,\n"
11251 " const char *initrdpath,\n"
11252 " const char *filename,\n"
11253 " size_t *size_r);\n"
11259 #: ../src/guestfs-actions.pod:2342 ../fish/guestfish-actions.pod:1565
11261 "This command unpacks the file C<filename> from the initrd file called "
11262 "C<initrdpath>. The filename must be given I<without> the initial C</> "
11268 #: ../src/guestfs-actions.pod:2346 ../fish/guestfish-actions.pod:1569
11270 "For example, in guestfish you could use the following command to examine the "
11271 "boot script (usually called C</init>) contained in a Linux initrd or "
11277 #: ../src/guestfs-actions.pod:2350 ../fish/guestfish-actions.pod:1573
11280 " initrd-cat /boot/initrd-<version>.img init\n"
11286 #: ../src/guestfs-actions.pod:2352
11287 msgid "See also C<guestfs_initrd_list>."
11292 #: ../src/guestfs-actions.pod:2363
11293 msgid "guestfs_initrd_list"
11298 #: ../src/guestfs-actions.pod:2365
11302 " guestfs_initrd_list (guestfs_h *g,\n"
11303 " const char *path);\n"
11309 #: ../src/guestfs-actions.pod:2369 ../fish/guestfish-actions.pod:1584
11310 msgid "This command lists out files contained in an initrd."
11315 #: ../src/guestfs-actions.pod:2371 ../fish/guestfish-actions.pod:1586
11317 "The files are listed without any initial C</> character. The files are "
11318 "listed in the order they appear (not necessarily alphabetical). Directory "
11319 "names are listed as separate items."
11324 #: ../src/guestfs-actions.pod:2375 ../fish/guestfish-actions.pod:1590
11326 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
11327 "initrd. We I<only> support the newer initramfs format (compressed cpio "
11333 #: ../src/guestfs-actions.pod:2385
11334 msgid "guestfs_inotify_add_watch"
11339 #: ../src/guestfs-actions.pod:2387
11343 " guestfs_inotify_add_watch (guestfs_h *g,\n"
11344 " const char *path,\n"
11351 #: ../src/guestfs-actions.pod:2392 ../fish/guestfish-actions.pod:1598
11352 msgid "Watch C<path> for the events listed in C<mask>."
11357 #: ../src/guestfs-actions.pod:2394 ../fish/guestfish-actions.pod:1600
11359 "Note that if C<path> is a directory then events within that directory are "
11360 "watched, but this does I<not> happen recursively (in subdirectories)."
11365 #: ../src/guestfs-actions.pod:2398 ../fish/guestfish-actions.pod:1604
11367 "Note for non-C or non-Linux callers: the inotify events are defined by the "
11368 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
11373 #: ../src/guestfs-actions.pod:2406
11374 msgid "guestfs_inotify_close"
11379 #: ../src/guestfs-actions.pod:2408
11383 " guestfs_inotify_close (guestfs_h *g);\n"
11389 #: ../src/guestfs-actions.pod:2411 ../fish/guestfish-actions.pod:1612
11391 "This closes the inotify handle which was previously opened by inotify_init. "
11392 "It removes all watches, throws away any pending events, and deallocates all "
11398 #: ../src/guestfs-actions.pod:2419
11399 msgid "guestfs_inotify_files"
11404 #: ../src/guestfs-actions.pod:2421
11408 " guestfs_inotify_files (guestfs_h *g);\n"
11414 #: ../src/guestfs-actions.pod:2424
11416 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
11417 "returns a list of pathnames of objects that were touched. The returned "
11418 "pathnames are sorted and deduplicated."
11423 #: ../src/guestfs-actions.pod:2434
11424 msgid "guestfs_inotify_init"
11429 #: ../src/guestfs-actions.pod:2436
11433 " guestfs_inotify_init (guestfs_h *g,\n"
11434 " int maxevents);\n"
11440 #: ../src/guestfs-actions.pod:2440 ../fish/guestfish-actions.pod:1628
11442 "This command creates a new inotify handle. The inotify subsystem can be "
11443 "used to notify events which happen to objects in the guest filesystem."
11448 #: ../src/guestfs-actions.pod:2444
11450 "C<maxevents> is the maximum number of events which will be queued up between "
11451 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
11452 "passed as C<0>, then the kernel (or previously set) default is used. For "
11453 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
11454 "throws away events, but records the fact that it threw them away by setting "
11455 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
11456 "C<guestfs_inotify_read>)."
11461 #: ../src/guestfs-actions.pod:2454
11463 "Before any events are generated, you have to add some watches to the "
11464 "internal watch list. See: C<guestfs_inotify_add_watch>, "
11465 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
11470 #: ../src/guestfs-actions.pod:2460
11472 "Queued up events should be read periodically by calling "
11473 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
11474 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
11475 "often enough then you risk the internal queue overflowing."
11480 #: ../src/guestfs-actions.pod:2467
11482 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
11483 "This also removes any watches automatically."
11488 #: ../src/guestfs-actions.pod:2471 ../fish/guestfish-actions.pod:1659
11490 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
11491 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
11492 "that there is one global inotify handle per libguestfs instance."
11497 #: ../src/guestfs-actions.pod:2480
11498 msgid "guestfs_inotify_read"
11503 #: ../src/guestfs-actions.pod:2482
11506 " struct guestfs_inotify_event_list *\n"
11507 " guestfs_inotify_read (guestfs_h *g);\n"
11513 #: ../src/guestfs-actions.pod:2485 ../fish/guestfish-actions.pod:1668
11515 "Return the complete queue of events that have happened since the previous "
11521 #: ../src/guestfs-actions.pod:2488 ../fish/guestfish-actions.pod:1671
11522 msgid "If no events have happened, this returns an empty list."
11527 #: ../src/guestfs-actions.pod:2490 ../fish/guestfish-actions.pod:1673
11529 "I<Note>: In order to make sure that all events have been read, you must call "
11530 "this function repeatedly until it returns an empty list. The reason is that "
11531 "the call will read events up to the maximum appliance-to-host message size "
11532 "and leave remaining events in the queue."
11537 #: ../src/guestfs-actions.pod:2496
11539 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
11540 "there was an error. I<The caller must call "
11541 "C<guestfs_free_inotify_event_list> after use>."
11546 #: ../src/guestfs-actions.pod:2502
11547 msgid "guestfs_inotify_rm_watch"
11552 #: ../src/guestfs-actions.pod:2504
11556 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
11563 #: ../src/guestfs-actions.pod:2508
11565 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
11570 #: ../src/guestfs-actions.pod:2515
11571 msgid "guestfs_inspect_get_arch"
11576 #: ../src/guestfs-actions.pod:2517
11580 " guestfs_inspect_get_arch (guestfs_h *g,\n"
11581 " const char *root);\n"
11587 #: ../src/guestfs-actions.pod:2521
11589 "This returns the architecture of the inspected operating system. The "
11590 "possible return values are listed under C<guestfs_file_architecture>."
11595 #: ../src/guestfs-actions.pod:2525 ../fish/guestfish-actions.pod:1694
11597 "If the architecture could not be determined, then the string C<unknown> is "
11603 #: ../src/guestfs-actions.pod:2528 ../src/guestfs-actions.pod:2618
11604 #: ../src/guestfs-actions.pod:2722 ../src/guestfs-actions.pod:2741
11605 #: ../src/guestfs-actions.pod:2872 ../src/guestfs-actions.pod:2955
11606 #: ../src/guestfs-actions.pod:2983 ../src/guestfs-actions.pod:3004
11607 #: ../src/guestfs-actions.pod:3057 ../src/guestfs-actions.pod:3097
11608 #: ../src/guestfs-actions.pod:3117 ../src/guestfs-actions.pod:3137
11609 #: ../src/guestfs-actions.pod:3154 ../src/guestfs-actions.pod:3170
11610 #: ../src/guestfs-actions.pod:3188 ../src/guestfs-actions.pod:3290
11611 #: ../src/guestfs-actions.pod:3331 ../fish/guestfish-actions.pod:1697
11612 #: ../fish/guestfish-actions.pod:1780 ../fish/guestfish-actions.pod:1859
11613 #: ../fish/guestfish-actions.pod:1871 ../fish/guestfish-actions.pod:1955
11614 #: ../fish/guestfish-actions.pod:2016 ../fish/guestfish-actions.pod:2037
11615 #: ../fish/guestfish-actions.pod:2051 ../fish/guestfish-actions.pod:2091
11616 #: ../fish/guestfish-actions.pod:2123 ../fish/guestfish-actions.pod:2136
11617 #: ../fish/guestfish-actions.pod:2149 ../fish/guestfish-actions.pod:2159
11618 #: ../fish/guestfish-actions.pod:2169 ../fish/guestfish-actions.pod:2181
11619 #: ../fish/guestfish-actions.pod:2277 ../fish/guestfish-actions.pod:2311
11620 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
11625 #: ../src/guestfs-actions.pod:2535
11626 msgid "guestfs_inspect_get_distro"
11631 #: ../src/guestfs-actions.pod:2537
11635 " guestfs_inspect_get_distro (guestfs_h *g,\n"
11636 " const char *root);\n"
11642 #: ../src/guestfs-actions.pod:2541 ../fish/guestfish-actions.pod:1703
11644 "This returns the distro (distribution) of the inspected operating system."
11649 #: ../src/guestfs-actions.pod:2544 ../fish/guestfish-actions.pod:1706
11650 msgid "Currently defined distros are:"
11655 #: ../src/guestfs-actions.pod:2548 ../fish/guestfish-actions.pod:1710
11656 msgid "\"archlinux\""
11661 #: ../src/guestfs-actions.pod:2550 ../fish/guestfish-actions.pod:1712
11662 msgid "Arch Linux."
11666 #: ../src/guestfs-actions.pod:2552 ../fish/guestfish-actions.pod:1714
11671 #: ../src/guestfs-actions.pod:2554 ../fish/guestfish-actions.pod:1716
11677 #: ../src/guestfs-actions.pod:2556 ../fish/guestfish-actions.pod:1718
11683 #: ../src/guestfs-actions.pod:2558 ../fish/guestfish-actions.pod:1720
11689 #: ../src/guestfs-actions.pod:2560 ../fish/guestfish-actions.pod:1722
11695 #: ../src/guestfs-actions.pod:2562 ../fish/guestfish-actions.pod:1724
11701 #: ../src/guestfs-actions.pod:2564 ../fish/guestfish-actions.pod:1726
11707 #: ../src/guestfs-actions.pod:2566 ../fish/guestfish-actions.pod:1728
11713 #: ../src/guestfs-actions.pod:2568 ../fish/guestfish-actions.pod:1730
11714 msgid "\"linuxmint\""
11719 #: ../src/guestfs-actions.pod:2570 ../fish/guestfish-actions.pod:1732
11720 msgid "Linux Mint."
11725 #: ../src/guestfs-actions.pod:2572 ../fish/guestfish-actions.pod:1734
11726 msgid "\"mandriva\""
11731 #: ../src/guestfs-actions.pod:2574 ../fish/guestfish-actions.pod:1736
11737 #: ../src/guestfs-actions.pod:2576 ../fish/guestfish-actions.pod:1738
11743 #: ../src/guestfs-actions.pod:2578 ../fish/guestfish-actions.pod:1740
11749 #: ../src/guestfs-actions.pod:2580 ../fish/guestfish-actions.pod:1742
11755 #: ../src/guestfs-actions.pod:2582 ../fish/guestfish-actions.pod:1744
11761 #: ../src/guestfs-actions.pod:2584 ../fish/guestfish-actions.pod:1746
11762 msgid "\"redhat-based\""
11767 #: ../src/guestfs-actions.pod:2586 ../fish/guestfish-actions.pod:1748
11768 msgid "Some Red Hat-derived distro."
11773 #: ../src/guestfs-actions.pod:2588 ../fish/guestfish-actions.pod:1750
11778 #: ../src/guestfs-actions.pod:2590 ../fish/guestfish-actions.pod:1752
11779 msgid "Red Hat Enterprise Linux."
11783 #: ../src/guestfs-actions.pod:2592 ../fish/guestfish-actions.pod:1754
11784 msgid "\"scientificlinux\""
11788 #: ../src/guestfs-actions.pod:2594 ../fish/guestfish-actions.pod:1756
11789 msgid "Scientific Linux."
11793 #: ../src/guestfs-actions.pod:2596 ../fish/guestfish-actions.pod:1758
11794 msgid "\"slackware\""
11798 #: ../src/guestfs-actions.pod:2598 ../fish/guestfish-actions.pod:1760
11804 #: ../src/guestfs-actions.pod:2600 ../fish/guestfish-actions.pod:1762
11810 #: ../src/guestfs-actions.pod:2602 ../fish/guestfish-actions.pod:1764
11816 #: ../src/guestfs-actions.pod:2604 ../src/guestfs-actions.pod:2713
11817 #: ../src/guestfs-actions.pod:3088 ../fish/guestfish-actions.pod:1766
11818 #: ../fish/guestfish-actions.pod:1850 ../fish/guestfish-actions.pod:2114
11819 msgid "\"unknown\""
11824 #: ../src/guestfs-actions.pod:2606 ../fish/guestfish-actions.pod:1768
11825 msgid "The distro could not be determined."
11830 #: ../src/guestfs-actions.pod:2608 ../src/guestfs-actions.pod:3080
11831 #: ../fish/guestfish-actions.pod:1770 ../fish/guestfish-actions.pod:2106
11832 msgid "\"windows\""
11837 #: ../src/guestfs-actions.pod:2610 ../fish/guestfish-actions.pod:1772
11839 "Windows does not have distributions. This string is returned if the OS type "
11845 #: ../src/guestfs-actions.pod:2615 ../src/guestfs-actions.pod:2719
11846 #: ../src/guestfs-actions.pod:3094 ../fish/guestfish-actions.pod:1777
11847 #: ../fish/guestfish-actions.pod:1856 ../fish/guestfish-actions.pod:2120
11849 "Future versions of libguestfs may return other strings here. The caller "
11850 "should be prepared to handle any string."
11854 #: ../src/guestfs-actions.pod:2625
11855 msgid "guestfs_inspect_get_drive_mappings"
11859 #: ../src/guestfs-actions.pod:2627
11863 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
11864 " const char *root);\n"
11869 #: ../src/guestfs-actions.pod:2631 ../fish/guestfish-actions.pod:1786
11871 "This call is useful for Windows which uses a primitive system of assigning "
11872 "drive letters (like \"C:\") to partitions. This inspection API examines the "
11873 "Windows Registry to find out how disks/partitions are mapped to drive "
11874 "letters, and returns a hash table as in the example below:"
11878 #: ../src/guestfs-actions.pod:2637 ../fish/guestfish-actions.pod:1792
11881 " C => /dev/vda2\n"
11882 " E => /dev/vdb1\n"
11883 " F => /dev/vdc1\n"
11888 #: ../src/guestfs-actions.pod:2641 ../fish/guestfish-actions.pod:1796
11890 "Note that keys are drive letters. For Windows, the key is case insensitive "
11891 "and just contains the drive letter, without the customary colon separator "
11896 #: ../src/guestfs-actions.pod:2645 ../fish/guestfish-actions.pod:1800
11898 "In future we may support other operating systems that also used drive "
11899 "letters, but the keys for those might not be case insensitive and might be "
11900 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
11905 #: ../src/guestfs-actions.pod:2650 ../fish/guestfish-actions.pod:1805
11907 "For Windows guests, currently only hard drive mappings are returned. "
11908 "Removable disks (eg. DVD-ROMs) are ignored."
11912 #: ../src/guestfs-actions.pod:2653 ../fish/guestfish-actions.pod:1808
11914 "For guests that do not use drive mappings, or if the drive mappings could "
11915 "not be determined, this returns an empty hash table."
11919 #: ../src/guestfs-actions.pod:2656
11921 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
11922 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
11927 #: ../src/guestfs-actions.pod:2660 ../src/guestfs-actions.pod:2928
11928 #: ../src/guestfs-actions.pod:3724 ../src/guestfs-actions.pod:5006
11929 #: ../src/guestfs-actions.pod:7033
11931 "This function returns a NULL-terminated array of strings, or NULL if there "
11932 "was an error. The array of strings will always have length C<2n+1>, where "
11933 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
11934 "caller must free the strings and the array after use>."
11938 #: ../src/guestfs-actions.pod:2666 ../src/guestfs-actions.pod:3122
11939 msgid "(Added in 1.9.17)"
11944 #: ../src/guestfs-actions.pod:2668
11945 msgid "guestfs_inspect_get_filesystems"
11950 #: ../src/guestfs-actions.pod:2670
11954 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
11955 " const char *root);\n"
11961 #: ../src/guestfs-actions.pod:2674 ../fish/guestfish-actions.pod:1819
11963 "This returns a list of all the filesystems that we think are associated with "
11964 "this operating system. This includes the root filesystem, other ordinary "
11965 "filesystems, and non-mounted devices like swap partitions."
11970 #: ../src/guestfs-actions.pod:2679 ../fish/guestfish-actions.pod:1824
11972 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
11973 "to be shared between operating systems."
11978 #: ../src/guestfs-actions.pod:2682
11980 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
11981 "C<guestfs_inspect_get_mountpoints>."
11985 #: ../src/guestfs-actions.pod:2691
11986 msgid "guestfs_inspect_get_format"
11990 #: ../src/guestfs-actions.pod:2693
11994 " guestfs_inspect_get_format (guestfs_h *g,\n"
11995 " const char *root);\n"
12000 #: ../src/guestfs-actions.pod:2697 ../fish/guestfish-actions.pod:1834
12002 "This returns the format of the inspected operating system. You can use it "
12003 "to detect install images, live CDs and similar."
12007 #: ../src/guestfs-actions.pod:2700 ../fish/guestfish-actions.pod:1837
12008 msgid "Currently defined formats are:"
12012 #: ../src/guestfs-actions.pod:2704 ../fish/guestfish-actions.pod:1841
12013 msgid "\"installed\""
12017 #: ../src/guestfs-actions.pod:2706 ../fish/guestfish-actions.pod:1843
12018 msgid "This is an installed operating system."
12022 #: ../src/guestfs-actions.pod:2708 ../fish/guestfish-actions.pod:1845
12023 msgid "\"installer\""
12027 #: ../src/guestfs-actions.pod:2710 ../fish/guestfish-actions.pod:1847
12029 "The disk image being inspected is not an installed operating system, but a "
12030 "I<bootable> install disk, live CD, or similar."
12034 #: ../src/guestfs-actions.pod:2715 ../fish/guestfish-actions.pod:1852
12035 msgid "The format of this disk image is not known."
12039 #: ../src/guestfs-actions.pod:2727 ../src/guestfs-actions.pod:3158
12040 #: ../src/guestfs-actions.pod:3174 ../src/guestfs-actions.pod:3192
12041 #: ../src/guestfs-actions.pod:5948
12042 msgid "(Added in 1.9.4)"
12047 #: ../src/guestfs-actions.pod:2729
12048 msgid "guestfs_inspect_get_hostname"
12053 #: ../src/guestfs-actions.pod:2731
12057 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
12058 " const char *root);\n"
12064 #: ../src/guestfs-actions.pod:2735 ../fish/guestfish-actions.pod:1865
12066 "This function returns the hostname of the operating system as found by "
12067 "inspection of the guest's configuration files."
12072 #: ../src/guestfs-actions.pod:2738 ../fish/guestfish-actions.pod:1868
12074 "If the hostname could not be determined, then the string C<unknown> is "
12080 #: ../src/guestfs-actions.pod:2746
12081 msgid "(Added in 1.7.9)"
12085 #: ../src/guestfs-actions.pod:2748
12086 msgid "guestfs_inspect_get_icon"
12090 #: ../src/guestfs-actions.pod:2750
12094 " guestfs_inspect_get_icon (guestfs_h *g,\n"
12095 " const char *root,\n"
12096 " size_t *size_r,\n"
12102 #: ../src/guestfs-actions.pod:2761
12105 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
12106 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
12111 #: ../src/guestfs-actions.pod:2764 ../fish/guestfish-actions.pod:1877
12113 "This function returns an icon corresponding to the inspected operating "
12114 "system. The icon is returned as a buffer containing a PNG image (re-encoded "
12115 "to PNG if necessary)."
12119 #: ../src/guestfs-actions.pod:2768 ../fish/guestfish-actions.pod:1881
12121 "If it was not possible to get an icon this function returns a zero-length "
12122 "(non-NULL) buffer. I<Callers must check for this case>."
12126 #: ../src/guestfs-actions.pod:2771 ../fish/guestfish-actions.pod:1884
12128 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
12129 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
12130 "this file will be returned. You can disable favicons by passing the "
12131 "optional C<favicon> boolean as false (default is true)."
12135 #: ../src/guestfs-actions.pod:2777 ../fish/guestfish-actions.pod:1890
12137 "If finding the favicon fails, then we look in other places in the guest for "
12142 #: ../src/guestfs-actions.pod:2780 ../fish/guestfish-actions.pod:1893
12144 "If the optional C<highquality> boolean is true then only high quality icons "
12145 "are returned, which means only icons of high resolution with an alpha "
12146 "channel. The default (false) is to return any icon we can, even if it is of "
12147 "substandard quality."
12151 #: ../src/guestfs-actions.pod:2791 ../fish/guestfish-actions.pod:1904
12153 "Unlike most other inspection API calls, the guest's disks must be mounted up "
12154 "before you call this, since it needs to read information from the guest "
12155 "filesystem during the call."
12159 #: ../src/guestfs-actions.pod:2797 ../fish/guestfish-actions.pod:1910
12161 "B<Security:> The icon data comes from the untrusted guest, and should be "
12162 "treated with caution. PNG files have been known to contain exploits. "
12163 "Ensure that libpng (or other relevant libraries) are fully up to date before "
12164 "trying to process or display the icon."
12168 #: ../src/guestfs-actions.pod:2805 ../fish/guestfish-actions.pod:1918
12170 "The PNG image returned can be any size. It might not be square. Libguestfs "
12171 "tries to return the largest, highest quality icon available. The "
12172 "application must scale the icon to the required size."
12176 #: ../src/guestfs-actions.pod:2812 ../fish/guestfish-actions.pod:1925
12178 "Extracting icons from Windows guests requires the external C<wrestool> "
12179 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
12180 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
12181 "installed separately."
12185 #: ../src/guestfs-actions.pod:2819 ../fish/guestfish-actions.pod:1932
12187 "Operating system icons are usually trademarks. Seek legal advice before "
12188 "using trademarks in applications."
12192 #: ../src/guestfs-actions.pod:2828 ../src/guestfs-actions.pod:3653
12193 #: ../src/guestfs-actions.pod:4905
12194 msgid "(Added in 1.11.12)"
12198 #: ../src/guestfs-actions.pod:2830
12199 msgid "guestfs_inspect_get_icon_va"
12203 #: ../src/guestfs-actions.pod:2832
12207 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
12208 " const char *root,\n"
12209 " size_t *size_r,\n"
12210 " va_list args);\n"
12215 #: ../src/guestfs-actions.pod:2838
12216 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
12220 #: ../src/guestfs-actions.pod:2842
12221 msgid "guestfs_inspect_get_icon_argv"
12225 #: ../src/guestfs-actions.pod:2844
12229 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
12230 " const char *root,\n"
12231 " size_t *size_r,\n"
12232 " const struct guestfs_inspect_get_icon_argv *optargs);\n"
12237 #: ../src/guestfs-actions.pod:2850
12238 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
12243 #: ../src/guestfs-actions.pod:2854
12244 msgid "guestfs_inspect_get_major_version"
12249 #: ../src/guestfs-actions.pod:2856
12253 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
12254 " const char *root);\n"
12260 #: ../src/guestfs-actions.pod:2860 ../fish/guestfish-actions.pod:1943
12262 "This returns the major version number of the inspected operating system."
12267 #: ../src/guestfs-actions.pod:2863 ../fish/guestfish-actions.pod:1946
12269 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
12270 "popular public names used by the operating system. Notably the operating "
12271 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
12272 "1). You can find out the real versions corresponding to releases of Windows "
12273 "by consulting Wikipedia or MSDN."
12278 #: ../src/guestfs-actions.pod:2870 ../src/guestfs-actions.pod:2887
12279 #: ../fish/guestfish-actions.pod:1953 ../fish/guestfish-actions.pod:1964
12280 msgid "If the version could not be determined, then C<0> is returned."
12285 #: ../src/guestfs-actions.pod:2878
12286 msgid "guestfs_inspect_get_minor_version"
12291 #: ../src/guestfs-actions.pod:2880
12295 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
12296 " const char *root);\n"
12302 #: ../src/guestfs-actions.pod:2884 ../fish/guestfish-actions.pod:1961
12304 "This returns the minor version number of the inspected operating system."
12309 #: ../src/guestfs-actions.pod:2889
12311 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
12312 "C<guestfs_inspect_get_major_version>."
12317 #: ../src/guestfs-actions.pod:2896
12318 msgid "guestfs_inspect_get_mountpoints"
12323 #: ../src/guestfs-actions.pod:2898
12327 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
12328 " const char *root);\n"
12333 #: ../src/guestfs-actions.pod:2902 ../fish/guestfish-actions.pod:1973
12335 "This returns a hash of where we think the filesystems associated with this "
12336 "operating system should be mounted. Callers should note that this is at "
12337 "best an educated guess made by reading configuration files such as C</etc/"
12338 "fstab>. I<In particular note> that this may return filesystems which are "
12339 "non-existent or not mountable and callers should be prepared to handle or "
12340 "ignore failures if they try to mount them."
12345 #: ../src/guestfs-actions.pod:2911 ../fish/guestfish-actions.pod:1982
12347 "Each element in the returned hashtable has a key which is the path of the "
12348 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
12349 "mounted there (eg. C</dev/sda1>)."
12354 #: ../src/guestfs-actions.pod:2916 ../fish/guestfish-actions.pod:1987
12356 "Non-mounted devices such as swap devices are I<not> returned in this list."
12360 #: ../src/guestfs-actions.pod:2919
12362 "For operating systems like Windows which still use drive letters, this call "
12363 "will only return an entry for the first drive \"mounted on\" C</>. For "
12364 "information about the mapping of drive letters to partitions, see "
12365 "C<guestfs_inspect_get_drive_mappings>."
12370 #: ../src/guestfs-actions.pod:2925
12372 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
12373 "C<guestfs_inspect_get_filesystems>."
12378 #: ../src/guestfs-actions.pod:2936
12379 msgid "guestfs_inspect_get_package_format"
12384 #: ../src/guestfs-actions.pod:2938
12388 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
12389 " const char *root);\n"
12395 #: ../src/guestfs-actions.pod:2942
12397 "This function and C<guestfs_inspect_get_package_management> return the "
12398 "package format and package management tool used by the inspected operating "
12399 "system. For example for Fedora these functions would return C<rpm> (package "
12400 "format) and C<yum> (package management)."
12405 #: ../src/guestfs-actions.pod:2948 ../fish/guestfish-actions.pod:2009
12407 "This returns the string C<unknown> if we could not determine the package "
12408 "format I<or> if the operating system does not have a real packaging system "
12414 #: ../src/guestfs-actions.pod:2952 ../fish/guestfish-actions.pod:2013
12416 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>. "
12417 "Future versions of libguestfs may return other strings."
12422 #: ../src/guestfs-actions.pod:2960 ../src/guestfs-actions.pod:2988
12423 msgid "(Added in 1.7.5)"
12428 #: ../src/guestfs-actions.pod:2962
12429 msgid "guestfs_inspect_get_package_management"
12434 #: ../src/guestfs-actions.pod:2964
12438 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
12439 " const char *root);\n"
12445 #: ../src/guestfs-actions.pod:2968
12447 "C<guestfs_inspect_get_package_format> and this function return the package "
12448 "format and package management tool used by the inspected operating system. "
12449 "For example for Fedora these functions would return C<rpm> (package format) "
12450 "and C<yum> (package management)."
12455 #: ../src/guestfs-actions.pod:2974 ../fish/guestfish-actions.pod:2028
12457 "This returns the string C<unknown> if we could not determine the package "
12458 "management tool I<or> if the operating system does not have a real packaging "
12459 "system (eg. Windows)."
12464 #: ../src/guestfs-actions.pod:2978 ../fish/guestfish-actions.pod:2032
12466 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
12467 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>. Future versions of "
12468 "libguestfs may return other strings."
12473 #: ../src/guestfs-actions.pod:2990
12474 msgid "guestfs_inspect_get_product_name"
12479 #: ../src/guestfs-actions.pod:2992
12483 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
12484 " const char *root);\n"
12490 #: ../src/guestfs-actions.pod:2996 ../fish/guestfish-actions.pod:2043
12492 "This returns the product name of the inspected operating system. The "
12493 "product name is generally some freeform string which can be displayed to the "
12494 "user, but should not be parsed by programs."
12499 #: ../src/guestfs-actions.pod:3001 ../fish/guestfish-actions.pod:2048
12501 "If the product name could not be determined, then the string C<unknown> is "
12506 #: ../src/guestfs-actions.pod:3011
12507 msgid "guestfs_inspect_get_product_variant"
12511 #: ../src/guestfs-actions.pod:3013
12515 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
12516 " const char *root);\n"
12521 #: ../src/guestfs-actions.pod:3017 ../fish/guestfish-actions.pod:2057
12522 msgid "This returns the product variant of the inspected operating system."
12526 #: ../src/guestfs-actions.pod:3020 ../fish/guestfish-actions.pod:2060
12528 "For Windows guests, this returns the contents of the Registry key C<HKLM"
12529 "\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> which "
12530 "is usually a string such as C<Client> or C<Server> (other values are "
12531 "possible). This can be used to distinguish consumer and enterprise versions "
12532 "of Windows that have the same version number (for example, Windows 7 and "
12533 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
12534 "the latter is C<Server>)."
12538 #: ../src/guestfs-actions.pod:3029 ../fish/guestfish-actions.pod:2069
12540 "For enterprise Linux guests, in future we intend this to return the product "
12541 "variant such as C<Desktop>, C<Server> and so on. But this is not "
12542 "implemented at present."
12546 #: ../src/guestfs-actions.pod:3033 ../fish/guestfish-actions.pod:2073
12548 "If the product variant could not be determined, then the string C<unknown> "
12553 #: ../src/guestfs-actions.pod:3036
12555 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
12556 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
12560 #: ../src/guestfs-actions.pod:3043
12561 msgid "(Added in 1.9.13)"
12566 #: ../src/guestfs-actions.pod:3045
12567 msgid "guestfs_inspect_get_roots"
12572 #: ../src/guestfs-actions.pod:3047
12576 " guestfs_inspect_get_roots (guestfs_h *g);\n"
12582 #: ../src/guestfs-actions.pod:3050
12584 "This function is a convenient way to get the list of root devices, as "
12585 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
12586 "the whole inspection process."
12591 #: ../src/guestfs-actions.pod:3054
12593 "This returns an empty list if either no root devices were found or the "
12594 "caller has not called C<guestfs_inspect_os>."
12599 #: ../src/guestfs-actions.pod:3063
12600 msgid "(Added in 1.7.3)"
12605 #: ../src/guestfs-actions.pod:3065
12606 msgid "guestfs_inspect_get_type"
12611 #: ../src/guestfs-actions.pod:3067
12615 " guestfs_inspect_get_type (guestfs_h *g,\n"
12616 " const char *root);\n"
12622 #: ../src/guestfs-actions.pod:3071 ../fish/guestfish-actions.pod:2097
12624 "This returns the type of the inspected operating system. Currently defined "
12630 #: ../src/guestfs-actions.pod:3076 ../fish/guestfish-actions.pod:2102
12636 #: ../src/guestfs-actions.pod:3078 ../fish/guestfish-actions.pod:2104
12637 msgid "Any Linux-based operating system."
12642 #: ../src/guestfs-actions.pod:3082 ../fish/guestfish-actions.pod:2108
12643 msgid "Any Microsoft Windows operating system."
12648 #: ../src/guestfs-actions.pod:3084 ../fish/guestfish-actions.pod:2110
12649 msgid "\"freebsd\""
12654 #: ../src/guestfs-actions.pod:3086 ../fish/guestfish-actions.pod:2112
12660 #: ../src/guestfs-actions.pod:3090 ../fish/guestfish-actions.pod:2116
12661 msgid "The operating system type could not be determined."
12665 #: ../src/guestfs-actions.pod:3104
12666 msgid "guestfs_inspect_get_windows_current_control_set"
12670 #: ../src/guestfs-actions.pod:3106
12674 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
12675 " const char *root);\n"
12680 #: ../src/guestfs-actions.pod:3110 ../fish/guestfish-actions.pod:2129
12682 "This returns the Windows CurrentControlSet of the inspected guest. The "
12683 "CurrentControlSet is a registry key name such as C<ControlSet001>."
12687 #: ../src/guestfs-actions.pod:3113 ../fish/guestfish-actions.pod:2132
12689 "This call assumes that the guest is Windows and that the Registry could be "
12690 "examined by inspection. If this is not the case then an error is returned."
12695 #: ../src/guestfs-actions.pod:3124
12696 msgid "guestfs_inspect_get_windows_systemroot"
12701 #: ../src/guestfs-actions.pod:3126
12705 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
12706 " const char *root);\n"
12712 #: ../src/guestfs-actions.pod:3130 ../fish/guestfish-actions.pod:2142
12714 "This returns the Windows systemroot of the inspected guest. The systemroot "
12715 "is a directory path such as C</WINDOWS>."
12720 #: ../src/guestfs-actions.pod:3133 ../fish/guestfish-actions.pod:2145
12722 "This call assumes that the guest is Windows and that the systemroot could be "
12723 "determined by inspection. If this is not the case then an error is returned."
12728 #: ../src/guestfs-actions.pod:3142
12729 msgid "(Added in 1.5.25)"
12733 #: ../src/guestfs-actions.pod:3144
12734 msgid "guestfs_inspect_is_live"
12738 #: ../src/guestfs-actions.pod:3146
12742 " guestfs_inspect_is_live (guestfs_h *g,\n"
12743 " const char *root);\n"
12748 #: ../src/guestfs-actions.pod:3150
12750 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
12751 "disk), then this returns true if a live image was detected on the disk."
12755 #: ../src/guestfs-actions.pod:3160
12756 msgid "guestfs_inspect_is_multipart"
12760 #: ../src/guestfs-actions.pod:3162
12764 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
12765 " const char *root);\n"
12770 #: ../src/guestfs-actions.pod:3166
12772 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
12773 "disk), then this returns true if the disk is part of a set."
12777 #: ../src/guestfs-actions.pod:3176
12778 msgid "guestfs_inspect_is_netinst"
12782 #: ../src/guestfs-actions.pod:3178
12786 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
12787 " const char *root);\n"
12792 #: ../src/guestfs-actions.pod:3182
12794 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
12795 "disk), then this returns true if the disk is a network installer, ie. not a "
12796 "self-contained install CD but one which is likely to require network access "
12797 "to complete the install."
12802 #: ../src/guestfs-actions.pod:3194
12803 msgid "guestfs_inspect_list_applications"
12808 #: ../src/guestfs-actions.pod:3196
12811 " struct guestfs_application_list *\n"
12812 " guestfs_inspect_list_applications (guestfs_h *g,\n"
12813 " const char *root);\n"
12819 #: ../src/guestfs-actions.pod:3200 ../fish/guestfish-actions.pod:2187
12820 msgid "Return the list of applications installed in the operating system."
12825 #: ../src/guestfs-actions.pod:3202
12827 "I<Note:> This call works differently from other parts of the inspection "
12828 "API. You have to call C<guestfs_inspect_os>, then "
12829 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
12830 "this. Listing applications is a significantly more difficult operation "
12831 "which requires access to the full filesystem. Also note that unlike the "
12832 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
12833 "the libguestfs handle, this call actually reads parts of the mounted "
12834 "filesystems during the call."
12839 #: ../src/guestfs-actions.pod:3212 ../fish/guestfish-actions.pod:2199
12841 "This returns an empty list if the inspection code was not able to determine "
12842 "the list of applications."
12847 #: ../src/guestfs-actions.pod:3215 ../fish/guestfish-actions.pod:2202
12848 msgid "The application structure contains the following fields:"
12853 #: ../src/guestfs-actions.pod:3219 ../fish/guestfish-actions.pod:2206
12854 msgid "C<app_name>"
12859 #: ../src/guestfs-actions.pod:3221 ../fish/guestfish-actions.pod:2208
12861 "The name of the application. For Red Hat-derived and Debian-derived Linux "
12862 "guests, this is the package name."
12867 #: ../src/guestfs-actions.pod:3224 ../fish/guestfish-actions.pod:2211
12868 msgid "C<app_display_name>"
12873 #: ../src/guestfs-actions.pod:3226 ../fish/guestfish-actions.pod:2213
12875 "The display name of the application, sometimes localized to the install "
12876 "language of the guest operating system."
12881 #: ../src/guestfs-actions.pod:3229 ../fish/guestfish-actions.pod:2216
12883 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
12884 "to display something can use C<app_name> instead."
12889 #: ../src/guestfs-actions.pod:3232 ../fish/guestfish-actions.pod:2219
12890 msgid "C<app_epoch>"
12895 #: ../src/guestfs-actions.pod:3234 ../fish/guestfish-actions.pod:2221
12897 "For package managers which use epochs, this contains the epoch of the "
12898 "package (an integer). If unavailable, this is returned as C<0>."
12903 #: ../src/guestfs-actions.pod:3237 ../fish/guestfish-actions.pod:2224
12904 msgid "C<app_version>"
12909 #: ../src/guestfs-actions.pod:3239 ../fish/guestfish-actions.pod:2226
12911 "The version string of the application or package. If unavailable this is "
12912 "returned as an empty string C<\"\">."
12917 #: ../src/guestfs-actions.pod:3242 ../fish/guestfish-actions.pod:2229
12918 msgid "C<app_release>"
12923 #: ../src/guestfs-actions.pod:3244 ../fish/guestfish-actions.pod:2231
12925 "The release string of the application or package, for package managers that "
12926 "use this. If unavailable this is returned as an empty string C<\"\">."
12931 #: ../src/guestfs-actions.pod:3248 ../fish/guestfish-actions.pod:2235
12932 msgid "C<app_install_path>"
12937 #: ../src/guestfs-actions.pod:3250 ../fish/guestfish-actions.pod:2237
12939 "The installation path of the application (on operating systems such as "
12940 "Windows which use installation paths). This path is in the format used by "
12941 "the guest operating system, it is not a libguestfs path."
12946 #: ../src/guestfs-actions.pod:3255 ../fish/guestfish-actions.pod:2242
12947 msgid "If unavailable this is returned as an empty string C<\"\">."
12952 #: ../src/guestfs-actions.pod:3257 ../fish/guestfish-actions.pod:2244
12953 msgid "C<app_trans_path>"
12958 #: ../src/guestfs-actions.pod:3259 ../fish/guestfish-actions.pod:2246
12960 "The install path translated into a libguestfs path. If unavailable this is "
12961 "returned as an empty string C<\"\">."
12966 #: ../src/guestfs-actions.pod:3262 ../fish/guestfish-actions.pod:2249
12967 msgid "C<app_publisher>"
12972 #: ../src/guestfs-actions.pod:3264 ../fish/guestfish-actions.pod:2251
12974 "The name of the publisher of the application, for package managers that use "
12975 "this. If unavailable this is returned as an empty string C<\"\">."
12980 #: ../src/guestfs-actions.pod:3268 ../fish/guestfish-actions.pod:2255
12986 #: ../src/guestfs-actions.pod:3270 ../fish/guestfish-actions.pod:2257
12988 "The URL (eg. upstream URL) of the application. If unavailable this is "
12989 "returned as an empty string C<\"\">."
12994 #: ../src/guestfs-actions.pod:3273 ../fish/guestfish-actions.pod:2260
12995 msgid "C<app_source_package>"
13000 #: ../src/guestfs-actions.pod:3275 ../fish/guestfish-actions.pod:2262
13002 "For packaging systems which support this, the name of the source package. "
13003 "If unavailable this is returned as an empty string C<\"\">."
13008 #: ../src/guestfs-actions.pod:3278 ../fish/guestfish-actions.pod:2265
13009 msgid "C<app_summary>"
13014 #: ../src/guestfs-actions.pod:3280 ../fish/guestfish-actions.pod:2267
13016 "A short (usually one line) description of the application or package. If "
13017 "unavailable this is returned as an empty string C<\"\">."
13022 #: ../src/guestfs-actions.pod:3283 ../fish/guestfish-actions.pod:2270
13023 msgid "C<app_description>"
13028 #: ../src/guestfs-actions.pod:3285 ../fish/guestfish-actions.pod:2272
13030 "A longer description of the application or package. If unavailable this is "
13031 "returned as an empty string C<\"\">."
13036 #: ../src/guestfs-actions.pod:3292
13038 "This function returns a C<struct guestfs_application_list *>, or NULL if "
13039 "there was an error. I<The caller must call C<guestfs_free_application_list> "
13045 #: ../src/guestfs-actions.pod:3296
13046 msgid "(Added in 1.7.8)"
13051 #: ../src/guestfs-actions.pod:3298
13052 msgid "guestfs_inspect_os"
13057 #: ../src/guestfs-actions.pod:3300
13061 " guestfs_inspect_os (guestfs_h *g);\n"
13067 #: ../src/guestfs-actions.pod:3303 ../fish/guestfish-actions.pod:2283
13069 "This function uses other libguestfs functions and certain heuristics to "
13070 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
13071 "for operating systems."
13076 #: ../src/guestfs-actions.pod:3307 ../fish/guestfish-actions.pod:2287
13077 msgid "The list returned is empty if no operating systems were found."
13082 #: ../src/guestfs-actions.pod:3309 ../fish/guestfish-actions.pod:2289
13084 "If one operating system was found, then this returns a list with a single "
13085 "element, which is the name of the root filesystem of this operating system. "
13086 "It is also possible for this function to return a list containing more than "
13087 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
13088 "element being the root filesystem of one of the operating systems."
13093 #: ../src/guestfs-actions.pod:3316
13095 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
13096 "functions in order to query further information about each operating system, "
13097 "such as the name and version."
13102 #: ../src/guestfs-actions.pod:3321
13104 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
13105 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
13106 "the contents. This should be called with no disks currently mounted. The "
13107 "function may also use Augeas, so any existing Augeas handle will be closed."
13112 #: ../src/guestfs-actions.pod:3327 ../fish/guestfish-actions.pod:2307
13114 "This function cannot decrypt encrypted disks. The caller must do that first "
13115 "(supplying the necessary keys) if the disk is encrypted."
13120 #: ../src/guestfs-actions.pod:3333 ../src/guestfs-actions.pod:3664
13121 #: ../src/guestfs-actions.pod:3744
13122 msgid "See also C<guestfs_list_filesystems>."
13127 #: ../src/guestfs-actions.pod:3341
13128 msgid "guestfs_is_blockdev"
13133 #: ../src/guestfs-actions.pod:3343
13137 " guestfs_is_blockdev (guestfs_h *g,\n"
13138 " const char *path);\n"
13144 #: ../src/guestfs-actions.pod:3347 ../fish/guestfish-actions.pod:2319
13146 "This returns C<true> if and only if there is a block device with the given "
13152 #: ../src/guestfs-actions.pod:3350 ../src/guestfs-actions.pod:3379
13153 #: ../src/guestfs-actions.pod:3409 ../src/guestfs-actions.pod:3424
13154 #: ../src/guestfs-actions.pod:3440 ../src/guestfs-actions.pod:3496
13155 #: ../src/guestfs-actions.pod:3511
13156 msgid "See also C<guestfs_stat>."
13161 #: ../src/guestfs-actions.pod:3354 ../src/guestfs-actions.pod:3383
13162 #: ../src/guestfs-actions.pod:3428 ../src/guestfs-actions.pod:3500
13163 #: ../src/guestfs-actions.pod:3515
13164 msgid "(Added in 1.5.10)"
13169 #: ../src/guestfs-actions.pod:3356
13170 msgid "guestfs_is_busy"
13175 #: ../src/guestfs-actions.pod:3358
13179 " guestfs_is_busy (guestfs_h *g);\n"
13185 #: ../src/guestfs-actions.pod:3361 ../fish/guestfish-actions.pod:2328
13187 "This returns true iff this handle is busy processing a command (in the "
13193 #: ../src/guestfs-actions.pod:3370
13194 msgid "guestfs_is_chardev"
13199 #: ../src/guestfs-actions.pod:3372
13203 " guestfs_is_chardev (guestfs_h *g,\n"
13204 " const char *path);\n"
13210 #: ../src/guestfs-actions.pod:3376 ../fish/guestfish-actions.pod:2337
13212 "This returns C<true> if and only if there is a character device with the "
13213 "given C<path> name."
13218 #: ../src/guestfs-actions.pod:3385
13219 msgid "guestfs_is_config"
13224 #: ../src/guestfs-actions.pod:3387
13228 " guestfs_is_config (guestfs_h *g);\n"
13234 #: ../src/guestfs-actions.pod:3390 ../fish/guestfish-actions.pod:2346
13236 "This returns true iff this handle is being configured (in the C<CONFIG> "
13242 #: ../src/guestfs-actions.pod:3399
13243 msgid "guestfs_is_dir"
13248 #: ../src/guestfs-actions.pod:3401
13252 " guestfs_is_dir (guestfs_h *g,\n"
13253 " const char *path);\n"
13259 #: ../src/guestfs-actions.pod:3405 ../fish/guestfish-actions.pod:2355
13261 "This returns C<true> if and only if there is a directory with the given "
13262 "C<path> name. Note that it returns false for other objects like files."
13267 #: ../src/guestfs-actions.pod:3415
13268 msgid "guestfs_is_fifo"
13273 #: ../src/guestfs-actions.pod:3417
13277 " guestfs_is_fifo (guestfs_h *g,\n"
13278 " const char *path);\n"
13284 #: ../src/guestfs-actions.pod:3421 ../fish/guestfish-actions.pod:2365
13286 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
13287 "given C<path> name."
13292 #: ../src/guestfs-actions.pod:3430
13293 msgid "guestfs_is_file"
13298 #: ../src/guestfs-actions.pod:3432
13302 " guestfs_is_file (guestfs_h *g,\n"
13303 " const char *path);\n"
13309 #: ../src/guestfs-actions.pod:3436 ../fish/guestfish-actions.pod:2374
13311 "This returns C<true> if and only if there is a regular file with the given "
13312 "C<path> name. Note that it returns false for other objects like directories."
13317 #: ../src/guestfs-actions.pod:3446
13318 msgid "guestfs_is_launching"
13323 #: ../src/guestfs-actions.pod:3448
13327 " guestfs_is_launching (guestfs_h *g);\n"
13333 #: ../src/guestfs-actions.pod:3451 ../fish/guestfish-actions.pod:2384
13335 "This returns true iff this handle is launching the subprocess (in the "
13336 "C<LAUNCHING> state)."
13341 #: ../src/guestfs-actions.pod:3460
13342 msgid "guestfs_is_lv"
13347 #: ../src/guestfs-actions.pod:3462
13351 " guestfs_is_lv (guestfs_h *g,\n"
13352 " const char *device);\n"
13358 #: ../src/guestfs-actions.pod:3466 ../fish/guestfish-actions.pod:2393
13360 "This command tests whether C<device> is a logical volume, and returns true "
13361 "iff this is the case."
13366 #: ../src/guestfs-actions.pod:3473
13367 msgid "guestfs_is_ready"
13372 #: ../src/guestfs-actions.pod:3475
13376 " guestfs_is_ready (guestfs_h *g);\n"
13382 #: ../src/guestfs-actions.pod:3478 ../fish/guestfish-actions.pod:2400
13384 "This returns true iff this handle is ready to accept commands (in the "
13390 #: ../src/guestfs-actions.pod:3487
13391 msgid "guestfs_is_socket"
13396 #: ../src/guestfs-actions.pod:3489
13400 " guestfs_is_socket (guestfs_h *g,\n"
13401 " const char *path);\n"
13407 #: ../src/guestfs-actions.pod:3493 ../fish/guestfish-actions.pod:2409
13409 "This returns C<true> if and only if there is a Unix domain socket with the "
13410 "given C<path> name."
13415 #: ../src/guestfs-actions.pod:3502
13416 msgid "guestfs_is_symlink"
13421 #: ../src/guestfs-actions.pod:3504
13425 " guestfs_is_symlink (guestfs_h *g,\n"
13426 " const char *path);\n"
13432 #: ../src/guestfs-actions.pod:3508 ../fish/guestfish-actions.pod:2418
13434 "This returns C<true> if and only if there is a symbolic link with the given "
13439 #: ../src/guestfs-actions.pod:3517
13440 msgid "guestfs_is_zero"
13444 #: ../src/guestfs-actions.pod:3519
13448 " guestfs_is_zero (guestfs_h *g,\n"
13449 " const char *path);\n"
13454 #: ../src/guestfs-actions.pod:3523 ../fish/guestfish-actions.pod:2427
13456 "This returns true iff the file exists and the file is empty or it contains "
13461 #: ../src/guestfs-actions.pod:3528 ../src/guestfs-actions.pod:3542
13462 msgid "(Added in 1.11.8)"
13466 #: ../src/guestfs-actions.pod:3530
13467 msgid "guestfs_is_zero_device"
13471 #: ../src/guestfs-actions.pod:3532
13475 " guestfs_is_zero_device (guestfs_h *g,\n"
13476 " const char *device);\n"
13481 #: ../src/guestfs-actions.pod:3536 ../fish/guestfish-actions.pod:2434
13482 msgid "This returns true iff the device exists and contains all zero bytes."
13486 #: ../src/guestfs-actions.pod:3538 ../fish/guestfish-actions.pod:2436
13487 msgid "Note that for large devices this can take a long time to run."
13492 #: ../src/guestfs-actions.pod:3544
13493 msgid "guestfs_kill_subprocess"
13498 #: ../src/guestfs-actions.pod:3546
13502 " guestfs_kill_subprocess (guestfs_h *g);\n"
13508 #: ../src/guestfs-actions.pod:3549 ../fish/guestfish-actions.pod:2442
13509 msgid "This kills the qemu subprocess. You should never need to call this."
13514 #: ../src/guestfs-actions.pod:3555
13515 msgid "guestfs_launch"
13520 #: ../src/guestfs-actions.pod:3557
13524 " guestfs_launch (guestfs_h *g);\n"
13530 #: ../src/guestfs-actions.pod:3560 ../fish/guestfish-actions.pod:2450
13532 "Internally libguestfs is implemented by running a virtual machine using "
13538 #: ../src/guestfs-actions.pod:3563 ../fish/guestfish-actions.pod:2453
13540 "You should call this after configuring the handle (eg. adding drives) but "
13541 "before performing any actions."
13546 #: ../src/guestfs-actions.pod:3575
13547 msgid "guestfs_lchown"
13552 #: ../src/guestfs-actions.pod:3577
13556 " guestfs_lchown (guestfs_h *g,\n"
13559 " const char *path);\n"
13565 #: ../src/guestfs-actions.pod:3583
13567 "Change the file owner to C<owner> and group to C<group>. This is like "
13568 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
13569 "changed, not the target."
13574 #: ../src/guestfs-actions.pod:3595
13575 msgid "guestfs_lgetxattr"
13580 #: ../src/guestfs-actions.pod:3597
13584 " guestfs_lgetxattr (guestfs_h *g,\n"
13585 " const char *path,\n"
13586 " const char *name,\n"
13587 " size_t *size_r);\n"
13593 #: ../src/guestfs-actions.pod:3603 ../fish/guestfish-actions.pod:2472
13595 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
13596 "is a symlink, then this call returns an extended attribute from the symlink."
13601 #: ../src/guestfs-actions.pod:3617
13602 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
13607 #: ../src/guestfs-actions.pod:3625
13608 msgid "guestfs_lgetxattrs"
13613 #: ../src/guestfs-actions.pod:3627
13616 " struct guestfs_xattr_list *\n"
13617 " guestfs_lgetxattrs (guestfs_h *g,\n"
13618 " const char *path);\n"
13624 #: ../src/guestfs-actions.pod:3631
13626 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
13627 "then it returns the extended attributes of the link itself."
13631 #: ../src/guestfs-actions.pod:3641
13632 msgid "guestfs_list_9p"
13636 #: ../src/guestfs-actions.pod:3643
13640 " guestfs_list_9p (guestfs_h *g);\n"
13645 #: ../src/guestfs-actions.pod:3646 ../fish/guestfish-actions.pod:2500
13647 "List all 9p filesystems attached to the guest. A list of mount tags is "
13653 #: ../src/guestfs-actions.pod:3655
13654 msgid "guestfs_list_devices"
13659 #: ../src/guestfs-actions.pod:3657
13663 " guestfs_list_devices (guestfs_h *g);\n"
13669 #: ../src/guestfs-actions.pod:3660 ../fish/guestfish-actions.pod:2507
13670 msgid "List all the block devices."
13675 #: ../src/guestfs-actions.pod:3662 ../fish/guestfish-actions.pod:2509
13676 msgid "The full block device names are returned, eg. C</dev/sda>."
13680 #: ../src/guestfs-actions.pod:3672
13681 msgid "guestfs_list_dm_devices"
13685 #: ../src/guestfs-actions.pod:3674
13689 " guestfs_list_dm_devices (guestfs_h *g);\n"
13694 #: ../src/guestfs-actions.pod:3677 ../fish/guestfish-actions.pod:2517
13695 msgid "List all device mapper devices."
13699 #: ../src/guestfs-actions.pod:3679
13701 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
13702 "previous call to C<guestfs_luks_open>."
13706 #: ../src/guestfs-actions.pod:3682
13708 "Device mapper devices which correspond to logical volumes are I<not> "
13709 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
13715 #: ../src/guestfs-actions.pod:3690
13716 msgid "guestfs_list_filesystems"
13721 #: ../src/guestfs-actions.pod:3692
13725 " guestfs_list_filesystems (guestfs_h *g);\n"
13731 #: ../src/guestfs-actions.pod:3695 ../fish/guestfish-actions.pod:2530
13733 "This inspection command looks for filesystems on partitions, block devices "
13734 "and logical volumes, returning a list of devices containing filesystems and "
13740 #: ../src/guestfs-actions.pod:3699 ../fish/guestfish-actions.pod:2534
13742 "The return value is a hash, where the keys are the devices containing "
13743 "filesystems, and the values are the filesystem types. For example:"
13748 #: ../src/guestfs-actions.pod:3703 ../fish/guestfish-actions.pod:2538
13751 " \"/dev/sda1\" => \"ntfs\"\n"
13752 " \"/dev/sda2\" => \"ext2\"\n"
13753 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
13754 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
13760 #: ../src/guestfs-actions.pod:3708 ../fish/guestfish-actions.pod:2543
13762 "The value can have the special value \"unknown\", meaning the content of the "
13763 "device is undetermined or empty. \"swap\" means a Linux swap partition."
13768 #: ../src/guestfs-actions.pod:3712
13770 "This command runs other libguestfs commands, which might include "
13771 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
13772 "soon after launch and only when nothing is mounted."
13777 #: ../src/guestfs-actions.pod:3716
13779 "Not all of the filesystems returned will be mountable. In particular, swap "
13780 "partitions are returned in the list. Also this command does not check that "
13781 "each filesystem found is valid and mountable, and some filesystems might be "
13782 "mountable but require special options. Filesystems may not all belong to a "
13783 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
13788 #: ../src/guestfs-actions.pod:3730 ../src/guestfs-actions.pod:5497
13789 msgid "(Added in 1.5.15)"
13794 #: ../src/guestfs-actions.pod:3732
13795 msgid "guestfs_list_partitions"
13800 #: ../src/guestfs-actions.pod:3734
13804 " guestfs_list_partitions (guestfs_h *g);\n"
13810 #: ../src/guestfs-actions.pod:3737 ../fish/guestfish-actions.pod:2563
13811 msgid "List all the partitions detected on all block devices."
13816 #: ../src/guestfs-actions.pod:3739 ../fish/guestfish-actions.pod:2565
13817 msgid "The full partition device names are returned, eg. C</dev/sda1>"
13822 #: ../src/guestfs-actions.pod:3741
13824 "This does not return logical volumes. For that you will need to call "
13830 #: ../src/guestfs-actions.pod:3752
13836 #: ../src/guestfs-actions.pod:3754
13840 " guestfs_ll (guestfs_h *g,\n"
13841 " const char *directory);\n"
13847 #: ../src/guestfs-actions.pod:3758 ../fish/guestfish-actions.pod:2576
13849 "List the files in C<directory> (relative to the root directory, there is no "
13850 "cwd) in the format of 'ls -la'."
13855 #: ../src/guestfs-actions.pod:3761 ../fish/guestfish-actions.pod:2579
13857 "This command is mostly useful for interactive sessions. It is I<not> "
13858 "intended that you try to parse the output string."
13863 #: ../src/guestfs-actions.pod:3769
13869 #: ../src/guestfs-actions.pod:3771
13873 " guestfs_ln (guestfs_h *g,\n"
13874 " const char *target,\n"
13875 " const char *linkname);\n"
13881 #: ../src/guestfs-actions.pod:3776 ../fish/guestfish-actions.pod:2586
13882 msgid "This command creates a hard link using the C<ln> command."
13887 #: ../src/guestfs-actions.pod:3782
13888 msgid "guestfs_ln_f"
13893 #: ../src/guestfs-actions.pod:3784
13897 " guestfs_ln_f (guestfs_h *g,\n"
13898 " const char *target,\n"
13899 " const char *linkname);\n"
13904 #: ../src/guestfs-actions.pod:3789 ../fish/guestfish-actions.pod:2592
13906 "This command creates a hard link using the C<ln -f> command. The I<-f> "
13907 "option removes the link (C<linkname>) if it exists already."
13912 #: ../src/guestfs-actions.pod:3796
13913 msgid "guestfs_ln_s"
13918 #: ../src/guestfs-actions.pod:3798
13922 " guestfs_ln_s (guestfs_h *g,\n"
13923 " const char *target,\n"
13924 " const char *linkname);\n"
13930 #: ../src/guestfs-actions.pod:3803 ../fish/guestfish-actions.pod:2599
13931 msgid "This command creates a symbolic link using the C<ln -s> command."
13936 #: ../src/guestfs-actions.pod:3809
13937 msgid "guestfs_ln_sf"
13942 #: ../src/guestfs-actions.pod:3811
13946 " guestfs_ln_sf (guestfs_h *g,\n"
13947 " const char *target,\n"
13948 " const char *linkname);\n"
13953 #: ../src/guestfs-actions.pod:3816 ../fish/guestfish-actions.pod:2605
13955 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
13956 "option removes the link (C<linkname>) if it exists already."
13961 #: ../src/guestfs-actions.pod:3823
13962 msgid "guestfs_lremovexattr"
13967 #: ../src/guestfs-actions.pod:3825
13971 " guestfs_lremovexattr (guestfs_h *g,\n"
13972 " const char *xattr,\n"
13973 " const char *path);\n"
13979 #: ../src/guestfs-actions.pod:3830
13981 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
13982 "link, then it removes an extended attribute of the link itself."
13987 #: ../src/guestfs-actions.pod:3838
13993 #: ../src/guestfs-actions.pod:3840
13997 " guestfs_ls (guestfs_h *g,\n"
13998 " const char *directory);\n"
14004 #: ../src/guestfs-actions.pod:3844 ../fish/guestfish-actions.pod:2620
14006 "List the files in C<directory> (relative to the root directory, there is no "
14007 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
14012 #: ../src/guestfs-actions.pod:3848
14014 "This command is mostly useful for interactive sessions. Programs should "
14015 "probably use C<guestfs_readdir> instead."
14020 #: ../src/guestfs-actions.pod:3857
14021 msgid "guestfs_lsetxattr"
14026 #: ../src/guestfs-actions.pod:3859
14030 " guestfs_lsetxattr (guestfs_h *g,\n"
14031 " const char *xattr,\n"
14032 " const char *val,\n"
14034 " const char *path);\n"
14040 #: ../src/guestfs-actions.pod:3866
14042 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
14043 "then it sets an extended attribute of the link itself."
14048 #: ../src/guestfs-actions.pod:3874
14049 msgid "guestfs_lstat"
14054 #: ../src/guestfs-actions.pod:3876
14057 " struct guestfs_stat *\n"
14058 " guestfs_lstat (guestfs_h *g,\n"
14059 " const char *path);\n"
14065 #: ../src/guestfs-actions.pod:3880 ../src/guestfs-actions.pod:6632
14066 #: ../fish/guestfish-actions.pod:2639 ../fish/guestfish-actions.pod:4426
14067 msgid "Returns file information for the given C<path>."
14072 #: ../src/guestfs-actions.pod:3882
14074 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
14075 "link, then the link is stat-ed, not the file it refers to."
14080 #: ../src/guestfs-actions.pod:3886 ../fish/guestfish-actions.pod:2645
14081 msgid "This is the same as the C<lstat(2)> system call."
14086 #: ../src/guestfs-actions.pod:3888 ../src/guestfs-actions.pod:6636
14088 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
14089 "error. I<The caller must call C<guestfs_free_stat> after use>."
14094 #: ../src/guestfs-actions.pod:3892 ../src/guestfs-actions.pod:6640
14095 #: ../src/guestfs-actions.pod:6658 ../src/guestfs-actions.pod:7039
14096 msgid "(Added in 0.9.2)"
14101 #: ../src/guestfs-actions.pod:3894
14102 msgid "guestfs_lstatlist"
14107 #: ../src/guestfs-actions.pod:3896
14110 " struct guestfs_stat_list *\n"
14111 " guestfs_lstatlist (guestfs_h *g,\n"
14112 " const char *path,\n"
14113 " char *const *names);\n"
14119 #: ../src/guestfs-actions.pod:3901
14121 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
14122 "files, where all files are in the directory C<path>. C<names> is the list "
14123 "of files from this directory."
14128 #: ../src/guestfs-actions.pod:3905 ../fish/guestfish-actions.pod:2655
14130 "On return you get a list of stat structs, with a one-to-one correspondence "
14131 "to the C<names> list. If any name did not exist or could not be lstat'd, "
14132 "then the C<ino> field of that structure is set to C<-1>."
14137 #: ../src/guestfs-actions.pod:3910
14139 "This call is intended for programs that want to efficiently list a directory "
14140 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
14141 "for a similarly efficient call for getting extended attributes. Very long "
14142 "directory listings might cause the protocol message size to be exceeded, "
14143 "causing this call to fail. The caller must split up such requests into "
14144 "smaller groups of names."
14149 #: ../src/guestfs-actions.pod:3918
14151 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
14152 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
14157 #: ../src/guestfs-actions.pod:3924
14158 msgid "guestfs_luks_add_key"
14163 #: ../src/guestfs-actions.pod:3926
14167 " guestfs_luks_add_key (guestfs_h *g,\n"
14168 " const char *device,\n"
14169 " const char *key,\n"
14170 " const char *newkey,\n"
14177 #: ../src/guestfs-actions.pod:3933 ../fish/guestfish-actions.pod:2672
14179 "This command adds a new key on LUKS device C<device>. C<key> is any "
14180 "existing key, and is used to access the device. C<newkey> is the new key to "
14181 "add. C<keyslot> is the key slot that will be replaced."
14186 #: ../src/guestfs-actions.pod:3938
14188 "Note that if C<keyslot> already contains a key, then this command will "
14189 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
14194 #: ../src/guestfs-actions.pod:3944 ../src/guestfs-actions.pod:3984
14195 #: ../src/guestfs-actions.pod:4007 ../src/guestfs-actions.pod:4027
14196 #: ../src/guestfs-actions.pod:4062 ../src/guestfs-actions.pod:4081
14198 "This function takes a key or passphrase parameter which could contain "
14199 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
14205 #: ../src/guestfs-actions.pod:3948 ../src/guestfs-actions.pod:3988
14206 #: ../src/guestfs-actions.pod:4011 ../src/guestfs-actions.pod:4031
14207 msgid "(Added in 1.5.2)"
14212 #: ../src/guestfs-actions.pod:3950
14213 msgid "guestfs_luks_close"
14218 #: ../src/guestfs-actions.pod:3952
14222 " guestfs_luks_close (guestfs_h *g,\n"
14223 " const char *device);\n"
14229 #: ../src/guestfs-actions.pod:3956
14231 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
14232 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
14233 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
14234 "underlying block device."
14239 #: ../src/guestfs-actions.pod:3964 ../src/guestfs-actions.pod:4066
14240 #: ../src/guestfs-actions.pod:4085 ../src/guestfs-actions.pod:4135
14241 #: ../src/guestfs-actions.pod:4183
14242 msgid "(Added in 1.5.1)"
14247 #: ../src/guestfs-actions.pod:3966
14248 msgid "guestfs_luks_format"
14253 #: ../src/guestfs-actions.pod:3968
14257 " guestfs_luks_format (guestfs_h *g,\n"
14258 " const char *device,\n"
14259 " const char *key,\n"
14266 #: ../src/guestfs-actions.pod:3974 ../fish/guestfish-actions.pod:2698
14268 "This command erases existing data on C<device> and formats the device as a "
14269 "LUKS encrypted device. C<key> is the initial key, which is added to key "
14270 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
14275 #: ../src/guestfs-actions.pod:3981 ../src/guestfs-actions.pod:4004
14276 #: ../src/guestfs-actions.pod:4147 ../src/guestfs-actions.pod:5248
14277 #: ../src/guestfs-actions.pod:6030 ../src/guestfs-actions.pod:6439
14278 #: ../src/guestfs-actions.pod:6469 ../src/guestfs-actions.pod:6502
14279 #: ../src/guestfs-actions.pod:7678 ../fish/guestfish-actions.pod:2706
14280 #: ../fish/guestfish-actions.pod:2719 ../fish/guestfish-actions.pod:2806
14281 #: ../fish/guestfish-actions.pod:3467 ../fish/guestfish-actions.pod:3987
14282 #: ../fish/guestfish-actions.pod:4297 ../fish/guestfish-actions.pod:4320
14283 #: ../fish/guestfish-actions.pod:4342 ../fish/guestfish-actions.pod:5066
14285 "B<This command is dangerous. Without careful use you can easily destroy all "
14291 #: ../src/guestfs-actions.pod:3990
14292 msgid "guestfs_luks_format_cipher"
14297 #: ../src/guestfs-actions.pod:3992
14301 " guestfs_luks_format_cipher (guestfs_h *g,\n"
14302 " const char *device,\n"
14303 " const char *key,\n"
14305 " const char *cipher);\n"
14311 #: ../src/guestfs-actions.pod:3999
14313 "This command is the same as C<guestfs_luks_format> but it also allows you to "
14314 "set the C<cipher> used."
14319 #: ../src/guestfs-actions.pod:4013
14320 msgid "guestfs_luks_kill_slot"
14325 #: ../src/guestfs-actions.pod:4015
14329 " guestfs_luks_kill_slot (guestfs_h *g,\n"
14330 " const char *device,\n"
14331 " const char *key,\n"
14338 #: ../src/guestfs-actions.pod:4021 ../fish/guestfish-actions.pod:2726
14340 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
14341 "device C<device>. C<key> must be one of the I<other> keys."
14346 #: ../src/guestfs-actions.pod:4033
14347 msgid "guestfs_luks_open"
14352 #: ../src/guestfs-actions.pod:4035
14356 " guestfs_luks_open (guestfs_h *g,\n"
14357 " const char *device,\n"
14358 " const char *key,\n"
14359 " const char *mapname);\n"
14365 #: ../src/guestfs-actions.pod:4041 ../fish/guestfish-actions.pod:2737
14367 "This command opens a block device which has been encrypted according to the "
14368 "Linux Unified Key Setup (LUKS) standard."
14373 #: ../src/guestfs-actions.pod:4044 ../fish/guestfish-actions.pod:2740
14374 msgid "C<device> is the encrypted block device or partition."
14379 #: ../src/guestfs-actions.pod:4046 ../fish/guestfish-actions.pod:2742
14381 "The caller must supply one of the keys associated with the LUKS block "
14382 "device, in the C<key> parameter."
14387 #: ../src/guestfs-actions.pod:4049 ../fish/guestfish-actions.pod:2745
14389 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
14390 "writes to this block device are decrypted from and encrypted to the "
14391 "underlying C<device> respectively."
14396 #: ../src/guestfs-actions.pod:4053
14398 "If this block device contains LVM volume groups, then calling "
14399 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
14404 #: ../src/guestfs-actions.pod:4057
14405 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
14410 #: ../src/guestfs-actions.pod:4068
14411 msgid "guestfs_luks_open_ro"
14416 #: ../src/guestfs-actions.pod:4070
14420 " guestfs_luks_open_ro (guestfs_h *g,\n"
14421 " const char *device,\n"
14422 " const char *key,\n"
14423 " const char *mapname);\n"
14429 #: ../src/guestfs-actions.pod:4076
14431 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
14437 #: ../src/guestfs-actions.pod:4087
14438 msgid "guestfs_lvcreate"
14443 #: ../src/guestfs-actions.pod:4089
14447 " guestfs_lvcreate (guestfs_h *g,\n"
14448 " const char *logvol,\n"
14449 " const char *volgroup,\n"
14456 #: ../src/guestfs-actions.pod:4095 ../fish/guestfish-actions.pod:2773
14458 "This creates an LVM logical volume called C<logvol> on the volume group "
14459 "C<volgroup>, with C<size> megabytes."
14464 #: ../src/guestfs-actions.pod:4102
14465 msgid "guestfs_lvm_canonical_lv_name"
14470 #: ../src/guestfs-actions.pod:4104
14474 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
14475 " const char *lvname);\n"
14481 #: ../src/guestfs-actions.pod:4108 ../fish/guestfish-actions.pod:2780
14483 "This converts alternative naming schemes for LVs that you might find to the "
14484 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
14490 #: ../src/guestfs-actions.pod:4112 ../fish/guestfish-actions.pod:2784
14492 "This command returns an error if the C<lvname> parameter does not refer to a "
14498 #: ../src/guestfs-actions.pod:4115
14499 msgid "See also C<guestfs_is_lv>."
14504 #: ../src/guestfs-actions.pod:4120
14505 msgid "(Added in 1.5.24)"
14510 #: ../src/guestfs-actions.pod:4122
14511 msgid "guestfs_lvm_clear_filter"
14516 #: ../src/guestfs-actions.pod:4124
14520 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
14526 #: ../src/guestfs-actions.pod:4127
14528 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
14529 "see every block device."
14534 #: ../src/guestfs-actions.pod:4130 ../src/guestfs-actions.pod:4172
14535 #: ../fish/guestfish-actions.pod:2796 ../fish/guestfish-actions.pod:2827
14537 "This command also clears the LVM cache and performs a volume group scan."
14542 #: ../src/guestfs-actions.pod:4137
14543 msgid "guestfs_lvm_remove_all"
14548 #: ../src/guestfs-actions.pod:4139
14552 " guestfs_lvm_remove_all (guestfs_h *g);\n"
14558 #: ../src/guestfs-actions.pod:4142 ../fish/guestfish-actions.pod:2803
14560 "This command removes all LVM logical volumes, volume groups and physical "
14566 #: ../src/guestfs-actions.pod:4152
14567 msgid "guestfs_lvm_set_filter"
14572 #: ../src/guestfs-actions.pod:4154
14576 " guestfs_lvm_set_filter (guestfs_h *g,\n"
14577 " char *const *devices);\n"
14583 #: ../src/guestfs-actions.pod:4158 ../fish/guestfish-actions.pod:2813
14585 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
14586 "block devices in the list C<devices>, and will ignore all other attached "
14592 #: ../src/guestfs-actions.pod:4162 ../fish/guestfish-actions.pod:2817
14594 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
14595 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
14596 "there are two types of duplication possible: either cloned PVs/VGs which "
14597 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
14598 "same name. In normal operation you cannot create this situation, but you "
14599 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
14600 "inside the LVM metadata."
14605 #: ../src/guestfs-actions.pod:4175 ../fish/guestfish-actions.pod:2830
14606 msgid "You can filter whole block devices or individual partitions."
14611 #: ../src/guestfs-actions.pod:4177 ../fish/guestfish-actions.pod:2832
14613 "You cannot use this if any VG is currently in use (eg. contains a mounted "
14614 "filesystem), even if you are not filtering out that VG."
14619 #: ../src/guestfs-actions.pod:4185
14620 msgid "guestfs_lvremove"
14625 #: ../src/guestfs-actions.pod:4187
14629 " guestfs_lvremove (guestfs_h *g,\n"
14630 " const char *device);\n"
14636 #: ../src/guestfs-actions.pod:4191 ../fish/guestfish-actions.pod:2840
14638 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
14639 "LV, such as C</dev/VG/LV>."
14644 #: ../src/guestfs-actions.pod:4194 ../fish/guestfish-actions.pod:2843
14646 "You can also remove all LVs in a volume group by specifying the VG name, C</"
14652 #: ../src/guestfs-actions.pod:4199 ../src/guestfs-actions.pod:5594
14653 #: ../src/guestfs-actions.pod:7409
14654 msgid "(Added in 1.0.13)"
14659 #: ../src/guestfs-actions.pod:4201
14660 msgid "guestfs_lvrename"
14665 #: ../src/guestfs-actions.pod:4203
14669 " guestfs_lvrename (guestfs_h *g,\n"
14670 " const char *logvol,\n"
14671 " const char *newlogvol);\n"
14677 #: ../src/guestfs-actions.pod:4208 ../fish/guestfish-actions.pod:2850
14678 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
14683 #: ../src/guestfs-actions.pod:4212 ../src/guestfs-actions.pod:7422
14684 msgid "(Added in 1.0.83)"
14689 #: ../src/guestfs-actions.pod:4214
14690 msgid "guestfs_lvresize"
14695 #: ../src/guestfs-actions.pod:4216
14699 " guestfs_lvresize (guestfs_h *g,\n"
14700 " const char *device,\n"
14707 #: ../src/guestfs-actions.pod:4221 ../fish/guestfish-actions.pod:2856
14709 "This resizes (expands or shrinks) an existing LVM logical volume to "
14710 "C<mbytes>. When reducing, data in the reduced part is lost."
14715 #: ../src/guestfs-actions.pod:4229
14716 msgid "guestfs_lvresize_free"
14721 #: ../src/guestfs-actions.pod:4231
14725 " guestfs_lvresize_free (guestfs_h *g,\n"
14726 " const char *lv,\n"
14733 #: ../src/guestfs-actions.pod:4236 ../fish/guestfish-actions.pod:2864
14735 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
14736 "remaining free space in the volume group. Commonly you would call this with "
14737 "pc = 100 which expands the logical volume as much as possible, using all "
14738 "remaining free space in the volume group."
14743 #: ../src/guestfs-actions.pod:4244
14744 msgid "(Added in 1.3.3)"
14749 #: ../src/guestfs-actions.pod:4246
14750 msgid "guestfs_lvs"
14755 #: ../src/guestfs-actions.pod:4248
14759 " guestfs_lvs (guestfs_h *g);\n"
14765 #: ../src/guestfs-actions.pod:4251 ../fish/guestfish-actions.pod:2874
14767 "List all the logical volumes detected. This is the equivalent of the L<lvs"
14773 #: ../src/guestfs-actions.pod:4254 ../fish/guestfish-actions.pod:2877
14775 "This returns a list of the logical volume device names (eg. C</dev/"
14776 "VolGroup00/LogVol00>)."
14781 #: ../src/guestfs-actions.pod:4257
14782 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
14787 #: ../src/guestfs-actions.pod:4265
14788 msgid "guestfs_lvs_full"
14793 #: ../src/guestfs-actions.pod:4267
14796 " struct guestfs_lvm_lv_list *\n"
14797 " guestfs_lvs_full (guestfs_h *g);\n"
14803 #: ../src/guestfs-actions.pod:4270 ../fish/guestfish-actions.pod:2886
14805 "List all the logical volumes detected. This is the equivalent of the L<lvs"
14806 "(8)> command. The \"full\" version includes all fields."
14811 #: ../src/guestfs-actions.pod:4273
14813 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
14814 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after use>."
14819 #: ../src/guestfs-actions.pod:4279
14820 msgid "guestfs_lvuuid"
14825 #: ../src/guestfs-actions.pod:4281
14829 " guestfs_lvuuid (guestfs_h *g,\n"
14830 " const char *device);\n"
14836 #: ../src/guestfs-actions.pod:4285 ../fish/guestfish-actions.pod:2893
14837 msgid "This command returns the UUID of the LVM LV C<device>."
14842 #: ../src/guestfs-actions.pod:4292
14843 msgid "guestfs_lxattrlist"
14848 #: ../src/guestfs-actions.pod:4294
14851 " struct guestfs_xattr_list *\n"
14852 " guestfs_lxattrlist (guestfs_h *g,\n"
14853 " const char *path,\n"
14854 " char *const *names);\n"
14860 #: ../src/guestfs-actions.pod:4299 ../fish/guestfish-actions.pod:2899
14862 "This call allows you to get the extended attributes of multiple files, where "
14863 "all files are in the directory C<path>. C<names> is the list of files from "
14869 #: ../src/guestfs-actions.pod:4303 ../fish/guestfish-actions.pod:2903
14871 "On return you get a flat list of xattr structs which must be interpreted "
14872 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
14873 "C<attrval> in this struct is zero-length to indicate there was an error "
14874 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
14875 "number (the number of following attributes for this file, which could be C<"
14876 "\"0\">). Then after the first xattr struct are the zero or more attributes "
14877 "for the first named file. This repeats for the second and subsequent files."
14882 #: ../src/guestfs-actions.pod:4313
14884 "This call is intended for programs that want to efficiently list a directory "
14885 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
14886 "a similarly efficient call for getting standard stats. Very long directory "
14887 "listings might cause the protocol message size to be exceeded, causing this "
14888 "call to fail. The caller must split up such requests into smaller groups of "
14894 #: ../src/guestfs-actions.pod:4327
14895 msgid "guestfs_mkdir"
14900 #: ../src/guestfs-actions.pod:4329
14904 " guestfs_mkdir (guestfs_h *g,\n"
14905 " const char *path);\n"
14911 #: ../src/guestfs-actions.pod:4333 ../fish/guestfish-actions.pod:2925
14912 msgid "Create a directory named C<path>."
14917 #: ../src/guestfs-actions.pod:4339
14918 msgid "guestfs_mkdir_mode"
14923 #: ../src/guestfs-actions.pod:4341
14927 " guestfs_mkdir_mode (guestfs_h *g,\n"
14928 " const char *path,\n"
14935 #: ../src/guestfs-actions.pod:4346 ../fish/guestfish-actions.pod:2931
14937 "This command creates a directory, setting the initial permissions of the "
14938 "directory to C<mode>."
14943 #: ../src/guestfs-actions.pod:4349 ../fish/guestfish-actions.pod:2934
14945 "For common Linux filesystems, the actual mode which is set will be C<mode & "
14946 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
14952 #: ../src/guestfs-actions.pod:4353
14953 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
14958 #: ../src/guestfs-actions.pod:4359
14959 msgid "guestfs_mkdir_p"
14964 #: ../src/guestfs-actions.pod:4361
14968 " guestfs_mkdir_p (guestfs_h *g,\n"
14969 " const char *path);\n"
14975 #: ../src/guestfs-actions.pod:4365 ../fish/guestfish-actions.pod:2944
14977 "Create a directory named C<path>, creating any parent directories as "
14978 "necessary. This is like the C<mkdir -p> shell command."
14983 #: ../src/guestfs-actions.pod:4372
14984 msgid "guestfs_mkdtemp"
14989 #: ../src/guestfs-actions.pod:4374
14993 " guestfs_mkdtemp (guestfs_h *g,\n"
14994 " const char *template);\n"
15000 #: ../src/guestfs-actions.pod:4378 ../fish/guestfish-actions.pod:2951
15002 "This command creates a temporary directory. The C<template> parameter "
15003 "should be a full pathname for the temporary directory name with the final "
15004 "six characters being \"XXXXXX\"."
15009 #: ../src/guestfs-actions.pod:4383 ../fish/guestfish-actions.pod:2956
15011 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
15012 "being suitable for Windows filesystems."
15017 #: ../src/guestfs-actions.pod:4386 ../fish/guestfish-actions.pod:2959
15018 msgid "The name of the temporary directory that was created is returned."
15023 #: ../src/guestfs-actions.pod:4389 ../fish/guestfish-actions.pod:2962
15024 msgid "The temporary directory is created with mode 0700 and is owned by root."
15029 #: ../src/guestfs-actions.pod:4392 ../fish/guestfish-actions.pod:2965
15031 "The caller is responsible for deleting the temporary directory and its "
15032 "contents after use."
15037 #: ../src/guestfs-actions.pod:4395 ../fish/guestfish-actions.pod:2968
15038 msgid "See also: L<mkdtemp(3)>"
15043 #: ../src/guestfs-actions.pod:4402
15044 msgid "guestfs_mke2fs_J"
15049 #: ../src/guestfs-actions.pod:4404
15053 " guestfs_mke2fs_J (guestfs_h *g,\n"
15054 " const char *fstype,\n"
15055 " int blocksize,\n"
15056 " const char *device,\n"
15057 " const char *journal);\n"
15063 #: ../src/guestfs-actions.pod:4411 ../fish/guestfish-actions.pod:2974
15065 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
15066 "C<journal>. It is equivalent to the command:"
15071 #: ../src/guestfs-actions.pod:4415 ../fish/guestfish-actions.pod:2978
15074 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
15080 #: ../src/guestfs-actions.pod:4417
15081 msgid "See also C<guestfs_mke2journal>."
15086 #: ../src/guestfs-actions.pod:4421 ../src/guestfs-actions.pod:4439
15087 #: ../src/guestfs-actions.pod:4457 ../src/guestfs-actions.pod:4473
15088 #: ../src/guestfs-actions.pod:4487 ../src/guestfs-actions.pod:4501
15089 #: ../src/guestfs-actions.pod:4560 ../src/guestfs-actions.pod:4837
15090 msgid "(Added in 1.0.68)"
15095 #: ../src/guestfs-actions.pod:4423
15096 msgid "guestfs_mke2fs_JL"
15101 #: ../src/guestfs-actions.pod:4425
15105 " guestfs_mke2fs_JL (guestfs_h *g,\n"
15106 " const char *fstype,\n"
15107 " int blocksize,\n"
15108 " const char *device,\n"
15109 " const char *label);\n"
15115 #: ../src/guestfs-actions.pod:4432 ../fish/guestfish-actions.pod:2986
15117 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
15118 "the journal labeled C<label>."
15123 #: ../src/guestfs-actions.pod:4435
15124 msgid "See also C<guestfs_mke2journal_L>."
15129 #: ../src/guestfs-actions.pod:4441
15130 msgid "guestfs_mke2fs_JU"
15135 #: ../src/guestfs-actions.pod:4443
15139 " guestfs_mke2fs_JU (guestfs_h *g,\n"
15140 " const char *fstype,\n"
15141 " int blocksize,\n"
15142 " const char *device,\n"
15143 " const char *uuid);\n"
15149 #: ../src/guestfs-actions.pod:4450 ../fish/guestfish-actions.pod:2995
15151 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
15152 "the journal with UUID C<uuid>."
15157 #: ../src/guestfs-actions.pod:4453
15158 msgid "See also C<guestfs_mke2journal_U>."
15163 #: ../src/guestfs-actions.pod:4459
15164 msgid "guestfs_mke2journal"
15169 #: ../src/guestfs-actions.pod:4461
15173 " guestfs_mke2journal (guestfs_h *g,\n"
15174 " int blocksize,\n"
15175 " const char *device);\n"
15181 #: ../src/guestfs-actions.pod:4466 ../fish/guestfish-actions.pod:3004
15183 "This creates an ext2 external journal on C<device>. It is equivalent to the "
15189 #: ../src/guestfs-actions.pod:4469 ../fish/guestfish-actions.pod:3007
15192 " mke2fs -O journal_dev -b blocksize device\n"
15198 #: ../src/guestfs-actions.pod:4475
15199 msgid "guestfs_mke2journal_L"
15204 #: ../src/guestfs-actions.pod:4477
15208 " guestfs_mke2journal_L (guestfs_h *g,\n"
15209 " int blocksize,\n"
15210 " const char *label,\n"
15211 " const char *device);\n"
15217 #: ../src/guestfs-actions.pod:4483 ../fish/guestfish-actions.pod:3013
15218 msgid "This creates an ext2 external journal on C<device> with label C<label>."
15223 #: ../src/guestfs-actions.pod:4489
15224 msgid "guestfs_mke2journal_U"
15229 #: ../src/guestfs-actions.pod:4491
15233 " guestfs_mke2journal_U (guestfs_h *g,\n"
15234 " int blocksize,\n"
15235 " const char *uuid,\n"
15236 " const char *device);\n"
15242 #: ../src/guestfs-actions.pod:4497 ../fish/guestfish-actions.pod:3019
15243 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
15248 #: ../src/guestfs-actions.pod:4503
15249 msgid "guestfs_mkfifo"
15254 #: ../src/guestfs-actions.pod:4505
15258 " guestfs_mkfifo (guestfs_h *g,\n"
15260 " const char *path);\n"
15266 #: ../src/guestfs-actions.pod:4510
15268 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
15269 "is just a convenient wrapper around C<guestfs_mknod>."
15274 #: ../src/guestfs-actions.pod:4520
15275 msgid "guestfs_mkfs"
15280 #: ../src/guestfs-actions.pod:4522
15284 " guestfs_mkfs (guestfs_h *g,\n"
15285 " const char *fstype,\n"
15286 " const char *device);\n"
15292 #: ../src/guestfs-actions.pod:4527 ../fish/guestfish-actions.pod:3035
15294 "This creates a filesystem on C<device> (usually a partition or LVM logical "
15295 "volume). The filesystem type is C<fstype>, for example C<ext3>."
15300 #: ../src/guestfs-actions.pod:4535
15301 msgid "guestfs_mkfs_b"
15306 #: ../src/guestfs-actions.pod:4537
15310 " guestfs_mkfs_b (guestfs_h *g,\n"
15311 " const char *fstype,\n"
15312 " int blocksize,\n"
15313 " const char *device);\n"
15319 #: ../src/guestfs-actions.pod:4543
15321 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
15322 "block size of the resulting filesystem. Supported block sizes depend on the "
15323 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
15328 #: ../src/guestfs-actions.pod:4548 ../src/guestfs-actions.pod:4593
15329 #: ../fish/guestfish-actions.pod:3048 ../fish/guestfish-actions.pod:3075
15331 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
15337 #: ../src/guestfs-actions.pod:4553 ../fish/guestfish-actions.pod:3051
15339 "This function is deprecated. In new code, use the C<mkfs_opts> call instead."
15344 #: ../src/guestfs-actions.pod:4562
15345 msgid "guestfs_mkfs_opts"
15350 #: ../src/guestfs-actions.pod:4564
15354 " guestfs_mkfs_opts (guestfs_h *g,\n"
15355 " const char *fstype,\n"
15356 " const char *device,\n"
15362 #: ../src/guestfs-actions.pod:4575
15365 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
15366 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
15367 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
15368 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
15374 #: ../src/guestfs-actions.pod:4580 ../fish/guestfish-actions.pod:3062
15376 "This function creates a filesystem on C<device>. The filesystem type is "
15377 "C<fstype>, for example C<ext3>."
15382 #: ../src/guestfs-actions.pod:4587 ../fish/guestfish-actions.pod:3069
15383 msgid "C<blocksize>"
15388 #: ../src/guestfs-actions.pod:4589 ../fish/guestfish-actions.pod:3071
15390 "The filesystem block size. Supported block sizes depend on the filesystem "
15391 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
15396 #: ../src/guestfs-actions.pod:4596 ../fish/guestfish-actions.pod:3078
15397 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
15401 #: ../src/guestfs-actions.pod:4598 ../fish/guestfish-actions.pod:3080
15402 msgid "C<features>"
15406 #: ../src/guestfs-actions.pod:4600 ../fish/guestfish-actions.pod:3082
15407 msgid "This passes the I<-O> parameter to the external mkfs program."
15411 #: ../src/guestfs-actions.pod:4602 ../fish/guestfish-actions.pod:3084
15413 "For certain filesystem types, this allows extra filesystem features to be "
15414 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
15418 #: ../src/guestfs-actions.pod:4606 ../fish/guestfish-actions.pod:3088
15420 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
15425 #: ../src/guestfs-actions.pod:4609 ../fish/guestfish-actions.pod:3091
15430 #: ../src/guestfs-actions.pod:4611 ../fish/guestfish-actions.pod:3093
15432 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
15433 "sets the inode size (only for ext2/3/4 filesystems at present)."
15437 #: ../src/guestfs-actions.pod:4614 ../fish/guestfish-actions.pod:3096
15438 msgid "C<sectorsize>"
15442 #: ../src/guestfs-actions.pod:4616 ../fish/guestfish-actions.pod:3098
15444 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
15445 "sets sector size for ufs filesystem."
15449 #: ../src/guestfs-actions.pod:4623
15450 msgid "(Added in 1.7.19)"
15455 #: ../src/guestfs-actions.pod:4625
15456 msgid "guestfs_mkfs_opts_va"
15461 #: ../src/guestfs-actions.pod:4627
15465 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
15466 " const char *fstype,\n"
15467 " const char *device,\n"
15468 " va_list args);\n"
15474 #: ../src/guestfs-actions.pod:4633
15475 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
15480 #: ../src/guestfs-actions.pod:4637
15481 msgid "guestfs_mkfs_opts_argv"
15486 #: ../src/guestfs-actions.pod:4639
15490 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
15491 " const char *fstype,\n"
15492 " const char *device,\n"
15493 " const struct guestfs_mkfs_opts_argv *optargs);\n"
15499 #: ../src/guestfs-actions.pod:4645
15500 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
15505 #: ../src/guestfs-actions.pod:4649
15506 msgid "guestfs_mkmountpoint"
15511 #: ../src/guestfs-actions.pod:4651
15515 " guestfs_mkmountpoint (guestfs_h *g,\n"
15516 " const char *exemptpath);\n"
15522 #: ../src/guestfs-actions.pod:4655
15524 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
15525 "that can be used to create extra mountpoints before mounting the first "
15531 #: ../src/guestfs-actions.pod:4659 ../fish/guestfish-actions.pod:3113
15533 "These calls are I<only> necessary in some very limited circumstances, mainly "
15534 "the case where you want to mount a mix of unrelated and/or read-only "
15535 "filesystems together."
15540 #: ../src/guestfs-actions.pod:4663 ../fish/guestfish-actions.pod:3117
15542 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
15543 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
15544 "inside that. You can unpack this as follows in guestfish:"
15549 #: ../src/guestfs-actions.pod:4668 ../fish/guestfish-actions.pod:3122
15552 " add-ro Fedora-11-i686-Live.iso\n"
15554 " mkmountpoint /cd\n"
15555 " mkmountpoint /sqsh\n"
15556 " mkmountpoint /ext3fs\n"
15557 " mount /dev/sda /cd\n"
15558 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
15559 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
15565 #: ../src/guestfs-actions.pod:4677 ../fish/guestfish-actions.pod:3131
15566 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
15571 #: ../src/guestfs-actions.pod:4679
15573 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
15574 "may get unexpected errors if you try to mix these calls. It is safest to "
15575 "manually unmount filesystems and remove mountpoints after use."
15580 #: ../src/guestfs-actions.pod:4683
15582 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
15583 "first, so for this to work for manual mountpoints, you must ensure that the "
15584 "innermost mountpoints have the longest pathnames, as in the example code "
15590 #: ../src/guestfs-actions.pod:4688 ../fish/guestfish-actions.pod:3142
15592 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
15596 #: ../src/guestfs-actions.pod:4690
15598 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
15599 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
15600 "can also trigger these issues."
15605 #: ../src/guestfs-actions.pod:4696 ../src/guestfs-actions.pod:5012
15606 #: ../src/guestfs-actions.pod:6014
15607 msgid "(Added in 1.0.62)"
15612 #: ../src/guestfs-actions.pod:4698
15613 msgid "guestfs_mknod"
15618 #: ../src/guestfs-actions.pod:4700
15622 " guestfs_mknod (guestfs_h *g,\n"
15626 " const char *path);\n"
15632 #: ../src/guestfs-actions.pod:4707 ../fish/guestfish-actions.pod:3152
15634 "This call creates block or character special devices, or named pipes (FIFOs)."
15639 #: ../src/guestfs-actions.pod:4710 ../fish/guestfish-actions.pod:3155
15641 "The C<mode> parameter should be the mode, using the standard constants. "
15642 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
15643 "used when creating block and character special devices."
15648 #: ../src/guestfs-actions.pod:4715
15650 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
15651 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
15652 "regular file). These constants are available in the standard Linux header "
15653 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
15654 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
15655 "the appropriate constant for you."
15660 #: ../src/guestfs-actions.pod:4729
15661 msgid "guestfs_mknod_b"
15666 #: ../src/guestfs-actions.pod:4731
15670 " guestfs_mknod_b (guestfs_h *g,\n"
15674 " const char *path);\n"
15680 #: ../src/guestfs-actions.pod:4738
15682 "This call creates a block device node called C<path> with mode C<mode> and "
15683 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
15684 "wrapper around C<guestfs_mknod>."
15689 #: ../src/guestfs-actions.pod:4748
15690 msgid "guestfs_mknod_c"
15695 #: ../src/guestfs-actions.pod:4750
15699 " guestfs_mknod_c (guestfs_h *g,\n"
15703 " const char *path);\n"
15709 #: ../src/guestfs-actions.pod:4757
15711 "This call creates a char device node called C<path> with mode C<mode> and "
15712 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
15713 "wrapper around C<guestfs_mknod>."
15718 #: ../src/guestfs-actions.pod:4767
15719 msgid "guestfs_mkswap"
15724 #: ../src/guestfs-actions.pod:4769
15728 " guestfs_mkswap (guestfs_h *g,\n"
15729 " const char *device);\n"
15735 #: ../src/guestfs-actions.pod:4773 ../fish/guestfish-actions.pod:3194
15736 msgid "Create a swap partition on C<device>."
15741 #: ../src/guestfs-actions.pod:4779
15742 msgid "guestfs_mkswap_L"
15747 #: ../src/guestfs-actions.pod:4781
15751 " guestfs_mkswap_L (guestfs_h *g,\n"
15752 " const char *label,\n"
15753 " const char *device);\n"
15759 #: ../src/guestfs-actions.pod:4786 ../fish/guestfish-actions.pod:3200
15760 msgid "Create a swap partition on C<device> with label C<label>."
15765 #: ../src/guestfs-actions.pod:4788 ../fish/guestfish-actions.pod:3202
15767 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
15768 "sda>), just to a partition. This appears to be a limitation of the kernel "
15774 #: ../src/guestfs-actions.pod:4796
15775 msgid "guestfs_mkswap_U"
15780 #: ../src/guestfs-actions.pod:4798
15784 " guestfs_mkswap_U (guestfs_h *g,\n"
15785 " const char *uuid,\n"
15786 " const char *device);\n"
15792 #: ../src/guestfs-actions.pod:4803 ../fish/guestfish-actions.pod:3210
15793 msgid "Create a swap partition on C<device> with UUID C<uuid>."
15798 #: ../src/guestfs-actions.pod:4809
15799 msgid "guestfs_mkswap_file"
15804 #: ../src/guestfs-actions.pod:4811
15808 " guestfs_mkswap_file (guestfs_h *g,\n"
15809 " const char *path);\n"
15815 #: ../src/guestfs-actions.pod:4815 ../fish/guestfish-actions.pod:3216
15816 msgid "Create a swap file."
15821 #: ../src/guestfs-actions.pod:4817
15823 "This command just writes a swap file signature to an existing file. To "
15824 "create the file itself, use something like C<guestfs_fallocate>."
15829 #: ../src/guestfs-actions.pod:4824
15830 msgid "guestfs_modprobe"
15835 #: ../src/guestfs-actions.pod:4826
15839 " guestfs_modprobe (guestfs_h *g,\n"
15840 " const char *modulename);\n"
15846 #: ../src/guestfs-actions.pod:4830 ../fish/guestfish-actions.pod:3225
15847 msgid "This loads a kernel module in the appliance."
15852 #: ../src/guestfs-actions.pod:4832 ../fish/guestfish-actions.pod:3227
15854 "The kernel module must have been whitelisted when libguestfs was built (see "
15855 "C<appliance/kmod.whitelist.in> in the source)."
15860 #: ../src/guestfs-actions.pod:4839
15861 msgid "guestfs_mount"
15866 #: ../src/guestfs-actions.pod:4841
15870 " guestfs_mount (guestfs_h *g,\n"
15871 " const char *device,\n"
15872 " const char *mountpoint);\n"
15878 #: ../src/guestfs-actions.pod:4846 ../fish/guestfish-actions.pod:3234
15880 "Mount a guest disk at a position in the filesystem. Block devices are named "
15881 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
15882 "those block devices contain partitions, they will have the usual names (eg. "
15883 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
15888 #: ../src/guestfs-actions.pod:4852 ../fish/guestfish-actions.pod:3240
15890 "The rules are the same as for L<mount(2)>: A filesystem must first be "
15891 "mounted on C</> before others can be mounted. Other filesystems can only be "
15892 "mounted on directories which already exist."
15897 #: ../src/guestfs-actions.pod:4857 ../fish/guestfish-actions.pod:3245
15899 "The mounted filesystem is writable, if we have sufficient permissions on the "
15900 "underlying device."
15905 #: ../src/guestfs-actions.pod:4860
15907 "B<Important note:> When you use this call, the filesystem options C<sync> "
15908 "and C<noatime> are set implicitly. This was originally done because we "
15909 "thought it would improve reliability, but it turns out that I<-o sync> has a "
15910 "very large negative performance impact and negligible effect on "
15911 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
15912 "in any code that needs performance, and instead use C<guestfs_mount_options> "
15913 "(use an empty string for the first parameter if you don't want any options)."
15917 #: ../src/guestfs-actions.pod:4872 ../fish/guestfish-actions.pod:3258
15919 "This function is deprecated. In new code, use the C<mount_options> call "
15924 #: ../src/guestfs-actions.pod:4881
15925 msgid "guestfs_mount_9p"
15929 #: ../src/guestfs-actions.pod:4883
15933 " guestfs_mount_9p (guestfs_h *g,\n"
15934 " const char *mounttag,\n"
15935 " const char *mountpoint,\n"
15941 #: ../src/guestfs-actions.pod:4894
15944 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
15949 #: ../src/guestfs-actions.pod:4896 ../fish/guestfish-actions.pod:3269
15951 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
15956 #: ../src/guestfs-actions.pod:4899 ../fish/guestfish-actions.pod:3272
15958 "If required, C<trans=virtio> will be automatically added to the options. "
15959 "Any other options required can be passed in the optional C<options> "
15964 #: ../src/guestfs-actions.pod:4907
15965 msgid "guestfs_mount_9p_va"
15969 #: ../src/guestfs-actions.pod:4909
15973 " guestfs_mount_9p_va (guestfs_h *g,\n"
15974 " const char *mounttag,\n"
15975 " const char *mountpoint,\n"
15976 " va_list args);\n"
15981 #: ../src/guestfs-actions.pod:4915
15982 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
15986 #: ../src/guestfs-actions.pod:4919
15987 msgid "guestfs_mount_9p_argv"
15991 #: ../src/guestfs-actions.pod:4921
15995 " guestfs_mount_9p_argv (guestfs_h *g,\n"
15996 " const char *mounttag,\n"
15997 " const char *mountpoint,\n"
15998 " const struct guestfs_mount_9p_argv *optargs);\n"
16003 #: ../src/guestfs-actions.pod:4927
16004 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
16009 #: ../src/guestfs-actions.pod:4931
16010 msgid "guestfs_mount_loop"
16015 #: ../src/guestfs-actions.pod:4933
16019 " guestfs_mount_loop (guestfs_h *g,\n"
16020 " const char *file,\n"
16021 " const char *mountpoint);\n"
16027 #: ../src/guestfs-actions.pod:4938 ../fish/guestfish-actions.pod:3282
16029 "This command lets you mount C<file> (a filesystem image in a file) on a "
16030 "mount point. It is entirely equivalent to the command C<mount -o loop file "
16036 #: ../src/guestfs-actions.pod:4946
16037 msgid "guestfs_mount_options"
16042 #: ../src/guestfs-actions.pod:4948
16046 " guestfs_mount_options (guestfs_h *g,\n"
16047 " const char *options,\n"
16048 " const char *device,\n"
16049 " const char *mountpoint);\n"
16055 #: ../src/guestfs-actions.pod:4954
16057 "This is the same as the C<guestfs_mount> command, but it allows you to set "
16058 "the mount options as for the L<mount(8)> I<-o> flag."
16063 #: ../src/guestfs-actions.pod:4958 ../fish/guestfish-actions.pod:3294
16065 "If the C<options> parameter is an empty string, then no options are passed "
16066 "(all options default to whatever the filesystem uses)."
16071 #: ../src/guestfs-actions.pod:4964 ../src/guestfs-actions.pod:4978
16072 #: ../src/guestfs-actions.pod:4995
16073 msgid "(Added in 1.0.10)"
16078 #: ../src/guestfs-actions.pod:4966
16079 msgid "guestfs_mount_ro"
16084 #: ../src/guestfs-actions.pod:4968
16088 " guestfs_mount_ro (guestfs_h *g,\n"
16089 " const char *device,\n"
16090 " const char *mountpoint);\n"
16096 #: ../src/guestfs-actions.pod:4973
16098 "This is the same as the C<guestfs_mount> command, but it mounts the "
16099 "filesystem with the read-only (I<-o ro>) flag."
16104 #: ../src/guestfs-actions.pod:4980
16105 msgid "guestfs_mount_vfs"
16110 #: ../src/guestfs-actions.pod:4982
16114 " guestfs_mount_vfs (guestfs_h *g,\n"
16115 " const char *options,\n"
16116 " const char *vfstype,\n"
16117 " const char *device,\n"
16118 " const char *mountpoint);\n"
16124 #: ../src/guestfs-actions.pod:4989
16126 "This is the same as the C<guestfs_mount> command, but it allows you to set "
16127 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
16133 #: ../src/guestfs-actions.pod:4997
16134 msgid "guestfs_mountpoints"
16139 #: ../src/guestfs-actions.pod:4999
16143 " guestfs_mountpoints (guestfs_h *g);\n"
16149 #: ../src/guestfs-actions.pod:5002
16151 "This call is similar to C<guestfs_mounts>. That call returns a list of "
16152 "devices. This one returns a hash table (map) of device name to directory "
16153 "where the device is mounted."
16158 #: ../src/guestfs-actions.pod:5014
16159 msgid "guestfs_mounts"
16164 #: ../src/guestfs-actions.pod:5016
16168 " guestfs_mounts (guestfs_h *g);\n"
16174 #: ../src/guestfs-actions.pod:5019 ../fish/guestfish-actions.pod:3325
16176 "This returns the list of currently mounted filesystems. It returns the list "
16177 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
16182 #: ../src/guestfs-actions.pod:5022 ../fish/guestfish-actions.pod:3328
16183 msgid "Some internal mounts are not shown."
16188 #: ../src/guestfs-actions.pod:5024
16189 msgid "See also: C<guestfs_mountpoints>"
16194 #: ../src/guestfs-actions.pod:5032
16200 #: ../src/guestfs-actions.pod:5034
16204 " guestfs_mv (guestfs_h *g,\n"
16205 " const char *src,\n"
16206 " const char *dest);\n"
16212 #: ../src/guestfs-actions.pod:5039 ../fish/guestfish-actions.pod:3336
16214 "This moves a file from C<src> to C<dest> where C<dest> is either a "
16215 "destination filename or destination directory."
16220 #: ../src/guestfs-actions.pod:5046
16221 msgid "guestfs_ntfs_3g_probe"
16226 #: ../src/guestfs-actions.pod:5048
16230 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
16232 " const char *device);\n"
16238 #: ../src/guestfs-actions.pod:5053 ../fish/guestfish-actions.pod:3343
16240 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
16241 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
16242 "write, and some cannot be mounted at all)."
16247 #: ../src/guestfs-actions.pod:5057 ../fish/guestfish-actions.pod:3347
16249 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
16250 "can be mounted read-write. Set it to false if you want to test if the "
16251 "volume can be mounted read-only."
16256 #: ../src/guestfs-actions.pod:5061 ../fish/guestfish-actions.pod:3351
16258 "The return value is an integer which C<0> if the operation would succeed, or "
16259 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
16264 #: ../src/guestfs-actions.pod:5067
16265 msgid "(Added in 1.0.43)"
16270 #: ../src/guestfs-actions.pod:5069
16271 msgid "guestfs_ntfsresize"
16276 #: ../src/guestfs-actions.pod:5071
16280 " guestfs_ntfsresize (guestfs_h *g,\n"
16281 " const char *device);\n"
16286 #: ../src/guestfs-actions.pod:5075 ../src/guestfs-actions.pod:5114
16287 #: ../fish/guestfish-actions.pod:3359 ../fish/guestfish-actions.pod:3383
16289 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
16290 "size of the underlying device."
16294 #: ../src/guestfs-actions.pod:5078 ../fish/guestfish-actions.pod:3362
16296 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
16297 "consistency check (for safety). You have to boot into Windows to perform "
16298 "this check and clear this condition. Furthermore, ntfsresize refuses to "
16299 "resize filesystems which have been marked in this way. So in effect it is "
16300 "not possible to call ntfsresize multiple times on a single filesystem "
16301 "without booting into Windows between each resize."
16305 #: ../src/guestfs-actions.pod:5086 ../src/guestfs-actions.pod:5140
16306 #: ../fish/guestfish-actions.pod:3370 ../fish/guestfish-actions.pod:3409
16307 msgid "See also L<ntfsresize(8)>."
16311 #: ../src/guestfs-actions.pod:5090 ../src/guestfs-actions.pod:5178
16312 #: ../fish/guestfish-actions.pod:3372 ../fish/guestfish-actions.pod:3420
16314 "This function is deprecated. In new code, use the C<ntfsresize_opts> call "
16319 #: ../src/guestfs-actions.pod:5099
16320 msgid "guestfs_ntfsresize_opts"
16324 #: ../src/guestfs-actions.pod:5101
16328 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
16329 " const char *device,\n"
16335 #: ../src/guestfs-actions.pod:5111
16338 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
16339 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
16344 #: ../src/guestfs-actions.pod:5117 ../fish/guestfish-actions.pod:3386
16345 msgid "The optional parameters are:"
16349 #: ../src/guestfs-actions.pod:5121 ../fish/guestfish-actions.pod:3390
16354 #: ../src/guestfs-actions.pod:5123 ../fish/guestfish-actions.pod:3392
16356 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
16357 "resized to fit the container (eg. partition)."
16361 #: ../src/guestfs-actions.pod:5126 ../fish/guestfish-actions.pod:3395
16366 #: ../src/guestfs-actions.pod:5128 ../fish/guestfish-actions.pod:3397
16368 "If this option is true, then force the resize of the filesystem even if the "
16369 "filesystem is marked as requiring a consistency check."
16373 #: ../src/guestfs-actions.pod:5131
16375 "After the resize operation, the filesystem is always marked as requiring a "
16376 "consistency check (for safety). You have to boot into Windows to perform "
16377 "this check and clear this condition. If you I<don't> set the C<force> "
16378 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
16379 "times on a single filesystem without booting into Windows between each "
16384 #: ../src/guestfs-actions.pod:5144
16385 msgid "guestfs_ntfsresize_opts_va"
16389 #: ../src/guestfs-actions.pod:5146
16393 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
16394 " const char *device,\n"
16395 " va_list args);\n"
16400 #: ../src/guestfs-actions.pod:5151
16401 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
16405 #: ../src/guestfs-actions.pod:5155
16406 msgid "guestfs_ntfsresize_opts_argv"
16410 #: ../src/guestfs-actions.pod:5157
16414 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
16415 " const char *device,\n"
16416 " const struct guestfs_ntfsresize_opts_argv *optargs);\n"
16421 #: ../src/guestfs-actions.pod:5162
16422 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
16427 #: ../src/guestfs-actions.pod:5166
16428 msgid "guestfs_ntfsresize_size"
16433 #: ../src/guestfs-actions.pod:5168
16437 " guestfs_ntfsresize_size (guestfs_h *g,\n"
16438 " const char *device,\n"
16439 " int64_t size);\n"
16445 #: ../src/guestfs-actions.pod:5173
16447 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
16448 "to specify the new size (in bytes) explicitly."
16453 #: ../src/guestfs-actions.pod:5185 ../src/guestfs-actions.pod:5621
16454 #: ../src/guestfs-actions.pod:5694 ../src/guestfs-actions.pod:5962
16455 #: ../src/guestfs-actions.pod:7564
16456 msgid "(Added in 1.3.14)"
16461 #: ../src/guestfs-actions.pod:5187
16462 msgid "guestfs_part_add"
16467 #: ../src/guestfs-actions.pod:5189
16471 " guestfs_part_add (guestfs_h *g,\n"
16472 " const char *device,\n"
16473 " const char *prlogex,\n"
16474 " int64_t startsect,\n"
16475 " int64_t endsect);\n"
16481 #: ../src/guestfs-actions.pod:5196
16483 "This command adds a partition to C<device>. If there is no partition table "
16484 "on the device, call C<guestfs_part_init> first."
16489 #: ../src/guestfs-actions.pod:5199 ../fish/guestfish-actions.pod:3434
16491 "The C<prlogex> parameter is the type of partition. Normally you should pass "
16492 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
16493 "C<logical>) and C<e> (or C<extended>) partition types."
16498 #: ../src/guestfs-actions.pod:5204 ../fish/guestfish-actions.pod:3439
16500 "C<startsect> and C<endsect> are the start and end of the partition in "
16501 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
16502 "from the end of the disk (C<-1> is the last sector)."
16507 #: ../src/guestfs-actions.pod:5208
16509 "Creating a partition which covers the whole disk is not so easy. Use "
16510 "C<guestfs_part_disk> to do that."
16515 #: ../src/guestfs-actions.pod:5213 ../src/guestfs-actions.pod:5251
16516 #: ../src/guestfs-actions.pod:5304 ../src/guestfs-actions.pod:5382
16517 #: ../src/guestfs-actions.pod:5420 ../src/guestfs-actions.pod:5439
16518 #: ../src/guestfs-actions.pod:5479
16519 msgid "(Added in 1.0.78)"
16524 #: ../src/guestfs-actions.pod:5215
16525 msgid "guestfs_part_del"
16530 #: ../src/guestfs-actions.pod:5217
16534 " guestfs_part_del (guestfs_h *g,\n"
16535 " const char *device,\n"
16542 #: ../src/guestfs-actions.pod:5222 ../fish/guestfish-actions.pod:3450
16543 msgid "This command deletes the partition numbered C<partnum> on C<device>."
16548 #: ../src/guestfs-actions.pod:5224 ../fish/guestfish-actions.pod:3452
16550 "Note that in the case of MBR partitioning, deleting an extended partition "
16551 "also deletes any logical partitions it contains."
16556 #: ../src/guestfs-actions.pod:5232
16557 msgid "guestfs_part_disk"
16562 #: ../src/guestfs-actions.pod:5234
16566 " guestfs_part_disk (guestfs_h *g,\n"
16567 " const char *device,\n"
16568 " const char *parttype);\n"
16574 #: ../src/guestfs-actions.pod:5239
16576 "This command is simply a combination of C<guestfs_part_init> followed by "
16577 "C<guestfs_part_add> to create a single primary partition covering the whole "
16583 #: ../src/guestfs-actions.pod:5243
16585 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
16586 "possible values are described in C<guestfs_part_init>."
16591 #: ../src/guestfs-actions.pod:5253
16592 msgid "guestfs_part_get_bootable"
16597 #: ../src/guestfs-actions.pod:5255
16601 " guestfs_part_get_bootable (guestfs_h *g,\n"
16602 " const char *device,\n"
16609 #: ../src/guestfs-actions.pod:5260 ../fish/guestfish-actions.pod:3474
16611 "This command returns true if the partition C<partnum> on C<device> has the "
16612 "bootable flag set."
16617 #: ../src/guestfs-actions.pod:5263
16618 msgid "See also C<guestfs_part_set_bootable>."
16623 #: ../src/guestfs-actions.pod:5269
16624 msgid "guestfs_part_get_mbr_id"
16629 #: ../src/guestfs-actions.pod:5271
16633 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
16634 " const char *device,\n"
16641 #: ../src/guestfs-actions.pod:5276 ../fish/guestfish-actions.pod:3483
16643 "Returns the MBR type byte (also known as the ID byte) from the numbered "
16644 "partition C<partnum>."
16649 #: ../src/guestfs-actions.pod:5279 ../src/guestfs-actions.pod:5455
16651 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
16652 "undefined results for other partition table types (see "
16653 "C<guestfs_part_get_parttype>)."
16658 #: ../src/guestfs-actions.pod:5287
16659 msgid "guestfs_part_get_parttype"
16664 #: ../src/guestfs-actions.pod:5289
16668 " guestfs_part_get_parttype (guestfs_h *g,\n"
16669 " const char *device);\n"
16675 #: ../src/guestfs-actions.pod:5293 ../fish/guestfish-actions.pod:3494
16677 "This command examines the partition table on C<device> and returns the "
16678 "partition table type (format) being used."
16683 #: ../src/guestfs-actions.pod:5296
16685 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
16686 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
16687 "possible, although unusual. See C<guestfs_part_init> for a full list."
16692 #: ../src/guestfs-actions.pod:5306
16693 msgid "guestfs_part_init"
16698 #: ../src/guestfs-actions.pod:5308
16702 " guestfs_part_init (guestfs_h *g,\n"
16703 " const char *device,\n"
16704 " const char *parttype);\n"
16710 #: ../src/guestfs-actions.pod:5313 ../fish/guestfish-actions.pod:3506
16712 "This creates an empty partition table on C<device> of one of the partition "
16713 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
16714 "(for large disks)."
16719 #: ../src/guestfs-actions.pod:5317
16721 "Initially there are no partitions. Following this, you should call "
16722 "C<guestfs_part_add> for each partition required."
16727 #: ../src/guestfs-actions.pod:5320 ../fish/guestfish-actions.pod:3513
16728 msgid "Possible values for C<parttype> are:"
16733 #: ../src/guestfs-actions.pod:5324 ../fish/guestfish-actions.pod:3517
16734 msgid "B<efi> | B<gpt>"
16739 #: ../src/guestfs-actions.pod:5326 ../fish/guestfish-actions.pod:3519
16740 msgid "Intel EFI / GPT partition table."
16745 #: ../src/guestfs-actions.pod:5328 ../fish/guestfish-actions.pod:3521
16747 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
16748 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
16749 "the C<mbr> format."
16754 #: ../src/guestfs-actions.pod:5332 ../fish/guestfish-actions.pod:3525
16755 msgid "B<mbr> | B<msdos>"
16760 #: ../src/guestfs-actions.pod:5334 ../fish/guestfish-actions.pod:3527
16762 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
16763 "Windows. This partition type will B<only> work for device sizes up to 2 "
16764 "TB. For large disks we recommend using C<gpt>."
16769 #: ../src/guestfs-actions.pod:5341 ../fish/guestfish-actions.pod:3534
16771 "Other partition table types that may work but are not supported include:"
16776 #: ../src/guestfs-actions.pod:5346 ../fish/guestfish-actions.pod:3539
16782 #: ../src/guestfs-actions.pod:5348 ../fish/guestfish-actions.pod:3541
16783 msgid "AIX disk labels."
16788 #: ../src/guestfs-actions.pod:5350 ../fish/guestfish-actions.pod:3543
16789 msgid "B<amiga> | B<rdb>"
16794 #: ../src/guestfs-actions.pod:5352 ../fish/guestfish-actions.pod:3545
16795 msgid "Amiga \"Rigid Disk Block\" format."
16800 #: ../src/guestfs-actions.pod:5354 ../fish/guestfish-actions.pod:3547
16806 #: ../src/guestfs-actions.pod:5356 ../fish/guestfish-actions.pod:3549
16807 msgid "BSD disk labels."
16812 #: ../src/guestfs-actions.pod:5358 ../fish/guestfish-actions.pod:3551
16818 #: ../src/guestfs-actions.pod:5360 ../fish/guestfish-actions.pod:3553
16819 msgid "DASD, used on IBM mainframes."
16824 #: ../src/guestfs-actions.pod:5362 ../fish/guestfish-actions.pod:3555
16830 #: ../src/guestfs-actions.pod:5364 ../fish/guestfish-actions.pod:3557
16831 msgid "MIPS/SGI volumes."
16836 #: ../src/guestfs-actions.pod:5366 ../fish/guestfish-actions.pod:3559
16842 #: ../src/guestfs-actions.pod:5368 ../fish/guestfish-actions.pod:3561
16843 msgid "Old Mac partition format. Modern Macs use C<gpt>."
16848 #: ../src/guestfs-actions.pod:5370 ../fish/guestfish-actions.pod:3563
16854 #: ../src/guestfs-actions.pod:5372 ../fish/guestfish-actions.pod:3565
16855 msgid "NEC PC-98 format, common in Japan apparently."
16860 #: ../src/guestfs-actions.pod:5374 ../fish/guestfish-actions.pod:3567
16866 #: ../src/guestfs-actions.pod:5376 ../fish/guestfish-actions.pod:3569
16867 msgid "Sun disk labels."
16872 #: ../src/guestfs-actions.pod:5384
16873 msgid "guestfs_part_list"
16878 #: ../src/guestfs-actions.pod:5386
16881 " struct guestfs_partition_list *\n"
16882 " guestfs_part_list (guestfs_h *g,\n"
16883 " const char *device);\n"
16889 #: ../src/guestfs-actions.pod:5390 ../fish/guestfish-actions.pod:3577
16891 "This command parses the partition table on C<device> and returns the list of "
16892 "partitions found."
16897 #: ../src/guestfs-actions.pod:5393 ../fish/guestfish-actions.pod:3580
16898 msgid "The fields in the returned structure are:"
16903 #: ../src/guestfs-actions.pod:5397 ../fish/guestfish-actions.pod:3584
16904 msgid "B<part_num>"
16909 #: ../src/guestfs-actions.pod:5399 ../fish/guestfish-actions.pod:3586
16910 msgid "Partition number, counting from 1."
16915 #: ../src/guestfs-actions.pod:5401 ../fish/guestfish-actions.pod:3588
16916 msgid "B<part_start>"
16921 #: ../src/guestfs-actions.pod:5403
16923 "Start of the partition I<in bytes>. To get sectors you have to divide by "
16924 "the device's sector size, see C<guestfs_blockdev_getss>."
16929 #: ../src/guestfs-actions.pod:5406 ../fish/guestfish-actions.pod:3593
16930 msgid "B<part_end>"
16935 #: ../src/guestfs-actions.pod:5408 ../fish/guestfish-actions.pod:3595
16936 msgid "End of the partition in bytes."
16941 #: ../src/guestfs-actions.pod:5410 ../fish/guestfish-actions.pod:3597
16942 msgid "B<part_size>"
16947 #: ../src/guestfs-actions.pod:5412 ../fish/guestfish-actions.pod:3599
16948 msgid "Size of the partition in bytes."
16953 #: ../src/guestfs-actions.pod:5416
16955 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
16956 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
16962 #: ../src/guestfs-actions.pod:5422
16963 msgid "guestfs_part_set_bootable"
16968 #: ../src/guestfs-actions.pod:5424
16972 " guestfs_part_set_bootable (guestfs_h *g,\n"
16973 " const char *device,\n"
16975 " int bootable);\n"
16981 #: ../src/guestfs-actions.pod:5430 ../fish/guestfish-actions.pod:3607
16983 "This sets the bootable flag on partition numbered C<partnum> on device "
16984 "C<device>. Note that partitions are numbered from 1."
16989 #: ../src/guestfs-actions.pod:5433 ../fish/guestfish-actions.pod:3610
16991 "The bootable flag is used by some operating systems (notably Windows) to "
16992 "determine which partition to boot from. It is by no means universally "
16998 #: ../src/guestfs-actions.pod:5441
16999 msgid "guestfs_part_set_mbr_id"
17004 #: ../src/guestfs-actions.pod:5443
17008 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
17009 " const char *device,\n"
17017 #: ../src/guestfs-actions.pod:5449 ../fish/guestfish-actions.pod:3618
17019 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
17020 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
17021 "documentation are in fact hexadecimal numbers, but usually documented "
17022 "without any leading \"0x\" which might be confusing."
17027 #: ../src/guestfs-actions.pod:5463
17028 msgid "guestfs_part_set_name"
17033 #: ../src/guestfs-actions.pod:5465
17037 " guestfs_part_set_name (guestfs_h *g,\n"
17038 " const char *device,\n"
17040 " const char *name);\n"
17046 #: ../src/guestfs-actions.pod:5471 ../fish/guestfish-actions.pod:3632
17048 "This sets the partition name on partition numbered C<partnum> on device "
17049 "C<device>. Note that partitions are numbered from 1."
17054 #: ../src/guestfs-actions.pod:5474 ../fish/guestfish-actions.pod:3635
17056 "The partition name can only be set on certain types of partition table. "
17057 "This works on C<gpt> but not on C<mbr> partitions."
17062 #: ../src/guestfs-actions.pod:5481
17063 msgid "guestfs_part_to_dev"
17068 #: ../src/guestfs-actions.pod:5483
17072 " guestfs_part_to_dev (guestfs_h *g,\n"
17073 " const char *partition);\n"
17079 #: ../src/guestfs-actions.pod:5487 ../fish/guestfish-actions.pod:3642
17081 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
17082 "partition number, returning the device name (eg. \"/dev/sdb\")."
17087 #: ../src/guestfs-actions.pod:5491
17089 "The named partition must exist, for example as a string returned from "
17090 "C<guestfs_list_partitions>."
17095 #: ../src/guestfs-actions.pod:5499
17096 msgid "guestfs_ping_daemon"
17101 #: ../src/guestfs-actions.pod:5501
17105 " guestfs_ping_daemon (guestfs_h *g);\n"
17111 #: ../src/guestfs-actions.pod:5504 ../fish/guestfish-actions.pod:3653
17113 "This is a test probe into the guestfs daemon running inside the qemu "
17114 "subprocess. Calling this function checks that the daemon responds to the "
17115 "ping message, without affecting the daemon or attached block device(s) in "
17121 #: ../src/guestfs-actions.pod:5513
17122 msgid "guestfs_pread"
17127 #: ../src/guestfs-actions.pod:5515
17131 " guestfs_pread (guestfs_h *g,\n"
17132 " const char *path,\n"
17134 " int64_t offset,\n"
17135 " size_t *size_r);\n"
17141 #: ../src/guestfs-actions.pod:5522 ../fish/guestfish-actions.pod:3662
17143 "This command lets you read part of a file. It reads C<count> bytes of the "
17144 "file, starting at C<offset>, from file C<path>."
17149 #: ../src/guestfs-actions.pod:5525 ../src/guestfs-actions.pod:5551
17150 #: ../fish/guestfish-actions.pod:3665 ../fish/guestfish-actions.pod:3680
17152 "This may read fewer bytes than requested. For further details see the "
17153 "L<pread(2)> system call."
17158 #: ../src/guestfs-actions.pod:5528
17159 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
17164 #: ../src/guestfs-actions.pod:5539
17165 msgid "guestfs_pread_device"
17170 #: ../src/guestfs-actions.pod:5541
17174 " guestfs_pread_device (guestfs_h *g,\n"
17175 " const char *device,\n"
17177 " int64_t offset,\n"
17178 " size_t *size_r);\n"
17184 #: ../src/guestfs-actions.pod:5548 ../fish/guestfish-actions.pod:3677
17186 "This command lets you read part of a file. It reads C<count> bytes of "
17187 "C<device>, starting at C<offset>."
17192 #: ../src/guestfs-actions.pod:5554
17193 msgid "See also C<guestfs_pread>."
17198 #: ../src/guestfs-actions.pod:5563
17199 msgid "(Added in 1.5.21)"
17204 #: ../src/guestfs-actions.pod:5565
17205 msgid "guestfs_pvcreate"
17210 #: ../src/guestfs-actions.pod:5567
17214 " guestfs_pvcreate (guestfs_h *g,\n"
17215 " const char *device);\n"
17221 #: ../src/guestfs-actions.pod:5571 ../fish/guestfish-actions.pod:3692
17223 "This creates an LVM physical volume on the named C<device>, where C<device> "
17224 "should usually be a partition name such as C</dev/sda1>."
17229 #: ../src/guestfs-actions.pod:5579
17230 msgid "guestfs_pvremove"
17235 #: ../src/guestfs-actions.pod:5581
17239 " guestfs_pvremove (guestfs_h *g,\n"
17240 " const char *device);\n"
17246 #: ../src/guestfs-actions.pod:5585 ../fish/guestfish-actions.pod:3700
17248 "This wipes a physical volume C<device> so that LVM will no longer recognise "
17254 #: ../src/guestfs-actions.pod:5588 ../fish/guestfish-actions.pod:3703
17256 "The implementation uses the C<pvremove> command which refuses to wipe "
17257 "physical volumes that contain any volume groups, so you have to remove those "
17263 #: ../src/guestfs-actions.pod:5596
17264 msgid "guestfs_pvresize"
17269 #: ../src/guestfs-actions.pod:5598
17273 " guestfs_pvresize (guestfs_h *g,\n"
17274 " const char *device);\n"
17280 #: ../src/guestfs-actions.pod:5602 ../fish/guestfish-actions.pod:3711
17282 "This resizes (expands or shrinks) an existing LVM physical volume to match "
17283 "the new size of the underlying device."
17288 #: ../src/guestfs-actions.pod:5609
17289 msgid "guestfs_pvresize_size"
17294 #: ../src/guestfs-actions.pod:5611
17298 " guestfs_pvresize_size (guestfs_h *g,\n"
17299 " const char *device,\n"
17300 " int64_t size);\n"
17306 #: ../src/guestfs-actions.pod:5616
17308 "This command is the same as C<guestfs_pvresize> except that it allows you to "
17309 "specify the new size (in bytes) explicitly."
17314 #: ../src/guestfs-actions.pod:5623
17315 msgid "guestfs_pvs"
17320 #: ../src/guestfs-actions.pod:5625
17324 " guestfs_pvs (guestfs_h *g);\n"
17330 #: ../src/guestfs-actions.pod:5628 ../fish/guestfish-actions.pod:3725
17332 "List all the physical volumes detected. This is the equivalent of the L<pvs"
17338 #: ../src/guestfs-actions.pod:5631 ../fish/guestfish-actions.pod:3728
17340 "This returns a list of just the device names that contain PVs (eg. C</dev/"
17346 #: ../src/guestfs-actions.pod:5634
17347 msgid "See also C<guestfs_pvs_full>."
17352 #: ../src/guestfs-actions.pod:5642
17353 msgid "guestfs_pvs_full"
17358 #: ../src/guestfs-actions.pod:5644
17361 " struct guestfs_lvm_pv_list *\n"
17362 " guestfs_pvs_full (guestfs_h *g);\n"
17368 #: ../src/guestfs-actions.pod:5647 ../fish/guestfish-actions.pod:3737
17370 "List all the physical volumes detected. This is the equivalent of the L<pvs"
17371 "(8)> command. The \"full\" version includes all fields."
17376 #: ../src/guestfs-actions.pod:5650
17378 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
17379 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after use>."
17384 #: ../src/guestfs-actions.pod:5656
17385 msgid "guestfs_pvuuid"
17390 #: ../src/guestfs-actions.pod:5658
17394 " guestfs_pvuuid (guestfs_h *g,\n"
17395 " const char *device);\n"
17401 #: ../src/guestfs-actions.pod:5662 ../fish/guestfish-actions.pod:3744
17402 msgid "This command returns the UUID of the LVM PV C<device>."
17407 #: ../src/guestfs-actions.pod:5669
17408 msgid "guestfs_pwrite"
17413 #: ../src/guestfs-actions.pod:5671
17417 " guestfs_pwrite (guestfs_h *g,\n"
17418 " const char *path,\n"
17419 " const char *content,\n"
17420 " size_t content_size,\n"
17421 " int64_t offset);\n"
17427 #: ../src/guestfs-actions.pod:5678 ../fish/guestfish-actions.pod:3750
17429 "This command writes to part of a file. It writes the data buffer C<content> "
17430 "to the file C<path> starting at offset C<offset>."
17435 #: ../src/guestfs-actions.pod:5681 ../fish/guestfish-actions.pod:3753
17437 "This command implements the L<pwrite(2)> system call, and like that system "
17438 "call it may not write the full data requested. The return value is the "
17439 "number of bytes that were actually written to the file. This could even be "
17440 "0, although short writes are unlikely for regular files in ordinary "
17446 #: ../src/guestfs-actions.pod:5687
17447 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
17452 #: ../src/guestfs-actions.pod:5696
17453 msgid "guestfs_pwrite_device"
17458 #: ../src/guestfs-actions.pod:5698
17462 " guestfs_pwrite_device (guestfs_h *g,\n"
17463 " const char *device,\n"
17464 " const char *content,\n"
17465 " size_t content_size,\n"
17466 " int64_t offset);\n"
17472 #: ../src/guestfs-actions.pod:5705 ../fish/guestfish-actions.pod:3768
17474 "This command writes to part of a device. It writes the data buffer "
17475 "C<content> to C<device> starting at offset C<offset>."
17480 #: ../src/guestfs-actions.pod:5708 ../fish/guestfish-actions.pod:3771
17482 "This command implements the L<pwrite(2)> system call, and like that system "
17483 "call it may not write the full data requested (although short writes to disk "
17484 "devices and partitions are probably impossible with standard Linux kernels)."
17489 #: ../src/guestfs-actions.pod:5713
17490 msgid "See also C<guestfs_pwrite>."
17495 #: ../src/guestfs-actions.pod:5720
17496 msgid "(Added in 1.5.20)"
17501 #: ../src/guestfs-actions.pod:5722
17502 msgid "guestfs_read_file"
17507 #: ../src/guestfs-actions.pod:5724
17511 " guestfs_read_file (guestfs_h *g,\n"
17512 " const char *path,\n"
17513 " size_t *size_r);\n"
17519 #: ../src/guestfs-actions.pod:5729 ../fish/guestfish-actions.pod:3785
17520 msgid "This calls returns the contents of the file C<path> as a buffer."
17525 #: ../src/guestfs-actions.pod:5732
17527 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
17528 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
17529 "function is limited in the total size of file that can be handled."
17534 #: ../src/guestfs-actions.pod:5744
17535 msgid "(Added in 1.0.63)"
17540 #: ../src/guestfs-actions.pod:5746
17541 msgid "guestfs_read_lines"
17546 #: ../src/guestfs-actions.pod:5748
17550 " guestfs_read_lines (guestfs_h *g,\n"
17551 " const char *path);\n"
17557 #: ../src/guestfs-actions.pod:5754 ../fish/guestfish-actions.pod:3802
17559 "The file contents are returned as a list of lines. Trailing C<LF> and "
17560 "C<CRLF> character sequences are I<not> returned."
17565 #: ../src/guestfs-actions.pod:5757
17567 "Note that this function cannot correctly handle binary files (specifically, "
17568 "files containing C<\\0> character which is treated as end of line). For "
17569 "those you need to use the C<guestfs_read_file> function which has a more "
17570 "complex interface."
17575 #: ../src/guestfs-actions.pod:5768
17576 msgid "guestfs_readdir"
17581 #: ../src/guestfs-actions.pod:5770
17584 " struct guestfs_dirent_list *\n"
17585 " guestfs_readdir (guestfs_h *g,\n"
17586 " const char *dir);\n"
17592 #: ../src/guestfs-actions.pod:5774 ../fish/guestfish-actions.pod:3814
17593 msgid "This returns the list of directory entries in directory C<dir>."
17598 #: ../src/guestfs-actions.pod:5776 ../fish/guestfish-actions.pod:3816
17600 "All entries in the directory are returned, including C<.> and C<..>. The "
17601 "entries are I<not> sorted, but returned in the same order as the underlying "
17607 #: ../src/guestfs-actions.pod:5780 ../fish/guestfish-actions.pod:3820
17609 "Also this call returns basic file type information about each file. The "
17610 "C<ftyp> field will contain one of the following characters:"
17615 #: ../src/guestfs-actions.pod:5785 ../fish/guestfish-actions.pod:3825
17621 #: ../src/guestfs-actions.pod:5787 ../fish/guestfish-actions.pod:3827
17622 msgid "Block special"
17627 #: ../src/guestfs-actions.pod:5789 ../fish/guestfish-actions.pod:3829
17633 #: ../src/guestfs-actions.pod:5791 ../fish/guestfish-actions.pod:3831
17634 msgid "Char special"
17639 #: ../src/guestfs-actions.pod:5793 ../fish/guestfish-actions.pod:3833
17645 #: ../src/guestfs-actions.pod:5795 ../fish/guestfish-actions.pod:3835
17651 #: ../src/guestfs-actions.pod:5797 ../fish/guestfish-actions.pod:3837
17657 #: ../src/guestfs-actions.pod:5799 ../fish/guestfish-actions.pod:3839
17658 msgid "FIFO (named pipe)"
17663 #: ../src/guestfs-actions.pod:5801 ../fish/guestfish-actions.pod:3841
17669 #: ../src/guestfs-actions.pod:5803 ../fish/guestfish-actions.pod:3843
17670 msgid "Symbolic link"
17675 #: ../src/guestfs-actions.pod:5805 ../fish/guestfish-actions.pod:3845
17681 #: ../src/guestfs-actions.pod:5807 ../fish/guestfish-actions.pod:3847
17682 msgid "Regular file"
17687 #: ../src/guestfs-actions.pod:5809 ../fish/guestfish-actions.pod:3849
17693 #: ../src/guestfs-actions.pod:5811 ../fish/guestfish-actions.pod:3851
17699 #: ../src/guestfs-actions.pod:5813 ../fish/guestfish-actions.pod:3853
17705 #: ../src/guestfs-actions.pod:5815 ../fish/guestfish-actions.pod:3855
17706 msgid "Unknown file type"
17711 #: ../src/guestfs-actions.pod:5817 ../fish/guestfish-actions.pod:3857
17717 #: ../src/guestfs-actions.pod:5819 ../fish/guestfish-actions.pod:3859
17719 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
17724 #: ../src/guestfs-actions.pod:5824
17726 "This function is primarily intended for use by programs. To get a simple "
17727 "list of names, use C<guestfs_ls>. To get a printable directory for human "
17728 "consumption, use C<guestfs_ll>."
17733 #: ../src/guestfs-actions.pod:5828
17735 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
17736 "was an error. I<The caller must call C<guestfs_free_dirent_list> after use>."
17741 #: ../src/guestfs-actions.pod:5834
17742 msgid "guestfs_readlink"
17747 #: ../src/guestfs-actions.pod:5836
17751 " guestfs_readlink (guestfs_h *g,\n"
17752 " const char *path);\n"
17758 #: ../src/guestfs-actions.pod:5840 ../fish/guestfish-actions.pod:3872
17759 msgid "This command reads the target of a symbolic link."
17764 #: ../src/guestfs-actions.pod:5847
17765 msgid "guestfs_readlinklist"
17770 #: ../src/guestfs-actions.pod:5849
17774 " guestfs_readlinklist (guestfs_h *g,\n"
17775 " const char *path,\n"
17776 " char *const *names);\n"
17782 #: ../src/guestfs-actions.pod:5854 ../fish/guestfish-actions.pod:3878
17784 "This call allows you to do a C<readlink> operation on multiple files, where "
17785 "all files are in the directory C<path>. C<names> is the list of files from "
17791 #: ../src/guestfs-actions.pod:5858 ../fish/guestfish-actions.pod:3882
17793 "On return you get a list of strings, with a one-to-one correspondence to the "
17794 "C<names> list. Each string is the value of the symbolic link."
17799 #: ../src/guestfs-actions.pod:5862 ../fish/guestfish-actions.pod:3886
17801 "If the C<readlink(2)> operation fails on any name, then the corresponding "
17802 "result string is the empty string C<\"\">. However the whole operation is "
17803 "completed even if there were C<readlink(2)> errors, and so you can call this "
17804 "function with names where you don't know if they are symbolic links already "
17805 "(albeit slightly less efficient)."
17810 #: ../src/guestfs-actions.pod:5869 ../fish/guestfish-actions.pod:3893
17812 "This call is intended for programs that want to efficiently list a directory "
17813 "contents without making many round-trips. Very long directory listings "
17814 "might cause the protocol message size to be exceeded, causing this call to "
17815 "fail. The caller must split up such requests into smaller groups of names."
17820 #: ../src/guestfs-actions.pod:5882
17821 msgid "guestfs_realpath"
17826 #: ../src/guestfs-actions.pod:5884
17830 " guestfs_realpath (guestfs_h *g,\n"
17831 " const char *path);\n"
17837 #: ../src/guestfs-actions.pod:5888 ../fish/guestfish-actions.pod:3904
17839 "Return the canonicalized absolute pathname of C<path>. The returned path "
17840 "has no C<.>, C<..> or symbolic link path elements."
17845 #: ../src/guestfs-actions.pod:5896
17846 msgid "guestfs_removexattr"
17851 #: ../src/guestfs-actions.pod:5898
17855 " guestfs_removexattr (guestfs_h *g,\n"
17856 " const char *xattr,\n"
17857 " const char *path);\n"
17863 #: ../src/guestfs-actions.pod:5903 ../fish/guestfish-actions.pod:3911
17865 "This call removes the extended attribute named C<xattr> of the file C<path>."
17870 #: ../src/guestfs-actions.pod:5906
17871 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
17876 #: ../src/guestfs-actions.pod:5912
17877 msgid "guestfs_resize2fs"
17882 #: ../src/guestfs-actions.pod:5914
17886 " guestfs_resize2fs (guestfs_h *g,\n"
17887 " const char *device);\n"
17893 #: ../src/guestfs-actions.pod:5918 ../fish/guestfish-actions.pod:3920
17895 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
17896 "underlying device."
17901 #: ../src/guestfs-actions.pod:5921
17903 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
17904 "C<device> before calling this command. For unknown reasons C<resize2fs> "
17905 "sometimes gives an error about this and sometimes not. In any case, it is "
17906 "always safe to call C<guestfs_e2fsck_f> before calling this function."
17910 #: ../src/guestfs-actions.pod:5931
17911 msgid "guestfs_resize2fs_M"
17915 #: ../src/guestfs-actions.pod:5933
17919 " guestfs_resize2fs_M (guestfs_h *g,\n"
17920 " const char *device);\n"
17925 #: ../src/guestfs-actions.pod:5937
17927 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
17928 "resized to its minimum size. This works like the I<-M> option to the "
17929 "C<resize2fs> command."
17933 #: ../src/guestfs-actions.pod:5941
17935 "To get the resulting size of the filesystem you should call "
17936 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
17937 "These two numbers, multiplied together, give the resulting size of the "
17938 "minimal filesystem in bytes."
17943 #: ../src/guestfs-actions.pod:5950
17944 msgid "guestfs_resize2fs_size"
17949 #: ../src/guestfs-actions.pod:5952
17953 " guestfs_resize2fs_size (guestfs_h *g,\n"
17954 " const char *device,\n"
17955 " int64_t size);\n"
17961 #: ../src/guestfs-actions.pod:5957
17963 "This command is the same as C<guestfs_resize2fs> except that it allows you "
17964 "to specify the new size (in bytes) explicitly."
17969 #: ../src/guestfs-actions.pod:5964
17975 #: ../src/guestfs-actions.pod:5966
17979 " guestfs_rm (guestfs_h *g,\n"
17980 " const char *path);\n"
17986 #: ../src/guestfs-actions.pod:5970 ../fish/guestfish-actions.pod:3953
17987 msgid "Remove the single file C<path>."
17992 #: ../src/guestfs-actions.pod:5976
17993 msgid "guestfs_rm_rf"
17998 #: ../src/guestfs-actions.pod:5978
18002 " guestfs_rm_rf (guestfs_h *g,\n"
18003 " const char *path);\n"
18009 #: ../src/guestfs-actions.pod:5982 ../fish/guestfish-actions.pod:3959
18011 "Remove the file or directory C<path>, recursively removing the contents if "
18012 "its a directory. This is like the C<rm -rf> shell command."
18017 #: ../src/guestfs-actions.pod:5990
18018 msgid "guestfs_rmdir"
18023 #: ../src/guestfs-actions.pod:5992
18027 " guestfs_rmdir (guestfs_h *g,\n"
18028 " const char *path);\n"
18034 #: ../src/guestfs-actions.pod:5996 ../fish/guestfish-actions.pod:3967
18035 msgid "Remove the single directory C<path>."
18040 #: ../src/guestfs-actions.pod:6002
18041 msgid "guestfs_rmmountpoint"
18046 #: ../src/guestfs-actions.pod:6004
18050 " guestfs_rmmountpoint (guestfs_h *g,\n"
18051 " const char *exemptpath);\n"
18057 #: ../src/guestfs-actions.pod:6008
18059 "This calls removes a mountpoint that was previously created with "
18060 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
18065 #: ../src/guestfs-actions.pod:6016
18066 msgid "guestfs_scrub_device"
18071 #: ../src/guestfs-actions.pod:6018
18075 " guestfs_scrub_device (guestfs_h *g,\n"
18076 " const char *device);\n"
18082 #: ../src/guestfs-actions.pod:6022 ../fish/guestfish-actions.pod:3981
18084 "This command writes patterns over C<device> to make data retrieval more "
18090 #: ../src/guestfs-actions.pod:6025 ../src/guestfs-actions.pod:6046
18091 #: ../src/guestfs-actions.pod:6065 ../fish/guestfish-actions.pod:3984
18092 #: ../fish/guestfish-actions.pod:3999 ../fish/guestfish-actions.pod:4012
18094 "It is an interface to the L<scrub(1)> program. See that manual page for "
18100 #: ../src/guestfs-actions.pod:6033 ../src/guestfs-actions.pod:6051
18101 #: ../src/guestfs-actions.pod:6070
18102 msgid "(Added in 1.0.52)"
18107 #: ../src/guestfs-actions.pod:6035
18108 msgid "guestfs_scrub_file"
18113 #: ../src/guestfs-actions.pod:6037
18117 " guestfs_scrub_file (guestfs_h *g,\n"
18118 " const char *file);\n"
18124 #: ../src/guestfs-actions.pod:6041 ../fish/guestfish-actions.pod:3994
18126 "This command writes patterns over a file to make data retrieval more "
18132 #: ../src/guestfs-actions.pod:6044 ../fish/guestfish-actions.pod:3997
18133 msgid "The file is I<removed> after scrubbing."
18138 #: ../src/guestfs-actions.pod:6053
18139 msgid "guestfs_scrub_freespace"
18144 #: ../src/guestfs-actions.pod:6055
18148 " guestfs_scrub_freespace (guestfs_h *g,\n"
18149 " const char *dir);\n"
18155 #: ../src/guestfs-actions.pod:6059
18157 "This command creates the directory C<dir> and then fills it with files until "
18158 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
18159 "and deletes them. The intention is to scrub any free space on the partition "
18160 "containing C<dir>."
18165 #: ../src/guestfs-actions.pod:6072
18166 msgid "guestfs_set_append"
18171 #: ../src/guestfs-actions.pod:6074
18175 " guestfs_set_append (guestfs_h *g,\n"
18176 " const char *append);\n"
18182 #: ../src/guestfs-actions.pod:6078 ../fish/guestfish-actions.pod:4021
18184 "This function is used to add additional options to the guest kernel command "
18190 #: ../src/guestfs-actions.pod:6081 ../fish/guestfish-actions.pod:4024
18192 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
18193 "environment variable."
18198 #: ../src/guestfs-actions.pod:6084 ../fish/guestfish-actions.pod:4027
18200 "Setting C<append> to C<NULL> means I<no> additional options are passed "
18201 "(libguestfs always adds a few of its own)."
18205 #: ../src/guestfs-actions.pod:6091
18206 msgid "guestfs_set_attach_method"
18210 #: ../src/guestfs-actions.pod:6093
18214 " guestfs_set_attach_method (guestfs_h *g,\n"
18215 " const char *attachmethod);\n"
18220 #: ../src/guestfs-actions.pod:6097 ../fish/guestfish-actions.pod:4036
18222 "Set the method that libguestfs uses to connect to the back end guestfsd "
18223 "daemon. Possible methods are:"
18227 #: ../src/guestfs-actions.pod:6104 ../fish/guestfish-actions.pod:4043
18229 "Launch an appliance and connect to it. This is the ordinary method and the "
18234 #: ../src/guestfs-actions.pod:6107 ../fish/guestfish-actions.pod:4046
18235 msgid "C<unix:I<path>>"
18239 #: ../src/guestfs-actions.pod:6109 ../fish/guestfish-actions.pod:4048
18240 msgid "Connect to the Unix domain socket I<path>."
18244 #: ../src/guestfs-actions.pod:6111 ../fish/guestfish-actions.pod:4050
18246 "This method lets you connect to an existing daemon or (using virtio-serial) "
18247 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
18248 "RUNNING DAEMONS>."
18253 #: ../src/guestfs-actions.pod:6121
18254 msgid "guestfs_set_autosync"
18259 #: ../src/guestfs-actions.pod:6123
18263 " guestfs_set_autosync (guestfs_h *g,\n"
18264 " int autosync);\n"
18269 #: ../src/guestfs-actions.pod:6127 ../fish/guestfish-actions.pod:4062
18271 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
18272 "effort attempt to make filesystems consistent and synchronized when the "
18273 "handle is closed (also if the program exits without closing handles)."
18278 #: ../src/guestfs-actions.pod:6132 ../fish/guestfish-actions.pod:4067
18280 "This is enabled by default (since libguestfs 1.5.24, previously it was "
18281 "disabled by default)."
18286 #: ../src/guestfs-actions.pod:6139
18287 msgid "guestfs_set_direct"
18292 #: ../src/guestfs-actions.pod:6141
18296 " guestfs_set_direct (guestfs_h *g,\n"
18303 #: ../src/guestfs-actions.pod:6145 ../fish/guestfish-actions.pod:4076
18305 "If the direct appliance mode flag is enabled, then stdin and stdout are "
18306 "passed directly through to the appliance once it is launched."
18311 #: ../src/guestfs-actions.pod:6149
18313 "One consequence of this is that log messages aren't caught by the library "
18314 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
18320 #: ../src/guestfs-actions.pod:6153 ../fish/guestfish-actions.pod:4084
18321 msgid "You probably don't want to use this unless you know what you are doing."
18326 #: ../src/guestfs-actions.pod:6156 ../fish/guestfish-actions.pod:4087
18327 msgid "The default is disabled."
18332 #: ../src/guestfs-actions.pod:6162
18333 msgid "guestfs_set_e2label"
18338 #: ../src/guestfs-actions.pod:6164
18342 " guestfs_set_e2label (guestfs_h *g,\n"
18343 " const char *device,\n"
18344 " const char *label);\n"
18350 #: ../src/guestfs-actions.pod:6169 ../fish/guestfish-actions.pod:4093
18352 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
18353 "C<label>. Filesystem labels are limited to 16 characters."
18358 #: ../src/guestfs-actions.pod:6173
18360 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
18361 "the existing label on a filesystem."
18366 #: ../src/guestfs-actions.pod:6180
18367 msgid "guestfs_set_e2uuid"
18372 #: ../src/guestfs-actions.pod:6182
18376 " guestfs_set_e2uuid (guestfs_h *g,\n"
18377 " const char *device,\n"
18378 " const char *uuid);\n"
18384 #: ../src/guestfs-actions.pod:6187 ../fish/guestfish-actions.pod:4104
18386 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
18387 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
18388 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
18393 #: ../src/guestfs-actions.pod:6192
18395 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
18396 "the existing UUID of a filesystem."
18401 #: ../src/guestfs-actions.pod:6199
18402 msgid "guestfs_set_memsize"
18407 #: ../src/guestfs-actions.pod:6201
18411 " guestfs_set_memsize (guestfs_h *g,\n"
18418 #: ../src/guestfs-actions.pod:6205
18420 "This sets the memory size in megabytes allocated to the qemu subprocess. "
18421 "This only has any effect if called before C<guestfs_launch>."
18426 #: ../src/guestfs-actions.pod:6209 ../fish/guestfish-actions.pod:4122
18428 "You can also change this by setting the environment variable "
18429 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
18434 #: ../src/guestfs-actions.pod:6220
18435 msgid "guestfs_set_network"
18440 #: ../src/guestfs-actions.pod:6222
18444 " guestfs_set_network (guestfs_h *g,\n"
18451 #: ../src/guestfs-actions.pod:6226 ../fish/guestfish-actions.pod:4135
18453 "If C<network> is true, then the network is enabled in the libguestfs "
18454 "appliance. The default is false."
18459 #: ../src/guestfs-actions.pod:6229 ../fish/guestfish-actions.pod:4138
18461 "This affects whether commands are able to access the network (see L<guestfs"
18462 "(3)/RUNNING COMMANDS>)."
18467 #: ../src/guestfs-actions.pod:6232
18469 "You must call this before calling C<guestfs_launch>, otherwise it has no "
18475 #: ../src/guestfs-actions.pod:6239
18476 msgid "guestfs_set_path"
18481 #: ../src/guestfs-actions.pod:6241
18485 " guestfs_set_path (guestfs_h *g,\n"
18486 " const char *searchpath);\n"
18492 #: ../src/guestfs-actions.pod:6245 ../fish/guestfish-actions.pod:4150
18493 msgid "Set the path that libguestfs searches for kernel and initrd.img."
18498 #: ../src/guestfs-actions.pod:6247 ../fish/guestfish-actions.pod:4152
18500 "The default is C<$libdir/guestfs> unless overridden by setting "
18501 "C<LIBGUESTFS_PATH> environment variable."
18506 #: ../src/guestfs-actions.pod:6250 ../fish/guestfish-actions.pod:4155
18507 msgid "Setting C<path> to C<NULL> restores the default path."
18512 #: ../src/guestfs-actions.pod:6256
18513 msgid "guestfs_set_qemu"
18518 #: ../src/guestfs-actions.pod:6258
18522 " guestfs_set_qemu (guestfs_h *g,\n"
18523 " const char *qemu);\n"
18529 #: ../src/guestfs-actions.pod:6262 ../fish/guestfish-actions.pod:4163
18530 msgid "Set the qemu binary that we will use."
18535 #: ../src/guestfs-actions.pod:6264 ../fish/guestfish-actions.pod:4165
18537 "The default is chosen when the library was compiled by the configure script."
18542 #: ../src/guestfs-actions.pod:6267 ../fish/guestfish-actions.pod:4168
18544 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
18550 #: ../src/guestfs-actions.pod:6270 ../fish/guestfish-actions.pod:4171
18551 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
18556 #: ../src/guestfs-actions.pod:6272 ../fish/guestfish-actions.pod:4173
18558 "Note that you should call this function as early as possible after creating "
18559 "the handle. This is because some pre-launch operations depend on testing "
18560 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
18561 "don't retest features, and so you might see inconsistent results. Using the "
18562 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
18563 "the qemu binary at the same time as the handle is created."
18568 #: ../src/guestfs-actions.pod:6284
18569 msgid "guestfs_set_recovery_proc"
18574 #: ../src/guestfs-actions.pod:6286
18578 " guestfs_set_recovery_proc (guestfs_h *g,\n"
18579 " int recoveryproc);\n"
18585 #: ../src/guestfs-actions.pod:6290
18587 "If this is called with the parameter C<false> then C<guestfs_launch> does "
18588 "not create a recovery process. The purpose of the recovery process is to "
18589 "stop runaway qemu processes in the case where the main program aborts "
18595 #: ../src/guestfs-actions.pod:6295
18597 "This only has any effect if called before C<guestfs_launch>, and the default "
18603 #: ../src/guestfs-actions.pod:6298 ../fish/guestfish-actions.pod:4195
18605 "About the only time when you would want to disable this is if the main "
18606 "process will fork itself into the background (\"daemonize\" itself). In "
18607 "this case the recovery process thinks that the main program has disappeared "
18608 "and so kills qemu, which is not very helpful."
18613 #: ../src/guestfs-actions.pod:6308
18614 msgid "guestfs_set_selinux"
18619 #: ../src/guestfs-actions.pod:6310
18623 " guestfs_set_selinux (guestfs_h *g,\n"
18630 #: ../src/guestfs-actions.pod:6314 ../fish/guestfish-actions.pod:4207
18632 "This sets the selinux flag that is passed to the appliance at boot time. "
18633 "The default is C<selinux=0> (disabled)."
18638 #: ../src/guestfs-actions.pod:6317 ../fish/guestfish-actions.pod:4210
18640 "Note that if SELinux is enabled, it is always in Permissive mode "
18641 "(C<enforcing=0>)."
18646 #: ../src/guestfs-actions.pod:6327
18647 msgid "guestfs_set_trace"
18652 #: ../src/guestfs-actions.pod:6329
18656 " guestfs_set_trace (guestfs_h *g,\n"
18662 #: ../src/guestfs-actions.pod:6333 ../fish/guestfish-actions.pod:4222
18664 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
18665 "return values are traced."
18670 #: ../src/guestfs-actions.pod:6336 ../fish/guestfish-actions.pod:4225
18672 "If you want to trace C API calls into libguestfs (and other libraries) then "
18673 "possibly a better way is to use the external ltrace(1) command."
18678 #: ../src/guestfs-actions.pod:6340 ../fish/guestfish-actions.pod:4229
18680 "Command traces are disabled unless the environment variable "
18681 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
18685 #: ../src/guestfs-actions.pod:6343
18687 "Trace messages are normally sent to C<stderr>, unless you register a "
18688 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
18693 #: ../src/guestfs-actions.pod:6351
18694 msgid "guestfs_set_verbose"
18699 #: ../src/guestfs-actions.pod:6353
18703 " guestfs_set_verbose (guestfs_h *g,\n"
18709 #: ../src/guestfs-actions.pod:6357 ../fish/guestfish-actions.pod:4242
18710 msgid "If C<verbose> is true, this turns on verbose messages."
18715 #: ../src/guestfs-actions.pod:6359 ../fish/guestfish-actions.pod:4244
18717 "Verbose messages are disabled unless the environment variable "
18718 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
18722 #: ../src/guestfs-actions.pod:6362
18724 "Verbose messages are normally sent to C<stderr>, unless you register a "
18725 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
18730 #: ../src/guestfs-actions.pod:6370
18731 msgid "guestfs_setcon"
18736 #: ../src/guestfs-actions.pod:6372
18740 " guestfs_setcon (guestfs_h *g,\n"
18741 " const char *context);\n"
18747 #: ../src/guestfs-actions.pod:6376 ../fish/guestfish-actions.pod:4255
18749 "This sets the SELinux security context of the daemon to the string "
18755 #: ../src/guestfs-actions.pod:6379 ../fish/guestfish-actions.pod:4258
18756 msgid "See the documentation about SELINUX in L<guestfs(3)>."
18761 #: ../src/guestfs-actions.pod:6385
18762 msgid "guestfs_setxattr"
18767 #: ../src/guestfs-actions.pod:6387
18771 " guestfs_setxattr (guestfs_h *g,\n"
18772 " const char *xattr,\n"
18773 " const char *val,\n"
18775 " const char *path);\n"
18781 #: ../src/guestfs-actions.pod:6394 ../fish/guestfish-actions.pod:4264
18783 "This call sets the extended attribute named C<xattr> of the file C<path> to "
18784 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
18789 #: ../src/guestfs-actions.pod:6398
18790 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
18795 #: ../src/guestfs-actions.pod:6404
18796 msgid "guestfs_sfdisk"
18801 #: ../src/guestfs-actions.pod:6406
18805 " guestfs_sfdisk (guestfs_h *g,\n"
18806 " const char *device,\n"
18810 " char *const *lines);\n"
18816 #: ../src/guestfs-actions.pod:6414 ../fish/guestfish-actions.pod:4274
18818 "This is a direct interface to the L<sfdisk(8)> program for creating "
18819 "partitions on block devices."
18824 #: ../src/guestfs-actions.pod:6417 ../fish/guestfish-actions.pod:4277
18825 msgid "C<device> should be a block device, for example C</dev/sda>."
18830 #: ../src/guestfs-actions.pod:6419 ../fish/guestfish-actions.pod:4279
18832 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
18833 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
18834 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
18835 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
18836 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
18837 "the kernel) cannot work out the right geometry and you will need to tell it."
18842 #: ../src/guestfs-actions.pod:6427 ../fish/guestfish-actions.pod:4287
18844 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
18845 "refer to the L<sfdisk(8)> manpage."
18850 #: ../src/guestfs-actions.pod:6430 ../fish/guestfish-actions.pod:4290
18852 "To create a single partition occupying the whole disk, you would pass "
18853 "C<lines> as a single element list, when the single element being the string "
18859 #: ../src/guestfs-actions.pod:6434
18861 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
18865 #: ../src/guestfs-actions.pod:6442 ../src/guestfs-actions.pod:6472
18866 #: ../src/guestfs-actions.pod:6505 ../fish/guestfish-actions.pod:4300
18867 #: ../fish/guestfish-actions.pod:4323 ../fish/guestfish-actions.pod:4345
18869 "This function is deprecated. In new code, use the C<part_add> call instead."
18874 #: ../src/guestfs-actions.pod:6451
18875 msgid "guestfs_sfdiskM"
18880 #: ../src/guestfs-actions.pod:6453
18884 " guestfs_sfdiskM (guestfs_h *g,\n"
18885 " const char *device,\n"
18886 " char *const *lines);\n"
18892 #: ../src/guestfs-actions.pod:6458
18894 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
18895 "partition sizes are specified in megabytes only (rounded to the nearest "
18896 "cylinder) and you don't need to specify the cyls, heads and sectors "
18897 "parameters which were rarely if ever used anyway."
18902 #: ../src/guestfs-actions.pod:6464
18904 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
18905 "C<guestfs_part_disk>"
18910 #: ../src/guestfs-actions.pod:6481
18911 msgid "guestfs_sfdisk_N"
18916 #: ../src/guestfs-actions.pod:6483
18920 " guestfs_sfdisk_N (guestfs_h *g,\n"
18921 " const char *device,\n"
18926 " const char *line);\n"
18932 #: ../src/guestfs-actions.pod:6492 ../fish/guestfish-actions.pod:4334
18934 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
18935 "(note: C<n> counts from 1)."
18940 #: ../src/guestfs-actions.pod:6495
18942 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
18943 "for the cyls/heads/sectors parameters."
18948 #: ../src/guestfs-actions.pod:6498
18949 msgid "See also: C<guestfs_part_add>"
18954 #: ../src/guestfs-actions.pod:6514
18955 msgid "guestfs_sfdisk_disk_geometry"
18960 #: ../src/guestfs-actions.pod:6516
18964 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
18965 " const char *device);\n"
18971 #: ../src/guestfs-actions.pod:6520
18973 "This displays the disk geometry of C<device> read from the partition table. "
18974 "Especially in the case where the underlying block device has been resized, "
18975 "this can be different from the kernel's idea of the geometry (see "
18976 "C<guestfs_sfdisk_kernel_geometry>)."
18981 #: ../src/guestfs-actions.pod:6525 ../src/guestfs-actions.pod:6541
18982 #: ../fish/guestfish-actions.pod:4361 ../fish/guestfish-actions.pod:4370
18983 msgid "The result is in human-readable format, and not designed to be parsed."
18988 #: ../src/guestfs-actions.pod:6533
18989 msgid "guestfs_sfdisk_kernel_geometry"
18994 #: ../src/guestfs-actions.pod:6535
18998 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
18999 " const char *device);\n"
19005 #: ../src/guestfs-actions.pod:6539 ../fish/guestfish-actions.pod:4368
19006 msgid "This displays the kernel's idea of the geometry of C<device>."
19011 #: ../src/guestfs-actions.pod:6549
19012 msgid "guestfs_sfdisk_l"
19017 #: ../src/guestfs-actions.pod:6551
19021 " guestfs_sfdisk_l (guestfs_h *g,\n"
19022 " const char *device);\n"
19028 #: ../src/guestfs-actions.pod:6555 ../fish/guestfish-actions.pod:4377
19030 "This displays the partition table on C<device>, in the human-readable output "
19031 "of the L<sfdisk(8)> command. It is not intended to be parsed."
19036 #: ../src/guestfs-actions.pod:6559
19037 msgid "See also: C<guestfs_part_list>"
19041 #: ../src/guestfs-actions.pod:6564 ../fish/guestfish-actions.pod:4383
19043 "This function is deprecated. In new code, use the C<part_list> call instead."
19048 #: ../src/guestfs-actions.pod:6573
19054 #: ../src/guestfs-actions.pod:6575
19058 " guestfs_sh (guestfs_h *g,\n"
19059 " const char *command);\n"
19065 #: ../src/guestfs-actions.pod:6579 ../fish/guestfish-actions.pod:4394
19067 "This call runs a command from the guest filesystem via the guest's C</bin/"
19073 #: ../src/guestfs-actions.pod:6582
19074 msgid "This is like C<guestfs_command>, but passes the command to:"
19079 #: ../src/guestfs-actions.pod:6584 ../fish/guestfish-actions.pod:4399
19082 " /bin/sh -c \"command\"\n"
19088 #: ../src/guestfs-actions.pod:6586 ../fish/guestfish-actions.pod:4401
19090 "Depending on the guest's shell, this usually results in wildcards being "
19091 "expanded, shell expressions being interpolated and so on."
19096 #: ../src/guestfs-actions.pod:6590
19097 msgid "All the provisos about C<guestfs_command> apply to this call."
19102 #: ../src/guestfs-actions.pod:6597
19103 msgid "guestfs_sh_lines"
19108 #: ../src/guestfs-actions.pod:6599
19112 " guestfs_sh_lines (guestfs_h *g,\n"
19113 " const char *command);\n"
19119 #: ../src/guestfs-actions.pod:6603
19121 "This is the same as C<guestfs_sh>, but splits the result into a list of "
19127 #: ../src/guestfs-actions.pod:6606
19128 msgid "See also: C<guestfs_command_lines>"
19133 #: ../src/guestfs-actions.pod:6614
19134 msgid "guestfs_sleep"
19139 #: ../src/guestfs-actions.pod:6616
19143 " guestfs_sleep (guestfs_h *g,\n"
19150 #: ../src/guestfs-actions.pod:6620 ../fish/guestfish-actions.pod:4420
19151 msgid "Sleep for C<secs> seconds."
19156 #: ../src/guestfs-actions.pod:6624
19157 msgid "(Added in 1.0.41)"
19162 #: ../src/guestfs-actions.pod:6626 ../src/guestfs-structs.pod:109
19163 msgid "guestfs_stat"
19168 #: ../src/guestfs-actions.pod:6628
19171 " struct guestfs_stat *\n"
19172 " guestfs_stat (guestfs_h *g,\n"
19173 " const char *path);\n"
19179 #: ../src/guestfs-actions.pod:6634 ../fish/guestfish-actions.pod:4428
19180 msgid "This is the same as the C<stat(2)> system call."
19185 #: ../src/guestfs-actions.pod:6642 ../src/guestfs-structs.pod:135
19186 msgid "guestfs_statvfs"
19191 #: ../src/guestfs-actions.pod:6644
19194 " struct guestfs_statvfs *\n"
19195 " guestfs_statvfs (guestfs_h *g,\n"
19196 " const char *path);\n"
19202 #: ../src/guestfs-actions.pod:6648 ../fish/guestfish-actions.pod:4434
19204 "Returns file system statistics for any mounted file system. C<path> should "
19205 "be a file or directory in the mounted file system (typically it is the mount "
19206 "point itself, but it doesn't need to be)."
19211 #: ../src/guestfs-actions.pod:6652 ../fish/guestfish-actions.pod:4438
19212 msgid "This is the same as the C<statvfs(2)> system call."
19217 #: ../src/guestfs-actions.pod:6654
19219 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
19220 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
19225 #: ../src/guestfs-actions.pod:6660
19226 msgid "guestfs_strings"
19231 #: ../src/guestfs-actions.pod:6662
19235 " guestfs_strings (guestfs_h *g,\n"
19236 " const char *path);\n"
19242 #: ../src/guestfs-actions.pod:6666 ../fish/guestfish-actions.pod:4444
19244 "This runs the L<strings(1)> command on a file and returns the list of "
19245 "printable strings found."
19250 #: ../src/guestfs-actions.pod:6678
19251 msgid "guestfs_strings_e"
19256 #: ../src/guestfs-actions.pod:6680
19260 " guestfs_strings_e (guestfs_h *g,\n"
19261 " const char *encoding,\n"
19262 " const char *path);\n"
19268 #: ../src/guestfs-actions.pod:6685
19270 "This is like the C<guestfs_strings> command, but allows you to specify the "
19271 "encoding of strings that are looked for in the source file C<path>."
19276 #: ../src/guestfs-actions.pod:6689 ../fish/guestfish-actions.pod:4458
19277 msgid "Allowed encodings are:"
19282 #: ../src/guestfs-actions.pod:6693 ../fish/guestfish-actions.pod:4462
19288 #: ../src/guestfs-actions.pod:6695
19290 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
19291 "ISO-8859-X (this is what C<guestfs_strings> uses)."
19296 #: ../src/guestfs-actions.pod:6698 ../fish/guestfish-actions.pod:4467
19302 #: ../src/guestfs-actions.pod:6700 ../fish/guestfish-actions.pod:4469
19303 msgid "Single 8-bit-byte characters."
19308 #: ../src/guestfs-actions.pod:6702 ../fish/guestfish-actions.pod:4471
19314 #: ../src/guestfs-actions.pod:6704 ../fish/guestfish-actions.pod:4473
19315 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
19320 #: ../src/guestfs-actions.pod:6707 ../fish/guestfish-actions.pod:4476
19321 msgid "l (lower case letter L)"
19326 #: ../src/guestfs-actions.pod:6709 ../fish/guestfish-actions.pod:4478
19328 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
19329 "examining binaries in Windows guests."
19334 #: ../src/guestfs-actions.pod:6712 ../fish/guestfish-actions.pod:4481
19340 #: ../src/guestfs-actions.pod:6714 ../fish/guestfish-actions.pod:4483
19341 msgid "32-bit big endian such as UCS-4BE."
19346 #: ../src/guestfs-actions.pod:6716 ../fish/guestfish-actions.pod:4485
19352 #: ../src/guestfs-actions.pod:6718 ../fish/guestfish-actions.pod:4487
19353 msgid "32-bit little endian such as UCS-4LE."
19358 #: ../src/guestfs-actions.pod:6722 ../fish/guestfish-actions.pod:4491
19359 msgid "The returned strings are transcoded to UTF-8."
19364 #: ../src/guestfs-actions.pod:6733
19365 msgid "guestfs_swapoff_device"
19370 #: ../src/guestfs-actions.pod:6735
19374 " guestfs_swapoff_device (guestfs_h *g,\n"
19375 " const char *device);\n"
19381 #: ../src/guestfs-actions.pod:6739
19383 "This command disables the libguestfs appliance swap device or partition "
19384 "named C<device>. See C<guestfs_swapon_device>."
19389 #: ../src/guestfs-actions.pod:6747
19390 msgid "guestfs_swapoff_file"
19395 #: ../src/guestfs-actions.pod:6749
19399 " guestfs_swapoff_file (guestfs_h *g,\n"
19400 " const char *file);\n"
19406 #: ../src/guestfs-actions.pod:6753 ../fish/guestfish-actions.pod:4508
19407 msgid "This command disables the libguestfs appliance swap on file."
19412 #: ../src/guestfs-actions.pod:6759
19413 msgid "guestfs_swapoff_label"
19418 #: ../src/guestfs-actions.pod:6761
19422 " guestfs_swapoff_label (guestfs_h *g,\n"
19423 " const char *label);\n"
19429 #: ../src/guestfs-actions.pod:6765 ../fish/guestfish-actions.pod:4514
19431 "This command disables the libguestfs appliance swap on labeled swap "
19437 #: ../src/guestfs-actions.pod:6772
19438 msgid "guestfs_swapoff_uuid"
19443 #: ../src/guestfs-actions.pod:6774
19447 " guestfs_swapoff_uuid (guestfs_h *g,\n"
19448 " const char *uuid);\n"
19454 #: ../src/guestfs-actions.pod:6778 ../fish/guestfish-actions.pod:4521
19456 "This command disables the libguestfs appliance swap partition with the given "
19462 #: ../src/guestfs-actions.pod:6785
19463 msgid "guestfs_swapon_device"
19468 #: ../src/guestfs-actions.pod:6787
19472 " guestfs_swapon_device (guestfs_h *g,\n"
19473 " const char *device);\n"
19479 #: ../src/guestfs-actions.pod:6791
19481 "This command enables the libguestfs appliance to use the swap device or "
19482 "partition named C<device>. The increased memory is made available for all "
19483 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
19488 #: ../src/guestfs-actions.pod:6796 ../fish/guestfish-actions.pod:4533
19490 "Note that you should not swap to existing guest swap partitions unless you "
19491 "know what you are doing. They may contain hibernation information, or other "
19492 "information that the guest doesn't want you to trash. You also risk leaking "
19493 "information about the host to the guest this way. Instead, attach a new "
19494 "host device to the guest and swap on that."
19499 #: ../src/guestfs-actions.pod:6807
19500 msgid "guestfs_swapon_file"
19505 #: ../src/guestfs-actions.pod:6809
19509 " guestfs_swapon_file (guestfs_h *g,\n"
19510 " const char *file);\n"
19516 #: ../src/guestfs-actions.pod:6813
19518 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
19524 #: ../src/guestfs-actions.pod:6820
19525 msgid "guestfs_swapon_label"
19530 #: ../src/guestfs-actions.pod:6822
19534 " guestfs_swapon_label (guestfs_h *g,\n"
19535 " const char *label);\n"
19541 #: ../src/guestfs-actions.pod:6826
19543 "This command enables swap to a labeled swap partition. See "
19544 "C<guestfs_swapon_device> for other notes."
19549 #: ../src/guestfs-actions.pod:6833
19550 msgid "guestfs_swapon_uuid"
19555 #: ../src/guestfs-actions.pod:6835
19559 " guestfs_swapon_uuid (guestfs_h *g,\n"
19560 " const char *uuid);\n"
19566 #: ../src/guestfs-actions.pod:6839
19568 "This command enables swap to a swap partition with the given UUID. See "
19569 "C<guestfs_swapon_device> for other notes."
19574 #: ../src/guestfs-actions.pod:6846
19575 msgid "guestfs_sync"
19580 #: ../src/guestfs-actions.pod:6848
19584 " guestfs_sync (guestfs_h *g);\n"
19590 #: ../src/guestfs-actions.pod:6851 ../fish/guestfish-actions.pod:4565
19592 "This syncs the disk, so that any writes are flushed through to the "
19593 "underlying disk image."
19598 #: ../src/guestfs-actions.pod:6854 ../fish/guestfish-actions.pod:4568
19600 "You should always call this if you have modified a disk image, before "
19601 "closing the handle."
19606 #: ../src/guestfs-actions.pod:6861
19607 msgid "guestfs_tail"
19612 #: ../src/guestfs-actions.pod:6863
19616 " guestfs_tail (guestfs_h *g,\n"
19617 " const char *path);\n"
19623 #: ../src/guestfs-actions.pod:6867 ../fish/guestfish-actions.pod:4575
19625 "This command returns up to the last 10 lines of a file as a list of strings."
19630 #: ../src/guestfs-actions.pod:6879
19631 msgid "guestfs_tail_n"
19636 #: ../src/guestfs-actions.pod:6881
19640 " guestfs_tail_n (guestfs_h *g,\n"
19642 " const char *path);\n"
19648 #: ../src/guestfs-actions.pod:6886 ../fish/guestfish-actions.pod:4585
19650 "If the parameter C<nrlines> is a positive number, this returns the last "
19651 "C<nrlines> lines of the file C<path>."
19656 #: ../src/guestfs-actions.pod:6889 ../fish/guestfish-actions.pod:4588
19658 "If the parameter C<nrlines> is a negative number, this returns lines from "
19659 "the file C<path>, starting with the C<-nrlines>th line."
19664 #: ../src/guestfs-actions.pod:6903
19665 msgid "guestfs_tar_in"
19670 #: ../src/guestfs-actions.pod:6905
19674 " guestfs_tar_in (guestfs_h *g,\n"
19675 " const char *tarfile,\n"
19676 " const char *directory);\n"
19682 #: ../src/guestfs-actions.pod:6910 ../fish/guestfish-actions.pod:4600
19684 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
19685 "tar file) into C<directory>."
19690 #: ../src/guestfs-actions.pod:6913
19692 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
19697 #: ../src/guestfs-actions.pod:6918 ../src/guestfs-actions.pod:6935
19698 #: ../src/guestfs-actions.pod:6951 ../src/guestfs-actions.pod:6967
19699 msgid "(Added in 1.0.3)"
19704 #: ../src/guestfs-actions.pod:6920
19705 msgid "guestfs_tar_out"
19710 #: ../src/guestfs-actions.pod:6922
19714 " guestfs_tar_out (guestfs_h *g,\n"
19715 " const char *directory,\n"
19716 " const char *tarfile);\n"
19722 #: ../src/guestfs-actions.pod:6927 ../fish/guestfish-actions.pod:4612
19724 "This command packs the contents of C<directory> and downloads it to local "
19730 #: ../src/guestfs-actions.pod:6930
19732 "To download a compressed tarball, use C<guestfs_tgz_out> or "
19733 "C<guestfs_txz_out>."
19738 #: ../src/guestfs-actions.pod:6937
19739 msgid "guestfs_tgz_in"
19744 #: ../src/guestfs-actions.pod:6939
19748 " guestfs_tgz_in (guestfs_h *g,\n"
19749 " const char *tarball,\n"
19750 " const char *directory);\n"
19756 #: ../src/guestfs-actions.pod:6944 ../fish/guestfish-actions.pod:4624
19758 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
19759 "tar file) into C<directory>."
19764 #: ../src/guestfs-actions.pod:6947
19765 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
19770 #: ../src/guestfs-actions.pod:6953
19771 msgid "guestfs_tgz_out"
19776 #: ../src/guestfs-actions.pod:6955
19780 " guestfs_tgz_out (guestfs_h *g,\n"
19781 " const char *directory,\n"
19782 " const char *tarball);\n"
19788 #: ../src/guestfs-actions.pod:6960 ../fish/guestfish-actions.pod:4635
19790 "This command packs the contents of C<directory> and downloads it to local "
19796 #: ../src/guestfs-actions.pod:6963
19797 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
19802 #: ../src/guestfs-actions.pod:6969
19803 msgid "guestfs_touch"
19808 #: ../src/guestfs-actions.pod:6971
19812 " guestfs_touch (guestfs_h *g,\n"
19813 " const char *path);\n"
19819 #: ../src/guestfs-actions.pod:6975 ../fish/guestfish-actions.pod:4646
19821 "Touch acts like the L<touch(1)> command. It can be used to update the "
19822 "timestamps on a file, or, if the file does not exist, to create a new zero-"
19828 #: ../src/guestfs-actions.pod:6979 ../fish/guestfish-actions.pod:4650
19830 "This command only works on regular files, and will fail on other file types "
19831 "such as directories, symbolic links, block special etc."
19836 #: ../src/guestfs-actions.pod:6986
19837 msgid "guestfs_truncate"
19842 #: ../src/guestfs-actions.pod:6988
19846 " guestfs_truncate (guestfs_h *g,\n"
19847 " const char *path);\n"
19853 #: ../src/guestfs-actions.pod:6992 ../fish/guestfish-actions.pod:4657
19855 "This command truncates C<path> to a zero-length file. The file must exist "
19861 #: ../src/guestfs-actions.pod:6999
19862 msgid "guestfs_truncate_size"
19867 #: ../src/guestfs-actions.pod:7001
19871 " guestfs_truncate_size (guestfs_h *g,\n"
19872 " const char *path,\n"
19873 " int64_t size);\n"
19879 #: ../src/guestfs-actions.pod:7006 ../fish/guestfish-actions.pod:4664
19881 "This command truncates C<path> to size C<size> bytes. The file must exist "
19887 #: ../src/guestfs-actions.pod:7009
19889 "If the current file size is less than C<size> then the file is extended to "
19890 "the required size with zero bytes. This creates a sparse file (ie. disk "
19891 "blocks are not allocated for the file until you write to it). To create a "
19892 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
19897 #: ../src/guestfs-actions.pod:7019
19898 msgid "guestfs_tune2fs_l"
19903 #: ../src/guestfs-actions.pod:7021
19907 " guestfs_tune2fs_l (guestfs_h *g,\n"
19908 " const char *device);\n"
19914 #: ../src/guestfs-actions.pod:7025 ../fish/guestfish-actions.pod:4677
19916 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
19922 #: ../src/guestfs-actions.pod:7028 ../fish/guestfish-actions.pod:4680
19924 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
19925 "for more details. The list of fields returned isn't clearly defined, and "
19926 "depends on both the version of C<tune2fs> that libguestfs was built against, "
19927 "and the filesystem itself."
19932 #: ../src/guestfs-actions.pod:7041
19933 msgid "guestfs_txz_in"
19938 #: ../src/guestfs-actions.pod:7043
19942 " guestfs_txz_in (guestfs_h *g,\n"
19943 " const char *tarball,\n"
19944 " const char *directory);\n"
19950 #: ../src/guestfs-actions.pod:7048 ../fish/guestfish-actions.pod:4689
19952 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
19953 "tar file) into C<directory>."
19958 #: ../src/guestfs-actions.pod:7055
19959 msgid "guestfs_txz_out"
19964 #: ../src/guestfs-actions.pod:7057
19968 " guestfs_txz_out (guestfs_h *g,\n"
19969 " const char *directory,\n"
19970 " const char *tarball);\n"
19976 #: ../src/guestfs-actions.pod:7062 ../fish/guestfish-actions.pod:4698
19978 "This command packs the contents of C<directory> and downloads it to local "
19979 "file C<tarball> (as an xz compressed tar archive)."
19984 #: ../src/guestfs-actions.pod:7069
19985 msgid "guestfs_umask"
19990 #: ../src/guestfs-actions.pod:7071
19994 " guestfs_umask (guestfs_h *g,\n"
20001 #: ../src/guestfs-actions.pod:7075 ../fish/guestfish-actions.pod:4707
20003 "This function sets the mask used for creating new files and device nodes to "
20009 #: ../src/guestfs-actions.pod:7078 ../fish/guestfish-actions.pod:4710
20011 "Typical umask values would be C<022> which creates new files with "
20012 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
20013 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
20018 #: ../src/guestfs-actions.pod:7083 ../fish/guestfish-actions.pod:4715
20020 "The default umask is C<022>. This is important because it means that "
20021 "directories and device nodes will be created with C<0644> or C<0755> mode "
20022 "even if you specify C<0777>."
20027 #: ../src/guestfs-actions.pod:7087
20029 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
20030 "C<guestfs_mkdir>."
20035 #: ../src/guestfs-actions.pod:7090 ../fish/guestfish-actions.pod:4722
20036 msgid "This call returns the previous umask."
20041 #: ../src/guestfs-actions.pod:7096
20042 msgid "guestfs_umount"
20047 #: ../src/guestfs-actions.pod:7098
20051 " guestfs_umount (guestfs_h *g,\n"
20052 " const char *pathordevice);\n"
20058 #: ../src/guestfs-actions.pod:7102 ../fish/guestfish-actions.pod:4730
20060 "This unmounts the given filesystem. The filesystem may be specified either "
20061 "by its mountpoint (path) or the device which contains the filesystem."
20066 #: ../src/guestfs-actions.pod:7110
20067 msgid "guestfs_umount_all"
20072 #: ../src/guestfs-actions.pod:7112
20076 " guestfs_umount_all (guestfs_h *g);\n"
20082 #: ../src/guestfs-actions.pod:7115 ../fish/guestfish-actions.pod:4740
20083 msgid "This unmounts all mounted filesystems."
20088 #: ../src/guestfs-actions.pod:7117 ../fish/guestfish-actions.pod:4742
20089 msgid "Some internal mounts are not unmounted by this call."
20094 #: ../src/guestfs-actions.pod:7123
20095 msgid "guestfs_upload"
20100 #: ../src/guestfs-actions.pod:7125
20104 " guestfs_upload (guestfs_h *g,\n"
20105 " const char *filename,\n"
20106 " const char *remotefilename);\n"
20112 #: ../src/guestfs-actions.pod:7130 ../src/guestfs-actions.pod:7154
20113 #: ../fish/guestfish-actions.pod:4748 ../fish/guestfish-actions.pod:4761
20114 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
20119 #: ../src/guestfs-actions.pod:7135
20120 msgid "See also C<guestfs_download>."
20125 #: ../src/guestfs-actions.pod:7146
20126 msgid "guestfs_upload_offset"
20131 #: ../src/guestfs-actions.pod:7148
20135 " guestfs_upload_offset (guestfs_h *g,\n"
20136 " const char *filename,\n"
20137 " const char *remotefilename,\n"
20138 " int64_t offset);\n"
20144 #: ../src/guestfs-actions.pod:7157 ../fish/guestfish-actions.pod:4764
20146 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
20147 "The intention is to overwrite parts of existing files or devices, although "
20148 "if a non-existant file is specified then it is created with a \"hole\" "
20149 "before C<offset>. The size of the data written is implicit in the size of "
20150 "the source C<filename>."
20155 #: ../src/guestfs-actions.pod:7164
20157 "Note that there is no limit on the amount of data that can be uploaded with "
20158 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
20159 "full amount unless an error occurs."
20164 #: ../src/guestfs-actions.pod:7169
20165 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
20170 #: ../src/guestfs-actions.pod:7180
20171 msgid "guestfs_utimens"
20176 #: ../src/guestfs-actions.pod:7182
20180 " guestfs_utimens (guestfs_h *g,\n"
20181 " const char *path,\n"
20182 " int64_t atsecs,\n"
20183 " int64_t atnsecs,\n"
20184 " int64_t mtsecs,\n"
20185 " int64_t mtnsecs);\n"
20191 #: ../src/guestfs-actions.pod:7190 ../fish/guestfish-actions.pod:4784
20192 msgid "This command sets the timestamps of a file with nanosecond precision."
20197 #: ../src/guestfs-actions.pod:7193 ../fish/guestfish-actions.pod:4787
20199 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
20205 #: ../src/guestfs-actions.pod:7196 ../fish/guestfish-actions.pod:4790
20207 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
20208 "nanoseconds from the epoch."
20213 #: ../src/guestfs-actions.pod:7199 ../fish/guestfish-actions.pod:4793
20215 "If the C<*nsecs> field contains the special value C<-1> then the "
20216 "corresponding timestamp is set to the current time. (The C<*secs> field is "
20217 "ignored in this case)."
20222 #: ../src/guestfs-actions.pod:7203 ../fish/guestfish-actions.pod:4797
20224 "If the C<*nsecs> field contains the special value C<-2> then the "
20225 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
20231 #: ../src/guestfs-actions.pod:7211 ../src/guestfs-structs.pod:175
20232 msgid "guestfs_version"
20237 #: ../src/guestfs-actions.pod:7213
20240 " struct guestfs_version *\n"
20241 " guestfs_version (guestfs_h *g);\n"
20247 #: ../src/guestfs-actions.pod:7216 ../fish/guestfish-actions.pod:4805
20249 "Return the libguestfs version number that the program is linked against."
20254 #: ../src/guestfs-actions.pod:7219 ../fish/guestfish-actions.pod:4808
20256 "Note that because of dynamic linking this is not necessarily the version of "
20257 "libguestfs that you compiled against. You can compile the program, and then "
20258 "at runtime dynamically link against a completely different C<libguestfs.so> "
20264 #: ../src/guestfs-actions.pod:7224 ../fish/guestfish-actions.pod:4813
20266 "This call was added in version C<1.0.58>. In previous versions of "
20267 "libguestfs there was no way to get the version number. From C code you can "
20268 "use dynamic linker functions to find out if this symbol exists (if it "
20269 "doesn't, then it's an earlier version)."
20274 #: ../src/guestfs-actions.pod:7230 ../fish/guestfish-actions.pod:4819
20276 "The call returns a structure with four elements. The first three (C<major>, "
20277 "C<minor> and C<release>) are numbers and correspond to the usual version "
20278 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
20279 "but may be used for distro-specific information."
20284 #: ../src/guestfs-actions.pod:7236 ../fish/guestfish-actions.pod:4825
20286 "To construct the original version string: C<$major.$minor.$release$extra>"
20291 #: ../src/guestfs-actions.pod:7239 ../fish/guestfish-actions.pod:4828
20292 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
20297 #: ../src/guestfs-actions.pod:7241
20299 "I<Note:> Don't use this call to test for availability of features. In "
20300 "enterprise distributions we backport features from later versions into "
20301 "earlier versions, making this an unreliable way to test for features. Use "
20302 "C<guestfs_available> instead."
20307 #: ../src/guestfs-actions.pod:7247
20309 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
20310 "error. I<The caller must call C<guestfs_free_version> after use>."
20315 #: ../src/guestfs-actions.pod:7251
20316 msgid "(Added in 1.0.58)"
20321 #: ../src/guestfs-actions.pod:7253
20322 msgid "guestfs_vfs_label"
20327 #: ../src/guestfs-actions.pod:7255
20331 " guestfs_vfs_label (guestfs_h *g,\n"
20332 " const char *device);\n"
20338 #: ../src/guestfs-actions.pod:7259 ../fish/guestfish-actions.pod:4840
20339 msgid "This returns the filesystem label of the filesystem on C<device>."
20344 #: ../src/guestfs-actions.pod:7262 ../fish/guestfish-actions.pod:4843
20345 msgid "If the filesystem is unlabeled, this returns the empty string."
20350 #: ../src/guestfs-actions.pod:7264
20351 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
20356 #: ../src/guestfs-actions.pod:7269 ../src/guestfs-actions.pod:7306
20357 msgid "(Added in 1.3.18)"
20362 #: ../src/guestfs-actions.pod:7271
20363 msgid "guestfs_vfs_type"
20368 #: ../src/guestfs-actions.pod:7273
20372 " guestfs_vfs_type (guestfs_h *g,\n"
20373 " const char *device);\n"
20379 #: ../src/guestfs-actions.pod:7277 ../fish/guestfish-actions.pod:4851
20381 "This command gets the filesystem type corresponding to the filesystem on "
20387 #: ../src/guestfs-actions.pod:7280 ../fish/guestfish-actions.pod:4854
20389 "For most filesystems, the result is the name of the Linux VFS module which "
20390 "would be used to mount this filesystem if you mounted it without specifying "
20391 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
20396 #: ../src/guestfs-actions.pod:7290
20397 msgid "guestfs_vfs_uuid"
20402 #: ../src/guestfs-actions.pod:7292
20406 " guestfs_vfs_uuid (guestfs_h *g,\n"
20407 " const char *device);\n"
20413 #: ../src/guestfs-actions.pod:7296 ../fish/guestfish-actions.pod:4863
20414 msgid "This returns the filesystem UUID of the filesystem on C<device>."
20419 #: ../src/guestfs-actions.pod:7299 ../fish/guestfish-actions.pod:4866
20420 msgid "If the filesystem does not have a UUID, this returns the empty string."
20425 #: ../src/guestfs-actions.pod:7301
20426 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
20431 #: ../src/guestfs-actions.pod:7308
20432 msgid "guestfs_vg_activate"
20437 #: ../src/guestfs-actions.pod:7310
20441 " guestfs_vg_activate (guestfs_h *g,\n"
20443 " char *const *volgroups);\n"
20448 #: ../src/guestfs-actions.pod:7315 ../fish/guestfish-actions.pod:4874
20450 "This command activates or (if C<activate> is false) deactivates all logical "
20451 "volumes in the listed volume groups C<volgroups>."
20456 #: ../src/guestfs-actions.pod:7318 ../fish/guestfish-actions.pod:4877
20457 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
20462 #: ../src/guestfs-actions.pod:7320 ../fish/guestfish-actions.pod:4879
20464 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
20465 "activated or deactivated."
20470 #: ../src/guestfs-actions.pod:7327
20471 msgid "guestfs_vg_activate_all"
20476 #: ../src/guestfs-actions.pod:7329
20480 " guestfs_vg_activate_all (guestfs_h *g,\n"
20481 " int activate);\n"
20486 #: ../src/guestfs-actions.pod:7333 ../fish/guestfish-actions.pod:4886
20488 "This command activates or (if C<activate> is false) deactivates all logical "
20489 "volumes in all volume groups."
20494 #: ../src/guestfs-actions.pod:7336 ../fish/guestfish-actions.pod:4889
20495 msgid "This command is the same as running C<vgchange -a y|n>"
20500 #: ../src/guestfs-actions.pod:7342
20501 msgid "guestfs_vgcreate"
20506 #: ../src/guestfs-actions.pod:7344
20510 " guestfs_vgcreate (guestfs_h *g,\n"
20511 " const char *volgroup,\n"
20512 " char *const *physvols);\n"
20518 #: ../src/guestfs-actions.pod:7349 ../fish/guestfish-actions.pod:4895
20520 "This creates an LVM volume group called C<volgroup> from the non-empty list "
20521 "of physical volumes C<physvols>."
20526 #: ../src/guestfs-actions.pod:7356
20527 msgid "guestfs_vglvuuids"
20532 #: ../src/guestfs-actions.pod:7358
20536 " guestfs_vglvuuids (guestfs_h *g,\n"
20537 " const char *vgname);\n"
20543 #: ../src/guestfs-actions.pod:7362 ../fish/guestfish-actions.pod:4902
20545 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
20546 "volumes created in this volume group."
20551 #: ../src/guestfs-actions.pod:7365
20553 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
20554 "associate logical volumes and volume groups."
20559 #: ../src/guestfs-actions.pod:7368
20560 msgid "See also C<guestfs_vgpvuuids>."
20565 #: ../src/guestfs-actions.pod:7376
20566 msgid "guestfs_vgpvuuids"
20571 #: ../src/guestfs-actions.pod:7378
20575 " guestfs_vgpvuuids (guestfs_h *g,\n"
20576 " const char *vgname);\n"
20582 #: ../src/guestfs-actions.pod:7382 ../fish/guestfish-actions.pod:4914
20584 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
20585 "volumes that this volume group resides on."
20590 #: ../src/guestfs-actions.pod:7385
20592 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
20593 "associate physical volumes and volume groups."
20598 #: ../src/guestfs-actions.pod:7388
20599 msgid "See also C<guestfs_vglvuuids>."
20604 #: ../src/guestfs-actions.pod:7396
20605 msgid "guestfs_vgremove"
20610 #: ../src/guestfs-actions.pod:7398
20614 " guestfs_vgremove (guestfs_h *g,\n"
20615 " const char *vgname);\n"
20621 #: ../src/guestfs-actions.pod:7402 ../fish/guestfish-actions.pod:4926
20622 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
20627 #: ../src/guestfs-actions.pod:7404 ../fish/guestfish-actions.pod:4928
20629 "This also forcibly removes all logical volumes in the volume group (if any)."
20634 #: ../src/guestfs-actions.pod:7411
20635 msgid "guestfs_vgrename"
20640 #: ../src/guestfs-actions.pod:7413
20644 " guestfs_vgrename (guestfs_h *g,\n"
20645 " const char *volgroup,\n"
20646 " const char *newvolgroup);\n"
20652 #: ../src/guestfs-actions.pod:7418 ../fish/guestfish-actions.pod:4935
20653 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
20658 #: ../src/guestfs-actions.pod:7424
20659 msgid "guestfs_vgs"
20664 #: ../src/guestfs-actions.pod:7426
20668 " guestfs_vgs (guestfs_h *g);\n"
20674 #: ../src/guestfs-actions.pod:7429 ../fish/guestfish-actions.pod:4941
20676 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
20682 #: ../src/guestfs-actions.pod:7432 ../fish/guestfish-actions.pod:4944
20684 "This returns a list of just the volume group names that were detected (eg. "
20690 #: ../src/guestfs-actions.pod:7435
20691 msgid "See also C<guestfs_vgs_full>."
20696 #: ../src/guestfs-actions.pod:7443
20697 msgid "guestfs_vgs_full"
20702 #: ../src/guestfs-actions.pod:7445
20705 " struct guestfs_lvm_vg_list *\n"
20706 " guestfs_vgs_full (guestfs_h *g);\n"
20712 #: ../src/guestfs-actions.pod:7448 ../fish/guestfish-actions.pod:4953
20714 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
20715 "> command. The \"full\" version includes all fields."
20720 #: ../src/guestfs-actions.pod:7451
20722 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
20723 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after use>."
20728 #: ../src/guestfs-actions.pod:7457
20729 msgid "guestfs_vgscan"
20734 #: ../src/guestfs-actions.pod:7459
20738 " guestfs_vgscan (guestfs_h *g);\n"
20744 #: ../src/guestfs-actions.pod:7462 ../fish/guestfish-actions.pod:4960
20746 "This rescans all block devices and rebuilds the list of LVM physical "
20747 "volumes, volume groups and logical volumes."
20752 #: ../src/guestfs-actions.pod:7469
20753 msgid "guestfs_vguuid"
20758 #: ../src/guestfs-actions.pod:7471
20762 " guestfs_vguuid (guestfs_h *g,\n"
20763 " const char *vgname);\n"
20769 #: ../src/guestfs-actions.pod:7475 ../fish/guestfish-actions.pod:4967
20770 msgid "This command returns the UUID of the LVM VG named C<vgname>."
20775 #: ../src/guestfs-actions.pod:7482
20776 msgid "guestfs_wait_ready"
20781 #: ../src/guestfs-actions.pod:7484
20785 " guestfs_wait_ready (guestfs_h *g);\n"
20791 #: ../src/guestfs-actions.pod:7487
20792 msgid "This function is a no op."
20797 #: ../src/guestfs-actions.pod:7489
20799 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
20800 "calling C<guestfs_launch> to wait for the launch to complete. However this "
20801 "is no longer necessary because C<guestfs_launch> now does the waiting."
20806 #: ../src/guestfs-actions.pod:7494
20808 "If you see any calls to this function in code then you can just remove them, "
20809 "unless you want to retain compatibility with older versions of the API."
20813 #: ../src/guestfs-actions.pod:7500
20815 "This function is deprecated. In new code, use the C<launch> call instead."
20820 #: ../src/guestfs-actions.pod:7509
20821 msgid "guestfs_wc_c"
20826 #: ../src/guestfs-actions.pod:7511
20830 " guestfs_wc_c (guestfs_h *g,\n"
20831 " const char *path);\n"
20837 #: ../src/guestfs-actions.pod:7515 ../fish/guestfish-actions.pod:4973
20839 "This command counts the characters in a file, using the C<wc -c> external "
20845 #: ../src/guestfs-actions.pod:7522
20846 msgid "guestfs_wc_l"
20851 #: ../src/guestfs-actions.pod:7524
20855 " guestfs_wc_l (guestfs_h *g,\n"
20856 " const char *path);\n"
20862 #: ../src/guestfs-actions.pod:7528 ../fish/guestfish-actions.pod:4980
20864 "This command counts the lines in a file, using the C<wc -l> external command."
20869 #: ../src/guestfs-actions.pod:7535
20870 msgid "guestfs_wc_w"
20875 #: ../src/guestfs-actions.pod:7537
20879 " guestfs_wc_w (guestfs_h *g,\n"
20880 " const char *path);\n"
20886 #: ../src/guestfs-actions.pod:7541 ../fish/guestfish-actions.pod:4987
20888 "This command counts the words in a file, using the C<wc -w> external command."
20893 #: ../src/guestfs-actions.pod:7548
20894 msgid "guestfs_write"
20899 #: ../src/guestfs-actions.pod:7550
20903 " guestfs_write (guestfs_h *g,\n"
20904 " const char *path,\n"
20905 " const char *content,\n"
20906 " size_t content_size);\n"
20912 #: ../src/guestfs-actions.pod:7556 ../fish/guestfish-actions.pod:4994
20914 "This call creates a file called C<path>. The content of the file is the "
20915 "string C<content> (which can contain any 8 bit data)."
20920 #: ../src/guestfs-actions.pod:7566
20921 msgid "guestfs_write_file"
20926 #: ../src/guestfs-actions.pod:7568
20930 " guestfs_write_file (guestfs_h *g,\n"
20931 " const char *path,\n"
20932 " const char *content,\n"
20939 #: ../src/guestfs-actions.pod:7574 ../fish/guestfish-actions.pod:5004
20941 "This call creates a file called C<path>. The contents of the file is the "
20942 "string C<content> (which can contain any 8 bit data), with length C<size>."
20947 #: ../src/guestfs-actions.pod:7578 ../fish/guestfish-actions.pod:5008
20949 "As a special case, if C<size> is C<0> then the length is calculated using "
20950 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
20955 #: ../src/guestfs-actions.pod:7582 ../fish/guestfish-actions.pod:5012
20957 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
20958 "I<not> work, even if the length is specified."
20963 #: ../src/guestfs-actions.pod:7590 ../fish/guestfish-actions.pod:5018
20965 "This function is deprecated. In new code, use the C<write> call instead."
20970 #: ../src/guestfs-actions.pod:7599
20971 msgid "guestfs_zegrep"
20976 #: ../src/guestfs-actions.pod:7601
20980 " guestfs_zegrep (guestfs_h *g,\n"
20981 " const char *regex,\n"
20982 " const char *path);\n"
20988 #: ../src/guestfs-actions.pod:7606 ../fish/guestfish-actions.pod:5029
20990 "This calls the external C<zegrep> program and returns the matching lines."
20995 #: ../src/guestfs-actions.pod:7618
20996 msgid "guestfs_zegrepi"
21001 #: ../src/guestfs-actions.pod:7620
21005 " guestfs_zegrepi (guestfs_h *g,\n"
21006 " const char *regex,\n"
21007 " const char *path);\n"
21013 #: ../src/guestfs-actions.pod:7625 ../fish/guestfish-actions.pod:5039
21015 "This calls the external C<zegrep -i> program and returns the matching lines."
21020 #: ../src/guestfs-actions.pod:7637
21021 msgid "guestfs_zero"
21026 #: ../src/guestfs-actions.pod:7639
21030 " guestfs_zero (guestfs_h *g,\n"
21031 " const char *device);\n"
21037 #: ../src/guestfs-actions.pod:7643 ../fish/guestfish-actions.pod:5049
21038 msgid "This command writes zeroes over the first few blocks of C<device>."
21043 #: ../src/guestfs-actions.pod:7645 ../fish/guestfish-actions.pod:5051
21045 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
21046 "securely wipe the device). It should be sufficient to remove any partition "
21047 "tables, filesystem superblocks and so on."
21051 #: ../src/guestfs-actions.pod:7649
21053 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
21054 "C<guestfs_is_zero_device>"
21059 #: ../src/guestfs-actions.pod:7661
21060 msgid "guestfs_zero_device"
21065 #: ../src/guestfs-actions.pod:7663
21069 " guestfs_zero_device (guestfs_h *g,\n"
21070 " const char *device);\n"
21076 #: ../src/guestfs-actions.pod:7667
21078 "This command writes zeroes over the entire C<device>. Compare with "
21079 "C<guestfs_zero> which just zeroes the first few blocks of a device."
21084 #: ../src/guestfs-actions.pod:7681
21085 msgid "(Added in 1.3.1)"
21090 #: ../src/guestfs-actions.pod:7683
21091 msgid "guestfs_zerofree"
21096 #: ../src/guestfs-actions.pod:7685
21100 " guestfs_zerofree (guestfs_h *g,\n"
21101 " const char *device);\n"
21107 #: ../src/guestfs-actions.pod:7689 ../fish/guestfish-actions.pod:5073
21109 "This runs the I<zerofree> program on C<device>. This program claims to zero "
21110 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
21111 "possible to compress the filesystem more effectively."
21116 #: ../src/guestfs-actions.pod:7694 ../fish/guestfish-actions.pod:5078
21117 msgid "You should B<not> run this program if the filesystem is mounted."
21122 #: ../src/guestfs-actions.pod:7697 ../fish/guestfish-actions.pod:5081
21124 "It is possible that using this program can damage the filesystem or data on "
21130 #: ../src/guestfs-actions.pod:7704
21131 msgid "guestfs_zfgrep"
21136 #: ../src/guestfs-actions.pod:7706
21140 " guestfs_zfgrep (guestfs_h *g,\n"
21141 " const char *pattern,\n"
21142 " const char *path);\n"
21148 #: ../src/guestfs-actions.pod:7711 ../fish/guestfish-actions.pod:5088
21150 "This calls the external C<zfgrep> program and returns the matching lines."
21155 #: ../src/guestfs-actions.pod:7723
21156 msgid "guestfs_zfgrepi"
21161 #: ../src/guestfs-actions.pod:7725
21165 " guestfs_zfgrepi (guestfs_h *g,\n"
21166 " const char *pattern,\n"
21167 " const char *path);\n"
21173 #: ../src/guestfs-actions.pod:7730 ../fish/guestfish-actions.pod:5098
21175 "This calls the external C<zfgrep -i> program and returns the matching lines."
21180 #: ../src/guestfs-actions.pod:7742
21181 msgid "guestfs_zfile"
21186 #: ../src/guestfs-actions.pod:7744
21190 " guestfs_zfile (guestfs_h *g,\n"
21191 " const char *meth,\n"
21192 " const char *path);\n"
21198 #: ../src/guestfs-actions.pod:7749 ../fish/guestfish-actions.pod:5108
21200 "This command runs C<file> after first decompressing C<path> using C<method>."
21205 #: ../src/guestfs-actions.pod:7752 ../fish/guestfish-actions.pod:5111
21206 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
21211 #: ../src/guestfs-actions.pod:7754
21213 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
21219 #: ../src/guestfs-actions.pod:7760 ../fish/guestfish-actions.pod:5116
21221 "This function is deprecated. In new code, use the C<file> call instead."
21226 #: ../src/guestfs-actions.pod:7769
21227 msgid "guestfs_zgrep"
21232 #: ../src/guestfs-actions.pod:7771
21236 " guestfs_zgrep (guestfs_h *g,\n"
21237 " const char *regex,\n"
21238 " const char *path);\n"
21244 #: ../src/guestfs-actions.pod:7776 ../fish/guestfish-actions.pod:5127
21246 "This calls the external C<zgrep> program and returns the matching lines."
21251 #: ../src/guestfs-actions.pod:7788
21252 msgid "guestfs_zgrepi"
21257 #: ../src/guestfs-actions.pod:7790
21261 " guestfs_zgrepi (guestfs_h *g,\n"
21262 " const char *regex,\n"
21263 " const char *path);\n"
21269 #: ../src/guestfs-actions.pod:7795 ../fish/guestfish-actions.pod:5137
21271 "This calls the external C<zgrep -i> program and returns the matching lines."
21276 #: ../src/guestfs-availability.pod:3
21282 #: ../src/guestfs-availability.pod:5
21284 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
21285 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
21286 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
21287 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
21288 "L</guestfs_aug_save> L</guestfs_aug_set>"
21293 #: ../src/guestfs-availability.pod:21
21299 #: ../src/guestfs-availability.pod:23
21301 "The following functions: L</guestfs_inotify_add_watch> L</"
21302 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
21303 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
21308 #: ../src/guestfs-availability.pod:31
21309 msgid "B<linuxfsuuid>"
21314 #: ../src/guestfs-availability.pod:33
21316 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
21317 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
21322 #: ../src/guestfs-availability.pod:40
21323 msgid "B<linuxmodules>"
21328 #: ../src/guestfs-availability.pod:42
21329 msgid "The following functions: L</guestfs_modprobe>"
21334 #: ../src/guestfs-availability.pod:45
21335 msgid "B<linuxxattrs>"
21340 #: ../src/guestfs-availability.pod:47
21342 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> L</"
21343 "guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> L</"
21344 "guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> L</"
21345 "guestfs_setxattr>"
21350 #: ../src/guestfs-availability.pod:58
21356 #: ../src/guestfs-availability.pod:60
21358 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
21359 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
21360 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
21365 #: ../src/guestfs-availability.pod:69
21371 #: ../src/guestfs-availability.pod:71
21373 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
21374 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
21375 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
21376 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
21377 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
21378 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
21379 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
21384 #: ../src/guestfs-availability.pod:94
21390 #: ../src/guestfs-availability.pod:96
21392 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
21393 "guestfs_mknod_b> L</guestfs_mknod_c>"
21398 #: ../src/guestfs-availability.pod:102
21404 #: ../src/guestfs-availability.pod:104
21405 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
21410 #: ../src/guestfs-availability.pod:107
21411 msgid "B<ntfsprogs>"
21415 #: ../src/guestfs-availability.pod:109
21417 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
21418 "L</guestfs_ntfsresize_size>"
21423 #: ../src/guestfs-availability.pod:114
21424 msgid "B<realpath>"
21429 #: ../src/guestfs-availability.pod:116
21430 msgid "The following functions: L</guestfs_realpath>"
21435 #: ../src/guestfs-availability.pod:119
21441 #: ../src/guestfs-availability.pod:121
21443 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
21444 "guestfs_scrub_freespace>"
21449 #: ../src/guestfs-availability.pod:126
21455 #: ../src/guestfs-availability.pod:128
21456 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
21461 #: ../src/guestfs-availability.pod:132
21467 #: ../src/guestfs-availability.pod:134
21468 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
21473 #: ../src/guestfs-availability.pod:138
21474 msgid "B<zerofree>"
21479 #: ../src/guestfs-availability.pod:140
21480 msgid "The following functions: L</guestfs_zerofree>"
21485 #: ../src/guestfs-structs.pod:1
21486 msgid "guestfs_int_bool"
21491 #: ../src/guestfs-structs.pod:3
21494 " struct guestfs_int_bool {\n"
21503 #: ../src/guestfs-structs.pod:8
21506 " struct guestfs_int_bool_list {\n"
21507 " uint32_t len; /* Number of elements in list. */\n"
21508 " struct guestfs_int_bool *val; /* Elements. */\n"
21515 #: ../src/guestfs-structs.pod:13
21518 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
21519 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
21525 #: ../src/guestfs-structs.pod:16
21526 msgid "guestfs_lvm_pv"
21531 #: ../src/guestfs-structs.pod:18
21534 " struct guestfs_lvm_pv {\n"
21535 " char *pv_name;\n"
21536 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
21537 " char pv_uuid[32];\n"
21539 " uint64_t pv_size;\n"
21540 " uint64_t dev_size;\n"
21541 " uint64_t pv_free;\n"
21542 " uint64_t pv_used;\n"
21543 " char *pv_attr;\n"
21544 " int64_t pv_pe_count;\n"
21545 " int64_t pv_pe_alloc_count;\n"
21546 " char *pv_tags;\n"
21547 " uint64_t pe_start;\n"
21548 " int64_t pv_mda_count;\n"
21549 " uint64_t pv_mda_free;\n"
21556 #: ../src/guestfs-structs.pod:36
21559 " struct guestfs_lvm_pv_list {\n"
21560 " uint32_t len; /* Number of elements in list. */\n"
21561 " struct guestfs_lvm_pv *val; /* Elements. */\n"
21568 #: ../src/guestfs-structs.pod:41
21571 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
21572 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
21578 #: ../src/guestfs-structs.pod:44
21579 msgid "guestfs_lvm_vg"
21584 #: ../src/guestfs-structs.pod:46
21587 " struct guestfs_lvm_vg {\n"
21588 " char *vg_name;\n"
21589 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
21590 " char vg_uuid[32];\n"
21592 " char *vg_attr;\n"
21593 " uint64_t vg_size;\n"
21594 " uint64_t vg_free;\n"
21595 " char *vg_sysid;\n"
21596 " uint64_t vg_extent_size;\n"
21597 " int64_t vg_extent_count;\n"
21598 " int64_t vg_free_count;\n"
21599 " int64_t max_lv;\n"
21600 " int64_t max_pv;\n"
21601 " int64_t pv_count;\n"
21602 " int64_t lv_count;\n"
21603 " int64_t snap_count;\n"
21604 " int64_t vg_seqno;\n"
21605 " char *vg_tags;\n"
21606 " int64_t vg_mda_count;\n"
21607 " uint64_t vg_mda_free;\n"
21614 #: ../src/guestfs-structs.pod:69
21617 " struct guestfs_lvm_vg_list {\n"
21618 " uint32_t len; /* Number of elements in list. */\n"
21619 " struct guestfs_lvm_vg *val; /* Elements. */\n"
21626 #: ../src/guestfs-structs.pod:74
21629 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
21630 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
21636 #: ../src/guestfs-structs.pod:77
21637 msgid "guestfs_lvm_lv"
21642 #: ../src/guestfs-structs.pod:79
21645 " struct guestfs_lvm_lv {\n"
21646 " char *lv_name;\n"
21647 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
21648 " char lv_uuid[32];\n"
21649 " char *lv_attr;\n"
21650 " int64_t lv_major;\n"
21651 " int64_t lv_minor;\n"
21652 " int64_t lv_kernel_major;\n"
21653 " int64_t lv_kernel_minor;\n"
21654 " uint64_t lv_size;\n"
21655 " int64_t seg_count;\n"
21657 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
21658 " float snap_percent;\n"
21659 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
21660 " float copy_percent;\n"
21661 " char *move_pv;\n"
21662 " char *lv_tags;\n"
21663 " char *mirror_log;\n"
21664 " char *modules;\n"
21671 #: ../src/guestfs-structs.pod:101
21674 " struct guestfs_lvm_lv_list {\n"
21675 " uint32_t len; /* Number of elements in list. */\n"
21676 " struct guestfs_lvm_lv *val; /* Elements. */\n"
21683 #: ../src/guestfs-structs.pod:106
21686 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
21687 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
21693 #: ../src/guestfs-structs.pod:111
21696 " struct guestfs_stat {\n"
21700 " int64_t nlink;\n"
21705 " int64_t blksize;\n"
21706 " int64_t blocks;\n"
21707 " int64_t atime;\n"
21708 " int64_t mtime;\n"
21709 " int64_t ctime;\n"
21716 #: ../src/guestfs-structs.pod:127
21719 " struct guestfs_stat_list {\n"
21720 " uint32_t len; /* Number of elements in list. */\n"
21721 " struct guestfs_stat *val; /* Elements. */\n"
21728 #: ../src/guestfs-structs.pod:132
21731 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
21732 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
21738 #: ../src/guestfs-structs.pod:137
21741 " struct guestfs_statvfs {\n"
21742 " int64_t bsize;\n"
21743 " int64_t frsize;\n"
21744 " int64_t blocks;\n"
21745 " int64_t bfree;\n"
21746 " int64_t bavail;\n"
21747 " int64_t files;\n"
21748 " int64_t ffree;\n"
21749 " int64_t favail;\n"
21752 " int64_t namemax;\n"
21759 #: ../src/guestfs-structs.pod:151
21762 " struct guestfs_statvfs_list {\n"
21763 " uint32_t len; /* Number of elements in list. */\n"
21764 " struct guestfs_statvfs *val; /* Elements. */\n"
21771 #: ../src/guestfs-structs.pod:156
21774 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
21775 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
21781 #: ../src/guestfs-structs.pod:159
21782 msgid "guestfs_dirent"
21787 #: ../src/guestfs-structs.pod:161
21790 " struct guestfs_dirent {\n"
21800 #: ../src/guestfs-structs.pod:167
21803 " struct guestfs_dirent_list {\n"
21804 " uint32_t len; /* Number of elements in list. */\n"
21805 " struct guestfs_dirent *val; /* Elements. */\n"
21812 #: ../src/guestfs-structs.pod:172
21815 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
21816 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
21822 #: ../src/guestfs-structs.pod:177
21825 " struct guestfs_version {\n"
21826 " int64_t major;\n"
21827 " int64_t minor;\n"
21828 " int64_t release;\n"
21836 #: ../src/guestfs-structs.pod:184
21839 " struct guestfs_version_list {\n"
21840 " uint32_t len; /* Number of elements in list. */\n"
21841 " struct guestfs_version *val; /* Elements. */\n"
21848 #: ../src/guestfs-structs.pod:189
21851 " void guestfs_free_version (struct guestfs_free_version *);\n"
21852 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
21858 #: ../src/guestfs-structs.pod:192
21859 msgid "guestfs_xattr"
21864 #: ../src/guestfs-structs.pod:194
21867 " struct guestfs_xattr {\n"
21868 " char *attrname;\n"
21869 " /* The next two fields describe a byte array. */\n"
21870 " uint32_t attrval_len;\n"
21871 " char *attrval;\n"
21878 #: ../src/guestfs-structs.pod:201
21881 " struct guestfs_xattr_list {\n"
21882 " uint32_t len; /* Number of elements in list. */\n"
21883 " struct guestfs_xattr *val; /* Elements. */\n"
21890 #: ../src/guestfs-structs.pod:206
21893 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
21894 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
21900 #: ../src/guestfs-structs.pod:209
21901 msgid "guestfs_inotify_event"
21906 #: ../src/guestfs-structs.pod:211
21909 " struct guestfs_inotify_event {\n"
21910 " int64_t in_wd;\n"
21911 " uint32_t in_mask;\n"
21912 " uint32_t in_cookie;\n"
21913 " char *in_name;\n"
21920 #: ../src/guestfs-structs.pod:218
21923 " struct guestfs_inotify_event_list {\n"
21924 " uint32_t len; /* Number of elements in list. */\n"
21925 " struct guestfs_inotify_event *val; /* Elements. */\n"
21932 #: ../src/guestfs-structs.pod:223
21935 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
21936 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
21942 #: ../src/guestfs-structs.pod:226
21943 msgid "guestfs_partition"
21948 #: ../src/guestfs-structs.pod:228
21951 " struct guestfs_partition {\n"
21952 " int32_t part_num;\n"
21953 " uint64_t part_start;\n"
21954 " uint64_t part_end;\n"
21955 " uint64_t part_size;\n"
21962 #: ../src/guestfs-structs.pod:235
21965 " struct guestfs_partition_list {\n"
21966 " uint32_t len; /* Number of elements in list. */\n"
21967 " struct guestfs_partition *val; /* Elements. */\n"
21974 #: ../src/guestfs-structs.pod:240
21977 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
21978 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
21984 #: ../src/guestfs-structs.pod:243
21985 msgid "guestfs_application"
21990 #: ../src/guestfs-structs.pod:245
21993 " struct guestfs_application {\n"
21994 " char *app_name;\n"
21995 " char *app_display_name;\n"
21996 " int32_t app_epoch;\n"
21997 " char *app_version;\n"
21998 " char *app_release;\n"
21999 " char *app_install_path;\n"
22000 " char *app_trans_path;\n"
22001 " char *app_publisher;\n"
22002 " char *app_url;\n"
22003 " char *app_source_package;\n"
22004 " char *app_summary;\n"
22005 " char *app_description;\n"
22012 #: ../src/guestfs-structs.pod:260
22015 " struct guestfs_application_list {\n"
22016 " uint32_t len; /* Number of elements in list. */\n"
22017 " struct guestfs_application *val; /* Elements. */\n"
22024 #: ../src/guestfs-structs.pod:265
22027 " void guestfs_free_application (struct guestfs_free_application *);\n"
22028 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
22034 #: ../fish/guestfish.pod:5
22035 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
22040 #: ../fish/guestfish.pod:9
22043 " guestfish [--options] [commands]\n"
22049 #: ../fish/guestfish.pod:11
22058 #: ../fish/guestfish.pod:13
22061 " guestfish [--ro|--rw] -a disk.img\n"
22067 #: ../fish/guestfish.pod:15
22070 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
22076 #: ../fish/guestfish.pod:17
22079 " guestfish -d libvirt-domain\n"
22085 #: ../fish/guestfish.pod:19
22088 " guestfish [--ro|--rw] -a disk.img -i\n"
22094 #: ../fish/guestfish.pod:21
22097 " guestfish -d libvirt-domain -i\n"
22103 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:15
22104 #: ../tools/virt-win-reg.pl:51 ../tools/virt-tar.pl:64
22110 #: ../fish/guestfish.pod:25
22112 "Using guestfish in read/write mode on live virtual machines can be "
22113 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
22114 "option to use guestfish safely if the disk image or virtual machine might be "
22120 #: ../fish/guestfish.pod:32
22122 "Guestfish is a shell and command-line tool for examining and modifying "
22123 "virtual machine filesystems. It uses libguestfs and exposes all of the "
22124 "functionality of the guestfs API, see L<guestfs(3)>."
22129 #: ../fish/guestfish.pod:36
22131 "Guestfish gives you structured access to the libguestfs API, from shell "
22132 "scripts or the command line or interactively. If you want to rescue a "
22133 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
22139 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:949
22140 #: ../fuse/guestmount.pod:39 ../tools/virt-tar.pl:50
22146 #: ../fish/guestfish.pod:43
22147 msgid "As an interactive shell"
22152 #: ../fish/guestfish.pod:45
22161 #: ../fish/guestfish.pod:47
22164 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
22165 " editing virtual machine filesystems.\n"
22171 #: ../fish/guestfish.pod:50
22174 " Type: 'help' for a list of commands\n"
22175 " 'man' to read the manual\n"
22176 " 'quit' to quit the shell\n"
22182 #: ../fish/guestfish.pod:54
22185 " ><fs> add-ro disk.img\n"
22187 " ><fs> list-filesystems\n"
22188 " /dev/sda1: ext4\n"
22189 " /dev/vg_guest/lv_root: ext4\n"
22190 " /dev/vg_guest/lv_swap: swap\n"
22191 " ><fs> mount /dev/vg_guest/lv_root /\n"
22192 " ><fs> cat /etc/fstab\n"
22194 " # Created by anaconda\n"
22202 #: ../fish/guestfish.pod:67
22203 msgid "From shell scripts"
22208 #: ../fish/guestfish.pod:69
22209 msgid "Create a new C</etc/motd> file in a guest or disk image:"
22214 #: ../fish/guestfish.pod:71
22217 " guestfish <<_EOF_\n"
22220 " mount /dev/vg_guest/lv_root /\n"
22221 " write /etc/motd \"Welcome, new users\"\n"
22228 #: ../fish/guestfish.pod:78
22229 msgid "List the LVM logical volumes in a disk image:"
22234 #: ../fish/guestfish.pod:80
22237 " guestfish -a disk.img --ro <<_EOF_\n"
22246 #: ../fish/guestfish.pod:85
22247 msgid "List all the filesystems in a disk image:"
22252 #: ../fish/guestfish.pod:87
22255 " guestfish -a disk.img --ro <<_EOF_\n"
22257 " list-filesystems\n"
22264 #: ../fish/guestfish.pod:92
22265 msgid "On one command line"
22270 #: ../fish/guestfish.pod:94
22271 msgid "Update C</etc/resolv.conf> in a guest:"
22276 #: ../fish/guestfish.pod:96
22280 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
22281 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
22287 #: ../fish/guestfish.pod:100
22288 msgid "Edit C</boot/grub/grub.conf> interactively:"
22293 #: ../fish/guestfish.pod:102
22296 " guestfish --rw --add disk.img \\\n"
22297 " --mount /dev/vg_guest/lv_root \\\n"
22298 " --mount /dev/sda1:/boot \\\n"
22299 " edit /boot/grub/grub.conf\n"
22305 #: ../fish/guestfish.pod:107
22306 msgid "Mount disks automatically"
22311 #: ../fish/guestfish.pod:109
22313 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
22318 #: ../fish/guestfish.pod:112
22321 " guestfish --ro -a disk.img -i cat /etc/group\n"
22327 #: ../fish/guestfish.pod:114
22330 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
22336 #: ../fish/guestfish.pod:116
22337 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
22342 #: ../fish/guestfish.pod:118
22345 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
22351 #: ../fish/guestfish.pod:120
22352 msgid "As a script interpreter"
22357 #: ../fish/guestfish.pod:122
22358 msgid "Create a 100MB disk containing an ext2-formatted partition:"
22363 #: ../fish/guestfish.pod:124
22366 " #!/usr/bin/guestfish -f\n"
22367 " sparse test1.img 100M\n"
22369 " part-disk /dev/sda mbr\n"
22370 " mkfs ext2 /dev/sda1\n"
22376 #: ../fish/guestfish.pod:130
22377 msgid "Start with a prepared disk"
22382 #: ../fish/guestfish.pod:132
22384 "An alternate way to create a 100MB disk called C<test1.img> containing a "
22385 "single ext2-formatted partition:"
22390 #: ../fish/guestfish.pod:135
22393 " guestfish -N fs\n"
22399 #: ../fish/guestfish.pod:137
22400 msgid "To list what is available do:"
22405 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:940
22408 " guestfish -N help | less\n"
22414 #: ../fish/guestfish.pod:141
22415 msgid "Remote control"
22420 #: ../fish/guestfish.pod:143
22423 " eval \"`guestfish --listen`\"\n"
22424 " guestfish --remote add-ro disk.img\n"
22425 " guestfish --remote run\n"
22426 " guestfish --remote lvs\n"
22432 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37
22433 #: ../fuse/guestmount.pod:83 ../tools/virt-win-reg.pl:96
22434 #: ../tools/virt-list-filesystems.pl:53 ../tools/virt-tar.pl:103
22435 #: ../tools/virt-make-fs.pl:153 ../tools/virt-list-partitions.pl:54
22441 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:143
22442 #: ../tools/virt-win-reg.pl:104 ../tools/virt-list-filesystems.pl:61
22443 #: ../tools/virt-tar.pl:111 ../tools/virt-make-fs.pl:161
22444 #: ../tools/virt-list-partitions.pl:62
22450 #: ../fish/guestfish.pod:154
22451 msgid "Displays general help on options."
22456 #: ../fish/guestfish.pod:156
22462 #: ../fish/guestfish.pod:158
22463 msgid "B<--cmd-help>"
22468 #: ../fish/guestfish.pod:160
22469 msgid "Lists all available guestfish commands."
22474 #: ../fish/guestfish.pod:162
22480 #: ../fish/guestfish.pod:164
22481 msgid "B<--cmd-help cmd>"
22486 #: ../fish/guestfish.pod:166
22487 msgid "Displays detailed help on a single command C<cmd>."
22492 #: ../fish/guestfish.pod:168
22493 msgid "B<-a image>"
22498 #: ../fish/guestfish.pod:170
22499 msgid "B<--add image>"
22504 #: ../fish/guestfish.pod:172
22505 msgid "Add a block device or virtual machine image to the shell."
22510 #: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:91
22512 "The format of the disk image is auto-detected. To override this and force a "
22513 "particular format use the I<--format=..> option."
22517 #: ../fish/guestfish.pod:177
22519 "Using this flag is mostly equivalent to using the C<add> command, with "
22520 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
22521 "the I<--format=...> flag was given."
22526 #: ../fish/guestfish.pod:181
22532 #: ../fish/guestfish.pod:183
22533 msgid "B<--connect URI>"
22538 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:96
22540 "When used in conjunction with the I<-d> option, this specifies the libvirt "
22541 "URI to use. The default is to use the default libvirt connection."
22546 #: ../fish/guestfish.pod:189
22552 #: ../fish/guestfish.pod:191
22554 "If using the I<--listen> option and a csh-like shell, use this option. See "
22555 "section L</REMOTE CONTROL AND CSH> below."
22560 #: ../fish/guestfish.pod:194
22561 msgid "B<-d libvirt-domain>"
22566 #: ../fish/guestfish.pod:196
22567 msgid "B<--domain libvirt-domain>"
22572 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:102
22574 "Add disks from the named libvirt domain. If the I<--ro> option is also "
22575 "used, then any libvirt domain can be used. However in write mode, only "
22576 "libvirt domains which are shut down can be named here."
22580 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:106
22581 msgid "Domain UUIDs can be used instead of names."
22586 #: ../fish/guestfish.pod:204
22588 "Using this flag is mostly equivalent to using the C<add-domain> command, "
22589 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
22590 "if the I<--format:...> flag was given."
22595 #: ../fish/guestfish.pod:208
22601 #: ../fish/guestfish.pod:210
22602 msgid "B<--no-dest-paths>"
22607 #: ../fish/guestfish.pod:212
22609 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
22610 "to hit the tab key to complete paths on the guest filesystem, but this "
22611 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
22612 "allow this feature to be disabled."
22617 #: ../fish/guestfish.pod:217 ../fuse/guestmount.pod:120
22618 msgid "B<--echo-keys>"
22623 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:122
22625 "When prompting for keys and passphrases, guestfish normally turns echoing "
22626 "off so you cannot see what you are typing. If you are not worried about "
22627 "Tempest attacks and there is no one else in the room you can specify this "
22628 "flag to see what you are typing."
22633 #: ../fish/guestfish.pod:224
22639 #: ../fish/guestfish.pod:226
22640 msgid "B<--file file>"
22645 #: ../fish/guestfish.pod:228
22646 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
22651 #: ../fish/guestfish.pod:231
22654 " #!/usr/bin/guestfish -f\n"
22660 #: ../fish/guestfish.pod:233
22661 msgid "B<--format=raw|qcow2|..>"
22666 #: ../fish/guestfish.pod:235
22667 msgid "B<--format>"
22672 #: ../fish/guestfish.pod:237 ../fuse/guestmount.pod:129
22674 "The default for the I<-a> option is to auto-detect the format of the disk "
22675 "image. Using this forces the disk format for I<-a> options which follow on "
22676 "the command line. Using I<--format> with no argument switches back to auto-"
22677 "detection for subsequent I<-a> options."
22682 #: ../fish/guestfish.pod:244
22685 " guestfish --format=raw -a disk.img\n"
22691 #: ../fish/guestfish.pod:246
22692 msgid "forces raw format (no auto-detection) for C<disk.img>."
22697 #: ../fish/guestfish.pod:248
22700 " guestfish --format=raw -a disk.img --format -a another.img\n"
22706 #: ../fish/guestfish.pod:250
22708 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
22709 "detection for C<another.img>."
22714 #: ../fish/guestfish.pod:253
22716 "If you have untrusted raw-format guest disk images, you should use this "
22717 "option to specify the disk format. This avoids a possible security problem "
22718 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
22723 #: ../fish/guestfish.pod:258
22729 #: ../fish/guestfish.pod:260
22730 msgid "B<--inspector>"
22735 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:149
22737 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
22738 "system and mount filesystems as they would be mounted on the real virtual "
22744 #: ../fish/guestfish.pod:266
22745 msgid "Typical usage is either:"
22750 #: ../fish/guestfish.pod:268
22753 " guestfish -d myguest -i\n"
22759 #: ../fish/guestfish.pod:270
22760 msgid "(for an inactive libvirt domain called I<myguest>), or:"
22765 #: ../fish/guestfish.pod:272
22768 " guestfish --ro -d myguest -i\n"
22774 #: ../fish/guestfish.pod:274
22775 msgid "(for active domains, readonly), or specify the block device directly:"
22780 #: ../fish/guestfish.pod:276
22783 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
22789 #: ../fish/guestfish.pod:278
22791 "Note that the command line syntax changed slightly over older versions of "
22792 "guestfish. You can still use the old syntax:"
22797 #: ../fish/guestfish.pod:281
22800 " guestfish [--ro] -i disk.img\n"
22806 #: ../fish/guestfish.pod:283
22809 " guestfish [--ro] -i libvirt-domain\n"
22815 #: ../fish/guestfish.pod:285
22817 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
22818 "then using other commands to mount the filesystems that were found."
22823 #: ../fish/guestfish.pod:289 ../fuse/guestmount.pod:153
22824 msgid "B<--keys-from-stdin>"
22829 #: ../fish/guestfish.pod:291 ../fuse/guestmount.pod:155
22831 "Read key or passphrase parameters from stdin. The default is to try to read "
22832 "passphrases from the user by opening C</dev/tty>."
22837 #: ../fish/guestfish.pod:294
22838 msgid "B<--listen>"
22843 #: ../fish/guestfish.pod:296
22845 "Fork into the background and listen for remote commands. See section L</"
22846 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
22850 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:158
22855 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:160
22857 "Connect to a live virtual machine. (Experimental, see L<guestfs(3)/"
22858 "ATTACHING TO RUNNING DAEMONS>)."
22862 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:163
22863 msgid "B<-m dev[:mountpoint[:options]]>"
22867 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:165
22868 msgid "B<--mount dev[:mountpoint[:options]]>"
22873 #: ../fish/guestfish.pod:308
22874 msgid "Mount the named partition or logical volume on the given mountpoint."
22879 #: ../fish/guestfish.pod:310
22880 msgid "If the mountpoint is omitted, it defaults to C</>."
22885 #: ../fish/guestfish.pod:312
22886 msgid "You have to mount something on C</> before most commands will work."
22891 #: ../fish/guestfish.pod:314
22893 "If any I<-m> or I<--mount> options are given, the guest is automatically "
22899 #: ../fish/guestfish.pod:317
22901 "If you don't know what filesystems a disk image contains, you can either run "
22902 "guestfish without this option, then list the partitions, filesystems and LVs "
22903 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
22904 "commands), or you can use the L<virt-filesystems(1)> program."
22908 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:173
22910 "The third (and rarely used) part of the mount parameter is the list of mount "
22911 "options used to mount the underlying filesystem. If this is not given, then "
22912 "the mount options are either the empty string or C<ro> (the latter if the "
22913 "I<--ro> flag is used). By specifying the mount options, you override this "
22914 "default choice. Probably the only time you would use this is to enable ACLs "
22915 "and/or extended attributes if the filesystem can support them:"
22919 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:181
22922 " -m /dev/sda1:/:acl,user_xattr\n"
22927 #: ../fish/guestfish.pod:333
22928 msgid "Using this flag is equivalent to using the C<mount-options> command."
22933 #: ../fish/guestfish.pod:335
22939 #: ../fish/guestfish.pod:337
22940 msgid "B<--no-sync>"
22945 #: ../fish/guestfish.pod:339
22947 "Disable autosync. This is enabled by default. See the discussion of "
22948 "autosync in the L<guestfs(3)> manpage."
22953 #: ../fish/guestfish.pod:342
22959 #: ../fish/guestfish.pod:344
22960 msgid "B<--new type>"
22965 #: ../fish/guestfish.pod:346
22971 #: ../fish/guestfish.pod:348
22973 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
22974 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
22975 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
22981 #: ../fish/guestfish.pod:353
22982 msgid "B<--progress-bars>"
22987 #: ../fish/guestfish.pod:355
22988 msgid "Enable progress bars, even when guestfish is used non-interactively."
22993 #: ../fish/guestfish.pod:357
22995 "Progress bars are enabled by default when guestfish is used as an "
22996 "interactive shell."
23001 #: ../fish/guestfish.pod:360
23002 msgid "B<--no-progress-bars>"
23007 #: ../fish/guestfish.pod:362
23008 msgid "Disable progress bars."
23013 #: ../fish/guestfish.pod:364
23014 msgid "B<--remote[=pid]>"
23019 #: ../fish/guestfish.pod:366
23021 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
23022 "CONTROL GUESTFISH OVER A SOCKET> below."
23027 #: ../fish/guestfish.pod:369
23033 #: ../fish/guestfish.pod:371
23039 #: ../fish/guestfish.pod:373
23041 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
23042 "mounts are done read-only."
23047 #: ../fish/guestfish.pod:376
23049 "The option must always be used if the disk image or virtual machine might be "
23050 "running, and is generally recommended in cases where you don't need write "
23051 "access to the disk."
23056 #: ../fish/guestfish.pod:380
23058 "Note that prepared disk images created with I<-N> are not affected by this "
23059 "option. Also commands like C<add> are not affected - you have to specify "
23060 "the C<readonly:true> option explicitly if you need it."
23065 #: ../fish/guestfish.pod:384
23066 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
23071 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:237
23072 msgid "B<--selinux>"
23077 #: ../fish/guestfish.pod:388
23078 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
23083 #: ../fish/guestfish.pod:390
23089 #: ../fish/guestfish.pod:392
23090 msgid "B<--verbose>"
23095 #: ../fish/guestfish.pod:394
23097 "Enable very verbose messages. This is particularly useful if you find a bug."
23102 #: ../fish/guestfish.pod:397
23108 #: ../fish/guestfish.pod:399 ../tools/virt-win-reg.pl:112
23109 #: ../tools/virt-list-filesystems.pl:69 ../tools/virt-tar.pl:119
23110 #: ../tools/virt-make-fs.pl:169 ../tools/virt-list-partitions.pl:70
23111 msgid "B<--version>"
23116 #: ../fish/guestfish.pod:401
23117 msgid "Display the guestfish / libguestfs version number and exit."
23122 #: ../fish/guestfish.pod:403
23128 #: ../fish/guestfish.pod:405
23133 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:251
23135 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
23136 "mounts are done read-write."
23140 #: ../fish/guestfish.pod:410
23141 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
23146 #: ../fish/guestfish.pod:412
23152 #: ../fish/guestfish.pod:414
23153 msgid "Echo each command before executing it."
23158 #: ../fish/guestfish.pod:418
23159 msgid "COMMANDS ON COMMAND LINE"
23164 #: ../fish/guestfish.pod:420
23166 "Any additional (non-option) arguments are treated as commands to execute."
23171 #: ../fish/guestfish.pod:423
23173 "Commands to execute should be separated by a colon (C<:>), where the colon "
23174 "is a separate parameter. Thus:"
23179 #: ../fish/guestfish.pod:426
23182 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
23188 #: ../fish/guestfish.pod:428
23190 "If there are no additional arguments, then we enter a shell, either an "
23191 "interactive shell with a prompt (if the input is a terminal) or a non-"
23192 "interactive shell."
23197 #: ../fish/guestfish.pod:432
23199 "In either command line mode or non-interactive shell, the first command that "
23200 "gives an error causes the whole shell to exit. In interactive mode (with a "
23201 "prompt) if a command fails, you can continue to enter commands."
23206 #: ../fish/guestfish.pod:437
23207 msgid "USING launch (OR run)"
23212 #: ../fish/guestfish.pod:439
23214 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
23215 "then launch it, then mount any disks you need, and finally issue actions/"
23216 "commands. So the general order of the day is:"
23221 #: ../fish/guestfish.pod:447
23222 msgid "add or -a/--add"
23227 #: ../fish/guestfish.pod:451
23228 msgid "launch (aka run)"
23233 #: ../fish/guestfish.pod:455
23234 msgid "mount or -m/--mount"
23239 #: ../fish/guestfish.pod:459
23240 msgid "any other commands"
23245 #: ../fish/guestfish.pod:463
23247 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
23248 "guest before mounting or performing any other commands."
23253 #: ../fish/guestfish.pod:466
23255 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
23256 "I<--new> options were given then C<run> is done automatically, simply "
23257 "because guestfish can't perform the action you asked for without doing this."
23262 #: ../fish/guestfish.pod:471
23263 msgid "OPENING DISKS FOR READ AND WRITE"
23267 #: ../fish/guestfish.pod:473
23269 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
23270 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
23271 "I<-i> and I<-m> open disk images read-only or for writing."
23275 #: ../fish/guestfish.pod:478
23277 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
23278 "opening disk images supplied on the command line for write. To open a disk "
23279 "image read-only you have to do I<-a image --ro>."
23284 #: ../fish/guestfish.pod:482
23286 "This matters: If you accidentally open a live VM disk image writable then "
23287 "you will cause irreversible disk corruption."
23291 #: ../fish/guestfish.pod:485
23293 "By libguestfs 1.12 we intend to change the default the other way. Disk "
23294 "images will be opened read-only. You will have to either specify "
23295 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
23296 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
23297 "access for disk images specified by those other command line options."
23301 #: ../fish/guestfish.pod:492
23303 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
23304 "which does nothing (it is already the default). However it is highly "
23305 "recommended that you use this option to indicate that you need write access, "
23306 "and prepare your scripts for the day when this option will be required for "
23312 #: ../fish/guestfish.pod:498
23314 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
23315 "other libguestfs program apart from guestfish and guestmount."
23320 #: ../fish/guestfish.pod:501
23326 #: ../fish/guestfish.pod:503
23328 "You can quote ordinary parameters using either single or double quotes. For "
23334 #: ../fish/guestfish.pod:506
23337 " add \"file with a space.img\"\n"
23343 #: ../fish/guestfish.pod:508
23346 " rm '/file name'\n"
23352 #: ../fish/guestfish.pod:510
23361 #: ../fish/guestfish.pod:512
23363 "A few commands require a list of strings to be passed. For these, use a "
23364 "whitespace-separated list, enclosed in quotes. Strings containing "
23365 "whitespace to be passed through must be enclosed in single quotes. A "
23366 "literal single quote must be escaped with a backslash."
23371 #: ../fish/guestfish.pod:517
23374 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
23375 " command \"/bin/echo 'foo bar'\"\n"
23376 " command \"/bin/echo \\'foo\\'\"\n"
23382 #: ../fish/guestfish.pod:521
23383 msgid "OPTIONAL ARGUMENTS"
23388 #: ../fish/guestfish.pod:523
23390 "Some commands take optional arguments. These arguments appear in this "
23391 "documentation as C<[argname:..]>. You can use them as in these examples:"
23396 #: ../fish/guestfish.pod:527
23399 " add-drive-opts filename\n"
23405 #: ../fish/guestfish.pod:529
23408 " add-drive-opts filename readonly:true\n"
23414 #: ../fish/guestfish.pod:531
23417 " add-drive-opts filename format:qcow2 readonly:false\n"
23423 #: ../fish/guestfish.pod:533
23425 "Each optional argument can appear at most once. All optional arguments must "
23426 "appear after the required ones."
23431 #: ../fish/guestfish.pod:536
23437 #: ../fish/guestfish.pod:538
23439 "This section applies to all commands which can take integers as parameters."
23444 #: ../fish/guestfish.pod:541
23445 msgid "SIZE SUFFIX"
23450 #: ../fish/guestfish.pod:543
23452 "When the command takes a parameter measured in bytes, you can use one of the "
23453 "following suffixes to specify kilobytes, megabytes and larger sizes:"
23458 #: ../fish/guestfish.pod:549
23459 msgid "B<k> or B<K> or B<KiB>"
23464 #: ../fish/guestfish.pod:551
23465 msgid "The size in kilobytes (multiplied by 1024)."
23470 #: ../fish/guestfish.pod:553
23476 #: ../fish/guestfish.pod:555
23477 msgid "The size in SI 1000 byte units."
23482 #: ../fish/guestfish.pod:557
23483 msgid "B<M> or B<MiB>"
23488 #: ../fish/guestfish.pod:559
23489 msgid "The size in megabytes (multiplied by 1048576)."
23494 #: ../fish/guestfish.pod:561
23500 #: ../fish/guestfish.pod:563
23501 msgid "The size in SI 1000000 byte units."
23506 #: ../fish/guestfish.pod:565
23507 msgid "B<G> or B<GiB>"
23512 #: ../fish/guestfish.pod:567
23513 msgid "The size in gigabytes (multiplied by 2**30)."
23518 #: ../fish/guestfish.pod:569
23524 #: ../fish/guestfish.pod:571
23525 msgid "The size in SI 10**9 byte units."
23530 #: ../fish/guestfish.pod:573
23531 msgid "B<T> or B<TiB>"
23536 #: ../fish/guestfish.pod:575
23537 msgid "The size in terabytes (multiplied by 2**40)."
23542 #: ../fish/guestfish.pod:577
23548 #: ../fish/guestfish.pod:579
23549 msgid "The size in SI 10**12 byte units."
23554 #: ../fish/guestfish.pod:581
23555 msgid "B<P> or B<PiB>"
23560 #: ../fish/guestfish.pod:583
23561 msgid "The size in petabytes (multiplied by 2**50)."
23566 #: ../fish/guestfish.pod:585
23572 #: ../fish/guestfish.pod:587
23573 msgid "The size in SI 10**15 byte units."
23578 #: ../fish/guestfish.pod:589
23579 msgid "B<E> or B<EiB>"
23584 #: ../fish/guestfish.pod:591
23585 msgid "The size in exabytes (multiplied by 2**60)."
23590 #: ../fish/guestfish.pod:593
23596 #: ../fish/guestfish.pod:595
23597 msgid "The size in SI 10**18 byte units."
23602 #: ../fish/guestfish.pod:597
23603 msgid "B<Z> or B<ZiB>"
23608 #: ../fish/guestfish.pod:599
23609 msgid "The size in zettabytes (multiplied by 2**70)."
23614 #: ../fish/guestfish.pod:601
23620 #: ../fish/guestfish.pod:603
23621 msgid "The size in SI 10**21 byte units."
23626 #: ../fish/guestfish.pod:605
23627 msgid "B<Y> or B<YiB>"
23632 #: ../fish/guestfish.pod:607
23633 msgid "The size in yottabytes (multiplied by 2**80)."
23638 #: ../fish/guestfish.pod:609
23644 #: ../fish/guestfish.pod:611
23645 msgid "The size in SI 10**24 byte units."
23650 #: ../fish/guestfish.pod:617
23653 " truncate-size /file 1G\n"
23659 #: ../fish/guestfish.pod:619
23660 msgid "would truncate the file to 1 gigabyte."
23665 #: ../fish/guestfish.pod:621
23667 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
23668 "the parameter to L</memsize> is specified in megabytes already). Adding a "
23669 "suffix will probably not do what you expect."
23674 #: ../fish/guestfish.pod:625
23675 msgid "OCTAL AND HEXADECIMAL NUMBERS"
23680 #: ../fish/guestfish.pod:627
23682 "For specifying the radix (base) use the C convention: C<0> to prefix an "
23683 "octal number or C<0x> to prefix a hexadecimal number. For example:"
23688 #: ../fish/guestfish.pod:630
23691 " 1234 decimal number 1234\n"
23692 " 02322 octal number, equivalent to decimal 1234\n"
23693 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
23699 #: ../fish/guestfish.pod:634
23701 "When using the C<chmod> command, you almost always want to specify an octal "
23702 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
23703 "L<chmod(1)> program):"
23708 #: ../fish/guestfish.pod:638
23711 " chmod 0777 /public # OK\n"
23712 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
23718 #: ../fish/guestfish.pod:641
23720 "Commands that return numbers usually print them in decimal, but some "
23721 "commands print numbers in other radices (eg. C<umask> prints the mode in "
23722 "octal, preceeded by C<0>)."
23727 #: ../fish/guestfish.pod:645
23728 msgid "WILDCARDS AND GLOBBING"
23733 #: ../fish/guestfish.pod:647
23735 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
23736 "(globbing) by default. So for example the following will not do what you "
23742 #: ../fish/guestfish.pod:651
23751 #: ../fish/guestfish.pod:653
23753 "Assuming you don't have a directory called literally C</home/*> then the "
23754 "above command will return an error."
23759 #: ../fish/guestfish.pod:656
23760 msgid "To perform wildcard expansion, use the C<glob> command."
23765 #: ../fish/guestfish.pod:658
23768 " glob rm-rf /home/*\n"
23774 #: ../fish/guestfish.pod:660
23776 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
23777 "many times), equivalent to:"
23782 #: ../fish/guestfish.pod:663
23785 " rm-rf /home/jim\n"
23786 " rm-rf /home/joe\n"
23787 " rm-rf /home/mary\n"
23793 #: ../fish/guestfish.pod:667
23794 msgid "C<glob> only works on simple guest paths and not on device names."
23799 #: ../fish/guestfish.pod:669
23801 "If you have several parameters, each containing a wildcard, then glob will "
23802 "perform a Cartesian product."
23807 #: ../fish/guestfish.pod:672
23813 #: ../fish/guestfish.pod:674
23815 "Any line which starts with a I<#> character is treated as a comment and "
23816 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
23817 "a command. For example:"
23822 #: ../fish/guestfish.pod:678
23825 " # this is a comment\n"
23826 " # this is a comment\n"
23827 " foo # NOT a comment\n"
23833 #: ../fish/guestfish.pod:682
23834 msgid "Blank lines are also ignored."
23839 #: ../fish/guestfish.pod:684
23840 msgid "RUNNING COMMANDS LOCALLY"
23845 #: ../fish/guestfish.pod:686
23847 "Any line which starts with a I<!> character is treated as a command sent to "
23848 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
23853 #: ../fish/guestfish.pod:690
23857 " tgz-out /remote local/remote-data.tar.gz\n"
23863 #: ../fish/guestfish.pod:693
23865 "will create a directory C<local> on the host, and then export the contents "
23866 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
23867 "(See C<tgz-out>)."
23872 #: ../fish/guestfish.pod:697
23874 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
23875 "effect, due to the way that subprocesses work in Unix."
23879 #: ../fish/guestfish.pod:700
23880 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
23884 #: ../fish/guestfish.pod:702
23886 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
23887 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
23888 "and executed as guestfish commands."
23892 #: ../fish/guestfish.pod:706
23894 "Thus you can use shell script to construct arbitrary guestfish commands "
23895 "which are then parsed by guestfish."
23899 #: ../fish/guestfish.pod:709
23901 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
23902 "through C</foo.100>) using guestfish commands alone. However this is simple "
23903 "if we use a shell script to create the guestfish commands for us:"
23907 #: ../fish/guestfish.pod:714
23910 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
23915 #: ../fish/guestfish.pod:716
23916 msgid "or with names like C</foo.001>:"
23920 #: ../fish/guestfish.pod:718
23923 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
23928 #: ../fish/guestfish.pod:720
23930 "When using guestfish interactively it can be helpful to just run the shell "
23931 "script first (ie. remove the initial C<E<lt>> character so it is just an "
23932 "ordinary I<!> local command), see what guestfish commands it would run, and "
23933 "when you are happy with those prepend the C<E<lt>> character to run the "
23934 "guestfish commands for real."
23939 #: ../fish/guestfish.pod:726
23945 #: ../fish/guestfish.pod:728
23947 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
23948 "command (a guestfish command) to the second command (any host command). For "
23954 #: ../fish/guestfish.pod:732
23957 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
23963 #: ../fish/guestfish.pod:734
23965 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
23966 "program). The above command would list all accounts in the guest filesystem "
23967 "which have UID 0, ie. root accounts including backdoors. Other examples:"
23972 #: ../fish/guestfish.pod:739
23975 " hexdump /bin/ls | head\n"
23976 " list-devices | tail -1\n"
23977 " tgz-out / - | tar ztf -\n"
23983 #: ../fish/guestfish.pod:743
23985 "The space before the pipe symbol is required, any space after the pipe "
23986 "symbol is optional. Everything after the pipe symbol is just passed "
23987 "straight to the host shell, so it can contain redirections, globs and "
23988 "anything else that makes sense on the host side."
23993 #: ../fish/guestfish.pod:748
23995 "To use a literal argument which begins with a pipe symbol, you have to quote "
24001 #: ../fish/guestfish.pod:751
24010 #: ../fish/guestfish.pod:753
24011 msgid "HOME DIRECTORIES"
24016 #: ../fish/guestfish.pod:755
24018 "If a parameter starts with the character C<~> then the tilde may be expanded "
24019 "as a home directory path (either C<~> for the current user's home directory, "
24020 "or C<~user> for another user)."
24025 #: ../fish/guestfish.pod:759
24027 "Note that home directory expansion happens for users known I<on the host>, "
24028 "not in the guest filesystem."
24033 #: ../fish/guestfish.pod:762
24035 "To use a literal argument which begins with a tilde, you have to quote it, "
24041 #: ../fish/guestfish.pod:765
24050 #: ../fish/guestfish.pod:769
24052 "Libguestfs has some support for Linux guests encrypted according to the "
24053 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
24054 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
24055 "LUKS is supported."
24060 #: ../fish/guestfish.pod:774
24061 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
24066 #: ../fish/guestfish.pod:776
24069 " ><fs> vfs-type /dev/sda2\n"
24076 #: ../fish/guestfish.pod:779
24078 "Then open those devices using L</luks-open>. This creates a device-mapper "
24079 "device called C</dev/mapper/luksdev>."
24084 #: ../fish/guestfish.pod:782
24087 " ><fs> luks-open /dev/sda2 luksdev\n"
24088 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
24094 #: ../fish/guestfish.pod:785
24096 "Finally you have to tell LVM to scan for volume groups on the newly created "
24102 #: ../fish/guestfish.pod:788
24106 " vg-activate-all true\n"
24112 #: ../fish/guestfish.pod:791
24113 msgid "The logical volume(s) can now be mounted in the usual way."
24118 #: ../fish/guestfish.pod:793
24120 "Before closing a LUKS device you must unmount any logical volumes on it and "
24121 "deactivate the volume groups by calling C<vg-activate false VG> on each "
24122 "one. Then you can close the mapper device:"
24127 #: ../fish/guestfish.pod:797
24130 " vg-activate false /dev/VG\n"
24131 " luks-close /dev/mapper/luksdev\n"
24137 #: ../fish/guestfish.pod:800
24138 msgid "WINDOWS PATHS"
24142 #: ../fish/guestfish.pod:802
24144 "If a path is prefixed with C<win:> then you can use Windows-style drive "
24145 "letters and paths (with some limitations). The following commands are "
24151 #: ../fish/guestfish.pod:806
24154 " file /WINDOWS/system32/config/system.LOG\n"
24160 #: ../fish/guestfish.pod:808
24163 " file win:\\windows\\system32\\config\\system.log\n"
24168 #: ../fish/guestfish.pod:810
24171 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
24176 #: ../fish/guestfish.pod:812
24178 "The parameter is rewritten \"behind the scenes\" by looking up the position "
24179 "where the drive is mounted, prepending that to the path, changing all "
24180 "backslash characters to forward slash, then resolving the result using L</"
24181 "case-sensitive-path>. For example if the E: drive was mounted on C</e> then "
24182 "the parameter might be rewritten like this:"
24186 #: ../fish/guestfish.pod:818
24189 " win:e:\\foo\\bar => /e/FOO/bar\n"
24194 #: ../fish/guestfish.pod:820
24195 msgid "This only works in argument positions that expect a path."
24200 #: ../fish/guestfish.pod:822
24201 msgid "UPLOADING AND DOWNLOADING FILES"
24206 #: ../fish/guestfish.pod:824
24208 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
24209 "others which upload from or download to a local file, you can use the "
24210 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
24215 #: ../fish/guestfish.pod:828
24224 #: ../fish/guestfish.pod:830
24226 "reads stdin and creates from that a file C</foo> in the disk image, and:"
24231 #: ../fish/guestfish.pod:833
24234 " tar-out /etc - | tar tf -\n"
24240 #: ../fish/guestfish.pod:835
24242 "writes the tarball to stdout and then pipes that into the external \"tar\" "
24243 "command (see L</PIPES>)."
24248 #: ../fish/guestfish.pod:838
24250 "When using C<-> to read from stdin, the input is read up to the end of "
24251 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
24252 "some arbitrary end marker:"
24257 #: ../fish/guestfish.pod:842
24260 " upload -<<END /foo\n"
24270 #: ../fish/guestfish.pod:848
24272 "Any string of characters can be used instead of C<END>. The end marker must "
24273 "appear on a line of its own, without any preceeding or following characters "
24274 "(not even spaces)."
24279 #: ../fish/guestfish.pod:852
24281 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
24282 "upload local files (so-called \"FileIn\" parameters in the generator)."
24287 #: ../fish/guestfish.pod:855
24288 msgid "EXIT ON ERROR BEHAVIOUR"
24293 #: ../fish/guestfish.pod:857
24295 "By default, guestfish will ignore any errors when in interactive mode (ie. "
24296 "taking commands from a human over a tty), and will exit on the first error "
24297 "in non-interactive mode (scripts, commands given on the command line)."
24302 #: ../fish/guestfish.pod:862
24304 "If you prefix a command with a I<-> character, then that command will not "
24305 "cause guestfish to exit, even if that (one) command returns an error."
24310 #: ../fish/guestfish.pod:866
24311 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
24316 #: ../fish/guestfish.pod:868
24318 "Guestfish can be remote-controlled over a socket. This is useful "
24319 "particularly in shell scripts where you want to make several different "
24320 "changes to a filesystem, but you don't want the overhead of starting up a "
24321 "guestfish process each time."
24326 #: ../fish/guestfish.pod:873
24327 msgid "Start a guestfish server process using:"
24332 #: ../fish/guestfish.pod:875
24335 " eval \"`guestfish --listen`\"\n"
24341 #: ../fish/guestfish.pod:877
24342 msgid "and then send it commands by doing:"
24347 #: ../fish/guestfish.pod:879
24350 " guestfish --remote cmd [...]\n"
24356 #: ../fish/guestfish.pod:881
24357 msgid "To cause the server to exit, send it the exit command:"
24362 #: ../fish/guestfish.pod:883
24365 " guestfish --remote exit\n"
24371 #: ../fish/guestfish.pod:885
24373 "Note that the server will normally exit if there is an error in a command. "
24374 "You can change this in the usual way. See section L</EXIT ON ERROR "
24380 #: ../fish/guestfish.pod:889
24381 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
24386 #: ../fish/guestfish.pod:891
24388 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
24389 "is how the I<--remote> option knows where to send the commands. You can "
24390 "have several guestfish listener processes running using:"
24395 #: ../fish/guestfish.pod:895
24398 " eval \"`guestfish --listen`\"\n"
24399 " pid1=$GUESTFISH_PID\n"
24400 " eval \"`guestfish --listen`\"\n"
24401 " pid2=$GUESTFISH_PID\n"
24403 " guestfish --remote=$pid1 cmd\n"
24404 " guestfish --remote=$pid2 cmd\n"
24410 #: ../fish/guestfish.pod:903
24411 msgid "REMOTE CONTROL AND CSH"
24416 #: ../fish/guestfish.pod:905
24418 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
24424 #: ../fish/guestfish.pod:908
24427 " eval \"`guestfish --listen --csh`\"\n"
24433 #: ../fish/guestfish.pod:910
24434 msgid "REMOTE CONTROL DETAILS"
24439 #: ../fish/guestfish.pod:912
24441 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
24442 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
24443 "and C<$PID> is the process ID of the server."
24448 #: ../fish/guestfish.pod:916
24449 msgid "Guestfish client and server versions must match exactly."
24454 #: ../fish/guestfish.pod:918
24455 msgid "PREPARED DISK IMAGES"
24460 #: ../fish/guestfish.pod:920
24462 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
24463 "preformatted disk images that guestfish can make for you to save typing. "
24464 "This is particularly useful for testing purposes. This option is used "
24465 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
24466 "can be mixed with I<-a>)."
24471 #: ../fish/guestfish.pod:926
24473 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
24474 "the second and so on. Existing files in the current directory are "
24480 #: ../fish/guestfish.pod:930
24482 "The type briefly describes how the disk should be sized, partitioned, how "
24483 "filesystem(s) should be created, and how content should be added. "
24484 "Optionally the type can be followed by extra parameters, separated by C<:> "
24485 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
24486 "allocated disk, containing a single partition, with the partition formatted "
24487 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
24493 #: ../fish/guestfish.pod:938
24494 msgid "To list the available types and any extra parameters they take, run:"
24499 #: ../fish/guestfish.pod:942
24501 "Note that the prepared filesystem is not mounted. You would usually have to "
24502 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
24507 #: ../fish/guestfish.pod:946
24509 "If any I<-N> or I<--new> options are given, the guest is automatically "
24515 #: ../fish/guestfish.pod:951
24516 msgid "Create a 100MB disk with an ext4-formatted partition:"
24521 #: ../fish/guestfish.pod:953
24524 " guestfish -N fs:ext4\n"
24530 #: ../fish/guestfish.pod:955
24531 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
24536 #: ../fish/guestfish.pod:957
24539 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
24545 #: ../fish/guestfish.pod:959
24546 msgid "Create a blank 200MB disk:"
24551 #: ../fish/guestfish.pod:961
24554 " guestfish -N disk:200M\n"
24560 #: ../fish/guestfish.pod:963
24561 msgid "PROGRESS BARS"
24566 #: ../fish/guestfish.pod:965
24568 "Some (not all) long-running commands send progress notification messages as "
24569 "they are running. Guestfish turns these messages into progress bars."
24574 #: ../fish/guestfish.pod:969
24576 "When a command that supports progress bars takes longer than two seconds to "
24577 "run, and if progress bars are enabled, then you will see one appearing below "
24583 #: ../fish/guestfish.pod:973
24586 " ><fs> copy-size /large-file /another-file 2048M\n"
24587 " / 10% [#####-----------------------------------------] 00:30\n"
24593 #: ../fish/guestfish.pod:976
24595 "The spinner on the left hand side moves round once for every progress "
24596 "notification received from the backend. This is a (reasonably) golden "
24597 "assurance that the command is \"doing something\" even if the progress bar "
24598 "is not moving, because the command is able to send the progress "
24599 "notifications. When the bar reaches 100% and the command finishes, the "
24600 "spinner disappears."
24605 #: ../fish/guestfish.pod:983
24607 "Progress bars are enabled by default when guestfish is used interactively. "
24608 "You can enable them even for non-interactive modes using I<--progress-bars>, "
24609 "and you can disable them completely using I<--no-progress-bars>."
24614 #: ../fish/guestfish.pod:988
24615 msgid "GUESTFISH COMMANDS"
24620 #: ../fish/guestfish.pod:990
24622 "The commands in this section are guestfish convenience commands, in other "
24623 "words, they are not part of the L<guestfs(3)> API."
24628 #: ../fish/guestfish.pod:993
24634 #: ../fish/guestfish.pod:995
24644 #: ../fish/guestfish.pod:998
24645 msgid "Without any parameter, this provides general help."
24650 #: ../fish/guestfish.pod:1000
24651 msgid "With a C<cmd> parameter, this displays detailed help for that command."
24656 #: ../fish/guestfish.pod:1002
24657 msgid "quit | exit"
24662 #: ../fish/guestfish.pod:1004
24663 msgid "This exits guestfish. You can also use C<^D> key."
24668 #: ../fish/guestfish.pod:1006
24669 msgid "@FISH_COMMANDS@"
24674 #: ../fish/guestfish.pod:1008
24680 #: ../fish/guestfish.pod:1012 ../test-tool/libguestfs-test-tool.pod:77
24686 #: ../fish/guestfish.pod:1014
24688 "guestfish returns 0 if the commands completed without error, or 1 if there "
24694 #: ../fish/guestfish.pod:1021
24700 #: ../fish/guestfish.pod:1023
24702 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
24707 #: ../fish/guestfish.pod:1026
24708 msgid "GUESTFISH_DISPLAY_IMAGE"
24712 #: ../fish/guestfish.pod:1028
24714 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
24715 "If not set, it uses L<display(1)>."
24720 #: ../fish/guestfish.pod:1031
24721 msgid "GUESTFISH_PID"
24726 #: ../fish/guestfish.pod:1033
24728 "Used with the I<--remote> option to specify the remote guestfish process to "
24729 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
24734 #: ../fish/guestfish.pod:1037
24740 #: ../fish/guestfish.pod:1039
24742 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
24743 "not specified, the external L<hexedit(1)> program is used."
24748 #: ../fish/guestfish.pod:1043
24754 #: ../fish/guestfish.pod:1045
24756 "If compiled with GNU readline support, various files in the home directory "
24757 "can be used. See L</FILES>."
24762 #: ../fish/guestfish.pod:1054
24764 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
24765 "effect as using the B<-v> option."
24770 #: ../fish/guestfish.pod:1066
24772 "Set the path that guestfish uses to search for kernel and initrd.img. See "
24773 "the discussion of paths in L<guestfs(3)>."
24778 #: ../fish/guestfish.pod:1077
24779 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
24784 #: ../fish/guestfish.pod:1079
24790 #: ../fish/guestfish.pod:1081
24792 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
24798 #: ../fish/guestfish.pod:1097 ../fuse/guestmount.pod:264
24803 #: ../fish/guestfish.pod:1101 ../fuse/guestmount.pod:268
24804 msgid "$HOME/.libguestfs-tools.rc"
24808 #: ../fish/guestfish.pod:1103 ../fuse/guestmount.pod:270
24809 msgid "/etc/libguestfs-tools.conf"
24813 #: ../fish/guestfish.pod:1105 ../fuse/guestmount.pod:272
24815 "This configuration file controls the default read-only or read-write mode "
24816 "(I<--ro> or I<--rw>)."
24820 #: ../fish/guestfish.pod:1108
24821 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
24826 #: ../fish/guestfish.pod:1110
24827 msgid "$HOME/.guestfish"
24832 #: ../fish/guestfish.pod:1112
24834 "If compiled with GNU readline support, then the command history is saved in "
24840 #: ../fish/guestfish.pod:1115
24841 msgid "$HOME/.inputrc"
24846 #: ../fish/guestfish.pod:1117
24847 msgid "/etc/inputrc"
24852 #: ../fish/guestfish.pod:1119
24854 "If compiled with GNU readline support, then these files can be used to "
24855 "configure readline. For further information, please see L<readline(3)/"
24856 "INITIALIZATION FILE>."
24861 #: ../fish/guestfish.pod:1123
24862 msgid "To write rules which only apply to guestfish, use:"
24867 #: ../fish/guestfish.pod:1125
24878 #: ../fish/guestfish.pod:1129
24880 "Variables that you can set in inputrc that change the behaviour of guestfish "
24881 "in useful ways include:"
24886 #: ../fish/guestfish.pod:1134
24887 msgid "completion-ignore-case (default: on)"
24892 #: ../fish/guestfish.pod:1136
24894 "By default, guestfish will ignore case when tab-completing paths on the "
24900 #: ../fish/guestfish.pod:1139
24903 " set completion-ignore-case off\n"
24909 #: ../fish/guestfish.pod:1141
24910 msgid "to make guestfish case sensitive."
24915 #: ../fish/guestfish.pod:1145
24921 #: ../fish/guestfish.pod:1147
24922 msgid "test2.img (etc)"
24926 #: ../fish/guestfish.pod:1149
24928 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
24929 "will be created in the file C<test1.img> in the current directory. The "
24930 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
24931 "the same name will be overwritten."
24935 #: ../fish/guestfish.pod:1158
24937 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-copy-in(1)"
24938 ">, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)"
24939 ">, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions"
24940 "(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)"
24941 ">, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)"
24942 ">, L<display(1)>, L<hexedit(1)>."
24947 #: ../fish/guestfish.pod:1189 ../test-tool/libguestfs-test-tool.pod:102
24948 #: ../fuse/guestmount.pod:299 ../tools/virt-win-reg.pl:778
24949 #: ../tools/virt-list-filesystems.pl:210 ../tools/virt-tar.pl:309
24950 #: ../tools/virt-make-fs.pl:572 ../tools/virt-list-partitions.pl:277
24952 "This program is free software; you can redistribute it and/or modify it "
24953 "under the terms of the GNU General Public License as published by the Free "
24954 "Software Foundation; either version 2 of the License, or (at your option) "
24955 "any later version."
24960 #: ../fish/guestfish.pod:1194 ../test-tool/libguestfs-test-tool.pod:107
24961 #: ../fuse/guestmount.pod:304 ../tools/virt-win-reg.pl:783
24962 #: ../tools/virt-list-filesystems.pl:215 ../tools/virt-tar.pl:314
24963 #: ../tools/virt-make-fs.pl:577 ../tools/virt-list-partitions.pl:282
24965 "This program is distributed in the hope that it will be useful, but WITHOUT "
24966 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
24967 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
24973 #: ../fish/guestfish.pod:1199 ../test-tool/libguestfs-test-tool.pod:112
24974 #: ../fuse/guestmount.pod:309 ../tools/virt-win-reg.pl:788
24975 #: ../tools/virt-list-filesystems.pl:220 ../tools/virt-tar.pl:319
24976 #: ../tools/virt-make-fs.pl:582 ../tools/virt-list-partitions.pl:287
24978 "You should have received a copy of the GNU General Public License along with "
24979 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
24980 "Ave, Cambridge, MA 02139, USA."
24985 #: ../fish/guestfish-actions.pod:1
24991 #: ../fish/guestfish-actions.pod:3
24994 " add-cdrom filename\n"
25000 #: ../fish/guestfish-actions.pod:15
25002 "This call checks for the existence of C<filename>. This stops you from "
25003 "specifying other types of drive which are supported by qemu such as C<nbd:> "
25004 "and C<http:> URLs. To specify those, use the general L</config> call "
25010 #: ../fish/guestfish-actions.pod:22
25012 "If you just want to add an ISO file (often you use this as an efficient way "
25013 "to transfer large files into the guest), then you should probably use L</add-"
25014 "drive-ro> instead."
25019 #: ../fish/guestfish-actions.pod:35
25025 #: ../fish/guestfish-actions.pod:37
25030 #: ../fish/guestfish-actions.pod:39
25033 " add-domain dom [libvirturi:..] [readonly:..] [iface:..] [live:..] [allowuuid:..]\n"
25039 #: ../fish/guestfish-actions.pod:41
25041 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
25042 "It works by connecting to libvirt, requesting the domain and domain XML from "
25043 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
25048 #: ../fish/guestfish-actions.pod:76
25050 "The other optional parameters are passed directly through to L</add-drive-"
25056 #: ../fish/guestfish-actions.pod:79 ../fish/guestfish-actions.pod:143
25057 #: ../fish/guestfish-actions.pod:1937 ../fish/guestfish-actions.pod:3103
25058 #: ../fish/guestfish-actions.pod:3276 ../fish/guestfish-actions.pod:3411
25060 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
25065 #: ../fish/guestfish-actions.pod:81
25071 #: ../fish/guestfish-actions.pod:83
25074 " add-drive filename\n"
25080 #: ../fish/guestfish-actions.pod:85
25082 "This function is the equivalent of calling L</add-drive-opts> with no "
25083 "optional parameters, so the disk is added writable, with the format being "
25084 "detected automatically."
25089 #: ../fish/guestfish-actions.pod:89
25091 "Automatic detection of the format opens you up to a potential security hole "
25092 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
25093 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
25094 "you should think about replacing calls to this function with calls to L</add-"
25095 "drive-opts>, and specifying the format."
25100 #: ../fish/guestfish-actions.pod:96
25101 msgid "add-drive-opts"
25106 #: ../fish/guestfish-actions.pod:98
25112 #: ../fish/guestfish-actions.pod:100
25115 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
25121 #: ../fish/guestfish-actions.pod:127
25123 "This forces the image format. If you omit this (or use L</add-drive> or L</"
25124 "add-drive-ro>) then the format is automatically detected. Possible formats "
25125 "include C<raw> and C<qcow2>."
25130 #: ../fish/guestfish-actions.pod:138
25132 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
25133 "add-drive-with-if> call (q.v.)"
25138 #: ../fish/guestfish-actions.pod:145
25139 msgid "add-drive-ro"
25144 #: ../fish/guestfish-actions.pod:147
25150 #: ../fish/guestfish-actions.pod:149
25153 " add-drive-ro filename\n"
25159 #: ../fish/guestfish-actions.pod:151
25161 "This function is the equivalent of calling L</add-drive-opts> with the "
25162 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
25163 "is added read-only, with the format being detected automatically."
25168 #: ../fish/guestfish-actions.pod:156
25169 msgid "add-drive-ro-with-if"
25174 #: ../fish/guestfish-actions.pod:158
25177 " add-drive-ro-with-if filename iface\n"
25183 #: ../fish/guestfish-actions.pod:160
25185 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
25186 "interface emulation to use at run time."
25191 #: ../fish/guestfish-actions.pod:170
25192 msgid "add-drive-with-if"
25197 #: ../fish/guestfish-actions.pod:172
25200 " add-drive-with-if filename iface\n"
25206 #: ../fish/guestfish-actions.pod:174
25208 "This is the same as L</add-drive> but it allows you to specify the QEMU "
25209 "interface emulation to use at run time."
25214 #: ../fish/guestfish-actions.pod:184
25220 #: ../fish/guestfish-actions.pod:186
25223 " aug-clear augpath\n"
25229 #: ../fish/guestfish-actions.pod:191
25235 #: ../fish/guestfish-actions.pod:193
25244 #: ../fish/guestfish-actions.pod:195
25246 "Close the current Augeas handle and free up any resources used by it. After "
25247 "calling this, you have to call L</aug-init> again before you can use any "
25248 "other Augeas functions."
25253 #: ../fish/guestfish-actions.pod:200
25254 msgid "aug-defnode"
25259 #: ../fish/guestfish-actions.pod:202
25262 " aug-defnode name expr val\n"
25268 #: ../fish/guestfish-actions.pod:207
25270 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
25271 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
25272 "containing that single node."
25277 #: ../fish/guestfish-actions.pod:215
25283 #: ../fish/guestfish-actions.pod:217
25286 " aug-defvar name expr\n"
25292 #: ../fish/guestfish-actions.pod:226
25298 #: ../fish/guestfish-actions.pod:228
25301 " aug-get augpath\n"
25307 #: ../fish/guestfish-actions.pod:233
25313 #: ../fish/guestfish-actions.pod:235
25316 " aug-init root flags\n"
25322 #: ../fish/guestfish-actions.pod:241
25323 msgid "You must call this before using any other L</aug-*> commands."
25328 #: ../fish/guestfish-actions.pod:276
25329 msgid "Do not load the tree in L</aug-init>."
25334 #: ../fish/guestfish-actions.pod:280
25335 msgid "To close the handle, you can call L</aug-close>."
25340 #: ../fish/guestfish-actions.pod:284
25346 #: ../fish/guestfish-actions.pod:286
25349 " aug-insert augpath label true|false\n"
25355 #: ../fish/guestfish-actions.pod:296
25361 #: ../fish/guestfish-actions.pod:298
25370 #: ../fish/guestfish-actions.pod:305
25376 #: ../fish/guestfish-actions.pod:307
25379 " aug-ls augpath\n"
25385 #: ../fish/guestfish-actions.pod:309
25387 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
25388 "resulting nodes into alphabetical order."
25393 #: ../fish/guestfish-actions.pod:312
25399 #: ../fish/guestfish-actions.pod:314
25402 " aug-match augpath\n"
25408 #: ../fish/guestfish-actions.pod:320
25414 #: ../fish/guestfish-actions.pod:322
25417 " aug-mv src dest\n"
25423 #: ../fish/guestfish-actions.pod:327
25429 #: ../fish/guestfish-actions.pod:329
25432 " aug-rm augpath\n"
25438 #: ../fish/guestfish-actions.pod:335
25444 #: ../fish/guestfish-actions.pod:337
25453 #: ../fish/guestfish-actions.pod:341
25455 "The flags which were passed to L</aug-init> affect exactly how files are "
25461 #: ../fish/guestfish-actions.pod:344
25467 #: ../fish/guestfish-actions.pod:346
25470 " aug-set augpath val\n"
25476 #: ../fish/guestfish-actions.pod:350
25478 "In the Augeas API, it is possible to clear a node by setting the value to "
25479 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
25480 "this call. Instead you must use the L</aug-clear> call."
25485 #: ../fish/guestfish-actions.pod:355
25491 #: ../fish/guestfish-actions.pod:357
25494 " available 'groups ...'\n"
25500 #: ../fish/guestfish-actions.pod:363
25502 "The libguestfs groups, and the functions that those groups correspond to, "
25503 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
25504 "runtime by calling L</available-all-groups>."
25509 #: ../fish/guestfish-actions.pod:387
25510 msgid "You must call L</launch> before calling this function."
25515 #: ../fish/guestfish-actions.pod:409
25517 "This call was added in version C<1.0.80>. In previous versions of "
25518 "libguestfs all you could do would be to speculatively execute a command to "
25519 "find out if the daemon implemented it. See also L</version>."
25524 #: ../fish/guestfish-actions.pod:416
25525 msgid "available-all-groups"
25530 #: ../fish/guestfish-actions.pod:418
25533 " available-all-groups\n"
25539 #: ../fish/guestfish-actions.pod:420
25541 "This command returns a list of all optional groups that this daemon knows "
25542 "about. Note this returns both supported and unsupported groups. To find "
25543 "out which ones the daemon can actually support you have to call L</"
25544 "available> on each member of the returned list."
25549 #: ../fish/guestfish-actions.pod:426
25550 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
25555 #: ../fish/guestfish-actions.pod:428
25561 #: ../fish/guestfish-actions.pod:430
25564 " base64-in (base64file|-) filename\n"
25570 #: ../fish/guestfish-actions.pod:435 ../fish/guestfish-actions.pod:444
25571 #: ../fish/guestfish-actions.pod:668 ../fish/guestfish-actions.pod:837
25572 #: ../fish/guestfish-actions.pod:856 ../fish/guestfish-actions.pod:1230
25573 #: ../fish/guestfish-actions.pod:4606 ../fish/guestfish-actions.pod:4618
25574 #: ../fish/guestfish-actions.pod:4629 ../fish/guestfish-actions.pod:4640
25575 #: ../fish/guestfish-actions.pod:4692 ../fish/guestfish-actions.pod:4701
25576 #: ../fish/guestfish-actions.pod:4755 ../fish/guestfish-actions.pod:4778
25577 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
25582 #: ../fish/guestfish-actions.pod:437
25588 #: ../fish/guestfish-actions.pod:439
25591 " base64-out filename (base64file|-)\n"
25597 #: ../fish/guestfish-actions.pod:446
25598 msgid "blockdev-flushbufs"
25603 #: ../fish/guestfish-actions.pod:448
25606 " blockdev-flushbufs device\n"
25612 #: ../fish/guestfish-actions.pod:455
25613 msgid "blockdev-getbsz"
25618 #: ../fish/guestfish-actions.pod:457
25621 " blockdev-getbsz device\n"
25627 #: ../fish/guestfish-actions.pod:466
25628 msgid "blockdev-getro"
25633 #: ../fish/guestfish-actions.pod:468
25636 " blockdev-getro device\n"
25642 #: ../fish/guestfish-actions.pod:475
25643 msgid "blockdev-getsize64"
25648 #: ../fish/guestfish-actions.pod:477
25651 " blockdev-getsize64 device\n"
25657 #: ../fish/guestfish-actions.pod:481
25658 msgid "See also L</blockdev-getsz>."
25663 #: ../fish/guestfish-actions.pod:485
25664 msgid "blockdev-getss"
25669 #: ../fish/guestfish-actions.pod:487
25672 " blockdev-getss device\n"
25678 #: ../fish/guestfish-actions.pod:492
25680 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
25685 #: ../fish/guestfish-actions.pod:497
25686 msgid "blockdev-getsz"
25691 #: ../fish/guestfish-actions.pod:499
25694 " blockdev-getsz device\n"
25700 #: ../fish/guestfish-actions.pod:504
25702 "See also L</blockdev-getss> for the real sector size of the device, and L</"
25703 "blockdev-getsize64> for the more useful I<size in bytes>."
25708 #: ../fish/guestfish-actions.pod:510
25709 msgid "blockdev-rereadpt"
25714 #: ../fish/guestfish-actions.pod:512
25717 " blockdev-rereadpt device\n"
25723 #: ../fish/guestfish-actions.pod:518
25724 msgid "blockdev-setbsz"
25729 #: ../fish/guestfish-actions.pod:520
25732 " blockdev-setbsz device blocksize\n"
25738 #: ../fish/guestfish-actions.pod:529
25739 msgid "blockdev-setro"
25744 #: ../fish/guestfish-actions.pod:531
25747 " blockdev-setro device\n"
25753 #: ../fish/guestfish-actions.pod:537
25754 msgid "blockdev-setrw"
25759 #: ../fish/guestfish-actions.pod:539
25762 " blockdev-setrw device\n"
25768 #: ../fish/guestfish-actions.pod:545
25769 msgid "case-sensitive-path"
25774 #: ../fish/guestfish-actions.pod:547
25777 " case-sensitive-path path\n"
25783 #: ../fish/guestfish-actions.pod:571
25785 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
25786 "WINDOWS/system32\"> (the exact return value would depend on details of how "
25787 "the directories were originally created under Windows)."
25792 #: ../fish/guestfish-actions.pod:579
25793 msgid "See also L</realpath>."
25798 #: ../fish/guestfish-actions.pod:581
25804 #: ../fish/guestfish-actions.pod:583
25813 #: ../fish/guestfish-actions.pod:587
25815 "Note that this function cannot correctly handle binary files (specifically, "
25816 "files containing C<\\0> character which is treated as end of string). For "
25817 "those you need to use the L</read-file> or L</download> functions which have "
25818 "a more complex interface."
25823 #: ../fish/guestfish-actions.pod:595
25829 #: ../fish/guestfish-actions.pod:597
25832 " checksum csumtype path\n"
25838 #: ../fish/guestfish-actions.pod:640
25839 msgid "To get the checksum for a device, use L</checksum-device>."
25844 #: ../fish/guestfish-actions.pod:642
25845 msgid "To get the checksums for many files, use L</checksums-out>."
25850 #: ../fish/guestfish-actions.pod:644
25851 msgid "checksum-device"
25856 #: ../fish/guestfish-actions.pod:646
25859 " checksum-device csumtype device\n"
25865 #: ../fish/guestfish-actions.pod:648
25867 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
25868 "device named C<device>. For the types of checksums supported see the L</"
25869 "checksum> command."
25874 #: ../fish/guestfish-actions.pod:652
25875 msgid "checksums-out"
25880 #: ../fish/guestfish-actions.pod:654
25883 " checksums-out csumtype directory (sumsfile|-)\n"
25889 #: ../fish/guestfish-actions.pod:670
25895 #: ../fish/guestfish-actions.pod:672
25898 " chmod mode path\n"
25904 #: ../fish/guestfish-actions.pod:683
25910 #: ../fish/guestfish-actions.pod:685
25913 " chown owner group path\n"
25919 #: ../fish/guestfish-actions.pod:693
25925 #: ../fish/guestfish-actions.pod:695
25928 " command 'arguments ...'\n"
25934 #: ../fish/guestfish-actions.pod:702
25936 "The single parameter is an argv-style list of arguments. The first element "
25937 "is the name of the program to run. Subsequent elements are parameters. The "
25938 "list must be non-empty (ie. must contain a program name). Note that the "
25939 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
25944 #: ../fish/guestfish-actions.pod:730
25945 msgid "command-lines"
25950 #: ../fish/guestfish-actions.pod:732
25953 " command-lines 'arguments ...'\n"
25959 #: ../fish/guestfish-actions.pod:734
25961 "This is the same as L</command>, but splits the result into a list of lines."
25966 #: ../fish/guestfish-actions.pod:737
25967 msgid "See also: L</sh-lines>"
25972 #: ../fish/guestfish-actions.pod:742
25978 #: ../fish/guestfish-actions.pod:744
25981 " config qemuparam qemuvalue\n"
25987 #: ../fish/guestfish-actions.pod:755
25993 #: ../fish/guestfish-actions.pod:757
25996 " copy-size src dest size\n"
26002 #: ../fish/guestfish-actions.pod:765
26008 #: ../fish/guestfish-actions.pod:767
26017 #: ../fish/guestfish-actions.pod:772
26023 #: ../fish/guestfish-actions.pod:774
26032 #: ../fish/guestfish-actions.pod:779
26038 #: ../fish/guestfish-actions.pod:781
26047 #: ../fish/guestfish-actions.pod:788
26049 "If the destination is a device, it must be as large or larger than the "
26050 "source file or device, otherwise the copy will fail. This command cannot do "
26051 "partial copies (see L</copy-size>)."
26056 #: ../fish/guestfish-actions.pod:792
26062 #: ../fish/guestfish-actions.pod:794
26071 #: ../fish/guestfish-actions.pod:798 ../fish/guestfish-actions.pod:809
26073 "This command is mostly useful for interactive sessions. It is I<not> "
26074 "intended that you try to parse the output string. Use L</statvfs> from "
26080 #: ../fish/guestfish-actions.pod:802
26086 #: ../fish/guestfish-actions.pod:804
26095 #: ../fish/guestfish-actions.pod:813
26101 #: ../fish/guestfish-actions.pod:815
26110 #: ../fish/guestfish-actions.pod:821
26112 "Another way to get the same information is to enable verbose messages with "
26113 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
26114 "before running the program."
26119 #: ../fish/guestfish-actions.pod:826
26125 #: ../fish/guestfish-actions.pod:828
26128 " download remotefilename (filename|-)\n"
26134 #: ../fish/guestfish-actions.pod:835
26135 msgid "See also L</upload>, L</cat>."
26140 #: ../fish/guestfish-actions.pod:839
26141 msgid "download-offset"
26146 #: ../fish/guestfish-actions.pod:841
26149 " download-offset remotefilename (filename|-) offset size\n"
26155 #: ../fish/guestfish-actions.pod:849
26157 "Note that there is no limit on the amount of data that can be downloaded "
26158 "with this call, unlike with L</pread>, and this call always reads the full "
26159 "amount unless an error occurs."
26164 #: ../fish/guestfish-actions.pod:854
26165 msgid "See also L</download>, L</pread>."
26170 #: ../fish/guestfish-actions.pod:858
26171 msgid "drop-caches"
26176 #: ../fish/guestfish-actions.pod:860
26179 " drop-caches whattodrop\n"
26185 #: ../fish/guestfish-actions.pod:872
26191 #: ../fish/guestfish-actions.pod:874
26200 #: ../fish/guestfish-actions.pod:886
26206 #: ../fish/guestfish-actions.pod:888
26209 " e2fsck-f device\n"
26215 #: ../fish/guestfish-actions.pod:894
26217 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
26218 "should use L</fsck>."
26223 #: ../fish/guestfish-actions.pod:897
26224 msgid "echo-daemon"
26229 #: ../fish/guestfish-actions.pod:899
26232 " echo-daemon 'words ...'\n"
26238 #: ../fish/guestfish-actions.pod:906
26239 msgid "See also L</ping-daemon>."
26244 #: ../fish/guestfish-actions.pod:908
26250 #: ../fish/guestfish-actions.pod:910
26253 " egrep regex path\n"
26259 #: ../fish/guestfish-actions.pod:918
26265 #: ../fish/guestfish-actions.pod:920
26268 " egrepi regex path\n"
26274 #: ../fish/guestfish-actions.pod:928
26280 #: ../fish/guestfish-actions.pod:930
26283 " equal file1 file2\n"
26289 #: ../fish/guestfish-actions.pod:937
26295 #: ../fish/guestfish-actions.pod:939
26304 #: ../fish/guestfish-actions.pod:944
26305 msgid "See also L</is-file>, L</is-dir>, L</stat>."
26310 #: ../fish/guestfish-actions.pod:946
26316 #: ../fish/guestfish-actions.pod:948
26319 " fallocate path len\n"
26325 #: ../fish/guestfish-actions.pod:965
26326 msgid "fallocate64"
26331 #: ../fish/guestfish-actions.pod:967
26334 " fallocate64 path len\n"
26340 #: ../fish/guestfish-actions.pod:973
26342 "Note that this call allocates disk blocks for the file. To create a sparse "
26343 "file use L</truncate-size> instead."
26348 #: ../fish/guestfish-actions.pod:976
26350 "The deprecated call L</fallocate> does the same, but owing to an oversight "
26351 "it only allowed 30 bit lengths to be specified, effectively limiting the "
26352 "maximum size of files created through that call to 1GB."
26357 #: ../fish/guestfish-actions.pod:985
26363 #: ../fish/guestfish-actions.pod:987
26366 " fgrep pattern path\n"
26372 #: ../fish/guestfish-actions.pod:995
26378 #: ../fish/guestfish-actions.pod:997
26381 " fgrepi pattern path\n"
26387 #: ../fish/guestfish-actions.pod:1005
26393 #: ../fish/guestfish-actions.pod:1007
26401 #: ../fish/guestfish-actions.pod:1023
26403 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
26404 "(etc), L</is-zero>."
26409 #: ../fish/guestfish-actions.pod:1026
26410 msgid "file-architecture"
26415 #: ../fish/guestfish-actions.pod:1028
26418 " file-architecture filename\n"
26424 #: ../fish/guestfish-actions.pod:1131
26430 #: ../fish/guestfish-actions.pod:1133
26439 #: ../fish/guestfish-actions.pod:1137
26441 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
26442 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
26447 #: ../fish/guestfish-actions.pod:1141
26453 #: ../fish/guestfish-actions.pod:1143
26456 " fill c len path\n"
26462 #: ../fish/guestfish-actions.pod:1149
26464 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
26465 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
26466 "L</fill-pattern>."
26471 #: ../fish/guestfish-actions.pod:1154
26472 msgid "fill-pattern"
26477 #: ../fish/guestfish-actions.pod:1156
26480 " fill-pattern pattern len path\n"
26486 #: ../fish/guestfish-actions.pod:1158
26488 "This function is like L</fill> except that it creates a new file of length "
26489 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
26490 "is truncated if necessary to ensure the length of the file is exactly C<len> "
26496 #: ../fish/guestfish-actions.pod:1163
26502 #: ../fish/guestfish-actions.pod:1165
26505 " find directory\n"
26511 #: ../fish/guestfish-actions.pod:1179
26512 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
26517 #: ../fish/guestfish-actions.pod:1192
26518 msgid "See also L</find0>."
26523 #: ../fish/guestfish-actions.pod:1197
26529 #: ../fish/guestfish-actions.pod:1199
26532 " find0 directory (files|-)\n"
26538 #: ../fish/guestfish-actions.pod:1205
26540 "This command works the same way as L</find> with the following exceptions:"
26545 #: ../fish/guestfish-actions.pod:1232
26546 msgid "findfs-label"
26551 #: ../fish/guestfish-actions.pod:1234
26554 " findfs-label label\n"
26560 #: ../fish/guestfish-actions.pod:1240
26561 msgid "To find the label of a filesystem, use L</vfs-label>."
26566 #: ../fish/guestfish-actions.pod:1242
26567 msgid "findfs-uuid"
26572 #: ../fish/guestfish-actions.pod:1244
26575 " findfs-uuid uuid\n"
26581 #: ../fish/guestfish-actions.pod:1250
26582 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
26587 #: ../fish/guestfish-actions.pod:1252
26593 #: ../fish/guestfish-actions.pod:1254
26596 " fsck fstype device\n"
26602 #: ../fish/guestfish-actions.pod:1284
26608 #: ../fish/guestfish-actions.pod:1286
26616 #: ../fish/guestfish-actions.pod:1293
26617 msgid "get-attach-method"
26621 #: ../fish/guestfish-actions.pod:1295
26624 " get-attach-method\n"
26629 #: ../fish/guestfish-actions.pod:1297
26630 msgid "Return the current attach method. See L</set-attach-method>."
26635 #: ../fish/guestfish-actions.pod:1299
26636 msgid "get-autosync"
26641 #: ../fish/guestfish-actions.pod:1301
26650 #: ../fish/guestfish-actions.pod:1305
26656 #: ../fish/guestfish-actions.pod:1307
26665 #: ../fish/guestfish-actions.pod:1311
26666 msgid "get-e2label"
26671 #: ../fish/guestfish-actions.pod:1313
26674 " get-e2label device\n"
26680 #: ../fish/guestfish-actions.pod:1325
26686 #: ../fish/guestfish-actions.pod:1327
26689 " get-e2uuid device\n"
26695 #: ../fish/guestfish-actions.pod:1339
26696 msgid "get-memsize"
26701 #: ../fish/guestfish-actions.pod:1341
26710 #: ../fish/guestfish-actions.pod:1346
26712 "If L</set-memsize> was not called on this handle, and if "
26713 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
26714 "value for memsize."
26719 #: ../fish/guestfish-actions.pod:1353
26720 msgid "get-network"
26725 #: ../fish/guestfish-actions.pod:1355
26734 #: ../fish/guestfish-actions.pod:1359
26740 #: ../fish/guestfish-actions.pod:1361
26749 #: ../fish/guestfish-actions.pod:1368
26755 #: ../fish/guestfish-actions.pod:1370
26761 #: ../fish/guestfish-actions.pod:1372
26770 #: ../fish/guestfish-actions.pod:1379
26776 #: ../fish/guestfish-actions.pod:1381
26785 #: ../fish/guestfish-actions.pod:1388
26786 msgid "get-recovery-proc"
26791 #: ../fish/guestfish-actions.pod:1390
26794 " get-recovery-proc\n"
26800 #: ../fish/guestfish-actions.pod:1394
26801 msgid "get-selinux"
26806 #: ../fish/guestfish-actions.pod:1396
26815 #: ../fish/guestfish-actions.pod:1398
26817 "This returns the current setting of the selinux flag which is passed to the "
26818 "appliance at boot time. See L</set-selinux>."
26823 #: ../fish/guestfish-actions.pod:1404
26829 #: ../fish/guestfish-actions.pod:1406
26838 #: ../fish/guestfish-actions.pod:1413
26844 #: ../fish/guestfish-actions.pod:1415
26853 #: ../fish/guestfish-actions.pod:1419
26859 #: ../fish/guestfish-actions.pod:1421
26868 #: ../fish/guestfish-actions.pod:1423
26870 "Return the current umask. By default the umask is C<022> unless it has been "
26871 "set by calling L</umask>."
26876 #: ../fish/guestfish-actions.pod:1426
26877 msgid "get-verbose"
26882 #: ../fish/guestfish-actions.pod:1428
26891 #: ../fish/guestfish-actions.pod:1432
26897 #: ../fish/guestfish-actions.pod:1434
26906 #: ../fish/guestfish-actions.pod:1438
26907 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
26912 #: ../fish/guestfish-actions.pod:1441
26918 #: ../fish/guestfish-actions.pod:1443
26921 " getxattr path name\n"
26927 #: ../fish/guestfish-actions.pod:1445
26929 "Get a single extended attribute from file C<path> named C<name>. This call "
26930 "follows symlinks. If you want to lookup an extended attribute for the "
26931 "symlink itself, use L</lgetxattr>."
26936 #: ../fish/guestfish-actions.pod:1449 ../fish/guestfish-actions.pod:2476
26938 "Normally it is better to get all extended attributes from a file in one go "
26939 "by calling L</getxattrs>. However some Linux filesystem implementations are "
26940 "buggy and do not provide a way to list out attributes. For these "
26941 "filesystems (notably ntfs-3g) you have to know the names of the extended "
26942 "attributes you want in advance and call this function."
26947 #: ../fish/guestfish-actions.pod:1459
26948 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
26953 #: ../fish/guestfish-actions.pod:1461
26959 #: ../fish/guestfish-actions.pod:1463
26962 " getxattrs path\n"
26968 #: ../fish/guestfish-actions.pod:1471
26969 msgid "See also: L</lgetxattrs>, L<attr(5)>."
26974 #: ../fish/guestfish-actions.pod:1473
26975 msgid "glob-expand"
26980 #: ../fish/guestfish-actions.pod:1475
26983 " glob-expand pattern\n"
26989 #: ../fish/guestfish-actions.pod:1488
26995 #: ../fish/guestfish-actions.pod:1490
26998 " grep regex path\n"
27004 #: ../fish/guestfish-actions.pod:1498
27010 #: ../fish/guestfish-actions.pod:1500
27013 " grepi regex path\n"
27019 #: ../fish/guestfish-actions.pod:1508
27020 msgid "grub-install"
27025 #: ../fish/guestfish-actions.pod:1510
27028 " grub-install root device\n"
27034 #: ../fish/guestfish-actions.pod:1526
27040 #: ../fish/guestfish-actions.pod:1528
27049 #: ../fish/guestfish-actions.pod:1536
27055 #: ../fish/guestfish-actions.pod:1538
27058 " head-n nrlines path\n"
27064 #: ../fish/guestfish-actions.pod:1551
27070 #: ../fish/guestfish-actions.pod:1553
27079 #: ../fish/guestfish-actions.pod:1561
27085 #: ../fish/guestfish-actions.pod:1563
27088 " initrd-cat initrdpath filename\n"
27094 #: ../fish/guestfish-actions.pod:1575
27095 msgid "See also L</initrd-list>."
27100 #: ../fish/guestfish-actions.pod:1580
27101 msgid "initrd-list"
27106 #: ../fish/guestfish-actions.pod:1582
27109 " initrd-list path\n"
27115 #: ../fish/guestfish-actions.pod:1594
27116 msgid "inotify-add-watch"
27121 #: ../fish/guestfish-actions.pod:1596
27124 " inotify-add-watch path mask\n"
27130 #: ../fish/guestfish-actions.pod:1608
27131 msgid "inotify-close"
27136 #: ../fish/guestfish-actions.pod:1610
27145 #: ../fish/guestfish-actions.pod:1616
27146 msgid "inotify-files"
27151 #: ../fish/guestfish-actions.pod:1618
27160 #: ../fish/guestfish-actions.pod:1620
27162 "This function is a helpful wrapper around L</inotify-read> which just "
27163 "returns a list of pathnames of objects that were touched. The returned "
27164 "pathnames are sorted and deduplicated."
27169 #: ../fish/guestfish-actions.pod:1624
27170 msgid "inotify-init"
27175 #: ../fish/guestfish-actions.pod:1626
27178 " inotify-init maxevents\n"
27184 #: ../fish/guestfish-actions.pod:1632
27186 "C<maxevents> is the maximum number of events which will be queued up between "
27187 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
27188 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
27189 "default was 16384 events. Beyond this limit, the kernel throws away events, "
27190 "but records the fact that it threw them away by setting a flag "
27191 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
27196 #: ../fish/guestfish-actions.pod:1642
27198 "Before any events are generated, you have to add some watches to the "
27199 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
27200 "L</inotify-watch-all>."
27205 #: ../fish/guestfish-actions.pod:1648
27207 "Queued up events should be read periodically by calling L</inotify-read> (or "
27208 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
27209 "If you don't read the events out often enough then you risk the internal "
27210 "queue overflowing."
27215 #: ../fish/guestfish-actions.pod:1655
27217 "The handle should be closed after use by calling L</inotify-close>. This "
27218 "also removes any watches automatically."
27223 #: ../fish/guestfish-actions.pod:1664
27224 msgid "inotify-read"
27229 #: ../fish/guestfish-actions.pod:1666
27238 #: ../fish/guestfish-actions.pod:1679
27239 msgid "inotify-rm-watch"
27244 #: ../fish/guestfish-actions.pod:1681
27247 " inotify-rm-watch wd\n"
27253 #: ../fish/guestfish-actions.pod:1683
27254 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
27259 #: ../fish/guestfish-actions.pod:1686
27260 msgid "inspect-get-arch"
27265 #: ../fish/guestfish-actions.pod:1688
27268 " inspect-get-arch root\n"
27274 #: ../fish/guestfish-actions.pod:1690
27276 "This returns the architecture of the inspected operating system. The "
27277 "possible return values are listed under L</file-architecture>."
27282 #: ../fish/guestfish-actions.pod:1699
27283 msgid "inspect-get-distro"
27288 #: ../fish/guestfish-actions.pod:1701
27291 " inspect-get-distro root\n"
27296 #: ../fish/guestfish-actions.pod:1782
27297 msgid "inspect-get-drive-mappings"
27301 #: ../fish/guestfish-actions.pod:1784
27304 " inspect-get-drive-mappings root\n"
27309 #: ../fish/guestfish-actions.pod:1811
27311 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
27312 "get-mountpoints>, L</inspect-get-filesystems>."
27317 #: ../fish/guestfish-actions.pod:1815
27318 msgid "inspect-get-filesystems"
27323 #: ../fish/guestfish-actions.pod:1817
27326 " inspect-get-filesystems root\n"
27332 #: ../fish/guestfish-actions.pod:1827
27334 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
27335 "get-mountpoints>."
27339 #: ../fish/guestfish-actions.pod:1830
27340 msgid "inspect-get-format"
27344 #: ../fish/guestfish-actions.pod:1832
27347 " inspect-get-format root\n"
27353 #: ../fish/guestfish-actions.pod:1861
27354 msgid "inspect-get-hostname"
27359 #: ../fish/guestfish-actions.pod:1863
27362 " inspect-get-hostname root\n"
27367 #: ../fish/guestfish-actions.pod:1873
27368 msgid "inspect-get-icon"
27372 #: ../fish/guestfish-actions.pod:1875
27375 " inspect-get-icon root [favicon:..] [highquality:..]\n"
27381 #: ../fish/guestfish-actions.pod:1939
27382 msgid "inspect-get-major-version"
27387 #: ../fish/guestfish-actions.pod:1941
27390 " inspect-get-major-version root\n"
27396 #: ../fish/guestfish-actions.pod:1957
27397 msgid "inspect-get-minor-version"
27402 #: ../fish/guestfish-actions.pod:1959
27405 " inspect-get-minor-version root\n"
27411 #: ../fish/guestfish-actions.pod:1966
27413 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
27414 "get-major-version>."
27419 #: ../fish/guestfish-actions.pod:1969
27420 msgid "inspect-get-mountpoints"
27425 #: ../fish/guestfish-actions.pod:1971
27428 " inspect-get-mountpoints root\n"
27433 #: ../fish/guestfish-actions.pod:1990
27435 "For operating systems like Windows which still use drive letters, this call "
27436 "will only return an entry for the first drive \"mounted on\" C</>. For "
27437 "information about the mapping of drive letters to partitions, see L</inspect-"
27438 "get-drive-mappings>."
27443 #: ../fish/guestfish-actions.pod:1996
27445 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
27446 "get-filesystems>."
27451 #: ../fish/guestfish-actions.pod:1999
27452 msgid "inspect-get-package-format"
27457 #: ../fish/guestfish-actions.pod:2001
27460 " inspect-get-package-format root\n"
27466 #: ../fish/guestfish-actions.pod:2003
27468 "This function and L</inspect-get-package-management> return the package "
27469 "format and package management tool used by the inspected operating system. "
27470 "For example for Fedora these functions would return C<rpm> (package format) "
27471 "and C<yum> (package management)."
27476 #: ../fish/guestfish-actions.pod:2018
27477 msgid "inspect-get-package-management"
27482 #: ../fish/guestfish-actions.pod:2020
27485 " inspect-get-package-management root\n"
27491 #: ../fish/guestfish-actions.pod:2022
27493 "L</inspect-get-package-format> and this function return the package format "
27494 "and package management tool used by the inspected operating system. For "
27495 "example for Fedora these functions would return C<rpm> (package format) and "
27496 "C<yum> (package management)."
27501 #: ../fish/guestfish-actions.pod:2039
27502 msgid "inspect-get-product-name"
27507 #: ../fish/guestfish-actions.pod:2041
27510 " inspect-get-product-name root\n"
27515 #: ../fish/guestfish-actions.pod:2053
27516 msgid "inspect-get-product-variant"
27520 #: ../fish/guestfish-actions.pod:2055
27523 " inspect-get-product-variant root\n"
27528 #: ../fish/guestfish-actions.pod:2076
27530 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
27531 "get-product-name>, L</inspect-get-major-version>."
27536 #: ../fish/guestfish-actions.pod:2080
27537 msgid "inspect-get-roots"
27542 #: ../fish/guestfish-actions.pod:2082
27545 " inspect-get-roots\n"
27551 #: ../fish/guestfish-actions.pod:2084
27553 "This function is a convenient way to get the list of root devices, as "
27554 "returned from a previous call to L</inspect-os>, but without redoing the "
27555 "whole inspection process."
27560 #: ../fish/guestfish-actions.pod:2088
27562 "This returns an empty list if either no root devices were found or the "
27563 "caller has not called L</inspect-os>."
27568 #: ../fish/guestfish-actions.pod:2093
27569 msgid "inspect-get-type"
27574 #: ../fish/guestfish-actions.pod:2095
27577 " inspect-get-type root\n"
27582 #: ../fish/guestfish-actions.pod:2125
27583 msgid "inspect-get-windows-current-control-set"
27587 #: ../fish/guestfish-actions.pod:2127
27590 " inspect-get-windows-current-control-set root\n"
27596 #: ../fish/guestfish-actions.pod:2138
27597 msgid "inspect-get-windows-systemroot"
27602 #: ../fish/guestfish-actions.pod:2140
27605 " inspect-get-windows-systemroot root\n"
27610 #: ../fish/guestfish-actions.pod:2151
27611 msgid "inspect-is-live"
27615 #: ../fish/guestfish-actions.pod:2153
27618 " inspect-is-live root\n"
27623 #: ../fish/guestfish-actions.pod:2155
27625 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
27626 "then this returns true if a live image was detected on the disk."
27630 #: ../fish/guestfish-actions.pod:2161
27631 msgid "inspect-is-multipart"
27635 #: ../fish/guestfish-actions.pod:2163
27638 " inspect-is-multipart root\n"
27643 #: ../fish/guestfish-actions.pod:2165
27645 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
27646 "then this returns true if the disk is part of a set."
27650 #: ../fish/guestfish-actions.pod:2171
27651 msgid "inspect-is-netinst"
27655 #: ../fish/guestfish-actions.pod:2173
27658 " inspect-is-netinst root\n"
27663 #: ../fish/guestfish-actions.pod:2175
27665 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
27666 "then this returns true if the disk is a network installer, ie. not a self-"
27667 "contained install CD but one which is likely to require network access to "
27668 "complete the install."
27673 #: ../fish/guestfish-actions.pod:2183
27674 msgid "inspect-list-applications"
27679 #: ../fish/guestfish-actions.pod:2185
27682 " inspect-list-applications root\n"
27688 #: ../fish/guestfish-actions.pod:2189
27690 "I<Note:> This call works differently from other parts of the inspection "
27691 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
27692 "then mount up the disks, before calling this. Listing applications is a "
27693 "significantly more difficult operation which requires access to the full "
27694 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
27695 "are just returning data cached in the libguestfs handle, this call actually "
27696 "reads parts of the mounted filesystems during the call."
27701 #: ../fish/guestfish-actions.pod:2279
27707 #: ../fish/guestfish-actions.pod:2281
27716 #: ../fish/guestfish-actions.pod:2296
27718 "You can pass the root string(s) returned to other L</inspect-get-*> "
27719 "functions in order to query further information about each operating system, "
27720 "such as the name and version."
27725 #: ../fish/guestfish-actions.pod:2301
27727 "This function uses other libguestfs features such as L</mount-ro> and L</"
27728 "umount-all> in order to mount and unmount filesystems and look at the "
27729 "contents. This should be called with no disks currently mounted. The "
27730 "function may also use Augeas, so any existing Augeas handle will be closed."
27735 #: ../fish/guestfish-actions.pod:2313 ../fish/guestfish-actions.pod:2511
27736 #: ../fish/guestfish-actions.pod:2570
27737 msgid "See also L</list-filesystems>."
27742 #: ../fish/guestfish-actions.pod:2315
27743 msgid "is-blockdev"
27748 #: ../fish/guestfish-actions.pod:2317
27751 " is-blockdev path\n"
27757 #: ../fish/guestfish-actions.pod:2322 ../fish/guestfish-actions.pod:2340
27758 #: ../fish/guestfish-actions.pod:2359 ../fish/guestfish-actions.pod:2368
27759 #: ../fish/guestfish-actions.pod:2378 ../fish/guestfish-actions.pod:2412
27760 #: ../fish/guestfish-actions.pod:2421
27761 msgid "See also L</stat>."
27766 #: ../fish/guestfish-actions.pod:2324
27772 #: ../fish/guestfish-actions.pod:2326
27781 #: ../fish/guestfish-actions.pod:2333
27787 #: ../fish/guestfish-actions.pod:2335
27790 " is-chardev path\n"
27796 #: ../fish/guestfish-actions.pod:2342
27802 #: ../fish/guestfish-actions.pod:2344
27811 #: ../fish/guestfish-actions.pod:2351
27817 #: ../fish/guestfish-actions.pod:2353
27826 #: ../fish/guestfish-actions.pod:2361
27832 #: ../fish/guestfish-actions.pod:2363
27841 #: ../fish/guestfish-actions.pod:2370
27847 #: ../fish/guestfish-actions.pod:2372
27856 #: ../fish/guestfish-actions.pod:2380
27857 msgid "is-launching"
27862 #: ../fish/guestfish-actions.pod:2382
27871 #: ../fish/guestfish-actions.pod:2389
27877 #: ../fish/guestfish-actions.pod:2391
27886 #: ../fish/guestfish-actions.pod:2396
27892 #: ../fish/guestfish-actions.pod:2398
27901 #: ../fish/guestfish-actions.pod:2405
27907 #: ../fish/guestfish-actions.pod:2407
27910 " is-socket path\n"
27916 #: ../fish/guestfish-actions.pod:2414
27922 #: ../fish/guestfish-actions.pod:2416
27925 " is-symlink path\n"
27930 #: ../fish/guestfish-actions.pod:2423
27935 #: ../fish/guestfish-actions.pod:2425
27943 #: ../fish/guestfish-actions.pod:2430
27944 msgid "is-zero-device"
27948 #: ../fish/guestfish-actions.pod:2432
27951 " is-zero-device device\n"
27957 #: ../fish/guestfish-actions.pod:2438
27958 msgid "kill-subprocess"
27963 #: ../fish/guestfish-actions.pod:2440
27966 " kill-subprocess\n"
27972 #: ../fish/guestfish-actions.pod:2444
27978 #: ../fish/guestfish-actions.pod:2446
27984 #: ../fish/guestfish-actions.pod:2448
27993 #: ../fish/guestfish-actions.pod:2456
27999 #: ../fish/guestfish-actions.pod:2458
28002 " lchown owner group path\n"
28008 #: ../fish/guestfish-actions.pod:2460
28010 "Change the file owner to C<owner> and group to C<group>. This is like L</"
28011 "chown> but if C<path> is a symlink then the link itself is changed, not the "
28017 #: ../fish/guestfish-actions.pod:2468
28023 #: ../fish/guestfish-actions.pod:2470
28026 " lgetxattr path name\n"
28032 #: ../fish/guestfish-actions.pod:2486
28033 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
28038 #: ../fish/guestfish-actions.pod:2488
28044 #: ../fish/guestfish-actions.pod:2490
28047 " lgetxattrs path\n"
28053 #: ../fish/guestfish-actions.pod:2492
28055 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
28056 "it returns the extended attributes of the link itself."
28060 #: ../fish/guestfish-actions.pod:2496
28065 #: ../fish/guestfish-actions.pod:2498
28074 #: ../fish/guestfish-actions.pod:2503
28075 msgid "list-devices"
28080 #: ../fish/guestfish-actions.pod:2505
28088 #: ../fish/guestfish-actions.pod:2513
28089 msgid "list-dm-devices"
28093 #: ../fish/guestfish-actions.pod:2515
28096 " list-dm-devices\n"
28101 #: ../fish/guestfish-actions.pod:2519
28103 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
28104 "previous call to L</luks-open>."
28108 #: ../fish/guestfish-actions.pod:2522
28110 "Device mapper devices which correspond to logical volumes are I<not> "
28111 "returned in this list. Call L</lvs> if you want to list logical volumes."
28116 #: ../fish/guestfish-actions.pod:2526
28117 msgid "list-filesystems"
28122 #: ../fish/guestfish-actions.pod:2528
28125 " list-filesystems\n"
28131 #: ../fish/guestfish-actions.pod:2547
28133 "This command runs other libguestfs commands, which might include L</mount> "
28134 "and L</umount>, and therefore you should use this soon after launch and only "
28135 "when nothing is mounted."
28140 #: ../fish/guestfish-actions.pod:2551
28142 "Not all of the filesystems returned will be mountable. In particular, swap "
28143 "partitions are returned in the list. Also this command does not check that "
28144 "each filesystem found is valid and mountable, and some filesystems might be "
28145 "mountable but require special options. Filesystems may not all belong to a "
28146 "single logical operating system (use L</inspect-os> to look for OSes)."
28151 #: ../fish/guestfish-actions.pod:2559
28152 msgid "list-partitions"
28157 #: ../fish/guestfish-actions.pod:2561
28160 " list-partitions\n"
28166 #: ../fish/guestfish-actions.pod:2567
28168 "This does not return logical volumes. For that you will need to call L</"
28174 #: ../fish/guestfish-actions.pod:2572
28180 #: ../fish/guestfish-actions.pod:2574
28189 #: ../fish/guestfish-actions.pod:2582
28195 #: ../fish/guestfish-actions.pod:2584
28198 " ln target linkname\n"
28204 #: ../fish/guestfish-actions.pod:2588
28210 #: ../fish/guestfish-actions.pod:2590
28213 " ln-f target linkname\n"
28219 #: ../fish/guestfish-actions.pod:2595
28225 #: ../fish/guestfish-actions.pod:2597
28228 " ln-s target linkname\n"
28234 #: ../fish/guestfish-actions.pod:2601
28240 #: ../fish/guestfish-actions.pod:2603
28243 " ln-sf target linkname\n"
28249 #: ../fish/guestfish-actions.pod:2608
28250 msgid "lremovexattr"
28255 #: ../fish/guestfish-actions.pod:2610
28258 " lremovexattr xattr path\n"
28264 #: ../fish/guestfish-actions.pod:2612
28266 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
28267 "it removes an extended attribute of the link itself."
28272 #: ../fish/guestfish-actions.pod:2616
28278 #: ../fish/guestfish-actions.pod:2618
28287 #: ../fish/guestfish-actions.pod:2624
28289 "This command is mostly useful for interactive sessions. Programs should "
28290 "probably use L</readdir> instead."
28295 #: ../fish/guestfish-actions.pod:2627
28301 #: ../fish/guestfish-actions.pod:2629
28304 " lsetxattr xattr val vallen path\n"
28310 #: ../fish/guestfish-actions.pod:2631
28312 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
28313 "sets an extended attribute of the link itself."
28318 #: ../fish/guestfish-actions.pod:2635
28324 #: ../fish/guestfish-actions.pod:2637
28333 #: ../fish/guestfish-actions.pod:2641
28335 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
28336 "the link is stat-ed, not the file it refers to."
28341 #: ../fish/guestfish-actions.pod:2647
28347 #: ../fish/guestfish-actions.pod:2649
28350 " lstatlist path 'names ...'\n"
28356 #: ../fish/guestfish-actions.pod:2651
28358 "This call allows you to perform the L</lstat> operation on multiple files, "
28359 "where all files are in the directory C<path>. C<names> is the list of files "
28360 "from this directory."
28365 #: ../fish/guestfish-actions.pod:2660
28367 "This call is intended for programs that want to efficiently list a directory "
28368 "contents without making many round-trips. See also L</lxattrlist> for a "
28369 "similarly efficient call for getting extended attributes. Very long "
28370 "directory listings might cause the protocol message size to be exceeded, "
28371 "causing this call to fail. The caller must split up such requests into "
28372 "smaller groups of names."
28377 #: ../fish/guestfish-actions.pod:2668
28378 msgid "luks-add-key"
28383 #: ../fish/guestfish-actions.pod:2670
28386 " luks-add-key device keyslot\n"
28392 #: ../fish/guestfish-actions.pod:2677
28394 "Note that if C<keyslot> already contains a key, then this command will "
28395 "fail. You have to use L</luks-kill-slot> first to remove that key."
28400 #: ../fish/guestfish-actions.pod:2681 ../fish/guestfish-actions.pod:2703
28401 #: ../fish/guestfish-actions.pod:2716 ../fish/guestfish-actions.pod:2730
28402 #: ../fish/guestfish-actions.pod:2756 ../fish/guestfish-actions.pod:2766
28404 "This command has one or more key or passphrase parameters. Guestfish will "
28405 "prompt for these separately."
28410 #: ../fish/guestfish-actions.pod:2684
28416 #: ../fish/guestfish-actions.pod:2686
28419 " luks-close device\n"
28425 #: ../fish/guestfish-actions.pod:2688
28427 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
28428 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
28429 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
28435 #: ../fish/guestfish-actions.pod:2694
28436 msgid "luks-format"
28441 #: ../fish/guestfish-actions.pod:2696
28444 " luks-format device keyslot\n"
28450 #: ../fish/guestfish-actions.pod:2709
28451 msgid "luks-format-cipher"
28456 #: ../fish/guestfish-actions.pod:2711
28459 " luks-format-cipher device keyslot cipher\n"
28465 #: ../fish/guestfish-actions.pod:2713
28467 "This command is the same as L</luks-format> but it also allows you to set "
28468 "the C<cipher> used."
28473 #: ../fish/guestfish-actions.pod:2722
28474 msgid "luks-kill-slot"
28479 #: ../fish/guestfish-actions.pod:2724
28482 " luks-kill-slot device keyslot\n"
28488 #: ../fish/guestfish-actions.pod:2733
28494 #: ../fish/guestfish-actions.pod:2735
28497 " luks-open device mapname\n"
28503 #: ../fish/guestfish-actions.pod:2749
28505 "If this block device contains LVM volume groups, then calling L</vgscan> "
28506 "followed by L</vg-activate-all> will make them visible."
28510 #: ../fish/guestfish-actions.pod:2753
28511 msgid "Use L</list-dm-devices> to list all device mapper devices."
28516 #: ../fish/guestfish-actions.pod:2759
28517 msgid "luks-open-ro"
28522 #: ../fish/guestfish-actions.pod:2761
28525 " luks-open-ro device mapname\n"
28531 #: ../fish/guestfish-actions.pod:2763
28533 "This is the same as L</luks-open> except that a read-only mapping is created."
28538 #: ../fish/guestfish-actions.pod:2769
28544 #: ../fish/guestfish-actions.pod:2771
28547 " lvcreate logvol volgroup mbytes\n"
28553 #: ../fish/guestfish-actions.pod:2776
28554 msgid "lvm-canonical-lv-name"
28559 #: ../fish/guestfish-actions.pod:2778
28562 " lvm-canonical-lv-name lvname\n"
28568 #: ../fish/guestfish-actions.pod:2787
28569 msgid "See also L</is-lv>."
28574 #: ../fish/guestfish-actions.pod:2789
28575 msgid "lvm-clear-filter"
28580 #: ../fish/guestfish-actions.pod:2791
28583 " lvm-clear-filter\n"
28589 #: ../fish/guestfish-actions.pod:2793
28591 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
28597 #: ../fish/guestfish-actions.pod:2799
28598 msgid "lvm-remove-all"
28603 #: ../fish/guestfish-actions.pod:2801
28606 " lvm-remove-all\n"
28612 #: ../fish/guestfish-actions.pod:2809
28613 msgid "lvm-set-filter"
28618 #: ../fish/guestfish-actions.pod:2811
28621 " lvm-set-filter 'devices ...'\n"
28627 #: ../fish/guestfish-actions.pod:2836
28633 #: ../fish/guestfish-actions.pod:2838
28636 " lvremove device\n"
28642 #: ../fish/guestfish-actions.pod:2846
28648 #: ../fish/guestfish-actions.pod:2848
28651 " lvrename logvol newlogvol\n"
28657 #: ../fish/guestfish-actions.pod:2852
28663 #: ../fish/guestfish-actions.pod:2854
28666 " lvresize device mbytes\n"
28672 #: ../fish/guestfish-actions.pod:2860
28673 msgid "lvresize-free"
28678 #: ../fish/guestfish-actions.pod:2862
28681 " lvresize-free lv percent\n"
28687 #: ../fish/guestfish-actions.pod:2870
28693 #: ../fish/guestfish-actions.pod:2872
28702 #: ../fish/guestfish-actions.pod:2880
28703 msgid "See also L</lvs-full>, L</list-filesystems>."
28708 #: ../fish/guestfish-actions.pod:2882
28714 #: ../fish/guestfish-actions.pod:2884
28723 #: ../fish/guestfish-actions.pod:2889
28729 #: ../fish/guestfish-actions.pod:2891
28738 #: ../fish/guestfish-actions.pod:2895
28744 #: ../fish/guestfish-actions.pod:2897
28747 " lxattrlist path 'names ...'\n"
28753 #: ../fish/guestfish-actions.pod:2913
28755 "This call is intended for programs that want to efficiently list a directory "
28756 "contents without making many round-trips. See also L</lstatlist> for a "
28757 "similarly efficient call for getting standard stats. Very long directory "
28758 "listings might cause the protocol message size to be exceeded, causing this "
28759 "call to fail. The caller must split up such requests into smaller groups of "
28765 #: ../fish/guestfish-actions.pod:2921
28771 #: ../fish/guestfish-actions.pod:2923
28780 #: ../fish/guestfish-actions.pod:2927
28786 #: ../fish/guestfish-actions.pod:2929
28789 " mkdir-mode path mode\n"
28795 #: ../fish/guestfish-actions.pod:2938
28796 msgid "See also L</mkdir>, L</umask>"
28801 #: ../fish/guestfish-actions.pod:2940
28807 #: ../fish/guestfish-actions.pod:2942
28816 #: ../fish/guestfish-actions.pod:2947
28822 #: ../fish/guestfish-actions.pod:2949
28825 " mkdtemp template\n"
28831 #: ../fish/guestfish-actions.pod:2970
28837 #: ../fish/guestfish-actions.pod:2972
28840 " mke2fs-J fstype blocksize device journal\n"
28846 #: ../fish/guestfish-actions.pod:2980
28847 msgid "See also L</mke2journal>."
28852 #: ../fish/guestfish-actions.pod:2982
28858 #: ../fish/guestfish-actions.pod:2984
28861 " mke2fs-JL fstype blocksize device label\n"
28867 #: ../fish/guestfish-actions.pod:2989
28868 msgid "See also L</mke2journal-L>."
28873 #: ../fish/guestfish-actions.pod:2991
28879 #: ../fish/guestfish-actions.pod:2993
28882 " mke2fs-JU fstype blocksize device uuid\n"
28888 #: ../fish/guestfish-actions.pod:2998
28889 msgid "See also L</mke2journal-U>."
28894 #: ../fish/guestfish-actions.pod:3000
28895 msgid "mke2journal"
28900 #: ../fish/guestfish-actions.pod:3002
28903 " mke2journal blocksize device\n"
28909 #: ../fish/guestfish-actions.pod:3009
28910 msgid "mke2journal-L"
28915 #: ../fish/guestfish-actions.pod:3011
28918 " mke2journal-L blocksize label device\n"
28924 #: ../fish/guestfish-actions.pod:3015
28925 msgid "mke2journal-U"
28930 #: ../fish/guestfish-actions.pod:3017
28933 " mke2journal-U blocksize uuid device\n"
28939 #: ../fish/guestfish-actions.pod:3021
28945 #: ../fish/guestfish-actions.pod:3023
28948 " mkfifo mode path\n"
28954 #: ../fish/guestfish-actions.pod:3025
28956 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
28957 "is just a convenient wrapper around L</mknod>."
28962 #: ../fish/guestfish-actions.pod:3031
28968 #: ../fish/guestfish-actions.pod:3033
28971 " mkfs fstype device\n"
28977 #: ../fish/guestfish-actions.pod:3039
28983 #: ../fish/guestfish-actions.pod:3041
28986 " mkfs-b fstype blocksize device\n"
28992 #: ../fish/guestfish-actions.pod:3043
28994 "This call is similar to L</mkfs>, but it allows you to control the block "
28995 "size of the resulting filesystem. Supported block sizes depend on the "
28996 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
29001 #: ../fish/guestfish-actions.pod:3058
29006 #: ../fish/guestfish-actions.pod:3060
29009 " mkfs-opts fstype device [blocksize:..] [features:..] [inode:..] [sectorsize:..]\n"
29015 #: ../fish/guestfish-actions.pod:3105
29016 msgid "mkmountpoint"
29021 #: ../fish/guestfish-actions.pod:3107
29024 " mkmountpoint exemptpath\n"
29030 #: ../fish/guestfish-actions.pod:3109
29032 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
29033 "to create extra mountpoints before mounting the first filesystem."
29038 #: ../fish/guestfish-actions.pod:3133
29040 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
29041 "unexpected errors if you try to mix these calls. It is safest to manually "
29042 "unmount filesystems and remove mountpoints after use."
29047 #: ../fish/guestfish-actions.pod:3137
29049 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
29050 "for this to work for manual mountpoints, you must ensure that the innermost "
29051 "mountpoints have the longest pathnames, as in the example code above."
29055 #: ../fish/guestfish-actions.pod:3144
29057 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
29058 "L</umount-all> to be called when the handle is closed which can also trigger "
29064 #: ../fish/guestfish-actions.pod:3148
29070 #: ../fish/guestfish-actions.pod:3150
29073 " mknod mode devmajor devminor path\n"
29079 #: ../fish/guestfish-actions.pod:3160
29081 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
29082 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
29083 "regular file). These constants are available in the standard Linux header "
29084 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
29085 "wrappers around this command which bitwise OR in the appropriate constant "
29091 #: ../fish/guestfish-actions.pod:3170
29097 #: ../fish/guestfish-actions.pod:3172
29100 " mknod-b mode devmajor devminor path\n"
29106 #: ../fish/guestfish-actions.pod:3174
29108 "This call creates a block device node called C<path> with mode C<mode> and "
29109 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
29110 "wrapper around L</mknod>."
29115 #: ../fish/guestfish-actions.pod:3180
29121 #: ../fish/guestfish-actions.pod:3182
29124 " mknod-c mode devmajor devminor path\n"
29130 #: ../fish/guestfish-actions.pod:3184
29132 "This call creates a char device node called C<path> with mode C<mode> and "
29133 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
29134 "wrapper around L</mknod>."
29139 #: ../fish/guestfish-actions.pod:3190
29145 #: ../fish/guestfish-actions.pod:3192
29154 #: ../fish/guestfish-actions.pod:3196
29160 #: ../fish/guestfish-actions.pod:3198
29163 " mkswap-L label device\n"
29169 #: ../fish/guestfish-actions.pod:3206
29175 #: ../fish/guestfish-actions.pod:3208
29178 " mkswap-U uuid device\n"
29184 #: ../fish/guestfish-actions.pod:3212
29185 msgid "mkswap-file"
29190 #: ../fish/guestfish-actions.pod:3214
29193 " mkswap-file path\n"
29199 #: ../fish/guestfish-actions.pod:3218
29201 "This command just writes a swap file signature to an existing file. To "
29202 "create the file itself, use something like L</fallocate>."
29207 #: ../fish/guestfish-actions.pod:3221
29213 #: ../fish/guestfish-actions.pod:3223
29216 " modprobe modulename\n"
29222 #: ../fish/guestfish-actions.pod:3230
29228 #: ../fish/guestfish-actions.pod:3232
29231 " mount device mountpoint\n"
29237 #: ../fish/guestfish-actions.pod:3248
29239 "B<Important note:> When you use this call, the filesystem options C<sync> "
29240 "and C<noatime> are set implicitly. This was originally done because we "
29241 "thought it would improve reliability, but it turns out that I<-o sync> has a "
29242 "very large negative performance impact and negligible effect on "
29243 "reliability. Therefore we recommend that you avoid using L</mount> in any "
29244 "code that needs performance, and instead use L</mount-options> (use an empty "
29245 "string for the first parameter if you don't want any options)."
29249 #: ../fish/guestfish-actions.pod:3265
29254 #: ../fish/guestfish-actions.pod:3267
29257 " mount-9p mounttag mountpoint [options:..]\n"
29263 #: ../fish/guestfish-actions.pod:3278
29269 #: ../fish/guestfish-actions.pod:3280
29272 " mount-loop file mountpoint\n"
29278 #: ../fish/guestfish-actions.pod:3286
29279 msgid "mount-options"
29284 #: ../fish/guestfish-actions.pod:3288
29287 " mount-options options device mountpoint\n"
29293 #: ../fish/guestfish-actions.pod:3290
29295 "This is the same as the L</mount> command, but it allows you to set the "
29296 "mount options as for the L<mount(8)> I<-o> flag."
29301 #: ../fish/guestfish-actions.pod:3298
29307 #: ../fish/guestfish-actions.pod:3300
29310 " mount-ro device mountpoint\n"
29316 #: ../fish/guestfish-actions.pod:3302
29318 "This is the same as the L</mount> command, but it mounts the filesystem with "
29319 "the read-only (I<-o ro>) flag."
29324 #: ../fish/guestfish-actions.pod:3305
29330 #: ../fish/guestfish-actions.pod:3307
29333 " mount-vfs options vfstype device mountpoint\n"
29339 #: ../fish/guestfish-actions.pod:3309
29341 "This is the same as the L</mount> command, but it allows you to set both the "
29342 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
29347 #: ../fish/guestfish-actions.pod:3313
29348 msgid "mountpoints"
29353 #: ../fish/guestfish-actions.pod:3315
29362 #: ../fish/guestfish-actions.pod:3317
29364 "This call is similar to L</mounts>. That call returns a list of devices. "
29365 "This one returns a hash table (map) of device name to directory where the "
29366 "device is mounted."
29371 #: ../fish/guestfish-actions.pod:3321
29377 #: ../fish/guestfish-actions.pod:3323
29386 #: ../fish/guestfish-actions.pod:3330
29387 msgid "See also: L</mountpoints>"
29392 #: ../fish/guestfish-actions.pod:3332
29398 #: ../fish/guestfish-actions.pod:3334
29407 #: ../fish/guestfish-actions.pod:3339
29408 msgid "ntfs-3g-probe"
29413 #: ../fish/guestfish-actions.pod:3341
29416 " ntfs-3g-probe true|false device\n"
29422 #: ../fish/guestfish-actions.pod:3355
29428 #: ../fish/guestfish-actions.pod:3357
29431 " ntfsresize device\n"
29436 #: ../fish/guestfish-actions.pod:3379
29437 msgid "ntfsresize-opts"
29441 #: ../fish/guestfish-actions.pod:3381
29444 " ntfsresize-opts device [size:..] [force:..]\n"
29449 #: ../fish/guestfish-actions.pod:3400
29451 "After the resize operation, the filesystem is always marked as requiring a "
29452 "consistency check (for safety). You have to boot into Windows to perform "
29453 "this check and clear this condition. If you I<don't> set the C<force> "
29454 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
29455 "a single filesystem without booting into Windows between each resize."
29460 #: ../fish/guestfish-actions.pod:3413
29461 msgid "ntfsresize-size"
29466 #: ../fish/guestfish-actions.pod:3415
29469 " ntfsresize-size device size\n"
29475 #: ../fish/guestfish-actions.pod:3417
29477 "This command is the same as L</ntfsresize> except that it allows you to "
29478 "specify the new size (in bytes) explicitly."
29483 #: ../fish/guestfish-actions.pod:3427
29489 #: ../fish/guestfish-actions.pod:3429
29492 " part-add device prlogex startsect endsect\n"
29498 #: ../fish/guestfish-actions.pod:3431
29500 "This command adds a partition to C<device>. If there is no partition table "
29501 "on the device, call L</part-init> first."
29506 #: ../fish/guestfish-actions.pod:3443
29508 "Creating a partition which covers the whole disk is not so easy. Use L</"
29509 "part-disk> to do that."
29514 #: ../fish/guestfish-actions.pod:3446
29520 #: ../fish/guestfish-actions.pod:3448
29523 " part-del device partnum\n"
29529 #: ../fish/guestfish-actions.pod:3456
29535 #: ../fish/guestfish-actions.pod:3458
29538 " part-disk device parttype\n"
29544 #: ../fish/guestfish-actions.pod:3460
29546 "This command is simply a combination of L</part-init> followed by L</part-"
29547 "add> to create a single primary partition covering the whole disk."
29552 #: ../fish/guestfish-actions.pod:3464
29554 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
29555 "possible values are described in L</part-init>."
29560 #: ../fish/guestfish-actions.pod:3470
29561 msgid "part-get-bootable"
29566 #: ../fish/guestfish-actions.pod:3472
29569 " part-get-bootable device partnum\n"
29575 #: ../fish/guestfish-actions.pod:3477
29576 msgid "See also L</part-set-bootable>."
29581 #: ../fish/guestfish-actions.pod:3479
29582 msgid "part-get-mbr-id"
29587 #: ../fish/guestfish-actions.pod:3481
29590 " part-get-mbr-id device partnum\n"
29596 #: ../fish/guestfish-actions.pod:3486 ../fish/guestfish-actions.pod:3624
29598 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
29599 "undefined results for other partition table types (see L</part-get-"
29605 #: ../fish/guestfish-actions.pod:3490
29606 msgid "part-get-parttype"
29611 #: ../fish/guestfish-actions.pod:3492
29614 " part-get-parttype device\n"
29620 #: ../fish/guestfish-actions.pod:3497
29622 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
29623 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
29624 "possible, although unusual. See L</part-init> for a full list."
29629 #: ../fish/guestfish-actions.pod:3502
29635 #: ../fish/guestfish-actions.pod:3504
29638 " part-init device parttype\n"
29644 #: ../fish/guestfish-actions.pod:3510
29646 "Initially there are no partitions. Following this, you should call L</part-"
29647 "add> for each partition required."
29652 #: ../fish/guestfish-actions.pod:3573
29658 #: ../fish/guestfish-actions.pod:3575
29661 " part-list device\n"
29667 #: ../fish/guestfish-actions.pod:3590
29669 "Start of the partition I<in bytes>. To get sectors you have to divide by "
29670 "the device's sector size, see L</blockdev-getss>."
29675 #: ../fish/guestfish-actions.pod:3603
29676 msgid "part-set-bootable"
29681 #: ../fish/guestfish-actions.pod:3605
29684 " part-set-bootable device partnum true|false\n"
29690 #: ../fish/guestfish-actions.pod:3614
29691 msgid "part-set-mbr-id"
29696 #: ../fish/guestfish-actions.pod:3616
29699 " part-set-mbr-id device partnum idbyte\n"
29705 #: ../fish/guestfish-actions.pod:3628
29706 msgid "part-set-name"
29711 #: ../fish/guestfish-actions.pod:3630
29714 " part-set-name device partnum name\n"
29720 #: ../fish/guestfish-actions.pod:3638
29721 msgid "part-to-dev"
29726 #: ../fish/guestfish-actions.pod:3640
29729 " part-to-dev partition\n"
29735 #: ../fish/guestfish-actions.pod:3646
29737 "The named partition must exist, for example as a string returned from L</"
29738 "list-partitions>."
29743 #: ../fish/guestfish-actions.pod:3649
29744 msgid "ping-daemon"
29749 #: ../fish/guestfish-actions.pod:3651
29758 #: ../fish/guestfish-actions.pod:3658
29764 #: ../fish/guestfish-actions.pod:3660
29767 " pread path count offset\n"
29773 #: ../fish/guestfish-actions.pod:3668
29774 msgid "See also L</pwrite>, L</pread-device>."
29779 #: ../fish/guestfish-actions.pod:3673
29780 msgid "pread-device"
29785 #: ../fish/guestfish-actions.pod:3675
29788 " pread-device device count offset\n"
29794 #: ../fish/guestfish-actions.pod:3683
29795 msgid "See also L</pread>."
29800 #: ../fish/guestfish-actions.pod:3688
29806 #: ../fish/guestfish-actions.pod:3690
29809 " pvcreate device\n"
29815 #: ../fish/guestfish-actions.pod:3696
29821 #: ../fish/guestfish-actions.pod:3698
29824 " pvremove device\n"
29830 #: ../fish/guestfish-actions.pod:3707
29836 #: ../fish/guestfish-actions.pod:3709
29839 " pvresize device\n"
29845 #: ../fish/guestfish-actions.pod:3714
29846 msgid "pvresize-size"
29851 #: ../fish/guestfish-actions.pod:3716
29854 " pvresize-size device size\n"
29860 #: ../fish/guestfish-actions.pod:3718
29862 "This command is the same as L</pvresize> except that it allows you to "
29863 "specify the new size (in bytes) explicitly."
29868 #: ../fish/guestfish-actions.pod:3721
29874 #: ../fish/guestfish-actions.pod:3723
29883 #: ../fish/guestfish-actions.pod:3731
29884 msgid "See also L</pvs-full>."
29889 #: ../fish/guestfish-actions.pod:3733
29895 #: ../fish/guestfish-actions.pod:3735
29904 #: ../fish/guestfish-actions.pod:3740
29910 #: ../fish/guestfish-actions.pod:3742
29919 #: ../fish/guestfish-actions.pod:3746
29925 #: ../fish/guestfish-actions.pod:3748
29928 " pwrite path content offset\n"
29934 #: ../fish/guestfish-actions.pod:3759
29935 msgid "See also L</pread>, L</pwrite-device>."
29940 #: ../fish/guestfish-actions.pod:3764
29941 msgid "pwrite-device"
29946 #: ../fish/guestfish-actions.pod:3766
29949 " pwrite-device device content offset\n"
29955 #: ../fish/guestfish-actions.pod:3776
29956 msgid "See also L</pwrite>."
29961 #: ../fish/guestfish-actions.pod:3781
29967 #: ../fish/guestfish-actions.pod:3783
29970 " read-file path\n"
29976 #: ../fish/guestfish-actions.pod:3788
29978 "Unlike L</cat>, this function can correctly handle files that contain "
29979 "embedded ASCII NUL characters. However unlike L</download>, this function "
29980 "is limited in the total size of file that can be handled."
29985 #: ../fish/guestfish-actions.pod:3796
29991 #: ../fish/guestfish-actions.pod:3798
29994 " read-lines path\n"
30000 #: ../fish/guestfish-actions.pod:3805
30002 "Note that this function cannot correctly handle binary files (specifically, "
30003 "files containing C<\\0> character which is treated as end of line). For "
30004 "those you need to use the L</read-file> function which has a more complex "
30010 #: ../fish/guestfish-actions.pod:3810
30016 #: ../fish/guestfish-actions.pod:3812
30025 #: ../fish/guestfish-actions.pod:3864
30027 "This function is primarily intended for use by programs. To get a simple "
30028 "list of names, use L</ls>. To get a printable directory for human "
30029 "consumption, use L</ll>."
30034 #: ../fish/guestfish-actions.pod:3868
30040 #: ../fish/guestfish-actions.pod:3870
30049 #: ../fish/guestfish-actions.pod:3874
30050 msgid "readlinklist"
30055 #: ../fish/guestfish-actions.pod:3876
30058 " readlinklist path 'names ...'\n"
30064 #: ../fish/guestfish-actions.pod:3900
30070 #: ../fish/guestfish-actions.pod:3902
30079 #: ../fish/guestfish-actions.pod:3907
30080 msgid "removexattr"
30085 #: ../fish/guestfish-actions.pod:3909
30088 " removexattr xattr path\n"
30094 #: ../fish/guestfish-actions.pod:3914
30095 msgid "See also: L</lremovexattr>, L<attr(5)>."
30100 #: ../fish/guestfish-actions.pod:3916
30106 #: ../fish/guestfish-actions.pod:3918
30109 " resize2fs device\n"
30115 #: ../fish/guestfish-actions.pod:3923
30117 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
30118 "before calling this command. For unknown reasons C<resize2fs> sometimes "
30119 "gives an error about this and sometimes not. In any case, it is always safe "
30120 "to call L</e2fsck-f> before calling this function."
30124 #: ../fish/guestfish-actions.pod:3929
30125 msgid "resize2fs-M"
30129 #: ../fish/guestfish-actions.pod:3931
30132 " resize2fs-M device\n"
30137 #: ../fish/guestfish-actions.pod:3933
30139 "This command is the same as L</resize2fs>, but the filesystem is resized to "
30140 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
30145 #: ../fish/guestfish-actions.pod:3937
30147 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
30148 "and read the C<Block size> and C<Block count> values. These two numbers, "
30149 "multiplied together, give the resulting size of the minimal filesystem in "
30155 #: ../fish/guestfish-actions.pod:3942
30156 msgid "resize2fs-size"
30161 #: ../fish/guestfish-actions.pod:3944
30164 " resize2fs-size device size\n"
30170 #: ../fish/guestfish-actions.pod:3946
30172 "This command is the same as L</resize2fs> except that it allows you to "
30173 "specify the new size (in bytes) explicitly."
30178 #: ../fish/guestfish-actions.pod:3949
30184 #: ../fish/guestfish-actions.pod:3951
30193 #: ../fish/guestfish-actions.pod:3955
30199 #: ../fish/guestfish-actions.pod:3957
30208 #: ../fish/guestfish-actions.pod:3963
30214 #: ../fish/guestfish-actions.pod:3965
30223 #: ../fish/guestfish-actions.pod:3969
30224 msgid "rmmountpoint"
30229 #: ../fish/guestfish-actions.pod:3971
30232 " rmmountpoint exemptpath\n"
30238 #: ../fish/guestfish-actions.pod:3973
30240 "This calls removes a mountpoint that was previously created with L</"
30241 "mkmountpoint>. See L</mkmountpoint> for full details."
30246 #: ../fish/guestfish-actions.pod:3977
30247 msgid "scrub-device"
30252 #: ../fish/guestfish-actions.pod:3979
30255 " scrub-device device\n"
30261 #: ../fish/guestfish-actions.pod:3990
30267 #: ../fish/guestfish-actions.pod:3992
30270 " scrub-file file\n"
30276 #: ../fish/guestfish-actions.pod:4002
30277 msgid "scrub-freespace"
30282 #: ../fish/guestfish-actions.pod:4004
30285 " scrub-freespace dir\n"
30291 #: ../fish/guestfish-actions.pod:4006
30293 "This command creates the directory C<dir> and then fills it with files until "
30294 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
30295 "deletes them. The intention is to scrub any free space on the partition "
30296 "containing C<dir>."
30301 #: ../fish/guestfish-actions.pod:4015
30307 #: ../fish/guestfish-actions.pod:4017
30313 #: ../fish/guestfish-actions.pod:4019
30316 " set-append append\n"
30321 #: ../fish/guestfish-actions.pod:4030
30322 msgid "set-attach-method"
30326 #: ../fish/guestfish-actions.pod:4032
30327 msgid "attach-method"
30331 #: ../fish/guestfish-actions.pod:4034
30334 " set-attach-method attachmethod\n"
30340 #: ../fish/guestfish-actions.pod:4056
30341 msgid "set-autosync"
30346 #: ../fish/guestfish-actions.pod:4058
30352 #: ../fish/guestfish-actions.pod:4060
30355 " set-autosync true|false\n"
30361 #: ../fish/guestfish-actions.pod:4070
30367 #: ../fish/guestfish-actions.pod:4072
30373 #: ../fish/guestfish-actions.pod:4074
30376 " set-direct true|false\n"
30382 #: ../fish/guestfish-actions.pod:4080
30384 "One consequence of this is that log messages aren't caught by the library "
30385 "and handled by L</set-log-message-callback>, but go straight to stdout."
30390 #: ../fish/guestfish-actions.pod:4089
30391 msgid "set-e2label"
30396 #: ../fish/guestfish-actions.pod:4091
30399 " set-e2label device label\n"
30405 #: ../fish/guestfish-actions.pod:4097
30407 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
30408 "label on a filesystem."
30413 #: ../fish/guestfish-actions.pod:4100
30419 #: ../fish/guestfish-actions.pod:4102
30422 " set-e2uuid device uuid\n"
30428 #: ../fish/guestfish-actions.pod:4109
30430 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
30431 "UUID of a filesystem."
30436 #: ../fish/guestfish-actions.pod:4112
30437 msgid "set-memsize"
30442 #: ../fish/guestfish-actions.pod:4114
30448 #: ../fish/guestfish-actions.pod:4116
30451 " set-memsize memsize\n"
30457 #: ../fish/guestfish-actions.pod:4118
30459 "This sets the memory size in megabytes allocated to the qemu subprocess. "
30460 "This only has any effect if called before L</launch>."
30465 #: ../fish/guestfish-actions.pod:4129
30466 msgid "set-network"
30471 #: ../fish/guestfish-actions.pod:4131
30477 #: ../fish/guestfish-actions.pod:4133
30480 " set-network true|false\n"
30486 #: ../fish/guestfish-actions.pod:4141
30488 "You must call this before calling L</launch>, otherwise it has no effect."
30493 #: ../fish/guestfish-actions.pod:4144
30499 #: ../fish/guestfish-actions.pod:4146
30505 #: ../fish/guestfish-actions.pod:4148
30508 " set-path searchpath\n"
30514 #: ../fish/guestfish-actions.pod:4157
30520 #: ../fish/guestfish-actions.pod:4159
30526 #: ../fish/guestfish-actions.pod:4161
30535 #: ../fish/guestfish-actions.pod:4181
30536 msgid "set-recovery-proc"
30541 #: ../fish/guestfish-actions.pod:4183
30542 msgid "recovery-proc"
30547 #: ../fish/guestfish-actions.pod:4185
30550 " set-recovery-proc true|false\n"
30556 #: ../fish/guestfish-actions.pod:4187
30558 "If this is called with the parameter C<false> then L</launch> does not "
30559 "create a recovery process. The purpose of the recovery process is to stop "
30560 "runaway qemu processes in the case where the main program aborts abruptly."
30565 #: ../fish/guestfish-actions.pod:4192
30567 "This only has any effect if called before L</launch>, and the default is "
30573 #: ../fish/guestfish-actions.pod:4201
30574 msgid "set-selinux"
30579 #: ../fish/guestfish-actions.pod:4203
30585 #: ../fish/guestfish-actions.pod:4205
30588 " set-selinux true|false\n"
30594 #: ../fish/guestfish-actions.pod:4216
30600 #: ../fish/guestfish-actions.pod:4218
30606 #: ../fish/guestfish-actions.pod:4220
30609 " set-trace true|false\n"
30614 #: ../fish/guestfish-actions.pod:4232
30616 "Trace messages are normally sent to C<stderr>, unless you register a "
30617 "callback to send them somewhere else (see L</set-event-callback>)."
30622 #: ../fish/guestfish-actions.pod:4236
30623 msgid "set-verbose"
30628 #: ../fish/guestfish-actions.pod:4238
30634 #: ../fish/guestfish-actions.pod:4240
30637 " set-verbose true|false\n"
30642 #: ../fish/guestfish-actions.pod:4247
30644 "Verbose messages are normally sent to C<stderr>, unless you register a "
30645 "callback to send them somewhere else (see L</set-event-callback>)."
30650 #: ../fish/guestfish-actions.pod:4251
30656 #: ../fish/guestfish-actions.pod:4253
30659 " setcon context\n"
30665 #: ../fish/guestfish-actions.pod:4260
30671 #: ../fish/guestfish-actions.pod:4262
30674 " setxattr xattr val vallen path\n"
30680 #: ../fish/guestfish-actions.pod:4268
30681 msgid "See also: L</lsetxattr>, L<attr(5)>."
30686 #: ../fish/guestfish-actions.pod:4270
30692 #: ../fish/guestfish-actions.pod:4272
30695 " sfdisk device cyls heads sectors 'lines ...'\n"
30701 #: ../fish/guestfish-actions.pod:4294
30702 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
30707 #: ../fish/guestfish-actions.pod:4307
30713 #: ../fish/guestfish-actions.pod:4309
30716 " sfdiskM device 'lines ...'\n"
30722 #: ../fish/guestfish-actions.pod:4311
30724 "This is a simplified interface to the L</sfdisk> command, where partition "
30725 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
30726 "you don't need to specify the cyls, heads and sectors parameters which were "
30727 "rarely if ever used anyway."
30732 #: ../fish/guestfish-actions.pod:4317
30733 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
30738 #: ../fish/guestfish-actions.pod:4330
30744 #: ../fish/guestfish-actions.pod:4332
30747 " sfdisk-N device partnum cyls heads sectors line\n"
30753 #: ../fish/guestfish-actions.pod:4337
30755 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
30756 "cyls/heads/sectors parameters."
30761 #: ../fish/guestfish-actions.pod:4340
30762 msgid "See also: L</part-add>"
30767 #: ../fish/guestfish-actions.pod:4352
30768 msgid "sfdisk-disk-geometry"
30773 #: ../fish/guestfish-actions.pod:4354
30776 " sfdisk-disk-geometry device\n"
30782 #: ../fish/guestfish-actions.pod:4356
30784 "This displays the disk geometry of C<device> read from the partition table. "
30785 "Especially in the case where the underlying block device has been resized, "
30786 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
30787 "kernel-geometry>)."
30792 #: ../fish/guestfish-actions.pod:4364
30793 msgid "sfdisk-kernel-geometry"
30798 #: ../fish/guestfish-actions.pod:4366
30801 " sfdisk-kernel-geometry device\n"
30807 #: ../fish/guestfish-actions.pod:4373
30813 #: ../fish/guestfish-actions.pod:4375
30816 " sfdisk-l device\n"
30822 #: ../fish/guestfish-actions.pod:4381
30823 msgid "See also: L</part-list>"
30828 #: ../fish/guestfish-actions.pod:4390
30834 #: ../fish/guestfish-actions.pod:4392
30843 #: ../fish/guestfish-actions.pod:4397
30844 msgid "This is like L</command>, but passes the command to:"
30849 #: ../fish/guestfish-actions.pod:4405
30850 msgid "All the provisos about L</command> apply to this call."
30855 #: ../fish/guestfish-actions.pod:4407
30861 #: ../fish/guestfish-actions.pod:4409
30864 " sh-lines command\n"
30870 #: ../fish/guestfish-actions.pod:4411
30871 msgid "This is the same as L</sh>, but splits the result into a list of lines."
30876 #: ../fish/guestfish-actions.pod:4414
30877 msgid "See also: L</command-lines>"
30882 #: ../fish/guestfish-actions.pod:4416
30888 #: ../fish/guestfish-actions.pod:4418
30897 #: ../fish/guestfish-actions.pod:4422
30903 #: ../fish/guestfish-actions.pod:4424
30912 #: ../fish/guestfish-actions.pod:4430
30918 #: ../fish/guestfish-actions.pod:4432
30927 #: ../fish/guestfish-actions.pod:4440
30933 #: ../fish/guestfish-actions.pod:4442
30942 #: ../fish/guestfish-actions.pod:4450
30948 #: ../fish/guestfish-actions.pod:4452
30951 " strings-e encoding path\n"
30957 #: ../fish/guestfish-actions.pod:4454
30959 "This is like the L</strings> command, but allows you to specify the encoding "
30960 "of strings that are looked for in the source file C<path>."
30965 #: ../fish/guestfish-actions.pod:4464
30967 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
30968 "ISO-8859-X (this is what L</strings> uses)."
30973 #: ../fish/guestfish-actions.pod:4496
30974 msgid "swapoff-device"
30979 #: ../fish/guestfish-actions.pod:4498
30982 " swapoff-device device\n"
30988 #: ../fish/guestfish-actions.pod:4500
30990 "This command disables the libguestfs appliance swap device or partition "
30991 "named C<device>. See L</swapon-device>."
30996 #: ../fish/guestfish-actions.pod:4504
30997 msgid "swapoff-file"
31002 #: ../fish/guestfish-actions.pod:4506
31005 " swapoff-file file\n"
31011 #: ../fish/guestfish-actions.pod:4510
31012 msgid "swapoff-label"
31017 #: ../fish/guestfish-actions.pod:4512
31020 " swapoff-label label\n"
31026 #: ../fish/guestfish-actions.pod:4517
31027 msgid "swapoff-uuid"
31032 #: ../fish/guestfish-actions.pod:4519
31035 " swapoff-uuid uuid\n"
31041 #: ../fish/guestfish-actions.pod:4524
31042 msgid "swapon-device"
31047 #: ../fish/guestfish-actions.pod:4526
31050 " swapon-device device\n"
31056 #: ../fish/guestfish-actions.pod:4528
31058 "This command enables the libguestfs appliance to use the swap device or "
31059 "partition named C<device>. The increased memory is made available for all "
31060 "commands, for example those run using L</command> or L</sh>."
31065 #: ../fish/guestfish-actions.pod:4540
31066 msgid "swapon-file"
31071 #: ../fish/guestfish-actions.pod:4542
31074 " swapon-file file\n"
31080 #: ../fish/guestfish-actions.pod:4544
31082 "This command enables swap to a file. See L</swapon-device> for other notes."
31087 #: ../fish/guestfish-actions.pod:4547
31088 msgid "swapon-label"
31093 #: ../fish/guestfish-actions.pod:4549
31096 " swapon-label label\n"
31102 #: ../fish/guestfish-actions.pod:4551
31104 "This command enables swap to a labeled swap partition. See L</swapon-"
31105 "device> for other notes."
31110 #: ../fish/guestfish-actions.pod:4554
31111 msgid "swapon-uuid"
31116 #: ../fish/guestfish-actions.pod:4556
31119 " swapon-uuid uuid\n"
31125 #: ../fish/guestfish-actions.pod:4558
31127 "This command enables swap to a swap partition with the given UUID. See L</"
31128 "swapon-device> for other notes."
31133 #: ../fish/guestfish-actions.pod:4561
31139 #: ../fish/guestfish-actions.pod:4563
31148 #: ../fish/guestfish-actions.pod:4571
31154 #: ../fish/guestfish-actions.pod:4573
31163 #: ../fish/guestfish-actions.pod:4581
31169 #: ../fish/guestfish-actions.pod:4583
31172 " tail-n nrlines path\n"
31178 #: ../fish/guestfish-actions.pod:4596
31184 #: ../fish/guestfish-actions.pod:4598
31187 " tar-in (tarfile|-) directory\n"
31193 #: ../fish/guestfish-actions.pod:4603
31194 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
31199 #: ../fish/guestfish-actions.pod:4608
31205 #: ../fish/guestfish-actions.pod:4610
31208 " tar-out directory (tarfile|-)\n"
31214 #: ../fish/guestfish-actions.pod:4615
31215 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
31220 #: ../fish/guestfish-actions.pod:4620
31226 #: ../fish/guestfish-actions.pod:4622
31229 " tgz-in (tarball|-) directory\n"
31235 #: ../fish/guestfish-actions.pod:4627
31236 msgid "To upload an uncompressed tarball, use L</tar-in>."
31241 #: ../fish/guestfish-actions.pod:4631
31247 #: ../fish/guestfish-actions.pod:4633
31250 " tgz-out directory (tarball|-)\n"
31256 #: ../fish/guestfish-actions.pod:4638
31257 msgid "To download an uncompressed tarball, use L</tar-out>."
31262 #: ../fish/guestfish-actions.pod:4642
31268 #: ../fish/guestfish-actions.pod:4644
31277 #: ../fish/guestfish-actions.pod:4653
31283 #: ../fish/guestfish-actions.pod:4655
31292 #: ../fish/guestfish-actions.pod:4660
31293 msgid "truncate-size"
31298 #: ../fish/guestfish-actions.pod:4662
31301 " truncate-size path size\n"
31307 #: ../fish/guestfish-actions.pod:4667
31309 "If the current file size is less than C<size> then the file is extended to "
31310 "the required size with zero bytes. This creates a sparse file (ie. disk "
31311 "blocks are not allocated for the file until you write to it). To create a "
31312 "non-sparse file of zeroes, use L</fallocate64> instead."
31317 #: ../fish/guestfish-actions.pod:4673
31323 #: ../fish/guestfish-actions.pod:4675
31326 " tune2fs-l device\n"
31332 #: ../fish/guestfish-actions.pod:4685
31338 #: ../fish/guestfish-actions.pod:4687
31341 " txz-in (tarball|-) directory\n"
31347 #: ../fish/guestfish-actions.pod:4694
31353 #: ../fish/guestfish-actions.pod:4696
31356 " txz-out directory (tarball|-)\n"
31362 #: ../fish/guestfish-actions.pod:4703
31368 #: ../fish/guestfish-actions.pod:4705
31377 #: ../fish/guestfish-actions.pod:4719
31378 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
31383 #: ../fish/guestfish-actions.pod:4724
31389 #: ../fish/guestfish-actions.pod:4726
31395 #: ../fish/guestfish-actions.pod:4728
31398 " umount pathordevice\n"
31404 #: ../fish/guestfish-actions.pod:4734
31410 #: ../fish/guestfish-actions.pod:4736
31411 msgid "unmount-all"
31416 #: ../fish/guestfish-actions.pod:4738
31425 #: ../fish/guestfish-actions.pod:4744
31431 #: ../fish/guestfish-actions.pod:4746
31434 " upload (filename|-) remotefilename\n"
31440 #: ../fish/guestfish-actions.pod:4753
31441 msgid "See also L</download>."
31446 #: ../fish/guestfish-actions.pod:4757
31447 msgid "upload-offset"
31452 #: ../fish/guestfish-actions.pod:4759
31455 " upload-offset (filename|-) remotefilename offset\n"
31461 #: ../fish/guestfish-actions.pod:4771
31463 "Note that there is no limit on the amount of data that can be uploaded with "
31464 "this call, unlike with L</pwrite>, and this call always writes the full "
31465 "amount unless an error occurs."
31470 #: ../fish/guestfish-actions.pod:4776
31471 msgid "See also L</upload>, L</pwrite>."
31476 #: ../fish/guestfish-actions.pod:4780
31482 #: ../fish/guestfish-actions.pod:4782
31485 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
31491 #: ../fish/guestfish-actions.pod:4801
31497 #: ../fish/guestfish-actions.pod:4803
31506 #: ../fish/guestfish-actions.pod:4830
31508 "I<Note:> Don't use this call to test for availability of features. In "
31509 "enterprise distributions we backport features from later versions into "
31510 "earlier versions, making this an unreliable way to test for features. Use "
31511 "L</available> instead."
31516 #: ../fish/guestfish-actions.pod:4836
31522 #: ../fish/guestfish-actions.pod:4838
31525 " vfs-label device\n"
31531 #: ../fish/guestfish-actions.pod:4845
31532 msgid "To find a filesystem from the label, use L</findfs-label>."
31537 #: ../fish/guestfish-actions.pod:4847
31543 #: ../fish/guestfish-actions.pod:4849
31546 " vfs-type device\n"
31552 #: ../fish/guestfish-actions.pod:4859
31558 #: ../fish/guestfish-actions.pod:4861
31561 " vfs-uuid device\n"
31567 #: ../fish/guestfish-actions.pod:4868
31568 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
31573 #: ../fish/guestfish-actions.pod:4870
31574 msgid "vg-activate"
31579 #: ../fish/guestfish-actions.pod:4872
31582 " vg-activate true|false 'volgroups ...'\n"
31588 #: ../fish/guestfish-actions.pod:4882
31589 msgid "vg-activate-all"
31594 #: ../fish/guestfish-actions.pod:4884
31597 " vg-activate-all true|false\n"
31603 #: ../fish/guestfish-actions.pod:4891
31609 #: ../fish/guestfish-actions.pod:4893
31612 " vgcreate volgroup 'physvols ...'\n"
31618 #: ../fish/guestfish-actions.pod:4898
31624 #: ../fish/guestfish-actions.pod:4900
31627 " vglvuuids vgname\n"
31633 #: ../fish/guestfish-actions.pod:4905
31635 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
31636 "logical volumes and volume groups."
31641 #: ../fish/guestfish-actions.pod:4908
31642 msgid "See also L</vgpvuuids>."
31647 #: ../fish/guestfish-actions.pod:4910
31653 #: ../fish/guestfish-actions.pod:4912
31656 " vgpvuuids vgname\n"
31662 #: ../fish/guestfish-actions.pod:4917
31664 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
31665 "physical volumes and volume groups."
31670 #: ../fish/guestfish-actions.pod:4920
31671 msgid "See also L</vglvuuids>."
31676 #: ../fish/guestfish-actions.pod:4922
31682 #: ../fish/guestfish-actions.pod:4924
31685 " vgremove vgname\n"
31691 #: ../fish/guestfish-actions.pod:4931
31697 #: ../fish/guestfish-actions.pod:4933
31700 " vgrename volgroup newvolgroup\n"
31706 #: ../fish/guestfish-actions.pod:4937
31712 #: ../fish/guestfish-actions.pod:4939
31721 #: ../fish/guestfish-actions.pod:4947
31722 msgid "See also L</vgs-full>."
31727 #: ../fish/guestfish-actions.pod:4949
31733 #: ../fish/guestfish-actions.pod:4951
31742 #: ../fish/guestfish-actions.pod:4956
31748 #: ../fish/guestfish-actions.pod:4958
31757 #: ../fish/guestfish-actions.pod:4963
31763 #: ../fish/guestfish-actions.pod:4965
31772 #: ../fish/guestfish-actions.pod:4969
31778 #: ../fish/guestfish-actions.pod:4971
31787 #: ../fish/guestfish-actions.pod:4976
31793 #: ../fish/guestfish-actions.pod:4978
31802 #: ../fish/guestfish-actions.pod:4983
31808 #: ../fish/guestfish-actions.pod:4985
31817 #: ../fish/guestfish-actions.pod:4990
31823 #: ../fish/guestfish-actions.pod:4992
31826 " write path content\n"
31832 #: ../fish/guestfish-actions.pod:5000
31838 #: ../fish/guestfish-actions.pod:5002
31841 " write-file path content size\n"
31847 #: ../fish/guestfish-actions.pod:5025
31853 #: ../fish/guestfish-actions.pod:5027
31856 " zegrep regex path\n"
31862 #: ../fish/guestfish-actions.pod:5035
31868 #: ../fish/guestfish-actions.pod:5037
31871 " zegrepi regex path\n"
31877 #: ../fish/guestfish-actions.pod:5045
31883 #: ../fish/guestfish-actions.pod:5047
31891 #: ../fish/guestfish-actions.pod:5055
31892 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
31897 #: ../fish/guestfish-actions.pod:5058
31898 msgid "zero-device"
31903 #: ../fish/guestfish-actions.pod:5060
31906 " zero-device device\n"
31912 #: ../fish/guestfish-actions.pod:5062
31914 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
31915 "which just zeroes the first few blocks of a device."
31920 #: ../fish/guestfish-actions.pod:5069
31926 #: ../fish/guestfish-actions.pod:5071
31929 " zerofree device\n"
31935 #: ../fish/guestfish-actions.pod:5084
31941 #: ../fish/guestfish-actions.pod:5086
31944 " zfgrep pattern path\n"
31950 #: ../fish/guestfish-actions.pod:5094
31956 #: ../fish/guestfish-actions.pod:5096
31959 " zfgrepi pattern path\n"
31965 #: ../fish/guestfish-actions.pod:5104
31971 #: ../fish/guestfish-actions.pod:5106
31974 " zfile meth path\n"
31980 #: ../fish/guestfish-actions.pod:5113
31982 "Since 1.0.63, use L</file> instead which can now process compressed files."
31987 #: ../fish/guestfish-actions.pod:5123
31993 #: ../fish/guestfish-actions.pod:5125
31996 " zgrep regex path\n"
32002 #: ../fish/guestfish-actions.pod:5133
32008 #: ../fish/guestfish-actions.pod:5135
32011 " zgrepi regex path\n"
32017 #: ../fish/guestfish-commands.pod:1
32023 #: ../fish/guestfish-commands.pod:3
32029 #: ../fish/guestfish-commands.pod:5
32032 " alloc filename size\n"
32038 #: ../fish/guestfish-commands.pod:7
32040 "This creates an empty (zeroed) file of the given size, and then adds so it "
32041 "can be further examined."
32046 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:182
32047 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
32052 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:184
32053 msgid "Size can be specified using standard suffixes, eg. C<1M>."
32058 #: ../fish/guestfish-commands.pod:14
32060 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
32061 "image, see L</PREPARED DISK IMAGES>."
32066 #: ../fish/guestfish-commands.pod:17
32072 #: ../fish/guestfish-commands.pod:19
32075 " copy-in local [local ...] /remotedir\n"
32081 #: ../fish/guestfish-commands.pod:21
32083 "C<copy-in> copies local files or directories recursively into the disk "
32084 "image, placing them in the directory called C</remotedir> (which must "
32085 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
32086 "other commands as necessary."
32091 #: ../fish/guestfish-commands.pod:26
32093 "Multiple local files and directories can be specified, but the last "
32094 "parameter must always be a remote directory. Wildcards cannot be used."
32099 #: ../fish/guestfish-commands.pod:30
32105 #: ../fish/guestfish-commands.pod:32
32108 " copy-out remote [remote ...] localdir\n"
32114 #: ../fish/guestfish-commands.pod:34
32116 "C<copy-out> copies remote files or directories recursively out of the disk "
32117 "image, placing them on the host disk in a local directory called C<localdir> "
32118 "(which must exist). This guestfish meta-command turns into a sequence of L</"
32119 "download>, L</tar-out> and other commands as necessary."
32124 #: ../fish/guestfish-commands.pod:40
32126 "Multiple remote files and directories can be specified, but the last "
32127 "parameter must always be a local directory. To download to the current "
32128 "directory, use C<.> as in:"
32133 #: ../fish/guestfish-commands.pod:44
32136 " copy-out /home .\n"
32142 #: ../fish/guestfish-commands.pod:46
32144 "Wildcards cannot be used in the ordinary command, but you can use them with "
32145 "the help of L</glob> like this:"
32150 #: ../fish/guestfish-commands.pod:49
32153 " glob copy-out /home/* .\n"
32158 #: ../fish/guestfish-commands.pod:51
32163 #: ../fish/guestfish-commands.pod:53
32166 " display filename\n"
32171 #: ../fish/guestfish-commands.pod:55
32173 "Use C<display> (a graphical display program) to display an image file. It "
32174 "downloads the file, and runs C<display> on it."
32178 #: ../fish/guestfish-commands.pod:58
32180 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
32181 "environment variable. For example to use the GNOME display program:"
32185 #: ../fish/guestfish-commands.pod:61
32188 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
32193 #: ../fish/guestfish-commands.pod:63
32194 msgid "See also L<display(1)>."
32199 #: ../fish/guestfish-commands.pod:65
32205 #: ../fish/guestfish-commands.pod:67
32208 " echo [params ...]\n"
32214 #: ../fish/guestfish-commands.pod:69
32215 msgid "This echos the parameters to the terminal."
32220 #: ../fish/guestfish-commands.pod:71
32226 #: ../fish/guestfish-commands.pod:73
32232 #: ../fish/guestfish-commands.pod:75
32238 #: ../fish/guestfish-commands.pod:77
32247 #: ../fish/guestfish-commands.pod:79
32249 "This is used to edit a file. It downloads the file, edits it locally using "
32250 "your editor, then uploads the result."
32255 #: ../fish/guestfish-commands.pod:82
32257 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
32258 "or C<emacs> you will get those corresponding editors."
32263 #: ../fish/guestfish-commands.pod:86
32269 #: ../fish/guestfish-commands.pod:88
32272 " glob command args...\n"
32278 #: ../fish/guestfish-commands.pod:90
32280 "Expand wildcards in any paths in the args list, and run C<command> "
32281 "repeatedly on each matching path."
32286 #: ../fish/guestfish-commands.pod:93
32287 msgid "See L</WILDCARDS AND GLOBBING>."
32292 #: ../fish/guestfish-commands.pod:95
32298 #: ../fish/guestfish-commands.pod:97
32301 " hexedit <filename|device>\n"
32302 " hexedit <filename|device> <max>\n"
32303 " hexedit <filename|device> <start> <max>\n"
32309 #: ../fish/guestfish-commands.pod:101
32311 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
32317 #: ../fish/guestfish-commands.pod:104
32319 "This command works by downloading potentially the whole file or device, "
32320 "editing it locally, then uploading it. If the file or device is large, you "
32321 "have to specify which part you wish to edit by using C<max> and/or C<start> "
32322 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
32323 "usual modifiers allowed such as C<1M> (1 megabyte)."
32328 #: ../fish/guestfish-commands.pod:111
32329 msgid "For example to edit the first few sectors of a disk you might do:"
32334 #: ../fish/guestfish-commands.pod:114
32337 " hexedit /dev/sda 1M\n"
32343 #: ../fish/guestfish-commands.pod:116
32345 "which would allow you to edit anywhere within the first megabyte of the disk."
32350 #: ../fish/guestfish-commands.pod:119
32351 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
32356 #: ../fish/guestfish-commands.pod:121
32359 " hexedit /dev/sda1 0x400 0x400\n"
32365 #: ../fish/guestfish-commands.pod:123
32366 msgid "(assuming the superblock is in the standard location)."
32371 #: ../fish/guestfish-commands.pod:125
32373 "This command requires the external L<hexedit(1)> program. You can specify "
32374 "another program to use by setting the C<HEXEDITOR> environment variable."
32379 #: ../fish/guestfish-commands.pod:129
32380 msgid "See also L</hexdump>."
32385 #: ../fish/guestfish-commands.pod:131
32391 #: ../fish/guestfish-commands.pod:133
32400 #: ../fish/guestfish-commands.pod:135
32402 "Change the local directory, ie. the current directory of guestfish itself."
32407 #: ../fish/guestfish-commands.pod:138
32408 msgid "Note that C<!cd> won't do what you might expect."
32413 #: ../fish/guestfish-commands.pod:140
32419 #: ../fish/guestfish-commands.pod:142
32425 #: ../fish/guestfish-commands.pod:144
32434 #: ../fish/guestfish-commands.pod:146
32435 msgid "Opens the manual page for guestfish."
32440 #: ../fish/guestfish-commands.pod:148
32446 #: ../fish/guestfish-commands.pod:150
32452 #: ../fish/guestfish-commands.pod:152
32461 #: ../fish/guestfish-commands.pod:154
32470 #: ../fish/guestfish-commands.pod:156
32471 msgid "This is used to view a file."
32476 #: ../fish/guestfish-commands.pod:158
32478 "The default viewer is C<$PAGER>. However if you use the alternate command "
32479 "C<less> you will get the C<less> command specifically."
32484 #: ../fish/guestfish-commands.pod:161
32490 #: ../fish/guestfish-commands.pod:163
32499 #: ../fish/guestfish-commands.pod:165
32501 "Close and reopen the libguestfs handle. It is not necessary to use this "
32502 "normally, because the handle is closed properly when guestfish exits. "
32503 "However this is occasionally useful for testing."
32508 #: ../fish/guestfish-commands.pod:169
32514 #: ../fish/guestfish-commands.pod:171
32517 " sparse filename size\n"
32523 #: ../fish/guestfish-commands.pod:173
32525 "This creates an empty sparse file of the given size, and then adds so it can "
32526 "be further examined."
32531 #: ../fish/guestfish-commands.pod:176
32533 "In all respects it works the same as the L</alloc> command, except that the "
32534 "image file is allocated sparsely, which means that disk blocks are not "
32535 "assigned to the file until they are needed. Sparse disk files only use "
32536 "space when written to, but they are slower and there is a danger you could "
32537 "run out of real disk space during a write operation."
32542 #: ../fish/guestfish-commands.pod:186
32548 #: ../fish/guestfish-commands.pod:188
32557 #: ../fish/guestfish-commands.pod:190
32559 "This command returns a list of the optional groups known to the daemon, and "
32560 "indicates which ones are supported by this build of the libguestfs appliance."
32565 #: ../fish/guestfish-commands.pod:194
32566 msgid "See also L<guestfs(3)/AVAILABILITY>."
32571 #: ../fish/guestfish-commands.pod:196
32577 #: ../fish/guestfish-commands.pod:198
32580 " time command args...\n"
32586 #: ../fish/guestfish-commands.pod:200
32588 "Run the command as usual, but print the elapsed time afterwards. This can "
32589 "be useful for benchmarking operations."
32594 #: ../test-tool/libguestfs-test-tool.pod:5
32595 msgid "libguestfs-test-tool - End user tests for libguestfs"
32600 #: ../test-tool/libguestfs-test-tool.pod:9
32603 " libguestfs-test-tool [--options]\n"
32609 #: ../test-tool/libguestfs-test-tool.pod:13
32611 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
32612 "and developers, to allow them to check basic libguestfs functionality is "
32613 "working. This is needed because libguestfs occasionally breaks for reasons "
32614 "beyond our control: usually because of changes in the underlying qemu or "
32615 "kernel packages, or the host environment."
32620 #: ../test-tool/libguestfs-test-tool.pod:20
32621 msgid "If you suspect a problem in libguestfs, then just run:"
32626 #: ../test-tool/libguestfs-test-tool.pod:22
32629 " libguestfs-test-tool\n"
32635 #: ../test-tool/libguestfs-test-tool.pod:24
32636 msgid "It will print lots of diagnostic messages."
32641 #: ../test-tool/libguestfs-test-tool.pod:26
32642 msgid "If it runs to completion successfully, you will see this near the end:"
32647 #: ../test-tool/libguestfs-test-tool.pod:28
32650 " ===== TEST FINISHED OK =====\n"
32656 #: ../test-tool/libguestfs-test-tool.pod:30
32657 msgid "and the test tool will exit with code 0."
32662 #: ../test-tool/libguestfs-test-tool.pod:32
32664 "If it fails (and/or exits with non-zero error code), please paste the "
32665 "B<complete, unedited> output of the test tool into a bug report. More "
32666 "information about reporting bugs can be found on the L<http://libguestfs.org/"
32672 #: ../test-tool/libguestfs-test-tool.pod:41
32678 #: ../test-tool/libguestfs-test-tool.pod:43
32679 msgid "Display short usage information and exit."
32684 #: ../test-tool/libguestfs-test-tool.pod:45
32685 msgid "I<--qemu qemu_binary>"
32690 #: ../test-tool/libguestfs-test-tool.pod:47
32692 "If you have downloaded another qemu binary, point this option at the full "
32693 "path of the binary to try it."
32698 #: ../test-tool/libguestfs-test-tool.pod:50
32699 msgid "I<--qemudir qemu_source_dir>"
32704 #: ../test-tool/libguestfs-test-tool.pod:52
32706 "If you have compiled qemu from source, point this option at the source "
32707 "directory to try it."
32712 #: ../test-tool/libguestfs-test-tool.pod:55
32713 msgid "I<--timeout N>"
32718 #: ../test-tool/libguestfs-test-tool.pod:57
32720 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
32721 "does not usually need to be adjusted unless your machine is very slow."
32726 #: ../test-tool/libguestfs-test-tool.pod:63
32727 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
32732 #: ../test-tool/libguestfs-test-tool.pod:65
32734 "If you have compiled another version of qemu from source and would like to "
32735 "try that, then you can use the I<--qemudir> option to point to the qemu "
32736 "source directory."
32741 #: ../test-tool/libguestfs-test-tool.pod:69
32743 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
32744 "option to point to the binary."
32749 #: ../test-tool/libguestfs-test-tool.pod:72
32751 "When using an alternate qemu with libguestfs, usually you would need to "
32752 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in L<guestfs(3)"
32753 ">). libguestfs-test-tool writes a temporary qemu wrapper script when you "
32754 "use either of the I<--qemudir> or I<--qemu> options."
32759 #: ../test-tool/libguestfs-test-tool.pod:79
32761 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
32762 "I<1> if there was an error."
32767 #: ../test-tool/libguestfs-test-tool.pod:84
32769 "For the full list of environment variables which may affect libguestfs, "
32770 "please see the L<guestfs(3)> manual page."
32775 #: ../test-tool/libguestfs-test-tool.pod:89
32776 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
32781 #: ../fuse/guestmount.pod:5
32783 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
32788 #: ../fuse/guestmount.pod:9
32791 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
32797 #: ../fuse/guestmount.pod:11
32800 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
32806 #: ../fuse/guestmount.pod:13
32809 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
32815 #: ../fuse/guestmount.pod:17
32817 "You must I<not> use C<guestmount> in read-write mode on live virtual "
32818 "machines. If you do this, you risk disk corruption in the VM."
32823 #: ../fuse/guestmount.pod:22
32825 "The guestmount program can be used to mount virtual machine filesystems and "
32826 "other disk images on the host. It uses libguestfs for access to the guest "
32827 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
32828 "a mountable device."
32833 #: ../fuse/guestmount.pod:27
32835 "Along with other options, you have to give at least one device (I<-a> "
32836 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
32837 "option) or use the I<-i> inspection option. How this works is better "
32838 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
32844 #: ../fuse/guestmount.pod:33
32846 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
32847 "by you, and the filesystem will not be visible to any other users unless you "
32848 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
32849 "the filesystem, use the C<fusermount -u> command."
32854 #: ../fuse/guestmount.pod:41
32856 "For a typical Windows guest which has its main filesystem on the first "
32862 #: ../fuse/guestmount.pod:44
32865 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
32871 #: ../fuse/guestmount.pod:46
32873 "For a typical Linux guest which has a /boot filesystem on the first "
32874 "partition, and the root filesystem on a logical volume:"
32879 #: ../fuse/guestmount.pod:49
32882 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
32888 #: ../fuse/guestmount.pod:51
32889 msgid "To get libguestfs to detect guest mountpoints for you:"
32894 #: ../fuse/guestmount.pod:53
32897 " guestmount -a guest.img -i --ro /mnt\n"
32903 #: ../fuse/guestmount.pod:55
32904 msgid "For a libvirt guest called \"Guest\" you could do:"
32909 #: ../fuse/guestmount.pod:57
32912 " guestmount -d Guest -i --ro /mnt\n"
32918 #: ../fuse/guestmount.pod:59
32920 "If you don't know what filesystems are contained in a guest or disk image, "
32921 "use L<virt-filesystems(1)> first:"
32926 #: ../fuse/guestmount.pod:62
32929 " virt-filesystems MyGuest\n"
32935 #: ../fuse/guestmount.pod:64
32937 "If you want to trace the libguestfs calls but without excessive debugging "
32938 "information, we recommend:"
32943 #: ../fuse/guestmount.pod:67
32946 " guestmount [...] --trace /mnt\n"
32952 #: ../fuse/guestmount.pod:69
32953 msgid "If you want to debug the program, we recommend:"
32958 #: ../fuse/guestmount.pod:71
32961 " guestmount [...] --trace --verbose /mnt\n"
32966 #: ../fuse/guestmount.pod:73
32971 #: ../fuse/guestmount.pod:75
32972 msgid "Other users cannot see the filesystem by default"
32976 #: ../fuse/guestmount.pod:77
32978 "If you mount a filesystem as one user (eg. root), then other users will not "
32979 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
32980 "option when mounting:"
32984 #: ../fuse/guestmount.pod:81
32987 " sudo guestmount [...] -o allow_other /mnt\n"
32993 #: ../fuse/guestmount.pod:87
32994 msgid "B<-a image> | B<--add image>"
32999 #: ../fuse/guestmount.pod:89
33000 msgid "Add a block device or virtual machine image."
33005 #: ../fuse/guestmount.pod:94
33006 msgid "B<-c URI> | B<--connect URI>"
33011 #: ../fuse/guestmount.pod:100
33012 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
33017 #: ../fuse/guestmount.pod:108
33018 msgid "B<--dir-cache-timeout N>"
33023 #: ../fuse/guestmount.pod:110
33025 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
33026 "seconds. The readdir cache [actually, there are several semi-independent "
33027 "caches] is populated after a readdir(2) call with the stat and extended "
33028 "attributes of the files in the directory, in anticipation that they will be "
33029 "requested soon after."
33034 #: ../fuse/guestmount.pod:116
33036 "There is also a different attribute cache implemented by FUSE (see the FUSE "
33037 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
33038 "requests, only cache existing ones."
33043 #: ../fuse/guestmount.pod:127
33044 msgid "B<--format=raw|qcow2|..> | B<--format>"
33049 #: ../fuse/guestmount.pod:134
33051 "If you have untrusted raw-format guest disk images, you should use this "
33052 "option to specify the disk format. This avoids a possible security problem "
33053 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
33054 "guestfs_add_drive_opts>."
33059 #: ../fuse/guestmount.pod:139
33060 msgid "B<--fuse-help>"
33065 #: ../fuse/guestmount.pod:141
33066 msgid "Display help on special FUSE options (see I<-o> below)."
33071 #: ../fuse/guestmount.pod:145
33072 msgid "Display brief help and exit."
33077 #: ../fuse/guestmount.pod:147
33078 msgid "B<-i> | B<--inspector>"
33083 #: ../fuse/guestmount.pod:167
33085 "Mount the named partition or logical volume on the given mountpoint B<in the "
33086 "guest> (this has nothing to do with mountpoints in the host)."
33091 #: ../fuse/guestmount.pod:170
33093 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
33094 "something on C</>."
33099 #: ../fuse/guestmount.pod:183
33100 msgid "B<-n> | B<--no-sync>"
33105 #: ../fuse/guestmount.pod:185
33107 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
33108 "unmounted. If you specify this option, then we don't attempt to sync the "
33109 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
33114 #: ../fuse/guestmount.pod:190
33115 msgid "B<-o option> | B<--option option>"
33120 #: ../fuse/guestmount.pod:192
33121 msgid "Pass extra options to FUSE."
33126 #: ../fuse/guestmount.pod:194
33128 "To get a list of all the extra options supported by FUSE, use the command "
33129 "below. Note that only the FUSE I<-o> options can be passed, and only some "
33130 "of them are a good idea."
33135 #: ../fuse/guestmount.pod:198
33138 " guestmount --fuse-help\n"
33144 #: ../fuse/guestmount.pod:200
33145 msgid "Some potentially useful FUSE options:"
33150 #: ../fuse/guestmount.pod:204
33151 msgid "B<-o allow_other>"
33156 #: ../fuse/guestmount.pod:206
33157 msgid "Allow other users to see the filesystem."
33162 #: ../fuse/guestmount.pod:208
33163 msgid "B<-o attr_timeout=N>"
33168 #: ../fuse/guestmount.pod:210
33169 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
33174 #: ../fuse/guestmount.pod:212
33175 msgid "B<-o kernel_cache>"
33180 #: ../fuse/guestmount.pod:214
33182 "Allow the kernel to cache files (reduces the number of reads that have to go "
33183 "through the L<guestfs(3)> API). This is generally a good idea if you can "
33184 "afford the extra memory usage."
33189 #: ../fuse/guestmount.pod:218
33190 msgid "B<-o uid=N> B<-o gid=N>"
33195 #: ../fuse/guestmount.pod:220
33197 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
33198 "the chosen values."
33203 #: ../fuse/guestmount.pod:225
33204 msgid "B<-r> | B<--ro>"
33209 #: ../fuse/guestmount.pod:227
33211 "Add devices and mount everything read-only. Also disallow writes and make "
33212 "the disk appear read-only to FUSE."
33217 #: ../fuse/guestmount.pod:230
33219 "This is highly recommended if you are not going to edit the guest disk. If "
33220 "the guest is running and this option is I<not> supplied, then there is a "
33221 "strong risk of disk corruption in the guest. We try to prevent this from "
33222 "happening, but it is not always possible."
33227 #: ../fuse/guestmount.pod:235
33228 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
33233 #: ../fuse/guestmount.pod:239
33234 msgid "Enable SELinux support for the guest."
33239 #: ../fuse/guestmount.pod:241
33240 msgid "B<-v> | B<--verbose>"
33245 #: ../fuse/guestmount.pod:243
33246 msgid "Enable verbose messages from underlying libguestfs."
33251 #: ../fuse/guestmount.pod:245
33252 msgid "B<-V> | B<--version>"
33257 #: ../fuse/guestmount.pod:247
33258 msgid "Display the program version and exit."
33263 #: ../fuse/guestmount.pod:249
33264 msgid "B<-w> | B<--rw>"
33268 #: ../fuse/guestmount.pod:254 ../fuse/guestmount.pod:275
33269 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
33274 #: ../fuse/guestmount.pod:256
33275 msgid "B<-x> | B<--trace>"
33280 #: ../fuse/guestmount.pod:258
33281 msgid "Trace libguestfs calls and entry into each FUSE function."
33286 #: ../fuse/guestmount.pod:260
33287 msgid "This also stops the daemon from forking into the background."
33292 #: ../fuse/guestmount.pod:281
33294 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
33295 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
33301 #: ../fuse/guestmount.pod:296
33302 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
33307 #: ../tools/virt-win-reg.pl:37
33309 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
33314 #: ../tools/virt-win-reg.pl:41
33317 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
33323 #: ../tools/virt-win-reg.pl:43
33326 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
33332 #: ../tools/virt-win-reg.pl:45
33335 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
33341 #: ../tools/virt-win-reg.pl:47
33344 " virt-win-reg --merge domname [input.reg ...]\n"
33350 #: ../tools/virt-win-reg.pl:49
33353 " virt-win-reg [--options] disk.img ... # instead of domname\n"
33358 #: ../tools/virt-win-reg.pl:53
33360 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
33361 "virtual machines. If you do this, you I<will> get irreversible disk "
33362 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
33363 "but doesn't catch all cases."
33367 #: ../tools/virt-win-reg.pl:58
33369 "Modifying the Windows Registry is an inherently risky operation. The format "
33370 "is deliberately obscure and undocumented, and Registry changes can leave the "
33371 "system unbootable. Therefore when using the I<--merge> option, make sure "
33372 "you have a reliable backup first."
33377 #: ../tools/virt-win-reg.pl:65
33379 "This program can export and merge Windows Registry entries from a Windows "
33385 #: ../tools/virt-win-reg.pl:68
33387 "The first parameter is the libvirt guest name or the raw disk image of a "
33392 #: ../tools/virt-win-reg.pl:71
33394 "If I<--merge> is I<not> specified, then the chosen registry key is displayed/"
33395 "exported (recursively). For example:"
33400 #: ../tools/virt-win-reg.pl:74
33403 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
33409 #: ../tools/virt-win-reg.pl:76
33411 "You can also display single values from within registry keys, for example:"
33416 #: ../tools/virt-win-reg.pl:79
33419 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
33420 " $ virt-win-reg Windows7 $cvkey ProductName\n"
33421 " Windows 7 Enterprise\n"
33426 #: ../tools/virt-win-reg.pl:83
33428 "With I<--merge>, you can merge a textual regedit file into the Windows "
33434 #: ../tools/virt-win-reg.pl:86
33437 " $ virt-win-reg --merge Windows7 changes.reg\n"
33443 #: ../tools/virt-win-reg.pl:88 ../tools/virt-tar.pl:45
33449 #: ../tools/virt-win-reg.pl:90
33451 "This program is only meant for simple access to the registry. If you want "
33452 "to do complicated things with the registry, we suggest you download the "
33453 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
33454 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
33455 "L<hivexregedit(1)>."
33460 #: ../tools/virt-win-reg.pl:106 ../tools/virt-list-filesystems.pl:63
33461 #: ../tools/virt-tar.pl:113 ../tools/virt-make-fs.pl:163
33462 #: ../tools/virt-list-partitions.pl:64
33463 msgid "Display brief help."
33468 #: ../tools/virt-win-reg.pl:114 ../tools/virt-list-filesystems.pl:71
33469 #: ../tools/virt-tar.pl:121 ../tools/virt-make-fs.pl:171
33470 #: ../tools/virt-list-partitions.pl:72
33471 msgid "Display version number and exit."
33476 #: ../tools/virt-win-reg.pl:120 ../tools/virt-make-fs.pl:177
33482 #: ../tools/virt-win-reg.pl:122
33483 msgid "Enable debugging messages."
33488 #: ../tools/virt-win-reg.pl:128 ../tools/virt-list-filesystems.pl:77
33489 #: ../tools/virt-tar.pl:127 ../tools/virt-list-partitions.pl:78
33490 msgid "B<--connect URI> | B<-c URI>"
33495 #: ../tools/virt-win-reg.pl:130 ../tools/virt-list-filesystems.pl:79
33496 #: ../tools/virt-tar.pl:129 ../tools/virt-list-partitions.pl:80
33498 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
33499 "to the default libvirt hypervisor."
33504 #: ../tools/virt-win-reg.pl:133 ../tools/virt-list-filesystems.pl:82
33505 #: ../tools/virt-tar.pl:132 ../tools/virt-list-partitions.pl:83
33507 "If you specify guest block devices directly, then libvirt is not used at all."
33512 #: ../tools/virt-win-reg.pl:140 ../tools/virt-list-filesystems.pl:89
33513 #: ../tools/virt-tar.pl:139 ../tools/virt-list-partitions.pl:90
33514 msgid "B<--format> raw"
33519 #: ../tools/virt-win-reg.pl:142 ../tools/virt-list-filesystems.pl:91
33520 #: ../tools/virt-tar.pl:141 ../tools/virt-list-partitions.pl:92
33522 "Specify the format of disk images given on the command line. If this is "
33523 "omitted then the format is autodetected from the content of the disk image."
33528 #: ../tools/virt-win-reg.pl:146 ../tools/virt-list-filesystems.pl:95
33529 #: ../tools/virt-tar.pl:145 ../tools/virt-list-partitions.pl:96
33531 "If disk images are requested from libvirt, then this program asks libvirt "
33532 "for this information. In this case, the value of the format parameter is "
33538 #: ../tools/virt-win-reg.pl:150 ../tools/virt-list-filesystems.pl:99
33539 #: ../tools/virt-tar.pl:149 ../tools/virt-list-partitions.pl:100
33541 "If working with untrusted raw-format guest disk images, you should ensure "
33542 "the format is always specified."
33547 #: ../tools/virt-win-reg.pl:157
33553 #: ../tools/virt-win-reg.pl:159
33555 "In merge mode, this merges a textual regedit file into the Windows Registry "
33556 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
33557 "displays or exports Registry entries instead."
33561 #: ../tools/virt-win-reg.pl:163
33563 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
33564 "result in disk corruption. However exporting (without this flag) is always "
33570 #: ../tools/virt-win-reg.pl:171
33571 msgid "B<--encoding> UTF-16LE|ASCII"
33576 #: ../tools/virt-win-reg.pl:173
33578 "When merging (only), you may need to specify the encoding for strings to be "
33579 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
33580 "(3)/ENCODING STRINGS>."
33585 #: ../tools/virt-win-reg.pl:177
33587 "The default is to use UTF-16LE, which should work with recent versions of "
33592 #: ../tools/virt-win-reg.pl:184
33593 msgid "B<--unsafe-printable-strings>"
33597 #: ../tools/virt-win-reg.pl:186
33599 "When exporting (only), assume strings are UTF-16LE and print them as strings "
33600 "instead of hex sequences. Remove the final zero codepoint from strings if "
33605 #: ../tools/virt-win-reg.pl:190
33607 "This is unsafe and does not preserve the fidelity of strings in the original "
33608 "Registry for various reasons:"
33612 #: ../tools/virt-win-reg.pl:197
33614 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
33615 "other encodings will be corrupted by this transformation."
33619 #: ../tools/virt-win-reg.pl:202
33621 "Assumes that everything which has type 1 or 2 is really a string and that "
33622 "everything else is not a string, but the type field in real Registries is "
33627 #: ../tools/virt-win-reg.pl:208
33629 "Loses information about whether a zero codepoint followed the string in the "
33634 #: ../tools/virt-win-reg.pl:213
33636 "This all happens because the Registry itself contains no information about "
33637 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
33641 #: ../tools/virt-win-reg.pl:217
33643 "You should only use this option for quick hacking and debugging of the "
33644 "Registry contents, and I<never> use it if the output is going to be passed "
33645 "into another program or stored in another Registry."
33650 #: ../tools/virt-win-reg.pl:554
33651 msgid "SUPPORTED SYSTEMS"
33656 #: ../tools/virt-win-reg.pl:556
33658 "The program currently supports Windows NT-derived guests starting with "
33659 "Windows XP through to at least Windows 7."
33663 #: ../tools/virt-win-reg.pl:559
33664 msgid "The following Registry keys are supported:"
33668 #: ../tools/virt-win-reg.pl:563
33669 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
33673 #: ../tools/virt-win-reg.pl:565
33674 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
33678 #: ../tools/virt-win-reg.pl:567
33679 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
33683 #: ../tools/virt-win-reg.pl:569
33684 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
33688 #: ../tools/virt-win-reg.pl:571
33689 msgid "C<HKEY_USERS\\.DEFAULT>"
33693 #: ../tools/virt-win-reg.pl:573
33694 msgid "C<HKEY_USERS\\I<SID>>"
33698 #: ../tools/virt-win-reg.pl:575
33699 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
33703 #: ../tools/virt-win-reg.pl:577
33704 msgid "C<HKEY_USERS\\I<username>>"
33708 #: ../tools/virt-win-reg.pl:579
33710 "where I<username> is a local user name (this is a libguestfs extension)."
33715 #: ../tools/virt-win-reg.pl:583
33717 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
33722 #: ../tools/virt-win-reg.pl:586
33724 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
33725 "supported (there is no \"current user\")."
33730 #: ../tools/virt-win-reg.pl:589
33736 #: ../tools/virt-win-reg.pl:591
33738 "C<virt-win-reg> expects that regedit files have already been reencoded in "
33739 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
33740 "style line endings. Since Windows regedit files are often in UTF-16LE with "
33741 "Windows-style line endings, you may need to reencode the whole file before "
33742 "or after processing."
33746 #: ../tools/virt-win-reg.pl:597
33748 "To reencode a file from Windows format to Linux (before processing it with "
33749 "the I<--merge> option), you would do something like this:"
33754 #: ../tools/virt-win-reg.pl:600
33757 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
33763 #: ../tools/virt-win-reg.pl:602
33765 "To go in the opposite direction, after exporting and before sending the file "
33766 "to a Windows user, do something like this:"
33771 #: ../tools/virt-win-reg.pl:605
33774 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
33780 #: ../tools/virt-win-reg.pl:607
33781 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
33786 #: ../tools/virt-win-reg.pl:609
33788 "If you are unsure about the current encoding, use the L<file(1)> command. "
33789 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
33790 "style (CRLF) line endings, like this:"
33795 #: ../tools/virt-win-reg.pl:613
33798 " $ file software.reg\n"
33799 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
33800 " with CRLF line terminators\n"
33805 #: ../tools/virt-win-reg.pl:617
33806 msgid "This file would need conversion before you could I<--merge> it."
33811 #: ../tools/virt-win-reg.pl:619
33812 msgid "CurrentControlSet etc."
33817 #: ../tools/virt-win-reg.pl:621
33819 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
33820 "Registry at the level of the hive file, and therefore you cannot modify "
33826 #: ../tools/virt-win-reg.pl:625
33828 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
33829 "circumstances it might refer to another control set. The way to find out is "
33830 "to look at the C<HKLM\\SYSTEM\\Select> key:"
33835 #: ../tools/virt-win-reg.pl:629
33838 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
33839 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
33840 " \"Current\"=dword:00000001\n"
33841 " \"Default\"=dword:00000001\n"
33842 " \"Failed\"=dword:00000000\n"
33843 " \"LastKnownGood\"=dword:00000002\n"
33849 #: ../tools/virt-win-reg.pl:636
33850 msgid "\"Current\" is the one which Windows will choose when it boots."
33855 #: ../tools/virt-win-reg.pl:638
33857 "Similarly, other C<Current...> keys in the path may need to be replaced."
33862 #: ../tools/virt-win-reg.pl:641
33863 msgid "WINDOWS TIPS"
33868 #: ../tools/virt-win-reg.pl:643
33870 "Note that some of these tips modify the guest disk image. The guest I<must> "
33871 "be shut off, else you will get disk corruption."
33876 #: ../tools/virt-win-reg.pl:646
33877 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
33882 #: ../tools/virt-win-reg.pl:648
33884 "Prepare a DOS batch script, VBScript or executable. Upload this using "
33885 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
33886 "is uploaded into C<C:\\>:"
33891 #: ../tools/virt-win-reg.pl:652
33894 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
33900 #: ../tools/virt-win-reg.pl:654
33901 msgid "Prepare a regedit file containing the registry change:"
33906 #: ../tools/virt-win-reg.pl:656
33909 " cat > test.reg <<'EOF'\n"
33910 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
33911 " \"Test\"=\"c:\\\\test.bat\"\n"
33918 #: ../tools/virt-win-reg.pl:661
33920 "In this example we use the key C<RunOnce> which means that the script will "
33921 "run precisely once when the first user logs in. If you want it to run every "
33922 "time a user logs in, replace C<RunOnce> with C<Run>."
33927 #: ../tools/virt-win-reg.pl:665
33928 msgid "Now update the registry:"
33933 #: ../tools/virt-win-reg.pl:667
33936 " virt-win-reg --merge WindowsGuest test.reg\n"
33942 #: ../tools/virt-win-reg.pl:669
33943 msgid "INSTALLING A SERVICE"
33948 #: ../tools/virt-win-reg.pl:671
33950 "This section assumes you are familiar with Windows services, and you either "
33951 "have a program which handles the Windows Service Control Protocol directly "
33952 "or you want to run any program using a service wrapper like SrvAny or the "
33958 #: ../tools/virt-win-reg.pl:676
33960 "First upload the program and optionally the service wrapper. In this case "
33961 "the test program is called C<test.exe> and we are using the RHSrvAny wrapper:"
33966 #: ../tools/virt-win-reg.pl:680
33969 " guestfish -i -d WindowsGuest <<EOF\n"
33970 " upload rhsrvany.exe /rhsrvany.exe\n"
33971 " upload test.exe /test.exe\n"
33978 #: ../tools/virt-win-reg.pl:685
33980 "Prepare a regedit file containing the registry changes. In this example, "
33981 "the first registry change is needed for the service itself or the service "
33982 "wrapper (if used). The second registry change is only needed because I am "
33983 "using the RHSrvAny service wrapper."
33988 #: ../tools/virt-win-reg.pl:690
33991 " cat > service.reg <<'EOF'\n"
33992 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
33993 " \"Type\"=dword:00000010\n"
33994 " \"Start\"=dword:00000002\n"
33995 " \"ErrorControl\"=dword:00000001\n"
33996 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
33997 " \"DisplayName\"=\"RHSrvAny\"\n"
33998 " \"ObjectName\"=\"NetworkService\"\n"
34004 #: ../tools/virt-win-reg.pl:699
34007 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
34008 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
34009 " \"PWD\"=\"c:\\\\Temp\"\n"
34016 #: ../tools/virt-win-reg.pl:710
34018 "For use of C<ControlSet001> see the section above in this manual page. You "
34019 "may need to adjust this according to the control set that is in use by the "
34025 #: ../tools/virt-win-reg.pl:716
34027 "C<\"ObjectName\"> controls the privileges that the service will have. An "
34028 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
34029 "privileged account."
34034 #: ../tools/virt-win-reg.pl:722
34036 "For the meaning of the magic numbers, see this Microsoft KB article: "
34037 "L<http://support.microsoft.com/kb/103000>."
34042 #: ../tools/virt-win-reg.pl:727
34043 msgid "Update the registry:"
34048 #: ../tools/virt-win-reg.pl:729
34051 " virt-win-reg --merge WindowsGuest service.reg\n"
34057 #: ../tools/virt-win-reg.pl:731 ../tools/virt-list-filesystems.pl:182
34058 #: ../tools/virt-tar.pl:279 ../tools/virt-make-fs.pl:532
34059 #: ../tools/virt-list-partitions.pl:250
34060 msgid "SHELL QUOTING"
34065 #: ../tools/virt-win-reg.pl:733
34067 "Be careful when passing parameters containing C<\\> (backslash) in the "
34068 "shell. Usually you will have to use 'single quotes' or double backslashes "
34069 "(but not both) to protect them from the shell."
34074 #: ../tools/virt-win-reg.pl:737
34075 msgid "Paths and value names are case-insensitive."
34080 #: ../tools/virt-win-reg.pl:739 ../tools/virt-list-filesystems.pl:184
34081 #: ../tools/virt-tar.pl:281 ../tools/virt-make-fs.pl:534
34082 #: ../tools/virt-list-partitions.pl:252
34084 "Libvirt guest names can contain arbitrary characters, some of which have "
34085 "meaning to the shell such as C<#> and space. You may need to quote or "
34086 "escape these characters on the command line. See the shell manual page L<sh"
34087 "(1)> for details."
34092 #: ../tools/virt-win-reg.pl:746
34094 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
34095 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
34096 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
34101 #: ../tools/virt-win-reg.pl:761 ../tools/virt-make-fs.pl:555
34103 "When reporting bugs, please enable debugging and capture the I<complete> "
34109 #: ../tools/virt-win-reg.pl:764
34112 " export LIBGUESTFS_DEBUG=1\n"
34113 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
34119 #: ../tools/virt-win-reg.pl:767
34121 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."
34127 #: ../tools/virt-win-reg.pl:770 ../tools/virt-list-filesystems.pl:202
34128 #: ../tools/virt-tar.pl:301 ../tools/virt-make-fs.pl:564
34129 #: ../tools/virt-list-partitions.pl:269
34135 #: ../tools/virt-win-reg.pl:772 ../tools/virt-list-filesystems.pl:204
34136 #: ../tools/virt-tar.pl:303 ../tools/virt-make-fs.pl:566
34137 #: ../tools/virt-list-partitions.pl:271
34138 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
34143 #: ../tools/virt-win-reg.pl:776 ../tools/virt-make-fs.pl:570
34144 msgid "Copyright (C) 2010 Red Hat Inc."
34149 #: ../tools/virt-list-filesystems.pl:32
34151 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
34156 #: ../tools/virt-list-filesystems.pl:36
34159 " virt-list-filesystems [--options] domname\n"
34165 #: ../tools/virt-list-filesystems.pl:38
34168 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
34174 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
34176 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
34182 #: ../tools/virt-list-filesystems.pl:45
34184 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
34185 "are contained in a virtual machine or disk image."
34190 #: ../tools/virt-list-filesystems.pl:49
34192 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
34193 "functionality. For more complex cases you should look at the L<guestfish(1)"
34199 #: ../tools/virt-list-filesystems.pl:106 ../tools/virt-list-partitions.pl:115
34200 msgid "B<-l> | B<--long>"
34205 #: ../tools/virt-list-filesystems.pl:108
34207 "With this option, C<virt-list-filesystems> displays the type of each "
34208 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
34213 #: ../tools/virt-list-filesystems.pl:115
34214 msgid "B<-a> | B<--all>"
34219 #: ../tools/virt-list-filesystems.pl:117
34221 "Normally we only show mountable filesystems. If this option is given then "
34222 "swap devices are shown too."
34227 #: ../tools/virt-list-filesystems.pl:191
34229 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-"
34230 "filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::"
34231 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
34236 #: ../tools/virt-list-filesystems.pl:208 ../tools/virt-tar.pl:307
34237 msgid "Copyright (C) 2009 Red Hat Inc."
34242 #: ../tools/virt-tar.pl:33
34243 msgid "virt-tar - Extract or upload files to a virtual machine"
34248 #: ../tools/virt-tar.pl:37
34251 " virt-tar [--options] -x domname directory tarball\n"
34257 #: ../tools/virt-tar.pl:39
34260 " virt-tar [--options] -u domname tarball directory\n"
34266 #: ../tools/virt-tar.pl:41
34269 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
34275 #: ../tools/virt-tar.pl:43
34278 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
34283 #: ../tools/virt-tar.pl:47
34285 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-"
34286 "tar-in(1)>, L<virt-tar-out(1)> as replacements."
34291 #: ../tools/virt-tar.pl:52
34292 msgid "Download C</home> from the VM into a local tarball:"
34297 #: ../tools/virt-tar.pl:54
34300 " virt-tar -x domname /home home.tar\n"
34306 #: ../tools/virt-tar.pl:56
34309 " virt-tar -zx domname /home home.tar.gz\n"
34315 #: ../tools/virt-tar.pl:58
34316 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
34321 #: ../tools/virt-tar.pl:60
34324 " virt-tar -u domname uploadstuff.tar /tmp\n"
34330 #: ../tools/virt-tar.pl:62
34333 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
34338 #: ../tools/virt-tar.pl:66
34340 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
34341 "virtual machines. If you do this, you risk disk corruption in the VM. "
34342 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
34346 #: ../tools/virt-tar.pl:71
34348 "You can use I<-x> (extract) on live virtual machines, but you might get "
34349 "inconsistent results or errors if there is filesystem activity inside the "
34350 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
34351 "work, but the only way to guarantee consistent results is if the virtual "
34352 "machine is shut down."
34357 #: ../tools/virt-tar.pl:79
34359 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
34360 "parts of a guest filesystem. There are many possibilities: making backups, "
34361 "uploading data files, snooping on guest activity, fixing or customizing "
34367 #: ../tools/virt-tar.pl:84
34369 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
34370 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
34371 "should look at the L<guestfish(1)> tool."
34375 #: ../tools/virt-tar.pl:88
34377 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
34378 "its contents (recursively) from the virtual machine into a local tarball. "
34379 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
34380 "virtual machine. You cannot use these two options together."
34384 #: ../tools/virt-tar.pl:94
34386 "In addition, you may need to use the I<-z> (gZip) option to enable "
34387 "compression. When uploading, you have to specify I<-z> if the upload file "
34388 "is compressed because virt-tar won't detect this on its own."
34393 #: ../tools/virt-tar.pl:98
34395 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
34396 "example it cannot do PKZip files or bzip2 compression. If you want that "
34397 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
34398 "the L<libguestfs(3)> API)."
34403 #: ../tools/virt-tar.pl:156
34404 msgid "B<-x> | B<--extract> | B<--download>"
34409 #: ../tools/virt-tar.pl:158
34410 msgid "B<-u> | B<--upload>"
34414 #: ../tools/virt-tar.pl:160
34416 "Use I<-x> to extract (download) a directory from a virtual machine to a "
34421 #: ../tools/virt-tar.pl:163
34423 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
34424 "Please read the L</WARNING> section above before using this option."
34429 #: ../tools/virt-tar.pl:167
34430 msgid "You must specify exactly one of these options."
34435 #: ../tools/virt-tar.pl:173
34436 msgid "B<-z> | B<--gzip>"
34441 #: ../tools/virt-tar.pl:175
34442 msgid "Specify that the input or output tarball is gzip-compressed."
34446 #: ../tools/virt-tar.pl:288
34448 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-copy-"
34449 "in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<Sys::"
34450 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
34456 #: ../tools/virt-make-fs.pl:37
34457 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
34462 #: ../tools/virt-make-fs.pl:41
34465 " virt-make-fs [--options] input.tar output.img\n"
34471 #: ../tools/virt-make-fs.pl:43
34474 " virt-make-fs [--options] input.tar.gz output.img\n"
34480 #: ../tools/virt-make-fs.pl:45
34483 " virt-make-fs [--options] directory output.img\n"
34489 #: ../tools/virt-make-fs.pl:49
34491 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
34492 "archive or some files in a directory. It is similar to tools like L<mkisofs"
34493 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
34494 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
34495 "you want to attach these filesystems to existing virtual machines (eg. to "
34496 "import large amounts of read-only data to a VM)."
34501 #: ../tools/virt-make-fs.pl:57
34502 msgid "Basic usage is:"
34507 #: ../tools/virt-make-fs.pl:59
34510 " virt-make-fs input output\n"
34516 #: ../tools/virt-make-fs.pl:61
34518 "where C<input> is either a directory containing files that you want to add, "
34519 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
34520 "C<output> is a disk image. The input type is detected automatically. The "
34521 "output disk image defaults to a raw ext2 image unless you specify extra "
34522 "flags (see L</OPTIONS> below)."
34527 #: ../tools/virt-make-fs.pl:67
34528 msgid "EXTRA SPACE"
34532 #: ../tools/virt-make-fs.pl:69
34534 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
34535 "the files that it contains, but might have extra space. Depending on how "
34536 "you are going to use the output, you might think this extra space is wasted "
34537 "and want to minimize it, or you might want to leave space so that more files "
34538 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
34539 "but you can use the I<--size> flag to leave space in the filesystem if you "
34544 #: ../tools/virt-make-fs.pl:77
34546 "An alternative way to leave extra space but not make the output image any "
34547 "bigger is to use an alternative disk image format (instead of the default "
34548 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
34549 "image format (check your hypervisor supports this before using it). This "
34550 "allows you to choose a large I<--size> but the extra space won't actually be "
34551 "allocated in the image until you try to store something in it."
34555 #: ../tools/virt-make-fs.pl:85
34557 "Don't forget that you can also use local commands including L<resize2fs(8)> "
34558 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
34559 "to build another image from scratch."
34564 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123
34565 #: ../tools/virt-make-fs.pl:142
34571 #: ../tools/virt-make-fs.pl:91
34574 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
34580 #: ../tools/virt-make-fs.pl:93
34581 msgid "FILESYSTEM TYPE"
34586 #: ../tools/virt-make-fs.pl:95
34588 "The default filesystem type is C<ext2>. Just about any filesystem type that "
34589 "libguestfs supports can be used (but I<not> read-only formats like "
34590 "ISO9660). Here are some of the more common choices:"
34595 #: ../tools/virt-make-fs.pl:101
34601 #: ../tools/virt-make-fs.pl:103
34603 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
34604 "you are not going to use the filesystem in a way that requires the journal, "
34605 "then this is just wasted overhead."
34610 #: ../tools/virt-make-fs.pl:107
34611 msgid "I<ntfs> or I<vfat>"
34616 #: ../tools/virt-make-fs.pl:109
34617 msgid "Useful if exporting data to a Windows guest."
34622 #: ../tools/virt-make-fs.pl:111
34624 "I<Note for vfat>: The tar archive or local directory must only contain files "
34625 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
34626 "program running within libguestfs is unable to change the ownership of non-"
34627 "root files, since vfat itself does not support this."
34632 #: ../tools/virt-make-fs.pl:116
34638 #: ../tools/virt-make-fs.pl:118
34640 "Lower overhead than C<ext2>, but certain limitations on filename length and "
34641 "total filesystem size."
34646 #: ../tools/virt-make-fs.pl:125
34649 " virt-make-fs --type=minix input minixfs.img\n"
34655 #: ../tools/virt-make-fs.pl:127
34656 msgid "TO PARTITION OR NOT TO PARTITION"
34661 #: ../tools/virt-make-fs.pl:129
34662 msgid "Optionally virt-make-fs can add a partition table to the output disk."
34667 #: ../tools/virt-make-fs.pl:131
34669 "Adding a partition can make the disk image more compatible with certain "
34670 "virtualized operating systems which don't expect to see a filesystem "
34671 "directly located on a block device (Linux doesn't care and will happily "
34672 "handle both types)."
34677 #: ../tools/virt-make-fs.pl:136
34679 "On the other hand, if you have a partition table then the output image is no "
34680 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
34681 "directly on a partitioned disk image. (However libguestfs tools such as "
34682 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
34687 #: ../tools/virt-make-fs.pl:144
34688 msgid "Add an MBR partition:"
34693 #: ../tools/virt-make-fs.pl:146
34696 " virt-make-fs --partition -- input disk.img\n"
34702 #: ../tools/virt-make-fs.pl:148
34704 "If the output disk image could be terabyte-sized or larger, it's better to "
34705 "use an EFI/GPT-compatible partition table:"
34710 #: ../tools/virt-make-fs.pl:151
34713 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
34719 #: ../tools/virt-make-fs.pl:179
34720 msgid "Enable debugging information."
34725 #: ../tools/virt-make-fs.pl:185
34726 msgid "B<--size=E<lt>NE<gt>>"
34731 #: ../tools/virt-make-fs.pl:187
34732 msgid "B<--size=+E<lt>NE<gt>>"
34737 #: ../tools/virt-make-fs.pl:189
34738 msgid "B<-s E<lt>NE<gt>>"
34743 #: ../tools/virt-make-fs.pl:191
34744 msgid "B<-s +E<lt>NE<gt>>"
34748 #: ../tools/virt-make-fs.pl:193
34750 "Use the I<--size> (or I<-s>) option to choose the size of the output image."
34755 #: ../tools/virt-make-fs.pl:196
34757 "If this option is I<not> given, then the output image will be just large "
34758 "enough to contain all the files, with not much wasted space."
34763 #: ../tools/virt-make-fs.pl:199
34765 "To choose a fixed size output disk, specify an absolute number followed by b/"
34766 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
34767 "Petabytes or Exabytes. This must be large enough to contain all the input "
34768 "files, else you will get an error."
34772 #: ../tools/virt-make-fs.pl:204
34774 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
34775 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
34776 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
34777 "the input files, and (approximately) an extra 200 MB free space."
34782 #: ../tools/virt-make-fs.pl:210
34784 "Note that virt-make-fs estimates free space, and therefore will not produce "
34785 "filesystems containing precisely the free space requested. (It is much more "
34786 "expensive and time-consuming to produce a filesystem which has precisely the "
34787 "desired free space)."
34792 #: ../tools/virt-make-fs.pl:219
34793 msgid "B<--format=E<lt>fmtE<gt>>"
34798 #: ../tools/virt-make-fs.pl:221
34799 msgid "B<-F E<lt>fmtE<gt>>"
34804 #: ../tools/virt-make-fs.pl:223
34805 msgid "Choose the output disk image format."
34810 #: ../tools/virt-make-fs.pl:225
34811 msgid "The default is C<raw> (raw disk image)."
34816 #: ../tools/virt-make-fs.pl:227
34818 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
34819 "that would really make sense here is C<qcow2>."
34824 #: ../tools/virt-make-fs.pl:234
34825 msgid "B<--type=E<lt>fsE<gt>>"
34830 #: ../tools/virt-make-fs.pl:236
34831 msgid "B<-t E<lt>fsE<gt>>"
34836 #: ../tools/virt-make-fs.pl:238
34837 msgid "Choose the output filesystem type."
34842 #: ../tools/virt-make-fs.pl:240
34843 msgid "The default is C<ext2>."
34848 #: ../tools/virt-make-fs.pl:242
34850 "Any filesystem which is supported read-write by libguestfs can be used here."
34855 #: ../tools/virt-make-fs.pl:249
34856 msgid "B<--partition>"
34861 #: ../tools/virt-make-fs.pl:251
34862 msgid "B<--partition=E<lt>parttypeE<gt>>"
34867 #: ../tools/virt-make-fs.pl:253
34869 "If specified, this flag adds an MBR partition table to the output disk image."
34873 #: ../tools/virt-make-fs.pl:256
34875 "You can change the partition table type, eg. I<--partition=gpt> for large "
34880 #: ../tools/virt-make-fs.pl:259
34882 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
34883 "might consider the next parameter to be the partition type. For example:"
34888 #: ../tools/virt-make-fs.pl:263
34891 " virt-make-fs --partition input.tar ...\n"
34896 #: ../tools/virt-make-fs.pl:265
34898 "would cause virt-make-fs to think you wanted to use a partition type of "
34899 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
34900 "dash) between options and the input file argument:"
34905 #: ../tools/virt-make-fs.pl:269
34908 " virt-make-fs --partition -- input.tar ...\n"
34913 #: ../tools/virt-make-fs.pl:541
34915 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
34916 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
34917 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
34922 #: ../tools/virt-make-fs.pl:558
34925 " export LIBGUESTFS_DEBUG=1\n"
34926 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
34932 #: ../tools/virt-make-fs.pl:561
34934 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
34940 #: ../tools/virt-list-partitions.pl:32
34942 "virt-list-partitions - List partitions in a virtual machine or disk image"
34947 #: ../tools/virt-list-partitions.pl:36
34950 " virt-list-partitions [--options] domname\n"
34956 #: ../tools/virt-list-partitions.pl:38
34959 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
34965 #: ../tools/virt-list-partitions.pl:45
34967 "C<virt-list-partitions> is a command line tool to list the partitions that "
34968 "are contained in a virtual machine or disk image. It is mainly useful as a "
34969 "first step to using L<virt-resize(1)>."
34974 #: ../tools/virt-list-partitions.pl:50
34976 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
34977 "functionality. For more complex cases you should look at the L<guestfish(1)"
34983 #: ../tools/virt-list-partitions.pl:107
34984 msgid "B<-h> | B<--human-readable>"
34989 #: ../tools/virt-list-partitions.pl:109
34990 msgid "Show sizes in human-readable form (eg. \"1G\")."
34995 #: ../tools/virt-list-partitions.pl:117
34997 "With this option, C<virt-list-partitions> displays the type and size of each "
34998 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
35003 #: ../tools/virt-list-partitions.pl:124
35004 msgid "B<-t> | B<--total>"
35009 #: ../tools/virt-list-partitions.pl:126
35011 "Display the total size of each block device (as a separate row or rows)."
35016 #: ../tools/virt-list-partitions.pl:259
35018 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-list-"
35019 "filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib"
35020 "(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
35025 #: ../tools/virt-list-partitions.pl:275
35026 msgid "Copyright (C) 2009-2010 Red Hat Inc."