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: 2010-12-19 15:52+0000\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"
20 #: ../src/guestfs.pod:1 ../fish/guestfish.pod:1
21 #: ../test-tool/libguestfs-test-tool.pod:1 ../fuse/guestmount.pod:1
26 #: ../src/guestfs.pod:3 ../fish/guestfish.pod:3
27 #: ../test-tool/libguestfs-test-tool.pod:3 ../fuse/guestmount.pod:3
32 #: ../src/guestfs.pod:5
33 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
43 #: ../src/guestfs.pod:9
46 " #include <guestfs.h>\n"
51 #: ../src/guestfs.pod:11
54 " guestfs_h *g = guestfs_create ();\n"
55 " guestfs_add_drive (g, \"guest.img\");\n"
56 " guestfs_launch (g);\n"
57 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
58 " guestfs_touch (g, \"/hello\");\n"
59 " guestfs_umount (g, \"/\");\n"
60 " guestfs_close (g);\n"
65 #: ../src/guestfs.pod:19
68 " cc prog.c -o prog -lguestfs\n"
70 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
75 #: ../src/guestfs.pod:23 ../fish/guestfish.pod:30
76 #: ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:20
81 #: ../src/guestfs.pod:25
83 "Libguestfs is a library for accessing and modifying guest disk images. "
84 "Amongst the things this is good for: making batch configuration changes to "
85 "guests, getting disk used/free statistics (see also: virt-df), migrating "
86 "between virtualization systems (see also: virt-p2v), performing partial "
87 "backups, performing partial guest clones, cloning guests and changing "
88 "registry/UUID/hostname info, and much else besides."
92 #: ../src/guestfs.pod:33
94 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
95 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
96 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
101 #: ../src/guestfs.pod:38
103 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
104 "what filesystem is in each LV, etc.). It can also run commands in the "
105 "context of the guest. Also you can access filesystems over FUSE."
109 #: ../src/guestfs.pod:43
111 "Libguestfs is a library that can be linked with C and C++ management "
112 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
113 "PHP, Haskell or C#). You can also use it from shell scripts or the command "
118 #: ../src/guestfs.pod:48
120 "You don't need to be root to use libguestfs, although obviously you do need "
121 "enough permissions to access the disk images."
125 #: ../src/guestfs.pod:51
127 "Libguestfs is a large API because it can do many things. For a gentle "
128 "introduction, please read the L</API OVERVIEW> section next."
132 #: ../src/guestfs.pod:54
134 "There are also some example programs in the L<guestfs-examples(3)> manual "
139 #: ../src/guestfs.pod:57
144 #: ../src/guestfs.pod:59
146 "This section provides a gentler overview of the libguestfs API. We also try "
147 "to group API calls together, where that may not be obvious from reading "
148 "about the individual calls in the main section of this manual."
152 #: ../src/guestfs.pod:64
157 #: ../src/guestfs.pod:66
159 "Before you can use libguestfs calls, you have to create a handle. Then you "
160 "must add at least one disk image to the handle, followed by launching the "
161 "handle, then performing whatever operations you want, and finally closing "
162 "the handle. By convention we use the single letter C<g> for the name of the "
163 "handle variable, although of course you can use any name you want."
167 #: ../src/guestfs.pod:73
168 msgid "The general structure of all libguestfs-using programs looks like this:"
172 #: ../src/guestfs.pod:76
175 " guestfs_h *g = guestfs_create ();\n"
180 #: ../src/guestfs.pod:78
183 " /* Call guestfs_add_drive additional times if there are\n"
184 " * multiple disk images.\n"
186 " guestfs_add_drive (g, \"guest.img\");\n"
191 #: ../src/guestfs.pod:83
194 " /* Most manipulation calls won't work until you've launched\n"
195 " * the handle 'g'. You have to do this _after_ adding drives\n"
196 " * and _before_ other commands.\n"
198 " guestfs_launch (g);\n"
203 #: ../src/guestfs.pod:89
206 " /* Now you can examine what partitions, LVs etc are available.\n"
208 " char **partitions = guestfs_list_partitions (g);\n"
209 " char **logvols = guestfs_lvs (g);\n"
214 #: ../src/guestfs.pod:94
217 " /* To access a filesystem in the image, you must mount it.\n"
219 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
224 #: ../src/guestfs.pod:98
227 " /* Now you can perform filesystem actions on the guest\n"
230 " guestfs_touch (g, \"/hello\");\n"
235 #: ../src/guestfs.pod:103
238 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
239 " * it is done automatically when you close the handle. See\n"
240 " * discussion of autosync in this page.\n"
242 " guestfs_sync (g);\n"
247 #: ../src/guestfs.pod:109
250 " /* Close the handle 'g'. */\n"
251 " guestfs_close (g);\n"
256 #: ../src/guestfs.pod:112
258 "The code above doesn't include any error checking. In real code you should "
259 "check return values carefully for errors. In general all functions that "
260 "return integers return C<-1> on error, and all functions that return "
261 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
262 "how to handle errors, and consult the documentation for each function call "
263 "below to see precisely how they return error indications. See L<guestfs-"
264 "examples(3)> for fully worked examples."
268 #: ../src/guestfs.pod:121
273 #: ../src/guestfs.pod:123
275 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
276 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
277 "actual block device, or simply an empty file of zeroes that you have created "
278 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
283 #: ../src/guestfs.pod:129
285 "The call you should use in modern code for adding drives is L</"
286 "guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
287 "specifying that the format is raw, do:"
291 #: ../src/guestfs.pod:133
294 " guestfs_add_drive_opts (g, filename,\n"
295 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
301 #: ../src/guestfs.pod:137
302 msgid "You can add a disk read-only using:"
306 #: ../src/guestfs.pod:139
309 " guestfs_add_drive_opts (g, filename,\n"
310 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
311 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
317 #: ../src/guestfs.pod:144
319 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
320 "libguestfs won't modify the file."
324 #: ../src/guestfs.pod:147
326 "Be extremely cautious if the disk image is in use, eg. if it is being used "
327 "by a virtual machine. Adding it read-write will almost certainly cause disk "
328 "corruption, but adding it read-only is safe."
332 #: ../src/guestfs.pod:151
334 "You must add at least one disk image, and you may add multiple disk images. "
335 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
336 "first one you added), C</dev/sdb> (for the second one you added), etc."
340 #: ../src/guestfs.pod:156
342 "Once L</guestfs_launch> has been called you cannot add any more images. You "
343 "can call L</guestfs_list_devices> to get a list of the device names, in the "
344 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
348 #: ../src/guestfs.pod:161
353 #: ../src/guestfs.pod:163
355 "Before you can read or write files, create directories and so on in a disk "
356 "image that contains filesystems, you have to mount those filesystems using "
357 "L</guestfs_mount>. If you already know that a disk image contains (for "
358 "example) one partition with a filesystem on that partition, then you can "
363 #: ../src/guestfs.pod:169
366 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
371 #: ../src/guestfs.pod:171
373 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
374 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
375 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>)."
379 #: ../src/guestfs.pod:175
381 "If you are given a disk image and you don't know what it contains then you "
382 "have to find out. Libguestfs can do that too: use L</"
383 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
384 "LVs, and either try mounting each to see what is mountable, or else examine "
385 "them with L</guestfs_vfs_type> or L</guestfs_file>. Libguestfs also has a "
386 "set of APIs for inspection of disk images (see L</INSPECTION> below). But "
387 "you might find it easier to look at higher level programs built on top of "
388 "libguestfs, in particular L<virt-inspector(1)>."
392 #: ../src/guestfs.pod:185
394 "To mount a disk image read-only, use L</guestfs_mount_ro>. There are "
395 "several other variations of the C<guestfs_mount_*> call."
399 #: ../src/guestfs.pod:188
400 msgid "FILESYSTEM ACCESS AND MODIFICATION"
404 #: ../src/guestfs.pod:190
406 "The majority of the libguestfs API consists of fairly low-level calls for "
407 "accessing and modifying the files, directories, symlinks etc on mounted "
408 "filesystems. There are over a hundred such calls which you can find listed "
409 "in detail below in this man page, and we don't even pretend to cover them "
410 "all in this overview."
414 #: ../src/guestfs.pod:196
416 "Specify filenames as full paths, starting with C<\"/\"> and including the "
421 #: ../src/guestfs.pod:199
423 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
424 "the file called C<\"etc/passwd\"> then you could do:"
428 #: ../src/guestfs.pod:202
431 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
436 #: ../src/guestfs.pod:204
438 "This would return C<data> as a newly allocated buffer containing the full "
439 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
440 "or C<NULL> if there was an error."
444 #: ../src/guestfs.pod:208
446 "As another example, to create a top-level directory on that filesystem "
447 "called C<\"var\"> you would do:"
451 #: ../src/guestfs.pod:211
454 " guestfs_mkdir (g, \"/var\");\n"
459 #: ../src/guestfs.pod:213
460 msgid "To create a symlink you could do:"
464 #: ../src/guestfs.pod:215
467 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
468 " \"/etc/rc3.d/S30portmap\");\n"
473 #: ../src/guestfs.pod:218
475 "Libguestfs will reject attempts to use relative paths and there is no "
476 "concept of a current working directory."
480 #: ../src/guestfs.pod:221
482 "Libguestfs can return errors in many situations: for example if the "
483 "filesystem isn't writable, or if a file or directory that you requested "
484 "doesn't exist. If you are using the C API (documented here) you have to "
485 "check for those error conditions after each call. (Other language bindings "
486 "turn these errors into exceptions)."
490 #: ../src/guestfs.pod:227
492 "File writes are affected by the per-handle umask, set by calling L</"
493 "guestfs_umask> and defaulting to 022. See L</UMASK>."
497 #: ../src/guestfs.pod:230
502 #: ../src/guestfs.pod:232
504 "Libguestfs contains API calls to read, create and modify partition tables on "
509 #: ../src/guestfs.pod:235
511 "In the common case where you want to create a single partition covering the "
512 "whole disk, you should use the L</guestfs_part_disk> call:"
516 #: ../src/guestfs.pod:239
519 " const char *parttype = \"mbr\";\n"
520 " if (disk_is_larger_than_2TB)\n"
521 " parttype = \"gpt\";\n"
522 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
527 #: ../src/guestfs.pod:244
529 "Obviously this effectively wipes anything that was on that disk image before."
533 #: ../src/guestfs.pod:247
538 #: ../src/guestfs.pod:249
540 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
541 "guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense unless "
542 "you familiarize yourself with the concepts of physical volumes, volume "
543 "groups and logical volumes."
547 #: ../src/guestfs.pod:254
549 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
550 "tldp.org/HOWTO/LVM-HOWTO/>."
554 #: ../src/guestfs.pod:257
559 #: ../src/guestfs.pod:259
561 "Use L</guestfs_cat> to download small, text only files. This call is "
562 "limited to files which are less than 2 MB and which cannot contain any ASCII "
563 "NUL (C<\\0>) characters. However it has a very simple to use API."
567 #: ../src/guestfs.pod:264
569 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
570 "bit data, since it returns a (pointer, size) pair. However it is still "
571 "limited to \"small\" files, less than 2 MB."
575 #: ../src/guestfs.pod:268
577 "L</guestfs_download> can be used to download any file, with no limits on "
578 "content or size (even files larger than 4 GB)."
582 #: ../src/guestfs.pod:271
584 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
588 #: ../src/guestfs.pod:274
593 #: ../src/guestfs.pod:276
595 "It's often the case that you want to write a file or files to the disk image."
599 #: ../src/guestfs.pod:279
601 "To write a small file with fixed content, use L</guestfs_write>. To create "
602 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
603 "guestfs_fallocate64> (with all disk blocks allocated). There are a variety "
604 "of other functions for creating test files, for example L</guestfs_fill> and "
605 "L</guestfs_fill_pattern>."
609 #: ../src/guestfs.pod:285
611 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
612 "file content or size (even files larger than 4 GB)."
616 #: ../src/guestfs.pod:288
618 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
622 #: ../src/guestfs.pod:290
624 "However the fastest way to upload I<large numbers of arbitrary files> is to "
625 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
626 ">), then attach this using L</guestfs_add_drive_ro>. If you add the drive "
627 "in a predictable way (eg. adding it last after all other drives) then you "
628 "can get the device name from L</guestfs_list_devices> and mount it directly "
629 "using L</guestfs_mount_ro>. Note that squashfs images are sometimes non-"
630 "portable between kernel versions, and they don't support labels or UUIDs. "
631 "If you want to pre-build an image or you need to mount it using a label or "
632 "UUID, use an ISO image instead."
636 #: ../src/guestfs.pod:301
641 #: ../src/guestfs.pod:303
643 "There are various different commands for copying between files and devices "
644 "and in and out of the guest filesystem. These are summarised in the table "
649 #: ../src/guestfs.pod:309
650 msgid "B<file> to B<file>"
654 #: ../src/guestfs.pod:311
656 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
657 "directories recursively."
661 #: ../src/guestfs.pod:314
662 msgid "B<file or device> to B<file or device>"
666 #: ../src/guestfs.pod:316
668 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
669 "devices in the guest."
673 #: ../src/guestfs.pod:319
674 msgid "Example: duplicate the contents of an LV:"
678 #: ../src/guestfs.pod:321
681 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
686 #: ../src/guestfs.pod:323
688 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
689 "(C</dev/VG/Original>). To copy less than the whole source device, use L</"
690 "guestfs_copy_size>."
694 #: ../src/guestfs.pod:327
695 msgid "B<file on the host> to B<file or device>"
699 #: ../src/guestfs.pod:329
700 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
704 #: ../src/guestfs.pod:331
705 msgid "B<file or device> to B<file on the host>"
709 #: ../src/guestfs.pod:333
710 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
714 #: ../src/guestfs.pod:337
715 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
719 #: ../src/guestfs.pod:339
721 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, L</"
722 "guestfs_tar_out> etc appear to only take filenames as arguments, so it "
723 "appears you can only upload and download to files. However many Un*x-like "
724 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, C</"
725 "dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, stderr, "
726 "and arbitrary file descriptor N."
730 #: ../src/guestfs.pod:347
731 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
735 #: ../src/guestfs.pod:350
738 " guestfs_download (filename, \"/dev/stdout\");\n"
743 #: ../src/guestfs.pod:352
744 msgid "and you can write tar output to a pipe C<fd> by doing:"
748 #: ../src/guestfs.pod:354
752 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
753 " guestfs_tar_out (\"/\", devfd);\n"
758 #: ../src/guestfs.pod:358
759 msgid "LISTING FILES"
763 #: ../src/guestfs.pod:360
765 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
766 "L<guestfish(1)>-equivalent command C<ll>)."
770 #: ../src/guestfs.pod:363
772 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
773 "programs, as a flat list of strings."
777 #: ../src/guestfs.pod:366
779 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
780 "directory, plus additional information about each one. It is more "
781 "equivalent to using the L<readdir(3)> call on a local filesystem."
785 #: ../src/guestfs.pod:370
787 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
791 #: ../src/guestfs.pod:373
792 msgid "RUNNING COMMANDS"
796 #: ../src/guestfs.pod:375
798 "Although libguestfs is primarily an API for manipulating files inside guest "
799 "images, we also provide some limited facilities for running commands inside "
804 #: ../src/guestfs.pod:379
805 msgid "There are many limitations to this:"
809 #: ../src/guestfs.pod:383 ../src/guestfs.pod:388 ../src/guestfs.pod:393
810 #: ../src/guestfs.pod:397 ../src/guestfs.pod:402 ../src/guestfs.pod:406
811 #: ../src/guestfs.pod:411 ../src/guestfs.pod:416 ../src/guestfs.pod:1006
812 #: ../src/guestfs.pod:1010 ../src/guestfs.pod:1014 ../src/guestfs.pod:1019
813 #: ../src/guestfs.pod:1027 ../src/guestfs.pod:1046 ../src/guestfs.pod:1054
814 #: ../src/guestfs.pod:1076 ../src/guestfs.pod:1080 ../src/guestfs.pod:1084
815 #: ../src/guestfs.pod:1088 ../src/guestfs.pod:1092 ../src/guestfs.pod:1096
816 #: ../src/guestfs.pod:1578 ../src/guestfs.pod:1583 ../src/guestfs.pod:1587
817 #: ../src/guestfs.pod:1697 ../src/guestfs.pod:1702 ../src/guestfs.pod:1706
818 #: ../src/guestfs.pod:2058 ../src/guestfs.pod:2064 ../src/guestfs.pod:2069
819 #: ../src/guestfs.pod:2075 ../src/guestfs.pod:2187 ../src/guestfs.pod:2191
820 #: ../src/guestfs.pod:2195 ../src/guestfs.pod:2199
821 #: ../src/guestfs-actions.pod:15 ../src/guestfs-actions.pod:22
822 #: ../src/guestfs-actions.pod:571 ../src/guestfs-actions.pod:579
823 #: ../src/guestfs-actions.pod:586 ../src/guestfs-actions.pod:593
824 #: ../src/guestfs-actions.pod:1589 ../src/guestfs-actions.pod:1593
825 #: ../src/guestfs-actions.pod:1597 ../src/guestfs-actions.pod:1601
826 #: ../src/guestfs-actions.pod:1609 ../src/guestfs-actions.pod:1613
827 #: ../src/guestfs-actions.pod:1617 ../src/guestfs-actions.pod:1627
828 #: ../src/guestfs-actions.pod:1631 ../src/guestfs-actions.pod:1635
829 #: ../src/guestfs-actions.pod:1773 ../src/guestfs-actions.pod:1777
830 #: ../src/guestfs-actions.pod:1782 ../src/guestfs-actions.pod:1787
831 #: ../src/guestfs-actions.pod:1848 ../src/guestfs-actions.pod:1852
832 #: ../src/guestfs-actions.pod:1857 ../fish/guestfish.pod:427
833 #: ../fish/guestfish.pod:431 ../fish/guestfish.pod:435
834 #: ../fish/guestfish.pod:439 ../fish/guestfish-actions.pod:13
835 #: ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:375
836 #: ../fish/guestfish-actions.pod:383 ../fish/guestfish-actions.pod:390
837 #: ../fish/guestfish-actions.pod:397 ../fish/guestfish-actions.pod:1067
838 #: ../fish/guestfish-actions.pod:1071 ../fish/guestfish-actions.pod:1075
839 #: ../fish/guestfish-actions.pod:1079 ../fish/guestfish-actions.pod:1087
840 #: ../fish/guestfish-actions.pod:1091 ../fish/guestfish-actions.pod:1095
841 #: ../fish/guestfish-actions.pod:1105 ../fish/guestfish-actions.pod:1109
842 #: ../fish/guestfish-actions.pod:1113 ../fish/guestfish-actions.pod:1203
843 #: ../fish/guestfish-actions.pod:1207 ../fish/guestfish-actions.pod:1212
844 #: ../fish/guestfish-actions.pod:1217 ../fish/guestfish-actions.pod:1259
845 #: ../fish/guestfish-actions.pod:1263 ../fish/guestfish-actions.pod:1268
850 #: ../src/guestfs.pod:385
852 "The kernel version that the command runs under will be different from what "
857 #: ../src/guestfs.pod:390
859 "If the command needs to communicate with daemons, then most likely they "
864 #: ../src/guestfs.pod:395
865 msgid "The command will be running in limited memory."
869 #: ../src/guestfs.pod:399
871 "The network may not be available unless you enable it (see L</"
872 "guestfs_set_network>)."
876 #: ../src/guestfs.pod:404
877 msgid "Only supports Linux guests (not Windows, BSD, etc)."
881 #: ../src/guestfs.pod:408
883 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
887 #: ../src/guestfs.pod:413
889 "For SELinux guests, you may need to enable SELinux and load policy first. "
890 "See L</SELINUX> in this manpage."
894 #: ../src/guestfs.pod:418
896 "I<Security:> It is not safe to run commands from untrusted, possibly "
897 "malicious guests. These commands may attempt to exploit your program by "
898 "sending unexpected output. They could also try to exploit the Linux kernel "
899 "or qemu provided by the libguestfs appliance. They could use the network "
900 "provided by the libguestfs appliance to bypass ordinary network partitions "
901 "and firewalls. They could use the elevated privileges or different SELinux "
902 "context of your program to their advantage."
906 #: ../src/guestfs.pod:427
908 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
909 "(a script which runs when the guest next boots normally), and to have this "
910 "script run the commands you want in the normal context of the running guest, "
911 "network security and so on. For information about other security issues, "
916 #: ../src/guestfs.pod:435
918 "The two main API calls to run commands are L</guestfs_command> and L</"
919 "guestfs_sh> (there are also variations)."
923 #: ../src/guestfs.pod:438
925 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
926 "shell globs, redirections, etc will work."
930 #: ../src/guestfs.pod:441
931 msgid "CONFIGURATION FILES"
935 #: ../src/guestfs.pod:443
937 "To read and write configuration files in Linux guest filesystems, we "
938 "strongly recommend using Augeas. For example, Augeas understands how to "
939 "read and write, say, a Linux shadow password file or X.org configuration "
940 "file, and so avoids you having to write that code."
944 #: ../src/guestfs.pod:448
946 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
947 "document Augeas itself here because there is excellent documentation on the "
948 "L<http://augeas.net/> website."
952 #: ../src/guestfs.pod:452
954 "If you don't want to use Augeas (you fool!) then try calling L</"
955 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
960 #: ../src/guestfs.pod:456
965 #: ../src/guestfs.pod:458
967 "We support SELinux guests. To ensure that labeling happens correctly in "
968 "SELinux guests, you need to enable SELinux and load the guest's policy:"
972 #: ../src/guestfs.pod:464 ../src/guestfs.pod:1199 ../src/guestfs.pod:1330
977 #: ../src/guestfs.pod:466
978 msgid "Before launching, do:"
982 #: ../src/guestfs.pod:468
985 " guestfs_set_selinux (g, 1);\n"
990 #: ../src/guestfs.pod:470 ../src/guestfs.pod:1203 ../src/guestfs.pod:1334
995 #: ../src/guestfs.pod:472
997 "After mounting the guest's filesystem(s), load the policy. This is best "
998 "done by running the L<load_policy(8)> command in the guest itself:"
1002 #: ../src/guestfs.pod:476
1005 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
1010 #: ../src/guestfs.pod:478
1012 "(Older versions of C<load_policy> require you to specify the name of the "
1017 #: ../src/guestfs.pod:481 ../src/guestfs.pod:1340
1022 #: ../src/guestfs.pod:483
1024 "Optionally, set the security context for the API. The correct security "
1025 "context to use can only be known by inspecting the guest. As an example:"
1029 #: ../src/guestfs.pod:487
1032 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
1037 #: ../src/guestfs.pod:491
1038 msgid "This will work for running commands and editing existing files."
1042 #: ../src/guestfs.pod:493
1044 "When new files are created, you may need to label them explicitly, for "
1045 "example by running the external command C<restorecon pathname>."
1049 #: ../src/guestfs.pod:497
1054 #: ../src/guestfs.pod:499
1056 "Certain calls are affected by the current file mode creation mask (the "
1057 "\"umask\"). In particular ones which create files or directories, such as "
1058 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
1059 "either the default mode that the file is created with or modifies the mode "
1064 #: ../src/guestfs.pod:505
1066 "The default umask is C<022>, so files are created with modes such as C<0644> "
1067 "and directories with C<0755>."
1071 #: ../src/guestfs.pod:508
1073 "There are two ways to avoid being affected by umask. Either set umask to 0 "
1074 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
1075 "guestfs_chmod> after creating each file or directory."
1079 #: ../src/guestfs.pod:512
1080 msgid "For more information about umask, see L<umask(2)>."
1084 #: ../src/guestfs.pod:514 ../fish/guestfish.pod:720
1085 msgid "ENCRYPTED DISKS"
1089 #: ../src/guestfs.pod:516
1091 "Libguestfs allows you to access Linux guests which have been encrypted using "
1092 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1093 "standard. This includes nearly all whole disk encryption systems used by "
1094 "modern Linux guests."
1098 #: ../src/guestfs.pod:522
1100 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1101 "returns the string C<crypto_LUKS>)."
1105 #: ../src/guestfs.pod:525
1107 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
1108 "will require the passphrase!"
1112 #: ../src/guestfs.pod:528
1114 "Opening a LUKS device creates a new device mapper device called C</dev/"
1115 "mapper/mapname> (where C<mapname> is the string you supply to L</"
1116 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
1117 "from and encrypted to the underlying block device respectively."
1121 #: ../src/guestfs.pod:534
1123 "LVM volume groups on the device can be made visible by calling L</"
1124 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
1125 "(s) can now be mounted in the usual way."
1129 #: ../src/guestfs.pod:538
1131 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1132 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1133 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
1134 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1135 "underlying encrypted block device)."
1139 #: ../src/guestfs.pod:545
1144 #: ../src/guestfs.pod:547
1146 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1147 "contains operating systems. (These APIs used to be in a separate Perl-only "
1148 "library called L<Sys::Guestfs::Lib(3)> but since version 1.5.3 the most "
1149 "frequently used part of this library has been rewritten in C and moved into "
1154 #: ../src/guestfs.pod:553
1156 "Add all disks belonging to the unknown virtual machine and call L</"
1157 "guestfs_launch> in the usual way."
1161 #: ../src/guestfs.pod:556
1163 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1164 "and certain heuristics, and returns a list of operating systems that were "
1165 "found. An empty list means none were found. A single element is the root "
1166 "filesystem of the operating system. For dual- or multi-boot guests, "
1167 "multiple roots can be returned, each one corresponding to a separate "
1168 "operating system. (Multi-boot virtual machines are extremely rare in the "
1169 "world of virtualization, but since this scenario can happen, we have built "
1170 "libguestfs to deal with it.)"
1174 #: ../src/guestfs.pod:565
1176 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1177 "to get additional details about that operating system. For example, call L</"
1178 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1179 "Windows and Linux-based operating systems respectively."
1183 #: ../src/guestfs.pod:571
1185 "Un*x-like and Linux-based operating systems usually consist of several "
1186 "filesystems which are mounted at boot time (for example, a separate boot "
1187 "partition mounted on C</boot>). The inspection rules are able to detect how "
1188 "filesystems correspond to mount points. Call "
1189 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1190 "hash table like this example:"
1194 #: ../src/guestfs.pod:578
1197 " /boot => /dev/sda1\n"
1198 " / => /dev/vg_guest/lv_root\n"
1199 " /usr => /dev/vg_guest/lv_usr\n"
1204 #: ../src/guestfs.pod:582
1206 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1207 "filesystems as suggested."
1211 #: ../src/guestfs.pod:585
1213 "Be careful to mount filesystems in the right order (eg. C</> before C</"
1214 "usr>). Sorting the keys of the hash by length, shortest first, should work."
1218 #: ../src/guestfs.pod:589
1220 "Inspection currently only works for some common operating systems. "
1221 "Contributors are welcome to send patches for other operating systems that we "
1222 "currently cannot detect."
1226 #: ../src/guestfs.pod:593
1228 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1229 "for more details. The L</guestfs_inspect_os> function just ignores any "
1230 "encrypted devices."
1234 #: ../src/guestfs.pod:597
1236 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1237 "inspection and caches the results in the guest handle. Subsequent calls to "
1238 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
1239 "read the disks. If you change the content of the guest disks, you can redo "
1240 "inspection by calling L</guestfs_inspect_os> again. (L</"
1241 "guestfs_inspect_list_applications> works a little differently from the other "
1242 "calls and does read the disks. See documentation for that function for "
1247 #: ../src/guestfs.pod:606
1248 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1252 #: ../src/guestfs.pod:608
1254 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
1255 "ntfs-3g.org/> driver."
1259 #: ../src/guestfs.pod:611
1260 msgid "DRIVE LETTERS AND PATHS"
1264 #: ../src/guestfs.pod:613
1266 "DOS and Windows still use drive letters, and the filesystems are always "
1267 "treated as case insensitive by Windows itself, and therefore you might find "
1268 "a Windows configuration file referring to a path like C<c:\\windows"
1269 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
1270 "might be referred to as C</WINDOWS/System32>."
1274 #: ../src/guestfs.pod:619
1276 "Drive letter mappings are outside the scope of libguestfs. You have to use "
1277 "libguestfs to read the appropriate Windows Registry and configuration files, "
1278 "to determine yourself how drives are mapped (see also L<hivex(3)> and L<virt-"
1283 #: ../src/guestfs.pod:624
1285 "Replacing backslash characters with forward slash characters is also outside "
1286 "the scope of libguestfs, but something that you can easily do."
1290 #: ../src/guestfs.pod:627
1292 "Where we can help is in resolving the case insensitivity of paths. For "
1293 "this, call L</guestfs_case_sensitive_path>."
1297 #: ../src/guestfs.pod:630
1298 msgid "ACCESSING THE WINDOWS REGISTRY"
1302 #: ../src/guestfs.pod:632
1304 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1305 "files, through the library C<hivex> which is part of the libguestfs project "
1306 "although ships as a separate tarball. You have to locate and download the "
1307 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1308 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
1309 "reg(1)> for more help on this issue."
1313 #: ../src/guestfs.pod:640
1314 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
1318 #: ../src/guestfs.pod:642
1320 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
1321 "provide something which looks like a Linux symlink. The way it tries to do "
1322 "the rewriting is described here:"
1326 #: ../src/guestfs.pod:646
1328 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
1333 #: ../src/guestfs.pod:648
1335 "The essential problem is that ntfs-3g simply does not have enough "
1336 "information to do a correct job. NTFS links can contain drive letters and "
1337 "references to external device GUIDs that ntfs-3g has no way of resolving. "
1338 "It is almost certainly the case that libguestfs callers should ignore what "
1339 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
1343 #: ../src/guestfs.pod:655
1345 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use L</"
1346 "guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
1347 "attribute, and read the raw reparse data from that (you can find the format "
1348 "documented in various places around the web)."
1352 #: ../src/guestfs.pod:660
1353 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
1357 #: ../src/guestfs.pod:662
1359 "There are other useful extended attributes that can be read from ntfs-3g "
1360 "filesystems (using L</guestfs_getxattr>). See:"
1364 #: ../src/guestfs.pod:665
1366 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
1370 #: ../src/guestfs.pod:667
1371 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1375 #: ../src/guestfs.pod:669
1377 "Although we don't want to discourage you from using the C API, we will "
1378 "mention here that the same API is also available in other languages."
1382 #: ../src/guestfs.pod:672
1384 "The API is broadly identical in all supported languages. This means that "
1385 "the C call C<guestfs_mount(g,path)> is C<$g-E<gt>mount($path)> in Perl, C<g."
1386 "mount(path)> in Python, and C<Guestfs.mount g path> in OCaml. In other "
1387 "words, a straightforward, predictable isomorphism between each language."
1391 #: ../src/guestfs.pod:678
1393 "Error messages are automatically transformed into exceptions if the language "
1398 #: ../src/guestfs.pod:681
1400 "We don't try to \"object orientify\" parts of the API in OO languages, "
1401 "although contributors are welcome to write higher level APIs above what we "
1402 "provide in their favourite languages if they wish."
1406 #: ../src/guestfs.pod:687
1411 #: ../src/guestfs.pod:689
1413 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1414 "identical to the C API. C++ classes and exceptions are not used."
1418 #: ../src/guestfs.pod:693
1423 #: ../src/guestfs.pod:695
1425 "The C# bindings are highly experimental. Please read the warnings at the "
1426 "top of C<csharp/Libguestfs.cs>."
1430 #: ../src/guestfs.pod:698
1435 #: ../src/guestfs.pod:700
1437 "This is the only language binding that is working but incomplete. Only "
1438 "calls which return simple integers have been bound in Haskell, and we are "
1439 "looking for help to complete this binding."
1443 #: ../src/guestfs.pod:704
1448 #: ../src/guestfs.pod:706
1450 "Full documentation is contained in the Javadoc which is distributed with "
1455 #: ../src/guestfs.pod:709
1460 #: ../src/guestfs.pod:711
1461 msgid "For documentation see L<guestfs-ocaml(3)>."
1465 #: ../src/guestfs.pod:713
1470 #: ../src/guestfs.pod:715
1471 msgid "For documentation see L<Sys::Guestfs(3)>."
1475 #: ../src/guestfs.pod:717
1480 #: ../src/guestfs.pod:719
1482 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1483 "the php-libguestfs package for your distribution."
1487 #: ../src/guestfs.pod:722
1488 msgid "The PHP binding only works correctly on 64 bit machines."
1492 #: ../src/guestfs.pod:724
1497 #: ../src/guestfs.pod:726
1498 msgid "For documentation see L<guestfs-python(3)>."
1502 #: ../src/guestfs.pod:728
1507 #: ../src/guestfs.pod:730
1508 msgid "For documentation see L<guestfs-ruby(3)>."
1512 #: ../src/guestfs.pod:732
1513 msgid "B<shell scripts>"
1517 #: ../src/guestfs.pod:734
1518 msgid "For documentation see L<guestfish(1)>."
1522 #: ../src/guestfs.pod:738
1523 msgid "LIBGUESTFS GOTCHAS"
1527 #: ../src/guestfs.pod:740
1529 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1530 "system [...] that works in the way it is documented but is counterintuitive "
1531 "and almost invites mistakes.\""
1535 #: ../src/guestfs.pod:744
1537 "Since we developed libguestfs and the associated tools, there are several "
1538 "things we would have designed differently, but are now stuck with for "
1539 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1540 "release, you can expect these to change. Beware of them."
1544 #: ../src/guestfs.pod:752
1545 msgid "Autosync / forgetting to sync."
1549 #: ../src/guestfs.pod:754
1551 "When modifying a filesystem from C or another language, you B<must> unmount "
1552 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1553 "libguestfs handle. You can also call:"
1557 #: ../src/guestfs.pod:758
1560 " guestfs_set_autosync (g, 1);\n"
1565 #: ../src/guestfs.pod:760
1567 "to have the unmount/sync done automatically for you when the handle 'g' is "
1568 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
1572 #: ../src/guestfs.pod:764
1574 "If you forget to do this, then it is entirely possible that your changes "
1575 "won't be written out, or will be partially written, or (very rarely) that "
1576 "you'll get disk corruption."
1580 #: ../src/guestfs.pod:768
1582 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1583 "guestfish scripts that forget to sync will work just fine, which can make "
1584 "this very puzzling if you are trying to debug a problem."
1588 #: ../src/guestfs.pod:772
1590 "Update: Autosync is enabled by default for all API users starting from "
1591 "libguestfs 1.5.24."
1595 #: ../src/guestfs.pod:775
1596 msgid "Mount option C<-o sync> should not be the default."
1600 #: ../src/guestfs.pod:777
1602 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1603 "However C<-o sync> does not add any reliability benefit, but does have a "
1604 "very large performance impact."
1608 #: ../src/guestfs.pod:781
1610 "The work around is to use L</guestfs_mount_options> and set the mount "
1611 "options that you actually want to use."
1615 #: ../src/guestfs.pod:784
1616 msgid "Read-only should be the default."
1620 #: ../src/guestfs.pod:786
1622 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1623 "specify I<--rw> if you want to make changes to the image."
1627 #: ../src/guestfs.pod:789
1628 msgid "This would reduce the potential to corrupt live VM images."
1632 #: ../src/guestfs.pod:791
1634 "Note that many filesystems change the disk when you just mount and unmount, "
1635 "even if you didn't perform any writes. You need to use L</"
1636 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
1640 #: ../src/guestfs.pod:795
1641 msgid "guestfish command line is hard to use."
1645 #: ../src/guestfs.pod:797
1647 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1648 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1649 "exist, so it fails. In earlier versions of guestfish the error message was "
1650 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1651 "we should have used C<guestfish -c command> to run commands."
1655 #: ../src/guestfs.pod:804
1656 msgid "guestfish megabyte modifiers don't work right on all commands"
1660 #: ../src/guestfs.pod:806
1662 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1663 "other modifiers). What guestfish actually does is to multiply the number "
1664 "part by the modifier part and pass the result to the C API. However this "
1665 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1666 "expecting some other unit (eg. megabytes)."
1670 #: ../src/guestfs.pod:813
1671 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1675 #: ../src/guestfs.pod:815
1678 " lvcreate LV VG 100M\n"
1683 #: ../src/guestfs.pod:817
1685 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1686 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1687 "megabytes * megabytes) logical volume. The error message you get from this "
1688 "is also a little obscure."
1692 #: ../src/guestfs.pod:822
1694 "This could be fixed in the generator by specially marking parameters and "
1695 "return values which take bytes or other units."
1699 #: ../src/guestfs.pod:825
1700 msgid "Ambiguity between devices and paths"
1704 #: ../src/guestfs.pod:827
1706 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
1707 "sdb2>) and a similar pathname. A file might just happen to be called "
1708 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1712 #: ../src/guestfs.pod:832
1714 "In the current API we usually resolve this ambiguity by having two separate "
1715 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1716 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1717 "detecting if the path supplied begins with C</dev/>."
1721 #: ../src/guestfs.pod:838
1723 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1724 "make paths/devices into structured names. One way to do this would be to "
1725 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1726 "aspect of grub. Another way would be to use a structured type, equivalent "
1727 "to this OCaml type:"
1731 #: ../src/guestfs.pod:844
1734 " type path = Path of string | Device of int | Partition of int * int\n"
1739 #: ../src/guestfs.pod:846
1740 msgid "which would allow you to pass arguments like:"
1744 #: ../src/guestfs.pod:848
1747 " Path \"/foo/bar\"\n"
1748 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
1749 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
1750 " Path \"/dev/sdb2\" (* not a device *)\n"
1755 #: ../src/guestfs.pod:853
1757 "As you can see there are still problems to resolve even with this "
1758 "representation. Also consider how it might work in guestfish."
1762 #: ../src/guestfs.pod:858
1763 msgid "PROTOCOL LIMITS"
1767 #: ../src/guestfs.pod:860
1769 "Internally libguestfs uses a message-based protocol to pass API calls and "
1770 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
1771 "plenty more detail about this). The maximum message size used by the "
1772 "protocol is slightly less than 4 MB. For some API calls you may need to be "
1773 "aware of this limit. The API calls which may be affected are individually "
1774 "documented, with a link back to this section of the documentation."
1778 #: ../src/guestfs.pod:868
1780 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
1781 "a simple string. Because this string is at some point internally encoded as "
1782 "a message, the maximum size that it can return is slightly under 4 MB. If "
1783 "the requested file is larger than this then you will get an error."
1787 #: ../src/guestfs.pod:874
1789 "In order to transfer large files into and out of the guest filesystem, you "
1790 "need to use particular calls that support this. The sections L</UPLOADING> "
1791 "and L</DOWNLOADING> document how to do this."
1795 #: ../src/guestfs.pod:878
1797 "You might also consider mounting the disk image using our FUSE filesystem "
1798 "support (L<guestmount(1)>)."
1802 #: ../src/guestfs.pod:881
1803 msgid "KEYS AND PASSPHRASES"
1807 #: ../src/guestfs.pod:883
1809 "Certain libguestfs calls take a parameter that contains sensitive key "
1810 "material, passed in as a C string."
1814 #: ../src/guestfs.pod:886
1816 "In the future we would hope to change the libguestfs implementation so that "
1817 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1818 "swap. However this is I<not> done at the moment, because of the complexity "
1819 "of such an implementation."
1823 #: ../src/guestfs.pod:891
1825 "Therefore you should be aware that any key parameter you pass to libguestfs "
1826 "might end up being written out to the swap partition. If this is a concern, "
1827 "scrub the swap partition or don't use libguestfs on encrypted devices."
1831 #: ../src/guestfs.pod:896
1832 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
1836 #: ../src/guestfs.pod:898
1838 "All high-level libguestfs actions are synchronous. If you want to use "
1839 "libguestfs asynchronously then you must create a thread."
1843 #: ../src/guestfs.pod:901
1845 "Only use the handle from a single thread. Either use the handle exclusively "
1846 "from one thread, or provide your own mutex so that two threads cannot issue "
1847 "calls on the same handle at the same time."
1851 #: ../src/guestfs.pod:905
1853 "See the graphical program guestfs-browser for one possible architecture for "
1854 "multithreaded programs using libvirt and libguestfs."
1858 #: ../src/guestfs.pod:908
1863 #: ../src/guestfs.pod:910
1865 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
1870 #: ../src/guestfs.pod:913
1872 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
1873 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
1877 #: ../src/guestfs.pod:916
1879 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
1880 "to change the directories that libguestfs will search in. The value is a "
1881 "colon-separated list of paths. The current directory is I<not> searched "
1882 "unless the path contains an empty element or C<.>. For example "
1883 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
1884 "then C</usr/lib/guestfs>."
1888 #: ../src/guestfs.pod:923
1889 msgid "QEMU WRAPPERS"
1893 #: ../src/guestfs.pod:925
1895 "If you want to compile your own qemu, run qemu from a non-standard location, "
1896 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
1901 #: ../src/guestfs.pod:929
1903 "There is one important rule to remember: you I<must C<exec qemu>> as the "
1904 "last command in the shell script (so that qemu replaces the shell and "
1905 "becomes the direct child of the libguestfs-using program). If you don't do "
1906 "this, then the qemu process won't be cleaned up correctly."
1910 #: ../src/guestfs.pod:934
1912 "Here is an example of a wrapper, where I have built my own copy of qemu from "
1917 #: ../src/guestfs.pod:937
1921 " qemudir=/home/rjones/d/qemu\n"
1922 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
1927 #: ../src/guestfs.pod:941
1929 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
1930 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
1935 #: ../src/guestfs.pod:945
1938 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
1943 #: ../src/guestfs.pod:947
1945 "Note that libguestfs also calls qemu with the -help and -version options in "
1946 "order to determine features."
1950 #: ../src/guestfs.pod:950
1951 msgid "ABI GUARANTEE"
1955 #: ../src/guestfs.pod:952
1957 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
1958 "actions as outlined in this section. Although we will deprecate some "
1959 "actions, for example if they get replaced by newer calls, we will keep the "
1960 "old actions forever. This allows you the developer to program in confidence "
1961 "against the libguestfs API."
1965 #: ../src/guestfs.pod:958
1966 msgid "BLOCK DEVICE NAMING"
1970 #: ../src/guestfs.pod:960
1972 "In the kernel there is now quite a profusion of schemata for naming block "
1973 "devices (in this context, by I<block device> I mean a physical or virtual "
1974 "hard drive). The original Linux IDE driver used names starting with C</dev/"
1975 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
1976 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
1977 "for the old IDE driver (particularly for SATA devices) those devices also "
1978 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
1979 "paravirtualized drivers. This has created several different naming systems, "
1980 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
1984 #: ../src/guestfs.pod:972
1986 "As discussed above, libguestfs uses a qemu appliance running an embedded "
1987 "Linux kernel to access block devices. We can run a variety of appliances "
1988 "based on a variety of Linux kernels."
1992 #: ../src/guestfs.pod:976
1994 "This causes a problem for libguestfs because many API calls use device or "
1995 "partition names. Working scripts and the recipe (example) scripts that we "
1996 "make available over the internet could fail if the naming scheme changes."
2000 #: ../src/guestfs.pod:981
2002 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2003 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2004 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2005 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2009 #: ../src/guestfs.pod:987
2011 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2012 "L</guestfs_list_partitions> and similar calls return the true names of the "
2013 "devices and partitions as known to the appliance."
2017 #: ../src/guestfs.pod:992
2018 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2022 #: ../src/guestfs.pod:994
2024 "Usually this translation is transparent. However in some (very rare) cases "
2025 "you may need to know the exact algorithm. Such cases include where you use "
2026 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
2027 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
2031 #: ../src/guestfs.pod:1000
2033 "The algorithm is applied only to I<parameters> which are known to be either "
2034 "device or partition names. Return values from functions such as L</"
2035 "guestfs_list_devices> are never changed."
2039 #: ../src/guestfs.pod:1008
2040 msgid "Is the string a parameter which is a device or partition name?"
2044 #: ../src/guestfs.pod:1012
2045 msgid "Does the string begin with C</dev/sd>?"
2049 #: ../src/guestfs.pod:1016
2051 "Does the named device exist? If so, we use that device. However if I<not> "
2052 "then we continue with this algorithm."
2056 #: ../src/guestfs.pod:1021
2057 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
2061 #: ../src/guestfs.pod:1023
2062 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
2066 #: ../src/guestfs.pod:1025
2067 msgid "If that named device exists, use it. If not, continue."
2071 #: ../src/guestfs.pod:1029
2072 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
2076 #: ../src/guestfs.pod:1031
2077 msgid "If that named device exists, use it. If not, return an error."
2081 #: ../src/guestfs.pod:1035
2082 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
2086 #: ../src/guestfs.pod:1037
2088 "Although the standard naming scheme and automatic translation is useful for "
2089 "simple programs and guestfish scripts, for larger programs it is best not to "
2090 "rely on this mechanism."
2094 #: ../src/guestfs.pod:1041
2096 "Where possible for maximum future portability programs using libguestfs "
2097 "should use these future-proof techniques:"
2101 #: ../src/guestfs.pod:1048
2103 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2104 "device names, and then use those names directly."
2108 #: ../src/guestfs.pod:1051
2110 "Since those device names exist by definition, they will never be translated."
2114 #: ../src/guestfs.pod:1056
2116 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2117 "filesystem labels."
2121 #: ../src/guestfs.pod:1061
2126 #: ../src/guestfs.pod:1063
2128 "This section discusses security implications of using libguestfs, "
2129 "particularly with untrusted or malicious guests or disk images."
2133 #: ../src/guestfs.pod:1066
2134 msgid "GENERAL SECURITY CONSIDERATIONS"
2138 #: ../src/guestfs.pod:1068
2140 "Be careful with any files or data that you download from a guest (by "
2141 "\"download\" we mean not just the L</guestfs_download> command but any "
2142 "command that reads files, filenames, directories or anything else from a "
2143 "disk image). An attacker could manipulate the data to fool your program "
2144 "into doing the wrong thing. Consider cases such as:"
2148 #: ../src/guestfs.pod:1078
2149 msgid "the data (file etc) not being present"
2153 #: ../src/guestfs.pod:1082
2154 msgid "being present but empty"
2158 #: ../src/guestfs.pod:1086
2159 msgid "being much larger than normal"
2163 #: ../src/guestfs.pod:1090
2164 msgid "containing arbitrary 8 bit data"
2168 #: ../src/guestfs.pod:1094
2169 msgid "being in an unexpected character encoding"
2173 #: ../src/guestfs.pod:1098
2174 msgid "containing homoglyphs."
2178 #: ../src/guestfs.pod:1102
2179 msgid "SECURITY OF MOUNTING FILESYSTEMS"
2183 #: ../src/guestfs.pod:1104
2185 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
2186 "(VFS) module can sometimes be escalated into exploits by deliberately "
2187 "creating a malicious, malformed filesystem. These exploits are very severe "
2188 "for two reasons. Firstly there are very many filesystem drivers in the "
2189 "kernel, and many of them are infrequently used and not much developer "
2190 "attention has been paid to the code. Linux userspace helps potential "
2191 "crackers by detecting the filesystem type and automatically choosing the "
2192 "right VFS driver, even if that filesystem type is obscure or unexpected for "
2193 "the administrator. Secondly, a kernel-level exploit is like a local root "
2194 "exploit (worse in some ways), giving immediate and total access to the "
2195 "system right down to the hardware level."
2199 #: ../src/guestfs.pod:1117
2201 "That explains why you should never mount a filesystem from an untrusted "
2202 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
2203 "inside a qemu virtual machine, usually running as a non-root user. The "
2204 "attacker would need to write a filesystem which first exploited the kernel, "
2205 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
2206 "the libguestfs protocol, and finally to be as serious as the host kernel "
2207 "exploit it would need to escalate its privileges to root. This multi-step "
2208 "escalation, performed by a static piece of data, is thought to be extremely "
2209 "hard to do, although we never say 'never' about security issues."
2213 #: ../src/guestfs.pod:1128
2215 "In any case callers can reduce the attack surface by forcing the filesystem "
2216 "type when mounting (use L</guestfs_mount_vfs>)."
2220 #: ../src/guestfs.pod:1131
2221 msgid "PROTOCOL SECURITY"
2225 #: ../src/guestfs.pod:1133
2227 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
2228 "defined upper message size. However a program that uses libguestfs must "
2229 "also take care - for example you can write a program that downloads a binary "
2230 "from a disk image and executes it locally, and no amount of protocol "
2231 "security will save you from the consequences."
2235 #: ../src/guestfs.pod:1139
2236 msgid "INSPECTION SECURITY"
2240 #: ../src/guestfs.pod:1141
2242 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
2243 "directly from the guest, and these could contain any 8 bit data. Callers "
2244 "should be careful to escape these before printing them to a structured file "
2245 "(for example, use HTML escaping if creating a web page)."
2249 #: ../src/guestfs.pod:1147
2251 "Guest configuration may be altered in unusual ways by the administrator of "
2252 "the virtual machine, and may not reflect reality (particularly for untrusted "
2253 "or actively malicious guests). For example we parse the hostname from "
2254 "configuration files like C</etc/sysconfig/network> that we find in the "
2255 "guest, but the guest administrator can easily manipulate these files to "
2256 "provide the wrong hostname."
2260 #: ../src/guestfs.pod:1155
2262 "The inspection API parses guest configuration using two external libraries: "
2263 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
2264 "designed to be robust in the face of malicious data, although denial of "
2265 "service attacks are still possible, for example with oversized configuration "
2270 #: ../src/guestfs.pod:1161
2271 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
2275 #: ../src/guestfs.pod:1163
2277 "Be very cautious about running commands from the guest. By running a "
2278 "command in the guest, you are giving CPU time to a binary that you do not "
2279 "control, under the same user account as the library, albeit wrapped in qemu "
2280 "virtualization. More information and alternatives can be found in the "
2281 "section L</RUNNING COMMANDS>."
2285 #: ../src/guestfs.pod:1169
2286 msgid "CVE-2010-3851"
2290 #: ../src/guestfs.pod:1171
2291 msgid "https://bugzilla.redhat.com/642934"
2295 #: ../src/guestfs.pod:1173
2297 "This security bug concerns the automatic disk format detection that qemu "
2298 "does on disk images."
2302 #: ../src/guestfs.pod:1176
2304 "A raw disk image is just the raw bytes, there is no header. Other disk "
2305 "images like qcow2 contain a special header. Qemu deals with this by looking "
2306 "for one of the known headers, and if none is found then assuming the disk "
2307 "image must be raw."
2311 #: ../src/guestfs.pod:1181
2313 "This allows a guest which has been given a raw disk image to write some "
2314 "other header. At next boot (or when the disk image is accessed by "
2315 "libguestfs) qemu would do autodetection and think the disk image format was, "
2316 "say, qcow2 based on the header written by the guest."
2320 #: ../src/guestfs.pod:1186
2322 "This in itself would not be a problem, but qcow2 offers many features, one "
2323 "of which is to allow a disk image to refer to another image (called the "
2324 "\"backing disk\"). It does this by placing the path to the backing disk "
2325 "into the qcow2 header. This path is not validated and could point to any "
2326 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
2327 "\"holes\" in the qcow2 disk image, which of course is completely under the "
2328 "control of the attacker."
2332 #: ../src/guestfs.pod:1194
2334 "In libguestfs this is rather hard to exploit except under two circumstances:"
2338 #: ../src/guestfs.pod:1201
2339 msgid "You have enabled the network or have opened the disk in write mode."
2343 #: ../src/guestfs.pod:1205
2345 "You are also running untrusted code from the guest (see L</RUNNING "
2350 #: ../src/guestfs.pod:1210
2352 "The way to avoid this is to specify the expected disk format when adding "
2353 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
2354 "should always do this if the disk is raw format, and it's a good idea for "
2359 #: ../src/guestfs.pod:1215
2361 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
2362 "format is fetched from libvirt and passed through."
2366 #: ../src/guestfs.pod:1218
2368 "For libguestfs tools, use the I<--format> command line parameter as "
2373 #: ../src/guestfs.pod:1221
2374 msgid "CONNECTION MANAGEMENT"
2378 #: ../src/guestfs.pod:1223
2383 #: ../src/guestfs.pod:1225
2385 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
2386 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
2387 "handle and release all resources used."
2391 #: ../src/guestfs.pod:1229
2393 "For information on using multiple handles and threads, see the section L</"
2394 "MULTIPLE HANDLES AND MULTIPLE THREADS> below."
2398 #: ../src/guestfs.pod:1232
2399 msgid "guestfs_create"
2403 #: ../src/guestfs.pod:1234
2406 " guestfs_h *guestfs_create (void);\n"
2411 #: ../src/guestfs.pod:1236
2412 msgid "Create a connection handle."
2416 #: ../src/guestfs.pod:1238
2418 "You have to call L</guestfs_add_drive_opts> (or one of the equivalent calls) "
2419 "on the handle at least once."
2423 #: ../src/guestfs.pod:1241
2425 "This function returns a non-NULL pointer to a handle on success or NULL on "
2430 #: ../src/guestfs.pod:1244
2431 msgid "After configuring the handle, you have to call L</guestfs_launch>."
2435 #: ../src/guestfs.pod:1246
2437 "You may also want to configure error handling for the handle. See L</ERROR "
2438 "HANDLING> section below."
2442 #: ../src/guestfs.pod:1249
2443 msgid "guestfs_close"
2447 #: ../src/guestfs.pod:1251
2450 " void guestfs_close (guestfs_h *g);\n"
2455 #: ../src/guestfs.pod:1253
2456 msgid "This closes the connection handle and frees up all resources used."
2460 #: ../src/guestfs.pod:1255
2461 msgid "ERROR HANDLING"
2465 #: ../src/guestfs.pod:1257
2467 "API functions can return errors. For example, almost all functions that "
2468 "return C<int> will return C<-1> to indicate an error."
2472 #: ../src/guestfs.pod:1260
2474 "Additional information is available for errors: an error message string and "
2475 "optionally an error number (errno) if the thing that failed was a system "
2480 #: ../src/guestfs.pod:1264
2482 "You can get at the additional information about the last error on the handle "
2483 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
2484 "up an error handler with L</guestfs_set_error_handler>."
2488 #: ../src/guestfs.pod:1269
2490 "When the handle is created, a default error handler is installed which "
2491 "prints the error message string to C<stderr>. For small short-running "
2492 "command line programs it is sufficient to do:"
2496 #: ../src/guestfs.pod:1273
2499 " if (guestfs_launch (g) == -1)\n"
2500 " exit (EXIT_FAILURE);\n"
2505 #: ../src/guestfs.pod:1276
2507 "since the default error handler will ensure that an error message has been "
2508 "printed to C<stderr> before the program exits."
2512 #: ../src/guestfs.pod:1279
2514 "For other programs the caller will almost certainly want to install an "
2515 "alternate error handler or do error handling in-line like this:"
2519 #: ../src/guestfs.pod:1282
2522 " g = guestfs_create ();\n"
2527 #: ../src/guestfs.pod:1284
2530 " /* This disables the default behaviour of printing errors\n"
2532 " guestfs_set_error_handler (g, NULL, NULL);\n"
2537 #: ../src/guestfs.pod:1288
2540 " if (guestfs_launch (g) == -1) {\n"
2541 " /* Examine the error message and print it etc. */\n"
2542 " char *msg = guestfs_last_error (g);\n"
2543 " int errnum = guestfs_last_errno (g);\n"
2544 " fprintf (stderr, \"%s\\n\", msg);\n"
2551 #: ../src/guestfs.pod:1296
2553 "Out of memory errors are handled differently. The default action is to call "
2554 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
2555 "guestfs_set_out_of_memory_handler>."
2559 #: ../src/guestfs.pod:1300
2561 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
2562 "because there is no handle if this happens there is no way to get additional "
2563 "error information. However L</guestfs_create> is supposed to be a "
2564 "lightweight operation which can only fail because of insufficient memory (it "
2565 "returns NULL in this case)."
2569 #: ../src/guestfs.pod:1306
2570 msgid "guestfs_last_error"
2574 #: ../src/guestfs.pod:1308
2577 " const char *guestfs_last_error (guestfs_h *g);\n"
2582 #: ../src/guestfs.pod:1310
2584 "This returns the last error message that happened on C<g>. If there has not "
2585 "been an error since the handle was created, then this returns C<NULL>."
2589 #: ../src/guestfs.pod:1314
2591 "The lifetime of the returned string is until the next error occurs, or L</"
2592 "guestfs_close> is called."
2596 #: ../src/guestfs.pod:1317
2597 msgid "guestfs_last_errno"
2601 #: ../src/guestfs.pod:1319
2604 " int guestfs_last_errno (guestfs_h *g);\n"
2609 #: ../src/guestfs.pod:1321
2610 msgid "This returns the last error number (errno) that happened on C<g>."
2614 #: ../src/guestfs.pod:1323
2615 msgid "If successful, an errno integer not equal to zero is returned."
2619 #: ../src/guestfs.pod:1325
2621 "If no error, this returns 0. This call can return 0 in three situations:"
2625 #: ../src/guestfs.pod:1332
2626 msgid "There has not been any error on the handle."
2630 #: ../src/guestfs.pod:1336
2632 "There has been an error but the errno was meaningless. This corresponds to "
2633 "the case where the error did not come from a failed system call, but for "
2634 "some other reason."
2638 #: ../src/guestfs.pod:1342
2640 "There was an error from a failed system call, but for some reason the errno "
2641 "was not captured and returned. This usually indicates a bug in libguestfs."
2645 #: ../src/guestfs.pod:1348
2647 "Libguestfs tries to convert the errno from inside the applicance into a "
2648 "corresponding errno for the caller (not entirely trivial: the appliance "
2649 "might be running a completely different operating system from the library "
2650 "and error numbers are not standardized across Un*xen). If this could not be "
2651 "done, then the error is translated to C<EINVAL>. In practice this should "
2652 "only happen in very rare circumstances."
2656 #: ../src/guestfs.pod:1356
2657 msgid "guestfs_set_error_handler"
2661 #: ../src/guestfs.pod:1358
2664 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
2666 " const char *msg);\n"
2667 " void guestfs_set_error_handler (guestfs_h *g,\n"
2668 " guestfs_error_handler_cb cb,\n"
2674 #: ../src/guestfs.pod:1365
2676 "The callback C<cb> will be called if there is an error. The parameters "
2677 "passed to the callback are an opaque data pointer and the error message "
2682 #: ../src/guestfs.pod:1369
2684 "C<errno> is not passed to the callback. To get that the callback must call "
2685 "L</guestfs_last_errno>."
2689 #: ../src/guestfs.pod:1372
2691 "Note that the message string C<msg> is freed as soon as the callback "
2692 "function returns, so if you want to stash it somewhere you must make your "
2697 #: ../src/guestfs.pod:1376
2698 msgid "The default handler prints messages on C<stderr>."
2702 #: ../src/guestfs.pod:1378
2703 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
2707 #: ../src/guestfs.pod:1380
2708 msgid "guestfs_get_error_handler"
2712 #: ../src/guestfs.pod:1382
2715 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
2716 " void **opaque_rtn);\n"
2721 #: ../src/guestfs.pod:1385
2722 msgid "Returns the current error handler callback."
2726 #: ../src/guestfs.pod:1387
2727 msgid "guestfs_set_out_of_memory_handler"
2731 #: ../src/guestfs.pod:1389
2734 " typedef void (*guestfs_abort_cb) (void);\n"
2735 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
2736 " guestfs_abort_cb);\n"
2741 #: ../src/guestfs.pod:1393
2743 "The callback C<cb> will be called if there is an out of memory situation. "
2744 "I<Note this callback must not return>."
2748 #: ../src/guestfs.pod:1396
2749 msgid "The default is to call L<abort(3)>."
2753 #: ../src/guestfs.pod:1398
2755 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
2759 #: ../src/guestfs.pod:1401
2760 msgid "guestfs_get_out_of_memory_handler"
2764 #: ../src/guestfs.pod:1403
2767 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
2772 #: ../src/guestfs.pod:1405
2773 msgid "This returns the current out of memory handler."
2777 #: ../src/guestfs.pod:1407
2782 #: ../src/guestfs.pod:1409 ../fish/guestfish.pod:958
2787 #: ../src/guestfs.pod:1411
2792 #: ../src/guestfs.pod:1413
2797 #: ../src/guestfs.pod:1415
2798 msgid "AVAILABILITY"
2802 #: ../src/guestfs.pod:1417
2803 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
2807 #: ../src/guestfs.pod:1419
2809 "Using L</guestfs_available> you can test availability of the following "
2810 "groups of functions. This test queries the appliance to see if the "
2811 "appliance you are currently using supports the functionality."
2815 #: ../src/guestfs.pod:1424
2816 msgid "@AVAILABILITY@"
2820 #: ../src/guestfs.pod:1426
2821 msgid "GUESTFISH supported COMMAND"
2825 #: ../src/guestfs.pod:1428
2827 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
2828 "prints out the available groups and whether they are supported by this build "
2829 "of libguestfs. Note however that you have to do C<run> first."
2833 #: ../src/guestfs.pod:1433
2834 msgid "SINGLE CALLS AT COMPILE TIME"
2838 #: ../src/guestfs.pod:1435
2840 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
2841 "function, such as:"
2845 #: ../src/guestfs.pod:1438
2848 " #define LIBGUESTFS_HAVE_DD 1\n"
2853 #: ../src/guestfs.pod:1440
2854 msgid "if L</guestfs_dd> is available."
2858 #: ../src/guestfs.pod:1442
2860 "Before version 1.5.8, if you needed to test whether a single libguestfs "
2861 "function is available at compile time, we recommended using build tools such "
2862 "as autoconf or cmake. For example in autotools you could use:"
2866 #: ../src/guestfs.pod:1447
2869 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
2870 " AC_CHECK_FUNCS([guestfs_dd])\n"
2875 #: ../src/guestfs.pod:1450
2877 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
2882 #: ../src/guestfs.pod:1453
2883 msgid "SINGLE CALLS AT RUN TIME"
2887 #: ../src/guestfs.pod:1455
2889 "Testing at compile time doesn't guarantee that a function really exists in "
2890 "the library. The reason is that you might be dynamically linked against a "
2891 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
2892 "This situation unfortunately results in a segmentation fault, which is a "
2893 "shortcoming of the C dynamic linking system itself."
2897 #: ../src/guestfs.pod:1462
2899 "You can use L<dlopen(3)> to test if a function is available at run time, as "
2900 "in this example program (note that you still need the compile time check as "
2905 #: ../src/guestfs.pod:1466
2908 " #include <stdio.h>\n"
2909 " #include <stdlib.h>\n"
2910 " #include <unistd.h>\n"
2911 " #include <dlfcn.h>\n"
2912 " #include <guestfs.h>\n"
2917 #: ../src/guestfs.pod:1472
2922 " #ifdef LIBGUESTFS_HAVE_DD\n"
2924 " int has_function;\n"
2929 #: ../src/guestfs.pod:1478
2932 " /* Test if the function guestfs_dd is really available. */\n"
2933 " dl = dlopen (NULL, RTLD_LAZY);\n"
2935 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2936 " exit (EXIT_FAILURE);\n"
2938 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2944 #: ../src/guestfs.pod:1487
2947 " if (!has_function)\n"
2948 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2950 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2951 " /* Now it's safe to call\n"
2952 " guestfs_dd (g, \"foo\", \"bar\");\n"
2956 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2963 #: ../src/guestfs.pod:1500
2965 "You may think the above is an awful lot of hassle, and it is. There are "
2966 "other ways outside of the C linking system to ensure that this kind of "
2967 "incompatibility never arises, such as using package versioning:"
2971 #: ../src/guestfs.pod:1505
2974 " Requires: libguestfs >= 1.0.80\n"
2979 #: ../src/guestfs.pod:1507
2980 msgid "CALLS WITH OPTIONAL ARGUMENTS"
2984 #: ../src/guestfs.pod:1509
2986 "A recent feature of the API is the introduction of calls which take optional "
2987 "arguments. In C these are declared 3 ways. The main way is as a call which "
2988 "takes variable arguments (ie. C<...>), as in this example:"
2992 #: ../src/guestfs.pod:1514
2995 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
3000 #: ../src/guestfs.pod:1516
3002 "Call this with a list of optional arguments, terminated by C<-1>. So to "
3003 "call with no optional arguments specified:"
3007 #: ../src/guestfs.pod:1519
3010 " guestfs_add_drive_opts (g, filename, -1);\n"
3015 #: ../src/guestfs.pod:1521
3016 msgid "With a single optional argument:"
3020 #: ../src/guestfs.pod:1523
3023 " guestfs_add_drive_opts (g, filename,\n"
3024 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3030 #: ../src/guestfs.pod:1527
3035 #: ../src/guestfs.pod:1529
3038 " guestfs_add_drive_opts (g, filename,\n"
3039 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3040 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
3046 #: ../src/guestfs.pod:1534
3048 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
3053 #: ../src/guestfs.pod:1537
3054 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
3058 #: ../src/guestfs.pod:1539
3060 "The second variant has the same name with the suffix C<_va>, which works the "
3061 "same way but takes a C<va_list>. See the C manual for details. For the "
3062 "example function, this is declared:"
3066 #: ../src/guestfs.pod:1543
3069 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
3075 #: ../src/guestfs.pod:1546
3076 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
3080 #: ../src/guestfs.pod:1548
3082 "The third variant is useful where you need to construct these calls. You "
3083 "pass in a structure where you fill in the optional fields. The structure "
3084 "has a bitmask as the first element which you must set to indicate which "
3085 "fields you have filled in. For our example function the structure and call "
3090 #: ../src/guestfs.pod:1554
3093 " struct guestfs_add_drive_opts_argv {\n"
3094 " uint64_t bitmask;\n"
3096 " const char *format;\n"
3099 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
3100 " const struct guestfs_add_drive_opts_argv *optargs);\n"
3105 #: ../src/guestfs.pod:1563
3106 msgid "You could call it like this:"
3110 #: ../src/guestfs.pod:1565
3113 " struct guestfs_add_drive_opts_argv optargs = {\n"
3114 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
3115 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
3117 " .format = \"qcow2\"\n"
3123 #: ../src/guestfs.pod:1572
3126 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
3131 #: ../src/guestfs.pod:1574 ../src/guestfs-actions.pod:11
3132 #: ../src/guestfs-actions.pod:1844 ../fish/guestfish-actions.pod:9
3133 #: ../fish/guestfish-actions.pod:1255
3138 #: ../src/guestfs.pod:1580
3139 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
3143 #: ../src/guestfs.pod:1585
3144 msgid "You do not need to fill in all fields of the structure."
3148 #: ../src/guestfs.pod:1589
3150 "There must be a one-to-one correspondence between fields of the structure "
3151 "that are filled in, and bits set in the bitmask."
3155 #: ../src/guestfs.pod:1594
3156 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
3160 #: ../src/guestfs.pod:1596
3162 "In other languages, optional arguments are expressed in the way that is "
3163 "natural for that language. We refer you to the language-specific "
3164 "documentation for more details on that."
3168 #: ../src/guestfs.pod:1600
3169 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
3173 #: ../src/guestfs.pod:1602
3174 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
3178 #: ../src/guestfs.pod:1604
3180 "The child process generates events in some situations. Current events "
3181 "include: receiving a log message, the child process exits."
3185 #: ../src/guestfs.pod:1607
3187 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
3192 #: ../src/guestfs.pod:1610
3194 "Only I<one callback of each type> can be registered for each handle. "
3195 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
3196 "that type. Cancel all callbacks of this type by calling this function with "
3197 "C<cb> set to C<NULL>."
3201 #: ../src/guestfs.pod:1615
3202 msgid "guestfs_set_log_message_callback"
3206 #: ../src/guestfs.pod:1617
3209 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
3210 " char *buf, int len);\n"
3211 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
3212 " guestfs_log_message_cb cb,\n"
3218 #: ../src/guestfs.pod:1623
3220 "The callback function C<cb> will be called whenever qemu or the guest writes "
3221 "anything to the console."
3225 #: ../src/guestfs.pod:1626
3226 msgid "Use this function to capture kernel messages and similar."
3230 #: ../src/guestfs.pod:1628
3232 "Normally there is no log message handler, and log messages are just "
3237 #: ../src/guestfs.pod:1631
3238 msgid "guestfs_set_subprocess_quit_callback"
3242 #: ../src/guestfs.pod:1633
3245 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
3246 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
3247 " guestfs_subprocess_quit_cb cb,\n"
3253 #: ../src/guestfs.pod:1638
3255 "The callback function C<cb> will be called when the child process quits, "
3256 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
3257 "corresponds to a transition from any state to the CONFIG state)."
3261 #: ../src/guestfs.pod:1643
3262 msgid "guestfs_set_launch_done_callback"
3266 #: ../src/guestfs.pod:1645
3269 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
3270 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
3271 " guestfs_launch_done_cb cb,\n"
3277 #: ../src/guestfs.pod:1650
3279 "The callback function C<cb> will be called when the child process becomes "
3280 "ready first time after it has been launched. (This corresponds to a "
3281 "transition from LAUNCHING to the READY state)."
3285 #: ../src/guestfs.pod:1654
3286 msgid "guestfs_set_close_callback"
3290 #: ../src/guestfs.pod:1656
3293 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
3294 " void guestfs_set_close_callback (guestfs_h *g,\n"
3295 " guestfs_close_cb cb,\n"
3301 #: ../src/guestfs.pod:1661
3303 "The callback function C<cb> will be called while the handle is being closed "
3304 "(synchronously from L</guestfs_close>)."
3308 #: ../src/guestfs.pod:1664
3310 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
3311 "handles that are open when the program exits. This means that this callback "
3312 "might be called indirectly from L<exit(3)>, which can cause unexpected "
3313 "problems in higher-level languages (eg. if your HLL interpreter has already "
3314 "been cleaned up by the time this is called, and if your callback then jumps "
3315 "into some HLL function)."
3319 #: ../src/guestfs.pod:1672
3320 msgid "guestfs_set_progress_callback"
3324 #: ../src/guestfs.pod:1674
3327 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
3328 " int proc_nr, int serial,\n"
3329 " uint64_t position, uint64_t total);\n"
3330 " void guestfs_set_progress_callback (guestfs_h *g,\n"
3331 " guestfs_progress_cb cb,\n"
3337 #: ../src/guestfs.pod:1681
3339 "Some long-running operations can generate progress messages. If this "
3340 "callback is registered, then it will be called each time a progress message "
3341 "is generated (usually two seconds after the operation started, and three "
3342 "times per second thereafter until it completes, although the frequency may "
3343 "change in future versions)."
3347 #: ../src/guestfs.pod:1687
3349 "The callback receives two numbers: C<position> and C<total>. The units of "
3350 "C<total> are not defined, although for some operations C<total> may relate "
3351 "in some way to the amount of data to be transferred (eg. in bytes or "
3352 "megabytes), and C<position> may be the portion which has been transferred."
3356 #: ../src/guestfs.pod:1693
3357 msgid "The only defined and stable parts of the API are:"
3361 #: ../src/guestfs.pod:1699
3363 "The callback can display to the user some type of progress bar or indicator "
3364 "which shows the ratio of C<position>:C<total>."
3368 #: ../src/guestfs.pod:1704
3369 msgid "0 E<lt>= C<position> E<lt>= C<total>"
3373 #: ../src/guestfs.pod:1708
3375 "If any progress notification is sent during a call, then a final progress "
3376 "notification is always sent when C<position> = C<total>."
3380 #: ../src/guestfs.pod:1711
3382 "This is to simplify caller code, so callers can easily set the progress "
3383 "indicator to \"100%\" at the end of the operation, without requiring special "
3384 "code to detect this case."
3388 #: ../src/guestfs.pod:1717
3390 "The callback also receives the procedure number and serial number of the "
3391 "call. These are only useful for debugging protocol issues, and the callback "
3392 "can normally ignore them. The callback may want to print these numbers in "
3393 "error messages or debugging messages."
3397 #: ../src/guestfs.pod:1722
3398 msgid "PRIVATE DATA AREA"
3402 #: ../src/guestfs.pod:1724
3404 "You can attach named pieces of private data to the libguestfs handle, and "
3405 "fetch them by name for the lifetime of the handle. This is called the "
3406 "private data area and is only available from the C API."
3410 #: ../src/guestfs.pod:1728
3411 msgid "To attach a named piece of data, use the following call:"
3415 #: ../src/guestfs.pod:1730
3418 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
3423 #: ../src/guestfs.pod:1732
3425 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
3426 "pointer (which can be C<NULL>). Any previous item with the same name is "
3431 #: ../src/guestfs.pod:1736
3433 "You can use any C<key> you want, but names beginning with an underscore "
3434 "character are reserved for internal libguestfs purposes (for implementing "
3435 "language bindings). It is recommended to prefix the name with some unique "
3436 "string to avoid collisions with other users."
3440 #: ../src/guestfs.pod:1741
3441 msgid "To retrieve the pointer, use:"
3445 #: ../src/guestfs.pod:1743
3448 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
3453 #: ../src/guestfs.pod:1745
3455 "This function returns C<NULL> if either no data is found associated with "
3456 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
3461 #: ../src/guestfs.pod:1749
3463 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
3464 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
3465 "all. In particular, libguestfs does I<not> try to free the data when the "
3466 "handle is closed. If the data must be freed, then the caller must either "
3467 "free it before calling L</guestfs_close> or must set up a close callback to "
3468 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
3469 "can be registered for a handle)."
3473 #: ../src/guestfs.pod:1757
3475 "The private data area is implemented using a hash table, and should be "
3476 "reasonably efficient for moderate numbers of keys."
3480 #: ../src/guestfs.pod:1760 ../src/guestfs.pod:1765
3485 #: ../src/guestfs.pod:1762
3487 "<!-- old anchor for the next section --> <a name="
3488 "\"state_machine_and_low_level_event_api\"/>"
3492 #: ../src/guestfs.pod:1767
3493 msgid "ARCHITECTURE"
3497 #: ../src/guestfs.pod:1769
3499 "Internally, libguestfs is implemented by running an appliance (a special "
3500 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
3501 "process of the main program."
3505 #: ../src/guestfs.pod:1773
3508 " ___________________\n"
3510 " | main program |\n"
3512 " | | child process / appliance\n"
3513 " | | __________________________\n"
3515 " +-------------------+ RPC | +-----------------+ |\n"
3516 " | libguestfs <--------------------> guestfsd | |\n"
3517 " | | | +-----------------+ |\n"
3518 " \\___________________/ | | Linux kernel | |\n"
3519 " | +--^--------------+ |\n"
3520 " \\_________|________________/\n"
3526 " \\______________/\n"
3531 #: ../src/guestfs.pod:1793
3533 "The library, linked to the main program, creates the child process and hence "
3534 "the appliance in the L</guestfs_launch> function."
3538 #: ../src/guestfs.pod:1796
3540 "Inside the appliance is a Linux kernel and a complete stack of userspace "
3541 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
3542 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
3543 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
3544 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
3545 "attached to the qemu process which translates device access by the "
3546 "appliance's Linux kernel into accesses to the image."
3550 #: ../src/guestfs.pod:1805
3552 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
3553 "Although the disk image you are attached to might also be used by some "
3554 "virtual machine, libguestfs doesn't know or care about this. (But you will "
3555 "care if both libguestfs's qemu process and your virtual machine are trying "
3556 "to update the disk image at the same time, since these usually results in "
3557 "massive disk corruption)."
3561 #: ../src/guestfs.pod:1812
3562 msgid "STATE MACHINE"
3566 #: ../src/guestfs.pod:1814
3567 msgid "libguestfs uses a state machine to model the child process:"
3571 #: ../src/guestfs.pod:1816
3583 " / | \\ \\ guestfs_launch\n"
3584 " / | _\\__V______\n"
3586 " / | | LAUNCHING |\n"
3587 " / | \\___________/\n"
3589 " / | guestfs_launch\n"
3591 " ______ / __|____V\n"
3592 " / \\ ------> / \\\n"
3593 " | BUSY | | READY |\n"
3594 " \\______/ <------ \\________/\n"
3599 #: ../src/guestfs.pod:1838
3601 "The normal transitions are (1) CONFIG (when the handle is created, but there "
3602 "is no child process), (2) LAUNCHING (when the child process is booting up), "
3603 "(3) alternating between READY and BUSY as commands are issued to, and "
3604 "carried out by, the child process."
3608 #: ../src/guestfs.pod:1843
3610 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
3611 "asynchronously at any time (eg. due to some internal error), and that causes "
3612 "the state to transition back to CONFIG."
3616 #: ../src/guestfs.pod:1847
3618 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
3619 "issued when in the CONFIG state."
3623 #: ../src/guestfs.pod:1850
3625 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
3626 "L</guestfs_launch> blocks until the child process is READY to accept "
3627 "commands (or until some failure or timeout). L</guestfs_launch> internally "
3628 "moves the state from CONFIG to LAUNCHING while it is running."
3632 #: ../src/guestfs.pod:1856
3634 "API actions such as L</guestfs_mount> can only be issued when in the READY "
3635 "state. These API calls block waiting for the command to be carried out (ie. "
3636 "the state to transition to BUSY and then back to READY). There are no non-"
3637 "blocking versions, and no way to issue more than one command per handle at "
3642 #: ../src/guestfs.pod:1862
3644 "Finally, the child process sends asynchronous messages back to the main "
3645 "program, such as kernel log messages. You can register a callback to "
3646 "receive these messages."
3650 #: ../src/guestfs.pod:1866
3655 #: ../src/guestfs.pod:1868
3656 msgid "COMMUNICATION PROTOCOL"
3660 #: ../src/guestfs.pod:1870
3662 "Don't rely on using this protocol directly. This section documents how it "
3663 "currently works, but it may change at any time."
3667 #: ../src/guestfs.pod:1873
3669 "The protocol used to talk between the library and the daemon running inside "
3670 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
3671 "1014, RFC 1832, RFC 4506)."
3675 #: ../src/guestfs.pod:1877
3677 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
3678 "this file is automatically generated)."
3682 #: ../src/guestfs.pod:1880
3684 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
3685 "and C<FileOut> parameters, which are handled with very simple request/reply "
3686 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
3687 "parameters, which use the same request and reply messages, but they may also "
3688 "be followed by files sent using a chunked encoding."
3692 #: ../src/guestfs.pod:1887
3693 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
3697 #: ../src/guestfs.pod:1889
3698 msgid "For ordinary functions, the request message is:"
3702 #: ../src/guestfs.pod:1891
3705 " total length (header + arguments,\n"
3706 " but not including the length word itself)\n"
3707 " struct guestfs_message_header (encoded as XDR)\n"
3708 " struct guestfs_<foo>_args (encoded as XDR)\n"
3713 #: ../src/guestfs.pod:1896
3715 "The total length field allows the daemon to allocate a fixed size buffer "
3716 "into which it slurps the rest of the message. As a result, the total length "
3717 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
3718 "effective size of any request is limited to somewhere under this size."
3722 #: ../src/guestfs.pod:1902
3724 "Note also that many functions don't take any arguments, in which case the "
3725 "C<guestfs_I<foo>_args> is completely omitted."
3729 #: ../src/guestfs.pod:1905
3731 "The header contains the procedure number (C<guestfs_proc>) which is how the "
3732 "receiver knows what type of args structure to expect, or none at all."
3736 #: ../src/guestfs.pod:1909
3738 "For functions that take optional arguments, the optional arguments are "
3739 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
3740 "arguments. A bitmask in the header indicates which optional arguments are "
3741 "meaningful. The bitmask is also checked to see if it contains bits set "
3742 "which the daemon does not know about (eg. if more optional arguments were "
3743 "added in a later version of the library), and this causes the call to be "
3748 #: ../src/guestfs.pod:1917
3749 msgid "The reply message for ordinary functions is:"
3753 #: ../src/guestfs.pod:1919
3756 " total length (header + ret,\n"
3757 " but not including the length word itself)\n"
3758 " struct guestfs_message_header (encoded as XDR)\n"
3759 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3764 #: ../src/guestfs.pod:1924
3766 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
3767 "functions that return no formal return values."
3771 #: ../src/guestfs.pod:1927
3773 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
3777 #: ../src/guestfs.pod:1930
3779 "In the case of an error, a flag is set in the header, and the reply message "
3780 "is slightly changed:"
3784 #: ../src/guestfs.pod:1933
3787 " total length (header + error,\n"
3788 " but not including the length word itself)\n"
3789 " struct guestfs_message_header (encoded as XDR)\n"
3790 " struct guestfs_message_error (encoded as XDR)\n"
3795 #: ../src/guestfs.pod:1938
3797 "The C<guestfs_message_error> structure contains the error message as a "
3802 #: ../src/guestfs.pod:1941
3803 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
3807 #: ../src/guestfs.pod:1943
3809 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
3810 "The normal request message is sent (see above). However this is followed by "
3811 "a sequence of file chunks."
3815 #: ../src/guestfs.pod:1947
3818 " total length (header + arguments,\n"
3819 " but not including the length word itself,\n"
3820 " and not including the chunks)\n"
3821 " struct guestfs_message_header (encoded as XDR)\n"
3822 " struct guestfs_<foo>_args (encoded as XDR)\n"
3823 " sequence of chunks for FileIn param #0\n"
3824 " sequence of chunks for FileIn param #1 etc.\n"
3829 #: ../src/guestfs.pod:1955
3830 msgid "The \"sequence of chunks\" is:"
3834 #: ../src/guestfs.pod:1957
3837 " length of chunk (not including length word itself)\n"
3838 " struct guestfs_chunk (encoded as XDR)\n"
3839 " length of chunk\n"
3840 " struct guestfs_chunk (encoded as XDR)\n"
3842 " length of chunk\n"
3843 " struct guestfs_chunk (with data.data_len == 0)\n"
3848 #: ../src/guestfs.pod:1965
3850 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
3851 "is set in the final chunk to indicate either successful completion or early "
3856 #: ../src/guestfs.pod:1969
3858 "At time of writing there are no functions that have more than one FileIn "
3859 "parameter. However this is (theoretically) supported, by sending the "
3860 "sequence of chunks for each FileIn parameter one after another (from left to "
3865 #: ../src/guestfs.pod:1974
3867 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
3868 "transfer. The library does this by sending a chunk with a special flag set "
3869 "to indicate cancellation. When the daemon sees this, it cancels the whole "
3870 "RPC, does I<not> send any reply, and goes back to reading the next request."
3874 #: ../src/guestfs.pod:1980
3876 "The daemon may also cancel. It does this by writing a special word "
3877 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
3878 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
3879 "cancel chunk). The special word is chosen so that even if cancellation "
3880 "happens right at the end of the transfer (after the library has finished "
3881 "writing and has started listening for the reply), the \"spurious\" cancel "
3882 "flag will not be confused with the reply message."
3886 #: ../src/guestfs.pod:1989
3888 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
3889 "limit), and also files where the size is not known in advance (eg. from "
3890 "pipes or sockets). However the chunks are rather small "
3891 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
3892 "to keep much in memory."
3896 #: ../src/guestfs.pod:1995
3897 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
3901 #: ../src/guestfs.pod:1997
3903 "The protocol for FileOut parameters is exactly the same as for FileIn "
3904 "parameters, but with the roles of daemon and library reversed."
3908 #: ../src/guestfs.pod:2000
3911 " total length (header + ret,\n"
3912 " but not including the length word itself,\n"
3913 " and not including the chunks)\n"
3914 " struct guestfs_message_header (encoded as XDR)\n"
3915 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3916 " sequence of chunks for FileOut param #0\n"
3917 " sequence of chunks for FileOut param #1 etc.\n"
3922 #: ../src/guestfs.pod:2008
3923 msgid "INITIAL MESSAGE"
3927 #: ../src/guestfs.pod:2010
3929 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
3930 "which indicates that the guest and daemon is alive. This is what L</"
3931 "guestfs_launch> waits for."
3935 #: ../src/guestfs.pod:2014
3936 msgid "PROGRESS NOTIFICATION MESSAGES"
3940 #: ../src/guestfs.pod:2016
3942 "The daemon may send progress notification messages at any time. These are "
3943 "distinguished by the normal length word being replaced by "
3944 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
3948 #: ../src/guestfs.pod:2020
3950 "The library turns them into progress callbacks (see "
3951 "C<guestfs_set_progress_callback>) if there is a callback registered, or "
3952 "discards them if not."
3956 #: ../src/guestfs.pod:2024
3958 "The daemon self-limits the frequency of progress messages it sends (see "
3959 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
3964 #: ../src/guestfs.pod:2028
3965 msgid "LIBGUESTFS VERSION NUMBERS"
3969 #: ../src/guestfs.pod:2030
3971 "Since April 2010, libguestfs has started to make separate development and "
3972 "stable releases, along with corresponding branches in our git repository. "
3973 "These separate releases can be identified by version number:"
3977 #: ../src/guestfs.pod:2035
3980 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
3981 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3987 " | `-------- sub-version\n"
3989 " `------ always '1' because we don't change the ABI\n"
3994 #: ../src/guestfs.pod:2046
3995 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3999 #: ../src/guestfs.pod:2048
4001 "As time passes we cherry pick fixes from the development branch and backport "
4002 "those into the stable branch, the effect being that the stable branch should "
4003 "get more stable and less buggy over time. So the stable releases are ideal "
4004 "for people who don't need new features but would just like the software to "
4009 #: ../src/guestfs.pod:2054
4010 msgid "Our criteria for backporting changes are:"
4014 #: ../src/guestfs.pod:2060
4016 "Documentation changes which don't affect any code are backported unless the "
4017 "documentation refers to a future feature which is not in stable."
4021 #: ../src/guestfs.pod:2066
4023 "Bug fixes which are not controversial, fix obvious problems, and have been "
4024 "well tested are backported."
4028 #: ../src/guestfs.pod:2071
4030 "Simple rearrangements of code which shouldn't affect how it works get "
4031 "backported. This is so that the code in the two branches doesn't get too "
4032 "far out of step, allowing us to backport future fixes more easily."
4036 #: ../src/guestfs.pod:2077
4038 "We I<don't> backport new features, new APIs, new tools etc, except in one "
4039 "exceptional case: the new feature is required in order to implement an "
4040 "important bug fix."
4044 #: ../src/guestfs.pod:2083
4046 "A new stable branch starts when we think the new features in development are "
4047 "substantial and compelling enough over the current stable branch to warrant "
4048 "it. When that happens we create new stable and development versions 1.N.0 "
4049 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
4050 "stable at this point, but by backporting fixes from development, that branch "
4051 "will stabilize over time."
4055 #: ../src/guestfs.pod:2091 ../fish/guestfish.pod:965
4056 #: ../test-tool/libguestfs-test-tool.pod:104
4057 msgid "ENVIRONMENT VARIABLES"
4061 #: ../src/guestfs.pod:2095 ../fish/guestfish.pod:991
4062 msgid "LIBGUESTFS_APPEND"
4066 #: ../src/guestfs.pod:2097 ../fish/guestfish.pod:993
4067 msgid "Pass additional options to the guest kernel."
4071 #: ../src/guestfs.pod:2099 ../fish/guestfish.pod:995
4072 msgid "LIBGUESTFS_DEBUG"
4076 #: ../src/guestfs.pod:2101
4078 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
4079 "effect as calling C<guestfs_set_verbose (g, 1)>."
4083 #: ../src/guestfs.pod:2104 ../fish/guestfish.pod:1000
4084 msgid "LIBGUESTFS_MEMSIZE"
4088 #: ../src/guestfs.pod:2106 ../fish/guestfish.pod:1002
4090 "Set the memory allocated to the qemu process, in megabytes. For example:"
4094 #: ../src/guestfs.pod:2109 ../fish/guestfish.pod:1005
4097 " LIBGUESTFS_MEMSIZE=700\n"
4102 #: ../src/guestfs.pod:2111 ../fish/guestfish.pod:1007
4103 msgid "LIBGUESTFS_PATH"
4107 #: ../src/guestfs.pod:2113
4109 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
4110 "the discussion of paths in section PATH above."
4114 #: ../src/guestfs.pod:2116 ../fish/guestfish.pod:1012
4115 msgid "LIBGUESTFS_QEMU"
4119 #: ../src/guestfs.pod:2118 ../fish/guestfish.pod:1014
4121 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
4122 "which was found at compile time by the configure script is used."
4126 #: ../src/guestfs.pod:2122
4127 msgid "See also L</QEMU WRAPPERS> above."
4131 #: ../src/guestfs.pod:2124 ../fish/guestfish.pod:1018
4132 msgid "LIBGUESTFS_TRACE"
4136 #: ../src/guestfs.pod:2126
4138 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
4139 "effect as calling C<guestfs_set_trace (g, 1)>."
4143 #: ../src/guestfs.pod:2129 ../fish/guestfish.pod:1027
4148 #: ../src/guestfs.pod:2131 ../fish/guestfish.pod:1029
4149 msgid "Location of temporary directory, defaults to C</tmp>."
4153 #: ../src/guestfs.pod:2133 ../fish/guestfish.pod:1031
4155 "If libguestfs was compiled to use the supermin appliance then the real "
4156 "appliance is cached in this directory, shared between all handles belonging "
4157 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
4158 "use in case C</tmp> is not large enough."
4162 #: ../src/guestfs.pod:2141 ../fish/guestfish.pod:1089
4163 #: ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:233
4168 #: ../src/guestfs.pod:2143
4170 "L<guestfs-examples(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, L<guestfs-"
4171 "ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-df(1)>, "
4172 "L<virt-edit(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-"
4173 "filesystems(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)"
4174 ">, L<virt-rescue(1)>, L<virt-tar(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
4175 "L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
4179 #: ../src/guestfs.pod:2166
4181 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
4182 "(8)>, L<disktype(1)>."
4186 #: ../src/guestfs.pod:2173
4191 #: ../src/guestfs.pod:2175
4192 msgid "To get a list of bugs against libguestfs use this link:"
4196 #: ../src/guestfs.pod:2177
4198 "L<https://bugzilla.redhat.com/buglist.cgi?"
4199 "component=libguestfs&product=Virtualization+Tools>"
4203 #: ../src/guestfs.pod:2179
4204 msgid "To report a new bug against libguestfs use this link:"
4208 #: ../src/guestfs.pod:2181
4210 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
4211 "component=libguestfs&product=Virtualization+Tools>"
4215 #: ../src/guestfs.pod:2183
4216 msgid "When reporting a bug, please check:"
4220 #: ../src/guestfs.pod:2189
4221 msgid "That the bug hasn't been reported already."
4225 #: ../src/guestfs.pod:2193
4226 msgid "That you are testing a recent version."
4230 #: ../src/guestfs.pod:2197
4231 msgid "Describe the bug accurately, and give a way to reproduce it."
4235 #: ../src/guestfs.pod:2201
4237 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
4242 #: ../src/guestfs.pod:2206 ../fish/guestfish.pod:1108
4243 #: ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:244
4248 #: ../src/guestfs.pod:2208 ../fish/guestfish.pod:1110
4249 #: ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:246
4250 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
4254 #: ../src/guestfs.pod:2210 ../fish/guestfish.pod:1112
4255 #: ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:248
4260 #: ../src/guestfs.pod:2212 ../fish/guestfish.pod:1114
4261 #: ../fuse/guestmount.pod:250
4262 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
4266 #: ../src/guestfs.pod:2215
4268 "This library is free software; you can redistribute it and/or modify it "
4269 "under the terms of the GNU Lesser General Public License as published by the "
4270 "Free Software Foundation; either version 2 of the License, or (at your "
4271 "option) any later version."
4275 #: ../src/guestfs.pod:2220
4277 "This library is distributed in the hope that it will be useful, but WITHOUT "
4278 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
4279 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
4284 #: ../src/guestfs.pod:2225
4286 "You should have received a copy of the GNU Lesser General Public License "
4287 "along with this library; if not, write to the Free Software Foundation, "
4288 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
4292 #: ../src/guestfs-actions.pod:1
4293 msgid "guestfs_add_cdrom"
4297 #: ../src/guestfs-actions.pod:3
4301 " guestfs_add_cdrom (guestfs_h *g,\n"
4302 " const char *filename);\n"
4307 #: ../src/guestfs-actions.pod:7 ../fish/guestfish-actions.pod:5
4308 msgid "This function adds a virtual CD-ROM disk image to the guest."
4312 #: ../src/guestfs-actions.pod:9 ../fish/guestfish-actions.pod:7
4313 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
4317 #: ../src/guestfs-actions.pod:17
4319 "This call checks for the existence of C<filename>. This stops you from "
4320 "specifying other types of drive which are supported by qemu such as C<nbd:> "
4321 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
4326 #: ../src/guestfs-actions.pod:24
4328 "If you just want to add an ISO file (often you use this as an efficient way "
4329 "to transfer large files into the guest), then you should probably use "
4330 "C<guestfs_add_drive_ro> instead."
4334 #: ../src/guestfs-actions.pod:30 ../src/guestfs-actions.pod:128
4335 #: ../src/guestfs-actions.pod:189 ../src/guestfs-actions.pod:226
4336 #: ../src/guestfs-actions.pod:240 ../src/guestfs-actions.pod:261
4337 #: ../src/guestfs-actions.pod:281 ../src/guestfs-actions.pod:295
4338 #: ../src/guestfs-actions.pod:410 ../src/guestfs-actions.pod:430
4339 #: ../src/guestfs-actions.pod:444 ../src/guestfs-actions.pod:489
4340 #: ../src/guestfs-actions.pod:517 ../src/guestfs-actions.pod:535
4341 #: ../src/guestfs-actions.pod:602 ../src/guestfs-actions.pod:635
4342 #: ../src/guestfs-actions.pod:649 ../src/guestfs-actions.pod:664
4343 #: ../src/guestfs-actions.pod:763 ../src/guestfs-actions.pod:781
4344 #: ../src/guestfs-actions.pod:795 ../src/guestfs-actions.pod:809
4345 #: ../src/guestfs-actions.pod:970 ../src/guestfs-actions.pod:990
4346 #: ../src/guestfs-actions.pod:1008 ../src/guestfs-actions.pod:1092
4347 #: ../src/guestfs-actions.pod:1110 ../src/guestfs-actions.pod:1129
4348 #: ../src/guestfs-actions.pod:1143 ../src/guestfs-actions.pod:1163
4349 #: ../src/guestfs-actions.pod:1233 ../src/guestfs-actions.pod:1264
4350 #: ../src/guestfs-actions.pod:1289 ../src/guestfs-actions.pod:1326
4351 #: ../src/guestfs-actions.pod:1432 ../src/guestfs-actions.pod:1466
4352 #: ../src/guestfs-actions.pod:1684 ../src/guestfs-actions.pod:1706
4353 #: ../src/guestfs-actions.pod:1793 ../src/guestfs-actions.pod:2243
4354 #: ../src/guestfs-actions.pod:2387 ../src/guestfs-actions.pod:2448
4355 #: ../src/guestfs-actions.pod:2483 ../src/guestfs-actions.pod:3222
4356 #: ../src/guestfs-actions.pod:3237 ../src/guestfs-actions.pod:3257
4357 #: ../src/guestfs-actions.pod:3410 ../src/guestfs-actions.pod:3424
4358 #: ../src/guestfs-actions.pod:3437 ../src/guestfs-actions.pod:3451
4359 #: ../src/guestfs-actions.pod:3466 ../src/guestfs-actions.pod:3502
4360 #: ../src/guestfs-actions.pod:3574 ../src/guestfs-actions.pod:3594
4361 #: ../src/guestfs-actions.pod:3611 ../src/guestfs-actions.pod:3634
4362 #: ../src/guestfs-actions.pod:3657 ../src/guestfs-actions.pod:3689
4363 #: ../src/guestfs-actions.pod:3708 ../src/guestfs-actions.pod:3727
4364 #: ../src/guestfs-actions.pod:3762 ../src/guestfs-actions.pod:3774
4365 #: ../src/guestfs-actions.pod:3810 ../src/guestfs-actions.pod:3826
4366 #: ../src/guestfs-actions.pod:3839 ../src/guestfs-actions.pod:3854
4367 #: ../src/guestfs-actions.pod:3871 ../src/guestfs-actions.pod:3964
4368 #: ../src/guestfs-actions.pod:3984 ../src/guestfs-actions.pod:3997
4369 #: ../src/guestfs-actions.pod:4048 ../src/guestfs-actions.pod:4066
4370 #: ../src/guestfs-actions.pod:4084 ../src/guestfs-actions.pod:4100
4371 #: ../src/guestfs-actions.pod:4114 ../src/guestfs-actions.pod:4128
4372 #: ../src/guestfs-actions.pod:4145 ../src/guestfs-actions.pod:4160
4373 #: ../src/guestfs-actions.pod:4180 ../src/guestfs-actions.pod:4224
4374 #: ../src/guestfs-actions.pod:4295 ../src/guestfs-actions.pod:4326
4375 #: ../src/guestfs-actions.pod:4345 ../src/guestfs-actions.pod:4364
4376 #: ../src/guestfs-actions.pod:4376 ../src/guestfs-actions.pod:4393
4377 #: ../src/guestfs-actions.pod:4406 ../src/guestfs-actions.pod:4421
4378 #: ../src/guestfs-actions.pod:4436 ../src/guestfs-actions.pod:4471
4379 #: ../src/guestfs-actions.pod:4486 ../src/guestfs-actions.pod:4506
4380 #: ../src/guestfs-actions.pod:4520 ../src/guestfs-actions.pod:4537
4381 #: ../src/guestfs-actions.pod:4586 ../src/guestfs-actions.pod:4623
4382 #: ../src/guestfs-actions.pod:4637 ../src/guestfs-actions.pod:4665
4383 #: ../src/guestfs-actions.pod:4682 ../src/guestfs-actions.pod:4700
4384 #: ../src/guestfs-actions.pod:4834 ../src/guestfs-actions.pod:4891
4385 #: ../src/guestfs-actions.pod:4913 ../src/guestfs-actions.pod:4931
4386 #: ../src/guestfs-actions.pod:4963 ../src/guestfs-actions.pod:5029
4387 #: ../src/guestfs-actions.pod:5046 ../src/guestfs-actions.pod:5059
4388 #: ../src/guestfs-actions.pod:5073 ../src/guestfs-actions.pod:5362
4389 #: ../src/guestfs-actions.pod:5381 ../src/guestfs-actions.pod:5395
4390 #: ../src/guestfs-actions.pod:5407 ../src/guestfs-actions.pod:5421
4391 #: ../src/guestfs-actions.pod:5433 ../src/guestfs-actions.pod:5447
4392 #: ../src/guestfs-actions.pod:5463 ../src/guestfs-actions.pod:5484
4393 #: ../src/guestfs-actions.pod:5503 ../src/guestfs-actions.pod:5522
4394 #: ../src/guestfs-actions.pod:5540 ../src/guestfs-actions.pod:5563
4395 #: ../src/guestfs-actions.pod:5581 ../src/guestfs-actions.pod:5600
4396 #: ../src/guestfs-actions.pod:5621 ../src/guestfs-actions.pod:5640
4397 #: ../src/guestfs-actions.pod:5657 ../src/guestfs-actions.pod:5685
4398 #: ../src/guestfs-actions.pod:5709 ../src/guestfs-actions.pod:5728
4399 #: ../src/guestfs-actions.pod:5752 ../src/guestfs-actions.pod:5767
4400 #: ../src/guestfs-actions.pod:5782 ../src/guestfs-actions.pod:5801
4401 #: ../src/guestfs-actions.pod:5838 ../src/guestfs-actions.pod:5861
4402 #: ../src/guestfs-actions.pod:5887 ../src/guestfs-actions.pod:5995
4403 #: ../src/guestfs-actions.pod:6116 ../src/guestfs-actions.pod:6128
4404 #: ../src/guestfs-actions.pod:6141 ../src/guestfs-actions.pod:6154
4405 #: ../src/guestfs-actions.pod:6176 ../src/guestfs-actions.pod:6189
4406 #: ../src/guestfs-actions.pod:6202 ../src/guestfs-actions.pod:6215
4407 #: ../src/guestfs-actions.pod:6230 ../src/guestfs-actions.pod:6289
4408 #: ../src/guestfs-actions.pod:6306 ../src/guestfs-actions.pod:6322
4409 #: ../src/guestfs-actions.pod:6338 ../src/guestfs-actions.pod:6355
4410 #: ../src/guestfs-actions.pod:6368 ../src/guestfs-actions.pod:6388
4411 #: ../src/guestfs-actions.pod:6424 ../src/guestfs-actions.pod:6438
4412 #: ../src/guestfs-actions.pod:6479 ../src/guestfs-actions.pod:6492
4413 #: ../src/guestfs-actions.pod:6510 ../src/guestfs-actions.pod:6544
4414 #: ../src/guestfs-actions.pod:6580 ../src/guestfs-actions.pod:6699
4415 #: ../src/guestfs-actions.pod:6717 ../src/guestfs-actions.pod:6731
4416 #: ../src/guestfs-actions.pod:6786 ../src/guestfs-actions.pod:6799
4417 #: ../src/guestfs-actions.pod:6844 ../src/guestfs-actions.pod:6877
4418 #: ../src/guestfs-actions.pod:6931 ../src/guestfs-actions.pod:6957
4419 #: ../src/guestfs-actions.pod:7023 ../src/guestfs-actions.pod:7042
4420 #: ../src/guestfs-actions.pod:7071
4421 msgid "This function returns 0 on success or -1 on error."
4425 #: ../src/guestfs-actions.pod:32 ../src/guestfs-actions.pod:242
4426 #: ../src/guestfs-actions.pod:263 ../fish/guestfish-actions.pod:28
4427 #: ../fish/guestfish-actions.pod:153 ../fish/guestfish-actions.pod:167
4429 "This function is deprecated. In new code, use the C<add_drive_opts> call "
4434 #: ../src/guestfs-actions.pod:35 ../src/guestfs-actions.pod:245
4435 #: ../src/guestfs-actions.pod:266 ../src/guestfs-actions.pod:1437
4436 #: ../src/guestfs-actions.pod:1923 ../src/guestfs-actions.pod:1944
4437 #: ../src/guestfs-actions.pod:4185 ../src/guestfs-actions.pod:6965
4438 #: ../src/guestfs-actions.pod:7134 ../fish/guestfish-actions.pod:31
4439 #: ../fish/guestfish-actions.pod:156 ../fish/guestfish-actions.pod:170
4440 #: ../fish/guestfish-actions.pod:951 ../fish/guestfish-actions.pod:1308
4441 #: ../fish/guestfish-actions.pod:1322 ../fish/guestfish-actions.pod:2818
4442 #: ../fish/guestfish-actions.pod:4620 ../fish/guestfish-actions.pod:4717
4444 "Deprecated functions will not be removed from the API, but the fact that "
4445 "they are deprecated indicates that there are problems with correct use of "
4450 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:130
4451 #: ../src/guestfs-actions.pod:1094 ../src/guestfs-actions.pod:1895
4452 #: ../src/guestfs-actions.pod:1993 ../src/guestfs-actions.pod:2096
4453 #: ../src/guestfs-actions.pod:3224 ../src/guestfs-actions.pod:3239
4454 #: ../src/guestfs-actions.pod:4473 ../src/guestfs-actions.pod:5542
4455 #: ../src/guestfs-actions.pod:5659 ../src/guestfs-actions.pod:5769
4456 #: ../src/guestfs-actions.pod:6232 ../src/guestfs-actions.pod:6357
4457 #: ../src/guestfs-actions.pod:6879
4458 msgid "(Added in 0.3)"
4462 #: ../src/guestfs-actions.pod:41
4463 msgid "guestfs_add_domain"
4467 #: ../src/guestfs-actions.pod:43
4471 " guestfs_add_domain (guestfs_h *g,\n"
4472 " const char *dom,\n"
4478 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:139
4479 #: ../src/guestfs-actions.pod:4199
4481 "You may supply a list of optional arguments to this call. Use zero or more "
4482 "of the following pairs of parameters, and terminate the list with C<-1> on "
4483 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
4487 #: ../src/guestfs-actions.pod:53
4490 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
4491 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
4492 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
4497 #: ../src/guestfs-actions.pod:57
4499 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
4500 "It works by connecting to libvirt, requesting the domain and domain XML from "
4501 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
4506 #: ../src/guestfs-actions.pod:62 ../fish/guestfish-actions.pod:46
4508 "The number of disks added is returned. This operation is atomic: if an "
4509 "error is returned, then no disks are added."
4513 #: ../src/guestfs-actions.pod:65 ../fish/guestfish-actions.pod:49
4515 "This function does some minimal checks to make sure the libvirt domain is "
4516 "not running (unless C<readonly> is true). In a future version we will try "
4517 "to acquire the libvirt lock on each disk."
4521 #: ../src/guestfs-actions.pod:69 ../fish/guestfish-actions.pod:53
4523 "Disks must be accessible locally. This often means that adding disks from a "
4524 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
4525 "unless those disks are accessible via the same device path locally too."
4529 #: ../src/guestfs-actions.pod:74
4531 "The optional C<libvirturi> parameter sets the libvirt URI (see L<http://"
4532 "libvirt.org/uri.html>). If this is not set then we connect to the default "
4533 "libvirt URI (or one set through an environment variable, see the libvirt "
4534 "documentation for full details). If you are using the C API directly then "
4535 "it is more flexible to create the libvirt connection object yourself, get "
4536 "the domain object, and call C<guestfs_add_libvirt_dom>."
4540 #: ../src/guestfs-actions.pod:82
4542 "The other optional parameters are passed directly through to "
4543 "C<guestfs_add_drive_opts>."
4547 #: ../src/guestfs-actions.pod:85 ../src/guestfs-actions.pod:338
4548 #: ../src/guestfs-actions.pod:503 ../src/guestfs-actions.pod:681
4549 #: ../src/guestfs-actions.pod:712 ../src/guestfs-actions.pod:730
4550 #: ../src/guestfs-actions.pod:749 ../src/guestfs-actions.pod:1309
4551 #: ../src/guestfs-actions.pod:1663 ../src/guestfs-actions.pod:1866
4552 #: ../src/guestfs-actions.pod:1965 ../src/guestfs-actions.pod:2005
4553 #: ../src/guestfs-actions.pod:2060 ../src/guestfs-actions.pod:2083
4554 #: ../src/guestfs-actions.pod:2374 ../src/guestfs-actions.pod:2662
4555 #: ../src/guestfs-actions.pod:2683 ../src/guestfs-actions.pod:4609
4556 #: ../src/guestfs-actions.pod:4737 ../src/guestfs-actions.pod:5143
4557 #: ../src/guestfs-actions.pod:5169 ../src/guestfs-actions.pod:6465
4558 #: ../src/guestfs-actions.pod:6890 ../src/guestfs-actions.pod:6903
4559 #: ../src/guestfs-actions.pod:6916
4560 msgid "On error this function returns -1."
4564 #: ../src/guestfs-actions.pod:87
4565 msgid "(Added in 1.7.4)"
4569 #: ../src/guestfs-actions.pod:89
4570 msgid "guestfs_add_domain_va"
4574 #: ../src/guestfs-actions.pod:91
4578 " guestfs_add_domain_va (guestfs_h *g,\n"
4579 " const char *dom,\n"
4585 #: ../src/guestfs-actions.pod:96
4586 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
4590 #: ../src/guestfs-actions.pod:98 ../src/guestfs-actions.pod:109
4591 #: ../src/guestfs-actions.pod:202 ../src/guestfs-actions.pod:213
4592 #: ../src/guestfs-actions.pod:4236 ../src/guestfs-actions.pod:4248
4593 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
4597 #: ../src/guestfs-actions.pod:100
4598 msgid "guestfs_add_domain_argv"
4602 #: ../src/guestfs-actions.pod:102
4606 " guestfs_add_domain_argv (guestfs_h *g,\n"
4607 " const char *dom,\n"
4608 " const struct guestfs_add_domain_argv *optargs);\n"
4613 #: ../src/guestfs-actions.pod:107
4614 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
4618 #: ../src/guestfs-actions.pod:111
4619 msgid "guestfs_add_drive"
4623 #: ../src/guestfs-actions.pod:113
4627 " guestfs_add_drive (guestfs_h *g,\n"
4628 " const char *filename);\n"
4633 #: ../src/guestfs-actions.pod:117
4635 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
4636 "optional parameters, so the disk is added writable, with the format being "
4637 "detected automatically."
4641 #: ../src/guestfs-actions.pod:121
4643 "Automatic detection of the format opens you up to a potential security hole "
4644 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4645 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
4646 "you should think about replacing calls to this function with calls to "
4647 "C<guestfs_add_drive_opts>, and specifying the format."
4651 #: ../src/guestfs-actions.pod:132
4652 msgid "guestfs_add_drive_opts"
4656 #: ../src/guestfs-actions.pod:134
4660 " guestfs_add_drive_opts (guestfs_h *g,\n"
4661 " const char *filename,\n"
4667 #: ../src/guestfs-actions.pod:144
4670 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
4671 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
4672 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
4677 #: ../src/guestfs-actions.pod:148 ../fish/guestfish-actions.pod:92
4679 "This function adds a virtual machine disk image C<filename> to libguestfs. "
4680 "The first time you call this function, the disk appears as C</dev/sda>, the "
4681 "second time as C</dev/sdb>, and so on."
4685 #: ../src/guestfs-actions.pod:153 ../fish/guestfish-actions.pod:97
4687 "You don't necessarily need to be root when using libguestfs. However you "
4688 "obviously do need sufficient permissions to access the filename for whatever "
4689 "operations you want to perform (ie. read access if you just want to read the "
4690 "image or write access if you want to modify the image)."
4694 #: ../src/guestfs-actions.pod:159 ../fish/guestfish-actions.pod:103
4695 msgid "This call checks that C<filename> exists."
4699 #: ../src/guestfs-actions.pod:161 ../src/guestfs-actions.pod:4209
4700 #: ../fish/guestfish-actions.pod:105 ../fish/guestfish-actions.pod:2829
4701 msgid "The optional arguments are:"
4705 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:109
4710 #: ../src/guestfs-actions.pod:167 ../fish/guestfish-actions.pod:111
4712 "If true then the image is treated as read-only. Writes are still allowed, "
4713 "but they are stored in a temporary snapshot overlay which is discarded at "
4714 "the end. The disk that you add is not modified."
4718 #: ../src/guestfs-actions.pod:171 ../fish/guestfish-actions.pod:115
4723 #: ../src/guestfs-actions.pod:173
4725 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
4726 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
4727 "Possible formats include C<raw> and C<qcow2>."
4731 #: ../src/guestfs-actions.pod:177 ../fish/guestfish-actions.pod:121
4733 "Automatic detection of the format opens you up to a potential security hole "
4734 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4735 "RHBZ#642934. Specifying the format closes this security hole."
4739 #: ../src/guestfs-actions.pod:182 ../fish/guestfish-actions.pod:126
4744 #: ../src/guestfs-actions.pod:184
4746 "This rarely-used option lets you emulate the behaviour of the deprecated "
4747 "C<guestfs_add_drive_with_if> call (q.v.)"
4751 #: ../src/guestfs-actions.pod:191
4752 msgid "(Added in 1.5.23)"
4756 #: ../src/guestfs-actions.pod:193
4757 msgid "guestfs_add_drive_opts_va"
4761 #: ../src/guestfs-actions.pod:195
4765 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
4766 " const char *filename,\n"
4772 #: ../src/guestfs-actions.pod:200
4773 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
4777 #: ../src/guestfs-actions.pod:204
4778 msgid "guestfs_add_drive_opts_argv"
4782 #: ../src/guestfs-actions.pod:206
4786 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
4787 " const char *filename,\n"
4788 " const struct guestfs_add_drive_opts_argv *optargs);\n"
4793 #: ../src/guestfs-actions.pod:211
4794 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
4798 #: ../src/guestfs-actions.pod:215
4799 msgid "guestfs_add_drive_ro"
4803 #: ../src/guestfs-actions.pod:217
4807 " guestfs_add_drive_ro (guestfs_h *g,\n"
4808 " const char *filename);\n"
4813 #: ../src/guestfs-actions.pod:221
4815 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
4816 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
4817 "disk is added read-only, with the format being detected automatically."
4821 #: ../src/guestfs-actions.pod:228
4822 msgid "(Added in 1.0.38)"
4826 #: ../src/guestfs-actions.pod:230
4827 msgid "guestfs_add_drive_ro_with_if"
4831 #: ../src/guestfs-actions.pod:232
4835 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
4836 " const char *filename,\n"
4837 " const char *iface);\n"
4842 #: ../src/guestfs-actions.pod:237
4844 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
4845 "QEMU interface emulation to use at run time."
4849 #: ../src/guestfs-actions.pod:249 ../src/guestfs-actions.pod:270
4850 #: ../src/guestfs-actions.pod:2333
4851 msgid "(Added in 1.0.84)"
4855 #: ../src/guestfs-actions.pod:251
4856 msgid "guestfs_add_drive_with_if"
4860 #: ../src/guestfs-actions.pod:253
4864 " guestfs_add_drive_with_if (guestfs_h *g,\n"
4865 " const char *filename,\n"
4866 " const char *iface);\n"
4871 #: ../src/guestfs-actions.pod:258
4873 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
4874 "QEMU interface emulation to use at run time."
4878 #: ../src/guestfs-actions.pod:272
4879 msgid "guestfs_aug_clear"
4883 #: ../src/guestfs-actions.pod:274
4887 " guestfs_aug_clear (guestfs_h *g,\n"
4888 " const char *augpath);\n"
4893 #: ../src/guestfs-actions.pod:278 ../fish/guestfish-actions.pod:178
4895 "Set the value associated with C<path> to C<NULL>. This is the same as the "
4896 "L<augtool(1)> C<clear> command."
4900 #: ../src/guestfs-actions.pod:283 ../src/guestfs-actions.pod:2085
4901 msgid "(Added in 1.3.4)"
4905 #: ../src/guestfs-actions.pod:285
4906 msgid "guestfs_aug_close"
4910 #: ../src/guestfs-actions.pod:287
4914 " guestfs_aug_close (guestfs_h *g);\n"
4919 #: ../src/guestfs-actions.pod:290
4921 "Close the current Augeas handle and free up any resources used by it. After "
4922 "calling this, you have to call C<guestfs_aug_init> again before you can use "
4923 "any other Augeas functions."
4927 #: ../src/guestfs-actions.pod:297 ../src/guestfs-actions.pod:322
4928 #: ../src/guestfs-actions.pod:340 ../src/guestfs-actions.pod:354
4929 #: ../src/guestfs-actions.pod:412 ../src/guestfs-actions.pod:432
4930 #: ../src/guestfs-actions.pod:446 ../src/guestfs-actions.pod:477
4931 #: ../src/guestfs-actions.pod:491 ../src/guestfs-actions.pod:505
4932 #: ../src/guestfs-actions.pod:519 ../src/guestfs-actions.pod:537
4933 #: ../src/guestfs-actions.pod:5220
4934 msgid "(Added in 0.7)"
4938 #: ../src/guestfs-actions.pod:299
4939 msgid "guestfs_aug_defnode"
4943 #: ../src/guestfs-actions.pod:301
4946 " struct guestfs_int_bool *\n"
4947 " guestfs_aug_defnode (guestfs_h *g,\n"
4948 " const char *name,\n"
4949 " const char *expr,\n"
4950 " const char *val);\n"
4955 #: ../src/guestfs-actions.pod:307 ../fish/guestfish-actions.pod:194
4957 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
4961 #: ../src/guestfs-actions.pod:310
4963 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
4964 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
4965 "containing that single node."
4969 #: ../src/guestfs-actions.pod:314 ../fish/guestfish-actions.pod:201
4971 "On success this returns a pair containing the number of nodes in the "
4972 "nodeset, and a boolean flag if a node was created."
4976 #: ../src/guestfs-actions.pod:318
4978 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
4979 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
4983 #: ../src/guestfs-actions.pod:324
4984 msgid "guestfs_aug_defvar"
4988 #: ../src/guestfs-actions.pod:326
4992 " guestfs_aug_defvar (guestfs_h *g,\n"
4993 " const char *name,\n"
4994 " const char *expr);\n"
4999 #: ../src/guestfs-actions.pod:331 ../fish/guestfish-actions.pod:209
5001 "Defines an Augeas variable C<name> whose value is the result of evaluating "
5002 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
5006 #: ../src/guestfs-actions.pod:335 ../fish/guestfish-actions.pod:213
5008 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
5009 "evaluates to something which is not a nodeset."
5013 #: ../src/guestfs-actions.pod:342
5014 msgid "guestfs_aug_get"
5018 #: ../src/guestfs-actions.pod:344
5022 " guestfs_aug_get (guestfs_h *g,\n"
5023 " const char *augpath);\n"
5028 #: ../src/guestfs-actions.pod:348 ../fish/guestfish-actions.pod:220
5030 "Look up the value associated with C<path>. If C<path> matches exactly one "
5031 "node, the C<value> is returned."
5035 #: ../src/guestfs-actions.pod:351 ../src/guestfs-actions.pod:851
5036 #: ../src/guestfs-actions.pod:869 ../src/guestfs-actions.pod:929
5037 #: ../src/guestfs-actions.pod:945 ../src/guestfs-actions.pod:1048
5038 #: ../src/guestfs-actions.pod:1178 ../src/guestfs-actions.pod:1195
5039 #: ../src/guestfs-actions.pod:1214 ../src/guestfs-actions.pod:1343
5040 #: ../src/guestfs-actions.pod:1534 ../src/guestfs-actions.pod:1646
5041 #: ../src/guestfs-actions.pod:1809 ../src/guestfs-actions.pod:1826
5042 #: ../src/guestfs-actions.pod:1917 ../src/guestfs-actions.pod:1938
5043 #: ../src/guestfs-actions.pod:2108 ../src/guestfs-actions.pod:2298
5044 #: ../src/guestfs-actions.pod:2505 ../src/guestfs-actions.pod:2586
5045 #: ../src/guestfs-actions.pod:2634 ../src/guestfs-actions.pod:2744
5046 #: ../src/guestfs-actions.pod:2775 ../src/guestfs-actions.pod:2799
5047 #: ../src/guestfs-actions.pod:2861 ../src/guestfs-actions.pod:2884
5048 #: ../src/guestfs-actions.pod:3396 ../src/guestfs-actions.pod:3746
5049 #: ../src/guestfs-actions.pod:3916 ../src/guestfs-actions.pod:4026
5050 #: ../src/guestfs-actions.pod:4755 ../src/guestfs-actions.pod:4948
5051 #: ../src/guestfs-actions.pod:5118 ../src/guestfs-actions.pod:5296
5052 #: ../src/guestfs-actions.pod:5345 ../src/guestfs-actions.pod:5908
5053 #: ../src/guestfs-actions.pod:5924 ../src/guestfs-actions.pod:5941
5054 #: ../src/guestfs-actions.pod:5965 ../src/guestfs-actions.pod:6639
5055 #: ../src/guestfs-actions.pod:6658 ../src/guestfs-actions.pod:6676
5056 #: ../src/guestfs-actions.pod:6856 ../src/guestfs-actions.pod:7128
5058 "This function returns a string, or NULL on error. I<The caller must free "
5059 "the returned string after use>."
5063 #: ../src/guestfs-actions.pod:356
5064 msgid "guestfs_aug_init"
5068 #: ../src/guestfs-actions.pod:358
5072 " guestfs_aug_init (guestfs_h *g,\n"
5073 " const char *root,\n"
5079 #: ../src/guestfs-actions.pod:363 ../fish/guestfish-actions.pod:227
5081 "Create a new Augeas handle for editing configuration files. If there was "
5082 "any previous Augeas handle associated with this guestfs session, then it is "
5087 #: ../src/guestfs-actions.pod:367
5088 msgid "You must call this before using any other C<guestfs_aug_*> commands."
5092 #: ../src/guestfs-actions.pod:370 ../fish/guestfish-actions.pod:234
5094 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
5098 #: ../src/guestfs-actions.pod:373 ../fish/guestfish-actions.pod:237
5100 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
5101 "logical I<or> of the following integers:"
5105 #: ../src/guestfs-actions.pod:379 ../fish/guestfish-actions.pod:243
5106 msgid "C<AUG_SAVE_BACKUP> = 1"
5110 #: ../src/guestfs-actions.pod:381 ../fish/guestfish-actions.pod:245
5111 msgid "Keep the original file with a C<.augsave> extension."
5115 #: ../src/guestfs-actions.pod:383 ../fish/guestfish-actions.pod:247
5116 msgid "C<AUG_SAVE_NEWFILE> = 2"
5120 #: ../src/guestfs-actions.pod:385 ../fish/guestfish-actions.pod:249
5122 "Save changes into a file with extension C<.augnew>, and do not overwrite "
5123 "original. Overrides C<AUG_SAVE_BACKUP>."
5127 #: ../src/guestfs-actions.pod:388 ../fish/guestfish-actions.pod:252
5128 msgid "C<AUG_TYPE_CHECK> = 4"
5132 #: ../src/guestfs-actions.pod:390 ../fish/guestfish-actions.pod:254
5133 msgid "Typecheck lenses (can be expensive)."
5137 #: ../src/guestfs-actions.pod:392 ../fish/guestfish-actions.pod:256
5138 msgid "C<AUG_NO_STDINC> = 8"
5142 #: ../src/guestfs-actions.pod:394 ../fish/guestfish-actions.pod:258
5143 msgid "Do not use standard load path for modules."
5147 #: ../src/guestfs-actions.pod:396 ../fish/guestfish-actions.pod:260
5148 msgid "C<AUG_SAVE_NOOP> = 16"
5152 #: ../src/guestfs-actions.pod:398 ../fish/guestfish-actions.pod:262
5153 msgid "Make save a no-op, just record what would have been changed."
5157 #: ../src/guestfs-actions.pod:400 ../fish/guestfish-actions.pod:264
5158 msgid "C<AUG_NO_LOAD> = 32"
5162 #: ../src/guestfs-actions.pod:402
5163 msgid "Do not load the tree in C<guestfs_aug_init>."
5167 #: ../src/guestfs-actions.pod:406
5168 msgid "To close the handle, you can call C<guestfs_aug_close>."
5172 #: ../src/guestfs-actions.pod:408 ../fish/guestfish-actions.pod:272
5173 msgid "To find out more about Augeas, see L<http://augeas.net/>."
5177 #: ../src/guestfs-actions.pod:414
5178 msgid "guestfs_aug_insert"
5182 #: ../src/guestfs-actions.pod:416
5186 " guestfs_aug_insert (guestfs_h *g,\n"
5187 " const char *augpath,\n"
5188 " const char *label,\n"
5194 #: ../src/guestfs-actions.pod:422 ../fish/guestfish-actions.pod:278
5196 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
5197 "or after C<path> (depending on the boolean flag C<before>)."
5201 #: ../src/guestfs-actions.pod:426 ../fish/guestfish-actions.pod:282
5203 "C<path> must match exactly one existing node in the tree, and C<label> must "
5204 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
5208 #: ../src/guestfs-actions.pod:434
5209 msgid "guestfs_aug_load"
5213 #: ../src/guestfs-actions.pod:436
5217 " guestfs_aug_load (guestfs_h *g);\n"
5222 #: ../src/guestfs-actions.pod:439 ../fish/guestfish-actions.pod:290
5223 msgid "Load files into the tree."
5227 #: ../src/guestfs-actions.pod:441 ../fish/guestfish-actions.pod:292
5228 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
5232 #: ../src/guestfs-actions.pod:448
5233 msgid "guestfs_aug_ls"
5237 #: ../src/guestfs-actions.pod:450
5241 " guestfs_aug_ls (guestfs_h *g,\n"
5242 " const char *augpath);\n"
5247 #: ../src/guestfs-actions.pod:454
5249 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
5250 "sorting the resulting nodes into alphabetical order."
5254 #: ../src/guestfs-actions.pod:457 ../src/guestfs-actions.pod:473
5255 #: ../src/guestfs-actions.pod:619 ../src/guestfs-actions.pod:1067
5256 #: ../src/guestfs-actions.pod:1358 ../src/guestfs-actions.pod:1377
5257 #: ../src/guestfs-actions.pod:1480 ../src/guestfs-actions.pod:1499
5258 #: ../src/guestfs-actions.pod:1748 ../src/guestfs-actions.pod:2178
5259 #: ../src/guestfs-actions.pod:2194 ../src/guestfs-actions.pod:2213
5260 #: ../src/guestfs-actions.pod:2256 ../src/guestfs-actions.pod:2280
5261 #: ../src/guestfs-actions.pod:2351 ../src/guestfs-actions.pod:2400
5262 #: ../src/guestfs-actions.pod:2611 ../src/guestfs-actions.pod:2818
5263 #: ../src/guestfs-actions.pod:3033 ../src/guestfs-actions.pod:3316
5264 #: ../src/guestfs-actions.pod:3378 ../src/guestfs-actions.pod:3483
5265 #: ../src/guestfs-actions.pod:3888 ../src/guestfs-actions.pod:4570
5266 #: ../src/guestfs-actions.pod:5090 ../src/guestfs-actions.pod:5216
5267 #: ../src/guestfs-actions.pod:5330 ../src/guestfs-actions.pod:5981
5268 #: ../src/guestfs-actions.pod:6042 ../src/guestfs-actions.pod:6097
5269 #: ../src/guestfs-actions.pod:6243 ../src/guestfs-actions.pod:6267
5270 #: ../src/guestfs-actions.pod:6749 ../src/guestfs-actions.pod:6769
5271 #: ../src/guestfs-actions.pod:6816 ../src/guestfs-actions.pod:6981
5272 #: ../src/guestfs-actions.pod:7000 ../src/guestfs-actions.pod:7085
5273 #: ../src/guestfs-actions.pod:7104 ../src/guestfs-actions.pod:7150
5274 #: ../src/guestfs-actions.pod:7169
5276 "This function returns a NULL-terminated array of strings (like L<environ(3)"
5277 ">), or NULL if there was an error. I<The caller must free the strings and "
5278 "the array after use>."
5282 #: ../src/guestfs-actions.pod:461 ../src/guestfs-actions.pod:992
5283 #: ../src/guestfs-actions.pod:1010 ../src/guestfs-actions.pod:1415
5284 #: ../src/guestfs-actions.pod:3111 ../src/guestfs-actions.pod:3142
5285 #: ../src/guestfs-actions.pod:3729 ../src/guestfs-actions.pod:3779
5286 #: ../src/guestfs-actions.pod:3966 ../src/guestfs-actions.pod:3999
5287 #: ../src/guestfs-actions.pod:4162 ../src/guestfs-actions.pod:4574
5288 #: ../src/guestfs-actions.pod:5031 ../src/guestfs-actions.pod:5409
5289 #: ../src/guestfs-actions.pod:5423 ../src/guestfs-actions.pod:5435
5290 #: ../src/guestfs-actions.pod:5843 ../src/guestfs-actions.pod:6481
5291 #: ../src/guestfs-actions.pod:6494 ../src/guestfs-actions.pod:6733
5292 #: ../src/guestfs-actions.pod:6936 ../src/guestfs-actions.pod:6969
5293 msgid "(Added in 0.8)"
5297 #: ../src/guestfs-actions.pod:463
5298 msgid "guestfs_aug_match"
5302 #: ../src/guestfs-actions.pod:465
5306 " guestfs_aug_match (guestfs_h *g,\n"
5307 " const char *augpath);\n"
5312 #: ../src/guestfs-actions.pod:469 ../fish/guestfish-actions.pod:306
5314 "Returns a list of paths which match the path expression C<path>. The "
5315 "returned paths are sufficiently qualified so that they match exactly one "
5316 "node in the current tree."
5320 #: ../src/guestfs-actions.pod:479
5321 msgid "guestfs_aug_mv"
5325 #: ../src/guestfs-actions.pod:481
5329 " guestfs_aug_mv (guestfs_h *g,\n"
5330 " const char *src,\n"
5331 " const char *dest);\n"
5336 #: ../src/guestfs-actions.pod:486 ../fish/guestfish-actions.pod:314
5338 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
5339 "C<dest> is overwritten if it exists."
5343 #: ../src/guestfs-actions.pod:493
5344 msgid "guestfs_aug_rm"
5348 #: ../src/guestfs-actions.pod:495
5352 " guestfs_aug_rm (guestfs_h *g,\n"
5353 " const char *augpath);\n"
5358 #: ../src/guestfs-actions.pod:499 ../fish/guestfish-actions.pod:321
5359 msgid "Remove C<path> and all of its children."
5363 #: ../src/guestfs-actions.pod:501 ../fish/guestfish-actions.pod:323
5364 msgid "On success this returns the number of entries which were removed."
5368 #: ../src/guestfs-actions.pod:507
5369 msgid "guestfs_aug_save"
5373 #: ../src/guestfs-actions.pod:509
5377 " guestfs_aug_save (guestfs_h *g);\n"
5382 #: ../src/guestfs-actions.pod:512 ../fish/guestfish-actions.pod:329
5383 msgid "This writes all pending changes to disk."
5387 #: ../src/guestfs-actions.pod:514
5389 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
5394 #: ../src/guestfs-actions.pod:521
5395 msgid "guestfs_aug_set"
5399 #: ../src/guestfs-actions.pod:523
5403 " guestfs_aug_set (guestfs_h *g,\n"
5404 " const char *augpath,\n"
5405 " const char *val);\n"
5410 #: ../src/guestfs-actions.pod:528 ../fish/guestfish-actions.pod:338
5411 msgid "Set the value associated with C<path> to C<val>."
5415 #: ../src/guestfs-actions.pod:530
5417 "In the Augeas API, it is possible to clear a node by setting the value to "
5418 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
5419 "this call. Instead you must use the C<guestfs_aug_clear> call."
5423 #: ../src/guestfs-actions.pod:539
5424 msgid "guestfs_available"
5428 #: ../src/guestfs-actions.pod:541
5432 " guestfs_available (guestfs_h *g,\n"
5433 " char *const *groups);\n"
5438 #: ../src/guestfs-actions.pod:545 ../fish/guestfish-actions.pod:349
5440 "This command is used to check the availability of some groups of "
5441 "functionality in the appliance, which not all builds of the libguestfs "
5442 "appliance will be able to provide."
5446 #: ../src/guestfs-actions.pod:549
5448 "The libguestfs groups, and the functions that those groups correspond to, "
5449 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
5450 "runtime by calling C<guestfs_available_all_groups>."
5454 #: ../src/guestfs-actions.pod:554 ../fish/guestfish-actions.pod:358
5456 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
5457 "\"]> would check for the availability of the Linux inotify functions and "
5458 "Augeas (configuration file editing) functions."
5462 #: ../src/guestfs-actions.pod:559 ../fish/guestfish-actions.pod:363
5463 msgid "The command returns no error if I<all> requested groups are available."
5467 #: ../src/guestfs-actions.pod:561 ../fish/guestfish-actions.pod:365
5469 "It fails with an error if one or more of the requested groups is unavailable "
5474 #: ../src/guestfs-actions.pod:564 ../fish/guestfish-actions.pod:368
5476 "If an unknown group name is included in the list of groups then an error is "
5481 #: ../src/guestfs-actions.pod:567 ../fish/guestfish-actions.pod:371
5486 #: ../src/guestfs-actions.pod:573
5487 msgid "You must call C<guestfs_launch> before calling this function."
5491 #: ../src/guestfs-actions.pod:575 ../fish/guestfish-actions.pod:379
5493 "The reason is because we don't know what groups are supported by the "
5494 "appliance/daemon until it is running and can be queried."
5498 #: ../src/guestfs-actions.pod:581 ../fish/guestfish-actions.pod:385
5500 "If a group of functions is available, this does not necessarily mean that "
5501 "they will work. You still have to check for errors when calling individual "
5502 "API functions even if they are available."
5506 #: ../src/guestfs-actions.pod:588 ../fish/guestfish-actions.pod:392
5508 "It is usually the job of distro packagers to build complete functionality "
5509 "into the libguestfs appliance. Upstream libguestfs, if built from source "
5510 "with all requirements satisfied, will support everything."
5514 #: ../src/guestfs-actions.pod:595
5516 "This call was added in version C<1.0.80>. In previous versions of "
5517 "libguestfs all you could do would be to speculatively execute a command to "
5518 "find out if the daemon implemented it. See also C<guestfs_version>."
5522 #: ../src/guestfs-actions.pod:604 ../src/guestfs-actions.pod:1165
5523 msgid "(Added in 1.0.80)"
5527 #: ../src/guestfs-actions.pod:606
5528 msgid "guestfs_available_all_groups"
5532 #: ../src/guestfs-actions.pod:608
5536 " guestfs_available_all_groups (guestfs_h *g);\n"
5541 #: ../src/guestfs-actions.pod:611
5543 "This command returns a list of all optional groups that this daemon knows "
5544 "about. Note this returns both supported and unsupported groups. To find "
5545 "out which ones the daemon can actually support you have to call "
5546 "C<guestfs_available> on each member of the returned list."
5550 #: ../src/guestfs-actions.pod:617
5551 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
5555 #: ../src/guestfs-actions.pod:623
5556 msgid "(Added in 1.3.15)"
5560 #: ../src/guestfs-actions.pod:625
5561 msgid "guestfs_base64_in"
5565 #: ../src/guestfs-actions.pod:627
5569 " guestfs_base64_in (guestfs_h *g,\n"
5570 " const char *base64file,\n"
5571 " const char *filename);\n"
5576 #: ../src/guestfs-actions.pod:632 ../fish/guestfish-actions.pod:422
5578 "This command uploads base64-encoded data from C<base64file> to C<filename>."
5582 #: ../src/guestfs-actions.pod:637 ../src/guestfs-actions.pod:651
5583 msgid "(Added in 1.3.5)"
5587 #: ../src/guestfs-actions.pod:639
5588 msgid "guestfs_base64_out"
5592 #: ../src/guestfs-actions.pod:641
5596 " guestfs_base64_out (guestfs_h *g,\n"
5597 " const char *filename,\n"
5598 " const char *base64file);\n"
5603 #: ../src/guestfs-actions.pod:646 ../fish/guestfish-actions.pod:431
5605 "This command downloads the contents of C<filename>, writing it out to local "
5606 "file C<base64file> encoded as base64."
5610 #: ../src/guestfs-actions.pod:653
5611 msgid "guestfs_blockdev_flushbufs"
5615 #: ../src/guestfs-actions.pod:655
5619 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
5620 " const char *device);\n"
5625 #: ../src/guestfs-actions.pod:659 ../fish/guestfish-actions.pod:440
5627 "This tells the kernel to flush internal buffers associated with C<device>."
5631 #: ../src/guestfs-actions.pod:662 ../src/guestfs-actions.pod:679
5632 #: ../src/guestfs-actions.pod:694 ../src/guestfs-actions.pod:710
5633 #: ../src/guestfs-actions.pod:728 ../src/guestfs-actions.pod:747
5634 #: ../src/guestfs-actions.pod:761 ../src/guestfs-actions.pod:779
5635 #: ../src/guestfs-actions.pod:793 ../src/guestfs-actions.pod:807
5636 #: ../fish/guestfish-actions.pod:443 ../fish/guestfish-actions.pod:454
5637 #: ../fish/guestfish-actions.pod:463 ../fish/guestfish-actions.pod:473
5638 #: ../fish/guestfish-actions.pod:485 ../fish/guestfish-actions.pod:498
5639 #: ../fish/guestfish-actions.pod:506 ../fish/guestfish-actions.pod:517
5640 #: ../fish/guestfish-actions.pod:525 ../fish/guestfish-actions.pod:533
5641 msgid "This uses the L<blockdev(8)> command."
5645 #: ../src/guestfs-actions.pod:666 ../src/guestfs-actions.pod:683
5646 #: ../src/guestfs-actions.pod:698 ../src/guestfs-actions.pod:714
5647 #: ../src/guestfs-actions.pod:732 ../src/guestfs-actions.pod:751
5648 #: ../src/guestfs-actions.pod:765 ../src/guestfs-actions.pod:783
5649 #: ../src/guestfs-actions.pod:797 ../src/guestfs-actions.pod:811
5650 msgid "(Added in 0.9.3)"
5654 #: ../src/guestfs-actions.pod:668
5655 msgid "guestfs_blockdev_getbsz"
5659 #: ../src/guestfs-actions.pod:670
5663 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
5664 " const char *device);\n"
5669 #: ../src/guestfs-actions.pod:674 ../fish/guestfish-actions.pod:449
5670 msgid "This returns the block size of a device."
5674 #: ../src/guestfs-actions.pod:676 ../src/guestfs-actions.pod:776
5675 #: ../fish/guestfish-actions.pod:451 ../fish/guestfish-actions.pod:514
5677 "(Note this is different from both I<size in blocks> and I<filesystem block "
5682 #: ../src/guestfs-actions.pod:685
5683 msgid "guestfs_blockdev_getro"
5687 #: ../src/guestfs-actions.pod:687
5691 " guestfs_blockdev_getro (guestfs_h *g,\n"
5692 " const char *device);\n"
5697 #: ../src/guestfs-actions.pod:691 ../fish/guestfish-actions.pod:460
5699 "Returns a boolean indicating if the block device is read-only (true if read-"
5700 "only, false if not)."
5704 #: ../src/guestfs-actions.pod:696 ../src/guestfs-actions.pod:1398
5705 #: ../src/guestfs-actions.pod:1413 ../src/guestfs-actions.pod:1893
5706 #: ../src/guestfs-actions.pod:1904 ../src/guestfs-actions.pod:1976
5707 #: ../src/guestfs-actions.pod:2031 ../src/guestfs-actions.pod:2046
5708 #: ../src/guestfs-actions.pod:2071 ../src/guestfs-actions.pod:2094
5709 #: ../src/guestfs-actions.pod:3050 ../src/guestfs-actions.pod:3064
5710 #: ../src/guestfs-actions.pod:3079 ../src/guestfs-actions.pod:3093
5711 #: ../src/guestfs-actions.pod:3109 ../src/guestfs-actions.pod:3124
5712 #: ../src/guestfs-actions.pod:3140 ../src/guestfs-actions.pod:3154
5713 #: ../src/guestfs-actions.pod:3167 ../src/guestfs-actions.pod:3181
5714 #: ../src/guestfs-actions.pod:3196 ../src/guestfs-actions.pod:3211
5715 #: ../src/guestfs-actions.pod:4719
5716 msgid "This function returns a C truth value on success or -1 on error."
5720 #: ../src/guestfs-actions.pod:700
5721 msgid "guestfs_blockdev_getsize64"
5725 #: ../src/guestfs-actions.pod:702
5729 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
5730 " const char *device);\n"
5735 #: ../src/guestfs-actions.pod:706 ../fish/guestfish-actions.pod:469
5736 msgid "This returns the size of the device in bytes."
5740 #: ../src/guestfs-actions.pod:708
5741 msgid "See also C<guestfs_blockdev_getsz>."
5745 #: ../src/guestfs-actions.pod:716
5746 msgid "guestfs_blockdev_getss"
5750 #: ../src/guestfs-actions.pod:718
5754 " guestfs_blockdev_getss (guestfs_h *g,\n"
5755 " const char *device);\n"
5760 #: ../src/guestfs-actions.pod:722 ../fish/guestfish-actions.pod:479
5762 "This returns the size of sectors on a block device. Usually 512, but can be "
5763 "larger for modern devices."
5767 #: ../src/guestfs-actions.pod:725
5769 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
5774 #: ../src/guestfs-actions.pod:734
5775 msgid "guestfs_blockdev_getsz"
5779 #: ../src/guestfs-actions.pod:736
5783 " guestfs_blockdev_getsz (guestfs_h *g,\n"
5784 " const char *device);\n"
5789 #: ../src/guestfs-actions.pod:740 ../fish/guestfish-actions.pod:491
5791 "This returns the size of the device in units of 512-byte sectors (even if "
5792 "the sectorsize isn't 512 bytes ... weird)."
5796 #: ../src/guestfs-actions.pod:743
5798 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
5799 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
5803 #: ../src/guestfs-actions.pod:753
5804 msgid "guestfs_blockdev_rereadpt"
5808 #: ../src/guestfs-actions.pod:755
5812 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
5813 " const char *device);\n"
5818 #: ../src/guestfs-actions.pod:759 ../fish/guestfish-actions.pod:504
5819 msgid "Reread the partition table on C<device>."
5823 #: ../src/guestfs-actions.pod:767
5824 msgid "guestfs_blockdev_setbsz"
5828 #: ../src/guestfs-actions.pod:769
5832 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
5833 " const char *device,\n"
5834 " int blocksize);\n"
5839 #: ../src/guestfs-actions.pod:774 ../fish/guestfish-actions.pod:512
5840 msgid "This sets the block size of a device."
5844 #: ../src/guestfs-actions.pod:785
5845 msgid "guestfs_blockdev_setro"
5849 #: ../src/guestfs-actions.pod:787
5853 " guestfs_blockdev_setro (guestfs_h *g,\n"
5854 " const char *device);\n"
5859 #: ../src/guestfs-actions.pod:791 ../fish/guestfish-actions.pod:523
5860 msgid "Sets the block device named C<device> to read-only."
5864 #: ../src/guestfs-actions.pod:799
5865 msgid "guestfs_blockdev_setrw"
5869 #: ../src/guestfs-actions.pod:801
5873 " guestfs_blockdev_setrw (guestfs_h *g,\n"
5874 " const char *device);\n"
5879 #: ../src/guestfs-actions.pod:805 ../fish/guestfish-actions.pod:531
5880 msgid "Sets the block device named C<device> to read-write."
5884 #: ../src/guestfs-actions.pod:813
5885 msgid "guestfs_case_sensitive_path"
5889 #: ../src/guestfs-actions.pod:815
5893 " guestfs_case_sensitive_path (guestfs_h *g,\n"
5894 " const char *path);\n"
5899 #: ../src/guestfs-actions.pod:819 ../fish/guestfish-actions.pod:539
5901 "This can be used to resolve case insensitive paths on a filesystem which is "
5902 "case sensitive. The use case is to resolve paths which you have read from "
5903 "Windows configuration files or the Windows Registry, to the true path."
5907 #: ../src/guestfs-actions.pod:824 ../fish/guestfish-actions.pod:544
5909 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
5910 "(and probably others), which is that although the underlying filesystem is "
5911 "case-insensitive, the driver exports the filesystem to Linux as case-"
5916 #: ../src/guestfs-actions.pod:829 ../fish/guestfish-actions.pod:549
5918 "One consequence of this is that special directories such as C<c:\\windows> "
5919 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
5920 "precise details of how they were created. In Windows itself this would not "
5925 #: ../src/guestfs-actions.pod:835 ../fish/guestfish-actions.pod:555
5927 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
5932 #: ../src/guestfs-actions.pod:838 ../fish/guestfish-actions.pod:558
5934 "This function resolves the true case of each element in the path and returns "
5935 "the case-sensitive path."
5939 #: ../src/guestfs-actions.pod:841
5941 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
5942 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
5943 "how the directories were originally created under Windows)."
5947 #: ../src/guestfs-actions.pod:846 ../fish/guestfish-actions.pod:566
5948 msgid "I<Note>: This function does not handle drive names, backslashes etc."
5952 #: ../src/guestfs-actions.pod:849
5953 msgid "See also C<guestfs_realpath>."
5957 #: ../src/guestfs-actions.pod:854 ../src/guestfs-actions.pod:6661
5958 msgid "(Added in 1.0.75)"
5962 #: ../src/guestfs-actions.pod:856
5967 #: ../src/guestfs-actions.pod:858
5971 " guestfs_cat (guestfs_h *g,\n"
5972 " const char *path);\n"
5977 #: ../src/guestfs-actions.pod:862 ../src/guestfs-actions.pod:5206
5978 #: ../fish/guestfish-actions.pod:575 ../fish/guestfish-actions.pod:3464
5979 msgid "Return the contents of the file named C<path>."
5983 #: ../src/guestfs-actions.pod:864
5985 "Note that this function cannot correctly handle binary files (specifically, "
5986 "files containing C<\\0> character which is treated as end of string). For "
5987 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
5988 "functions which have a more complex interface."
5992 #: ../src/guestfs-actions.pod:872 ../src/guestfs-actions.pod:1051
5993 #: ../src/guestfs-actions.pod:1071 ../src/guestfs-actions.pod:1362
5994 #: ../src/guestfs-actions.pod:1381 ../src/guestfs-actions.pod:1484
5995 #: ../src/guestfs-actions.pod:1503 ../src/guestfs-actions.pod:1752
5996 #: ../src/guestfs-actions.pod:2198 ../src/guestfs-actions.pod:2217
5997 #: ../src/guestfs-actions.pod:2260 ../src/guestfs-actions.pod:2284
5998 #: ../src/guestfs-actions.pod:2301 ../src/guestfs-actions.pod:2330
5999 #: ../src/guestfs-actions.pod:4988 ../src/guestfs-actions.pod:5014
6000 #: ../src/guestfs-actions.pod:5145 ../src/guestfs-actions.pod:5171
6001 #: ../src/guestfs-actions.pod:5195 ../src/guestfs-actions.pod:6046
6002 #: ../src/guestfs-actions.pod:6101 ../src/guestfs-actions.pod:6247
6003 #: ../src/guestfs-actions.pod:6271 ../src/guestfs-actions.pod:6933
6004 #: ../src/guestfs-actions.pod:6959 ../src/guestfs-actions.pod:6985
6005 #: ../src/guestfs-actions.pod:7004 ../src/guestfs-actions.pod:7089
6006 #: ../src/guestfs-actions.pod:7108 ../src/guestfs-actions.pod:7154
6007 #: ../src/guestfs-actions.pod:7173 ../fish/guestfish-actions.pod:582
6008 #: ../fish/guestfish-actions.pod:717 ../fish/guestfish-actions.pod:729
6009 #: ../fish/guestfish-actions.pod:905 ../fish/guestfish-actions.pod:915
6010 #: ../fish/guestfish-actions.pod:982 ../fish/guestfish-actions.pod:992
6011 #: ../fish/guestfish-actions.pod:1187 ../fish/guestfish-actions.pod:1482
6012 #: ../fish/guestfish-actions.pod:1492 ../fish/guestfish-actions.pod:1520
6013 #: ../fish/guestfish-actions.pod:1535 ../fish/guestfish-actions.pod:1545
6014 #: ../fish/guestfish-actions.pod:1564 ../fish/guestfish-actions.pod:3334
6015 #: ../fish/guestfish-actions.pod:3349 ../fish/guestfish-actions.pod:3425
6016 #: ../fish/guestfish-actions.pod:3442 ../fish/guestfish-actions.pod:3457
6017 #: ../fish/guestfish-actions.pod:4040 ../fish/guestfish-actions.pod:4086
6018 #: ../fish/guestfish-actions.pod:4171 ../fish/guestfish-actions.pod:4186
6019 #: ../fish/guestfish-actions.pod:4596 ../fish/guestfish-actions.pod:4614
6020 #: ../fish/guestfish-actions.pod:4631 ../fish/guestfish-actions.pod:4641
6021 #: ../fish/guestfish-actions.pod:4689 ../fish/guestfish-actions.pod:4699
6022 #: ../fish/guestfish-actions.pod:4728 ../fish/guestfish-actions.pod:4738
6024 "Because of the message protocol, there is a transfer limit of somewhere "
6025 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
6029 #: ../src/guestfs-actions.pod:875 ../src/guestfs-actions.pod:3320
6030 #: ../src/guestfs-actions.pod:3382 ../src/guestfs-actions.pod:3399
6031 #: ../src/guestfs-actions.pod:3487 ../src/guestfs-actions.pod:3892
6032 #: ../src/guestfs-actions.pod:3906 ../src/guestfs-actions.pod:5094
6033 #: ../src/guestfs-actions.pod:5108 ../src/guestfs-actions.pod:6820
6034 #: ../src/guestfs-actions.pod:6834
6035 msgid "(Added in 0.4)"
6039 #: ../src/guestfs-actions.pod:877
6040 msgid "guestfs_checksum"
6044 #: ../src/guestfs-actions.pod:879
6048 " guestfs_checksum (guestfs_h *g,\n"
6049 " const char *csumtype,\n"
6050 " const char *path);\n"
6055 #: ../src/guestfs-actions.pod:884 ../fish/guestfish-actions.pod:589
6057 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
6061 #: ../src/guestfs-actions.pod:887 ../fish/guestfish-actions.pod:592
6063 "The type of checksum to compute is given by the C<csumtype> parameter which "
6064 "must have one of the following values:"
6068 #: ../src/guestfs-actions.pod:892 ../fish/guestfish-actions.pod:597
6073 #: ../src/guestfs-actions.pod:894 ../fish/guestfish-actions.pod:599
6075 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
6080 #: ../src/guestfs-actions.pod:897 ../fish/guestfish-actions.pod:602
6085 #: ../src/guestfs-actions.pod:899 ../fish/guestfish-actions.pod:604
6086 msgid "Compute the MD5 hash (using the C<md5sum> program)."
6090 #: ../src/guestfs-actions.pod:901 ../fish/guestfish-actions.pod:606
6095 #: ../src/guestfs-actions.pod:903 ../fish/guestfish-actions.pod:608
6096 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
6100 #: ../src/guestfs-actions.pod:905 ../fish/guestfish-actions.pod:610
6105 #: ../src/guestfs-actions.pod:907 ../fish/guestfish-actions.pod:612
6106 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
6110 #: ../src/guestfs-actions.pod:909 ../fish/guestfish-actions.pod:614
6115 #: ../src/guestfs-actions.pod:911 ../fish/guestfish-actions.pod:616
6116 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
6120 #: ../src/guestfs-actions.pod:913 ../fish/guestfish-actions.pod:618
6125 #: ../src/guestfs-actions.pod:915 ../fish/guestfish-actions.pod:620
6126 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
6130 #: ../src/guestfs-actions.pod:917 ../fish/guestfish-actions.pod:622
6135 #: ../src/guestfs-actions.pod:919 ../fish/guestfish-actions.pod:624
6136 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
6140 #: ../src/guestfs-actions.pod:923 ../fish/guestfish-actions.pod:628
6141 msgid "The checksum is returned as a printable string."
6145 #: ../src/guestfs-actions.pod:925
6146 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
6150 #: ../src/guestfs-actions.pod:927
6151 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
6155 #: ../src/guestfs-actions.pod:932 ../src/guestfs-actions.pod:1240
6156 #: ../src/guestfs-actions.pod:2062 ../src/guestfs-actions.pod:3066
6157 #: ../src/guestfs-actions.pod:3095 ../src/guestfs-actions.pod:3156
6158 #: ../src/guestfs-actions.pod:3183 ../src/guestfs-actions.pod:6517
6159 msgid "(Added in 1.0.2)"
6163 #: ../src/guestfs-actions.pod:934
6164 msgid "guestfs_checksum_device"
6168 #: ../src/guestfs-actions.pod:936
6172 " guestfs_checksum_device (guestfs_h *g,\n"
6173 " const char *csumtype,\n"
6174 " const char *device);\n"
6179 #: ../src/guestfs-actions.pod:941
6181 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
6182 "device named C<device>. For the types of checksums supported see the "
6183 "C<guestfs_checksum> command."
6187 #: ../src/guestfs-actions.pod:948 ../src/guestfs-actions.pod:4625
6188 #: ../src/guestfs-actions.pod:4684 ../src/guestfs-actions.pod:4721
6189 #: ../src/guestfs-actions.pod:4739 ../src/guestfs-actions.pod:4915
6190 #: ../src/guestfs-actions.pod:6426 ../src/guestfs-actions.pod:6440
6191 #: ../src/guestfs-actions.pod:6846
6192 msgid "(Added in 1.3.2)"
6196 #: ../src/guestfs-actions.pod:950
6197 msgid "guestfs_checksums_out"
6201 #: ../src/guestfs-actions.pod:952
6205 " guestfs_checksums_out (guestfs_h *g,\n"
6206 " const char *csumtype,\n"
6207 " const char *directory,\n"
6208 " const char *sumsfile);\n"
6213 #: ../src/guestfs-actions.pod:958 ../fish/guestfish-actions.pod:646
6215 "This command computes the checksums of all regular files in C<directory> and "
6216 "then emits a list of those checksums to the local output file C<sumsfile>."
6220 #: ../src/guestfs-actions.pod:962 ../fish/guestfish-actions.pod:650
6222 "This can be used for verifying the integrity of a virtual machine. However "
6223 "to be properly secure you should pay attention to the output of the checksum "
6224 "command (it uses the ones from GNU coreutils). In particular when the "
6225 "filename is not printable, coreutils uses a special backslash syntax. For "
6226 "more information, see the GNU coreutils info file."
6230 #: ../src/guestfs-actions.pod:972
6231 msgid "(Added in 1.3.7)"
6235 #: ../src/guestfs-actions.pod:974
6236 msgid "guestfs_chmod"
6240 #: ../src/guestfs-actions.pod:976
6244 " guestfs_chmod (guestfs_h *g,\n"
6246 " const char *path);\n"
6251 #: ../src/guestfs-actions.pod:981 ../fish/guestfish-actions.pod:664
6253 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
6258 #: ../src/guestfs-actions.pod:984 ../fish/guestfish-actions.pod:667
6260 "I<Note>: When using this command from guestfish, C<mode> by default would be "
6261 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
6266 #: ../src/guestfs-actions.pod:988 ../src/guestfs-actions.pod:4143
6267 #: ../src/guestfs-actions.pod:4324 ../src/guestfs-actions.pod:4343
6268 #: ../src/guestfs-actions.pod:4362 ../fish/guestfish-actions.pod:671
6269 #: ../fish/guestfish-actions.pod:2793 ../fish/guestfish-actions.pod:2909
6270 #: ../fish/guestfish-actions.pod:2919 ../fish/guestfish-actions.pod:2929
6271 msgid "The mode actually set is affected by the umask."
6275 #: ../src/guestfs-actions.pod:994
6276 msgid "guestfs_chown"
6280 #: ../src/guestfs-actions.pod:996
6284 " guestfs_chown (guestfs_h *g,\n"
6287 " const char *path);\n"
6292 #: ../src/guestfs-actions.pod:1002 ../fish/guestfish-actions.pod:677
6293 msgid "Change the file owner to C<owner> and group to C<group>."
6297 #: ../src/guestfs-actions.pod:1004 ../src/guestfs-actions.pod:3253
6298 #: ../fish/guestfish-actions.pod:679 ../fish/guestfish-actions.pod:2251
6300 "Only numeric uid and gid are supported. If you want to use names, you will "
6301 "need to locate and parse the password file yourself (Augeas support makes "
6302 "this relatively easy)."
6306 #: ../src/guestfs-actions.pod:1012
6307 msgid "guestfs_command"
6311 #: ../src/guestfs-actions.pod:1014
6315 " guestfs_command (guestfs_h *g,\n"
6316 " char *const *arguments);\n"
6321 #: ../src/guestfs-actions.pod:1018 ../fish/guestfish-actions.pod:687
6323 "This call runs a command from the guest filesystem. The filesystem must be "
6324 "mounted, and must contain a compatible operating system (ie. something "
6325 "Linux, with the same or compatible processor architecture)."
6329 #: ../src/guestfs-actions.pod:1023
6331 "The single parameter is an argv-style list of arguments. The first element "
6332 "is the name of the program to run. Subsequent elements are parameters. The "
6333 "list must be non-empty (ie. must contain a program name). Note that the "
6334 "command runs directly, and is I<not> invoked via the shell (see "
6339 #: ../src/guestfs-actions.pod:1030 ../fish/guestfish-actions.pod:699
6340 msgid "The return value is anything printed to I<stdout> by the command."
6344 #: ../src/guestfs-actions.pod:1033 ../fish/guestfish-actions.pod:702
6346 "If the command returns a non-zero exit status, then this function returns an "
6347 "error message. The error message string is the content of I<stderr> from "
6352 #: ../src/guestfs-actions.pod:1037 ../fish/guestfish-actions.pod:706
6354 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
6355 "bin>. If you require a program from another location, you should provide "
6356 "the full path in the first parameter."
6360 #: ../src/guestfs-actions.pod:1042 ../fish/guestfish-actions.pod:711
6362 "Shared libraries and data files required by the program must be available on "
6363 "filesystems which are mounted in the correct places. It is the caller's "
6364 "responsibility to ensure all filesystems that are needed are mounted at the "
6369 #: ../src/guestfs-actions.pod:1054 ../src/guestfs-actions.pod:1074
6370 #: ../src/guestfs-actions.pod:1537
6371 msgid "(Added in 0.9.1)"
6375 #: ../src/guestfs-actions.pod:1056
6376 msgid "guestfs_command_lines"
6380 #: ../src/guestfs-actions.pod:1058
6384 " guestfs_command_lines (guestfs_h *g,\n"
6385 " char *const *arguments);\n"
6390 #: ../src/guestfs-actions.pod:1062
6392 "This is the same as C<guestfs_command>, but splits the result into a list of "
6397 #: ../src/guestfs-actions.pod:1065
6398 msgid "See also: C<guestfs_sh_lines>"
6402 #: ../src/guestfs-actions.pod:1076
6403 msgid "guestfs_config"
6407 #: ../src/guestfs-actions.pod:1078
6411 " guestfs_config (guestfs_h *g,\n"
6412 " const char *qemuparam,\n"
6413 " const char *qemuvalue);\n"
6418 #: ../src/guestfs-actions.pod:1083 ../fish/guestfish-actions.pod:736
6420 "This can be used to add arbitrary qemu command line parameters of the form "
6421 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
6422 "setting some parameters which would interfere with parameters that we use."
6426 #: ../src/guestfs-actions.pod:1088 ../fish/guestfish-actions.pod:741
6427 msgid "The first character of C<param> string must be a C<-> (dash)."
6431 #: ../src/guestfs-actions.pod:1090 ../fish/guestfish-actions.pod:743
6432 msgid "C<value> can be NULL."
6436 #: ../src/guestfs-actions.pod:1096
6437 msgid "guestfs_copy_size"
6441 #: ../src/guestfs-actions.pod:1098
6445 " guestfs_copy_size (guestfs_h *g,\n"
6446 " const char *src,\n"
6447 " const char *dest,\n"
6453 #: ../src/guestfs-actions.pod:1104 ../fish/guestfish-actions.pod:749
6455 "This command copies exactly C<size> bytes from one source device or file "
6456 "C<src> to another destination device or file C<dest>."
6460 #: ../src/guestfs-actions.pod:1107 ../fish/guestfish-actions.pod:752
6462 "Note this will fail if the source is too short or if the destination is not "
6467 #: ../src/guestfs-actions.pod:1112 ../src/guestfs-actions.pod:1235
6468 #: ../src/guestfs-actions.pod:1266 ../src/guestfs-actions.pod:1686
6469 #: ../src/guestfs-actions.pod:1708 ../src/guestfs-actions.pod:6512
6470 #: ../src/guestfs-actions.pod:6546 ../src/guestfs-actions.pod:7025
6471 #: ../src/guestfs-actions.pod:7044
6473 "This long-running command can generate progress notification messages so "
6474 "that the caller can display a progress bar or indicator. To receive these "
6475 "messages, the caller must register a progress callback. See L<guestfs(3)/"
6476 "guestfs_set_progress_callback>."
6480 #: ../src/guestfs-actions.pod:1117 ../src/guestfs-actions.pod:3919
6481 #: ../src/guestfs-actions.pod:5121 ../src/guestfs-actions.pod:6753
6482 #: ../src/guestfs-actions.pod:6773 ../src/guestfs-actions.pod:6859
6483 msgid "(Added in 1.0.87)"
6487 #: ../src/guestfs-actions.pod:1119
6492 #: ../src/guestfs-actions.pod:1121
6496 " guestfs_cp (guestfs_h *g,\n"
6497 " const char *src,\n"
6498 " const char *dest);\n"
6503 #: ../src/guestfs-actions.pod:1126 ../fish/guestfish-actions.pod:759
6505 "This copies a file from C<src> to C<dest> where C<dest> is either a "
6506 "destination filename or destination directory."
6510 #: ../src/guestfs-actions.pod:1131 ../src/guestfs-actions.pod:1145
6511 #: ../src/guestfs-actions.pod:1217 ../src/guestfs-actions.pod:1291
6512 #: ../src/guestfs-actions.pod:1400 ../src/guestfs-actions.pod:4588
6513 #: ../src/guestfs-actions.pod:4965
6514 msgid "(Added in 1.0.18)"
6518 #: ../src/guestfs-actions.pod:1133
6519 msgid "guestfs_cp_a"
6523 #: ../src/guestfs-actions.pod:1135
6527 " guestfs_cp_a (guestfs_h *g,\n"
6528 " const char *src,\n"
6529 " const char *dest);\n"
6534 #: ../src/guestfs-actions.pod:1140 ../fish/guestfish-actions.pod:766
6536 "This copies a file or directory from C<src> to C<dest> recursively using the "
6541 #: ../src/guestfs-actions.pod:1147
6546 #: ../src/guestfs-actions.pod:1149
6550 " guestfs_dd (guestfs_h *g,\n"
6551 " const char *src,\n"
6552 " const char *dest);\n"
6557 #: ../src/guestfs-actions.pod:1154 ../fish/guestfish-actions.pod:773
6559 "This command copies from one source device or file C<src> to another "
6560 "destination device or file C<dest>. Normally you would use this to copy to "
6561 "or from a device or partition, for example to duplicate a filesystem."
6565 #: ../src/guestfs-actions.pod:1159
6567 "If the destination is a device, it must be as large or larger than the "
6568 "source file or device, otherwise the copy will fail. This command cannot do "
6569 "partial copies (see C<guestfs_copy_size>)."
6573 #: ../src/guestfs-actions.pod:1167
6578 #: ../src/guestfs-actions.pod:1169
6582 " guestfs_df (guestfs_h *g);\n"
6587 #: ../src/guestfs-actions.pod:1172 ../fish/guestfish-actions.pod:786
6588 msgid "This command runs the C<df> command to report disk space used."
6592 #: ../src/guestfs-actions.pod:1174 ../src/guestfs-actions.pod:1191
6594 "This command is mostly useful for interactive sessions. It is I<not> "
6595 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
6600 #: ../src/guestfs-actions.pod:1181 ../src/guestfs-actions.pod:1198
6601 #: ../src/guestfs-actions.pod:1311 ../src/guestfs-actions.pod:2263
6602 #: ../src/guestfs-actions.pod:2287 ../src/guestfs-actions.pod:2355
6603 #: ../src/guestfs-actions.pod:4029 ../src/guestfs-actions.pod:4488
6604 #: ../src/guestfs-actions.pod:6250 ../src/guestfs-actions.pod:6274
6605 #: ../src/guestfs-actions.pod:6892 ../src/guestfs-actions.pod:6905
6606 #: ../src/guestfs-actions.pod:6918
6607 msgid "(Added in 1.0.54)"
6611 #: ../src/guestfs-actions.pod:1183
6612 msgid "guestfs_df_h"
6616 #: ../src/guestfs-actions.pod:1185
6620 " guestfs_df_h (guestfs_h *g);\n"
6625 #: ../src/guestfs-actions.pod:1188 ../fish/guestfish-actions.pod:796
6627 "This command runs the C<df -h> command to report disk space used in human-"
6632 #: ../src/guestfs-actions.pod:1200
6633 msgid "guestfs_dmesg"
6637 #: ../src/guestfs-actions.pod:1202
6641 " guestfs_dmesg (guestfs_h *g);\n"
6646 #: ../src/guestfs-actions.pod:1205 ../fish/guestfish-actions.pod:807
6648 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
6649 "This is sometimes useful for extended debugging of problems."
6653 #: ../src/guestfs-actions.pod:1209
6655 "Another way to get the same information is to enable verbose messages with "
6656 "C<guestfs_set_verbose> or by setting the environment variable "
6657 "C<LIBGUESTFS_DEBUG=1> before running the program."
6661 #: ../src/guestfs-actions.pod:1219
6662 msgid "guestfs_download"
6666 #: ../src/guestfs-actions.pod:1221
6670 " guestfs_download (guestfs_h *g,\n"
6671 " const char *remotefilename,\n"
6672 " const char *filename);\n"
6677 #: ../src/guestfs-actions.pod:1226 ../src/guestfs-actions.pod:1251
6678 #: ../fish/guestfish-actions.pod:820 ../fish/guestfish-actions.pod:833
6680 "Download file C<remotefilename> and save it as C<filename> on the local "
6685 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:6506
6686 #: ../fish/guestfish-actions.pod:823 ../fish/guestfish-actions.pod:4344
6687 msgid "C<filename> can also be a named pipe."
6691 #: ../src/guestfs-actions.pod:1231
6692 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
6696 #: ../src/guestfs-actions.pod:1242
6697 msgid "guestfs_download_offset"
6701 #: ../src/guestfs-actions.pod:1244
6705 " guestfs_download_offset (guestfs_h *g,\n"
6706 " const char *remotefilename,\n"
6707 " const char *filename,\n"
6708 " int64_t offset,\n"
6714 #: ../src/guestfs-actions.pod:1254 ../fish/guestfish-actions.pod:836
6716 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
6717 "region must be within the file or device)."
6721 #: ../src/guestfs-actions.pod:1257
6723 "Note that there is no limit on the amount of data that can be downloaded "
6724 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
6725 "full amount unless an error occurs."
6729 #: ../src/guestfs-actions.pod:1262
6730 msgid "See also C<guestfs_download>, C<guestfs_pread>."
6734 #: ../src/guestfs-actions.pod:1271 ../src/guestfs-actions.pod:6551
6735 msgid "(Added in 1.5.17)"
6739 #: ../src/guestfs-actions.pod:1273
6740 msgid "guestfs_drop_caches"
6744 #: ../src/guestfs-actions.pod:1275
6748 " guestfs_drop_caches (guestfs_h *g,\n"
6749 " int whattodrop);\n"
6754 #: ../src/guestfs-actions.pod:1279 ../fish/guestfish-actions.pod:852
6756 "This instructs the guest kernel to drop its page cache, and/or dentries and "
6757 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
6758 "to drop, see L<http://linux-mm.org/Drop_Caches>"
6762 #: ../src/guestfs-actions.pod:1284 ../fish/guestfish-actions.pod:857
6763 msgid "Setting C<whattodrop> to 3 should drop everything."
6767 #: ../src/guestfs-actions.pod:1286 ../fish/guestfish-actions.pod:859
6769 "This automatically calls L<sync(2)> before the operation, so that the "
6770 "maximum guest memory is freed."
6774 #: ../src/guestfs-actions.pod:1293
6779 #: ../src/guestfs-actions.pod:1295
6783 " guestfs_du (guestfs_h *g,\n"
6784 " const char *path);\n"
6789 #: ../src/guestfs-actions.pod:1299 ../fish/guestfish-actions.pod:866
6791 "This command runs the C<du -s> command to estimate file space usage for "
6796 #: ../src/guestfs-actions.pod:1302 ../fish/guestfish-actions.pod:869
6798 "C<path> can be a file or a directory. If C<path> is a directory then the "
6799 "estimate includes the contents of the directory and all subdirectories "
6804 #: ../src/guestfs-actions.pod:1306 ../fish/guestfish-actions.pod:873
6806 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
6810 #: ../src/guestfs-actions.pod:1313
6811 msgid "guestfs_e2fsck_f"
6815 #: ../src/guestfs-actions.pod:1315
6819 " guestfs_e2fsck_f (guestfs_h *g,\n"
6820 " const char *device);\n"
6825 #: ../src/guestfs-actions.pod:1319 ../fish/guestfish-actions.pod:880
6827 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
6828 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
6833 #: ../src/guestfs-actions.pod:1323
6835 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
6836 "Normally you should use C<guestfs_fsck>."
6840 #: ../src/guestfs-actions.pod:1328
6841 msgid "(Added in 1.0.29)"
6845 #: ../src/guestfs-actions.pod:1330
6846 msgid "guestfs_echo_daemon"
6850 #: ../src/guestfs-actions.pod:1332
6854 " guestfs_echo_daemon (guestfs_h *g,\n"
6855 " char *const *words);\n"
6860 #: ../src/guestfs-actions.pod:1336 ../fish/guestfish-actions.pod:891
6862 "This command concatenates the list of C<words> passed with single spaces "
6863 "between them and returns the resulting string."
6867 #: ../src/guestfs-actions.pod:1339 ../fish/guestfish-actions.pod:894
6868 msgid "You can use this command to test the connection through to the daemon."
6872 #: ../src/guestfs-actions.pod:1341
6873 msgid "See also C<guestfs_ping_daemon>."
6877 #: ../src/guestfs-actions.pod:1346 ../src/guestfs-actions.pod:2073
6878 #: ../src/guestfs-actions.pod:5754
6879 msgid "(Added in 1.0.69)"
6883 #: ../src/guestfs-actions.pod:1348
6884 msgid "guestfs_egrep"
6888 #: ../src/guestfs-actions.pod:1350
6892 " guestfs_egrep (guestfs_h *g,\n"
6893 " const char *regex,\n"
6894 " const char *path);\n"
6899 #: ../src/guestfs-actions.pod:1355 ../fish/guestfish-actions.pod:902
6901 "This calls the external C<egrep> program and returns the matching lines."
6905 #: ../src/guestfs-actions.pod:1365 ../src/guestfs-actions.pod:1384
6906 #: ../src/guestfs-actions.pod:1441 ../src/guestfs-actions.pod:1487
6907 #: ../src/guestfs-actions.pod:1506 ../src/guestfs-actions.pod:2201
6908 #: ../src/guestfs-actions.pod:2220 ../src/guestfs-actions.pod:2376
6909 #: ../src/guestfs-actions.pod:2389 ../src/guestfs-actions.pod:2404
6910 #: ../src/guestfs-actions.pod:2450 ../src/guestfs-actions.pod:2472
6911 #: ../src/guestfs-actions.pod:2485 ../src/guestfs-actions.pod:3412
6912 #: ../src/guestfs-actions.pod:3426 ../src/guestfs-actions.pod:3439
6913 #: ../src/guestfs-actions.pod:3453 ../src/guestfs-actions.pod:4423
6914 #: ../src/guestfs-actions.pod:5299 ../src/guestfs-actions.pod:5348
6915 #: ../src/guestfs-actions.pod:6118 ../src/guestfs-actions.pod:6130
6916 #: ../src/guestfs-actions.pod:6143 ../src/guestfs-actions.pod:6156
6917 #: ../src/guestfs-actions.pod:6178 ../src/guestfs-actions.pod:6191
6918 #: ../src/guestfs-actions.pod:6204 ../src/guestfs-actions.pod:6217
6919 #: ../src/guestfs-actions.pod:6988 ../src/guestfs-actions.pod:7007
6920 #: ../src/guestfs-actions.pod:7092 ../src/guestfs-actions.pod:7111
6921 #: ../src/guestfs-actions.pod:7157 ../src/guestfs-actions.pod:7176
6922 msgid "(Added in 1.0.66)"
6926 #: ../src/guestfs-actions.pod:1367
6927 msgid "guestfs_egrepi"
6931 #: ../src/guestfs-actions.pod:1369
6935 " guestfs_egrepi (guestfs_h *g,\n"
6936 " const char *regex,\n"
6937 " const char *path);\n"
6942 #: ../src/guestfs-actions.pod:1374 ../fish/guestfish-actions.pod:912
6944 "This calls the external C<egrep -i> program and returns the matching lines."
6948 #: ../src/guestfs-actions.pod:1386
6949 msgid "guestfs_equal"
6953 #: ../src/guestfs-actions.pod:1388
6957 " guestfs_equal (guestfs_h *g,\n"
6958 " const char *file1,\n"
6959 " const char *file2);\n"
6964 #: ../src/guestfs-actions.pod:1393 ../fish/guestfish-actions.pod:922
6966 "This compares the two files C<file1> and C<file2> and returns true if their "
6967 "content is exactly equal, or false otherwise."
6971 #: ../src/guestfs-actions.pod:1396 ../fish/guestfish-actions.pod:925
6972 msgid "The external L<cmp(1)> program is used for the comparison."
6976 #: ../src/guestfs-actions.pod:1402
6977 msgid "guestfs_exists"
6981 #: ../src/guestfs-actions.pod:1404
6985 " guestfs_exists (guestfs_h *g,\n"
6986 " const char *path);\n"
6991 #: ../src/guestfs-actions.pod:1408 ../fish/guestfish-actions.pod:931
6993 "This returns C<true> if and only if there is a file, directory (or anything) "
6994 "with the given C<path> name."
6998 #: ../src/guestfs-actions.pod:1411
6999 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
7003 #: ../src/guestfs-actions.pod:1417
7004 msgid "guestfs_fallocate"
7008 #: ../src/guestfs-actions.pod:1419
7012 " guestfs_fallocate (guestfs_h *g,\n"
7013 " const char *path,\n"
7019 #: ../src/guestfs-actions.pod:1424 ../src/guestfs-actions.pod:1450
7020 #: ../fish/guestfish-actions.pod:940 ../fish/guestfish-actions.pod:959
7022 "This command preallocates a file (containing zero bytes) named C<path> of "
7023 "size C<len> bytes. If the file exists already, it is overwritten."
7027 #: ../src/guestfs-actions.pod:1428 ../fish/guestfish-actions.pod:944
7029 "Do not confuse this with the guestfish-specific C<alloc> command which "
7030 "allocates a file in the host and attaches it as a device."
7034 #: ../src/guestfs-actions.pod:1434 ../fish/guestfish-actions.pod:948
7036 "This function is deprecated. In new code, use the C<fallocate64> call "
7041 #: ../src/guestfs-actions.pod:1443
7042 msgid "guestfs_fallocate64"
7046 #: ../src/guestfs-actions.pod:1445
7050 " guestfs_fallocate64 (guestfs_h *g,\n"
7051 " const char *path,\n"
7057 #: ../src/guestfs-actions.pod:1454
7059 "Note that this call allocates disk blocks for the file. To create a sparse "
7060 "file use C<guestfs_truncate_size> instead."
7064 #: ../src/guestfs-actions.pod:1457
7066 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
7067 "oversight it only allowed 30 bit lengths to be specified, effectively "
7068 "limiting the maximum size of files created through that call to 1GB."
7072 #: ../src/guestfs-actions.pod:1462 ../fish/guestfish-actions.pod:971
7074 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
7075 "commands which create a file in the host and attach it as a device."
7079 #: ../src/guestfs-actions.pod:1468
7080 msgid "(Added in 1.3.17)"
7084 #: ../src/guestfs-actions.pod:1470
7085 msgid "guestfs_fgrep"
7089 #: ../src/guestfs-actions.pod:1472
7093 " guestfs_fgrep (guestfs_h *g,\n"
7094 " const char *pattern,\n"
7095 " const char *path);\n"
7100 #: ../src/guestfs-actions.pod:1477 ../fish/guestfish-actions.pod:979
7102 "This calls the external C<fgrep> program and returns the matching lines."
7106 #: ../src/guestfs-actions.pod:1489
7107 msgid "guestfs_fgrepi"
7111 #: ../src/guestfs-actions.pod:1491
7115 " guestfs_fgrepi (guestfs_h *g,\n"
7116 " const char *pattern,\n"
7117 " const char *path);\n"
7122 #: ../src/guestfs-actions.pod:1496 ../fish/guestfish-actions.pod:989
7124 "This calls the external C<fgrep -i> program and returns the matching lines."
7128 #: ../src/guestfs-actions.pod:1508
7129 msgid "guestfs_file"
7133 #: ../src/guestfs-actions.pod:1510
7137 " guestfs_file (guestfs_h *g,\n"
7138 " const char *path);\n"
7143 #: ../src/guestfs-actions.pod:1514 ../fish/guestfish-actions.pod:999
7145 "This call uses the standard L<file(1)> command to determine the type or "
7146 "contents of the file."
7150 #: ../src/guestfs-actions.pod:1517 ../fish/guestfish-actions.pod:1002
7152 "This call will also transparently look inside various types of compressed "
7157 #: ../src/guestfs-actions.pod:1520 ../fish/guestfish-actions.pod:1005
7159 "The exact command which runs is C<file -zb path>. Note in particular that "
7160 "the filename is not prepended to the output (the C<-b> option)."
7164 #: ../src/guestfs-actions.pod:1524
7166 "This command can also be used on C</dev/> devices (and partitions, LV "
7167 "names). You can for example use this to determine if a device contains a "
7168 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
7172 #: ../src/guestfs-actions.pod:1529 ../fish/guestfish-actions.pod:1014
7174 "If the C<path> does not begin with C</dev/> then this command only works for "
7175 "the content of regular files. For other file types (directory, symbolic "
7176 "link etc) it will just return the string C<directory> etc."
7180 #: ../src/guestfs-actions.pod:1539
7181 msgid "guestfs_file_architecture"
7185 #: ../src/guestfs-actions.pod:1541
7189 " guestfs_file_architecture (guestfs_h *g,\n"
7190 " const char *filename);\n"
7195 #: ../src/guestfs-actions.pod:1545 ../fish/guestfish-actions.pod:1023
7197 "This detects the architecture of the binary C<filename>, and returns it if "
7202 #: ../src/guestfs-actions.pod:1548 ../fish/guestfish-actions.pod:1026
7203 msgid "Currently defined architectures are:"
7207 #: ../src/guestfs-actions.pod:1552 ../fish/guestfish-actions.pod:1030
7212 #: ../src/guestfs-actions.pod:1554 ../fish/guestfish-actions.pod:1032
7214 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
7215 "irrespective of the precise processor requirements of the binary."
7219 #: ../src/guestfs-actions.pod:1557 ../fish/guestfish-actions.pod:1035
7224 #: ../src/guestfs-actions.pod:1559 ../fish/guestfish-actions.pod:1037
7225 msgid "64 bit x86-64."
7229 #: ../src/guestfs-actions.pod:1561 ../fish/guestfish-actions.pod:1039
7234 #: ../src/guestfs-actions.pod:1563 ../fish/guestfish-actions.pod:1041
7235 msgid "32 bit SPARC."
7239 #: ../src/guestfs-actions.pod:1565 ../fish/guestfish-actions.pod:1043
7244 #: ../src/guestfs-actions.pod:1567 ../fish/guestfish-actions.pod:1045
7245 msgid "64 bit SPARC V9 and above."
7249 #: ../src/guestfs-actions.pod:1569 ../fish/guestfish-actions.pod:1047
7254 #: ../src/guestfs-actions.pod:1571 ../fish/guestfish-actions.pod:1049
7255 msgid "Intel Itanium."
7259 #: ../src/guestfs-actions.pod:1573 ../fish/guestfish-actions.pod:1051
7264 #: ../src/guestfs-actions.pod:1575 ../fish/guestfish-actions.pod:1053
7265 msgid "32 bit Power PC."
7269 #: ../src/guestfs-actions.pod:1577 ../fish/guestfish-actions.pod:1055
7274 #: ../src/guestfs-actions.pod:1579 ../fish/guestfish-actions.pod:1057
7275 msgid "64 bit Power PC."
7279 #: ../src/guestfs-actions.pod:1583 ../fish/guestfish-actions.pod:1061
7280 msgid "Libguestfs may return other architecture strings in future."
7284 #: ../src/guestfs-actions.pod:1585 ../fish/guestfish-actions.pod:1063
7285 msgid "The function works on at least the following types of files:"
7289 #: ../src/guestfs-actions.pod:1591 ../fish/guestfish-actions.pod:1069
7290 msgid "many types of Un*x and Linux binary"
7294 #: ../src/guestfs-actions.pod:1595 ../fish/guestfish-actions.pod:1073
7295 msgid "many types of Un*x and Linux shared library"
7299 #: ../src/guestfs-actions.pod:1599 ../fish/guestfish-actions.pod:1077
7300 msgid "Windows Win32 and Win64 binaries"
7304 #: ../src/guestfs-actions.pod:1603 ../fish/guestfish-actions.pod:1081
7305 msgid "Windows Win32 and Win64 DLLs"
7309 #: ../src/guestfs-actions.pod:1605 ../fish/guestfish-actions.pod:1083
7310 msgid "Win32 binaries and DLLs return C<i386>."
7314 #: ../src/guestfs-actions.pod:1607 ../fish/guestfish-actions.pod:1085
7315 msgid "Win64 binaries and DLLs return C<x86_64>."
7319 #: ../src/guestfs-actions.pod:1611 ../fish/guestfish-actions.pod:1089
7320 msgid "Linux kernel modules"
7324 #: ../src/guestfs-actions.pod:1615 ../fish/guestfish-actions.pod:1093
7325 msgid "Linux new-style initrd images"
7329 #: ../src/guestfs-actions.pod:1619 ../fish/guestfish-actions.pod:1097
7330 msgid "some non-x86 Linux vmlinuz kernels"
7334 #: ../src/guestfs-actions.pod:1623 ../fish/guestfish-actions.pod:1101
7335 msgid "What it can't do currently:"
7339 #: ../src/guestfs-actions.pod:1629 ../fish/guestfish-actions.pod:1107
7340 msgid "static libraries (libfoo.a)"
7344 #: ../src/guestfs-actions.pod:1633 ../fish/guestfish-actions.pod:1111
7345 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
7349 #: ../src/guestfs-actions.pod:1637 ../fish/guestfish-actions.pod:1115
7350 msgid "x86 Linux vmlinuz kernels"
7354 #: ../src/guestfs-actions.pod:1639 ../fish/guestfish-actions.pod:1117
7356 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
7357 "compressed code, and are horribly hard to unpack. If you want to find the "
7358 "architecture of a kernel, use the architecture of the associated initrd or "
7359 "kernel module(s) instead."
7363 #: ../src/guestfs-actions.pod:1649 ../src/guestfs-actions.pod:1812
7364 #: ../src/guestfs-actions.pod:1829 ../src/guestfs-actions.pod:2508
7365 #: ../src/guestfs-actions.pod:2589 ../src/guestfs-actions.pod:2615
7366 #: ../src/guestfs-actions.pod:2664 ../src/guestfs-actions.pod:2685
7367 #: ../src/guestfs-actions.pod:2718 ../src/guestfs-actions.pod:2802
7368 #: ../src/guestfs-actions.pod:2864 ../src/guestfs-actions.pod:3037
7369 #: ../src/guestfs-actions.pod:3169
7370 msgid "(Added in 1.5.3)"
7374 #: ../src/guestfs-actions.pod:1651
7375 msgid "guestfs_filesize"
7379 #: ../src/guestfs-actions.pod:1653
7383 " guestfs_filesize (guestfs_h *g,\n"
7384 " const char *file);\n"
7389 #: ../src/guestfs-actions.pod:1657 ../fish/guestfish-actions.pod:1128
7390 msgid "This command returns the size of C<file> in bytes."
7394 #: ../src/guestfs-actions.pod:1659
7396 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
7397 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
7398 "devices, use C<guestfs_blockdev_getsize64>."
7402 #: ../src/guestfs-actions.pod:1665
7403 msgid "(Added in 1.0.82)"
7407 #: ../src/guestfs-actions.pod:1667
7408 msgid "guestfs_fill"
7412 #: ../src/guestfs-actions.pod:1669
7416 " guestfs_fill (guestfs_h *g,\n"
7419 " const char *path);\n"
7424 #: ../src/guestfs-actions.pod:1675 ../fish/guestfish-actions.pod:1138
7426 "This command creates a new file called C<path>. The initial content of the "
7427 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
7432 #: ../src/guestfs-actions.pod:1679
7434 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
7435 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
7436 "bytes use C<guestfs_fill_pattern>."
7440 #: ../src/guestfs-actions.pod:1691
7441 msgid "(Added in 1.0.79)"
7445 #: ../src/guestfs-actions.pod:1693
7446 msgid "guestfs_fill_pattern"
7450 #: ../src/guestfs-actions.pod:1695
7454 " guestfs_fill_pattern (guestfs_h *g,\n"
7455 " const char *pattern,\n"
7457 " const char *path);\n"
7462 #: ../src/guestfs-actions.pod:1701
7464 "This function is like C<guestfs_fill> except that it creates a new file of "
7465 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
7466 "pattern is truncated if necessary to ensure the length of the file is "
7467 "exactly C<len> bytes."
7471 #: ../src/guestfs-actions.pod:1713
7472 msgid "(Added in 1.3.12)"
7476 #: ../src/guestfs-actions.pod:1715
7477 msgid "guestfs_find"
7481 #: ../src/guestfs-actions.pod:1717
7485 " guestfs_find (guestfs_h *g,\n"
7486 " const char *directory);\n"
7491 #: ../src/guestfs-actions.pod:1721 ../fish/guestfish-actions.pod:1160
7493 "This command lists out all files and directories, recursively, starting at "
7494 "C<directory>. It is essentially equivalent to running the shell command "
7495 "C<find directory -print> but some post-processing happens on the output, "
7500 #: ../src/guestfs-actions.pod:1726 ../fish/guestfish-actions.pod:1165
7502 "This returns a list of strings I<without any prefix>. Thus if the directory "
7507 #: ../src/guestfs-actions.pod:1729 ../fish/guestfish-actions.pod:1168
7517 #: ../src/guestfs-actions.pod:1733
7519 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
7523 #: ../src/guestfs-actions.pod:1736 ../fish/guestfish-actions.pod:1175
7534 #: ../src/guestfs-actions.pod:1741 ../fish/guestfish-actions.pod:1180
7535 msgid "If C<directory> is not a directory, then this command returns an error."
7539 #: ../src/guestfs-actions.pod:1744 ../fish/guestfish-actions.pod:1183
7540 msgid "The returned list is sorted."
7544 #: ../src/guestfs-actions.pod:1746
7545 msgid "See also C<guestfs_find0>."
7549 #: ../src/guestfs-actions.pod:1755 ../src/guestfs-actions.pod:3856
7550 #: ../src/guestfs-actions.pod:5383
7551 msgid "(Added in 1.0.27)"
7555 #: ../src/guestfs-actions.pod:1757
7556 msgid "guestfs_find0"
7560 #: ../src/guestfs-actions.pod:1759
7564 " guestfs_find0 (guestfs_h *g,\n"
7565 " const char *directory,\n"
7566 " const char *files);\n"
7571 #: ../src/guestfs-actions.pod:1764 ../fish/guestfish-actions.pod:1194
7573 "This command lists out all files and directories, recursively, starting at "
7574 "C<directory>, placing the resulting list in the external file called "
7579 #: ../src/guestfs-actions.pod:1768
7581 "This command works the same way as C<guestfs_find> with the following "
7586 #: ../src/guestfs-actions.pod:1775 ../fish/guestfish-actions.pod:1205
7587 msgid "The resulting list is written to an external file."
7591 #: ../src/guestfs-actions.pod:1779 ../fish/guestfish-actions.pod:1209
7593 "Items (filenames) in the result are separated by C<\\0> characters. See "
7594 "L<find(1)> option I<-print0>."
7598 #: ../src/guestfs-actions.pod:1784 ../fish/guestfish-actions.pod:1214
7599 msgid "This command is not limited in the number of names that it can return."
7603 #: ../src/guestfs-actions.pod:1789 ../fish/guestfish-actions.pod:1219
7604 msgid "The result list is not sorted."
7608 #: ../src/guestfs-actions.pod:1795
7609 msgid "(Added in 1.0.74)"
7613 #: ../src/guestfs-actions.pod:1797
7614 msgid "guestfs_findfs_label"
7618 #: ../src/guestfs-actions.pod:1799
7622 " guestfs_findfs_label (guestfs_h *g,\n"
7623 " const char *label);\n"
7628 #: ../src/guestfs-actions.pod:1803 ../fish/guestfish-actions.pod:1229
7630 "This command searches the filesystems and returns the one which has the "
7631 "given label. An error is returned if no such filesystem can be found."
7635 #: ../src/guestfs-actions.pod:1807
7636 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
7640 #: ../src/guestfs-actions.pod:1814
7641 msgid "guestfs_findfs_uuid"
7645 #: ../src/guestfs-actions.pod:1816
7649 " guestfs_findfs_uuid (guestfs_h *g,\n"
7650 " const char *uuid);\n"
7655 #: ../src/guestfs-actions.pod:1820 ../fish/guestfish-actions.pod:1239
7657 "This command searches the filesystems and returns the one which has the "
7658 "given UUID. An error is returned if no such filesystem can be found."
7662 #: ../src/guestfs-actions.pod:1824
7663 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
7667 #: ../src/guestfs-actions.pod:1831
7668 msgid "guestfs_fsck"
7672 #: ../src/guestfs-actions.pod:1833
7676 " guestfs_fsck (guestfs_h *g,\n"
7677 " const char *fstype,\n"
7678 " const char *device);\n"
7683 #: ../src/guestfs-actions.pod:1838 ../fish/guestfish-actions.pod:1249
7685 "This runs the filesystem checker (fsck) on C<device> which should have "
7686 "filesystem type C<fstype>."
7690 #: ../src/guestfs-actions.pod:1841 ../fish/guestfish-actions.pod:1252
7692 "The returned integer is the status. See L<fsck(8)> for the list of status "
7693 "codes from C<fsck>."
7697 #: ../src/guestfs-actions.pod:1850 ../fish/guestfish-actions.pod:1261
7698 msgid "Multiple status codes can be summed together."
7702 #: ../src/guestfs-actions.pod:1854 ../fish/guestfish-actions.pod:1265
7704 "A non-zero return code can mean \"success\", for example if errors have been "
7705 "corrected on the filesystem."
7709 #: ../src/guestfs-actions.pod:1859 ../fish/guestfish-actions.pod:1270
7710 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
7714 #: ../src/guestfs-actions.pod:1864 ../fish/guestfish-actions.pod:1275
7716 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
7720 #: ../src/guestfs-actions.pod:1868 ../src/guestfs-actions.pod:7030
7721 msgid "(Added in 1.0.16)"
7725 #: ../src/guestfs-actions.pod:1870
7726 msgid "guestfs_get_append"
7730 #: ../src/guestfs-actions.pod:1872
7734 " guestfs_get_append (guestfs_h *g);\n"
7739 #: ../src/guestfs-actions.pod:1875 ../fish/guestfish-actions.pod:1281
7741 "Return the additional kernel options which are added to the guest kernel "
7746 #: ../src/guestfs-actions.pod:1878 ../fish/guestfish-actions.pod:1284
7747 msgid "If C<NULL> then no options are added."
7751 #: ../src/guestfs-actions.pod:1880
7753 "This function returns a string which may be NULL. There is no way to return "
7754 "an error from this function. The string is owned by the guest handle and "
7755 "must I<not> be freed."
7759 #: ../src/guestfs-actions.pod:1884 ../src/guestfs-actions.pod:5061
7760 #: ../src/guestfs-actions.pod:5524 ../src/guestfs-actions.pod:5892
7761 #: ../src/guestfs-actions.pod:5911 ../src/guestfs-actions.pod:5927
7762 #: ../src/guestfs-actions.pod:5944 ../src/guestfs-actions.pod:6701
7763 #: ../src/guestfs-actions.pod:6719 ../src/guestfs-actions.pod:7073
7764 msgid "(Added in 1.0.26)"
7768 #: ../src/guestfs-actions.pod:1886
7769 msgid "guestfs_get_autosync"
7773 #: ../src/guestfs-actions.pod:1888
7777 " guestfs_get_autosync (guestfs_h *g);\n"
7782 #: ../src/guestfs-actions.pod:1891 ../fish/guestfish-actions.pod:1290
7783 msgid "Get the autosync flag."
7787 #: ../src/guestfs-actions.pod:1897
7788 msgid "guestfs_get_direct"
7792 #: ../src/guestfs-actions.pod:1899
7796 " guestfs_get_direct (guestfs_h *g);\n"
7801 #: ../src/guestfs-actions.pod:1902 ../fish/guestfish-actions.pod:1296
7802 msgid "Return the direct appliance mode flag."
7806 #: ../src/guestfs-actions.pod:1906 ../src/guestfs-actions.pod:5565
7807 msgid "(Added in 1.0.72)"
7811 #: ../src/guestfs-actions.pod:1908
7812 msgid "guestfs_get_e2label"
7816 #: ../src/guestfs-actions.pod:1910
7820 " guestfs_get_e2label (guestfs_h *g,\n"
7821 " const char *device);\n"
7826 #: ../src/guestfs-actions.pod:1914 ../fish/guestfish-actions.pod:1302
7828 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
7832 #: ../src/guestfs-actions.pod:1920 ../fish/guestfish-actions.pod:1305
7834 "This function is deprecated. In new code, use the C<vfs_label> call instead."
7838 #: ../src/guestfs-actions.pod:1927 ../src/guestfs-actions.pod:1948
7839 #: ../src/guestfs-actions.pod:5583 ../src/guestfs-actions.pod:5602
7840 msgid "(Added in 1.0.15)"
7844 #: ../src/guestfs-actions.pod:1929
7845 msgid "guestfs_get_e2uuid"
7849 #: ../src/guestfs-actions.pod:1931
7853 " guestfs_get_e2uuid (guestfs_h *g,\n"
7854 " const char *device);\n"
7859 #: ../src/guestfs-actions.pod:1935 ../fish/guestfish-actions.pod:1316
7861 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
7865 #: ../src/guestfs-actions.pod:1941 ../fish/guestfish-actions.pod:1319
7867 "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
7871 #: ../src/guestfs-actions.pod:1950
7872 msgid "guestfs_get_memsize"
7876 #: ../src/guestfs-actions.pod:1952
7880 " guestfs_get_memsize (guestfs_h *g);\n"
7885 #: ../src/guestfs-actions.pod:1955 ../fish/guestfish-actions.pod:1330
7887 "This gets the memory size in megabytes allocated to the qemu subprocess."
7891 #: ../src/guestfs-actions.pod:1958
7893 "If C<guestfs_set_memsize> was not called on this handle, and if "
7894 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
7895 "value for memsize."
7899 #: ../src/guestfs-actions.pod:1962 ../src/guestfs-actions.pod:2043
7900 #: ../src/guestfs-actions.pod:5618 ../src/guestfs-actions.pod:5725
7901 #: ../fish/guestfish-actions.pod:1337 ../fish/guestfish-actions.pod:1388
7902 #: ../fish/guestfish-actions.pod:3751 ../fish/guestfish-actions.pod:3838
7904 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
7908 #: ../src/guestfs-actions.pod:1967 ../src/guestfs-actions.pod:4147
7909 #: ../src/guestfs-actions.pod:4328 ../src/guestfs-actions.pod:4347
7910 #: ../src/guestfs-actions.pod:4366 ../src/guestfs-actions.pod:4378
7911 #: ../src/guestfs-actions.pod:4395 ../src/guestfs-actions.pod:4408
7912 #: ../src/guestfs-actions.pod:5286 ../src/guestfs-actions.pod:5623
7913 #: ../src/guestfs-actions.pod:5866 ../src/guestfs-actions.pod:6467
7914 msgid "(Added in 1.0.55)"
7918 #: ../src/guestfs-actions.pod:1969
7919 msgid "guestfs_get_network"
7923 #: ../src/guestfs-actions.pod:1971
7927 " guestfs_get_network (guestfs_h *g);\n"
7932 #: ../src/guestfs-actions.pod:1974 ../fish/guestfish-actions.pod:1344
7933 msgid "This returns the enable network flag."
7937 #: ../src/guestfs-actions.pod:1978 ../src/guestfs-actions.pod:5642
7938 msgid "(Added in 1.5.4)"
7942 #: ../src/guestfs-actions.pod:1980
7943 msgid "guestfs_get_path"
7947 #: ../src/guestfs-actions.pod:1982
7951 " guestfs_get_path (guestfs_h *g);\n"
7956 #: ../src/guestfs-actions.pod:1985 ../fish/guestfish-actions.pod:1350
7957 msgid "Return the current search path."
7961 #: ../src/guestfs-actions.pod:1987 ../fish/guestfish-actions.pod:1352
7963 "This is always non-NULL. If it wasn't set already, then this will return "
7968 #: ../src/guestfs-actions.pod:1990 ../src/guestfs-actions.pod:2019
7970 "This function returns a string, or NULL on error. The string is owned by "
7971 "the guest handle and must I<not> be freed."
7975 #: ../src/guestfs-actions.pod:1995
7976 msgid "guestfs_get_pid"
7980 #: ../src/guestfs-actions.pod:1997
7984 " guestfs_get_pid (guestfs_h *g);\n"
7989 #: ../src/guestfs-actions.pod:2000 ../fish/guestfish-actions.pod:1361
7991 "Return the process ID of the qemu subprocess. If there is no qemu "
7992 "subprocess, then this will return an error."
7996 #: ../src/guestfs-actions.pod:2003 ../fish/guestfish-actions.pod:1364
7997 msgid "This is an internal call used for debugging and testing."
8001 #: ../src/guestfs-actions.pod:2007
8002 msgid "(Added in 1.0.56)"
8006 #: ../src/guestfs-actions.pod:2009
8007 msgid "guestfs_get_qemu"
8011 #: ../src/guestfs-actions.pod:2011
8015 " guestfs_get_qemu (guestfs_h *g);\n"
8020 #: ../src/guestfs-actions.pod:2014 ../fish/guestfish-actions.pod:1370
8021 msgid "Return the current qemu binary."
8025 #: ../src/guestfs-actions.pod:2016 ../fish/guestfish-actions.pod:1372
8027 "This is always non-NULL. If it wasn't set already, then this will return "
8028 "the default qemu binary name."
8032 #: ../src/guestfs-actions.pod:2022 ../src/guestfs-actions.pod:5687
8033 msgid "(Added in 1.0.6)"
8037 #: ../src/guestfs-actions.pod:2024
8038 msgid "guestfs_get_recovery_proc"
8042 #: ../src/guestfs-actions.pod:2026
8046 " guestfs_get_recovery_proc (guestfs_h *g);\n"
8051 #: ../src/guestfs-actions.pod:2029 ../fish/guestfish-actions.pod:1379
8052 msgid "Return the recovery process enabled flag."
8056 #: ../src/guestfs-actions.pod:2033 ../src/guestfs-actions.pod:3259
8057 #: ../src/guestfs-actions.pod:3554 ../src/guestfs-actions.pod:3954
8058 #: ../src/guestfs-actions.pod:3986 ../src/guestfs-actions.pod:4991
8059 #: ../src/guestfs-actions.pod:5334 ../src/guestfs-actions.pod:5711
8060 #: ../src/guestfs-actions.pod:6370 ../src/guestfs-actions.pod:6390
8061 #: ../src/guestfs-actions.pod:6582
8062 msgid "(Added in 1.0.77)"
8066 #: ../src/guestfs-actions.pod:2035
8067 msgid "guestfs_get_selinux"
8071 #: ../src/guestfs-actions.pod:2037
8075 " guestfs_get_selinux (guestfs_h *g);\n"
8080 #: ../src/guestfs-actions.pod:2040
8082 "This returns the current setting of the selinux flag which is passed to the "
8083 "appliance at boot time. See C<guestfs_set_selinux>."
8087 #: ../src/guestfs-actions.pod:2048 ../src/guestfs-actions.pod:2111
8088 #: ../src/guestfs-actions.pod:5730 ../src/guestfs-actions.pod:5784
8089 msgid "(Added in 1.0.67)"
8093 #: ../src/guestfs-actions.pod:2050
8094 msgid "guestfs_get_state"
8098 #: ../src/guestfs-actions.pod:2052
8102 " guestfs_get_state (guestfs_h *g);\n"
8107 #: ../src/guestfs-actions.pod:2055 ../fish/guestfish-actions.pod:1395
8109 "This returns the current state as an opaque integer. This is only useful "
8110 "for printing debug and internal error messages."
8114 #: ../src/guestfs-actions.pod:2058 ../src/guestfs-actions.pod:3062
8115 #: ../src/guestfs-actions.pod:3091 ../src/guestfs-actions.pod:3152
8116 #: ../src/guestfs-actions.pod:3179 ../fish/guestfish-actions.pod:1398
8117 #: ../fish/guestfish-actions.pod:2133 ../fish/guestfish-actions.pod:2151
8118 #: ../fish/guestfish-actions.pod:2189 ../fish/guestfish-actions.pod:2205
8119 msgid "For more information on states, see L<guestfs(3)>."
8123 #: ../src/guestfs-actions.pod:2064
8124 msgid "guestfs_get_trace"
8128 #: ../src/guestfs-actions.pod:2066
8132 " guestfs_get_trace (guestfs_h *g);\n"
8137 #: ../src/guestfs-actions.pod:2069 ../fish/guestfish-actions.pod:1404
8138 msgid "Return the command trace flag."
8142 #: ../src/guestfs-actions.pod:2075
8143 msgid "guestfs_get_umask"
8147 #: ../src/guestfs-actions.pod:2077
8151 " guestfs_get_umask (guestfs_h *g);\n"
8156 #: ../src/guestfs-actions.pod:2080
8158 "Return the current umask. By default the umask is C<022> unless it has been "
8159 "set by calling C<guestfs_umask>."
8163 #: ../src/guestfs-actions.pod:2087
8164 msgid "guestfs_get_verbose"
8168 #: ../src/guestfs-actions.pod:2089
8172 " guestfs_get_verbose (guestfs_h *g);\n"
8177 #: ../src/guestfs-actions.pod:2092 ../fish/guestfish-actions.pod:1417
8178 msgid "This returns the verbose messages flag."
8182 #: ../src/guestfs-actions.pod:2098
8183 msgid "guestfs_getcon"
8187 #: ../src/guestfs-actions.pod:2100
8191 " guestfs_getcon (guestfs_h *g);\n"
8196 #: ../src/guestfs-actions.pod:2103 ../fish/guestfish-actions.pod:1423
8197 msgid "This gets the SELinux security context of the daemon."
8201 #: ../src/guestfs-actions.pod:2105
8203 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
8207 #: ../src/guestfs-actions.pod:2113
8208 msgid "guestfs_getxattr"
8212 #: ../src/guestfs-actions.pod:2115
8216 " guestfs_getxattr (guestfs_h *g,\n"
8217 " const char *path,\n"
8218 " const char *name,\n"
8219 " size_t *size_r);\n"
8224 #: ../src/guestfs-actions.pod:2121
8226 "Get a single extended attribute from file C<path> named C<name>. This call "
8227 "follows symlinks. If you want to lookup an extended attribute for the "
8228 "symlink itself, use C<guestfs_lgetxattr>."
8232 #: ../src/guestfs-actions.pod:2125 ../src/guestfs-actions.pod:3273
8234 "Normally it is better to get all extended attributes from a file in one go "
8235 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
8236 "implementations are buggy and do not provide a way to list out attributes. "
8237 "For these filesystems (notably ntfs-3g) you have to know the names of the "
8238 "extended attributes you want in advance and call this function."
8242 #: ../src/guestfs-actions.pod:2132 ../src/guestfs-actions.pod:3280
8243 #: ../fish/guestfish-actions.pod:1443 ../fish/guestfish-actions.pod:2270
8245 "Extended attribute values are blobs of binary data. If there is no extended "
8246 "attribute named C<name>, this returns an error."
8250 #: ../src/guestfs-actions.pod:2135
8251 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
8255 #: ../src/guestfs-actions.pod:2137 ../src/guestfs-actions.pod:2326
8256 #: ../src/guestfs-actions.pod:3285 ../src/guestfs-actions.pod:4984
8257 #: ../src/guestfs-actions.pod:5010 ../src/guestfs-actions.pod:5191
8259 "This function returns a buffer, or NULL on error. The size of the returned "
8260 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
8265 #: ../src/guestfs-actions.pod:2141
8266 msgid "guestfs_getxattrs"
8270 #: ../src/guestfs-actions.pod:2143
8273 " struct guestfs_xattr_list *\n"
8274 " guestfs_getxattrs (guestfs_h *g,\n"
8275 " const char *path);\n"
8280 #: ../src/guestfs-actions.pod:2147 ../fish/guestfish-actions.pod:1452
8282 "This call lists the extended attributes of the file or directory C<path>."
8286 #: ../src/guestfs-actions.pod:2150 ../fish/guestfish-actions.pod:1455
8288 "At the system call level, this is a combination of the L<listxattr(2)> and "
8289 "L<getxattr(2)> calls."
8293 #: ../src/guestfs-actions.pod:2153
8294 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
8298 #: ../src/guestfs-actions.pod:2155 ../src/guestfs-actions.pod:3299
8299 #: ../src/guestfs-actions.pod:3950
8301 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
8302 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
8306 #: ../src/guestfs-actions.pod:2159 ../src/guestfs-actions.pod:3303
8307 #: ../src/guestfs-actions.pod:3468 ../src/guestfs-actions.pod:3504
8308 #: ../src/guestfs-actions.pod:5364 ../src/guestfs-actions.pod:5803
8309 #: ../src/guestfs-actions.pod:7138
8310 msgid "(Added in 1.0.59)"
8314 #: ../src/guestfs-actions.pod:2161
8315 msgid "guestfs_glob_expand"
8319 #: ../src/guestfs-actions.pod:2163
8323 " guestfs_glob_expand (guestfs_h *g,\n"
8324 " const char *pattern);\n"
8329 #: ../src/guestfs-actions.pod:2167 ../fish/guestfish-actions.pod:1464
8331 "This command searches for all the pathnames matching C<pattern> according to "
8332 "the wildcard expansion rules used by the shell."
8336 #: ../src/guestfs-actions.pod:2171 ../fish/guestfish-actions.pod:1468
8338 "If no paths match, then this returns an empty list (note: not an error)."
8342 #: ../src/guestfs-actions.pod:2174 ../fish/guestfish-actions.pod:1471
8344 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
8345 "GLOB_BRACE>. See that manual page for more details."
8349 #: ../src/guestfs-actions.pod:2182 ../src/guestfs-actions.pod:5968
8350 #: ../src/guestfs-actions.pod:5985
8351 msgid "(Added in 1.0.50)"
8355 #: ../src/guestfs-actions.pod:2184
8356 msgid "guestfs_grep"
8360 #: ../src/guestfs-actions.pod:2186
8364 " guestfs_grep (guestfs_h *g,\n"
8365 " const char *regex,\n"
8366 " const char *path);\n"
8371 #: ../src/guestfs-actions.pod:2191 ../fish/guestfish-actions.pod:1479
8372 msgid "This calls the external C<grep> program and returns the matching lines."
8376 #: ../src/guestfs-actions.pod:2203
8377 msgid "guestfs_grepi"
8381 #: ../src/guestfs-actions.pod:2205
8385 " guestfs_grepi (guestfs_h *g,\n"
8386 " const char *regex,\n"
8387 " const char *path);\n"
8392 #: ../src/guestfs-actions.pod:2210 ../fish/guestfish-actions.pod:1489
8394 "This calls the external C<grep -i> program and returns the matching lines."
8398 #: ../src/guestfs-actions.pod:2222
8399 msgid "guestfs_grub_install"
8403 #: ../src/guestfs-actions.pod:2224
8407 " guestfs_grub_install (guestfs_h *g,\n"
8408 " const char *root,\n"
8409 " const char *device);\n"
8414 #: ../src/guestfs-actions.pod:2229 ../fish/guestfish-actions.pod:1499
8416 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
8417 "the root directory being C<root>."
8421 #: ../src/guestfs-actions.pod:2232 ../fish/guestfish-actions.pod:1502
8423 "Note: If grub-install reports the error \"No suitable drive was found in the "
8424 "generated device map.\" it may be that you need to create a C</boot/grub/"
8425 "device.map> file first that contains the mapping between grub device names "
8426 "and Linux device names. It is usually sufficient to create a file "
8431 #: ../src/guestfs-actions.pod:2239 ../fish/guestfish-actions.pod:1509
8439 #: ../src/guestfs-actions.pod:2241 ../fish/guestfish-actions.pod:1511
8440 msgid "replacing C</dev/vda> with the name of the installation device."
8444 #: ../src/guestfs-actions.pod:2245
8445 msgid "(Added in 1.0.17)"
8449 #: ../src/guestfs-actions.pod:2247
8450 msgid "guestfs_head"
8454 #: ../src/guestfs-actions.pod:2249
8458 " guestfs_head (guestfs_h *g,\n"
8459 " const char *path);\n"
8464 #: ../src/guestfs-actions.pod:2253 ../fish/guestfish-actions.pod:1517
8466 "This command returns up to the first 10 lines of a file as a list of strings."
8470 #: ../src/guestfs-actions.pod:2265
8471 msgid "guestfs_head_n"
8475 #: ../src/guestfs-actions.pod:2267
8479 " guestfs_head_n (guestfs_h *g,\n"
8481 " const char *path);\n"
8486 #: ../src/guestfs-actions.pod:2272 ../fish/guestfish-actions.pod:1527
8488 "If the parameter C<nrlines> is a positive number, this returns the first "
8489 "C<nrlines> lines of the file C<path>."
8493 #: ../src/guestfs-actions.pod:2275 ../fish/guestfish-actions.pod:1530
8495 "If the parameter C<nrlines> is a negative number, this returns lines from "
8496 "the file C<path>, excluding the last C<nrlines> lines."
8500 #: ../src/guestfs-actions.pod:2278 ../src/guestfs-actions.pod:6265
8501 #: ../fish/guestfish-actions.pod:1533 ../fish/guestfish-actions.pod:4184
8502 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
8506 #: ../src/guestfs-actions.pod:2289
8507 msgid "guestfs_hexdump"
8511 #: ../src/guestfs-actions.pod:2291
8515 " guestfs_hexdump (guestfs_h *g,\n"
8516 " const char *path);\n"
8521 #: ../src/guestfs-actions.pod:2295 ../fish/guestfish-actions.pod:1542
8523 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
8524 "readable, canonical hex dump of the file."
8528 #: ../src/guestfs-actions.pod:2304 ../src/guestfs-actions.pod:6049
8529 #: ../src/guestfs-actions.pod:6104
8530 msgid "(Added in 1.0.22)"
8534 #: ../src/guestfs-actions.pod:2306
8535 msgid "guestfs_initrd_cat"
8539 #: ../src/guestfs-actions.pod:2308
8543 " guestfs_initrd_cat (guestfs_h *g,\n"
8544 " const char *initrdpath,\n"
8545 " const char *filename,\n"
8546 " size_t *size_r);\n"
8551 #: ../src/guestfs-actions.pod:2314 ../fish/guestfish-actions.pod:1552
8553 "This command unpacks the file C<filename> from the initrd file called "
8554 "C<initrdpath>. The filename must be given I<without> the initial C</> "
8559 #: ../src/guestfs-actions.pod:2318 ../fish/guestfish-actions.pod:1556
8561 "For example, in guestfish you could use the following command to examine the "
8562 "boot script (usually called C</init>) contained in a Linux initrd or "
8567 #: ../src/guestfs-actions.pod:2322 ../fish/guestfish-actions.pod:1560
8570 " initrd-cat /boot/initrd-<version>.img init\n"
8575 #: ../src/guestfs-actions.pod:2324
8576 msgid "See also C<guestfs_initrd_list>."
8580 #: ../src/guestfs-actions.pod:2335
8581 msgid "guestfs_initrd_list"
8585 #: ../src/guestfs-actions.pod:2337
8589 " guestfs_initrd_list (guestfs_h *g,\n"
8590 " const char *path);\n"
8595 #: ../src/guestfs-actions.pod:2341 ../fish/guestfish-actions.pod:1571
8596 msgid "This command lists out files contained in an initrd."
8600 #: ../src/guestfs-actions.pod:2343 ../fish/guestfish-actions.pod:1573
8602 "The files are listed without any initial C</> character. The files are "
8603 "listed in the order they appear (not necessarily alphabetical). Directory "
8604 "names are listed as separate items."
8608 #: ../src/guestfs-actions.pod:2347 ../fish/guestfish-actions.pod:1577
8610 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
8611 "initrd. We I<only> support the newer initramfs format (compressed cpio "
8616 #: ../src/guestfs-actions.pod:2357
8617 msgid "guestfs_inotify_add_watch"
8621 #: ../src/guestfs-actions.pod:2359
8625 " guestfs_inotify_add_watch (guestfs_h *g,\n"
8626 " const char *path,\n"
8632 #: ../src/guestfs-actions.pod:2364 ../fish/guestfish-actions.pod:1585
8633 msgid "Watch C<path> for the events listed in C<mask>."
8637 #: ../src/guestfs-actions.pod:2366 ../fish/guestfish-actions.pod:1587
8639 "Note that if C<path> is a directory then events within that directory are "
8640 "watched, but this does I<not> happen recursively (in subdirectories)."
8644 #: ../src/guestfs-actions.pod:2370 ../fish/guestfish-actions.pod:1591
8646 "Note for non-C or non-Linux callers: the inotify events are defined by the "
8647 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
8651 #: ../src/guestfs-actions.pod:2378
8652 msgid "guestfs_inotify_close"
8656 #: ../src/guestfs-actions.pod:2380
8660 " guestfs_inotify_close (guestfs_h *g);\n"
8665 #: ../src/guestfs-actions.pod:2383 ../fish/guestfish-actions.pod:1599
8667 "This closes the inotify handle which was previously opened by inotify_init. "
8668 "It removes all watches, throws away any pending events, and deallocates all "
8673 #: ../src/guestfs-actions.pod:2391
8674 msgid "guestfs_inotify_files"
8678 #: ../src/guestfs-actions.pod:2393
8682 " guestfs_inotify_files (guestfs_h *g);\n"
8687 #: ../src/guestfs-actions.pod:2396
8689 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
8690 "returns a list of pathnames of objects that were touched. The returned "
8691 "pathnames are sorted and deduplicated."
8695 #: ../src/guestfs-actions.pod:2406
8696 msgid "guestfs_inotify_init"
8700 #: ../src/guestfs-actions.pod:2408
8704 " guestfs_inotify_init (guestfs_h *g,\n"
8705 " int maxevents);\n"
8710 #: ../src/guestfs-actions.pod:2412 ../fish/guestfish-actions.pod:1615
8712 "This command creates a new inotify handle. The inotify subsystem can be "
8713 "used to notify events which happen to objects in the guest filesystem."
8717 #: ../src/guestfs-actions.pod:2416
8719 "C<maxevents> is the maximum number of events which will be queued up between "
8720 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
8721 "passed as C<0>, then the kernel (or previously set) default is used. For "
8722 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
8723 "throws away events, but records the fact that it threw them away by setting "
8724 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
8725 "C<guestfs_inotify_read>)."
8729 #: ../src/guestfs-actions.pod:2426
8731 "Before any events are generated, you have to add some watches to the "
8732 "internal watch list. See: C<guestfs_inotify_add_watch>, "
8733 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
8737 #: ../src/guestfs-actions.pod:2432
8739 "Queued up events should be read periodically by calling "
8740 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
8741 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
8742 "often enough then you risk the internal queue overflowing."
8746 #: ../src/guestfs-actions.pod:2439
8748 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
8749 "This also removes any watches automatically."
8753 #: ../src/guestfs-actions.pod:2443 ../fish/guestfish-actions.pod:1646
8755 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
8756 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
8757 "that there is one global inotify handle per libguestfs instance."
8761 #: ../src/guestfs-actions.pod:2452
8762 msgid "guestfs_inotify_read"
8766 #: ../src/guestfs-actions.pod:2454
8769 " struct guestfs_inotify_event_list *\n"
8770 " guestfs_inotify_read (guestfs_h *g);\n"
8775 #: ../src/guestfs-actions.pod:2457 ../fish/guestfish-actions.pod:1655
8777 "Return the complete queue of events that have happened since the previous "
8782 #: ../src/guestfs-actions.pod:2460 ../fish/guestfish-actions.pod:1658
8783 msgid "If no events have happened, this returns an empty list."
8787 #: ../src/guestfs-actions.pod:2462 ../fish/guestfish-actions.pod:1660
8789 "I<Note>: In order to make sure that all events have been read, you must call "
8790 "this function repeatedly until it returns an empty list. The reason is that "
8791 "the call will read events up to the maximum appliance-to-host message size "
8792 "and leave remaining events in the queue."
8796 #: ../src/guestfs-actions.pod:2468
8798 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
8799 "there was an error. I<The caller must call "
8800 "C<guestfs_free_inotify_event_list> after use>."
8804 #: ../src/guestfs-actions.pod:2474
8805 msgid "guestfs_inotify_rm_watch"
8809 #: ../src/guestfs-actions.pod:2476
8813 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
8819 #: ../src/guestfs-actions.pod:2480
8821 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
8825 #: ../src/guestfs-actions.pod:2487
8826 msgid "guestfs_inspect_get_arch"
8830 #: ../src/guestfs-actions.pod:2489
8834 " guestfs_inspect_get_arch (guestfs_h *g,\n"
8835 " const char *root);\n"
8840 #: ../src/guestfs-actions.pod:2493 ../src/guestfs-actions.pod:2516
8841 #: ../src/guestfs-actions.pod:2597 ../src/guestfs-actions.pod:2623
8842 #: ../src/guestfs-actions.pod:2645 ../src/guestfs-actions.pod:2672
8843 #: ../src/guestfs-actions.pod:2693 ../src/guestfs-actions.pod:2726
8844 #: ../src/guestfs-actions.pod:2755 ../src/guestfs-actions.pod:2786
8845 #: ../src/guestfs-actions.pod:2830 ../src/guestfs-actions.pod:2872
8846 #: ../src/guestfs-actions.pod:2895
8848 "This function should only be called with a root device string as returned by "
8849 "C<guestfs_inspect_os>."
8853 #: ../src/guestfs-actions.pod:2496
8855 "This returns the architecture of the inspected operating system. The "
8856 "possible return values are listed under C<guestfs_file_architecture>."
8860 #: ../src/guestfs-actions.pod:2500 ../fish/guestfish-actions.pod:1684
8862 "If the architecture could not be determined, then the string C<unknown> is "
8867 #: ../src/guestfs-actions.pod:2503 ../src/guestfs-actions.pod:2584
8868 #: ../src/guestfs-actions.pod:2632 ../src/guestfs-actions.pod:2660
8869 #: ../src/guestfs-actions.pod:2742 ../src/guestfs-actions.pod:2773
8870 #: ../src/guestfs-actions.pod:2797 ../src/guestfs-actions.pod:2816
8871 #: ../src/guestfs-actions.pod:2859 ../src/guestfs-actions.pod:2882
8872 #: ../src/guestfs-actions.pod:2988 ../src/guestfs-actions.pod:3029
8873 #: ../fish/guestfish-actions.pod:1687 ../fish/guestfish-actions.pod:1761
8874 #: ../fish/guestfish-actions.pod:1794 ../fish/guestfish-actions.pod:1815
8875 #: ../fish/guestfish-actions.pod:1875 ../fish/guestfish-actions.pod:1899
8876 #: ../fish/guestfish-actions.pod:1916 ../fish/guestfish-actions.pod:1929
8877 #: ../fish/guestfish-actions.pod:1964 ../fish/guestfish-actions.pod:1980
8878 #: ../fish/guestfish-actions.pod:2079 ../fish/guestfish-actions.pod:2113
8879 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
8883 #: ../src/guestfs-actions.pod:2510
8884 msgid "guestfs_inspect_get_distro"
8888 #: ../src/guestfs-actions.pod:2512
8892 " guestfs_inspect_get_distro (guestfs_h *g,\n"
8893 " const char *root);\n"
8898 #: ../src/guestfs-actions.pod:2519 ../fish/guestfish-actions.pod:1696
8900 "This returns the distro (distribution) of the inspected operating system."
8904 #: ../src/guestfs-actions.pod:2522 ../fish/guestfish-actions.pod:1699
8905 msgid "Currently defined distros are:"
8909 #: ../src/guestfs-actions.pod:2526 ../fish/guestfish-actions.pod:1703
8910 msgid "\"archlinux\""
8914 #: ../src/guestfs-actions.pod:2528 ../fish/guestfish-actions.pod:1705
8919 #: ../src/guestfs-actions.pod:2530 ../fish/guestfish-actions.pod:1707
8924 #: ../src/guestfs-actions.pod:2532 ../fish/guestfish-actions.pod:1709
8929 #: ../src/guestfs-actions.pod:2534 ../fish/guestfish-actions.pod:1711
8934 #: ../src/guestfs-actions.pod:2536 ../fish/guestfish-actions.pod:1713
8939 #: ../src/guestfs-actions.pod:2538 ../fish/guestfish-actions.pod:1715
8944 #: ../src/guestfs-actions.pod:2540 ../fish/guestfish-actions.pod:1717
8949 #: ../src/guestfs-actions.pod:2542 ../fish/guestfish-actions.pod:1719
8950 msgid "\"linuxmint\""
8954 #: ../src/guestfs-actions.pod:2544 ../fish/guestfish-actions.pod:1721
8959 #: ../src/guestfs-actions.pod:2546 ../fish/guestfish-actions.pod:1723
8960 msgid "\"mandriva\""
8964 #: ../src/guestfs-actions.pod:2548 ../fish/guestfish-actions.pod:1725
8969 #: ../src/guestfs-actions.pod:2550 ../fish/guestfish-actions.pod:1727
8974 #: ../src/guestfs-actions.pod:2552 ../fish/guestfish-actions.pod:1729
8979 #: ../src/guestfs-actions.pod:2554 ../fish/guestfish-actions.pod:1731
8984 #: ../src/guestfs-actions.pod:2556 ../fish/guestfish-actions.pod:1733
8989 #: ../src/guestfs-actions.pod:2558 ../fish/guestfish-actions.pod:1735
8990 msgid "\"redhat-based\""
8994 #: ../src/guestfs-actions.pod:2560 ../fish/guestfish-actions.pod:1737
8995 msgid "Some Red Hat-derived distro."
8999 #: ../src/guestfs-actions.pod:2562 ../fish/guestfish-actions.pod:1739
9004 #: ../src/guestfs-actions.pod:2564 ../fish/guestfish-actions.pod:1741
9005 msgid "Red Hat Enterprise Linux and some derivatives."
9009 #: ../src/guestfs-actions.pod:2566 ../fish/guestfish-actions.pod:1743
9014 #: ../src/guestfs-actions.pod:2568 ../fish/guestfish-actions.pod:1745
9019 #: ../src/guestfs-actions.pod:2570 ../src/guestfs-actions.pod:2850
9020 #: ../fish/guestfish-actions.pod:1747 ../fish/guestfish-actions.pod:1955
9025 #: ../src/guestfs-actions.pod:2572 ../fish/guestfish-actions.pod:1749
9026 msgid "The distro could not be determined."
9030 #: ../src/guestfs-actions.pod:2574 ../src/guestfs-actions.pod:2842
9031 #: ../fish/guestfish-actions.pod:1751 ../fish/guestfish-actions.pod:1947
9036 #: ../src/guestfs-actions.pod:2576 ../fish/guestfish-actions.pod:1753
9038 "Windows does not have distributions. This string is returned if the OS type "
9043 #: ../src/guestfs-actions.pod:2581 ../src/guestfs-actions.pod:2856
9044 #: ../fish/guestfish-actions.pod:1758 ../fish/guestfish-actions.pod:1961
9046 "Future versions of libguestfs may return other strings here. The caller "
9047 "should be prepared to handle any string."
9051 #: ../src/guestfs-actions.pod:2591
9052 msgid "guestfs_inspect_get_filesystems"
9056 #: ../src/guestfs-actions.pod:2593
9060 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
9061 " const char *root);\n"
9066 #: ../src/guestfs-actions.pod:2600 ../fish/guestfish-actions.pod:1770
9068 "This returns a list of all the filesystems that we think are associated with "
9069 "this operating system. This includes the root filesystem, other ordinary "
9070 "filesystems, and non-mounted devices like swap partitions."
9074 #: ../src/guestfs-actions.pod:2605 ../fish/guestfish-actions.pod:1775
9076 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
9077 "to be shared between operating systems."
9081 #: ../src/guestfs-actions.pod:2608
9083 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
9084 "C<guestfs_inspect_get_mountpoints>."
9088 #: ../src/guestfs-actions.pod:2617
9089 msgid "guestfs_inspect_get_hostname"
9093 #: ../src/guestfs-actions.pod:2619
9097 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
9098 " const char *root);\n"
9103 #: ../src/guestfs-actions.pod:2626 ../fish/guestfish-actions.pod:1788
9105 "This function returns the hostname of the operating system as found by "
9106 "inspection of the guest's configuration files."
9110 #: ../src/guestfs-actions.pod:2629 ../fish/guestfish-actions.pod:1791
9112 "If the hostname could not be determined, then the string C<unknown> is "
9117 #: ../src/guestfs-actions.pod:2637
9118 msgid "(Added in 1.7.9)"
9122 #: ../src/guestfs-actions.pod:2639
9123 msgid "guestfs_inspect_get_major_version"
9127 #: ../src/guestfs-actions.pod:2641
9131 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
9132 " const char *root);\n"
9137 #: ../src/guestfs-actions.pod:2648 ../fish/guestfish-actions.pod:1803
9139 "This returns the major version number of the inspected operating system."
9143 #: ../src/guestfs-actions.pod:2651 ../fish/guestfish-actions.pod:1806
9145 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
9146 "popular public names used by the operating system. Notably the operating "
9147 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
9148 "1). You can find out the real versions corresponding to releases of Windows "
9149 "by consulting Wikipedia or MSDN."
9153 #: ../src/guestfs-actions.pod:2658 ../src/guestfs-actions.pod:2678
9154 #: ../fish/guestfish-actions.pod:1813 ../fish/guestfish-actions.pod:1827
9155 msgid "If the version could not be determined, then C<0> is returned."
9159 #: ../src/guestfs-actions.pod:2666
9160 msgid "guestfs_inspect_get_minor_version"
9164 #: ../src/guestfs-actions.pod:2668
9168 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
9169 " const char *root);\n"
9174 #: ../src/guestfs-actions.pod:2675 ../fish/guestfish-actions.pod:1824
9176 "This returns the minor version number of the inspected operating system."
9180 #: ../src/guestfs-actions.pod:2680
9182 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
9183 "C<guestfs_inspect_get_major_version>."
9187 #: ../src/guestfs-actions.pod:2687
9188 msgid "guestfs_inspect_get_mountpoints"
9192 #: ../src/guestfs-actions.pod:2689
9196 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
9197 " const char *root);\n"
9202 #: ../src/guestfs-actions.pod:2696 ../fish/guestfish-actions.pod:1839
9204 "This returns a hash of where we think the filesystems associated with this "
9205 "operating system should be mounted. Callers should note that this is at "
9206 "best an educated guess made by reading configuration files such as C</etc/"
9211 #: ../src/guestfs-actions.pod:2701 ../fish/guestfish-actions.pod:1844
9213 "Each element in the returned hashtable has a key which is the path of the "
9214 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
9215 "mounted there (eg. C</dev/sda1>)."
9219 #: ../src/guestfs-actions.pod:2706 ../fish/guestfish-actions.pod:1849
9221 "Non-mounted devices such as swap devices are I<not> returned in this list."
9225 #: ../src/guestfs-actions.pod:2709
9227 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
9228 "C<guestfs_inspect_get_filesystems>."
9232 #: ../src/guestfs-actions.pod:2712 ../src/guestfs-actions.pod:3356
9233 #: ../src/guestfs-actions.pod:4550 ../src/guestfs-actions.pod:6406
9235 "This function returns a NULL-terminated array of strings, or NULL if there "
9236 "was an error. The array of strings will always have length C<2n+1>, where "
9237 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
9238 "caller must free the strings and the array after use>."
9242 #: ../src/guestfs-actions.pod:2720
9243 msgid "guestfs_inspect_get_package_format"
9247 #: ../src/guestfs-actions.pod:2722
9251 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
9252 " const char *root);\n"
9257 #: ../src/guestfs-actions.pod:2729
9259 "This function and C<guestfs_inspect_get_package_management> return the "
9260 "package format and package management tool used by the inspected operating "
9261 "system. For example for Fedora these functions would return C<rpm> (package "
9262 "format) and C<yum> (package management)."
9266 #: ../src/guestfs-actions.pod:2735 ../fish/guestfish-actions.pod:1868
9268 "This returns the string C<unknown> if we could not determine the package "
9269 "format I<or> if the operating system does not have a real packaging system "
9274 #: ../src/guestfs-actions.pod:2739 ../fish/guestfish-actions.pod:1872
9276 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>. "
9277 "Future versions of libguestfs may return other strings."
9281 #: ../src/guestfs-actions.pod:2747 ../src/guestfs-actions.pod:2778
9282 msgid "(Added in 1.7.5)"
9286 #: ../src/guestfs-actions.pod:2749
9287 msgid "guestfs_inspect_get_package_management"
9291 #: ../src/guestfs-actions.pod:2751
9295 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
9296 " const char *root);\n"
9301 #: ../src/guestfs-actions.pod:2758
9303 "C<guestfs_inspect_get_package_format> and this function return the package "
9304 "format and package management tool used by the inspected operating system. "
9305 "For example for Fedora these functions would return C<rpm> (package format) "
9306 "and C<yum> (package management)."
9310 #: ../src/guestfs-actions.pod:2764 ../fish/guestfish-actions.pod:1890
9312 "This returns the string C<unknown> if we could not determine the package "
9313 "management tool I<or> if the operating system does not have a real packaging "
9314 "system (eg. Windows)."
9318 #: ../src/guestfs-actions.pod:2768 ../fish/guestfish-actions.pod:1894
9320 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
9321 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>. Future versions of "
9322 "libguestfs may return other strings."
9326 #: ../src/guestfs-actions.pod:2780
9327 msgid "guestfs_inspect_get_product_name"
9331 #: ../src/guestfs-actions.pod:2782
9335 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
9336 " const char *root);\n"
9341 #: ../src/guestfs-actions.pod:2789 ../fish/guestfish-actions.pod:1908
9343 "This returns the product name of the inspected operating system. The "
9344 "product name is generally some freeform string which can be displayed to the "
9345 "user, but should not be parsed by programs."
9349 #: ../src/guestfs-actions.pod:2794 ../fish/guestfish-actions.pod:1913
9351 "If the product name could not be determined, then the string C<unknown> is "
9356 #: ../src/guestfs-actions.pod:2804
9357 msgid "guestfs_inspect_get_roots"
9361 #: ../src/guestfs-actions.pod:2806
9365 " guestfs_inspect_get_roots (guestfs_h *g);\n"
9370 #: ../src/guestfs-actions.pod:2809
9372 "This function is a convenient way to get the list of root devices, as "
9373 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
9374 "the whole inspection process."
9378 #: ../src/guestfs-actions.pod:2813
9380 "This returns an empty list if either no root devices were found or the "
9381 "caller has not called C<guestfs_inspect_os>."
9385 #: ../src/guestfs-actions.pod:2822
9386 msgid "(Added in 1.7.3)"
9390 #: ../src/guestfs-actions.pod:2824
9391 msgid "guestfs_inspect_get_type"
9395 #: ../src/guestfs-actions.pod:2826
9399 " guestfs_inspect_get_type (guestfs_h *g,\n"
9400 " const char *root);\n"
9405 #: ../src/guestfs-actions.pod:2833 ../fish/guestfish-actions.pod:1938
9407 "This returns the type of the inspected operating system. Currently defined "
9412 #: ../src/guestfs-actions.pod:2838 ../fish/guestfish-actions.pod:1943
9417 #: ../src/guestfs-actions.pod:2840 ../fish/guestfish-actions.pod:1945
9418 msgid "Any Linux-based operating system."
9422 #: ../src/guestfs-actions.pod:2844 ../fish/guestfish-actions.pod:1949
9423 msgid "Any Microsoft Windows operating system."
9427 #: ../src/guestfs-actions.pod:2846 ../fish/guestfish-actions.pod:1951
9432 #: ../src/guestfs-actions.pod:2848 ../fish/guestfish-actions.pod:1953
9437 #: ../src/guestfs-actions.pod:2852 ../fish/guestfish-actions.pod:1957
9438 msgid "The operating system type could not be determined."
9442 #: ../src/guestfs-actions.pod:2866
9443 msgid "guestfs_inspect_get_windows_systemroot"
9447 #: ../src/guestfs-actions.pod:2868
9451 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
9452 " const char *root);\n"
9457 #: ../src/guestfs-actions.pod:2875 ../fish/guestfish-actions.pod:1973
9459 "This returns the Windows systemroot of the inspected guest. The systemroot "
9460 "is a directory path such as C</WINDOWS>."
9464 #: ../src/guestfs-actions.pod:2878 ../fish/guestfish-actions.pod:1976
9466 "This call assumes that the guest is Windows and that the systemroot could be "
9467 "determined by inspection. If this is not the case then an error is returned."
9471 #: ../src/guestfs-actions.pod:2887
9472 msgid "(Added in 1.5.25)"
9476 #: ../src/guestfs-actions.pod:2889
9477 msgid "guestfs_inspect_list_applications"
9481 #: ../src/guestfs-actions.pod:2891
9484 " struct guestfs_application_list *\n"
9485 " guestfs_inspect_list_applications (guestfs_h *g,\n"
9486 " const char *root);\n"
9491 #: ../src/guestfs-actions.pod:2898 ../fish/guestfish-actions.pod:1989
9492 msgid "Return the list of applications installed in the operating system."
9496 #: ../src/guestfs-actions.pod:2900
9498 "I<Note:> This call works differently from other parts of the inspection "
9499 "API. You have to call C<guestfs_inspect_os>, then "
9500 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
9501 "this. Listing applications is a significantly more difficult operation "
9502 "which requires access to the full filesystem. Also note that unlike the "
9503 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
9504 "the libguestfs handle, this call actually reads parts of the mounted "
9505 "filesystems during the call."
9509 #: ../src/guestfs-actions.pod:2910 ../fish/guestfish-actions.pod:2001
9511 "This returns an empty list if the inspection code was not able to determine "
9512 "the list of applications."
9516 #: ../src/guestfs-actions.pod:2913 ../fish/guestfish-actions.pod:2004
9517 msgid "The application structure contains the following fields:"
9521 #: ../src/guestfs-actions.pod:2917 ../fish/guestfish-actions.pod:2008
9526 #: ../src/guestfs-actions.pod:2919 ../fish/guestfish-actions.pod:2010
9528 "The name of the application. For Red Hat-derived and Debian-derived Linux "
9529 "guests, this is the package name."
9533 #: ../src/guestfs-actions.pod:2922 ../fish/guestfish-actions.pod:2013
9534 msgid "C<app_display_name>"
9538 #: ../src/guestfs-actions.pod:2924 ../fish/guestfish-actions.pod:2015
9540 "The display name of the application, sometimes localized to the install "
9541 "language of the guest operating system."
9545 #: ../src/guestfs-actions.pod:2927 ../fish/guestfish-actions.pod:2018
9547 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
9548 "to display something can use C<app_name> instead."
9552 #: ../src/guestfs-actions.pod:2930 ../fish/guestfish-actions.pod:2021
9553 msgid "C<app_epoch>"
9557 #: ../src/guestfs-actions.pod:2932 ../fish/guestfish-actions.pod:2023
9559 "For package managers which use epochs, this contains the epoch of the "
9560 "package (an integer). If unavailable, this is returned as C<0>."
9564 #: ../src/guestfs-actions.pod:2935 ../fish/guestfish-actions.pod:2026
9565 msgid "C<app_version>"
9569 #: ../src/guestfs-actions.pod:2937 ../fish/guestfish-actions.pod:2028
9571 "The version string of the application or package. If unavailable this is "
9572 "returned as an empty string C<\"\">."
9576 #: ../src/guestfs-actions.pod:2940 ../fish/guestfish-actions.pod:2031
9577 msgid "C<app_release>"
9581 #: ../src/guestfs-actions.pod:2942 ../fish/guestfish-actions.pod:2033
9583 "The release string of the application or package, for package managers that "
9584 "use this. If unavailable this is returned as an empty string C<\"\">."
9588 #: ../src/guestfs-actions.pod:2946 ../fish/guestfish-actions.pod:2037
9589 msgid "C<app_install_path>"
9593 #: ../src/guestfs-actions.pod:2948 ../fish/guestfish-actions.pod:2039
9595 "The installation path of the application (on operating systems such as "
9596 "Windows which use installation paths). This path is in the format used by "
9597 "the guest operating system, it is not a libguestfs path."
9601 #: ../src/guestfs-actions.pod:2953 ../fish/guestfish-actions.pod:2044
9602 msgid "If unavailable this is returned as an empty string C<\"\">."
9606 #: ../src/guestfs-actions.pod:2955 ../fish/guestfish-actions.pod:2046
9607 msgid "C<app_trans_path>"
9611 #: ../src/guestfs-actions.pod:2957 ../fish/guestfish-actions.pod:2048
9613 "The install path translated into a libguestfs path. If unavailable this is "
9614 "returned as an empty string C<\"\">."
9618 #: ../src/guestfs-actions.pod:2960 ../fish/guestfish-actions.pod:2051
9619 msgid "C<app_publisher>"
9623 #: ../src/guestfs-actions.pod:2962 ../fish/guestfish-actions.pod:2053
9625 "The name of the publisher of the application, for package managers that use "
9626 "this. If unavailable this is returned as an empty string C<\"\">."
9630 #: ../src/guestfs-actions.pod:2966 ../fish/guestfish-actions.pod:2057
9635 #: ../src/guestfs-actions.pod:2968 ../fish/guestfish-actions.pod:2059
9637 "The URL (eg. upstream URL) of the application. If unavailable this is "
9638 "returned as an empty string C<\"\">."
9642 #: ../src/guestfs-actions.pod:2971 ../fish/guestfish-actions.pod:2062
9643 msgid "C<app_source_package>"
9647 #: ../src/guestfs-actions.pod:2973 ../fish/guestfish-actions.pod:2064
9649 "For packaging systems which support this, the name of the source package. "
9650 "If unavailable this is returned as an empty string C<\"\">."
9654 #: ../src/guestfs-actions.pod:2976 ../fish/guestfish-actions.pod:2067
9655 msgid "C<app_summary>"
9659 #: ../src/guestfs-actions.pod:2978 ../fish/guestfish-actions.pod:2069
9661 "A short (usually one line) description of the application or package. If "
9662 "unavailable this is returned as an empty string C<\"\">."
9666 #: ../src/guestfs-actions.pod:2981 ../fish/guestfish-actions.pod:2072
9667 msgid "C<app_description>"
9671 #: ../src/guestfs-actions.pod:2983 ../fish/guestfish-actions.pod:2074
9673 "A longer description of the application or package. If unavailable this is "
9674 "returned as an empty string C<\"\">."
9678 #: ../src/guestfs-actions.pod:2990
9680 "This function returns a C<struct guestfs_application_list *>, or NULL if "
9681 "there was an error. I<The caller must call C<guestfs_free_application_list> "
9686 #: ../src/guestfs-actions.pod:2994
9687 msgid "(Added in 1.7.8)"
9691 #: ../src/guestfs-actions.pod:2996
9692 msgid "guestfs_inspect_os"
9696 #: ../src/guestfs-actions.pod:2998
9700 " guestfs_inspect_os (guestfs_h *g);\n"
9705 #: ../src/guestfs-actions.pod:3001 ../fish/guestfish-actions.pod:2085
9707 "This function uses other libguestfs functions and certain heuristics to "
9708 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
9709 "for operating systems."
9713 #: ../src/guestfs-actions.pod:3005 ../fish/guestfish-actions.pod:2089
9714 msgid "The list returned is empty if no operating systems were found."
9718 #: ../src/guestfs-actions.pod:3007 ../fish/guestfish-actions.pod:2091
9720 "If one operating system was found, then this returns a list with a single "
9721 "element, which is the name of the root filesystem of this operating system. "
9722 "It is also possible for this function to return a list containing more than "
9723 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
9724 "element being the root filesystem of one of the operating systems."
9728 #: ../src/guestfs-actions.pod:3014
9730 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
9731 "functions in order to query further information about each operating system, "
9732 "such as the name and version."
9736 #: ../src/guestfs-actions.pod:3019
9738 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
9739 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
9740 "the contents. This should be called with no disks currently mounted. The "
9741 "function may also use Augeas, so any existing Augeas handle will be closed."
9745 #: ../src/guestfs-actions.pod:3025 ../fish/guestfish-actions.pod:2109
9747 "This function cannot decrypt encrypted disks. The caller must do that first "
9748 "(supplying the necessary keys) if the disk is encrypted."
9752 #: ../src/guestfs-actions.pod:3031 ../src/guestfs-actions.pod:3314
9753 #: ../src/guestfs-actions.pod:3376
9754 msgid "See also C<guestfs_list_filesystems>."
9758 #: ../src/guestfs-actions.pod:3039
9759 msgid "guestfs_is_blockdev"
9763 #: ../src/guestfs-actions.pod:3041
9767 " guestfs_is_blockdev (guestfs_h *g,\n"
9768 " const char *path);\n"
9773 #: ../src/guestfs-actions.pod:3045 ../fish/guestfish-actions.pod:2121
9775 "This returns C<true> if and only if there is a block device with the given "
9780 #: ../src/guestfs-actions.pod:3048 ../src/guestfs-actions.pod:3077
9781 #: ../src/guestfs-actions.pod:3107 ../src/guestfs-actions.pod:3122
9782 #: ../src/guestfs-actions.pod:3138 ../src/guestfs-actions.pod:3194
9783 #: ../src/guestfs-actions.pod:3209
9784 msgid "See also C<guestfs_stat>."
9788 #: ../src/guestfs-actions.pod:3052 ../src/guestfs-actions.pod:3081
9789 #: ../src/guestfs-actions.pod:3126 ../src/guestfs-actions.pod:3198
9790 #: ../src/guestfs-actions.pod:3213
9791 msgid "(Added in 1.5.10)"
9795 #: ../src/guestfs-actions.pod:3054
9796 msgid "guestfs_is_busy"
9800 #: ../src/guestfs-actions.pod:3056
9804 " guestfs_is_busy (guestfs_h *g);\n"
9809 #: ../src/guestfs-actions.pod:3059 ../fish/guestfish-actions.pod:2130
9811 "This returns true iff this handle is busy processing a command (in the "
9816 #: ../src/guestfs-actions.pod:3068
9817 msgid "guestfs_is_chardev"
9821 #: ../src/guestfs-actions.pod:3070
9825 " guestfs_is_chardev (guestfs_h *g,\n"
9826 " const char *path);\n"
9831 #: ../src/guestfs-actions.pod:3074 ../fish/guestfish-actions.pod:2139
9833 "This returns C<true> if and only if there is a character device with the "
9834 "given C<path> name."
9838 #: ../src/guestfs-actions.pod:3083
9839 msgid "guestfs_is_config"
9843 #: ../src/guestfs-actions.pod:3085
9847 " guestfs_is_config (guestfs_h *g);\n"
9852 #: ../src/guestfs-actions.pod:3088 ../fish/guestfish-actions.pod:2148
9854 "This returns true iff this handle is being configured (in the C<CONFIG> "
9859 #: ../src/guestfs-actions.pod:3097
9860 msgid "guestfs_is_dir"
9864 #: ../src/guestfs-actions.pod:3099
9868 " guestfs_is_dir (guestfs_h *g,\n"
9869 " const char *path);\n"
9874 #: ../src/guestfs-actions.pod:3103 ../fish/guestfish-actions.pod:2157
9876 "This returns C<true> if and only if there is a directory with the given "
9877 "C<path> name. Note that it returns false for other objects like files."
9881 #: ../src/guestfs-actions.pod:3113
9882 msgid "guestfs_is_fifo"
9886 #: ../src/guestfs-actions.pod:3115
9890 " guestfs_is_fifo (guestfs_h *g,\n"
9891 " const char *path);\n"
9896 #: ../src/guestfs-actions.pod:3119 ../fish/guestfish-actions.pod:2167
9898 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
9899 "given C<path> name."
9903 #: ../src/guestfs-actions.pod:3128
9904 msgid "guestfs_is_file"
9908 #: ../src/guestfs-actions.pod:3130
9912 " guestfs_is_file (guestfs_h *g,\n"
9913 " const char *path);\n"
9918 #: ../src/guestfs-actions.pod:3134 ../fish/guestfish-actions.pod:2176
9920 "This returns C<true> if and only if there is a regular file with the given "
9921 "C<path> name. Note that it returns false for other objects like directories."
9925 #: ../src/guestfs-actions.pod:3144
9926 msgid "guestfs_is_launching"
9930 #: ../src/guestfs-actions.pod:3146
9934 " guestfs_is_launching (guestfs_h *g);\n"
9939 #: ../src/guestfs-actions.pod:3149 ../fish/guestfish-actions.pod:2186
9941 "This returns true iff this handle is launching the subprocess (in the "
9942 "C<LAUNCHING> state)."
9946 #: ../src/guestfs-actions.pod:3158
9947 msgid "guestfs_is_lv"
9951 #: ../src/guestfs-actions.pod:3160
9955 " guestfs_is_lv (guestfs_h *g,\n"
9956 " const char *device);\n"
9961 #: ../src/guestfs-actions.pod:3164 ../fish/guestfish-actions.pod:2195
9963 "This command tests whether C<device> is a logical volume, and returns true "
9964 "iff this is the case."
9968 #: ../src/guestfs-actions.pod:3171
9969 msgid "guestfs_is_ready"
9973 #: ../src/guestfs-actions.pod:3173
9977 " guestfs_is_ready (guestfs_h *g);\n"
9982 #: ../src/guestfs-actions.pod:3176 ../fish/guestfish-actions.pod:2202
9984 "This returns true iff this handle is ready to accept commands (in the "
9989 #: ../src/guestfs-actions.pod:3185
9990 msgid "guestfs_is_socket"
9994 #: ../src/guestfs-actions.pod:3187
9998 " guestfs_is_socket (guestfs_h *g,\n"
9999 " const char *path);\n"
10004 #: ../src/guestfs-actions.pod:3191 ../fish/guestfish-actions.pod:2211
10006 "This returns C<true> if and only if there is a Unix domain socket with the "
10007 "given C<path> name."
10011 #: ../src/guestfs-actions.pod:3200
10012 msgid "guestfs_is_symlink"
10016 #: ../src/guestfs-actions.pod:3202
10020 " guestfs_is_symlink (guestfs_h *g,\n"
10021 " const char *path);\n"
10026 #: ../src/guestfs-actions.pod:3206 ../fish/guestfish-actions.pod:2220
10028 "This returns C<true> if and only if there is a symbolic link with the given "
10033 #: ../src/guestfs-actions.pod:3215
10034 msgid "guestfs_kill_subprocess"
10038 #: ../src/guestfs-actions.pod:3217
10042 " guestfs_kill_subprocess (guestfs_h *g);\n"
10047 #: ../src/guestfs-actions.pod:3220 ../fish/guestfish-actions.pod:2229
10048 msgid "This kills the qemu subprocess. You should never need to call this."
10052 #: ../src/guestfs-actions.pod:3226
10053 msgid "guestfs_launch"
10057 #: ../src/guestfs-actions.pod:3228
10061 " guestfs_launch (guestfs_h *g);\n"
10066 #: ../src/guestfs-actions.pod:3231 ../fish/guestfish-actions.pod:2237
10068 "Internally libguestfs is implemented by running a virtual machine using "
10073 #: ../src/guestfs-actions.pod:3234 ../fish/guestfish-actions.pod:2240
10075 "You should call this after configuring the handle (eg. adding drives) but "
10076 "before performing any actions."
10080 #: ../src/guestfs-actions.pod:3241
10081 msgid "guestfs_lchown"
10085 #: ../src/guestfs-actions.pod:3243
10089 " guestfs_lchown (guestfs_h *g,\n"
10092 " const char *path);\n"
10097 #: ../src/guestfs-actions.pod:3249
10099 "Change the file owner to C<owner> and group to C<group>. This is like "
10100 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
10101 "changed, not the target."
10105 #: ../src/guestfs-actions.pod:3261
10106 msgid "guestfs_lgetxattr"
10110 #: ../src/guestfs-actions.pod:3263
10114 " guestfs_lgetxattr (guestfs_h *g,\n"
10115 " const char *path,\n"
10116 " const char *name,\n"
10117 " size_t *size_r);\n"
10122 #: ../src/guestfs-actions.pod:3269 ../fish/guestfish-actions.pod:2259
10124 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
10125 "is a symlink, then this call returns an extended attribute from the symlink."
10129 #: ../src/guestfs-actions.pod:3283
10130 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
10134 #: ../src/guestfs-actions.pod:3289
10135 msgid "guestfs_lgetxattrs"
10139 #: ../src/guestfs-actions.pod:3291
10142 " struct guestfs_xattr_list *\n"
10143 " guestfs_lgetxattrs (guestfs_h *g,\n"
10144 " const char *path);\n"
10149 #: ../src/guestfs-actions.pod:3295
10151 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
10152 "then it returns the extended attributes of the link itself."
10156 #: ../src/guestfs-actions.pod:3305
10157 msgid "guestfs_list_devices"
10161 #: ../src/guestfs-actions.pod:3307
10165 " guestfs_list_devices (guestfs_h *g);\n"
10170 #: ../src/guestfs-actions.pod:3310 ../fish/guestfish-actions.pod:2287
10171 msgid "List all the block devices."
10175 #: ../src/guestfs-actions.pod:3312 ../fish/guestfish-actions.pod:2289
10176 msgid "The full block device names are returned, eg. C</dev/sda>."
10180 #: ../src/guestfs-actions.pod:3322
10181 msgid "guestfs_list_filesystems"
10185 #: ../src/guestfs-actions.pod:3324
10189 " guestfs_list_filesystems (guestfs_h *g);\n"
10194 #: ../src/guestfs-actions.pod:3327 ../fish/guestfish-actions.pod:2297
10196 "This inspection command looks for filesystems on partitions, block devices "
10197 "and logical volumes, returning a list of devices containing filesystems and "
10202 #: ../src/guestfs-actions.pod:3331 ../fish/guestfish-actions.pod:2301
10204 "The return value is a hash, where the keys are the devices containing "
10205 "filesystems, and the values are the filesystem types. For example:"
10209 #: ../src/guestfs-actions.pod:3335 ../fish/guestfish-actions.pod:2305
10212 " \"/dev/sda1\" => \"ntfs\"\n"
10213 " \"/dev/sda2\" => \"ext2\"\n"
10214 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
10215 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
10220 #: ../src/guestfs-actions.pod:3340 ../fish/guestfish-actions.pod:2310
10222 "The value can have the special value \"unknown\", meaning the content of the "
10223 "device is undetermined or empty. \"swap\" means a Linux swap partition."
10227 #: ../src/guestfs-actions.pod:3344
10229 "This command runs other libguestfs commands, which might include "
10230 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
10231 "soon after launch and only when nothing is mounted."
10235 #: ../src/guestfs-actions.pod:3348
10237 "Not all of the filesystems returned will be mountable. In particular, swap "
10238 "partitions are returned in the list. Also this command does not check that "
10239 "each filesystem found is valid and mountable, and some filesystems might be "
10240 "mountable but require special options. Filesystems may not all belong to a "
10241 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
10245 #: ../src/guestfs-actions.pod:3362 ../src/guestfs-actions.pod:4951
10246 msgid "(Added in 1.5.15)"
10250 #: ../src/guestfs-actions.pod:3364
10251 msgid "guestfs_list_partitions"
10255 #: ../src/guestfs-actions.pod:3366
10259 " guestfs_list_partitions (guestfs_h *g);\n"
10264 #: ../src/guestfs-actions.pod:3369 ../fish/guestfish-actions.pod:2330
10265 msgid "List all the partitions detected on all block devices."
10269 #: ../src/guestfs-actions.pod:3371 ../fish/guestfish-actions.pod:2332
10270 msgid "The full partition device names are returned, eg. C</dev/sda1>"
10274 #: ../src/guestfs-actions.pod:3373
10276 "This does not return logical volumes. For that you will need to call "
10281 #: ../src/guestfs-actions.pod:3384
10286 #: ../src/guestfs-actions.pod:3386
10290 " guestfs_ll (guestfs_h *g,\n"
10291 " const char *directory);\n"
10296 #: ../src/guestfs-actions.pod:3390 ../fish/guestfish-actions.pod:2343
10298 "List the files in C<directory> (relative to the root directory, there is no "
10299 "cwd) in the format of 'ls -la'."
10303 #: ../src/guestfs-actions.pod:3393 ../fish/guestfish-actions.pod:2346
10305 "This command is mostly useful for interactive sessions. It is I<not> "
10306 "intended that you try to parse the output string."
10310 #: ../src/guestfs-actions.pod:3401
10315 #: ../src/guestfs-actions.pod:3403
10319 " guestfs_ln (guestfs_h *g,\n"
10320 " const char *target,\n"
10321 " const char *linkname);\n"
10326 #: ../src/guestfs-actions.pod:3408 ../fish/guestfish-actions.pod:2353
10327 msgid "This command creates a hard link using the C<ln> command."
10331 #: ../src/guestfs-actions.pod:3414
10332 msgid "guestfs_ln_f"
10336 #: ../src/guestfs-actions.pod:3416
10340 " guestfs_ln_f (guestfs_h *g,\n"
10341 " const char *target,\n"
10342 " const char *linkname);\n"
10347 #: ../src/guestfs-actions.pod:3421 ../fish/guestfish-actions.pod:2359
10349 "This command creates a hard link using the C<ln -f> command. The C<-f> "
10350 "option removes the link (C<linkname>) if it exists already."
10354 #: ../src/guestfs-actions.pod:3428
10355 msgid "guestfs_ln_s"
10359 #: ../src/guestfs-actions.pod:3430
10363 " guestfs_ln_s (guestfs_h *g,\n"
10364 " const char *target,\n"
10365 " const char *linkname);\n"
10370 #: ../src/guestfs-actions.pod:3435 ../fish/guestfish-actions.pod:2366
10371 msgid "This command creates a symbolic link using the C<ln -s> command."
10375 #: ../src/guestfs-actions.pod:3441
10376 msgid "guestfs_ln_sf"
10380 #: ../src/guestfs-actions.pod:3443
10384 " guestfs_ln_sf (guestfs_h *g,\n"
10385 " const char *target,\n"
10386 " const char *linkname);\n"
10391 #: ../src/guestfs-actions.pod:3448 ../fish/guestfish-actions.pod:2372
10393 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
10394 "option removes the link (C<linkname>) if it exists already."
10398 #: ../src/guestfs-actions.pod:3455
10399 msgid "guestfs_lremovexattr"
10403 #: ../src/guestfs-actions.pod:3457
10407 " guestfs_lremovexattr (guestfs_h *g,\n"
10408 " const char *xattr,\n"
10409 " const char *path);\n"
10414 #: ../src/guestfs-actions.pod:3462
10416 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
10417 "link, then it removes an extended attribute of the link itself."
10421 #: ../src/guestfs-actions.pod:3470
10426 #: ../src/guestfs-actions.pod:3472
10430 " guestfs_ls (guestfs_h *g,\n"
10431 " const char *directory);\n"
10436 #: ../src/guestfs-actions.pod:3476 ../fish/guestfish-actions.pod:2387
10438 "List the files in C<directory> (relative to the root directory, there is no "
10439 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
10443 #: ../src/guestfs-actions.pod:3480
10445 "This command is mostly useful for interactive sessions. Programs should "
10446 "probably use C<guestfs_readdir> instead."
10450 #: ../src/guestfs-actions.pod:3489
10451 msgid "guestfs_lsetxattr"
10455 #: ../src/guestfs-actions.pod:3491
10459 " guestfs_lsetxattr (guestfs_h *g,\n"
10460 " const char *xattr,\n"
10461 " const char *val,\n"
10463 " const char *path);\n"
10468 #: ../src/guestfs-actions.pod:3498
10470 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
10471 "then it sets an extended attribute of the link itself."
10475 #: ../src/guestfs-actions.pod:3506
10476 msgid "guestfs_lstat"
10480 #: ../src/guestfs-actions.pod:3508
10483 " struct guestfs_stat *\n"
10484 " guestfs_lstat (guestfs_h *g,\n"
10485 " const char *path);\n"
10490 #: ../src/guestfs-actions.pod:3512 ../src/guestfs-actions.pod:6005
10491 #: ../fish/guestfish-actions.pod:2406 ../fish/guestfish-actions.pod:4019
10492 msgid "Returns file information for the given C<path>."
10496 #: ../src/guestfs-actions.pod:3514
10498 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
10499 "link, then the link is stat-ed, not the file it refers to."
10503 #: ../src/guestfs-actions.pod:3518 ../fish/guestfish-actions.pod:2412
10504 msgid "This is the same as the C<lstat(2)> system call."
10508 #: ../src/guestfs-actions.pod:3520 ../src/guestfs-actions.pod:6009
10510 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
10511 "error. I<The caller must call C<guestfs_free_stat> after use>."
10515 #: ../src/guestfs-actions.pod:3524 ../src/guestfs-actions.pod:6013
10516 #: ../src/guestfs-actions.pod:6031 ../src/guestfs-actions.pod:6412
10517 msgid "(Added in 0.9.2)"
10521 #: ../src/guestfs-actions.pod:3526
10522 msgid "guestfs_lstatlist"
10526 #: ../src/guestfs-actions.pod:3528
10529 " struct guestfs_stat_list *\n"
10530 " guestfs_lstatlist (guestfs_h *g,\n"
10531 " const char *path,\n"
10532 " char *const *names);\n"
10537 #: ../src/guestfs-actions.pod:3533
10539 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
10540 "files, where all files are in the directory C<path>. C<names> is the list "
10541 "of files from this directory."
10545 #: ../src/guestfs-actions.pod:3537 ../fish/guestfish-actions.pod:2422
10547 "On return you get a list of stat structs, with a one-to-one correspondence "
10548 "to the C<names> list. If any name did not exist or could not be lstat'd, "
10549 "then the C<ino> field of that structure is set to C<-1>."
10553 #: ../src/guestfs-actions.pod:3542
10555 "This call is intended for programs that want to efficiently list a directory "
10556 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
10557 "for a similarly efficient call for getting extended attributes. Very long "
10558 "directory listings might cause the protocol message size to be exceeded, "
10559 "causing this call to fail. The caller must split up such requests into "
10560 "smaller groups of names."
10564 #: ../src/guestfs-actions.pod:3550
10566 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
10567 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
10571 #: ../src/guestfs-actions.pod:3556
10572 msgid "guestfs_luks_add_key"
10576 #: ../src/guestfs-actions.pod:3558
10580 " guestfs_luks_add_key (guestfs_h *g,\n"
10581 " const char *device,\n"
10582 " const char *key,\n"
10583 " const char *newkey,\n"
10589 #: ../src/guestfs-actions.pod:3565 ../fish/guestfish-actions.pod:2439
10591 "This command adds a new key on LUKS device C<device>. C<key> is any "
10592 "existing key, and is used to access the device. C<newkey> is the new key to "
10593 "add. C<keyslot> is the key slot that will be replaced."
10597 #: ../src/guestfs-actions.pod:3570
10599 "Note that if C<keyslot> already contains a key, then this command will "
10600 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
10604 #: ../src/guestfs-actions.pod:3576 ../src/guestfs-actions.pod:3616
10605 #: ../src/guestfs-actions.pod:3639 ../src/guestfs-actions.pod:3659
10606 #: ../src/guestfs-actions.pod:3691 ../src/guestfs-actions.pod:3710
10608 "This function takes a key or passphrase parameter which could contain "
10609 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
10614 #: ../src/guestfs-actions.pod:3580 ../src/guestfs-actions.pod:3620
10615 #: ../src/guestfs-actions.pod:3643 ../src/guestfs-actions.pod:3663
10616 msgid "(Added in 1.5.2)"
10620 #: ../src/guestfs-actions.pod:3582
10621 msgid "guestfs_luks_close"
10625 #: ../src/guestfs-actions.pod:3584
10629 " guestfs_luks_close (guestfs_h *g,\n"
10630 " const char *device);\n"
10635 #: ../src/guestfs-actions.pod:3588
10637 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
10638 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
10639 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
10640 "underlying block device."
10644 #: ../src/guestfs-actions.pod:3596 ../src/guestfs-actions.pod:3695
10645 #: ../src/guestfs-actions.pod:3714 ../src/guestfs-actions.pod:3764
10646 #: ../src/guestfs-actions.pod:3812
10647 msgid "(Added in 1.5.1)"
10651 #: ../src/guestfs-actions.pod:3598
10652 msgid "guestfs_luks_format"
10656 #: ../src/guestfs-actions.pod:3600
10660 " guestfs_luks_format (guestfs_h *g,\n"
10661 " const char *device,\n"
10662 " const char *key,\n"
10668 #: ../src/guestfs-actions.pod:3606 ../fish/guestfish-actions.pod:2465
10670 "This command erases existing data on C<device> and formats the device as a "
10671 "LUKS encrypted device. C<key> is the initial key, which is added to key "
10672 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
10676 #: ../src/guestfs-actions.pod:3613 ../src/guestfs-actions.pod:3636
10677 #: ../src/guestfs-actions.pod:3776 ../src/guestfs-actions.pod:4702
10678 #: ../src/guestfs-actions.pod:5465 ../src/guestfs-actions.pod:5840
10679 #: ../src/guestfs-actions.pod:5863 ../src/guestfs-actions.pod:5889
10680 #: ../src/guestfs-actions.pod:7049 ../fish/guestfish-actions.pod:2473
10681 #: ../fish/guestfish-actions.pod:2486 ../fish/guestfish-actions.pod:2570
10682 #: ../fish/guestfish-actions.pod:3131 ../fish/guestfish-actions.pod:3638
10683 #: ../fish/guestfish-actions.pod:3918 ../fish/guestfish-actions.pod:3934
10684 #: ../fish/guestfish-actions.pod:3949 ../fish/guestfish-actions.pod:4664
10686 "B<This command is dangerous. Without careful use you can easily destroy all "
10691 #: ../src/guestfs-actions.pod:3622
10692 msgid "guestfs_luks_format_cipher"
10696 #: ../src/guestfs-actions.pod:3624
10700 " guestfs_luks_format_cipher (guestfs_h *g,\n"
10701 " const char *device,\n"
10702 " const char *key,\n"
10704 " const char *cipher);\n"
10709 #: ../src/guestfs-actions.pod:3631
10711 "This command is the same as C<guestfs_luks_format> but it also allows you to "
10712 "set the C<cipher> used."
10716 #: ../src/guestfs-actions.pod:3645
10717 msgid "guestfs_luks_kill_slot"
10721 #: ../src/guestfs-actions.pod:3647
10725 " guestfs_luks_kill_slot (guestfs_h *g,\n"
10726 " const char *device,\n"
10727 " const char *key,\n"
10733 #: ../src/guestfs-actions.pod:3653 ../fish/guestfish-actions.pod:2493
10735 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
10736 "device C<device>. C<key> must be one of the I<other> keys."
10740 #: ../src/guestfs-actions.pod:3665
10741 msgid "guestfs_luks_open"
10745 #: ../src/guestfs-actions.pod:3667
10749 " guestfs_luks_open (guestfs_h *g,\n"
10750 " const char *device,\n"
10751 " const char *key,\n"
10752 " const char *mapname);\n"
10757 #: ../src/guestfs-actions.pod:3673 ../fish/guestfish-actions.pod:2504
10759 "This command opens a block device which has been encrypted according to the "
10760 "Linux Unified Key Setup (LUKS) standard."
10764 #: ../src/guestfs-actions.pod:3676 ../fish/guestfish-actions.pod:2507
10765 msgid "C<device> is the encrypted block device or partition."
10769 #: ../src/guestfs-actions.pod:3678 ../fish/guestfish-actions.pod:2509
10771 "The caller must supply one of the keys associated with the LUKS block "
10772 "device, in the C<key> parameter."
10776 #: ../src/guestfs-actions.pod:3681 ../fish/guestfish-actions.pod:2512
10778 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
10779 "writes to this block device are decrypted from and encrypted to the "
10780 "underlying C<device> respectively."
10784 #: ../src/guestfs-actions.pod:3685
10786 "If this block device contains LVM volume groups, then calling "
10787 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
10792 #: ../src/guestfs-actions.pod:3697
10793 msgid "guestfs_luks_open_ro"
10797 #: ../src/guestfs-actions.pod:3699
10801 " guestfs_luks_open_ro (guestfs_h *g,\n"
10802 " const char *device,\n"
10803 " const char *key,\n"
10804 " const char *mapname);\n"
10809 #: ../src/guestfs-actions.pod:3705
10811 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
10816 #: ../src/guestfs-actions.pod:3716
10817 msgid "guestfs_lvcreate"
10821 #: ../src/guestfs-actions.pod:3718
10825 " guestfs_lvcreate (guestfs_h *g,\n"
10826 " const char *logvol,\n"
10827 " const char *volgroup,\n"
10833 #: ../src/guestfs-actions.pod:3724 ../fish/guestfish-actions.pod:2537
10835 "This creates an LVM logical volume called C<logvol> on the volume group "
10836 "C<volgroup>, with C<size> megabytes."
10840 #: ../src/guestfs-actions.pod:3731
10841 msgid "guestfs_lvm_canonical_lv_name"
10845 #: ../src/guestfs-actions.pod:3733
10849 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
10850 " const char *lvname);\n"
10855 #: ../src/guestfs-actions.pod:3737 ../fish/guestfish-actions.pod:2544
10857 "This converts alternative naming schemes for LVs that you might find to the "
10858 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
10863 #: ../src/guestfs-actions.pod:3741 ../fish/guestfish-actions.pod:2548
10865 "This command returns an error if the C<lvname> parameter does not refer to a "
10870 #: ../src/guestfs-actions.pod:3744
10871 msgid "See also C<guestfs_is_lv>."
10875 #: ../src/guestfs-actions.pod:3749
10876 msgid "(Added in 1.5.24)"
10880 #: ../src/guestfs-actions.pod:3751
10881 msgid "guestfs_lvm_clear_filter"
10885 #: ../src/guestfs-actions.pod:3753
10889 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
10894 #: ../src/guestfs-actions.pod:3756
10896 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
10897 "see every block device."
10901 #: ../src/guestfs-actions.pod:3759 ../src/guestfs-actions.pod:3801
10902 #: ../fish/guestfish-actions.pod:2560 ../fish/guestfish-actions.pod:2591
10904 "This command also clears the LVM cache and performs a volume group scan."
10908 #: ../src/guestfs-actions.pod:3766
10909 msgid "guestfs_lvm_remove_all"
10913 #: ../src/guestfs-actions.pod:3768
10917 " guestfs_lvm_remove_all (guestfs_h *g);\n"
10922 #: ../src/guestfs-actions.pod:3771 ../fish/guestfish-actions.pod:2567
10924 "This command removes all LVM logical volumes, volume groups and physical "
10929 #: ../src/guestfs-actions.pod:3781
10930 msgid "guestfs_lvm_set_filter"
10934 #: ../src/guestfs-actions.pod:3783
10938 " guestfs_lvm_set_filter (guestfs_h *g,\n"
10939 " char *const *devices);\n"
10944 #: ../src/guestfs-actions.pod:3787 ../fish/guestfish-actions.pod:2577
10946 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
10947 "block devices in the list C<devices>, and will ignore all other attached "
10952 #: ../src/guestfs-actions.pod:3791 ../fish/guestfish-actions.pod:2581
10954 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
10955 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
10956 "there are two types of duplication possible: either cloned PVs/VGs which "
10957 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
10958 "same name. In normal operation you cannot create this situation, but you "
10959 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
10960 "inside the LVM metadata."
10964 #: ../src/guestfs-actions.pod:3804 ../fish/guestfish-actions.pod:2594
10965 msgid "You can filter whole block devices or individual partitions."
10969 #: ../src/guestfs-actions.pod:3806 ../fish/guestfish-actions.pod:2596
10971 "You cannot use this if any VG is currently in use (eg. contains a mounted "
10972 "filesystem), even if you are not filtering out that VG."
10976 #: ../src/guestfs-actions.pod:3814
10977 msgid "guestfs_lvremove"
10981 #: ../src/guestfs-actions.pod:3816
10985 " guestfs_lvremove (guestfs_h *g,\n"
10986 " const char *device);\n"
10991 #: ../src/guestfs-actions.pod:3820 ../fish/guestfish-actions.pod:2604
10993 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
10994 "LV, such as C</dev/VG/LV>."
10998 #: ../src/guestfs-actions.pod:3823 ../fish/guestfish-actions.pod:2607
11000 "You can also remove all LVs in a volume group by specifying the VG name, C</"
11005 #: ../src/guestfs-actions.pod:3828 ../src/guestfs-actions.pod:5048
11006 #: ../src/guestfs-actions.pod:6788
11007 msgid "(Added in 1.0.13)"
11011 #: ../src/guestfs-actions.pod:3830
11012 msgid "guestfs_lvrename"
11016 #: ../src/guestfs-actions.pod:3832
11020 " guestfs_lvrename (guestfs_h *g,\n"
11021 " const char *logvol,\n"
11022 " const char *newlogvol);\n"
11027 #: ../src/guestfs-actions.pod:3837 ../fish/guestfish-actions.pod:2614
11028 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
11032 #: ../src/guestfs-actions.pod:3841 ../src/guestfs-actions.pod:6801
11033 msgid "(Added in 1.0.83)"
11037 #: ../src/guestfs-actions.pod:3843
11038 msgid "guestfs_lvresize"
11042 #: ../src/guestfs-actions.pod:3845
11046 " guestfs_lvresize (guestfs_h *g,\n"
11047 " const char *device,\n"
11053 #: ../src/guestfs-actions.pod:3850 ../fish/guestfish-actions.pod:2620
11055 "This resizes (expands or shrinks) an existing LVM logical volume to "
11056 "C<mbytes>. When reducing, data in the reduced part is lost."
11060 #: ../src/guestfs-actions.pod:3858
11061 msgid "guestfs_lvresize_free"
11065 #: ../src/guestfs-actions.pod:3860
11069 " guestfs_lvresize_free (guestfs_h *g,\n"
11070 " const char *lv,\n"
11076 #: ../src/guestfs-actions.pod:3865 ../fish/guestfish-actions.pod:2628
11078 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
11079 "remaining free space in the volume group. Commonly you would call this with "
11080 "pc = 100 which expands the logical volume as much as possible, using all "
11081 "remaining free space in the volume group."
11085 #: ../src/guestfs-actions.pod:3873
11086 msgid "(Added in 1.3.3)"
11090 #: ../src/guestfs-actions.pod:3875
11091 msgid "guestfs_lvs"
11095 #: ../src/guestfs-actions.pod:3877
11099 " guestfs_lvs (guestfs_h *g);\n"
11104 #: ../src/guestfs-actions.pod:3880 ../fish/guestfish-actions.pod:2638
11106 "List all the logical volumes detected. This is the equivalent of the L<lvs"
11111 #: ../src/guestfs-actions.pod:3883 ../fish/guestfish-actions.pod:2641
11113 "This returns a list of the logical volume device names (eg. C</dev/"
11114 "VolGroup00/LogVol00>)."
11118 #: ../src/guestfs-actions.pod:3886
11119 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
11123 #: ../src/guestfs-actions.pod:3894
11124 msgid "guestfs_lvs_full"
11128 #: ../src/guestfs-actions.pod:3896
11131 " struct guestfs_lvm_lv_list *\n"
11132 " guestfs_lvs_full (guestfs_h *g);\n"
11137 #: ../src/guestfs-actions.pod:3899 ../fish/guestfish-actions.pod:2650
11139 "List all the logical volumes detected. This is the equivalent of the L<lvs"
11140 "(8)> command. The \"full\" version includes all fields."
11144 #: ../src/guestfs-actions.pod:3902
11146 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
11147 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after use>."
11151 #: ../src/guestfs-actions.pod:3908
11152 msgid "guestfs_lvuuid"
11156 #: ../src/guestfs-actions.pod:3910
11160 " guestfs_lvuuid (guestfs_h *g,\n"
11161 " const char *device);\n"
11166 #: ../src/guestfs-actions.pod:3914 ../fish/guestfish-actions.pod:2657
11167 msgid "This command returns the UUID of the LVM LV C<device>."
11171 #: ../src/guestfs-actions.pod:3921
11172 msgid "guestfs_lxattrlist"
11176 #: ../src/guestfs-actions.pod:3923
11179 " struct guestfs_xattr_list *\n"
11180 " guestfs_lxattrlist (guestfs_h *g,\n"
11181 " const char *path,\n"
11182 " char *const *names);\n"
11187 #: ../src/guestfs-actions.pod:3928 ../fish/guestfish-actions.pod:2663
11189 "This call allows you to get the extended attributes of multiple files, where "
11190 "all files are in the directory C<path>. C<names> is the list of files from "
11195 #: ../src/guestfs-actions.pod:3932 ../fish/guestfish-actions.pod:2667
11197 "On return you get a flat list of xattr structs which must be interpreted "
11198 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
11199 "C<attrval> in this struct is zero-length to indicate there was an error "
11200 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
11201 "number (the number of following attributes for this file, which could be C<"
11202 "\"0\">). Then after the first xattr struct are the zero or more attributes "
11203 "for the first named file. This repeats for the second and subsequent files."
11207 #: ../src/guestfs-actions.pod:3942
11209 "This call is intended for programs that want to efficiently list a directory "
11210 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
11211 "a similarly efficient call for getting standard stats. Very long directory "
11212 "listings might cause the protocol message size to be exceeded, causing this "
11213 "call to fail. The caller must split up such requests into smaller groups of "
11218 #: ../src/guestfs-actions.pod:3956
11219 msgid "guestfs_mkdir"
11223 #: ../src/guestfs-actions.pod:3958
11227 " guestfs_mkdir (guestfs_h *g,\n"
11228 " const char *path);\n"
11233 #: ../src/guestfs-actions.pod:3962 ../fish/guestfish-actions.pod:2689
11234 msgid "Create a directory named C<path>."
11238 #: ../src/guestfs-actions.pod:3968
11239 msgid "guestfs_mkdir_mode"
11243 #: ../src/guestfs-actions.pod:3970
11247 " guestfs_mkdir_mode (guestfs_h *g,\n"
11248 " const char *path,\n"
11254 #: ../src/guestfs-actions.pod:3975 ../fish/guestfish-actions.pod:2695
11256 "This command creates a directory, setting the initial permissions of the "
11257 "directory to C<mode>."
11261 #: ../src/guestfs-actions.pod:3978 ../fish/guestfish-actions.pod:2698
11263 "For common Linux filesystems, the actual mode which is set will be C<mode & "
11264 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
11269 #: ../src/guestfs-actions.pod:3982
11270 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
11274 #: ../src/guestfs-actions.pod:3988
11275 msgid "guestfs_mkdir_p"
11279 #: ../src/guestfs-actions.pod:3990
11283 " guestfs_mkdir_p (guestfs_h *g,\n"
11284 " const char *path);\n"
11289 #: ../src/guestfs-actions.pod:3994 ../fish/guestfish-actions.pod:2708
11291 "Create a directory named C<path>, creating any parent directories as "
11292 "necessary. This is like the C<mkdir -p> shell command."
11296 #: ../src/guestfs-actions.pod:4001
11297 msgid "guestfs_mkdtemp"
11301 #: ../src/guestfs-actions.pod:4003
11305 " guestfs_mkdtemp (guestfs_h *g,\n"
11306 " const char *template);\n"
11311 #: ../src/guestfs-actions.pod:4007 ../fish/guestfish-actions.pod:2715
11313 "This command creates a temporary directory. The C<template> parameter "
11314 "should be a full pathname for the temporary directory name with the final "
11315 "six characters being \"XXXXXX\"."
11319 #: ../src/guestfs-actions.pod:4012 ../fish/guestfish-actions.pod:2720
11321 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
11322 "being suitable for Windows filesystems."
11326 #: ../src/guestfs-actions.pod:4015 ../fish/guestfish-actions.pod:2723
11327 msgid "The name of the temporary directory that was created is returned."
11331 #: ../src/guestfs-actions.pod:4018 ../fish/guestfish-actions.pod:2726
11332 msgid "The temporary directory is created with mode 0700 and is owned by root."
11336 #: ../src/guestfs-actions.pod:4021 ../fish/guestfish-actions.pod:2729
11338 "The caller is responsible for deleting the temporary directory and its "
11339 "contents after use."
11343 #: ../src/guestfs-actions.pod:4024 ../fish/guestfish-actions.pod:2732
11344 msgid "See also: L<mkdtemp(3)>"
11348 #: ../src/guestfs-actions.pod:4031
11349 msgid "guestfs_mke2fs_J"
11353 #: ../src/guestfs-actions.pod:4033
11357 " guestfs_mke2fs_J (guestfs_h *g,\n"
11358 " const char *fstype,\n"
11359 " int blocksize,\n"
11360 " const char *device,\n"
11361 " const char *journal);\n"
11366 #: ../src/guestfs-actions.pod:4040 ../fish/guestfish-actions.pod:2738
11368 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
11369 "C<journal>. It is equivalent to the command:"
11373 #: ../src/guestfs-actions.pod:4044 ../fish/guestfish-actions.pod:2742
11376 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
11381 #: ../src/guestfs-actions.pod:4046
11382 msgid "See also C<guestfs_mke2journal>."
11386 #: ../src/guestfs-actions.pod:4050 ../src/guestfs-actions.pod:4068
11387 #: ../src/guestfs-actions.pod:4086 ../src/guestfs-actions.pod:4102
11388 #: ../src/guestfs-actions.pod:4116 ../src/guestfs-actions.pod:4130
11389 #: ../src/guestfs-actions.pod:4189 ../src/guestfs-actions.pod:4438
11390 msgid "(Added in 1.0.68)"
11394 #: ../src/guestfs-actions.pod:4052
11395 msgid "guestfs_mke2fs_JL"
11399 #: ../src/guestfs-actions.pod:4054
11403 " guestfs_mke2fs_JL (guestfs_h *g,\n"
11404 " const char *fstype,\n"
11405 " int blocksize,\n"
11406 " const char *device,\n"
11407 " const char *label);\n"
11412 #: ../src/guestfs-actions.pod:4061 ../fish/guestfish-actions.pod:2750
11414 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
11415 "the journal labeled C<label>."
11419 #: ../src/guestfs-actions.pod:4064
11420 msgid "See also C<guestfs_mke2journal_L>."
11424 #: ../src/guestfs-actions.pod:4070
11425 msgid "guestfs_mke2fs_JU"
11429 #: ../src/guestfs-actions.pod:4072
11433 " guestfs_mke2fs_JU (guestfs_h *g,\n"
11434 " const char *fstype,\n"
11435 " int blocksize,\n"
11436 " const char *device,\n"
11437 " const char *uuid);\n"
11442 #: ../src/guestfs-actions.pod:4079 ../fish/guestfish-actions.pod:2759
11444 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
11445 "the journal with UUID C<uuid>."
11449 #: ../src/guestfs-actions.pod:4082
11450 msgid "See also C<guestfs_mke2journal_U>."
11454 #: ../src/guestfs-actions.pod:4088
11455 msgid "guestfs_mke2journal"
11459 #: ../src/guestfs-actions.pod:4090
11463 " guestfs_mke2journal (guestfs_h *g,\n"
11464 " int blocksize,\n"
11465 " const char *device);\n"
11470 #: ../src/guestfs-actions.pod:4095 ../fish/guestfish-actions.pod:2768
11472 "This creates an ext2 external journal on C<device>. It is equivalent to the "
11477 #: ../src/guestfs-actions.pod:4098 ../fish/guestfish-actions.pod:2771
11480 " mke2fs -O journal_dev -b blocksize device\n"
11485 #: ../src/guestfs-actions.pod:4104
11486 msgid "guestfs_mke2journal_L"
11490 #: ../src/guestfs-actions.pod:4106
11494 " guestfs_mke2journal_L (guestfs_h *g,\n"
11495 " int blocksize,\n"
11496 " const char *label,\n"
11497 " const char *device);\n"
11502 #: ../src/guestfs-actions.pod:4112 ../fish/guestfish-actions.pod:2777
11503 msgid "This creates an ext2 external journal on C<device> with label C<label>."
11507 #: ../src/guestfs-actions.pod:4118
11508 msgid "guestfs_mke2journal_U"
11512 #: ../src/guestfs-actions.pod:4120
11516 " guestfs_mke2journal_U (guestfs_h *g,\n"
11517 " int blocksize,\n"
11518 " const char *uuid,\n"
11519 " const char *device);\n"
11524 #: ../src/guestfs-actions.pod:4126 ../fish/guestfish-actions.pod:2783
11525 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
11529 #: ../src/guestfs-actions.pod:4132
11530 msgid "guestfs_mkfifo"
11534 #: ../src/guestfs-actions.pod:4134
11538 " guestfs_mkfifo (guestfs_h *g,\n"
11540 " const char *path);\n"
11545 #: ../src/guestfs-actions.pod:4139
11547 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
11548 "is just a convenient wrapper around C<guestfs_mknod>."
11552 #: ../src/guestfs-actions.pod:4149
11553 msgid "guestfs_mkfs"
11557 #: ../src/guestfs-actions.pod:4151
11561 " guestfs_mkfs (guestfs_h *g,\n"
11562 " const char *fstype,\n"
11563 " const char *device);\n"
11568 #: ../src/guestfs-actions.pod:4156 ../fish/guestfish-actions.pod:2799
11570 "This creates a filesystem on C<device> (usually a partition or LVM logical "
11571 "volume). The filesystem type is C<fstype>, for example C<ext3>."
11575 #: ../src/guestfs-actions.pod:4164
11576 msgid "guestfs_mkfs_b"
11580 #: ../src/guestfs-actions.pod:4166
11584 " guestfs_mkfs_b (guestfs_h *g,\n"
11585 " const char *fstype,\n"
11586 " int blocksize,\n"
11587 " const char *device);\n"
11592 #: ../src/guestfs-actions.pod:4172
11594 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
11595 "block size of the resulting filesystem. Supported block sizes depend on the "
11596 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
11600 #: ../src/guestfs-actions.pod:4177 ../src/guestfs-actions.pod:4219
11601 #: ../fish/guestfish-actions.pod:2812 ../fish/guestfish-actions.pod:2839
11603 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
11608 #: ../src/guestfs-actions.pod:4182 ../fish/guestfish-actions.pod:2815
11610 "This function is deprecated. In new code, use the C<mkfs_opts> call instead."
11614 #: ../src/guestfs-actions.pod:4191
11615 msgid "guestfs_mkfs_opts"
11619 #: ../src/guestfs-actions.pod:4193
11623 " guestfs_mkfs_opts (guestfs_h *g,\n"
11624 " const char *fstype,\n"
11625 " const char *device,\n"
11631 #: ../src/guestfs-actions.pod:4204
11634 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
11639 #: ../src/guestfs-actions.pod:4206 ../fish/guestfish-actions.pod:2826
11641 "This function creates a filesystem on C<device>. The filesystem type is "
11642 "C<fstype>, for example C<ext3>."
11646 #: ../src/guestfs-actions.pod:4213 ../fish/guestfish-actions.pod:2833
11647 msgid "C<blocksize>"
11651 #: ../src/guestfs-actions.pod:4215 ../fish/guestfish-actions.pod:2835
11653 "The filesystem block size. Supported block sizes depend on the filesystem "
11654 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
11659 #: ../src/guestfs-actions.pod:4226
11660 msgid "guestfs_mkfs_opts_va"
11664 #: ../src/guestfs-actions.pod:4228
11668 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
11669 " const char *fstype,\n"
11670 " const char *device,\n"
11671 " va_list args);\n"
11676 #: ../src/guestfs-actions.pod:4234
11677 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
11681 #: ../src/guestfs-actions.pod:4238
11682 msgid "guestfs_mkfs_opts_argv"
11686 #: ../src/guestfs-actions.pod:4240
11690 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
11691 " const char *fstype,\n"
11692 " const char *device,\n"
11693 " const struct guestfs_mkfs_opts_argv *optargs);\n"
11698 #: ../src/guestfs-actions.pod:4246
11699 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
11703 #: ../src/guestfs-actions.pod:4250
11704 msgid "guestfs_mkmountpoint"
11708 #: ../src/guestfs-actions.pod:4252
11712 " guestfs_mkmountpoint (guestfs_h *g,\n"
11713 " const char *exemptpath);\n"
11718 #: ../src/guestfs-actions.pod:4256
11720 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
11721 "that can be used to create extra mountpoints before mounting the first "
11726 #: ../src/guestfs-actions.pod:4260 ../fish/guestfish-actions.pod:2854
11728 "These calls are I<only> necessary in some very limited circumstances, mainly "
11729 "the case where you want to mount a mix of unrelated and/or read-only "
11730 "filesystems together."
11734 #: ../src/guestfs-actions.pod:4264 ../fish/guestfish-actions.pod:2858
11736 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
11737 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
11738 "inside that. You can unpack this as follows in guestfish:"
11742 #: ../src/guestfs-actions.pod:4269 ../fish/guestfish-actions.pod:2863
11745 " add-ro Fedora-11-i686-Live.iso\n"
11747 " mkmountpoint /cd\n"
11748 " mkmountpoint /sqsh\n"
11749 " mkmountpoint /ext3fs\n"
11750 " mount /dev/sda /cd\n"
11751 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
11752 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
11757 #: ../src/guestfs-actions.pod:4278 ../fish/guestfish-actions.pod:2872
11758 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
11762 #: ../src/guestfs-actions.pod:4280
11764 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
11765 "may get unexpected errors if you try to mix these calls. It is safest to "
11766 "manually unmount filesystems and remove mountpoints after use."
11770 #: ../src/guestfs-actions.pod:4284
11772 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
11773 "first, so for this to work for manual mountpoints, you must ensure that the "
11774 "innermost mountpoints have the longest pathnames, as in the example code "
11779 #: ../src/guestfs-actions.pod:4289 ../fish/guestfish-actions.pod:2883
11781 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
11785 #: ../src/guestfs-actions.pod:4291
11787 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
11788 "means that C<guestfs_umount_all> is called when the handle is closed which "
11789 "can also trigger these issues."
11793 #: ../src/guestfs-actions.pod:4297 ../src/guestfs-actions.pod:4556
11794 #: ../src/guestfs-actions.pod:5449
11795 msgid "(Added in 1.0.62)"
11799 #: ../src/guestfs-actions.pod:4299
11800 msgid "guestfs_mknod"
11804 #: ../src/guestfs-actions.pod:4301
11808 " guestfs_mknod (guestfs_h *g,\n"
11812 " const char *path);\n"
11817 #: ../src/guestfs-actions.pod:4308 ../fish/guestfish-actions.pod:2893
11819 "This call creates block or character special devices, or named pipes (FIFOs)."
11823 #: ../src/guestfs-actions.pod:4311 ../fish/guestfish-actions.pod:2896
11825 "The C<mode> parameter should be the mode, using the standard constants. "
11826 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
11827 "used when creating block and character special devices."
11831 #: ../src/guestfs-actions.pod:4316
11833 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
11834 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
11835 "regular file). These constants are available in the standard Linux header "
11836 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
11837 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
11838 "the appropriate constant for you."
11842 #: ../src/guestfs-actions.pod:4330
11843 msgid "guestfs_mknod_b"
11847 #: ../src/guestfs-actions.pod:4332
11851 " guestfs_mknod_b (guestfs_h *g,\n"
11855 " const char *path);\n"
11860 #: ../src/guestfs-actions.pod:4339
11862 "This call creates a block device node called C<path> with mode C<mode> and "
11863 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
11864 "wrapper around C<guestfs_mknod>."
11868 #: ../src/guestfs-actions.pod:4349
11869 msgid "guestfs_mknod_c"
11873 #: ../src/guestfs-actions.pod:4351
11877 " guestfs_mknod_c (guestfs_h *g,\n"
11881 " const char *path);\n"
11886 #: ../src/guestfs-actions.pod:4358
11888 "This call creates a char device node called C<path> with mode C<mode> and "
11889 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
11890 "wrapper around C<guestfs_mknod>."
11894 #: ../src/guestfs-actions.pod:4368
11895 msgid "guestfs_mkswap"
11899 #: ../src/guestfs-actions.pod:4370
11903 " guestfs_mkswap (guestfs_h *g,\n"
11904 " const char *device);\n"
11909 #: ../src/guestfs-actions.pod:4374 ../fish/guestfish-actions.pod:2935
11910 msgid "Create a swap partition on C<device>."
11914 #: ../src/guestfs-actions.pod:4380
11915 msgid "guestfs_mkswap_L"
11919 #: ../src/guestfs-actions.pod:4382
11923 " guestfs_mkswap_L (guestfs_h *g,\n"
11924 " const char *label,\n"
11925 " const char *device);\n"
11930 #: ../src/guestfs-actions.pod:4387 ../fish/guestfish-actions.pod:2941
11931 msgid "Create a swap partition on C<device> with label C<label>."
11935 #: ../src/guestfs-actions.pod:4389 ../fish/guestfish-actions.pod:2943
11937 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
11938 "sda>), just to a partition. This appears to be a limitation of the kernel "
11943 #: ../src/guestfs-actions.pod:4397
11944 msgid "guestfs_mkswap_U"
11948 #: ../src/guestfs-actions.pod:4399
11952 " guestfs_mkswap_U (guestfs_h *g,\n"
11953 " const char *uuid,\n"
11954 " const char *device);\n"
11959 #: ../src/guestfs-actions.pod:4404 ../fish/guestfish-actions.pod:2951
11960 msgid "Create a swap partition on C<device> with UUID C<uuid>."
11964 #: ../src/guestfs-actions.pod:4410
11965 msgid "guestfs_mkswap_file"
11969 #: ../src/guestfs-actions.pod:4412
11973 " guestfs_mkswap_file (guestfs_h *g,\n"
11974 " const char *path);\n"
11979 #: ../src/guestfs-actions.pod:4416 ../fish/guestfish-actions.pod:2957
11980 msgid "Create a swap file."
11984 #: ../src/guestfs-actions.pod:4418
11986 "This command just writes a swap file signature to an existing file. To "
11987 "create the file itself, use something like C<guestfs_fallocate>."
11991 #: ../src/guestfs-actions.pod:4425
11992 msgid "guestfs_modprobe"
11996 #: ../src/guestfs-actions.pod:4427
12000 " guestfs_modprobe (guestfs_h *g,\n"
12001 " const char *modulename);\n"
12006 #: ../src/guestfs-actions.pod:4431 ../fish/guestfish-actions.pod:2966
12007 msgid "This loads a kernel module in the appliance."
12011 #: ../src/guestfs-actions.pod:4433 ../fish/guestfish-actions.pod:2968
12013 "The kernel module must have been whitelisted when libguestfs was built (see "
12014 "C<appliance/kmod.whitelist.in> in the source)."
12018 #: ../src/guestfs-actions.pod:4440
12019 msgid "guestfs_mount"
12023 #: ../src/guestfs-actions.pod:4442
12027 " guestfs_mount (guestfs_h *g,\n"
12028 " const char *device,\n"
12029 " const char *mountpoint);\n"
12034 #: ../src/guestfs-actions.pod:4447 ../fish/guestfish-actions.pod:2975
12036 "Mount a guest disk at a position in the filesystem. Block devices are named "
12037 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
12038 "those block devices contain partitions, they will have the usual names (eg. "
12039 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
12043 #: ../src/guestfs-actions.pod:4453 ../fish/guestfish-actions.pod:2981
12045 "The rules are the same as for L<mount(2)>: A filesystem must first be "
12046 "mounted on C</> before others can be mounted. Other filesystems can only be "
12047 "mounted on directories which already exist."
12051 #: ../src/guestfs-actions.pod:4458 ../fish/guestfish-actions.pod:2986
12053 "The mounted filesystem is writable, if we have sufficient permissions on the "
12054 "underlying device."
12058 #: ../src/guestfs-actions.pod:4461
12060 "B<Important note:> When you use this call, the filesystem options C<sync> "
12061 "and C<noatime> are set implicitly. This was originally done because we "
12062 "thought it would improve reliability, but it turns out that I<-o sync> has a "
12063 "very large negative performance impact and negligible effect on "
12064 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
12065 "in any code that needs performance, and instead use C<guestfs_mount_options> "
12066 "(use an empty string for the first parameter if you don't want any options)."
12070 #: ../src/guestfs-actions.pod:4475
12071 msgid "guestfs_mount_loop"
12075 #: ../src/guestfs-actions.pod:4477
12079 " guestfs_mount_loop (guestfs_h *g,\n"
12080 " const char *file,\n"
12081 " const char *mountpoint);\n"
12086 #: ../src/guestfs-actions.pod:4482 ../fish/guestfish-actions.pod:3003
12088 "This command lets you mount C<file> (a filesystem image in a file) on a "
12089 "mount point. It is entirely equivalent to the command C<mount -o loop file "
12094 #: ../src/guestfs-actions.pod:4490
12095 msgid "guestfs_mount_options"
12099 #: ../src/guestfs-actions.pod:4492
12103 " guestfs_mount_options (guestfs_h *g,\n"
12104 " const char *options,\n"
12105 " const char *device,\n"
12106 " const char *mountpoint);\n"
12111 #: ../src/guestfs-actions.pod:4498
12113 "This is the same as the C<guestfs_mount> command, but it allows you to set "
12114 "the mount options as for the L<mount(8)> I<-o> flag."
12118 #: ../src/guestfs-actions.pod:4502 ../fish/guestfish-actions.pod:3015
12120 "If the C<options> parameter is an empty string, then no options are passed "
12121 "(all options default to whatever the filesystem uses)."
12125 #: ../src/guestfs-actions.pod:4508 ../src/guestfs-actions.pod:4522
12126 #: ../src/guestfs-actions.pod:4539
12127 msgid "(Added in 1.0.10)"
12131 #: ../src/guestfs-actions.pod:4510
12132 msgid "guestfs_mount_ro"
12136 #: ../src/guestfs-actions.pod:4512
12140 " guestfs_mount_ro (guestfs_h *g,\n"
12141 " const char *device,\n"
12142 " const char *mountpoint);\n"
12147 #: ../src/guestfs-actions.pod:4517
12149 "This is the same as the C<guestfs_mount> command, but it mounts the "
12150 "filesystem with the read-only (I<-o ro>) flag."
12154 #: ../src/guestfs-actions.pod:4524
12155 msgid "guestfs_mount_vfs"
12159 #: ../src/guestfs-actions.pod:4526
12163 " guestfs_mount_vfs (guestfs_h *g,\n"
12164 " const char *options,\n"
12165 " const char *vfstype,\n"
12166 " const char *device,\n"
12167 " const char *mountpoint);\n"
12172 #: ../src/guestfs-actions.pod:4533
12174 "This is the same as the C<guestfs_mount> command, but it allows you to set "
12175 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
12180 #: ../src/guestfs-actions.pod:4541
12181 msgid "guestfs_mountpoints"
12185 #: ../src/guestfs-actions.pod:4543
12189 " guestfs_mountpoints (guestfs_h *g);\n"
12194 #: ../src/guestfs-actions.pod:4546
12196 "This call is similar to C<guestfs_mounts>. That call returns a list of "
12197 "devices. This one returns a hash table (map) of device name to directory "
12198 "where the device is mounted."
12202 #: ../src/guestfs-actions.pod:4558
12203 msgid "guestfs_mounts"
12207 #: ../src/guestfs-actions.pod:4560
12211 " guestfs_mounts (guestfs_h *g);\n"
12216 #: ../src/guestfs-actions.pod:4563 ../fish/guestfish-actions.pod:3046
12218 "This returns the list of currently mounted filesystems. It returns the list "
12219 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
12223 #: ../src/guestfs-actions.pod:4566 ../fish/guestfish-actions.pod:3049
12224 msgid "Some internal mounts are not shown."
12228 #: ../src/guestfs-actions.pod:4568
12229 msgid "See also: C<guestfs_mountpoints>"
12233 #: ../src/guestfs-actions.pod:4576
12238 #: ../src/guestfs-actions.pod:4578
12242 " guestfs_mv (guestfs_h *g,\n"
12243 " const char *src,\n"
12244 " const char *dest);\n"
12249 #: ../src/guestfs-actions.pod:4583 ../fish/guestfish-actions.pod:3057
12251 "This moves a file from C<src> to C<dest> where C<dest> is either a "
12252 "destination filename or destination directory."
12256 #: ../src/guestfs-actions.pod:4590
12257 msgid "guestfs_ntfs_3g_probe"
12261 #: ../src/guestfs-actions.pod:4592
12265 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
12267 " const char *device);\n"
12272 #: ../src/guestfs-actions.pod:4597 ../fish/guestfish-actions.pod:3064
12274 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
12275 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
12276 "write, and some cannot be mounted at all)."
12280 #: ../src/guestfs-actions.pod:4601 ../fish/guestfish-actions.pod:3068
12282 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
12283 "can be mounted read-write. Set it to false if you want to test if the "
12284 "volume can be mounted read-only."
12288 #: ../src/guestfs-actions.pod:4605 ../fish/guestfish-actions.pod:3072
12290 "The return value is an integer which C<0> if the operation would succeed, or "
12291 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
12295 #: ../src/guestfs-actions.pod:4611
12296 msgid "(Added in 1.0.43)"
12300 #: ../src/guestfs-actions.pod:4613
12301 msgid "guestfs_ntfsresize"
12305 #: ../src/guestfs-actions.pod:4615
12309 " guestfs_ntfsresize (guestfs_h *g,\n"
12310 " const char *device);\n"
12315 #: ../src/guestfs-actions.pod:4619 ../fish/guestfish-actions.pod:3080
12317 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
12318 "size of the underlying device. See also L<ntfsresize(8)>."
12322 #: ../src/guestfs-actions.pod:4627
12323 msgid "guestfs_ntfsresize_size"
12327 #: ../src/guestfs-actions.pod:4629
12331 " guestfs_ntfsresize_size (guestfs_h *g,\n"
12332 " const char *device,\n"
12333 " int64_t size);\n"
12338 #: ../src/guestfs-actions.pod:4634
12340 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
12341 "to specify the new size (in bytes) explicitly."
12345 #: ../src/guestfs-actions.pod:4639 ../src/guestfs-actions.pod:5075
12346 #: ../src/guestfs-actions.pod:5148 ../src/guestfs-actions.pod:5397
12347 msgid "(Added in 1.3.14)"
12351 #: ../src/guestfs-actions.pod:4641
12352 msgid "guestfs_part_add"
12356 #: ../src/guestfs-actions.pod:4643
12360 " guestfs_part_add (guestfs_h *g,\n"
12361 " const char *device,\n"
12362 " const char *prlogex,\n"
12363 " int64_t startsect,\n"
12364 " int64_t endsect);\n"
12369 #: ../src/guestfs-actions.pod:4650
12371 "This command adds a partition to C<device>. If there is no partition table "
12372 "on the device, call C<guestfs_part_init> first."
12376 #: ../src/guestfs-actions.pod:4653 ../fish/guestfish-actions.pod:3098
12378 "The C<prlogex> parameter is the type of partition. Normally you should pass "
12379 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
12380 "C<logical>) and C<e> (or C<extended>) partition types."
12384 #: ../src/guestfs-actions.pod:4658 ../fish/guestfish-actions.pod:3103
12386 "C<startsect> and C<endsect> are the start and end of the partition in "
12387 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
12388 "from the end of the disk (C<-1> is the last sector)."
12392 #: ../src/guestfs-actions.pod:4662
12394 "Creating a partition which covers the whole disk is not so easy. Use "
12395 "C<guestfs_part_disk> to do that."
12399 #: ../src/guestfs-actions.pod:4667 ../src/guestfs-actions.pod:4705
12400 #: ../src/guestfs-actions.pod:4758 ../src/guestfs-actions.pod:4836
12401 #: ../src/guestfs-actions.pod:4874 ../src/guestfs-actions.pod:4893
12402 #: ../src/guestfs-actions.pod:4933
12403 msgid "(Added in 1.0.78)"
12407 #: ../src/guestfs-actions.pod:4669
12408 msgid "guestfs_part_del"
12412 #: ../src/guestfs-actions.pod:4671
12416 " guestfs_part_del (guestfs_h *g,\n"
12417 " const char *device,\n"
12423 #: ../src/guestfs-actions.pod:4676 ../fish/guestfish-actions.pod:3114
12424 msgid "This command deletes the partition numbered C<partnum> on C<device>."
12428 #: ../src/guestfs-actions.pod:4678 ../fish/guestfish-actions.pod:3116
12430 "Note that in the case of MBR partitioning, deleting an extended partition "
12431 "also deletes any logical partitions it contains."
12435 #: ../src/guestfs-actions.pod:4686
12436 msgid "guestfs_part_disk"
12440 #: ../src/guestfs-actions.pod:4688
12444 " guestfs_part_disk (guestfs_h *g,\n"
12445 " const char *device,\n"
12446 " const char *parttype);\n"
12451 #: ../src/guestfs-actions.pod:4693
12453 "This command is simply a combination of C<guestfs_part_init> followed by "
12454 "C<guestfs_part_add> to create a single primary partition covering the whole "
12459 #: ../src/guestfs-actions.pod:4697
12461 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
12462 "possible values are described in C<guestfs_part_init>."
12466 #: ../src/guestfs-actions.pod:4707
12467 msgid "guestfs_part_get_bootable"
12471 #: ../src/guestfs-actions.pod:4709
12475 " guestfs_part_get_bootable (guestfs_h *g,\n"
12476 " const char *device,\n"
12482 #: ../src/guestfs-actions.pod:4714 ../fish/guestfish-actions.pod:3138
12484 "This command returns true if the partition C<partnum> on C<device> has the "
12485 "bootable flag set."
12489 #: ../src/guestfs-actions.pod:4717
12490 msgid "See also C<guestfs_part_set_bootable>."
12494 #: ../src/guestfs-actions.pod:4723
12495 msgid "guestfs_part_get_mbr_id"
12499 #: ../src/guestfs-actions.pod:4725
12503 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
12504 " const char *device,\n"
12510 #: ../src/guestfs-actions.pod:4730 ../fish/guestfish-actions.pod:3147
12512 "Returns the MBR type byte (also known as the ID byte) from the numbered "
12513 "partition C<partnum>."
12517 #: ../src/guestfs-actions.pod:4733 ../src/guestfs-actions.pod:4909
12519 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
12520 "undefined results for other partition table types (see "
12521 "C<guestfs_part_get_parttype>)."
12525 #: ../src/guestfs-actions.pod:4741
12526 msgid "guestfs_part_get_parttype"
12530 #: ../src/guestfs-actions.pod:4743
12534 " guestfs_part_get_parttype (guestfs_h *g,\n"
12535 " const char *device);\n"
12540 #: ../src/guestfs-actions.pod:4747 ../fish/guestfish-actions.pod:3158
12542 "This command examines the partition table on C<device> and returns the "
12543 "partition table type (format) being used."
12547 #: ../src/guestfs-actions.pod:4750
12549 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
12550 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
12551 "possible, although unusual. See C<guestfs_part_init> for a full list."
12555 #: ../src/guestfs-actions.pod:4760
12556 msgid "guestfs_part_init"
12560 #: ../src/guestfs-actions.pod:4762
12564 " guestfs_part_init (guestfs_h *g,\n"
12565 " const char *device,\n"
12566 " const char *parttype);\n"
12571 #: ../src/guestfs-actions.pod:4767 ../fish/guestfish-actions.pod:3170
12573 "This creates an empty partition table on C<device> of one of the partition "
12574 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
12575 "(for large disks)."
12579 #: ../src/guestfs-actions.pod:4771
12581 "Initially there are no partitions. Following this, you should call "
12582 "C<guestfs_part_add> for each partition required."
12586 #: ../src/guestfs-actions.pod:4774 ../fish/guestfish-actions.pod:3177
12587 msgid "Possible values for C<parttype> are:"
12591 #: ../src/guestfs-actions.pod:4778 ../fish/guestfish-actions.pod:3181
12592 msgid "B<efi> | B<gpt>"
12596 #: ../src/guestfs-actions.pod:4780 ../fish/guestfish-actions.pod:3183
12597 msgid "Intel EFI / GPT partition table."
12601 #: ../src/guestfs-actions.pod:4782 ../fish/guestfish-actions.pod:3185
12603 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
12604 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
12605 "the C<mbr> format."
12609 #: ../src/guestfs-actions.pod:4786 ../fish/guestfish-actions.pod:3189
12610 msgid "B<mbr> | B<msdos>"
12614 #: ../src/guestfs-actions.pod:4788 ../fish/guestfish-actions.pod:3191
12616 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
12617 "Windows. This partition type will B<only> work for device sizes up to 2 "
12618 "TB. For large disks we recommend using C<gpt>."
12622 #: ../src/guestfs-actions.pod:4795 ../fish/guestfish-actions.pod:3198
12624 "Other partition table types that may work but are not supported include:"
12628 #: ../src/guestfs-actions.pod:4800 ../fish/guestfish-actions.pod:3203
12633 #: ../src/guestfs-actions.pod:4802 ../fish/guestfish-actions.pod:3205
12634 msgid "AIX disk labels."
12638 #: ../src/guestfs-actions.pod:4804 ../fish/guestfish-actions.pod:3207
12639 msgid "B<amiga> | B<rdb>"
12643 #: ../src/guestfs-actions.pod:4806 ../fish/guestfish-actions.pod:3209
12644 msgid "Amiga \"Rigid Disk Block\" format."
12648 #: ../src/guestfs-actions.pod:4808 ../fish/guestfish-actions.pod:3211
12653 #: ../src/guestfs-actions.pod:4810 ../fish/guestfish-actions.pod:3213
12654 msgid "BSD disk labels."
12658 #: ../src/guestfs-actions.pod:4812 ../fish/guestfish-actions.pod:3215
12663 #: ../src/guestfs-actions.pod:4814 ../fish/guestfish-actions.pod:3217
12664 msgid "DASD, used on IBM mainframes."
12668 #: ../src/guestfs-actions.pod:4816 ../fish/guestfish-actions.pod:3219
12673 #: ../src/guestfs-actions.pod:4818 ../fish/guestfish-actions.pod:3221
12674 msgid "MIPS/SGI volumes."
12678 #: ../src/guestfs-actions.pod:4820 ../fish/guestfish-actions.pod:3223
12683 #: ../src/guestfs-actions.pod:4822 ../fish/guestfish-actions.pod:3225
12684 msgid "Old Mac partition format. Modern Macs use C<gpt>."
12688 #: ../src/guestfs-actions.pod:4824 ../fish/guestfish-actions.pod:3227
12693 #: ../src/guestfs-actions.pod:4826 ../fish/guestfish-actions.pod:3229
12694 msgid "NEC PC-98 format, common in Japan apparently."
12698 #: ../src/guestfs-actions.pod:4828 ../fish/guestfish-actions.pod:3231
12703 #: ../src/guestfs-actions.pod:4830 ../fish/guestfish-actions.pod:3233
12704 msgid "Sun disk labels."
12708 #: ../src/guestfs-actions.pod:4838
12709 msgid "guestfs_part_list"
12713 #: ../src/guestfs-actions.pod:4840
12716 " struct guestfs_partition_list *\n"
12717 " guestfs_part_list (guestfs_h *g,\n"
12718 " const char *device);\n"
12723 #: ../src/guestfs-actions.pod:4844 ../fish/guestfish-actions.pod:3241
12725 "This command parses the partition table on C<device> and returns the list of "
12726 "partitions found."
12730 #: ../src/guestfs-actions.pod:4847 ../fish/guestfish-actions.pod:3244
12731 msgid "The fields in the returned structure are:"
12735 #: ../src/guestfs-actions.pod:4851 ../fish/guestfish-actions.pod:3248
12736 msgid "B<part_num>"
12740 #: ../src/guestfs-actions.pod:4853 ../fish/guestfish-actions.pod:3250
12741 msgid "Partition number, counting from 1."
12745 #: ../src/guestfs-actions.pod:4855 ../fish/guestfish-actions.pod:3252
12746 msgid "B<part_start>"
12750 #: ../src/guestfs-actions.pod:4857
12752 "Start of the partition I<in bytes>. To get sectors you have to divide by "
12753 "the device's sector size, see C<guestfs_blockdev_getss>."
12757 #: ../src/guestfs-actions.pod:4860 ../fish/guestfish-actions.pod:3257
12758 msgid "B<part_end>"
12762 #: ../src/guestfs-actions.pod:4862 ../fish/guestfish-actions.pod:3259
12763 msgid "End of the partition in bytes."
12767 #: ../src/guestfs-actions.pod:4864 ../fish/guestfish-actions.pod:3261
12768 msgid "B<part_size>"
12772 #: ../src/guestfs-actions.pod:4866 ../fish/guestfish-actions.pod:3263
12773 msgid "Size of the partition in bytes."
12777 #: ../src/guestfs-actions.pod:4870
12779 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
12780 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
12785 #: ../src/guestfs-actions.pod:4876
12786 msgid "guestfs_part_set_bootable"
12790 #: ../src/guestfs-actions.pod:4878
12794 " guestfs_part_set_bootable (guestfs_h *g,\n"
12795 " const char *device,\n"
12797 " int bootable);\n"
12802 #: ../src/guestfs-actions.pod:4884 ../fish/guestfish-actions.pod:3271
12804 "This sets the bootable flag on partition numbered C<partnum> on device "
12805 "C<device>. Note that partitions are numbered from 1."
12809 #: ../src/guestfs-actions.pod:4887 ../fish/guestfish-actions.pod:3274
12811 "The bootable flag is used by some operating systems (notably Windows) to "
12812 "determine which partition to boot from. It is by no means universally "
12817 #: ../src/guestfs-actions.pod:4895
12818 msgid "guestfs_part_set_mbr_id"
12822 #: ../src/guestfs-actions.pod:4897
12826 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
12827 " const char *device,\n"
12834 #: ../src/guestfs-actions.pod:4903 ../fish/guestfish-actions.pod:3282
12836 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
12837 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
12838 "documentation are in fact hexadecimal numbers, but usually documented "
12839 "without any leading \"0x\" which might be confusing."
12843 #: ../src/guestfs-actions.pod:4917
12844 msgid "guestfs_part_set_name"
12848 #: ../src/guestfs-actions.pod:4919
12852 " guestfs_part_set_name (guestfs_h *g,\n"
12853 " const char *device,\n"
12855 " const char *name);\n"
12860 #: ../src/guestfs-actions.pod:4925 ../fish/guestfish-actions.pod:3296
12862 "This sets the partition name on partition numbered C<partnum> on device "
12863 "C<device>. Note that partitions are numbered from 1."
12867 #: ../src/guestfs-actions.pod:4928 ../fish/guestfish-actions.pod:3299
12869 "The partition name can only be set on certain types of partition table. "
12870 "This works on C<gpt> but not on C<mbr> partitions."
12874 #: ../src/guestfs-actions.pod:4935
12875 msgid "guestfs_part_to_dev"
12879 #: ../src/guestfs-actions.pod:4937
12883 " guestfs_part_to_dev (guestfs_h *g,\n"
12884 " const char *partition);\n"
12889 #: ../src/guestfs-actions.pod:4941 ../fish/guestfish-actions.pod:3306
12891 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
12892 "partition number, returning the device name (eg. \"/dev/sdb\")."
12896 #: ../src/guestfs-actions.pod:4945
12898 "The named partition must exist, for example as a string returned from "
12899 "C<guestfs_list_partitions>."
12903 #: ../src/guestfs-actions.pod:4953
12904 msgid "guestfs_ping_daemon"
12908 #: ../src/guestfs-actions.pod:4955
12912 " guestfs_ping_daemon (guestfs_h *g);\n"
12917 #: ../src/guestfs-actions.pod:4958 ../fish/guestfish-actions.pod:3317
12919 "This is a test probe into the guestfs daemon running inside the qemu "
12920 "subprocess. Calling this function checks that the daemon responds to the "
12921 "ping message, without affecting the daemon or attached block device(s) in "
12926 #: ../src/guestfs-actions.pod:4967
12927 msgid "guestfs_pread"
12931 #: ../src/guestfs-actions.pod:4969
12935 " guestfs_pread (guestfs_h *g,\n"
12936 " const char *path,\n"
12938 " int64_t offset,\n"
12939 " size_t *size_r);\n"
12944 #: ../src/guestfs-actions.pod:4976 ../fish/guestfish-actions.pod:3326
12946 "This command lets you read part of a file. It reads C<count> bytes of the "
12947 "file, starting at C<offset>, from file C<path>."
12951 #: ../src/guestfs-actions.pod:4979 ../src/guestfs-actions.pod:5005
12952 #: ../fish/guestfish-actions.pod:3329 ../fish/guestfish-actions.pod:3344
12954 "This may read fewer bytes than requested. For further details see the "
12955 "L<pread(2)> system call."
12959 #: ../src/guestfs-actions.pod:4982
12960 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
12964 #: ../src/guestfs-actions.pod:4993
12965 msgid "guestfs_pread_device"
12969 #: ../src/guestfs-actions.pod:4995
12973 " guestfs_pread_device (guestfs_h *g,\n"
12974 " const char *device,\n"
12976 " int64_t offset,\n"
12977 " size_t *size_r);\n"
12982 #: ../src/guestfs-actions.pod:5002 ../fish/guestfish-actions.pod:3341
12984 "This command lets you read part of a file. It reads C<count> bytes of "
12985 "C<device>, starting at C<offset>."
12989 #: ../src/guestfs-actions.pod:5008
12990 msgid "See also C<guestfs_pread>."
12994 #: ../src/guestfs-actions.pod:5017
12995 msgid "(Added in 1.5.21)"
12999 #: ../src/guestfs-actions.pod:5019
13000 msgid "guestfs_pvcreate"
13004 #: ../src/guestfs-actions.pod:5021
13008 " guestfs_pvcreate (guestfs_h *g,\n"
13009 " const char *device);\n"
13014 #: ../src/guestfs-actions.pod:5025 ../fish/guestfish-actions.pod:3356
13016 "This creates an LVM physical volume on the named C<device>, where C<device> "
13017 "should usually be a partition name such as C</dev/sda1>."
13021 #: ../src/guestfs-actions.pod:5033
13022 msgid "guestfs_pvremove"
13026 #: ../src/guestfs-actions.pod:5035
13030 " guestfs_pvremove (guestfs_h *g,\n"
13031 " const char *device);\n"
13036 #: ../src/guestfs-actions.pod:5039 ../fish/guestfish-actions.pod:3364
13038 "This wipes a physical volume C<device> so that LVM will no longer recognise "
13043 #: ../src/guestfs-actions.pod:5042 ../fish/guestfish-actions.pod:3367
13045 "The implementation uses the C<pvremove> command which refuses to wipe "
13046 "physical volumes that contain any volume groups, so you have to remove those "
13051 #: ../src/guestfs-actions.pod:5050
13052 msgid "guestfs_pvresize"
13056 #: ../src/guestfs-actions.pod:5052
13060 " guestfs_pvresize (guestfs_h *g,\n"
13061 " const char *device);\n"
13066 #: ../src/guestfs-actions.pod:5056 ../fish/guestfish-actions.pod:3375
13068 "This resizes (expands or shrinks) an existing LVM physical volume to match "
13069 "the new size of the underlying device."
13073 #: ../src/guestfs-actions.pod:5063
13074 msgid "guestfs_pvresize_size"
13078 #: ../src/guestfs-actions.pod:5065
13082 " guestfs_pvresize_size (guestfs_h *g,\n"
13083 " const char *device,\n"
13084 " int64_t size);\n"
13089 #: ../src/guestfs-actions.pod:5070
13091 "This command is the same as C<guestfs_pvresize> except that it allows you to "
13092 "specify the new size (in bytes) explicitly."
13096 #: ../src/guestfs-actions.pod:5077
13097 msgid "guestfs_pvs"
13101 #: ../src/guestfs-actions.pod:5079
13105 " guestfs_pvs (guestfs_h *g);\n"
13110 #: ../src/guestfs-actions.pod:5082 ../fish/guestfish-actions.pod:3389
13112 "List all the physical volumes detected. This is the equivalent of the L<pvs"
13117 #: ../src/guestfs-actions.pod:5085 ../fish/guestfish-actions.pod:3392
13119 "This returns a list of just the device names that contain PVs (eg. C</dev/"
13124 #: ../src/guestfs-actions.pod:5088
13125 msgid "See also C<guestfs_pvs_full>."
13129 #: ../src/guestfs-actions.pod:5096
13130 msgid "guestfs_pvs_full"
13134 #: ../src/guestfs-actions.pod:5098
13137 " struct guestfs_lvm_pv_list *\n"
13138 " guestfs_pvs_full (guestfs_h *g);\n"
13143 #: ../src/guestfs-actions.pod:5101 ../fish/guestfish-actions.pod:3401
13145 "List all the physical volumes detected. This is the equivalent of the L<pvs"
13146 "(8)> command. The \"full\" version includes all fields."
13150 #: ../src/guestfs-actions.pod:5104
13152 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
13153 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after use>."
13157 #: ../src/guestfs-actions.pod:5110
13158 msgid "guestfs_pvuuid"
13162 #: ../src/guestfs-actions.pod:5112
13166 " guestfs_pvuuid (guestfs_h *g,\n"
13167 " const char *device);\n"
13172 #: ../src/guestfs-actions.pod:5116 ../fish/guestfish-actions.pod:3408
13173 msgid "This command returns the UUID of the LVM PV C<device>."
13177 #: ../src/guestfs-actions.pod:5123
13178 msgid "guestfs_pwrite"
13182 #: ../src/guestfs-actions.pod:5125
13186 " guestfs_pwrite (guestfs_h *g,\n"
13187 " const char *path,\n"
13188 " const char *content,\n"
13189 " size_t content_size,\n"
13190 " int64_t offset);\n"
13195 #: ../src/guestfs-actions.pod:5132 ../fish/guestfish-actions.pod:3414
13197 "This command writes to part of a file. It writes the data buffer C<content> "
13198 "to the file C<path> starting at offset C<offset>."
13202 #: ../src/guestfs-actions.pod:5135 ../fish/guestfish-actions.pod:3417
13204 "This command implements the L<pwrite(2)> system call, and like that system "
13205 "call it may not write the full data requested. The return value is the "
13206 "number of bytes that were actually written to the file. This could even be "
13207 "0, although short writes are unlikely for regular files in ordinary "
13212 #: ../src/guestfs-actions.pod:5141
13213 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
13217 #: ../src/guestfs-actions.pod:5150
13218 msgid "guestfs_pwrite_device"
13222 #: ../src/guestfs-actions.pod:5152
13226 " guestfs_pwrite_device (guestfs_h *g,\n"
13227 " const char *device,\n"
13228 " const char *content,\n"
13229 " size_t content_size,\n"
13230 " int64_t offset);\n"
13235 #: ../src/guestfs-actions.pod:5159 ../fish/guestfish-actions.pod:3432
13237 "This command writes to part of a device. It writes the data buffer "
13238 "C<content> to C<device> starting at offset C<offset>."
13242 #: ../src/guestfs-actions.pod:5162 ../fish/guestfish-actions.pod:3435
13244 "This command implements the L<pwrite(2)> system call, and like that system "
13245 "call it may not write the full data requested (although short writes to disk "
13246 "devices and partitions are probably impossible with standard Linux kernels)."
13250 #: ../src/guestfs-actions.pod:5167
13251 msgid "See also C<guestfs_pwrite>."
13255 #: ../src/guestfs-actions.pod:5174
13256 msgid "(Added in 1.5.20)"
13260 #: ../src/guestfs-actions.pod:5176
13261 msgid "guestfs_read_file"
13265 #: ../src/guestfs-actions.pod:5178
13269 " guestfs_read_file (guestfs_h *g,\n"
13270 " const char *path,\n"
13271 " size_t *size_r);\n"
13276 #: ../src/guestfs-actions.pod:5183 ../fish/guestfish-actions.pod:3449
13277 msgid "This calls returns the contents of the file C<path> as a buffer."
13281 #: ../src/guestfs-actions.pod:5186
13283 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
13284 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
13285 "function is limited in the total size of file that can be handled."
13289 #: ../src/guestfs-actions.pod:5198
13290 msgid "(Added in 1.0.63)"
13294 #: ../src/guestfs-actions.pod:5200
13295 msgid "guestfs_read_lines"
13299 #: ../src/guestfs-actions.pod:5202
13303 " guestfs_read_lines (guestfs_h *g,\n"
13304 " const char *path);\n"
13309 #: ../src/guestfs-actions.pod:5208 ../fish/guestfish-actions.pod:3466
13311 "The file contents are returned as a list of lines. Trailing C<LF> and "
13312 "C<CRLF> character sequences are I<not> returned."
13316 #: ../src/guestfs-actions.pod:5211
13318 "Note that this function cannot correctly handle binary files (specifically, "
13319 "files containing C<\\0> character which is treated as end of line). For "
13320 "those you need to use the C<guestfs_read_file> function which has a more "
13321 "complex interface."
13325 #: ../src/guestfs-actions.pod:5222
13326 msgid "guestfs_readdir"
13330 #: ../src/guestfs-actions.pod:5224
13333 " struct guestfs_dirent_list *\n"
13334 " guestfs_readdir (guestfs_h *g,\n"
13335 " const char *dir);\n"
13340 #: ../src/guestfs-actions.pod:5228 ../fish/guestfish-actions.pod:3478
13341 msgid "This returns the list of directory entries in directory C<dir>."
13345 #: ../src/guestfs-actions.pod:5230 ../fish/guestfish-actions.pod:3480
13347 "All entries in the directory are returned, including C<.> and C<..>. The "
13348 "entries are I<not> sorted, but returned in the same order as the underlying "
13353 #: ../src/guestfs-actions.pod:5234 ../fish/guestfish-actions.pod:3484
13355 "Also this call returns basic file type information about each file. The "
13356 "C<ftyp> field will contain one of the following characters:"
13360 #: ../src/guestfs-actions.pod:5239 ../fish/guestfish-actions.pod:3489
13365 #: ../src/guestfs-actions.pod:5241 ../fish/guestfish-actions.pod:3491
13366 msgid "Block special"
13370 #: ../src/guestfs-actions.pod:5243 ../fish/guestfish-actions.pod:3493
13375 #: ../src/guestfs-actions.pod:5245 ../fish/guestfish-actions.pod:3495
13376 msgid "Char special"
13380 #: ../src/guestfs-actions.pod:5247 ../fish/guestfish-actions.pod:3497
13385 #: ../src/guestfs-actions.pod:5249 ../fish/guestfish-actions.pod:3499
13390 #: ../src/guestfs-actions.pod:5251 ../fish/guestfish-actions.pod:3501
13395 #: ../src/guestfs-actions.pod:5253 ../fish/guestfish-actions.pod:3503
13396 msgid "FIFO (named pipe)"
13400 #: ../src/guestfs-actions.pod:5255 ../fish/guestfish-actions.pod:3505
13405 #: ../src/guestfs-actions.pod:5257 ../fish/guestfish-actions.pod:3507
13406 msgid "Symbolic link"
13410 #: ../src/guestfs-actions.pod:5259 ../fish/guestfish-actions.pod:3509
13415 #: ../src/guestfs-actions.pod:5261 ../fish/guestfish-actions.pod:3511
13416 msgid "Regular file"
13420 #: ../src/guestfs-actions.pod:5263 ../fish/guestfish-actions.pod:3513
13425 #: ../src/guestfs-actions.pod:5265 ../fish/guestfish-actions.pod:3515
13430 #: ../src/guestfs-actions.pod:5267 ../fish/guestfish-actions.pod:3517
13435 #: ../src/guestfs-actions.pod:5269 ../fish/guestfish-actions.pod:3519
13436 msgid "Unknown file type"
13440 #: ../src/guestfs-actions.pod:5271 ../fish/guestfish-actions.pod:3521
13445 #: ../src/guestfs-actions.pod:5273 ../fish/guestfish-actions.pod:3523
13447 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
13451 #: ../src/guestfs-actions.pod:5278
13453 "This function is primarily intended for use by programs. To get a simple "
13454 "list of names, use C<guestfs_ls>. To get a printable directory for human "
13455 "consumption, use C<guestfs_ll>."
13459 #: ../src/guestfs-actions.pod:5282
13461 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
13462 "was an error. I<The caller must call C<guestfs_free_dirent_list> after use>."
13466 #: ../src/guestfs-actions.pod:5288
13467 msgid "guestfs_readlink"
13471 #: ../src/guestfs-actions.pod:5290
13475 " guestfs_readlink (guestfs_h *g,\n"
13476 " const char *path);\n"
13481 #: ../src/guestfs-actions.pod:5294 ../fish/guestfish-actions.pod:3536
13482 msgid "This command reads the target of a symbolic link."
13486 #: ../src/guestfs-actions.pod:5301
13487 msgid "guestfs_readlinklist"
13491 #: ../src/guestfs-actions.pod:5303
13495 " guestfs_readlinklist (guestfs_h *g,\n"
13496 " const char *path,\n"
13497 " char *const *names);\n"
13502 #: ../src/guestfs-actions.pod:5308 ../fish/guestfish-actions.pod:3542
13504 "This call allows you to do a C<readlink> operation on multiple files, where "
13505 "all files are in the directory C<path>. C<names> is the list of files from "
13510 #: ../src/guestfs-actions.pod:5312 ../fish/guestfish-actions.pod:3546
13512 "On return you get a list of strings, with a one-to-one correspondence to the "
13513 "C<names> list. Each string is the value of the symbolic link."
13517 #: ../src/guestfs-actions.pod:5316 ../fish/guestfish-actions.pod:3550
13519 "If the C<readlink(2)> operation fails on any name, then the corresponding "
13520 "result string is the empty string C<\"\">. However the whole operation is "
13521 "completed even if there were C<readlink(2)> errors, and so you can call this "
13522 "function with names where you don't know if they are symbolic links already "
13523 "(albeit slightly less efficient)."
13527 #: ../src/guestfs-actions.pod:5323 ../fish/guestfish-actions.pod:3557
13529 "This call is intended for programs that want to efficiently list a directory "
13530 "contents without making many round-trips. Very long directory listings "
13531 "might cause the protocol message size to be exceeded, causing this call to "
13532 "fail. The caller must split up such requests into smaller groups of names."
13536 #: ../src/guestfs-actions.pod:5336
13537 msgid "guestfs_realpath"
13541 #: ../src/guestfs-actions.pod:5338
13545 " guestfs_realpath (guestfs_h *g,\n"
13546 " const char *path);\n"
13551 #: ../src/guestfs-actions.pod:5342 ../fish/guestfish-actions.pod:3568
13553 "Return the canonicalized absolute pathname of C<path>. The returned path "
13554 "has no C<.>, C<..> or symbolic link path elements."
13558 #: ../src/guestfs-actions.pod:5350
13559 msgid "guestfs_removexattr"
13563 #: ../src/guestfs-actions.pod:5352
13567 " guestfs_removexattr (guestfs_h *g,\n"
13568 " const char *xattr,\n"
13569 " const char *path);\n"
13574 #: ../src/guestfs-actions.pod:5357 ../fish/guestfish-actions.pod:3575
13576 "This call removes the extended attribute named C<xattr> of the file C<path>."
13580 #: ../src/guestfs-actions.pod:5360
13581 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
13585 #: ../src/guestfs-actions.pod:5366
13586 msgid "guestfs_resize2fs"
13590 #: ../src/guestfs-actions.pod:5368
13594 " guestfs_resize2fs (guestfs_h *g,\n"
13595 " const char *device);\n"
13600 #: ../src/guestfs-actions.pod:5372 ../fish/guestfish-actions.pod:3584
13602 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
13603 "underlying device."
13607 #: ../src/guestfs-actions.pod:5375
13609 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
13610 "C<device> before calling this command. For unknown reasons C<resize2fs> "
13611 "sometimes gives an error about this and sometimes not. In any case, it is "
13612 "always safe to call C<guestfs_e2fsck_f> before calling this function."
13616 #: ../src/guestfs-actions.pod:5385
13617 msgid "guestfs_resize2fs_size"
13621 #: ../src/guestfs-actions.pod:5387
13625 " guestfs_resize2fs_size (guestfs_h *g,\n"
13626 " const char *device,\n"
13627 " int64_t size);\n"
13632 #: ../src/guestfs-actions.pod:5392
13634 "This command is the same as C<guestfs_resize2fs> except that it allows you "
13635 "to specify the new size (in bytes) explicitly."
13639 #: ../src/guestfs-actions.pod:5399
13644 #: ../src/guestfs-actions.pod:5401
13648 " guestfs_rm (guestfs_h *g,\n"
13649 " const char *path);\n"
13654 #: ../src/guestfs-actions.pod:5405 ../fish/guestfish-actions.pod:3604
13655 msgid "Remove the single file C<path>."
13659 #: ../src/guestfs-actions.pod:5411
13660 msgid "guestfs_rm_rf"
13664 #: ../src/guestfs-actions.pod:5413
13668 " guestfs_rm_rf (guestfs_h *g,\n"
13669 " const char *path);\n"
13674 #: ../src/guestfs-actions.pod:5417 ../fish/guestfish-actions.pod:3610
13676 "Remove the file or directory C<path>, recursively removing the contents if "
13677 "its a directory. This is like the C<rm -rf> shell command."
13681 #: ../src/guestfs-actions.pod:5425
13682 msgid "guestfs_rmdir"
13686 #: ../src/guestfs-actions.pod:5427
13690 " guestfs_rmdir (guestfs_h *g,\n"
13691 " const char *path);\n"
13696 #: ../src/guestfs-actions.pod:5431 ../fish/guestfish-actions.pod:3618
13697 msgid "Remove the single directory C<path>."
13701 #: ../src/guestfs-actions.pod:5437
13702 msgid "guestfs_rmmountpoint"
13706 #: ../src/guestfs-actions.pod:5439
13710 " guestfs_rmmountpoint (guestfs_h *g,\n"
13711 " const char *exemptpath);\n"
13716 #: ../src/guestfs-actions.pod:5443
13718 "This calls removes a mountpoint that was previously created with "
13719 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
13723 #: ../src/guestfs-actions.pod:5451
13724 msgid "guestfs_scrub_device"
13728 #: ../src/guestfs-actions.pod:5453
13732 " guestfs_scrub_device (guestfs_h *g,\n"
13733 " const char *device);\n"
13738 #: ../src/guestfs-actions.pod:5457 ../fish/guestfish-actions.pod:3632
13740 "This command writes patterns over C<device> to make data retrieval more "
13745 #: ../src/guestfs-actions.pod:5460 ../src/guestfs-actions.pod:5481
13746 #: ../src/guestfs-actions.pod:5500 ../fish/guestfish-actions.pod:3635
13747 #: ../fish/guestfish-actions.pod:3650 ../fish/guestfish-actions.pod:3663
13749 "It is an interface to the L<scrub(1)> program. See that manual page for "
13754 #: ../src/guestfs-actions.pod:5468 ../src/guestfs-actions.pod:5486
13755 #: ../src/guestfs-actions.pod:5505
13756 msgid "(Added in 1.0.52)"
13760 #: ../src/guestfs-actions.pod:5470
13761 msgid "guestfs_scrub_file"
13765 #: ../src/guestfs-actions.pod:5472
13769 " guestfs_scrub_file (guestfs_h *g,\n"
13770 " const char *file);\n"
13775 #: ../src/guestfs-actions.pod:5476 ../fish/guestfish-actions.pod:3645
13777 "This command writes patterns over a file to make data retrieval more "
13782 #: ../src/guestfs-actions.pod:5479 ../fish/guestfish-actions.pod:3648
13783 msgid "The file is I<removed> after scrubbing."
13787 #: ../src/guestfs-actions.pod:5488
13788 msgid "guestfs_scrub_freespace"
13792 #: ../src/guestfs-actions.pod:5490
13796 " guestfs_scrub_freespace (guestfs_h *g,\n"
13797 " const char *dir);\n"
13802 #: ../src/guestfs-actions.pod:5494
13804 "This command creates the directory C<dir> and then fills it with files until "
13805 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
13806 "and deletes them. The intention is to scrub any free space on the partition "
13807 "containing C<dir>."
13811 #: ../src/guestfs-actions.pod:5507
13812 msgid "guestfs_set_append"
13816 #: ../src/guestfs-actions.pod:5509
13820 " guestfs_set_append (guestfs_h *g,\n"
13821 " const char *append);\n"
13826 #: ../src/guestfs-actions.pod:5513 ../fish/guestfish-actions.pod:3672
13828 "This function is used to add additional options to the guest kernel command "
13833 #: ../src/guestfs-actions.pod:5516 ../fish/guestfish-actions.pod:3675
13835 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
13836 "environment variable."
13840 #: ../src/guestfs-actions.pod:5519 ../fish/guestfish-actions.pod:3678
13842 "Setting C<append> to C<NULL> means I<no> additional options are passed "
13843 "(libguestfs always adds a few of its own)."
13847 #: ../src/guestfs-actions.pod:5526
13848 msgid "guestfs_set_autosync"
13852 #: ../src/guestfs-actions.pod:5528
13856 " guestfs_set_autosync (guestfs_h *g,\n"
13857 " int autosync);\n"
13862 #: ../src/guestfs-actions.pod:5532
13864 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
13865 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
13866 "the handle is closed (also if the program exits without closing handles)."
13870 #: ../src/guestfs-actions.pod:5537 ../fish/guestfish-actions.pod:3692
13872 "This is enabled by default (since libguestfs 1.5.24, previously it was "
13873 "disabled by default)."
13877 #: ../src/guestfs-actions.pod:5544
13878 msgid "guestfs_set_direct"
13882 #: ../src/guestfs-actions.pod:5546
13886 " guestfs_set_direct (guestfs_h *g,\n"
13892 #: ../src/guestfs-actions.pod:5550 ../fish/guestfish-actions.pod:3701
13894 "If the direct appliance mode flag is enabled, then stdin and stdout are "
13895 "passed directly through to the appliance once it is launched."
13899 #: ../src/guestfs-actions.pod:5554
13901 "One consequence of this is that log messages aren't caught by the library "
13902 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
13907 #: ../src/guestfs-actions.pod:5558 ../fish/guestfish-actions.pod:3709
13908 msgid "You probably don't want to use this unless you know what you are doing."
13912 #: ../src/guestfs-actions.pod:5561 ../fish/guestfish-actions.pod:3712
13913 msgid "The default is disabled."
13917 #: ../src/guestfs-actions.pod:5567
13918 msgid "guestfs_set_e2label"
13922 #: ../src/guestfs-actions.pod:5569
13926 " guestfs_set_e2label (guestfs_h *g,\n"
13927 " const char *device,\n"
13928 " const char *label);\n"
13933 #: ../src/guestfs-actions.pod:5574 ../fish/guestfish-actions.pod:3718
13935 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
13936 "C<label>. Filesystem labels are limited to 16 characters."
13940 #: ../src/guestfs-actions.pod:5578
13942 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
13943 "the existing label on a filesystem."
13947 #: ../src/guestfs-actions.pod:5585
13948 msgid "guestfs_set_e2uuid"
13952 #: ../src/guestfs-actions.pod:5587
13956 " guestfs_set_e2uuid (guestfs_h *g,\n"
13957 " const char *device,\n"
13958 " const char *uuid);\n"
13963 #: ../src/guestfs-actions.pod:5592 ../fish/guestfish-actions.pod:3729
13965 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
13966 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
13967 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
13971 #: ../src/guestfs-actions.pod:5597
13973 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
13974 "the existing UUID of a filesystem."
13978 #: ../src/guestfs-actions.pod:5604
13979 msgid "guestfs_set_memsize"
13983 #: ../src/guestfs-actions.pod:5606
13987 " guestfs_set_memsize (guestfs_h *g,\n"
13993 #: ../src/guestfs-actions.pod:5610
13995 "This sets the memory size in megabytes allocated to the qemu subprocess. "
13996 "This only has any effect if called before C<guestfs_launch>."
14000 #: ../src/guestfs-actions.pod:5614 ../fish/guestfish-actions.pod:3747
14002 "You can also change this by setting the environment variable "
14003 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
14007 #: ../src/guestfs-actions.pod:5625
14008 msgid "guestfs_set_network"
14012 #: ../src/guestfs-actions.pod:5627
14016 " guestfs_set_network (guestfs_h *g,\n"
14022 #: ../src/guestfs-actions.pod:5631 ../fish/guestfish-actions.pod:3760
14024 "If C<network> is true, then the network is enabled in the libguestfs "
14025 "appliance. The default is false."
14029 #: ../src/guestfs-actions.pod:5634 ../fish/guestfish-actions.pod:3763
14031 "This affects whether commands are able to access the network (see L<guestfs"
14032 "(3)/RUNNING COMMANDS>)."
14036 #: ../src/guestfs-actions.pod:5637
14038 "You must call this before calling C<guestfs_launch>, otherwise it has no "
14043 #: ../src/guestfs-actions.pod:5644
14044 msgid "guestfs_set_path"
14048 #: ../src/guestfs-actions.pod:5646
14052 " guestfs_set_path (guestfs_h *g,\n"
14053 " const char *searchpath);\n"
14058 #: ../src/guestfs-actions.pod:5650 ../fish/guestfish-actions.pod:3775
14059 msgid "Set the path that libguestfs searches for kernel and initrd.img."
14063 #: ../src/guestfs-actions.pod:5652 ../fish/guestfish-actions.pod:3777
14065 "The default is C<$libdir/guestfs> unless overridden by setting "
14066 "C<LIBGUESTFS_PATH> environment variable."
14070 #: ../src/guestfs-actions.pod:5655 ../fish/guestfish-actions.pod:3780
14071 msgid "Setting C<path> to C<NULL> restores the default path."
14075 #: ../src/guestfs-actions.pod:5661
14076 msgid "guestfs_set_qemu"
14080 #: ../src/guestfs-actions.pod:5663
14084 " guestfs_set_qemu (guestfs_h *g,\n"
14085 " const char *qemu);\n"
14090 #: ../src/guestfs-actions.pod:5667 ../fish/guestfish-actions.pod:3788
14091 msgid "Set the qemu binary that we will use."
14095 #: ../src/guestfs-actions.pod:5669 ../fish/guestfish-actions.pod:3790
14097 "The default is chosen when the library was compiled by the configure script."
14101 #: ../src/guestfs-actions.pod:5672 ../fish/guestfish-actions.pod:3793
14103 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
14108 #: ../src/guestfs-actions.pod:5675 ../fish/guestfish-actions.pod:3796
14109 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
14113 #: ../src/guestfs-actions.pod:5677 ../fish/guestfish-actions.pod:3798
14115 "Note that you should call this function as early as possible after creating "
14116 "the handle. This is because some pre-launch operations depend on testing "
14117 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
14118 "don't retest features, and so you might see inconsistent results. Using the "
14119 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
14120 "the qemu binary at the same time as the handle is created."
14124 #: ../src/guestfs-actions.pod:5689
14125 msgid "guestfs_set_recovery_proc"
14129 #: ../src/guestfs-actions.pod:5691
14133 " guestfs_set_recovery_proc (guestfs_h *g,\n"
14134 " int recoveryproc);\n"
14139 #: ../src/guestfs-actions.pod:5695
14141 "If this is called with the parameter C<false> then C<guestfs_launch> does "
14142 "not create a recovery process. The purpose of the recovery process is to "
14143 "stop runaway qemu processes in the case where the main program aborts "
14148 #: ../src/guestfs-actions.pod:5700
14150 "This only has any effect if called before C<guestfs_launch>, and the default "
14155 #: ../src/guestfs-actions.pod:5703 ../fish/guestfish-actions.pod:3820
14157 "About the only time when you would want to disable this is if the main "
14158 "process will fork itself into the background (\"daemonize\" itself). In "
14159 "this case the recovery process thinks that the main program has disappeared "
14160 "and so kills qemu, which is not very helpful."
14164 #: ../src/guestfs-actions.pod:5713
14165 msgid "guestfs_set_selinux"
14169 #: ../src/guestfs-actions.pod:5715
14173 " guestfs_set_selinux (guestfs_h *g,\n"
14179 #: ../src/guestfs-actions.pod:5719 ../fish/guestfish-actions.pod:3832
14181 "This sets the selinux flag that is passed to the appliance at boot time. "
14182 "The default is C<selinux=0> (disabled)."
14186 #: ../src/guestfs-actions.pod:5722 ../fish/guestfish-actions.pod:3835
14188 "Note that if SELinux is enabled, it is always in Permissive mode "
14189 "(C<enforcing=0>)."
14193 #: ../src/guestfs-actions.pod:5732
14194 msgid "guestfs_set_trace"
14198 #: ../src/guestfs-actions.pod:5734
14202 " guestfs_set_trace (guestfs_h *g,\n"
14208 #: ../src/guestfs-actions.pod:5738 ../fish/guestfish-actions.pod:3847
14210 "If the command trace flag is set to 1, then commands are printed on stderr "
14211 "before they are executed in a format which is very similar to the one used "
14212 "by guestfish. In other words, you can run a program with this enabled, and "
14213 "you will get out a script which you can feed to guestfish to perform the "
14214 "same set of actions."
14218 #: ../src/guestfs-actions.pod:5745 ../fish/guestfish-actions.pod:3854
14220 "If you want to trace C API calls into libguestfs (and other libraries) then "
14221 "possibly a better way is to use the external ltrace(1) command."
14225 #: ../src/guestfs-actions.pod:5749 ../fish/guestfish-actions.pod:3858
14227 "Command traces are disabled unless the environment variable "
14228 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
14232 #: ../src/guestfs-actions.pod:5756
14233 msgid "guestfs_set_verbose"
14237 #: ../src/guestfs-actions.pod:5758
14241 " guestfs_set_verbose (guestfs_h *g,\n"
14247 #: ../src/guestfs-actions.pod:5762 ../fish/guestfish-actions.pod:3867
14248 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
14252 #: ../src/guestfs-actions.pod:5764 ../fish/guestfish-actions.pod:3869
14254 "Verbose messages are disabled unless the environment variable "
14255 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
14259 #: ../src/guestfs-actions.pod:5771
14260 msgid "guestfs_setcon"
14264 #: ../src/guestfs-actions.pod:5773
14268 " guestfs_setcon (guestfs_h *g,\n"
14269 " const char *context);\n"
14274 #: ../src/guestfs-actions.pod:5777 ../fish/guestfish-actions.pod:3876
14276 "This sets the SELinux security context of the daemon to the string "
14281 #: ../src/guestfs-actions.pod:5780 ../fish/guestfish-actions.pod:3879
14282 msgid "See the documentation about SELINUX in L<guestfs(3)>."
14286 #: ../src/guestfs-actions.pod:5786
14287 msgid "guestfs_setxattr"
14291 #: ../src/guestfs-actions.pod:5788
14295 " guestfs_setxattr (guestfs_h *g,\n"
14296 " const char *xattr,\n"
14297 " const char *val,\n"
14299 " const char *path);\n"
14304 #: ../src/guestfs-actions.pod:5795 ../fish/guestfish-actions.pod:3885
14306 "This call sets the extended attribute named C<xattr> of the file C<path> to "
14307 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
14311 #: ../src/guestfs-actions.pod:5799
14312 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
14316 #: ../src/guestfs-actions.pod:5805
14317 msgid "guestfs_sfdisk"
14321 #: ../src/guestfs-actions.pod:5807
14325 " guestfs_sfdisk (guestfs_h *g,\n"
14326 " const char *device,\n"
14330 " char *const *lines);\n"
14335 #: ../src/guestfs-actions.pod:5815 ../fish/guestfish-actions.pod:3895
14337 "This is a direct interface to the L<sfdisk(8)> program for creating "
14338 "partitions on block devices."
14342 #: ../src/guestfs-actions.pod:5818 ../fish/guestfish-actions.pod:3898
14343 msgid "C<device> should be a block device, for example C</dev/sda>."
14347 #: ../src/guestfs-actions.pod:5820 ../fish/guestfish-actions.pod:3900
14349 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
14350 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
14351 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
14352 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
14353 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
14354 "the kernel) cannot work out the right geometry and you will need to tell it."
14358 #: ../src/guestfs-actions.pod:5828 ../fish/guestfish-actions.pod:3908
14360 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
14361 "refer to the L<sfdisk(8)> manpage."
14365 #: ../src/guestfs-actions.pod:5831 ../fish/guestfish-actions.pod:3911
14367 "To create a single partition occupying the whole disk, you would pass "
14368 "C<lines> as a single element list, when the single element being the string "
14373 #: ../src/guestfs-actions.pod:5835
14375 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
14379 #: ../src/guestfs-actions.pod:5845
14380 msgid "guestfs_sfdiskM"
14384 #: ../src/guestfs-actions.pod:5847
14388 " guestfs_sfdiskM (guestfs_h *g,\n"
14389 " const char *device,\n"
14390 " char *const *lines);\n"
14395 #: ../src/guestfs-actions.pod:5852
14397 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
14398 "partition sizes are specified in megabytes only (rounded to the nearest "
14399 "cylinder) and you don't need to specify the cyls, heads and sectors "
14400 "parameters which were rarely if ever used anyway."
14404 #: ../src/guestfs-actions.pod:5858
14406 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
14407 "C<guestfs_part_disk>"
14411 #: ../src/guestfs-actions.pod:5868
14412 msgid "guestfs_sfdisk_N"
14416 #: ../src/guestfs-actions.pod:5870
14420 " guestfs_sfdisk_N (guestfs_h *g,\n"
14421 " const char *device,\n"
14426 " const char *line);\n"
14431 #: ../src/guestfs-actions.pod:5879 ../fish/guestfish-actions.pod:3941
14433 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
14434 "(note: C<n> counts from 1)."
14438 #: ../src/guestfs-actions.pod:5882
14440 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
14441 "for the cyls/heads/sectors parameters."
14445 #: ../src/guestfs-actions.pod:5885
14446 msgid "See also: C<guestfs_part_add>"
14450 #: ../src/guestfs-actions.pod:5894
14451 msgid "guestfs_sfdisk_disk_geometry"
14455 #: ../src/guestfs-actions.pod:5896
14459 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
14460 " const char *device);\n"
14465 #: ../src/guestfs-actions.pod:5900
14467 "This displays the disk geometry of C<device> read from the partition table. "
14468 "Especially in the case where the underlying block device has been resized, "
14469 "this can be different from the kernel's idea of the geometry (see "
14470 "C<guestfs_sfdisk_kernel_geometry>)."
14474 #: ../src/guestfs-actions.pod:5905 ../src/guestfs-actions.pod:5921
14475 #: ../fish/guestfish-actions.pod:3961 ../fish/guestfish-actions.pod:3970
14476 msgid "The result is in human-readable format, and not designed to be parsed."
14480 #: ../src/guestfs-actions.pod:5913
14481 msgid "guestfs_sfdisk_kernel_geometry"
14485 #: ../src/guestfs-actions.pod:5915
14489 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
14490 " const char *device);\n"
14495 #: ../src/guestfs-actions.pod:5919 ../fish/guestfish-actions.pod:3968
14496 msgid "This displays the kernel's idea of the geometry of C<device>."
14500 #: ../src/guestfs-actions.pod:5929
14501 msgid "guestfs_sfdisk_l"
14505 #: ../src/guestfs-actions.pod:5931
14509 " guestfs_sfdisk_l (guestfs_h *g,\n"
14510 " const char *device);\n"
14515 #: ../src/guestfs-actions.pod:5935 ../fish/guestfish-actions.pod:3977
14517 "This displays the partition table on C<device>, in the human-readable output "
14518 "of the L<sfdisk(8)> command. It is not intended to be parsed."
14522 #: ../src/guestfs-actions.pod:5939
14523 msgid "See also: C<guestfs_part_list>"
14527 #: ../src/guestfs-actions.pod:5946
14532 #: ../src/guestfs-actions.pod:5948
14536 " guestfs_sh (guestfs_h *g,\n"
14537 " const char *command);\n"
14542 #: ../src/guestfs-actions.pod:5952 ../fish/guestfish-actions.pod:3987
14544 "This call runs a command from the guest filesystem via the guest's C</bin/"
14549 #: ../src/guestfs-actions.pod:5955
14550 msgid "This is like C<guestfs_command>, but passes the command to:"
14554 #: ../src/guestfs-actions.pod:5957 ../fish/guestfish-actions.pod:3992
14557 " /bin/sh -c \"command\"\n"
14562 #: ../src/guestfs-actions.pod:5959 ../fish/guestfish-actions.pod:3994
14564 "Depending on the guest's shell, this usually results in wildcards being "
14565 "expanded, shell expressions being interpolated and so on."
14569 #: ../src/guestfs-actions.pod:5963
14570 msgid "All the provisos about C<guestfs_command> apply to this call."
14574 #: ../src/guestfs-actions.pod:5970
14575 msgid "guestfs_sh_lines"
14579 #: ../src/guestfs-actions.pod:5972
14583 " guestfs_sh_lines (guestfs_h *g,\n"
14584 " const char *command);\n"
14589 #: ../src/guestfs-actions.pod:5976
14591 "This is the same as C<guestfs_sh>, but splits the result into a list of "
14596 #: ../src/guestfs-actions.pod:5979
14597 msgid "See also: C<guestfs_command_lines>"
14601 #: ../src/guestfs-actions.pod:5987
14602 msgid "guestfs_sleep"
14606 #: ../src/guestfs-actions.pod:5989
14610 " guestfs_sleep (guestfs_h *g,\n"
14616 #: ../src/guestfs-actions.pod:5993 ../fish/guestfish-actions.pod:4013
14617 msgid "Sleep for C<secs> seconds."
14621 #: ../src/guestfs-actions.pod:5997
14622 msgid "(Added in 1.0.41)"
14626 #: ../src/guestfs-actions.pod:5999 ../src/guestfs-structs.pod:109
14627 msgid "guestfs_stat"
14631 #: ../src/guestfs-actions.pod:6001
14634 " struct guestfs_stat *\n"
14635 " guestfs_stat (guestfs_h *g,\n"
14636 " const char *path);\n"
14641 #: ../src/guestfs-actions.pod:6007 ../fish/guestfish-actions.pod:4021
14642 msgid "This is the same as the C<stat(2)> system call."
14646 #: ../src/guestfs-actions.pod:6015 ../src/guestfs-structs.pod:135
14647 msgid "guestfs_statvfs"
14651 #: ../src/guestfs-actions.pod:6017
14654 " struct guestfs_statvfs *\n"
14655 " guestfs_statvfs (guestfs_h *g,\n"
14656 " const char *path);\n"
14661 #: ../src/guestfs-actions.pod:6021 ../fish/guestfish-actions.pod:4027
14663 "Returns file system statistics for any mounted file system. C<path> should "
14664 "be a file or directory in the mounted file system (typically it is the mount "
14665 "point itself, but it doesn't need to be)."
14669 #: ../src/guestfs-actions.pod:6025 ../fish/guestfish-actions.pod:4031
14670 msgid "This is the same as the C<statvfs(2)> system call."
14674 #: ../src/guestfs-actions.pod:6027
14676 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
14677 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
14681 #: ../src/guestfs-actions.pod:6033
14682 msgid "guestfs_strings"
14686 #: ../src/guestfs-actions.pod:6035
14690 " guestfs_strings (guestfs_h *g,\n"
14691 " const char *path);\n"
14696 #: ../src/guestfs-actions.pod:6039 ../fish/guestfish-actions.pod:4037
14698 "This runs the L<strings(1)> command on a file and returns the list of "
14699 "printable strings found."
14703 #: ../src/guestfs-actions.pod:6051
14704 msgid "guestfs_strings_e"
14708 #: ../src/guestfs-actions.pod:6053
14712 " guestfs_strings_e (guestfs_h *g,\n"
14713 " const char *encoding,\n"
14714 " const char *path);\n"
14719 #: ../src/guestfs-actions.pod:6058
14721 "This is like the C<guestfs_strings> command, but allows you to specify the "
14722 "encoding of strings that are looked for in the source file C<path>."
14726 #: ../src/guestfs-actions.pod:6062 ../fish/guestfish-actions.pod:4051
14727 msgid "Allowed encodings are:"
14731 #: ../src/guestfs-actions.pod:6066 ../fish/guestfish-actions.pod:4055
14736 #: ../src/guestfs-actions.pod:6068
14738 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
14739 "ISO-8859-X (this is what C<guestfs_strings> uses)."
14743 #: ../src/guestfs-actions.pod:6071 ../fish/guestfish-actions.pod:4060
14748 #: ../src/guestfs-actions.pod:6073 ../fish/guestfish-actions.pod:4062
14749 msgid "Single 8-bit-byte characters."
14753 #: ../src/guestfs-actions.pod:6075 ../fish/guestfish-actions.pod:4064
14758 #: ../src/guestfs-actions.pod:6077 ../fish/guestfish-actions.pod:4066
14759 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
14763 #: ../src/guestfs-actions.pod:6080 ../fish/guestfish-actions.pod:4069
14764 msgid "l (lower case letter L)"
14768 #: ../src/guestfs-actions.pod:6082 ../fish/guestfish-actions.pod:4071
14770 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
14771 "examining binaries in Windows guests."
14775 #: ../src/guestfs-actions.pod:6085 ../fish/guestfish-actions.pod:4074
14780 #: ../src/guestfs-actions.pod:6087 ../fish/guestfish-actions.pod:4076
14781 msgid "32-bit big endian such as UCS-4BE."
14785 #: ../src/guestfs-actions.pod:6089 ../fish/guestfish-actions.pod:4078
14790 #: ../src/guestfs-actions.pod:6091 ../fish/guestfish-actions.pod:4080
14791 msgid "32-bit little endian such as UCS-4LE."
14795 #: ../src/guestfs-actions.pod:6095 ../fish/guestfish-actions.pod:4084
14796 msgid "The returned strings are transcoded to UTF-8."
14800 #: ../src/guestfs-actions.pod:6106
14801 msgid "guestfs_swapoff_device"
14805 #: ../src/guestfs-actions.pod:6108
14809 " guestfs_swapoff_device (guestfs_h *g,\n"
14810 " const char *device);\n"
14815 #: ../src/guestfs-actions.pod:6112
14817 "This command disables the libguestfs appliance swap device or partition "
14818 "named C<device>. See C<guestfs_swapon_device>."
14822 #: ../src/guestfs-actions.pod:6120
14823 msgid "guestfs_swapoff_file"
14827 #: ../src/guestfs-actions.pod:6122
14831 " guestfs_swapoff_file (guestfs_h *g,\n"
14832 " const char *file);\n"
14837 #: ../src/guestfs-actions.pod:6126 ../fish/guestfish-actions.pod:4101
14838 msgid "This command disables the libguestfs appliance swap on file."
14842 #: ../src/guestfs-actions.pod:6132
14843 msgid "guestfs_swapoff_label"
14847 #: ../src/guestfs-actions.pod:6134
14851 " guestfs_swapoff_label (guestfs_h *g,\n"
14852 " const char *label);\n"
14857 #: ../src/guestfs-actions.pod:6138 ../fish/guestfish-actions.pod:4107
14859 "This command disables the libguestfs appliance swap on labeled swap "
14864 #: ../src/guestfs-actions.pod:6145
14865 msgid "guestfs_swapoff_uuid"
14869 #: ../src/guestfs-actions.pod:6147
14873 " guestfs_swapoff_uuid (guestfs_h *g,\n"
14874 " const char *uuid);\n"
14879 #: ../src/guestfs-actions.pod:6151 ../fish/guestfish-actions.pod:4114
14881 "This command disables the libguestfs appliance swap partition with the given "
14886 #: ../src/guestfs-actions.pod:6158
14887 msgid "guestfs_swapon_device"
14891 #: ../src/guestfs-actions.pod:6160
14895 " guestfs_swapon_device (guestfs_h *g,\n"
14896 " const char *device);\n"
14901 #: ../src/guestfs-actions.pod:6164
14903 "This command enables the libguestfs appliance to use the swap device or "
14904 "partition named C<device>. The increased memory is made available for all "
14905 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
14909 #: ../src/guestfs-actions.pod:6169 ../fish/guestfish-actions.pod:4126
14911 "Note that you should not swap to existing guest swap partitions unless you "
14912 "know what you are doing. They may contain hibernation information, or other "
14913 "information that the guest doesn't want you to trash. You also risk leaking "
14914 "information about the host to the guest this way. Instead, attach a new "
14915 "host device to the guest and swap on that."
14919 #: ../src/guestfs-actions.pod:6180
14920 msgid "guestfs_swapon_file"
14924 #: ../src/guestfs-actions.pod:6182
14928 " guestfs_swapon_file (guestfs_h *g,\n"
14929 " const char *file);\n"
14934 #: ../src/guestfs-actions.pod:6186
14936 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
14941 #: ../src/guestfs-actions.pod:6193
14942 msgid "guestfs_swapon_label"
14946 #: ../src/guestfs-actions.pod:6195
14950 " guestfs_swapon_label (guestfs_h *g,\n"
14951 " const char *label);\n"
14956 #: ../src/guestfs-actions.pod:6199
14958 "This command enables swap to a labeled swap partition. See "
14959 "C<guestfs_swapon_device> for other notes."
14963 #: ../src/guestfs-actions.pod:6206
14964 msgid "guestfs_swapon_uuid"
14968 #: ../src/guestfs-actions.pod:6208
14972 " guestfs_swapon_uuid (guestfs_h *g,\n"
14973 " const char *uuid);\n"
14978 #: ../src/guestfs-actions.pod:6212
14980 "This command enables swap to a swap partition with the given UUID. See "
14981 "C<guestfs_swapon_device> for other notes."
14985 #: ../src/guestfs-actions.pod:6219
14986 msgid "guestfs_sync"
14990 #: ../src/guestfs-actions.pod:6221
14994 " guestfs_sync (guestfs_h *g);\n"
14999 #: ../src/guestfs-actions.pod:6224 ../fish/guestfish-actions.pod:4158
15001 "This syncs the disk, so that any writes are flushed through to the "
15002 "underlying disk image."
15006 #: ../src/guestfs-actions.pod:6227 ../fish/guestfish-actions.pod:4161
15008 "You should always call this if you have modified a disk image, before "
15009 "closing the handle."
15013 #: ../src/guestfs-actions.pod:6234
15014 msgid "guestfs_tail"
15018 #: ../src/guestfs-actions.pod:6236
15022 " guestfs_tail (guestfs_h *g,\n"
15023 " const char *path);\n"
15028 #: ../src/guestfs-actions.pod:6240 ../fish/guestfish-actions.pod:4168
15030 "This command returns up to the last 10 lines of a file as a list of strings."
15034 #: ../src/guestfs-actions.pod:6252
15035 msgid "guestfs_tail_n"
15039 #: ../src/guestfs-actions.pod:6254
15043 " guestfs_tail_n (guestfs_h *g,\n"
15045 " const char *path);\n"
15050 #: ../src/guestfs-actions.pod:6259 ../fish/guestfish-actions.pod:4178
15052 "If the parameter C<nrlines> is a positive number, this returns the last "
15053 "C<nrlines> lines of the file C<path>."
15057 #: ../src/guestfs-actions.pod:6262 ../fish/guestfish-actions.pod:4181
15059 "If the parameter C<nrlines> is a negative number, this returns lines from "
15060 "the file C<path>, starting with the C<-nrlines>th line."
15064 #: ../src/guestfs-actions.pod:6276
15065 msgid "guestfs_tar_in"
15069 #: ../src/guestfs-actions.pod:6278
15073 " guestfs_tar_in (guestfs_h *g,\n"
15074 " const char *tarfile,\n"
15075 " const char *directory);\n"
15080 #: ../src/guestfs-actions.pod:6283 ../fish/guestfish-actions.pod:4193
15082 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
15083 "tar file) into C<directory>."
15087 #: ../src/guestfs-actions.pod:6286
15089 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
15093 #: ../src/guestfs-actions.pod:6291 ../src/guestfs-actions.pod:6308
15094 #: ../src/guestfs-actions.pod:6324 ../src/guestfs-actions.pod:6340
15095 msgid "(Added in 1.0.3)"
15099 #: ../src/guestfs-actions.pod:6293
15100 msgid "guestfs_tar_out"
15104 #: ../src/guestfs-actions.pod:6295
15108 " guestfs_tar_out (guestfs_h *g,\n"
15109 " const char *directory,\n"
15110 " const char *tarfile);\n"
15115 #: ../src/guestfs-actions.pod:6300 ../fish/guestfish-actions.pod:4205
15117 "This command packs the contents of C<directory> and downloads it to local "
15122 #: ../src/guestfs-actions.pod:6303
15124 "To download a compressed tarball, use C<guestfs_tgz_out> or "
15125 "C<guestfs_txz_out>."
15129 #: ../src/guestfs-actions.pod:6310
15130 msgid "guestfs_tgz_in"
15134 #: ../src/guestfs-actions.pod:6312
15138 " guestfs_tgz_in (guestfs_h *g,\n"
15139 " const char *tarball,\n"
15140 " const char *directory);\n"
15145 #: ../src/guestfs-actions.pod:6317 ../fish/guestfish-actions.pod:4217
15147 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
15148 "tar file) into C<directory>."
15152 #: ../src/guestfs-actions.pod:6320
15153 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
15157 #: ../src/guestfs-actions.pod:6326
15158 msgid "guestfs_tgz_out"
15162 #: ../src/guestfs-actions.pod:6328
15166 " guestfs_tgz_out (guestfs_h *g,\n"
15167 " const char *directory,\n"
15168 " const char *tarball);\n"
15173 #: ../src/guestfs-actions.pod:6333 ../fish/guestfish-actions.pod:4228
15175 "This command packs the contents of C<directory> and downloads it to local "
15180 #: ../src/guestfs-actions.pod:6336
15181 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
15185 #: ../src/guestfs-actions.pod:6342
15186 msgid "guestfs_touch"
15190 #: ../src/guestfs-actions.pod:6344
15194 " guestfs_touch (guestfs_h *g,\n"
15195 " const char *path);\n"
15200 #: ../src/guestfs-actions.pod:6348 ../fish/guestfish-actions.pod:4239
15202 "Touch acts like the L<touch(1)> command. It can be used to update the "
15203 "timestamps on a file, or, if the file does not exist, to create a new zero-"
15208 #: ../src/guestfs-actions.pod:6352 ../fish/guestfish-actions.pod:4243
15210 "This command only works on regular files, and will fail on other file types "
15211 "such as directories, symbolic links, block special etc."
15215 #: ../src/guestfs-actions.pod:6359
15216 msgid "guestfs_truncate"
15220 #: ../src/guestfs-actions.pod:6361
15224 " guestfs_truncate (guestfs_h *g,\n"
15225 " const char *path);\n"
15230 #: ../src/guestfs-actions.pod:6365 ../fish/guestfish-actions.pod:4250
15232 "This command truncates C<path> to a zero-length file. The file must exist "
15237 #: ../src/guestfs-actions.pod:6372
15238 msgid "guestfs_truncate_size"
15242 #: ../src/guestfs-actions.pod:6374
15246 " guestfs_truncate_size (guestfs_h *g,\n"
15247 " const char *path,\n"
15248 " int64_t size);\n"
15253 #: ../src/guestfs-actions.pod:6379 ../fish/guestfish-actions.pod:4257
15255 "This command truncates C<path> to size C<size> bytes. The file must exist "
15260 #: ../src/guestfs-actions.pod:6382
15262 "If the current file size is less than C<size> then the file is extended to "
15263 "the required size with zero bytes. This creates a sparse file (ie. disk "
15264 "blocks are not allocated for the file until you write to it). To create a "
15265 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
15269 #: ../src/guestfs-actions.pod:6392
15270 msgid "guestfs_tune2fs_l"
15274 #: ../src/guestfs-actions.pod:6394
15278 " guestfs_tune2fs_l (guestfs_h *g,\n"
15279 " const char *device);\n"
15284 #: ../src/guestfs-actions.pod:6398 ../fish/guestfish-actions.pod:4270
15286 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
15291 #: ../src/guestfs-actions.pod:6401 ../fish/guestfish-actions.pod:4273
15293 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
15294 "for more details. The list of fields returned isn't clearly defined, and "
15295 "depends on both the version of C<tune2fs> that libguestfs was built against, "
15296 "and the filesystem itself."
15300 #: ../src/guestfs-actions.pod:6414
15301 msgid "guestfs_txz_in"
15305 #: ../src/guestfs-actions.pod:6416
15309 " guestfs_txz_in (guestfs_h *g,\n"
15310 " const char *tarball,\n"
15311 " const char *directory);\n"
15316 #: ../src/guestfs-actions.pod:6421 ../fish/guestfish-actions.pod:4282
15318 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
15319 "tar file) into C<directory>."
15323 #: ../src/guestfs-actions.pod:6428
15324 msgid "guestfs_txz_out"
15328 #: ../src/guestfs-actions.pod:6430
15332 " guestfs_txz_out (guestfs_h *g,\n"
15333 " const char *directory,\n"
15334 " const char *tarball);\n"
15339 #: ../src/guestfs-actions.pod:6435 ../fish/guestfish-actions.pod:4291
15341 "This command packs the contents of C<directory> and downloads it to local "
15342 "file C<tarball> (as an xz compressed tar archive)."
15346 #: ../src/guestfs-actions.pod:6442
15347 msgid "guestfs_umask"
15351 #: ../src/guestfs-actions.pod:6444
15355 " guestfs_umask (guestfs_h *g,\n"
15361 #: ../src/guestfs-actions.pod:6448 ../fish/guestfish-actions.pod:4300
15363 "This function sets the mask used for creating new files and device nodes to "
15368 #: ../src/guestfs-actions.pod:6451 ../fish/guestfish-actions.pod:4303
15370 "Typical umask values would be C<022> which creates new files with "
15371 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
15372 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
15376 #: ../src/guestfs-actions.pod:6456 ../fish/guestfish-actions.pod:4308
15378 "The default umask is C<022>. This is important because it means that "
15379 "directories and device nodes will be created with C<0644> or C<0755> mode "
15380 "even if you specify C<0777>."
15384 #: ../src/guestfs-actions.pod:6460
15386 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
15387 "C<guestfs_mkdir>."
15391 #: ../src/guestfs-actions.pod:6463 ../fish/guestfish-actions.pod:4315
15392 msgid "This call returns the previous umask."
15396 #: ../src/guestfs-actions.pod:6469
15397 msgid "guestfs_umount"
15401 #: ../src/guestfs-actions.pod:6471
15405 " guestfs_umount (guestfs_h *g,\n"
15406 " const char *pathordevice);\n"
15411 #: ../src/guestfs-actions.pod:6475 ../fish/guestfish-actions.pod:4323
15413 "This unmounts the given filesystem. The filesystem may be specified either "
15414 "by its mountpoint (path) or the device which contains the filesystem."
15418 #: ../src/guestfs-actions.pod:6483
15419 msgid "guestfs_umount_all"
15423 #: ../src/guestfs-actions.pod:6485
15427 " guestfs_umount_all (guestfs_h *g);\n"
15432 #: ../src/guestfs-actions.pod:6488 ../fish/guestfish-actions.pod:4333
15433 msgid "This unmounts all mounted filesystems."
15437 #: ../src/guestfs-actions.pod:6490 ../fish/guestfish-actions.pod:4335
15438 msgid "Some internal mounts are not unmounted by this call."
15442 #: ../src/guestfs-actions.pod:6496
15443 msgid "guestfs_upload"
15447 #: ../src/guestfs-actions.pod:6498
15451 " guestfs_upload (guestfs_h *g,\n"
15452 " const char *filename,\n"
15453 " const char *remotefilename);\n"
15458 #: ../src/guestfs-actions.pod:6503 ../src/guestfs-actions.pod:6527
15459 #: ../fish/guestfish-actions.pod:4341 ../fish/guestfish-actions.pod:4354
15460 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
15464 #: ../src/guestfs-actions.pod:6508
15465 msgid "See also C<guestfs_download>."
15469 #: ../src/guestfs-actions.pod:6519
15470 msgid "guestfs_upload_offset"
15474 #: ../src/guestfs-actions.pod:6521
15478 " guestfs_upload_offset (guestfs_h *g,\n"
15479 " const char *filename,\n"
15480 " const char *remotefilename,\n"
15481 " int64_t offset);\n"
15486 #: ../src/guestfs-actions.pod:6530 ../fish/guestfish-actions.pod:4357
15488 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
15489 "The intention is to overwrite parts of existing files or devices, although "
15490 "if a non-existant file is specified then it is created with a \"hole\" "
15491 "before C<offset>. The size of the data written is implicit in the size of "
15492 "the source C<filename>."
15496 #: ../src/guestfs-actions.pod:6537
15498 "Note that there is no limit on the amount of data that can be uploaded with "
15499 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
15500 "full amount unless an error occurs."
15504 #: ../src/guestfs-actions.pod:6542
15505 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
15509 #: ../src/guestfs-actions.pod:6553
15510 msgid "guestfs_utimens"
15514 #: ../src/guestfs-actions.pod:6555
15518 " guestfs_utimens (guestfs_h *g,\n"
15519 " const char *path,\n"
15520 " int64_t atsecs,\n"
15521 " int64_t atnsecs,\n"
15522 " int64_t mtsecs,\n"
15523 " int64_t mtnsecs);\n"
15528 #: ../src/guestfs-actions.pod:6563 ../fish/guestfish-actions.pod:4377
15529 msgid "This command sets the timestamps of a file with nanosecond precision."
15533 #: ../src/guestfs-actions.pod:6566 ../fish/guestfish-actions.pod:4380
15535 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
15540 #: ../src/guestfs-actions.pod:6569 ../fish/guestfish-actions.pod:4383
15542 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
15543 "nanoseconds from the epoch."
15547 #: ../src/guestfs-actions.pod:6572 ../fish/guestfish-actions.pod:4386
15549 "If the C<*nsecs> field contains the special value C<-1> then the "
15550 "corresponding timestamp is set to the current time. (The C<*secs> field is "
15551 "ignored in this case)."
15555 #: ../src/guestfs-actions.pod:6576 ../fish/guestfish-actions.pod:4390
15557 "If the C<*nsecs> field contains the special value C<-2> then the "
15558 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
15563 #: ../src/guestfs-actions.pod:6584 ../src/guestfs-structs.pod:175
15564 msgid "guestfs_version"
15568 #: ../src/guestfs-actions.pod:6586
15571 " struct guestfs_version *\n"
15572 " guestfs_version (guestfs_h *g);\n"
15577 #: ../src/guestfs-actions.pod:6589 ../fish/guestfish-actions.pod:4398
15579 "Return the libguestfs version number that the program is linked against."
15583 #: ../src/guestfs-actions.pod:6592 ../fish/guestfish-actions.pod:4401
15585 "Note that because of dynamic linking this is not necessarily the version of "
15586 "libguestfs that you compiled against. You can compile the program, and then "
15587 "at runtime dynamically link against a completely different C<libguestfs.so> "
15592 #: ../src/guestfs-actions.pod:6597 ../fish/guestfish-actions.pod:4406
15594 "This call was added in version C<1.0.58>. In previous versions of "
15595 "libguestfs there was no way to get the version number. From C code you can "
15596 "use dynamic linker functions to find out if this symbol exists (if it "
15597 "doesn't, then it's an earlier version)."
15601 #: ../src/guestfs-actions.pod:6603 ../fish/guestfish-actions.pod:4412
15603 "The call returns a structure with four elements. The first three (C<major>, "
15604 "C<minor> and C<release>) are numbers and correspond to the usual version "
15605 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
15606 "but may be used for distro-specific information."
15610 #: ../src/guestfs-actions.pod:6609 ../fish/guestfish-actions.pod:4418
15612 "To construct the original version string: C<$major.$minor.$release$extra>"
15616 #: ../src/guestfs-actions.pod:6612 ../fish/guestfish-actions.pod:4421
15617 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
15621 #: ../src/guestfs-actions.pod:6614
15623 "I<Note:> Don't use this call to test for availability of features. In "
15624 "enterprise distributions we backport features from later versions into "
15625 "earlier versions, making this an unreliable way to test for features. Use "
15626 "C<guestfs_available> instead."
15630 #: ../src/guestfs-actions.pod:6620
15632 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
15633 "error. I<The caller must call C<guestfs_free_version> after use>."
15637 #: ../src/guestfs-actions.pod:6624
15638 msgid "(Added in 1.0.58)"
15642 #: ../src/guestfs-actions.pod:6626
15643 msgid "guestfs_vfs_label"
15647 #: ../src/guestfs-actions.pod:6628
15651 " guestfs_vfs_label (guestfs_h *g,\n"
15652 " const char *device);\n"
15657 #: ../src/guestfs-actions.pod:6632 ../fish/guestfish-actions.pod:4433
15658 msgid "This returns the filesystem label of the filesystem on C<device>."
15662 #: ../src/guestfs-actions.pod:6635 ../fish/guestfish-actions.pod:4436
15663 msgid "If the filesystem is unlabeled, this returns the empty string."
15667 #: ../src/guestfs-actions.pod:6637
15668 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
15672 #: ../src/guestfs-actions.pod:6642 ../src/guestfs-actions.pod:6679
15673 msgid "(Added in 1.3.18)"
15677 #: ../src/guestfs-actions.pod:6644
15678 msgid "guestfs_vfs_type"
15682 #: ../src/guestfs-actions.pod:6646
15686 " guestfs_vfs_type (guestfs_h *g,\n"
15687 " const char *device);\n"
15692 #: ../src/guestfs-actions.pod:6650 ../fish/guestfish-actions.pod:4444
15694 "This command gets the filesystem type corresponding to the filesystem on "
15699 #: ../src/guestfs-actions.pod:6653 ../fish/guestfish-actions.pod:4447
15701 "For most filesystems, the result is the name of the Linux VFS module which "
15702 "would be used to mount this filesystem if you mounted it without specifying "
15703 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
15707 #: ../src/guestfs-actions.pod:6663
15708 msgid "guestfs_vfs_uuid"
15712 #: ../src/guestfs-actions.pod:6665
15716 " guestfs_vfs_uuid (guestfs_h *g,\n"
15717 " const char *device);\n"
15722 #: ../src/guestfs-actions.pod:6669 ../fish/guestfish-actions.pod:4456
15723 msgid "This returns the filesystem UUID of the filesystem on C<device>."
15727 #: ../src/guestfs-actions.pod:6672 ../fish/guestfish-actions.pod:4459
15728 msgid "If the filesystem does not have a UUID, this returns the empty string."
15732 #: ../src/guestfs-actions.pod:6674
15733 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
15737 #: ../src/guestfs-actions.pod:6681
15738 msgid "guestfs_vg_activate"
15742 #: ../src/guestfs-actions.pod:6683
15746 " guestfs_vg_activate (guestfs_h *g,\n"
15748 " char *const *volgroups);\n"
15753 #: ../src/guestfs-actions.pod:6688 ../fish/guestfish-actions.pod:4467
15755 "This command activates or (if C<activate> is false) deactivates all logical "
15756 "volumes in the listed volume groups C<volgroups>. If activated, then they "
15757 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
15758 "deactivated, then those devices disappear."
15762 #: ../src/guestfs-actions.pod:6694 ../fish/guestfish-actions.pod:4473
15763 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
15767 #: ../src/guestfs-actions.pod:6696 ../fish/guestfish-actions.pod:4475
15769 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
15770 "activated or deactivated."
15774 #: ../src/guestfs-actions.pod:6703
15775 msgid "guestfs_vg_activate_all"
15779 #: ../src/guestfs-actions.pod:6705
15783 " guestfs_vg_activate_all (guestfs_h *g,\n"
15784 " int activate);\n"
15789 #: ../src/guestfs-actions.pod:6709 ../fish/guestfish-actions.pod:4482
15791 "This command activates or (if C<activate> is false) deactivates all logical "
15792 "volumes in all volume groups. If activated, then they are made known to the "
15793 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
15794 "those devices disappear."
15798 #: ../src/guestfs-actions.pod:6715 ../fish/guestfish-actions.pod:4488
15799 msgid "This command is the same as running C<vgchange -a y|n>"
15803 #: ../src/guestfs-actions.pod:6721
15804 msgid "guestfs_vgcreate"
15808 #: ../src/guestfs-actions.pod:6723
15812 " guestfs_vgcreate (guestfs_h *g,\n"
15813 " const char *volgroup,\n"
15814 " char *const *physvols);\n"
15819 #: ../src/guestfs-actions.pod:6728 ../fish/guestfish-actions.pod:4494
15821 "This creates an LVM volume group called C<volgroup> from the non-empty list "
15822 "of physical volumes C<physvols>."
15826 #: ../src/guestfs-actions.pod:6735
15827 msgid "guestfs_vglvuuids"
15831 #: ../src/guestfs-actions.pod:6737
15835 " guestfs_vglvuuids (guestfs_h *g,\n"
15836 " const char *vgname);\n"
15841 #: ../src/guestfs-actions.pod:6741 ../fish/guestfish-actions.pod:4501
15843 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
15844 "volumes created in this volume group."
15848 #: ../src/guestfs-actions.pod:6744
15850 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
15851 "associate logical volumes and volume groups."
15855 #: ../src/guestfs-actions.pod:6747
15856 msgid "See also C<guestfs_vgpvuuids>."
15860 #: ../src/guestfs-actions.pod:6755
15861 msgid "guestfs_vgpvuuids"
15865 #: ../src/guestfs-actions.pod:6757
15869 " guestfs_vgpvuuids (guestfs_h *g,\n"
15870 " const char *vgname);\n"
15875 #: ../src/guestfs-actions.pod:6761 ../fish/guestfish-actions.pod:4513
15877 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
15878 "volumes that this volume group resides on."
15882 #: ../src/guestfs-actions.pod:6764
15884 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
15885 "associate physical volumes and volume groups."
15889 #: ../src/guestfs-actions.pod:6767
15890 msgid "See also C<guestfs_vglvuuids>."
15894 #: ../src/guestfs-actions.pod:6775
15895 msgid "guestfs_vgremove"
15899 #: ../src/guestfs-actions.pod:6777
15903 " guestfs_vgremove (guestfs_h *g,\n"
15904 " const char *vgname);\n"
15909 #: ../src/guestfs-actions.pod:6781 ../fish/guestfish-actions.pod:4525
15910 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
15914 #: ../src/guestfs-actions.pod:6783 ../fish/guestfish-actions.pod:4527
15916 "This also forcibly removes all logical volumes in the volume group (if any)."
15920 #: ../src/guestfs-actions.pod:6790
15921 msgid "guestfs_vgrename"
15925 #: ../src/guestfs-actions.pod:6792
15929 " guestfs_vgrename (guestfs_h *g,\n"
15930 " const char *volgroup,\n"
15931 " const char *newvolgroup);\n"
15936 #: ../src/guestfs-actions.pod:6797 ../fish/guestfish-actions.pod:4534
15937 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
15941 #: ../src/guestfs-actions.pod:6803
15942 msgid "guestfs_vgs"
15946 #: ../src/guestfs-actions.pod:6805
15950 " guestfs_vgs (guestfs_h *g);\n"
15955 #: ../src/guestfs-actions.pod:6808 ../fish/guestfish-actions.pod:4540
15957 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
15962 #: ../src/guestfs-actions.pod:6811 ../fish/guestfish-actions.pod:4543
15964 "This returns a list of just the volume group names that were detected (eg. "
15969 #: ../src/guestfs-actions.pod:6814
15970 msgid "See also C<guestfs_vgs_full>."
15974 #: ../src/guestfs-actions.pod:6822
15975 msgid "guestfs_vgs_full"
15979 #: ../src/guestfs-actions.pod:6824
15982 " struct guestfs_lvm_vg_list *\n"
15983 " guestfs_vgs_full (guestfs_h *g);\n"
15988 #: ../src/guestfs-actions.pod:6827 ../fish/guestfish-actions.pod:4552
15990 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
15991 "> command. The \"full\" version includes all fields."
15995 #: ../src/guestfs-actions.pod:6830
15997 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
15998 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after use>."
16002 #: ../src/guestfs-actions.pod:6836
16003 msgid "guestfs_vgscan"
16007 #: ../src/guestfs-actions.pod:6838
16011 " guestfs_vgscan (guestfs_h *g);\n"
16016 #: ../src/guestfs-actions.pod:6841 ../fish/guestfish-actions.pod:4559
16018 "This rescans all block devices and rebuilds the list of LVM physical "
16019 "volumes, volume groups and logical volumes."
16023 #: ../src/guestfs-actions.pod:6848
16024 msgid "guestfs_vguuid"
16028 #: ../src/guestfs-actions.pod:6850
16032 " guestfs_vguuid (guestfs_h *g,\n"
16033 " const char *vgname);\n"
16038 #: ../src/guestfs-actions.pod:6854 ../fish/guestfish-actions.pod:4566
16039 msgid "This command returns the UUID of the LVM VG named C<vgname>."
16043 #: ../src/guestfs-actions.pod:6861
16044 msgid "guestfs_wait_ready"
16048 #: ../src/guestfs-actions.pod:6863
16052 " guestfs_wait_ready (guestfs_h *g);\n"
16057 #: ../src/guestfs-actions.pod:6866
16058 msgid "This function is a no op."
16062 #: ../src/guestfs-actions.pod:6868
16064 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
16065 "calling C<guestfs_launch> to wait for the launch to complete. However this "
16066 "is no longer necessary because C<guestfs_launch> now does the waiting."
16070 #: ../src/guestfs-actions.pod:6873
16072 "If you see any calls to this function in code then you can just remove them, "
16073 "unless you want to retain compatibility with older versions of the API."
16077 #: ../src/guestfs-actions.pod:6881
16078 msgid "guestfs_wc_c"
16082 #: ../src/guestfs-actions.pod:6883
16086 " guestfs_wc_c (guestfs_h *g,\n"
16087 " const char *path);\n"
16092 #: ../src/guestfs-actions.pod:6887 ../fish/guestfish-actions.pod:4572
16094 "This command counts the characters in a file, using the C<wc -c> external "
16099 #: ../src/guestfs-actions.pod:6894
16100 msgid "guestfs_wc_l"
16104 #: ../src/guestfs-actions.pod:6896
16108 " guestfs_wc_l (guestfs_h *g,\n"
16109 " const char *path);\n"
16114 #: ../src/guestfs-actions.pod:6900 ../fish/guestfish-actions.pod:4579
16116 "This command counts the lines in a file, using the C<wc -l> external command."
16120 #: ../src/guestfs-actions.pod:6907
16121 msgid "guestfs_wc_w"
16125 #: ../src/guestfs-actions.pod:6909
16129 " guestfs_wc_w (guestfs_h *g,\n"
16130 " const char *path);\n"
16135 #: ../src/guestfs-actions.pod:6913 ../fish/guestfish-actions.pod:4586
16137 "This command counts the words in a file, using the C<wc -w> external command."
16141 #: ../src/guestfs-actions.pod:6920
16142 msgid "guestfs_write"
16146 #: ../src/guestfs-actions.pod:6922
16150 " guestfs_write (guestfs_h *g,\n"
16151 " const char *path,\n"
16152 " const char *content,\n"
16153 " size_t content_size);\n"
16158 #: ../src/guestfs-actions.pod:6928 ../fish/guestfish-actions.pod:4593
16160 "This call creates a file called C<path>. The content of the file is the "
16161 "string C<content> (which can contain any 8 bit data)."
16165 #: ../src/guestfs-actions.pod:6938
16166 msgid "guestfs_write_file"
16170 #: ../src/guestfs-actions.pod:6940
16174 " guestfs_write_file (guestfs_h *g,\n"
16175 " const char *path,\n"
16176 " const char *content,\n"
16182 #: ../src/guestfs-actions.pod:6946 ../fish/guestfish-actions.pod:4603
16184 "This call creates a file called C<path>. The contents of the file is the "
16185 "string C<content> (which can contain any 8 bit data), with length C<size>."
16189 #: ../src/guestfs-actions.pod:6950 ../fish/guestfish-actions.pod:4607
16191 "As a special case, if C<size> is C<0> then the length is calculated using "
16192 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
16196 #: ../src/guestfs-actions.pod:6954 ../fish/guestfish-actions.pod:4611
16198 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
16199 "I<not> work, even if the length is specified."
16203 #: ../src/guestfs-actions.pod:6962 ../fish/guestfish-actions.pod:4617
16205 "This function is deprecated. In new code, use the C<write> call instead."
16209 #: ../src/guestfs-actions.pod:6971
16210 msgid "guestfs_zegrep"
16214 #: ../src/guestfs-actions.pod:6973
16218 " guestfs_zegrep (guestfs_h *g,\n"
16219 " const char *regex,\n"
16220 " const char *path);\n"
16225 #: ../src/guestfs-actions.pod:6978 ../fish/guestfish-actions.pod:4628
16227 "This calls the external C<zegrep> program and returns the matching lines."
16231 #: ../src/guestfs-actions.pod:6990
16232 msgid "guestfs_zegrepi"
16236 #: ../src/guestfs-actions.pod:6992
16240 " guestfs_zegrepi (guestfs_h *g,\n"
16241 " const char *regex,\n"
16242 " const char *path);\n"
16247 #: ../src/guestfs-actions.pod:6997 ../fish/guestfish-actions.pod:4638
16249 "This calls the external C<zegrep -i> program and returns the matching lines."
16253 #: ../src/guestfs-actions.pod:7009
16254 msgid "guestfs_zero"
16258 #: ../src/guestfs-actions.pod:7011
16262 " guestfs_zero (guestfs_h *g,\n"
16263 " const char *device);\n"
16268 #: ../src/guestfs-actions.pod:7015 ../fish/guestfish-actions.pod:4648
16269 msgid "This command writes zeroes over the first few blocks of C<device>."
16273 #: ../src/guestfs-actions.pod:7017 ../fish/guestfish-actions.pod:4650
16275 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
16276 "securely wipe the device). It should be sufficient to remove any partition "
16277 "tables, filesystem superblocks and so on."
16281 #: ../src/guestfs-actions.pod:7021
16282 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
16286 #: ../src/guestfs-actions.pod:7032
16287 msgid "guestfs_zero_device"
16291 #: ../src/guestfs-actions.pod:7034
16295 " guestfs_zero_device (guestfs_h *g,\n"
16296 " const char *device);\n"
16301 #: ../src/guestfs-actions.pod:7038
16303 "This command writes zeroes over the entire C<device>. Compare with "
16304 "C<guestfs_zero> which just zeroes the first few blocks of a device."
16308 #: ../src/guestfs-actions.pod:7052
16309 msgid "(Added in 1.3.1)"
16313 #: ../src/guestfs-actions.pod:7054
16314 msgid "guestfs_zerofree"
16318 #: ../src/guestfs-actions.pod:7056
16322 " guestfs_zerofree (guestfs_h *g,\n"
16323 " const char *device);\n"
16328 #: ../src/guestfs-actions.pod:7060 ../fish/guestfish-actions.pod:4671
16330 "This runs the I<zerofree> program on C<device>. This program claims to zero "
16331 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
16332 "possible to compress the filesystem more effectively."
16336 #: ../src/guestfs-actions.pod:7065 ../fish/guestfish-actions.pod:4676
16337 msgid "You should B<not> run this program if the filesystem is mounted."
16341 #: ../src/guestfs-actions.pod:7068 ../fish/guestfish-actions.pod:4679
16343 "It is possible that using this program can damage the filesystem or data on "
16348 #: ../src/guestfs-actions.pod:7075
16349 msgid "guestfs_zfgrep"
16353 #: ../src/guestfs-actions.pod:7077
16357 " guestfs_zfgrep (guestfs_h *g,\n"
16358 " const char *pattern,\n"
16359 " const char *path);\n"
16364 #: ../src/guestfs-actions.pod:7082 ../fish/guestfish-actions.pod:4686
16366 "This calls the external C<zfgrep> program and returns the matching lines."
16370 #: ../src/guestfs-actions.pod:7094
16371 msgid "guestfs_zfgrepi"
16375 #: ../src/guestfs-actions.pod:7096
16379 " guestfs_zfgrepi (guestfs_h *g,\n"
16380 " const char *pattern,\n"
16381 " const char *path);\n"
16386 #: ../src/guestfs-actions.pod:7101 ../fish/guestfish-actions.pod:4696
16388 "This calls the external C<zfgrep -i> program and returns the matching lines."
16392 #: ../src/guestfs-actions.pod:7113
16393 msgid "guestfs_zfile"
16397 #: ../src/guestfs-actions.pod:7115
16401 " guestfs_zfile (guestfs_h *g,\n"
16402 " const char *meth,\n"
16403 " const char *path);\n"
16408 #: ../src/guestfs-actions.pod:7120 ../fish/guestfish-actions.pod:4706
16410 "This command runs C<file> after first decompressing C<path> using C<method>."
16414 #: ../src/guestfs-actions.pod:7123 ../fish/guestfish-actions.pod:4709
16415 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
16419 #: ../src/guestfs-actions.pod:7125
16421 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
16426 #: ../src/guestfs-actions.pod:7131 ../fish/guestfish-actions.pod:4714
16428 "This function is deprecated. In new code, use the C<file> call instead."
16432 #: ../src/guestfs-actions.pod:7140
16433 msgid "guestfs_zgrep"
16437 #: ../src/guestfs-actions.pod:7142
16441 " guestfs_zgrep (guestfs_h *g,\n"
16442 " const char *regex,\n"
16443 " const char *path);\n"
16448 #: ../src/guestfs-actions.pod:7147 ../fish/guestfish-actions.pod:4725
16450 "This calls the external C<zgrep> program and returns the matching lines."
16454 #: ../src/guestfs-actions.pod:7159
16455 msgid "guestfs_zgrepi"
16459 #: ../src/guestfs-actions.pod:7161
16463 " guestfs_zgrepi (guestfs_h *g,\n"
16464 " const char *regex,\n"
16465 " const char *path);\n"
16470 #: ../src/guestfs-actions.pod:7166 ../fish/guestfish-actions.pod:4735
16472 "This calls the external C<zgrep -i> program and returns the matching lines."
16476 #: ../src/guestfs-availability.pod:3
16481 #: ../src/guestfs-availability.pod:5
16483 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
16484 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
16485 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
16486 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
16487 "L</guestfs_aug_save> L</guestfs_aug_set>"
16491 #: ../src/guestfs-availability.pod:21
16496 #: ../src/guestfs-availability.pod:23
16498 "The following functions: L</guestfs_inotify_add_watch> L</"
16499 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
16500 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
16504 #: ../src/guestfs-availability.pod:31
16505 msgid "B<linuxfsuuid>"
16509 #: ../src/guestfs-availability.pod:33
16511 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
16512 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
16516 #: ../src/guestfs-availability.pod:40
16517 msgid "B<linuxmodules>"
16521 #: ../src/guestfs-availability.pod:42
16522 msgid "The following functions: L</guestfs_modprobe>"
16526 #: ../src/guestfs-availability.pod:45
16527 msgid "B<linuxxattrs>"
16531 #: ../src/guestfs-availability.pod:47
16533 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> L</"
16534 "guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> L</"
16535 "guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> L</"
16536 "guestfs_setxattr>"
16540 #: ../src/guestfs-availability.pod:58
16545 #: ../src/guestfs-availability.pod:60
16547 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
16548 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
16549 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
16553 #: ../src/guestfs-availability.pod:69
16558 #: ../src/guestfs-availability.pod:71
16560 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
16561 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
16562 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
16563 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
16564 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
16565 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
16566 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
16570 #: ../src/guestfs-availability.pod:94
16575 #: ../src/guestfs-availability.pod:96
16577 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
16578 "guestfs_mknod_b> L</guestfs_mknod_c>"
16582 #: ../src/guestfs-availability.pod:102
16587 #: ../src/guestfs-availability.pod:104
16588 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
16592 #: ../src/guestfs-availability.pod:107
16593 msgid "B<ntfsprogs>"
16597 #: ../src/guestfs-availability.pod:109
16599 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
16603 #: ../src/guestfs-availability.pod:113
16604 msgid "B<realpath>"
16608 #: ../src/guestfs-availability.pod:115
16609 msgid "The following functions: L</guestfs_realpath>"
16613 #: ../src/guestfs-availability.pod:118
16618 #: ../src/guestfs-availability.pod:120
16620 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
16621 "guestfs_scrub_freespace>"
16625 #: ../src/guestfs-availability.pod:125
16630 #: ../src/guestfs-availability.pod:127
16631 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
16635 #: ../src/guestfs-availability.pod:131
16640 #: ../src/guestfs-availability.pod:133
16641 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
16645 #: ../src/guestfs-availability.pod:137
16646 msgid "B<zerofree>"
16650 #: ../src/guestfs-availability.pod:139
16651 msgid "The following functions: L</guestfs_zerofree>"
16655 #: ../src/guestfs-structs.pod:1
16656 msgid "guestfs_int_bool"
16660 #: ../src/guestfs-structs.pod:3
16663 " struct guestfs_int_bool {\n"
16671 #: ../src/guestfs-structs.pod:8
16674 " struct guestfs_int_bool_list {\n"
16675 " uint32_t len; /* Number of elements in list. */\n"
16676 " struct guestfs_int_bool *val; /* Elements. */\n"
16682 #: ../src/guestfs-structs.pod:13
16685 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
16686 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
16691 #: ../src/guestfs-structs.pod:16
16692 msgid "guestfs_lvm_pv"
16696 #: ../src/guestfs-structs.pod:18
16699 " struct guestfs_lvm_pv {\n"
16700 " char *pv_name;\n"
16701 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
16702 " char pv_uuid[32];\n"
16704 " uint64_t pv_size;\n"
16705 " uint64_t dev_size;\n"
16706 " uint64_t pv_free;\n"
16707 " uint64_t pv_used;\n"
16708 " char *pv_attr;\n"
16709 " int64_t pv_pe_count;\n"
16710 " int64_t pv_pe_alloc_count;\n"
16711 " char *pv_tags;\n"
16712 " uint64_t pe_start;\n"
16713 " int64_t pv_mda_count;\n"
16714 " uint64_t pv_mda_free;\n"
16720 #: ../src/guestfs-structs.pod:36
16723 " struct guestfs_lvm_pv_list {\n"
16724 " uint32_t len; /* Number of elements in list. */\n"
16725 " struct guestfs_lvm_pv *val; /* Elements. */\n"
16731 #: ../src/guestfs-structs.pod:41
16734 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
16735 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
16740 #: ../src/guestfs-structs.pod:44
16741 msgid "guestfs_lvm_vg"
16745 #: ../src/guestfs-structs.pod:46
16748 " struct guestfs_lvm_vg {\n"
16749 " char *vg_name;\n"
16750 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
16751 " char vg_uuid[32];\n"
16753 " char *vg_attr;\n"
16754 " uint64_t vg_size;\n"
16755 " uint64_t vg_free;\n"
16756 " char *vg_sysid;\n"
16757 " uint64_t vg_extent_size;\n"
16758 " int64_t vg_extent_count;\n"
16759 " int64_t vg_free_count;\n"
16760 " int64_t max_lv;\n"
16761 " int64_t max_pv;\n"
16762 " int64_t pv_count;\n"
16763 " int64_t lv_count;\n"
16764 " int64_t snap_count;\n"
16765 " int64_t vg_seqno;\n"
16766 " char *vg_tags;\n"
16767 " int64_t vg_mda_count;\n"
16768 " uint64_t vg_mda_free;\n"
16774 #: ../src/guestfs-structs.pod:69
16777 " struct guestfs_lvm_vg_list {\n"
16778 " uint32_t len; /* Number of elements in list. */\n"
16779 " struct guestfs_lvm_vg *val; /* Elements. */\n"
16785 #: ../src/guestfs-structs.pod:74
16788 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
16789 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
16794 #: ../src/guestfs-structs.pod:77
16795 msgid "guestfs_lvm_lv"
16799 #: ../src/guestfs-structs.pod:79
16802 " struct guestfs_lvm_lv {\n"
16803 " char *lv_name;\n"
16804 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
16805 " char lv_uuid[32];\n"
16806 " char *lv_attr;\n"
16807 " int64_t lv_major;\n"
16808 " int64_t lv_minor;\n"
16809 " int64_t lv_kernel_major;\n"
16810 " int64_t lv_kernel_minor;\n"
16811 " uint64_t lv_size;\n"
16812 " int64_t seg_count;\n"
16814 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
16815 " float snap_percent;\n"
16816 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
16817 " float copy_percent;\n"
16818 " char *move_pv;\n"
16819 " char *lv_tags;\n"
16820 " char *mirror_log;\n"
16821 " char *modules;\n"
16827 #: ../src/guestfs-structs.pod:101
16830 " struct guestfs_lvm_lv_list {\n"
16831 " uint32_t len; /* Number of elements in list. */\n"
16832 " struct guestfs_lvm_lv *val; /* Elements. */\n"
16838 #: ../src/guestfs-structs.pod:106
16841 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
16842 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
16847 #: ../src/guestfs-structs.pod:111
16850 " struct guestfs_stat {\n"
16854 " int64_t nlink;\n"
16859 " int64_t blksize;\n"
16860 " int64_t blocks;\n"
16861 " int64_t atime;\n"
16862 " int64_t mtime;\n"
16863 " int64_t ctime;\n"
16869 #: ../src/guestfs-structs.pod:127
16872 " struct guestfs_stat_list {\n"
16873 " uint32_t len; /* Number of elements in list. */\n"
16874 " struct guestfs_stat *val; /* Elements. */\n"
16880 #: ../src/guestfs-structs.pod:132
16883 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
16884 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
16889 #: ../src/guestfs-structs.pod:137
16892 " struct guestfs_statvfs {\n"
16893 " int64_t bsize;\n"
16894 " int64_t frsize;\n"
16895 " int64_t blocks;\n"
16896 " int64_t bfree;\n"
16897 " int64_t bavail;\n"
16898 " int64_t files;\n"
16899 " int64_t ffree;\n"
16900 " int64_t favail;\n"
16903 " int64_t namemax;\n"
16909 #: ../src/guestfs-structs.pod:151
16912 " struct guestfs_statvfs_list {\n"
16913 " uint32_t len; /* Number of elements in list. */\n"
16914 " struct guestfs_statvfs *val; /* Elements. */\n"
16920 #: ../src/guestfs-structs.pod:156
16923 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
16924 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
16929 #: ../src/guestfs-structs.pod:159
16930 msgid "guestfs_dirent"
16934 #: ../src/guestfs-structs.pod:161
16937 " struct guestfs_dirent {\n"
16946 #: ../src/guestfs-structs.pod:167
16949 " struct guestfs_dirent_list {\n"
16950 " uint32_t len; /* Number of elements in list. */\n"
16951 " struct guestfs_dirent *val; /* Elements. */\n"
16957 #: ../src/guestfs-structs.pod:172
16960 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
16961 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
16966 #: ../src/guestfs-structs.pod:177
16969 " struct guestfs_version {\n"
16970 " int64_t major;\n"
16971 " int64_t minor;\n"
16972 " int64_t release;\n"
16979 #: ../src/guestfs-structs.pod:184
16982 " struct guestfs_version_list {\n"
16983 " uint32_t len; /* Number of elements in list. */\n"
16984 " struct guestfs_version *val; /* Elements. */\n"
16990 #: ../src/guestfs-structs.pod:189
16993 " void guestfs_free_version (struct guestfs_free_version *);\n"
16994 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
16999 #: ../src/guestfs-structs.pod:192
17000 msgid "guestfs_xattr"
17004 #: ../src/guestfs-structs.pod:194
17007 " struct guestfs_xattr {\n"
17008 " char *attrname;\n"
17009 " /* The next two fields describe a byte array. */\n"
17010 " uint32_t attrval_len;\n"
17011 " char *attrval;\n"
17017 #: ../src/guestfs-structs.pod:201
17020 " struct guestfs_xattr_list {\n"
17021 " uint32_t len; /* Number of elements in list. */\n"
17022 " struct guestfs_xattr *val; /* Elements. */\n"
17028 #: ../src/guestfs-structs.pod:206
17031 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
17032 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
17037 #: ../src/guestfs-structs.pod:209
17038 msgid "guestfs_inotify_event"
17042 #: ../src/guestfs-structs.pod:211
17045 " struct guestfs_inotify_event {\n"
17046 " int64_t in_wd;\n"
17047 " uint32_t in_mask;\n"
17048 " uint32_t in_cookie;\n"
17049 " char *in_name;\n"
17055 #: ../src/guestfs-structs.pod:218
17058 " struct guestfs_inotify_event_list {\n"
17059 " uint32_t len; /* Number of elements in list. */\n"
17060 " struct guestfs_inotify_event *val; /* Elements. */\n"
17066 #: ../src/guestfs-structs.pod:223
17069 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
17070 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
17075 #: ../src/guestfs-structs.pod:226
17076 msgid "guestfs_partition"
17080 #: ../src/guestfs-structs.pod:228
17083 " struct guestfs_partition {\n"
17084 " int32_t part_num;\n"
17085 " uint64_t part_start;\n"
17086 " uint64_t part_end;\n"
17087 " uint64_t part_size;\n"
17093 #: ../src/guestfs-structs.pod:235
17096 " struct guestfs_partition_list {\n"
17097 " uint32_t len; /* Number of elements in list. */\n"
17098 " struct guestfs_partition *val; /* Elements. */\n"
17104 #: ../src/guestfs-structs.pod:240
17107 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
17108 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
17113 #: ../src/guestfs-structs.pod:243
17114 msgid "guestfs_application"
17118 #: ../src/guestfs-structs.pod:245
17121 " struct guestfs_application {\n"
17122 " char *app_name;\n"
17123 " char *app_display_name;\n"
17124 " int32_t app_epoch;\n"
17125 " char *app_version;\n"
17126 " char *app_release;\n"
17127 " char *app_install_path;\n"
17128 " char *app_trans_path;\n"
17129 " char *app_publisher;\n"
17130 " char *app_url;\n"
17131 " char *app_source_package;\n"
17132 " char *app_summary;\n"
17133 " char *app_description;\n"
17139 #: ../src/guestfs-structs.pod:260
17142 " struct guestfs_application_list {\n"
17143 " uint32_t len; /* Number of elements in list. */\n"
17144 " struct guestfs_application *val; /* Elements. */\n"
17150 #: ../src/guestfs-structs.pod:265
17153 " void guestfs_free_application (struct guestfs_free_application *);\n"
17154 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
17159 #: ../fish/guestfish.pod:5
17160 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
17164 #: ../fish/guestfish.pod:9
17167 " guestfish [--options] [commands]\n"
17172 #: ../fish/guestfish.pod:11
17180 #: ../fish/guestfish.pod:13
17183 " guestfish [--ro|--rw] -a disk.img\n"
17188 #: ../fish/guestfish.pod:15
17191 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
17196 #: ../fish/guestfish.pod:17
17199 " guestfish -d libvirt-domain\n"
17204 #: ../fish/guestfish.pod:19
17207 " guestfish [--ro|--rw] -a disk.img -i\n"
17212 #: ../fish/guestfish.pod:21
17215 " guestfish -d libvirt-domain -i\n"
17220 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:15
17225 #: ../fish/guestfish.pod:25
17227 "Using guestfish in read/write mode on live virtual machines can be "
17228 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
17229 "option to use guestfish safely if the disk image or virtual machine might be "
17234 #: ../fish/guestfish.pod:32
17236 "Guestfish is a shell and command-line tool for examining and modifying "
17237 "virtual machine filesystems. It uses libguestfs and exposes all of the "
17238 "functionality of the guestfs API, see L<guestfs(3)>."
17242 #: ../fish/guestfish.pod:36
17244 "Guestfish gives you structured access to the libguestfs API, from shell "
17245 "scripts or the command line or interactively. If you want to rescue a "
17246 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
17251 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:897
17252 #: ../fuse/guestmount.pod:39
17257 #: ../fish/guestfish.pod:43
17258 msgid "As an interactive shell"
17262 #: ../fish/guestfish.pod:45
17270 #: ../fish/guestfish.pod:47
17273 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
17274 " editing virtual machine filesystems.\n"
17279 #: ../fish/guestfish.pod:50
17282 " Type: 'help' for a list of commands\n"
17283 " 'man' to read the manual\n"
17284 " 'quit' to quit the shell\n"
17289 #: ../fish/guestfish.pod:54
17292 " ><fs> add-ro disk.img\n"
17294 " ><fs> list-filesystems\n"
17295 " /dev/sda1: ext4\n"
17296 " /dev/vg_guest/lv_root: ext4\n"
17297 " /dev/vg_guest/lv_swap: swap\n"
17298 " ><fs> mount /dev/vg_guest/lv_root /\n"
17299 " ><fs> cat /etc/fstab\n"
17301 " # Created by anaconda\n"
17308 #: ../fish/guestfish.pod:67
17309 msgid "From shell scripts"
17313 #: ../fish/guestfish.pod:69
17314 msgid "Create a new C</etc/motd> file in a guest or disk image:"
17318 #: ../fish/guestfish.pod:71
17321 " guestfish <<_EOF_\n"
17324 " mount /dev/vg_guest/lv_root /\n"
17325 " write /etc/motd \"Welcome, new users\"\n"
17331 #: ../fish/guestfish.pod:78
17332 msgid "List the LVM logical volumes in a disk image:"
17336 #: ../fish/guestfish.pod:80
17339 " guestfish -a disk.img --ro <<_EOF_\n"
17347 #: ../fish/guestfish.pod:85
17348 msgid "List all the filesystems in a disk image:"
17352 #: ../fish/guestfish.pod:87
17355 " guestfish -a disk.img --ro <<_EOF_\n"
17357 " list-filesystems\n"
17363 #: ../fish/guestfish.pod:92
17364 msgid "On one command line"
17368 #: ../fish/guestfish.pod:94
17369 msgid "Update C</etc/resolv.conf> in a guest:"
17373 #: ../fish/guestfish.pod:96
17377 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
17378 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
17383 #: ../fish/guestfish.pod:100
17384 msgid "Edit C</boot/grub/grub.conf> interactively:"
17388 #: ../fish/guestfish.pod:102
17391 " guestfish --rw --add disk.img \\\n"
17392 " --mount /dev/vg_guest/lv_root \\\n"
17393 " --mount /dev/sda1:/boot \\\n"
17394 " edit /boot/grub/grub.conf\n"
17399 #: ../fish/guestfish.pod:107
17400 msgid "Mount disks automatically"
17404 #: ../fish/guestfish.pod:109
17406 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
17410 #: ../fish/guestfish.pod:112
17413 " guestfish --ro -a disk.img -i cat /etc/group\n"
17418 #: ../fish/guestfish.pod:114
17421 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
17426 #: ../fish/guestfish.pod:116
17427 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
17431 #: ../fish/guestfish.pod:118
17434 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
17439 #: ../fish/guestfish.pod:120
17440 msgid "As a script interpreter"
17444 #: ../fish/guestfish.pod:122
17445 msgid "Create a 100MB disk containing an ext2-formatted partition:"
17449 #: ../fish/guestfish.pod:124
17452 " #!/usr/bin/guestfish -f\n"
17453 " sparse test1.img 100M\n"
17455 " part-disk /dev/sda mbr\n"
17456 " mkfs ext2 /dev/sda1\n"
17461 #: ../fish/guestfish.pod:130
17462 msgid "Start with a prepared disk"
17466 #: ../fish/guestfish.pod:132
17468 "An alternate way to create a 100MB disk called C<test1.img> containing a "
17469 "single ext2-formatted partition:"
17473 #: ../fish/guestfish.pod:135
17476 " guestfish -N fs\n"
17481 #: ../fish/guestfish.pod:137
17482 msgid "To list what is available do:"
17486 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:888
17489 " guestfish -N help | less\n"
17494 #: ../fish/guestfish.pod:141
17495 msgid "Remote control"
17499 #: ../fish/guestfish.pod:143
17502 " eval \"`guestfish --listen`\"\n"
17503 " guestfish --remote add-ro disk.img\n"
17504 " guestfish --remote run\n"
17505 " guestfish --remote lvs\n"
17510 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37
17511 #: ../fuse/guestmount.pod:73
17516 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:131
17521 #: ../fish/guestfish.pod:154
17522 msgid "Displays general help on options."
17526 #: ../fish/guestfish.pod:156
17531 #: ../fish/guestfish.pod:158
17532 msgid "B<--cmd-help>"
17536 #: ../fish/guestfish.pod:160
17537 msgid "Lists all available guestfish commands."
17541 #: ../fish/guestfish.pod:162
17546 #: ../fish/guestfish.pod:164
17547 msgid "B<--cmd-help cmd>"
17551 #: ../fish/guestfish.pod:166
17552 msgid "Displays detailed help on a single command C<cmd>."
17556 #: ../fish/guestfish.pod:168
17557 msgid "B<-a image>"
17561 #: ../fish/guestfish.pod:170
17562 msgid "B<--add image>"
17566 #: ../fish/guestfish.pod:172
17567 msgid "Add a block device or virtual machine image to the shell."
17571 #: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:81
17573 "The format of the disk image is auto-detected. To override this and force a "
17574 "particular format use the I<--format=..> option."
17578 #: ../fish/guestfish.pod:177
17580 "Using this flag is mostly equivalent to using the C<add> command, with "
17581 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
17582 "the I<--format:...> flag was given."
17586 #: ../fish/guestfish.pod:181
17591 #: ../fish/guestfish.pod:183
17592 msgid "B<--connect URI>"
17596 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:86
17598 "When used in conjunction with the I<-d> option, this specifies the libvirt "
17599 "URI to use. The default is to use the default libvirt connection."
17603 #: ../fish/guestfish.pod:189
17608 #: ../fish/guestfish.pod:191
17610 "If using the I<--listen> option and a csh-like shell, use this option. See "
17611 "section L</REMOTE CONTROL AND CSH> below."
17615 #: ../fish/guestfish.pod:194
17616 msgid "B<-d libvirt-domain>"
17620 #: ../fish/guestfish.pod:196
17621 msgid "B<--domain libvirt-domain>"
17625 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:92
17627 "Add disks from the named libvirt domain. If the I<--ro> option is also "
17628 "used, then any libvirt domain can be used. However in write mode, only "
17629 "libvirt domains which are shut down can be named here."
17633 #: ../fish/guestfish.pod:202
17635 "Using this flag is mostly equivalent to using the C<add-domain> command, "
17636 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
17637 "if the I<--format:...> flag was given."
17641 #: ../fish/guestfish.pod:206
17646 #: ../fish/guestfish.pod:208
17647 msgid "B<--no-dest-paths>"
17651 #: ../fish/guestfish.pod:210
17653 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
17654 "to hit the tab key to complete paths on the guest filesystem, but this "
17655 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
17656 "allow this feature to be disabled."
17660 #: ../fish/guestfish.pod:215 ../fuse/guestmount.pod:108
17661 msgid "B<--echo-keys>"
17665 #: ../fish/guestfish.pod:217 ../fuse/guestmount.pod:110
17667 "When prompting for keys and passphrases, guestfish normally turns echoing "
17668 "off so you cannot see what you are typing. If you are not worried about "
17669 "Tempest attacks and there is no one else in the room you can specify this "
17670 "flag to see what you are typing."
17674 #: ../fish/guestfish.pod:222
17679 #: ../fish/guestfish.pod:224
17680 msgid "B<--file file>"
17684 #: ../fish/guestfish.pod:226
17685 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
17689 #: ../fish/guestfish.pod:229
17692 " #!/usr/bin/guestfish -f\n"
17697 #: ../fish/guestfish.pod:231
17698 msgid "B<--format=raw|qcow2|..>"
17702 #: ../fish/guestfish.pod:233
17703 msgid "B<--format>"
17707 #: ../fish/guestfish.pod:235 ../fuse/guestmount.pod:117
17709 "The default for the I<-a> option is to auto-detect the format of the disk "
17710 "image. Using this forces the disk format for I<-a> options which follow on "
17711 "the command line. Using I<--format> with no argument switches back to auto-"
17712 "detection for subsequent I<-a> options."
17716 #: ../fish/guestfish.pod:240 ../fish/guestfish.pod:594
17717 msgid "For example:"
17721 #: ../fish/guestfish.pod:242
17724 " guestfish --format=raw -a disk.img\n"
17729 #: ../fish/guestfish.pod:244
17730 msgid "forces raw format (no auto-detection) for C<disk.img>."
17734 #: ../fish/guestfish.pod:246
17737 " guestfish --format=raw -a disk.img --format -a another.img\n"
17742 #: ../fish/guestfish.pod:248
17744 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
17745 "detection for C<another.img>."
17749 #: ../fish/guestfish.pod:251
17751 "If you have untrusted raw-format guest disk images, you should use this "
17752 "option to specify the disk format. This avoids a possible security problem "
17753 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
17757 #: ../fish/guestfish.pod:256
17762 #: ../fish/guestfish.pod:258
17763 msgid "B<--inspector>"
17767 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:137
17769 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
17770 "system and mount filesystems as they would be mounted on the real virtual "
17775 #: ../fish/guestfish.pod:264
17776 msgid "Typical usage is either:"
17780 #: ../fish/guestfish.pod:266
17783 " guestfish -d myguest -i\n"
17788 #: ../fish/guestfish.pod:268
17789 msgid "(for an inactive libvirt domain called I<myguest>), or:"
17793 #: ../fish/guestfish.pod:270
17796 " guestfish --ro -d myguest -i\n"
17801 #: ../fish/guestfish.pod:272
17802 msgid "(for active domains, readonly), or specify the block device directly:"
17806 #: ../fish/guestfish.pod:274
17809 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
17814 #: ../fish/guestfish.pod:276
17816 "Note that the command line syntax changed slightly over older versions of "
17817 "guestfish. You can still use the old syntax:"
17821 #: ../fish/guestfish.pod:279
17824 " guestfish [--ro] -i disk.img\n"
17829 #: ../fish/guestfish.pod:281
17832 " guestfish [--ro] -i libvirt-domain\n"
17837 #: ../fish/guestfish.pod:283
17839 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
17840 "then using other commands to mount the filesystems that were found."
17844 #: ../fish/guestfish.pod:287 ../fuse/guestmount.pod:141
17845 msgid "B<--keys-from-stdin>"
17849 #: ../fish/guestfish.pod:289 ../fuse/guestmount.pod:143
17851 "Read key or passphrase parameters from stdin. The default is to try to read "
17852 "passphrases from the user by opening C</dev/tty>."
17856 #: ../fish/guestfish.pod:292
17857 msgid "B<--listen>"
17861 #: ../fish/guestfish.pod:294
17863 "Fork into the background and listen for remote commands. See section L</"
17864 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
17868 #: ../fish/guestfish.pod:297
17869 msgid "B<-m dev[:mountpoint]>"
17873 #: ../fish/guestfish.pod:299
17874 msgid "B<--mount dev[:mountpoint]>"
17878 #: ../fish/guestfish.pod:301
17879 msgid "Mount the named partition or logical volume on the given mountpoint."
17883 #: ../fish/guestfish.pod:303
17884 msgid "If the mountpoint is omitted, it defaults to C</>."
17888 #: ../fish/guestfish.pod:305
17889 msgid "You have to mount something on C</> before most commands will work."
17893 #: ../fish/guestfish.pod:307
17895 "If any I<-m> or I<--mount> options are given, the guest is automatically "
17900 #: ../fish/guestfish.pod:310
17902 "If you don't know what filesystems a disk image contains, you can either run "
17903 "guestfish without this option, then list the partitions, filesystems and LVs "
17904 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
17905 "commands), or you can use the L<virt-filesystems(1)> program."
17909 #: ../fish/guestfish.pod:316
17911 "Using this flag is mostly equivalent to using the C<mount-options> command "
17912 "or the C<mount-ro> command if the I<--ro> flag was given."
17916 #: ../fish/guestfish.pod:319
17921 #: ../fish/guestfish.pod:321
17922 msgid "B<--no-sync>"
17926 #: ../fish/guestfish.pod:323
17928 "Disable autosync. This is enabled by default. See the discussion of "
17929 "autosync in the L<guestfs(3)> manpage."
17933 #: ../fish/guestfish.pod:326
17938 #: ../fish/guestfish.pod:328
17939 msgid "B<--new type>"
17943 #: ../fish/guestfish.pod:330
17948 #: ../fish/guestfish.pod:332
17950 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
17951 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
17952 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
17957 #: ../fish/guestfish.pod:337
17958 msgid "B<--progress-bars>"
17962 #: ../fish/guestfish.pod:339
17963 msgid "Enable progress bars, even when guestfish is used non-interactively."
17967 #: ../fish/guestfish.pod:341
17969 "Progress bars are enabled by default when guestfish is used as an "
17970 "interactive shell."
17974 #: ../fish/guestfish.pod:344
17975 msgid "B<--no-progress-bars>"
17979 #: ../fish/guestfish.pod:346
17980 msgid "Disable progress bars."
17984 #: ../fish/guestfish.pod:348
17985 msgid "B<--remote[=pid]>"
17989 #: ../fish/guestfish.pod:350
17991 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
17992 "CONTROL GUESTFISH OVER A SOCKET> below."
17996 #: ../fish/guestfish.pod:353
18001 #: ../fish/guestfish.pod:355
18006 #: ../fish/guestfish.pod:357
18008 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18009 "mounts are done read-only."
18013 #: ../fish/guestfish.pod:360
18015 "The option must always be used if the disk image or virtual machine might be "
18016 "running, and is generally recommended in cases where you don't need write "
18017 "access to the disk."
18021 #: ../fish/guestfish.pod:364
18023 "Note that prepared disk images created with I<-N> are not affected by this "
18024 "option. Also commands like C<add> are not affected - you have to specify "
18025 "the C<readonly:true> option explicitly if you need it."
18029 #: ../fish/guestfish.pod:368
18030 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
18034 #: ../fish/guestfish.pod:370 ../fuse/guestmount.pod:208
18035 msgid "B<--selinux>"
18039 #: ../fish/guestfish.pod:372
18040 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
18044 #: ../fish/guestfish.pod:374
18049 #: ../fish/guestfish.pod:376
18050 msgid "B<--verbose>"
18054 #: ../fish/guestfish.pod:378
18056 "Enable very verbose messages. This is particularly useful if you find a bug."
18060 #: ../fish/guestfish.pod:381
18065 #: ../fish/guestfish.pod:383
18066 msgid "B<--version>"
18070 #: ../fish/guestfish.pod:385
18071 msgid "Display the guestfish / libguestfs version number and exit."
18075 #: ../fish/guestfish.pod:387
18080 #: ../fish/guestfish.pod:389
18085 #: ../fish/guestfish.pod:391
18087 "This option does nothing at the moment. See L</OPENING DISKS FOR READ AND "
18092 #: ../fish/guestfish.pod:394
18097 #: ../fish/guestfish.pod:396
18098 msgid "Echo each command before executing it."
18102 #: ../fish/guestfish.pod:400
18103 msgid "COMMANDS ON COMMAND LINE"
18107 #: ../fish/guestfish.pod:402
18109 "Any additional (non-option) arguments are treated as commands to execute."
18113 #: ../fish/guestfish.pod:405
18115 "Commands to execute should be separated by a colon (C<:>), where the colon "
18116 "is a separate parameter. Thus:"
18120 #: ../fish/guestfish.pod:408
18123 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
18128 #: ../fish/guestfish.pod:410
18130 "If there are no additional arguments, then we enter a shell, either an "
18131 "interactive shell with a prompt (if the input is a terminal) or a non-"
18132 "interactive shell."
18136 #: ../fish/guestfish.pod:414
18138 "In either command line mode or non-interactive shell, the first command that "
18139 "gives an error causes the whole shell to exit. In interactive mode (with a "
18140 "prompt) if a command fails, you can continue to enter commands."
18144 #: ../fish/guestfish.pod:419
18145 msgid "USING launch (OR run)"
18149 #: ../fish/guestfish.pod:421
18151 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
18152 "then launch it, then mount any disks you need, and finally issue actions/"
18153 "commands. So the general order of the day is:"
18157 #: ../fish/guestfish.pod:429
18158 msgid "add or -a/--add"
18162 #: ../fish/guestfish.pod:433
18163 msgid "launch (aka run)"
18167 #: ../fish/guestfish.pod:437
18168 msgid "mount or -m/--mount"
18172 #: ../fish/guestfish.pod:441
18173 msgid "any other commands"
18177 #: ../fish/guestfish.pod:445
18179 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
18180 "guest before mounting or performing any other commands."
18184 #: ../fish/guestfish.pod:448
18186 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
18187 "I<--new> options were given then C<run> is done automatically, simply "
18188 "because guestfish can't perform the action you asked for without doing this."
18192 #: ../fish/guestfish.pod:453
18193 msgid "OPENING DISKS FOR READ AND WRITE"
18197 #: ../fish/guestfish.pod:455
18199 "The guestfish (and L<guestmount(1)>) options I<--ro> and I<--rw> affect "
18200 "whether the other command line options I<-a>, I<-c>, I<-d>, I<-i> and I<-m> "
18201 "open disk images read-only or for writing."
18205 #: ../fish/guestfish.pod:459
18207 "In libguestfs E<lt> 1.6.2, guestfish and guestmount defaulted to opening "
18208 "disk images supplied on the command line for write. To open a disk image "
18209 "read-only you have to do I<-a image --ro>."
18213 #: ../fish/guestfish.pod:463
18215 "This matters: If you accidentally open a live VM disk image writable then "
18216 "you will cause irreversible disk corruption."
18220 #: ../fish/guestfish.pod:466
18222 "By libguestfs 1.8 we intend to change the default the other way. Disk "
18223 "images will be opened read-only. You will have to either specify "
18224 "I<guestfish --rw> or change a configuration file in order to get write "
18225 "access for disk images specified by those other command line options."
18229 #: ../fish/guestfish.pod:471
18231 "This version of guestfish has a I<--rw> option which does nothing (it is "
18232 "already the default). However it is highly recommended that you use this "
18233 "option to indicate that guestfish needs write access, and to prepare your "
18234 "scripts for the day when this option will be required for write access."
18238 #: ../fish/guestfish.pod:477
18240 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
18241 "other libguestfs program apart from guestfish and guestmount."
18245 #: ../fish/guestfish.pod:480
18250 #: ../fish/guestfish.pod:482
18252 "You can quote ordinary parameters using either single or double quotes. For "
18257 #: ../fish/guestfish.pod:485
18260 " add \"file with a space.img\"\n"
18265 #: ../fish/guestfish.pod:487
18268 " rm '/file name'\n"
18273 #: ../fish/guestfish.pod:489
18281 #: ../fish/guestfish.pod:491
18283 "A few commands require a list of strings to be passed. For these, use a "
18284 "whitespace-separated list, enclosed in quotes. Strings containing "
18285 "whitespace to be passed through must be enclosed in single quotes. A "
18286 "literal single quote must be escaped with a backslash."
18290 #: ../fish/guestfish.pod:496
18293 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
18294 " command \"/bin/echo 'foo bar'\"\n"
18295 " command \"/bin/echo \\'foo\\'\"\n"
18300 #: ../fish/guestfish.pod:500
18301 msgid "OPTIONAL ARGUMENTS"
18305 #: ../fish/guestfish.pod:502
18307 "Some commands take optional arguments. These arguments appear in this "
18308 "documentation as C<[argname:..]>. You can use them as in these examples:"
18312 #: ../fish/guestfish.pod:506
18315 " add-drive-opts filename\n"
18320 #: ../fish/guestfish.pod:508
18323 " add-drive-opts filename readonly:true\n"
18328 #: ../fish/guestfish.pod:510
18331 " add-drive-opts filename format:qcow2 readonly:false\n"
18336 #: ../fish/guestfish.pod:512
18338 "Each optional argument can appear at most once. All optional arguments must "
18339 "appear after the required ones."
18343 #: ../fish/guestfish.pod:515
18348 #: ../fish/guestfish.pod:517
18350 "This section applies to all commands which can take integers as parameters."
18354 #: ../fish/guestfish.pod:520
18355 msgid "SIZE SUFFIX"
18359 #: ../fish/guestfish.pod:522
18361 "When the command takes a parameter measured in bytes, you can use one of the "
18362 "following suffixes to specify kilobytes, megabytes and larger sizes:"
18366 #: ../fish/guestfish.pod:528
18367 msgid "B<k> or B<K> or B<KiB>"
18371 #: ../fish/guestfish.pod:530
18372 msgid "The size in kilobytes (multiplied by 1024)."
18376 #: ../fish/guestfish.pod:532
18381 #: ../fish/guestfish.pod:534
18382 msgid "The size in SI 1000 byte units."
18386 #: ../fish/guestfish.pod:536
18387 msgid "B<M> or B<MiB>"
18391 #: ../fish/guestfish.pod:538
18392 msgid "The size in megabytes (multiplied by 1048576)."
18396 #: ../fish/guestfish.pod:540
18401 #: ../fish/guestfish.pod:542
18402 msgid "The size in SI 1000000 byte units."
18406 #: ../fish/guestfish.pod:544
18407 msgid "B<G> or B<GiB>"
18411 #: ../fish/guestfish.pod:546
18412 msgid "The size in gigabytes (multiplied by 2**30)."
18416 #: ../fish/guestfish.pod:548
18421 #: ../fish/guestfish.pod:550
18422 msgid "The size in SI 10**9 byte units."
18426 #: ../fish/guestfish.pod:552
18427 msgid "B<T> or B<TiB>"
18431 #: ../fish/guestfish.pod:554
18432 msgid "The size in terabytes (multiplied by 2**40)."
18436 #: ../fish/guestfish.pod:556
18441 #: ../fish/guestfish.pod:558
18442 msgid "The size in SI 10**12 byte units."
18446 #: ../fish/guestfish.pod:560
18447 msgid "B<P> or B<PiB>"
18451 #: ../fish/guestfish.pod:562
18452 msgid "The size in petabytes (multiplied by 2**50)."
18456 #: ../fish/guestfish.pod:564
18461 #: ../fish/guestfish.pod:566
18462 msgid "The size in SI 10**15 byte units."
18466 #: ../fish/guestfish.pod:568
18467 msgid "B<E> or B<EiB>"
18471 #: ../fish/guestfish.pod:570
18472 msgid "The size in exabytes (multiplied by 2**60)."
18476 #: ../fish/guestfish.pod:572
18481 #: ../fish/guestfish.pod:574
18482 msgid "The size in SI 10**18 byte units."
18486 #: ../fish/guestfish.pod:576
18487 msgid "B<Z> or B<ZiB>"
18491 #: ../fish/guestfish.pod:578
18492 msgid "The size in zettabytes (multiplied by 2**70)."
18496 #: ../fish/guestfish.pod:580
18501 #: ../fish/guestfish.pod:582
18502 msgid "The size in SI 10**21 byte units."
18506 #: ../fish/guestfish.pod:584
18507 msgid "B<Y> or B<YiB>"
18511 #: ../fish/guestfish.pod:586
18512 msgid "The size in yottabytes (multiplied by 2**80)."
18516 #: ../fish/guestfish.pod:588
18521 #: ../fish/guestfish.pod:590
18522 msgid "The size in SI 10**24 byte units."
18526 #: ../fish/guestfish.pod:596
18529 " truncate-size /file 1G\n"
18534 #: ../fish/guestfish.pod:598
18535 msgid "would truncate the file to 1 gigabyte."
18539 #: ../fish/guestfish.pod:600
18541 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
18542 "the parameter to L</memsize> is specified in megabytes already). Adding a "
18543 "suffix will probably not do what you expect."
18547 #: ../fish/guestfish.pod:604
18548 msgid "OCTAL AND HEXADECIMAL NUMBERS"
18552 #: ../fish/guestfish.pod:606
18554 "For specifying the radix (base) use the C convention: C<0> to prefix an "
18555 "octal number or C<0x> to prefix a hexadecimal number. For example:"
18559 #: ../fish/guestfish.pod:609
18562 " 1234 decimal number 1234\n"
18563 " 02322 octal number, equivalent to decimal 1234\n"
18564 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
18569 #: ../fish/guestfish.pod:613
18571 "When using the C<chmod> command, you almost always want to specify an octal "
18572 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
18573 "L<chmod(1)> program):"
18577 #: ../fish/guestfish.pod:617
18580 " chmod 0777 /public # OK\n"
18581 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
18586 #: ../fish/guestfish.pod:620
18588 "Commands that return numbers usually print them in decimal, but some "
18589 "commands print numbers in other radices (eg. C<umask> prints the mode in "
18590 "octal, preceeded by C<0>)."
18594 #: ../fish/guestfish.pod:624
18595 msgid "WILDCARDS AND GLOBBING"
18599 #: ../fish/guestfish.pod:626
18601 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
18602 "(globbing) by default. So for example the following will not do what you "
18607 #: ../fish/guestfish.pod:630
18615 #: ../fish/guestfish.pod:632
18617 "Assuming you don't have a directory called literally C</home/*> then the "
18618 "above command will return an error."
18622 #: ../fish/guestfish.pod:635
18623 msgid "To perform wildcard expansion, use the C<glob> command."
18627 #: ../fish/guestfish.pod:637
18630 " glob rm-rf /home/*\n"
18635 #: ../fish/guestfish.pod:639
18637 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
18638 "many times), equivalent to:"
18642 #: ../fish/guestfish.pod:642
18645 " rm-rf /home/jim\n"
18646 " rm-rf /home/joe\n"
18647 " rm-rf /home/mary\n"
18652 #: ../fish/guestfish.pod:646
18653 msgid "C<glob> only works on simple guest paths and not on device names."
18657 #: ../fish/guestfish.pod:648
18659 "If you have several parameters, each containing a wildcard, then glob will "
18660 "perform a Cartesian product."
18664 #: ../fish/guestfish.pod:651
18669 #: ../fish/guestfish.pod:653
18671 "Any line which starts with a I<#> character is treated as a comment and "
18672 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
18673 "a command. For example:"
18677 #: ../fish/guestfish.pod:657
18680 " # this is a comment\n"
18681 " # this is a comment\n"
18682 " foo # NOT a comment\n"
18687 #: ../fish/guestfish.pod:661
18688 msgid "Blank lines are also ignored."
18692 #: ../fish/guestfish.pod:663
18693 msgid "RUNNING COMMANDS LOCALLY"
18697 #: ../fish/guestfish.pod:665
18699 "Any line which starts with a I<!> character is treated as a command sent to "
18700 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
18704 #: ../fish/guestfish.pod:669
18708 " tgz-out /remote local/remote-data.tar.gz\n"
18713 #: ../fish/guestfish.pod:672
18715 "will create a directory C<local> on the host, and then export the contents "
18716 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
18717 "(See C<tgz-out>)."
18721 #: ../fish/guestfish.pod:676
18723 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
18724 "effect, due to the way that subprocesses work in Unix."
18728 #: ../fish/guestfish.pod:679
18733 #: ../fish/guestfish.pod:681
18735 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
18736 "command (a guestfish command) to the second command (any host command). For "
18741 #: ../fish/guestfish.pod:685
18744 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
18749 #: ../fish/guestfish.pod:687
18751 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
18752 "program). The above command would list all accounts in the guest filesystem "
18753 "which have UID 0, ie. root accounts including backdoors. Other examples:"
18757 #: ../fish/guestfish.pod:692
18760 " hexdump /bin/ls | head\n"
18761 " list-devices | tail -1\n"
18762 " tgz-out / - | tar ztf -\n"
18767 #: ../fish/guestfish.pod:696
18769 "The space before the pipe symbol is required, any space after the pipe "
18770 "symbol is optional. Everything after the pipe symbol is just passed "
18771 "straight to the host shell, so it can contain redirections, globs and "
18772 "anything else that makes sense on the host side."
18776 #: ../fish/guestfish.pod:701
18778 "To use a literal argument which begins with a pipe symbol, you have to quote "
18783 #: ../fish/guestfish.pod:704
18791 #: ../fish/guestfish.pod:706
18792 msgid "HOME DIRECTORIES"
18796 #: ../fish/guestfish.pod:708
18798 "If a parameter starts with the character C<~> then the tilde may be expanded "
18799 "as a home directory path (either C<~> for the current user's home directory, "
18800 "or C<~user> for another user)."
18804 #: ../fish/guestfish.pod:712
18806 "Note that home directory expansion happens for users known I<on the host>, "
18807 "not in the guest filesystem."
18811 #: ../fish/guestfish.pod:715
18813 "To use a literal argument which begins with a tilde, you have to quote it, "
18818 #: ../fish/guestfish.pod:718
18826 #: ../fish/guestfish.pod:722
18828 "Libguestfs has some support for Linux guests encrypted according to the "
18829 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
18830 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
18831 "LUKS is supported."
18835 #: ../fish/guestfish.pod:727
18836 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
18840 #: ../fish/guestfish.pod:729
18843 " ><fs> vfs-type /dev/sda2\n"
18849 #: ../fish/guestfish.pod:732
18851 "Then open those devices using L</luks-open>. This creates a device-mapper "
18852 "device called C</dev/mapper/luksdev>."
18856 #: ../fish/guestfish.pod:735
18859 " ><fs> luks-open /dev/sda2 luksdev\n"
18860 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
18865 #: ../fish/guestfish.pod:738
18867 "Finally you have to tell LVM to scan for volume groups on the newly created "
18872 #: ../fish/guestfish.pod:741
18876 " vg-activate-all true\n"
18881 #: ../fish/guestfish.pod:744
18882 msgid "The logical volume(s) can now be mounted in the usual way."
18886 #: ../fish/guestfish.pod:746
18888 "Before closing a LUKS device you must unmount any logical volumes on it and "
18889 "deactivate the volume groups by calling C<vg-activate false VG> on each "
18890 "one. Then you can close the mapper device:"
18894 #: ../fish/guestfish.pod:750
18897 " vg-activate false /dev/VG\n"
18898 " luks-close /dev/mapper/luksdev\n"
18903 #: ../fish/guestfish.pod:753
18904 msgid "WINDOWS PATHS"
18908 #: ../fish/guestfish.pod:755
18910 "If a path is prefixed with C<win:> then you can use Windows-style paths "
18911 "(with some limitations). The following commands are equivalent:"
18915 #: ../fish/guestfish.pod:758
18918 " file /WINDOWS/system32/config/system.LOG\n"
18923 #: ../fish/guestfish.pod:760
18926 " file win:/windows/system32/config/system.log\n"
18931 #: ../fish/guestfish.pod:762
18934 " file win:\\windows\\system32\\config\\system.log\n"
18939 #: ../fish/guestfish.pod:764
18942 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
18947 #: ../fish/guestfish.pod:766
18949 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
18950 "handles case insensitivity like Windows would. This only works in argument "
18951 "positions that expect a path."
18955 #: ../fish/guestfish.pod:770
18956 msgid "UPLOADING AND DOWNLOADING FILES"
18960 #: ../fish/guestfish.pod:772
18962 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
18963 "others which upload from or download to a local file, you can use the "
18964 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
18968 #: ../fish/guestfish.pod:776
18976 #: ../fish/guestfish.pod:778
18978 "reads stdin and creates from that a file C</foo> in the disk image, and:"
18982 #: ../fish/guestfish.pod:781
18985 " tar-out /etc - | tar tf -\n"
18990 #: ../fish/guestfish.pod:783
18992 "writes the tarball to stdout and then pipes that into the external \"tar\" "
18993 "command (see L</PIPES>)."
18997 #: ../fish/guestfish.pod:786
18999 "When using C<-> to read from stdin, the input is read up to the end of "
19000 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
19001 "some arbitrary end marker:"
19005 #: ../fish/guestfish.pod:790
19008 " upload -<<END /foo\n"
19017 #: ../fish/guestfish.pod:796
19019 "Any string of characters can be used instead of C<END>. The end marker must "
19020 "appear on a line of its own, without any preceeding or following characters "
19021 "(not even spaces)."
19025 #: ../fish/guestfish.pod:800
19027 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
19028 "upload local files (so-called \"FileIn\" parameters in the generator)."
19032 #: ../fish/guestfish.pod:803
19033 msgid "EXIT ON ERROR BEHAVIOUR"
19037 #: ../fish/guestfish.pod:805
19039 "By default, guestfish will ignore any errors when in interactive mode (ie. "
19040 "taking commands from a human over a tty), and will exit on the first error "
19041 "in non-interactive mode (scripts, commands given on the command line)."
19045 #: ../fish/guestfish.pod:810
19047 "If you prefix a command with a I<-> character, then that command will not "
19048 "cause guestfish to exit, even if that (one) command returns an error."
19052 #: ../fish/guestfish.pod:814
19053 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
19057 #: ../fish/guestfish.pod:816
19059 "Guestfish can be remote-controlled over a socket. This is useful "
19060 "particularly in shell scripts where you want to make several different "
19061 "changes to a filesystem, but you don't want the overhead of starting up a "
19062 "guestfish process each time."
19066 #: ../fish/guestfish.pod:821
19067 msgid "Start a guestfish server process using:"
19071 #: ../fish/guestfish.pod:823
19074 " eval \"`guestfish --listen`\"\n"
19079 #: ../fish/guestfish.pod:825
19080 msgid "and then send it commands by doing:"
19084 #: ../fish/guestfish.pod:827
19087 " guestfish --remote cmd [...]\n"
19092 #: ../fish/guestfish.pod:829
19093 msgid "To cause the server to exit, send it the exit command:"
19097 #: ../fish/guestfish.pod:831
19100 " guestfish --remote exit\n"
19105 #: ../fish/guestfish.pod:833
19107 "Note that the server will normally exit if there is an error in a command. "
19108 "You can change this in the usual way. See section L</EXIT ON ERROR "
19113 #: ../fish/guestfish.pod:837
19114 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
19118 #: ../fish/guestfish.pod:839
19120 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
19121 "is how the I<--remote> option knows where to send the commands. You can "
19122 "have several guestfish listener processes running using:"
19126 #: ../fish/guestfish.pod:843
19129 " eval \"`guestfish --listen`\"\n"
19130 " pid1=$GUESTFISH_PID\n"
19131 " eval \"`guestfish --listen`\"\n"
19132 " pid2=$GUESTFISH_PID\n"
19134 " guestfish --remote=$pid1 cmd\n"
19135 " guestfish --remote=$pid2 cmd\n"
19140 #: ../fish/guestfish.pod:851
19141 msgid "REMOTE CONTROL AND CSH"
19145 #: ../fish/guestfish.pod:853
19147 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
19152 #: ../fish/guestfish.pod:856
19155 " eval \"`guestfish --listen --csh`\"\n"
19160 #: ../fish/guestfish.pod:858
19161 msgid "REMOTE CONTROL DETAILS"
19165 #: ../fish/guestfish.pod:860
19167 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
19168 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
19169 "and C<$PID> is the process ID of the server."
19173 #: ../fish/guestfish.pod:864
19174 msgid "Guestfish client and server versions must match exactly."
19178 #: ../fish/guestfish.pod:866
19179 msgid "PREPARED DISK IMAGES"
19183 #: ../fish/guestfish.pod:868
19185 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
19186 "preformatted disk images that guestfish can make for you to save typing. "
19187 "This is particularly useful for testing purposes. This option is used "
19188 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
19189 "can be mixed with I<-a>)."
19193 #: ../fish/guestfish.pod:874
19195 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
19196 "the second and so on. Existing files in the current directory are "
19201 #: ../fish/guestfish.pod:878
19203 "The type briefly describes how the disk should be sized, partitioned, how "
19204 "filesystem(s) should be created, and how content should be added. "
19205 "Optionally the type can be followed by extra parameters, separated by C<:> "
19206 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
19207 "allocated disk, containing a single partition, with the partition formatted "
19208 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
19213 #: ../fish/guestfish.pod:886
19214 msgid "To list the available types and any extra parameters they take, run:"
19218 #: ../fish/guestfish.pod:890
19220 "Note that the prepared filesystem is not mounted. You would usually have to "
19221 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
19225 #: ../fish/guestfish.pod:894
19227 "If any I<-N> or I<--new> options are given, the guest is automatically "
19232 #: ../fish/guestfish.pod:899
19233 msgid "Create a 100MB disk with an ext4-formatted partition:"
19237 #: ../fish/guestfish.pod:901
19240 " guestfish -N fs:ext4\n"
19245 #: ../fish/guestfish.pod:903
19246 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
19250 #: ../fish/guestfish.pod:905
19253 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
19258 #: ../fish/guestfish.pod:907
19259 msgid "Create a blank 200MB disk:"
19263 #: ../fish/guestfish.pod:909
19266 " guestfish -N disk:200M\n"
19271 #: ../fish/guestfish.pod:911
19272 msgid "PROGRESS BARS"
19276 #: ../fish/guestfish.pod:913
19278 "Some (not all) long-running commands send progress notification messages as "
19279 "they are running. Guestfish turns these messages into progress bars."
19283 #: ../fish/guestfish.pod:917
19285 "When a command that supports progress bars takes longer than two seconds to "
19286 "run, and if progress bars are enabled, then you will see one appearing below "
19291 #: ../fish/guestfish.pod:921
19294 " ><fs> copy-size /large-file /another-file 2048M\n"
19295 " / 10% [#####-----------------------------------------] 00:30\n"
19300 #: ../fish/guestfish.pod:924
19302 "The spinner on the left hand side moves round once for every progress "
19303 "notification received from the backend. This is a (reasonably) golden "
19304 "assurance that the command is \"doing something\" even if the progress bar "
19305 "is not moving, because the command is able to send the progress "
19306 "notifications. When the bar reaches 100% and the command finishes, the "
19307 "spinner disappears."
19311 #: ../fish/guestfish.pod:931
19313 "Progress bars are enabled by default when guestfish is used interactively. "
19314 "You can enable them even for non-interactive modes using I<--progress-bars>, "
19315 "and you can disable them completely using I<--no-progress-bars>."
19319 #: ../fish/guestfish.pod:936
19320 msgid "GUESTFISH COMMANDS"
19324 #: ../fish/guestfish.pod:938
19326 "The commands in this section are guestfish convenience commands, in other "
19327 "words, they are not part of the L<guestfs(3)> API."
19331 #: ../fish/guestfish.pod:941
19336 #: ../fish/guestfish.pod:943
19345 #: ../fish/guestfish.pod:946
19346 msgid "Without any parameter, this provides general help."
19350 #: ../fish/guestfish.pod:948
19351 msgid "With a C<cmd> parameter, this displays detailed help for that command."
19355 #: ../fish/guestfish.pod:950
19356 msgid "quit | exit"
19360 #: ../fish/guestfish.pod:952
19361 msgid "This exits guestfish. You can also use C<^D> key."
19365 #: ../fish/guestfish.pod:954
19366 msgid "@FISH_COMMANDS@"
19370 #: ../fish/guestfish.pod:956
19375 #: ../fish/guestfish.pod:960 ../test-tool/libguestfs-test-tool.pod:83
19380 #: ../fish/guestfish.pod:962
19382 "guestfish returns 0 if the commands completed without error, or 1 if there "
19387 #: ../fish/guestfish.pod:969
19392 #: ../fish/guestfish.pod:971
19394 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
19399 #: ../fish/guestfish.pod:974
19400 msgid "GUESTFISH_PID"
19404 #: ../fish/guestfish.pod:976
19406 "Used with the I<--remote> option to specify the remote guestfish process to "
19407 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
19411 #: ../fish/guestfish.pod:980
19416 #: ../fish/guestfish.pod:982
19418 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
19419 "not specified, the external L<hexedit(1)> program is used."
19423 #: ../fish/guestfish.pod:986
19428 #: ../fish/guestfish.pod:988
19430 "If compiled with GNU readline support, various files in the home directory "
19431 "can be used. See L</FILES>."
19435 #: ../fish/guestfish.pod:997
19437 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
19438 "effect as using the B<-v> option."
19442 #: ../fish/guestfish.pod:1009
19444 "Set the path that guestfish uses to search for kernel and initrd.img. See "
19445 "the discussion of paths in L<guestfs(3)>."
19449 #: ../fish/guestfish.pod:1020
19450 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
19454 #: ../fish/guestfish.pod:1022
19459 #: ../fish/guestfish.pod:1024
19461 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
19466 #: ../fish/guestfish.pod:1039 ../test-tool/libguestfs-test-tool.pod:88
19471 #: ../fish/guestfish.pod:1043
19472 msgid "$HOME/.guestfish"
19476 #: ../fish/guestfish.pod:1045
19478 "If compiled with GNU readline support, then the command history is saved in "
19483 #: ../fish/guestfish.pod:1048
19484 msgid "$HOME/.inputrc"
19488 #: ../fish/guestfish.pod:1050
19489 msgid "/etc/inputrc"
19493 #: ../fish/guestfish.pod:1052
19495 "If compiled with GNU readline support, then these files can be used to "
19496 "configure readline. For further information, please see L<readline(3)/"
19497 "INITIALIZATION FILE>."
19501 #: ../fish/guestfish.pod:1056
19502 msgid "To write rules which only apply to guestfish, use:"
19506 #: ../fish/guestfish.pod:1058
19516 #: ../fish/guestfish.pod:1062
19518 "Variables that you can set in inputrc that change the behaviour of guestfish "
19519 "in useful ways include:"
19523 #: ../fish/guestfish.pod:1067
19524 msgid "completion-ignore-case (default: on)"
19528 #: ../fish/guestfish.pod:1069
19530 "By default, guestfish will ignore case when tab-completing paths on the "
19535 #: ../fish/guestfish.pod:1072
19538 " set completion-ignore-case off\n"
19543 #: ../fish/guestfish.pod:1074
19544 msgid "to make guestfish case sensitive."
19548 #: ../fish/guestfish.pod:1078
19553 #: ../fish/guestfish.pod:1080
19554 msgid "test2.img (etc)"
19558 #: ../fish/guestfish.pod:1082
19560 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
19561 "will be created in the file C<test1.img> in the current directory. The "
19562 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
19563 "the same name will be overwritten."
19567 #: ../fish/guestfish.pod:1091
19569 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-df(1)>, "
19570 "L<virt-edit(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-"
19571 "filesystems(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)"
19572 ">, L<virt-rescue(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<virt-win-reg(1)>, "
19577 #: ../fish/guestfish.pod:1117 ../test-tool/libguestfs-test-tool.pod:124
19578 #: ../fuse/guestmount.pod:253
19580 "This program is free software; you can redistribute it and/or modify it "
19581 "under the terms of the GNU General Public License as published by the Free "
19582 "Software Foundation; either version 2 of the License, or (at your option) "
19583 "any later version."
19587 #: ../fish/guestfish.pod:1122 ../test-tool/libguestfs-test-tool.pod:129
19588 #: ../fuse/guestmount.pod:258
19590 "This program is distributed in the hope that it will be useful, but WITHOUT "
19591 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
19592 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
19597 #: ../fish/guestfish.pod:1127 ../test-tool/libguestfs-test-tool.pod:134
19598 #: ../fuse/guestmount.pod:263
19600 "You should have received a copy of the GNU General Public License along with "
19601 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
19602 "Ave, Cambridge, MA 02139, USA."
19606 #: ../fish/guestfish-actions.pod:1
19611 #: ../fish/guestfish-actions.pod:3
19614 " add-cdrom filename\n"
19619 #: ../fish/guestfish-actions.pod:15
19621 "This call checks for the existence of C<filename>. This stops you from "
19622 "specifying other types of drive which are supported by qemu such as C<nbd:> "
19623 "and C<http:> URLs. To specify those, use the general L</config> call "
19628 #: ../fish/guestfish-actions.pod:22
19630 "If you just want to add an ISO file (often you use this as an efficient way "
19631 "to transfer large files into the guest), then you should probably use L</add-"
19632 "drive-ro> instead."
19636 #: ../fish/guestfish-actions.pod:35
19641 #: ../fish/guestfish-actions.pod:37
19646 #: ../fish/guestfish-actions.pod:39
19649 " add-domain dom [libvirturi:..] [readonly:..] [iface:..]\n"
19654 #: ../fish/guestfish-actions.pod:41
19656 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
19657 "It works by connecting to libvirt, requesting the domain and domain XML from "
19658 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
19662 #: ../fish/guestfish-actions.pod:58
19664 "The optional C<libvirturi> parameter sets the libvirt URI (see L<http://"
19665 "libvirt.org/uri.html>). If this is not set then we connect to the default "
19666 "libvirt URI (or one set through an environment variable, see the libvirt "
19667 "documentation for full details). If you are using the C API directly then "
19668 "it is more flexible to create the libvirt connection object yourself, get "
19669 "the domain object, and call L</add-libvirt-dom>."
19673 #: ../fish/guestfish-actions.pod:66
19675 "The other optional parameters are passed directly through to L</add-drive-"
19680 #: ../fish/guestfish-actions.pod:69 ../fish/guestfish-actions.pod:133
19681 #: ../fish/guestfish-actions.pod:2844
19683 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
19687 #: ../fish/guestfish-actions.pod:71
19692 #: ../fish/guestfish-actions.pod:73
19695 " add-drive filename\n"
19700 #: ../fish/guestfish-actions.pod:75
19702 "This function is the equivalent of calling L</add-drive-opts> with no "
19703 "optional parameters, so the disk is added writable, with the format being "
19704 "detected automatically."
19708 #: ../fish/guestfish-actions.pod:79
19710 "Automatic detection of the format opens you up to a potential security hole "
19711 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
19712 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
19713 "you should think about replacing calls to this function with calls to L</add-"
19714 "drive-opts>, and specifying the format."
19718 #: ../fish/guestfish-actions.pod:86
19719 msgid "add-drive-opts"
19723 #: ../fish/guestfish-actions.pod:88
19728 #: ../fish/guestfish-actions.pod:90
19731 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
19736 #: ../fish/guestfish-actions.pod:117
19738 "This forces the image format. If you omit this (or use L</add-drive> or L</"
19739 "add-drive-ro>) then the format is automatically detected. Possible formats "
19740 "include C<raw> and C<qcow2>."
19744 #: ../fish/guestfish-actions.pod:128
19746 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
19747 "add-drive-with-if> call (q.v.)"
19751 #: ../fish/guestfish-actions.pod:135
19752 msgid "add-drive-ro"
19756 #: ../fish/guestfish-actions.pod:137
19761 #: ../fish/guestfish-actions.pod:139
19764 " add-drive-ro filename\n"
19769 #: ../fish/guestfish-actions.pod:141
19771 "This function is the equivalent of calling L</add-drive-opts> with the "
19772 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
19773 "is added read-only, with the format being detected automatically."
19777 #: ../fish/guestfish-actions.pod:146
19778 msgid "add-drive-ro-with-if"
19782 #: ../fish/guestfish-actions.pod:148
19785 " add-drive-ro-with-if filename iface\n"
19790 #: ../fish/guestfish-actions.pod:150
19792 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
19793 "interface emulation to use at run time."
19797 #: ../fish/guestfish-actions.pod:160
19798 msgid "add-drive-with-if"
19802 #: ../fish/guestfish-actions.pod:162
19805 " add-drive-with-if filename iface\n"
19810 #: ../fish/guestfish-actions.pod:164
19812 "This is the same as L</add-drive> but it allows you to specify the QEMU "
19813 "interface emulation to use at run time."
19817 #: ../fish/guestfish-actions.pod:174
19822 #: ../fish/guestfish-actions.pod:176
19825 " aug-clear augpath\n"
19830 #: ../fish/guestfish-actions.pod:181
19835 #: ../fish/guestfish-actions.pod:183
19843 #: ../fish/guestfish-actions.pod:185
19845 "Close the current Augeas handle and free up any resources used by it. After "
19846 "calling this, you have to call L</aug-init> again before you can use any "
19847 "other Augeas functions."
19851 #: ../fish/guestfish-actions.pod:190
19852 msgid "aug-defnode"
19856 #: ../fish/guestfish-actions.pod:192
19859 " aug-defnode name expr val\n"
19864 #: ../fish/guestfish-actions.pod:197
19866 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
19867 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
19868 "containing that single node."
19872 #: ../fish/guestfish-actions.pod:205
19877 #: ../fish/guestfish-actions.pod:207
19880 " aug-defvar name expr\n"
19885 #: ../fish/guestfish-actions.pod:216
19890 #: ../fish/guestfish-actions.pod:218
19893 " aug-get augpath\n"
19898 #: ../fish/guestfish-actions.pod:223
19903 #: ../fish/guestfish-actions.pod:225
19906 " aug-init root flags\n"
19911 #: ../fish/guestfish-actions.pod:231
19912 msgid "You must call this before using any other L</aug-*> commands."
19916 #: ../fish/guestfish-actions.pod:266
19917 msgid "Do not load the tree in L</aug-init>."
19921 #: ../fish/guestfish-actions.pod:270
19922 msgid "To close the handle, you can call L</aug-close>."
19926 #: ../fish/guestfish-actions.pod:274
19931 #: ../fish/guestfish-actions.pod:276
19934 " aug-insert augpath label true|false\n"
19939 #: ../fish/guestfish-actions.pod:286
19944 #: ../fish/guestfish-actions.pod:288
19952 #: ../fish/guestfish-actions.pod:295
19957 #: ../fish/guestfish-actions.pod:297
19960 " aug-ls augpath\n"
19965 #: ../fish/guestfish-actions.pod:299
19967 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
19968 "resulting nodes into alphabetical order."
19972 #: ../fish/guestfish-actions.pod:302
19977 #: ../fish/guestfish-actions.pod:304
19980 " aug-match augpath\n"
19985 #: ../fish/guestfish-actions.pod:310
19990 #: ../fish/guestfish-actions.pod:312
19993 " aug-mv src dest\n"
19998 #: ../fish/guestfish-actions.pod:317
20003 #: ../fish/guestfish-actions.pod:319
20006 " aug-rm augpath\n"
20011 #: ../fish/guestfish-actions.pod:325
20016 #: ../fish/guestfish-actions.pod:327
20024 #: ../fish/guestfish-actions.pod:331
20026 "The flags which were passed to L</aug-init> affect exactly how files are "
20031 #: ../fish/guestfish-actions.pod:334
20036 #: ../fish/guestfish-actions.pod:336
20039 " aug-set augpath val\n"
20044 #: ../fish/guestfish-actions.pod:340
20046 "In the Augeas API, it is possible to clear a node by setting the value to "
20047 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
20048 "this call. Instead you must use the L</aug-clear> call."
20052 #: ../fish/guestfish-actions.pod:345
20057 #: ../fish/guestfish-actions.pod:347
20060 " available 'groups ...'\n"
20065 #: ../fish/guestfish-actions.pod:353
20067 "The libguestfs groups, and the functions that those groups correspond to, "
20068 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
20069 "runtime by calling L</available-all-groups>."
20073 #: ../fish/guestfish-actions.pod:377
20074 msgid "You must call L</launch> before calling this function."
20078 #: ../fish/guestfish-actions.pod:399
20080 "This call was added in version C<1.0.80>. In previous versions of "
20081 "libguestfs all you could do would be to speculatively execute a command to "
20082 "find out if the daemon implemented it. See also L</version>."
20086 #: ../fish/guestfish-actions.pod:406
20087 msgid "available-all-groups"
20091 #: ../fish/guestfish-actions.pod:408
20094 " available-all-groups\n"
20099 #: ../fish/guestfish-actions.pod:410
20101 "This command returns a list of all optional groups that this daemon knows "
20102 "about. Note this returns both supported and unsupported groups. To find "
20103 "out which ones the daemon can actually support you have to call L</"
20104 "available> on each member of the returned list."
20108 #: ../fish/guestfish-actions.pod:416
20109 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
20113 #: ../fish/guestfish-actions.pod:418
20118 #: ../fish/guestfish-actions.pod:420
20121 " base64-in (base64file|-) filename\n"
20126 #: ../fish/guestfish-actions.pod:425 ../fish/guestfish-actions.pod:434
20127 #: ../fish/guestfish-actions.pod:658 ../fish/guestfish-actions.pod:827
20128 #: ../fish/guestfish-actions.pod:846 ../fish/guestfish-actions.pod:1223
20129 #: ../fish/guestfish-actions.pod:4199 ../fish/guestfish-actions.pod:4211
20130 #: ../fish/guestfish-actions.pod:4222 ../fish/guestfish-actions.pod:4233
20131 #: ../fish/guestfish-actions.pod:4285 ../fish/guestfish-actions.pod:4294
20132 #: ../fish/guestfish-actions.pod:4348 ../fish/guestfish-actions.pod:4371
20133 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
20137 #: ../fish/guestfish-actions.pod:427
20142 #: ../fish/guestfish-actions.pod:429
20145 " base64-out filename (base64file|-)\n"
20150 #: ../fish/guestfish-actions.pod:436
20151 msgid "blockdev-flushbufs"
20155 #: ../fish/guestfish-actions.pod:438
20158 " blockdev-flushbufs device\n"
20163 #: ../fish/guestfish-actions.pod:445
20164 msgid "blockdev-getbsz"
20168 #: ../fish/guestfish-actions.pod:447
20171 " blockdev-getbsz device\n"
20176 #: ../fish/guestfish-actions.pod:456
20177 msgid "blockdev-getro"
20181 #: ../fish/guestfish-actions.pod:458
20184 " blockdev-getro device\n"
20189 #: ../fish/guestfish-actions.pod:465
20190 msgid "blockdev-getsize64"
20194 #: ../fish/guestfish-actions.pod:467
20197 " blockdev-getsize64 device\n"
20202 #: ../fish/guestfish-actions.pod:471
20203 msgid "See also L</blockdev-getsz>."
20207 #: ../fish/guestfish-actions.pod:475
20208 msgid "blockdev-getss"
20212 #: ../fish/guestfish-actions.pod:477
20215 " blockdev-getss device\n"
20220 #: ../fish/guestfish-actions.pod:482
20222 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
20226 #: ../fish/guestfish-actions.pod:487
20227 msgid "blockdev-getsz"
20231 #: ../fish/guestfish-actions.pod:489
20234 " blockdev-getsz device\n"
20239 #: ../fish/guestfish-actions.pod:494
20241 "See also L</blockdev-getss> for the real sector size of the device, and L</"
20242 "blockdev-getsize64> for the more useful I<size in bytes>."
20246 #: ../fish/guestfish-actions.pod:500
20247 msgid "blockdev-rereadpt"
20251 #: ../fish/guestfish-actions.pod:502
20254 " blockdev-rereadpt device\n"
20259 #: ../fish/guestfish-actions.pod:508
20260 msgid "blockdev-setbsz"
20264 #: ../fish/guestfish-actions.pod:510
20267 " blockdev-setbsz device blocksize\n"
20272 #: ../fish/guestfish-actions.pod:519
20273 msgid "blockdev-setro"
20277 #: ../fish/guestfish-actions.pod:521
20280 " blockdev-setro device\n"
20285 #: ../fish/guestfish-actions.pod:527
20286 msgid "blockdev-setrw"
20290 #: ../fish/guestfish-actions.pod:529
20293 " blockdev-setrw device\n"
20298 #: ../fish/guestfish-actions.pod:535
20299 msgid "case-sensitive-path"
20303 #: ../fish/guestfish-actions.pod:537
20306 " case-sensitive-path path\n"
20311 #: ../fish/guestfish-actions.pod:561
20313 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
20314 "WINDOWS/system32\"> (the exact return value would depend on details of how "
20315 "the directories were originally created under Windows)."
20319 #: ../fish/guestfish-actions.pod:569
20320 msgid "See also L</realpath>."
20324 #: ../fish/guestfish-actions.pod:571
20329 #: ../fish/guestfish-actions.pod:573
20337 #: ../fish/guestfish-actions.pod:577
20339 "Note that this function cannot correctly handle binary files (specifically, "
20340 "files containing C<\\0> character which is treated as end of string). For "
20341 "those you need to use the L</read-file> or L</download> functions which have "
20342 "a more complex interface."
20346 #: ../fish/guestfish-actions.pod:585
20351 #: ../fish/guestfish-actions.pod:587
20354 " checksum csumtype path\n"
20359 #: ../fish/guestfish-actions.pod:630
20360 msgid "To get the checksum for a device, use L</checksum-device>."
20364 #: ../fish/guestfish-actions.pod:632
20365 msgid "To get the checksums for many files, use L</checksums-out>."
20369 #: ../fish/guestfish-actions.pod:634
20370 msgid "checksum-device"
20374 #: ../fish/guestfish-actions.pod:636
20377 " checksum-device csumtype device\n"
20382 #: ../fish/guestfish-actions.pod:638
20384 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
20385 "device named C<device>. For the types of checksums supported see the L</"
20386 "checksum> command."
20390 #: ../fish/guestfish-actions.pod:642
20391 msgid "checksums-out"
20395 #: ../fish/guestfish-actions.pod:644
20398 " checksums-out csumtype directory (sumsfile|-)\n"
20403 #: ../fish/guestfish-actions.pod:660
20408 #: ../fish/guestfish-actions.pod:662
20411 " chmod mode path\n"
20416 #: ../fish/guestfish-actions.pod:673
20421 #: ../fish/guestfish-actions.pod:675
20424 " chown owner group path\n"
20429 #: ../fish/guestfish-actions.pod:683
20434 #: ../fish/guestfish-actions.pod:685
20437 " command 'arguments ...'\n"
20442 #: ../fish/guestfish-actions.pod:692
20444 "The single parameter is an argv-style list of arguments. The first element "
20445 "is the name of the program to run. Subsequent elements are parameters. The "
20446 "list must be non-empty (ie. must contain a program name). Note that the "
20447 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
20451 #: ../fish/guestfish-actions.pod:720
20452 msgid "command-lines"
20456 #: ../fish/guestfish-actions.pod:722
20459 " command-lines 'arguments ...'\n"
20464 #: ../fish/guestfish-actions.pod:724
20466 "This is the same as L</command>, but splits the result into a list of lines."
20470 #: ../fish/guestfish-actions.pod:727
20471 msgid "See also: L</sh-lines>"
20475 #: ../fish/guestfish-actions.pod:732
20480 #: ../fish/guestfish-actions.pod:734
20483 " config qemuparam qemuvalue\n"
20488 #: ../fish/guestfish-actions.pod:745
20493 #: ../fish/guestfish-actions.pod:747
20496 " copy-size src dest size\n"
20501 #: ../fish/guestfish-actions.pod:755
20506 #: ../fish/guestfish-actions.pod:757
20514 #: ../fish/guestfish-actions.pod:762
20519 #: ../fish/guestfish-actions.pod:764
20527 #: ../fish/guestfish-actions.pod:769
20532 #: ../fish/guestfish-actions.pod:771
20540 #: ../fish/guestfish-actions.pod:778
20542 "If the destination is a device, it must be as large or larger than the "
20543 "source file or device, otherwise the copy will fail. This command cannot do "
20544 "partial copies (see L</copy-size>)."
20548 #: ../fish/guestfish-actions.pod:782
20553 #: ../fish/guestfish-actions.pod:784
20561 #: ../fish/guestfish-actions.pod:788 ../fish/guestfish-actions.pod:799
20563 "This command is mostly useful for interactive sessions. It is I<not> "
20564 "intended that you try to parse the output string. Use L</statvfs> from "
20569 #: ../fish/guestfish-actions.pod:792
20574 #: ../fish/guestfish-actions.pod:794
20582 #: ../fish/guestfish-actions.pod:803
20587 #: ../fish/guestfish-actions.pod:805
20595 #: ../fish/guestfish-actions.pod:811
20597 "Another way to get the same information is to enable verbose messages with "
20598 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
20599 "before running the program."
20603 #: ../fish/guestfish-actions.pod:816
20608 #: ../fish/guestfish-actions.pod:818
20611 " download remotefilename (filename|-)\n"
20616 #: ../fish/guestfish-actions.pod:825
20617 msgid "See also L</upload>, L</cat>."
20621 #: ../fish/guestfish-actions.pod:829
20622 msgid "download-offset"
20626 #: ../fish/guestfish-actions.pod:831
20629 " download-offset remotefilename (filename|-) offset size\n"
20634 #: ../fish/guestfish-actions.pod:839
20636 "Note that there is no limit on the amount of data that can be downloaded "
20637 "with this call, unlike with L</pread>, and this call always reads the full "
20638 "amount unless an error occurs."
20642 #: ../fish/guestfish-actions.pod:844
20643 msgid "See also L</download>, L</pread>."
20647 #: ../fish/guestfish-actions.pod:848
20648 msgid "drop-caches"
20652 #: ../fish/guestfish-actions.pod:850
20655 " drop-caches whattodrop\n"
20660 #: ../fish/guestfish-actions.pod:862
20665 #: ../fish/guestfish-actions.pod:864
20673 #: ../fish/guestfish-actions.pod:876
20678 #: ../fish/guestfish-actions.pod:878
20681 " e2fsck-f device\n"
20686 #: ../fish/guestfish-actions.pod:884
20688 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
20689 "should use L</fsck>."
20693 #: ../fish/guestfish-actions.pod:887
20694 msgid "echo-daemon"
20698 #: ../fish/guestfish-actions.pod:889
20701 " echo-daemon 'words ...'\n"
20706 #: ../fish/guestfish-actions.pod:896
20707 msgid "See also L</ping-daemon>."
20711 #: ../fish/guestfish-actions.pod:898
20716 #: ../fish/guestfish-actions.pod:900
20719 " egrep regex path\n"
20724 #: ../fish/guestfish-actions.pod:908
20729 #: ../fish/guestfish-actions.pod:910
20732 " egrepi regex path\n"
20737 #: ../fish/guestfish-actions.pod:918
20742 #: ../fish/guestfish-actions.pod:920
20745 " equal file1 file2\n"
20750 #: ../fish/guestfish-actions.pod:927
20755 #: ../fish/guestfish-actions.pod:929
20763 #: ../fish/guestfish-actions.pod:934
20764 msgid "See also L</is-file>, L</is-dir>, L</stat>."
20768 #: ../fish/guestfish-actions.pod:936
20773 #: ../fish/guestfish-actions.pod:938
20776 " fallocate path len\n"
20781 #: ../fish/guestfish-actions.pod:955
20782 msgid "fallocate64"
20786 #: ../fish/guestfish-actions.pod:957
20789 " fallocate64 path len\n"
20794 #: ../fish/guestfish-actions.pod:963
20796 "Note that this call allocates disk blocks for the file. To create a sparse "
20797 "file use L</truncate-size> instead."
20801 #: ../fish/guestfish-actions.pod:966
20803 "The deprecated call L</fallocate> does the same, but owing to an oversight "
20804 "it only allowed 30 bit lengths to be specified, effectively limiting the "
20805 "maximum size of files created through that call to 1GB."
20809 #: ../fish/guestfish-actions.pod:975
20814 #: ../fish/guestfish-actions.pod:977
20817 " fgrep pattern path\n"
20822 #: ../fish/guestfish-actions.pod:985
20827 #: ../fish/guestfish-actions.pod:987
20830 " fgrepi pattern path\n"
20835 #: ../fish/guestfish-actions.pod:995
20840 #: ../fish/guestfish-actions.pod:997
20848 #: ../fish/guestfish-actions.pod:1009
20850 "This command can also be used on C</dev/> devices (and partitions, LV "
20851 "names). You can for example use this to determine if a device contains a "
20852 "filesystem, although it's usually better to use L</vfs-type>."
20856 #: ../fish/guestfish-actions.pod:1019
20857 msgid "file-architecture"
20861 #: ../fish/guestfish-actions.pod:1021
20864 " file-architecture filename\n"
20869 #: ../fish/guestfish-actions.pod:1124
20874 #: ../fish/guestfish-actions.pod:1126
20882 #: ../fish/guestfish-actions.pod:1130
20884 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
20885 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
20889 #: ../fish/guestfish-actions.pod:1134
20894 #: ../fish/guestfish-actions.pod:1136
20897 " fill c len path\n"
20902 #: ../fish/guestfish-actions.pod:1142
20904 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
20905 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
20906 "L</fill-pattern>."
20910 #: ../fish/guestfish-actions.pod:1147
20911 msgid "fill-pattern"
20915 #: ../fish/guestfish-actions.pod:1149
20918 " fill-pattern pattern len path\n"
20923 #: ../fish/guestfish-actions.pod:1151
20925 "This function is like L</fill> except that it creates a new file of length "
20926 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
20927 "is truncated if necessary to ensure the length of the file is exactly C<len> "
20932 #: ../fish/guestfish-actions.pod:1156
20937 #: ../fish/guestfish-actions.pod:1158
20940 " find directory\n"
20945 #: ../fish/guestfish-actions.pod:1172
20946 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
20950 #: ../fish/guestfish-actions.pod:1185
20951 msgid "See also L</find0>."
20955 #: ../fish/guestfish-actions.pod:1190
20960 #: ../fish/guestfish-actions.pod:1192
20963 " find0 directory (files|-)\n"
20968 #: ../fish/guestfish-actions.pod:1198
20970 "This command works the same way as L</find> with the following exceptions:"
20974 #: ../fish/guestfish-actions.pod:1225
20975 msgid "findfs-label"
20979 #: ../fish/guestfish-actions.pod:1227
20982 " findfs-label label\n"
20987 #: ../fish/guestfish-actions.pod:1233
20988 msgid "To find the label of a filesystem, use L</vfs-label>."
20992 #: ../fish/guestfish-actions.pod:1235
20993 msgid "findfs-uuid"
20997 #: ../fish/guestfish-actions.pod:1237
21000 " findfs-uuid uuid\n"
21005 #: ../fish/guestfish-actions.pod:1243
21006 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
21010 #: ../fish/guestfish-actions.pod:1245
21015 #: ../fish/guestfish-actions.pod:1247
21018 " fsck fstype device\n"
21023 #: ../fish/guestfish-actions.pod:1277
21028 #: ../fish/guestfish-actions.pod:1279
21036 #: ../fish/guestfish-actions.pod:1286
21037 msgid "get-autosync"
21041 #: ../fish/guestfish-actions.pod:1288
21049 #: ../fish/guestfish-actions.pod:1292
21054 #: ../fish/guestfish-actions.pod:1294
21062 #: ../fish/guestfish-actions.pod:1298
21063 msgid "get-e2label"
21067 #: ../fish/guestfish-actions.pod:1300
21070 " get-e2label device\n"
21075 #: ../fish/guestfish-actions.pod:1312
21080 #: ../fish/guestfish-actions.pod:1314
21083 " get-e2uuid device\n"
21088 #: ../fish/guestfish-actions.pod:1326
21089 msgid "get-memsize"
21093 #: ../fish/guestfish-actions.pod:1328
21101 #: ../fish/guestfish-actions.pod:1333
21103 "If L</set-memsize> was not called on this handle, and if "
21104 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
21105 "value for memsize."
21109 #: ../fish/guestfish-actions.pod:1340
21110 msgid "get-network"
21114 #: ../fish/guestfish-actions.pod:1342
21122 #: ../fish/guestfish-actions.pod:1346
21127 #: ../fish/guestfish-actions.pod:1348
21135 #: ../fish/guestfish-actions.pod:1355
21140 #: ../fish/guestfish-actions.pod:1357
21145 #: ../fish/guestfish-actions.pod:1359
21153 #: ../fish/guestfish-actions.pod:1366
21158 #: ../fish/guestfish-actions.pod:1368
21166 #: ../fish/guestfish-actions.pod:1375
21167 msgid "get-recovery-proc"
21171 #: ../fish/guestfish-actions.pod:1377
21174 " get-recovery-proc\n"
21179 #: ../fish/guestfish-actions.pod:1381
21180 msgid "get-selinux"
21184 #: ../fish/guestfish-actions.pod:1383
21192 #: ../fish/guestfish-actions.pod:1385
21194 "This returns the current setting of the selinux flag which is passed to the "
21195 "appliance at boot time. See L</set-selinux>."
21199 #: ../fish/guestfish-actions.pod:1391
21204 #: ../fish/guestfish-actions.pod:1393
21212 #: ../fish/guestfish-actions.pod:1400
21217 #: ../fish/guestfish-actions.pod:1402
21225 #: ../fish/guestfish-actions.pod:1406
21230 #: ../fish/guestfish-actions.pod:1408
21238 #: ../fish/guestfish-actions.pod:1410
21240 "Return the current umask. By default the umask is C<022> unless it has been "
21241 "set by calling L</umask>."
21245 #: ../fish/guestfish-actions.pod:1413
21246 msgid "get-verbose"
21250 #: ../fish/guestfish-actions.pod:1415
21258 #: ../fish/guestfish-actions.pod:1419
21263 #: ../fish/guestfish-actions.pod:1421
21271 #: ../fish/guestfish-actions.pod:1425
21272 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
21276 #: ../fish/guestfish-actions.pod:1428
21281 #: ../fish/guestfish-actions.pod:1430
21284 " getxattr path name\n"
21289 #: ../fish/guestfish-actions.pod:1432
21291 "Get a single extended attribute from file C<path> named C<name>. This call "
21292 "follows symlinks. If you want to lookup an extended attribute for the "
21293 "symlink itself, use L</lgetxattr>."
21297 #: ../fish/guestfish-actions.pod:1436 ../fish/guestfish-actions.pod:2263
21299 "Normally it is better to get all extended attributes from a file in one go "
21300 "by calling L</getxattrs>. However some Linux filesystem implementations are "
21301 "buggy and do not provide a way to list out attributes. For these "
21302 "filesystems (notably ntfs-3g) you have to know the names of the extended "
21303 "attributes you want in advance and call this function."
21307 #: ../fish/guestfish-actions.pod:1446
21308 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
21312 #: ../fish/guestfish-actions.pod:1448
21317 #: ../fish/guestfish-actions.pod:1450
21320 " getxattrs path\n"
21325 #: ../fish/guestfish-actions.pod:1458
21326 msgid "See also: L</lgetxattrs>, L<attr(5)>."
21330 #: ../fish/guestfish-actions.pod:1460
21331 msgid "glob-expand"
21335 #: ../fish/guestfish-actions.pod:1462
21338 " glob-expand pattern\n"
21343 #: ../fish/guestfish-actions.pod:1475
21348 #: ../fish/guestfish-actions.pod:1477
21351 " grep regex path\n"
21356 #: ../fish/guestfish-actions.pod:1485
21361 #: ../fish/guestfish-actions.pod:1487
21364 " grepi regex path\n"
21369 #: ../fish/guestfish-actions.pod:1495
21370 msgid "grub-install"
21374 #: ../fish/guestfish-actions.pod:1497
21377 " grub-install root device\n"
21382 #: ../fish/guestfish-actions.pod:1513
21387 #: ../fish/guestfish-actions.pod:1515
21395 #: ../fish/guestfish-actions.pod:1523
21400 #: ../fish/guestfish-actions.pod:1525
21403 " head-n nrlines path\n"
21408 #: ../fish/guestfish-actions.pod:1538
21413 #: ../fish/guestfish-actions.pod:1540
21421 #: ../fish/guestfish-actions.pod:1548
21426 #: ../fish/guestfish-actions.pod:1550
21429 " initrd-cat initrdpath filename\n"
21434 #: ../fish/guestfish-actions.pod:1562
21435 msgid "See also L</initrd-list>."
21439 #: ../fish/guestfish-actions.pod:1567
21440 msgid "initrd-list"
21444 #: ../fish/guestfish-actions.pod:1569
21447 " initrd-list path\n"
21452 #: ../fish/guestfish-actions.pod:1581
21453 msgid "inotify-add-watch"
21457 #: ../fish/guestfish-actions.pod:1583
21460 " inotify-add-watch path mask\n"
21465 #: ../fish/guestfish-actions.pod:1595
21466 msgid "inotify-close"
21470 #: ../fish/guestfish-actions.pod:1597
21478 #: ../fish/guestfish-actions.pod:1603
21479 msgid "inotify-files"
21483 #: ../fish/guestfish-actions.pod:1605
21491 #: ../fish/guestfish-actions.pod:1607
21493 "This function is a helpful wrapper around L</inotify-read> which just "
21494 "returns a list of pathnames of objects that were touched. The returned "
21495 "pathnames are sorted and deduplicated."
21499 #: ../fish/guestfish-actions.pod:1611
21500 msgid "inotify-init"
21504 #: ../fish/guestfish-actions.pod:1613
21507 " inotify-init maxevents\n"
21512 #: ../fish/guestfish-actions.pod:1619
21514 "C<maxevents> is the maximum number of events which will be queued up between "
21515 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
21516 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
21517 "default was 16384 events. Beyond this limit, the kernel throws away events, "
21518 "but records the fact that it threw them away by setting a flag "
21519 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
21523 #: ../fish/guestfish-actions.pod:1629
21525 "Before any events are generated, you have to add some watches to the "
21526 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
21527 "L</inotify-watch-all>."
21531 #: ../fish/guestfish-actions.pod:1635
21533 "Queued up events should be read periodically by calling L</inotify-read> (or "
21534 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
21535 "If you don't read the events out often enough then you risk the internal "
21536 "queue overflowing."
21540 #: ../fish/guestfish-actions.pod:1642
21542 "The handle should be closed after use by calling L</inotify-close>. This "
21543 "also removes any watches automatically."
21547 #: ../fish/guestfish-actions.pod:1651
21548 msgid "inotify-read"
21552 #: ../fish/guestfish-actions.pod:1653
21560 #: ../fish/guestfish-actions.pod:1666
21561 msgid "inotify-rm-watch"
21565 #: ../fish/guestfish-actions.pod:1668
21568 " inotify-rm-watch wd\n"
21573 #: ../fish/guestfish-actions.pod:1670
21574 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
21578 #: ../fish/guestfish-actions.pod:1673
21579 msgid "inspect-get-arch"
21583 #: ../fish/guestfish-actions.pod:1675
21586 " inspect-get-arch root\n"
21591 #: ../fish/guestfish-actions.pod:1677 ../fish/guestfish-actions.pod:1693
21592 #: ../fish/guestfish-actions.pod:1767 ../fish/guestfish-actions.pod:1785
21593 #: ../fish/guestfish-actions.pod:1800 ../fish/guestfish-actions.pod:1821
21594 #: ../fish/guestfish-actions.pod:1836 ../fish/guestfish-actions.pod:1859
21595 #: ../fish/guestfish-actions.pod:1881 ../fish/guestfish-actions.pod:1905
21596 #: ../fish/guestfish-actions.pod:1935 ../fish/guestfish-actions.pod:1970
21597 #: ../fish/guestfish-actions.pod:1986
21599 "This function should only be called with a root device string as returned by "
21604 #: ../fish/guestfish-actions.pod:1680
21606 "This returns the architecture of the inspected operating system. The "
21607 "possible return values are listed under L</file-architecture>."
21611 #: ../fish/guestfish-actions.pod:1689
21612 msgid "inspect-get-distro"
21616 #: ../fish/guestfish-actions.pod:1691
21619 " inspect-get-distro root\n"
21624 #: ../fish/guestfish-actions.pod:1763
21625 msgid "inspect-get-filesystems"
21629 #: ../fish/guestfish-actions.pod:1765
21632 " inspect-get-filesystems root\n"
21637 #: ../fish/guestfish-actions.pod:1778
21639 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
21640 "get-mountpoints>."
21644 #: ../fish/guestfish-actions.pod:1781
21645 msgid "inspect-get-hostname"
21649 #: ../fish/guestfish-actions.pod:1783
21652 " inspect-get-hostname root\n"
21657 #: ../fish/guestfish-actions.pod:1796
21658 msgid "inspect-get-major-version"
21662 #: ../fish/guestfish-actions.pod:1798
21665 " inspect-get-major-version root\n"
21670 #: ../fish/guestfish-actions.pod:1817
21671 msgid "inspect-get-minor-version"
21675 #: ../fish/guestfish-actions.pod:1819
21678 " inspect-get-minor-version root\n"
21683 #: ../fish/guestfish-actions.pod:1829
21685 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
21686 "get-major-version>."
21690 #: ../fish/guestfish-actions.pod:1832
21691 msgid "inspect-get-mountpoints"
21695 #: ../fish/guestfish-actions.pod:1834
21698 " inspect-get-mountpoints root\n"
21703 #: ../fish/guestfish-actions.pod:1852
21705 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
21706 "get-filesystems>."
21710 #: ../fish/guestfish-actions.pod:1855
21711 msgid "inspect-get-package-format"
21715 #: ../fish/guestfish-actions.pod:1857
21718 " inspect-get-package-format root\n"
21723 #: ../fish/guestfish-actions.pod:1862
21725 "This function and L</inspect-get-package-management> return the package "
21726 "format and package management tool used by the inspected operating system. "
21727 "For example for Fedora these functions would return C<rpm> (package format) "
21728 "and C<yum> (package management)."
21732 #: ../fish/guestfish-actions.pod:1877
21733 msgid "inspect-get-package-management"
21737 #: ../fish/guestfish-actions.pod:1879
21740 " inspect-get-package-management root\n"
21745 #: ../fish/guestfish-actions.pod:1884
21747 "L</inspect-get-package-format> and this function return the package format "
21748 "and package management tool used by the inspected operating system. For "
21749 "example for Fedora these functions would return C<rpm> (package format) and "
21750 "C<yum> (package management)."
21754 #: ../fish/guestfish-actions.pod:1901
21755 msgid "inspect-get-product-name"
21759 #: ../fish/guestfish-actions.pod:1903
21762 " inspect-get-product-name root\n"
21767 #: ../fish/guestfish-actions.pod:1918
21768 msgid "inspect-get-roots"
21772 #: ../fish/guestfish-actions.pod:1920
21775 " inspect-get-roots\n"
21780 #: ../fish/guestfish-actions.pod:1922
21782 "This function is a convenient way to get the list of root devices, as "
21783 "returned from a previous call to L</inspect-os>, but without redoing the "
21784 "whole inspection process."
21788 #: ../fish/guestfish-actions.pod:1926
21790 "This returns an empty list if either no root devices were found or the "
21791 "caller has not called L</inspect-os>."
21795 #: ../fish/guestfish-actions.pod:1931
21796 msgid "inspect-get-type"
21800 #: ../fish/guestfish-actions.pod:1933
21803 " inspect-get-type root\n"
21808 #: ../fish/guestfish-actions.pod:1966
21809 msgid "inspect-get-windows-systemroot"
21813 #: ../fish/guestfish-actions.pod:1968
21816 " inspect-get-windows-systemroot root\n"
21821 #: ../fish/guestfish-actions.pod:1982
21822 msgid "inspect-list-applications"
21826 #: ../fish/guestfish-actions.pod:1984
21829 " inspect-list-applications root\n"
21834 #: ../fish/guestfish-actions.pod:1991
21836 "I<Note:> This call works differently from other parts of the inspection "
21837 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
21838 "then mount up the disks, before calling this. Listing applications is a "
21839 "significantly more difficult operation which requires access to the full "
21840 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
21841 "are just returning data cached in the libguestfs handle, this call actually "
21842 "reads parts of the mounted filesystems during the call."
21846 #: ../fish/guestfish-actions.pod:2081
21851 #: ../fish/guestfish-actions.pod:2083
21859 #: ../fish/guestfish-actions.pod:2098
21861 "You can pass the root string(s) returned to other L</inspect-get-*> "
21862 "functions in order to query further information about each operating system, "
21863 "such as the name and version."
21867 #: ../fish/guestfish-actions.pod:2103
21869 "This function uses other libguestfs features such as L</mount-ro> and L</"
21870 "umount-all> in order to mount and unmount filesystems and look at the "
21871 "contents. This should be called with no disks currently mounted. The "
21872 "function may also use Augeas, so any existing Augeas handle will be closed."
21876 #: ../fish/guestfish-actions.pod:2115 ../fish/guestfish-actions.pod:2291
21877 #: ../fish/guestfish-actions.pod:2337
21878 msgid "See also L</list-filesystems>."
21882 #: ../fish/guestfish-actions.pod:2117
21883 msgid "is-blockdev"
21887 #: ../fish/guestfish-actions.pod:2119
21890 " is-blockdev path\n"
21895 #: ../fish/guestfish-actions.pod:2124 ../fish/guestfish-actions.pod:2142
21896 #: ../fish/guestfish-actions.pod:2161 ../fish/guestfish-actions.pod:2170
21897 #: ../fish/guestfish-actions.pod:2180 ../fish/guestfish-actions.pod:2214
21898 #: ../fish/guestfish-actions.pod:2223
21899 msgid "See also L</stat>."
21903 #: ../fish/guestfish-actions.pod:2126
21908 #: ../fish/guestfish-actions.pod:2128
21916 #: ../fish/guestfish-actions.pod:2135
21921 #: ../fish/guestfish-actions.pod:2137
21924 " is-chardev path\n"
21929 #: ../fish/guestfish-actions.pod:2144
21934 #: ../fish/guestfish-actions.pod:2146
21942 #: ../fish/guestfish-actions.pod:2153
21947 #: ../fish/guestfish-actions.pod:2155
21955 #: ../fish/guestfish-actions.pod:2163
21960 #: ../fish/guestfish-actions.pod:2165
21968 #: ../fish/guestfish-actions.pod:2172
21973 #: ../fish/guestfish-actions.pod:2174
21981 #: ../fish/guestfish-actions.pod:2182
21982 msgid "is-launching"
21986 #: ../fish/guestfish-actions.pod:2184
21994 #: ../fish/guestfish-actions.pod:2191
21999 #: ../fish/guestfish-actions.pod:2193
22007 #: ../fish/guestfish-actions.pod:2198
22012 #: ../fish/guestfish-actions.pod:2200
22020 #: ../fish/guestfish-actions.pod:2207
22025 #: ../fish/guestfish-actions.pod:2209
22028 " is-socket path\n"
22033 #: ../fish/guestfish-actions.pod:2216
22038 #: ../fish/guestfish-actions.pod:2218
22041 " is-symlink path\n"
22046 #: ../fish/guestfish-actions.pod:2225
22047 msgid "kill-subprocess"
22051 #: ../fish/guestfish-actions.pod:2227
22054 " kill-subprocess\n"
22059 #: ../fish/guestfish-actions.pod:2231
22064 #: ../fish/guestfish-actions.pod:2233
22069 #: ../fish/guestfish-actions.pod:2235
22077 #: ../fish/guestfish-actions.pod:2243
22082 #: ../fish/guestfish-actions.pod:2245
22085 " lchown owner group path\n"
22090 #: ../fish/guestfish-actions.pod:2247
22092 "Change the file owner to C<owner> and group to C<group>. This is like L</"
22093 "chown> but if C<path> is a symlink then the link itself is changed, not the "
22098 #: ../fish/guestfish-actions.pod:2255
22103 #: ../fish/guestfish-actions.pod:2257
22106 " lgetxattr path name\n"
22111 #: ../fish/guestfish-actions.pod:2273
22112 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
22116 #: ../fish/guestfish-actions.pod:2275
22121 #: ../fish/guestfish-actions.pod:2277
22124 " lgetxattrs path\n"
22129 #: ../fish/guestfish-actions.pod:2279
22131 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
22132 "it returns the extended attributes of the link itself."
22136 #: ../fish/guestfish-actions.pod:2283
22137 msgid "list-devices"
22141 #: ../fish/guestfish-actions.pod:2285
22149 #: ../fish/guestfish-actions.pod:2293
22150 msgid "list-filesystems"
22154 #: ../fish/guestfish-actions.pod:2295
22157 " list-filesystems\n"
22162 #: ../fish/guestfish-actions.pod:2314
22164 "This command runs other libguestfs commands, which might include L</mount> "
22165 "and L</umount>, and therefore you should use this soon after launch and only "
22166 "when nothing is mounted."
22170 #: ../fish/guestfish-actions.pod:2318
22172 "Not all of the filesystems returned will be mountable. In particular, swap "
22173 "partitions are returned in the list. Also this command does not check that "
22174 "each filesystem found is valid and mountable, and some filesystems might be "
22175 "mountable but require special options. Filesystems may not all belong to a "
22176 "single logical operating system (use L</inspect-os> to look for OSes)."
22180 #: ../fish/guestfish-actions.pod:2326
22181 msgid "list-partitions"
22185 #: ../fish/guestfish-actions.pod:2328
22188 " list-partitions\n"
22193 #: ../fish/guestfish-actions.pod:2334
22195 "This does not return logical volumes. For that you will need to call L</"
22200 #: ../fish/guestfish-actions.pod:2339
22205 #: ../fish/guestfish-actions.pod:2341
22213 #: ../fish/guestfish-actions.pod:2349
22218 #: ../fish/guestfish-actions.pod:2351
22221 " ln target linkname\n"
22226 #: ../fish/guestfish-actions.pod:2355
22231 #: ../fish/guestfish-actions.pod:2357
22234 " ln-f target linkname\n"
22239 #: ../fish/guestfish-actions.pod:2362
22244 #: ../fish/guestfish-actions.pod:2364
22247 " ln-s target linkname\n"
22252 #: ../fish/guestfish-actions.pod:2368
22257 #: ../fish/guestfish-actions.pod:2370
22260 " ln-sf target linkname\n"
22265 #: ../fish/guestfish-actions.pod:2375
22266 msgid "lremovexattr"
22270 #: ../fish/guestfish-actions.pod:2377
22273 " lremovexattr xattr path\n"
22278 #: ../fish/guestfish-actions.pod:2379
22280 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
22281 "it removes an extended attribute of the link itself."
22285 #: ../fish/guestfish-actions.pod:2383
22290 #: ../fish/guestfish-actions.pod:2385
22298 #: ../fish/guestfish-actions.pod:2391
22300 "This command is mostly useful for interactive sessions. Programs should "
22301 "probably use L</readdir> instead."
22305 #: ../fish/guestfish-actions.pod:2394
22310 #: ../fish/guestfish-actions.pod:2396
22313 " lsetxattr xattr val vallen path\n"
22318 #: ../fish/guestfish-actions.pod:2398
22320 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
22321 "sets an extended attribute of the link itself."
22325 #: ../fish/guestfish-actions.pod:2402
22330 #: ../fish/guestfish-actions.pod:2404
22338 #: ../fish/guestfish-actions.pod:2408
22340 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
22341 "the link is stat-ed, not the file it refers to."
22345 #: ../fish/guestfish-actions.pod:2414
22350 #: ../fish/guestfish-actions.pod:2416
22353 " lstatlist path 'names ...'\n"
22358 #: ../fish/guestfish-actions.pod:2418
22360 "This call allows you to perform the L</lstat> operation on multiple files, "
22361 "where all files are in the directory C<path>. C<names> is the list of files "
22362 "from this directory."
22366 #: ../fish/guestfish-actions.pod:2427
22368 "This call is intended for programs that want to efficiently list a directory "
22369 "contents without making many round-trips. See also L</lxattrlist> for a "
22370 "similarly efficient call for getting extended attributes. Very long "
22371 "directory listings might cause the protocol message size to be exceeded, "
22372 "causing this call to fail. The caller must split up such requests into "
22373 "smaller groups of names."
22377 #: ../fish/guestfish-actions.pod:2435
22378 msgid "luks-add-key"
22382 #: ../fish/guestfish-actions.pod:2437
22385 " luks-add-key device keyslot\n"
22390 #: ../fish/guestfish-actions.pod:2444
22392 "Note that if C<keyslot> already contains a key, then this command will "
22393 "fail. You have to use L</luks-kill-slot> first to remove that key."
22397 #: ../fish/guestfish-actions.pod:2448 ../fish/guestfish-actions.pod:2470
22398 #: ../fish/guestfish-actions.pod:2483 ../fish/guestfish-actions.pod:2497
22399 #: ../fish/guestfish-actions.pod:2520 ../fish/guestfish-actions.pod:2530
22401 "This command has one or more key or passphrase parameters. Guestfish will "
22402 "prompt for these separately."
22406 #: ../fish/guestfish-actions.pod:2451
22411 #: ../fish/guestfish-actions.pod:2453
22414 " luks-close device\n"
22419 #: ../fish/guestfish-actions.pod:2455
22421 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
22422 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
22423 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
22428 #: ../fish/guestfish-actions.pod:2461
22429 msgid "luks-format"
22433 #: ../fish/guestfish-actions.pod:2463
22436 " luks-format device keyslot\n"
22441 #: ../fish/guestfish-actions.pod:2476
22442 msgid "luks-format-cipher"
22446 #: ../fish/guestfish-actions.pod:2478
22449 " luks-format-cipher device keyslot cipher\n"
22454 #: ../fish/guestfish-actions.pod:2480
22456 "This command is the same as L</luks-format> but it also allows you to set "
22457 "the C<cipher> used."
22461 #: ../fish/guestfish-actions.pod:2489
22462 msgid "luks-kill-slot"
22466 #: ../fish/guestfish-actions.pod:2491
22469 " luks-kill-slot device keyslot\n"
22474 #: ../fish/guestfish-actions.pod:2500
22479 #: ../fish/guestfish-actions.pod:2502
22482 " luks-open device mapname\n"
22487 #: ../fish/guestfish-actions.pod:2516
22489 "If this block device contains LVM volume groups, then calling L</vgscan> "
22490 "followed by L</vg-activate-all> will make them visible."
22494 #: ../fish/guestfish-actions.pod:2523
22495 msgid "luks-open-ro"
22499 #: ../fish/guestfish-actions.pod:2525
22502 " luks-open-ro device mapname\n"
22507 #: ../fish/guestfish-actions.pod:2527
22509 "This is the same as L</luks-open> except that a read-only mapping is created."
22513 #: ../fish/guestfish-actions.pod:2533
22518 #: ../fish/guestfish-actions.pod:2535
22521 " lvcreate logvol volgroup mbytes\n"
22526 #: ../fish/guestfish-actions.pod:2540
22527 msgid "lvm-canonical-lv-name"
22531 #: ../fish/guestfish-actions.pod:2542
22534 " lvm-canonical-lv-name lvname\n"
22539 #: ../fish/guestfish-actions.pod:2551
22540 msgid "See also L</is-lv>."
22544 #: ../fish/guestfish-actions.pod:2553
22545 msgid "lvm-clear-filter"
22549 #: ../fish/guestfish-actions.pod:2555
22552 " lvm-clear-filter\n"
22557 #: ../fish/guestfish-actions.pod:2557
22559 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
22564 #: ../fish/guestfish-actions.pod:2563
22565 msgid "lvm-remove-all"
22569 #: ../fish/guestfish-actions.pod:2565
22572 " lvm-remove-all\n"
22577 #: ../fish/guestfish-actions.pod:2573
22578 msgid "lvm-set-filter"
22582 #: ../fish/guestfish-actions.pod:2575
22585 " lvm-set-filter 'devices ...'\n"
22590 #: ../fish/guestfish-actions.pod:2600
22595 #: ../fish/guestfish-actions.pod:2602
22598 " lvremove device\n"
22603 #: ../fish/guestfish-actions.pod:2610
22608 #: ../fish/guestfish-actions.pod:2612
22611 " lvrename logvol newlogvol\n"
22616 #: ../fish/guestfish-actions.pod:2616
22621 #: ../fish/guestfish-actions.pod:2618
22624 " lvresize device mbytes\n"
22629 #: ../fish/guestfish-actions.pod:2624
22630 msgid "lvresize-free"
22634 #: ../fish/guestfish-actions.pod:2626
22637 " lvresize-free lv percent\n"
22642 #: ../fish/guestfish-actions.pod:2634
22647 #: ../fish/guestfish-actions.pod:2636
22655 #: ../fish/guestfish-actions.pod:2644
22656 msgid "See also L</lvs-full>, L</list-filesystems>."
22660 #: ../fish/guestfish-actions.pod:2646
22665 #: ../fish/guestfish-actions.pod:2648
22673 #: ../fish/guestfish-actions.pod:2653
22678 #: ../fish/guestfish-actions.pod:2655
22686 #: ../fish/guestfish-actions.pod:2659
22691 #: ../fish/guestfish-actions.pod:2661
22694 " lxattrlist path 'names ...'\n"
22699 #: ../fish/guestfish-actions.pod:2677
22701 "This call is intended for programs that want to efficiently list a directory "
22702 "contents without making many round-trips. See also L</lstatlist> for a "
22703 "similarly efficient call for getting standard stats. Very long directory "
22704 "listings might cause the protocol message size to be exceeded, causing this "
22705 "call to fail. The caller must split up such requests into smaller groups of "
22710 #: ../fish/guestfish-actions.pod:2685
22715 #: ../fish/guestfish-actions.pod:2687
22723 #: ../fish/guestfish-actions.pod:2691
22728 #: ../fish/guestfish-actions.pod:2693
22731 " mkdir-mode path mode\n"
22736 #: ../fish/guestfish-actions.pod:2702
22737 msgid "See also L</mkdir>, L</umask>"
22741 #: ../fish/guestfish-actions.pod:2704
22746 #: ../fish/guestfish-actions.pod:2706
22754 #: ../fish/guestfish-actions.pod:2711
22759 #: ../fish/guestfish-actions.pod:2713
22762 " mkdtemp template\n"
22767 #: ../fish/guestfish-actions.pod:2734
22772 #: ../fish/guestfish-actions.pod:2736
22775 " mke2fs-J fstype blocksize device journal\n"
22780 #: ../fish/guestfish-actions.pod:2744
22781 msgid "See also L</mke2journal>."
22785 #: ../fish/guestfish-actions.pod:2746
22790 #: ../fish/guestfish-actions.pod:2748
22793 " mke2fs-JL fstype blocksize device label\n"
22798 #: ../fish/guestfish-actions.pod:2753
22799 msgid "See also L</mke2journal-L>."
22803 #: ../fish/guestfish-actions.pod:2755
22808 #: ../fish/guestfish-actions.pod:2757
22811 " mke2fs-JU fstype blocksize device uuid\n"
22816 #: ../fish/guestfish-actions.pod:2762
22817 msgid "See also L</mke2journal-U>."
22821 #: ../fish/guestfish-actions.pod:2764
22822 msgid "mke2journal"
22826 #: ../fish/guestfish-actions.pod:2766
22829 " mke2journal blocksize device\n"
22834 #: ../fish/guestfish-actions.pod:2773
22835 msgid "mke2journal-L"
22839 #: ../fish/guestfish-actions.pod:2775
22842 " mke2journal-L blocksize label device\n"
22847 #: ../fish/guestfish-actions.pod:2779
22848 msgid "mke2journal-U"
22852 #: ../fish/guestfish-actions.pod:2781
22855 " mke2journal-U blocksize uuid device\n"
22860 #: ../fish/guestfish-actions.pod:2785
22865 #: ../fish/guestfish-actions.pod:2787
22868 " mkfifo mode path\n"
22873 #: ../fish/guestfish-actions.pod:2789
22875 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
22876 "is just a convenient wrapper around L</mknod>."
22880 #: ../fish/guestfish-actions.pod:2795
22885 #: ../fish/guestfish-actions.pod:2797
22888 " mkfs fstype device\n"
22893 #: ../fish/guestfish-actions.pod:2803
22898 #: ../fish/guestfish-actions.pod:2805
22901 " mkfs-b fstype blocksize device\n"
22906 #: ../fish/guestfish-actions.pod:2807
22908 "This call is similar to L</mkfs>, but it allows you to control the block "
22909 "size of the resulting filesystem. Supported block sizes depend on the "
22910 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
22914 #: ../fish/guestfish-actions.pod:2822
22919 #: ../fish/guestfish-actions.pod:2824
22922 " mkfs-opts fstype device [blocksize:..]\n"
22927 #: ../fish/guestfish-actions.pod:2846
22928 msgid "mkmountpoint"
22932 #: ../fish/guestfish-actions.pod:2848
22935 " mkmountpoint exemptpath\n"
22940 #: ../fish/guestfish-actions.pod:2850
22942 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
22943 "to create extra mountpoints before mounting the first filesystem."
22947 #: ../fish/guestfish-actions.pod:2874
22949 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
22950 "unexpected errors if you try to mix these calls. It is safest to manually "
22951 "unmount filesystems and remove mountpoints after use."
22955 #: ../fish/guestfish-actions.pod:2878
22957 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
22958 "for this to work for manual mountpoints, you must ensure that the innermost "
22959 "mountpoints have the longest pathnames, as in the example code above."
22963 #: ../fish/guestfish-actions.pod:2885
22965 "Autosync [see L</set-autosync>, this is set by default on handles] means "
22966 "that L</umount-all> is called when the handle is closed which can also "
22967 "trigger these issues."
22971 #: ../fish/guestfish-actions.pod:2889
22976 #: ../fish/guestfish-actions.pod:2891
22979 " mknod mode devmajor devminor path\n"
22984 #: ../fish/guestfish-actions.pod:2901
22986 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
22987 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
22988 "regular file). These constants are available in the standard Linux header "
22989 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
22990 "wrappers around this command which bitwise OR in the appropriate constant "
22995 #: ../fish/guestfish-actions.pod:2911
23000 #: ../fish/guestfish-actions.pod:2913
23003 " mknod-b mode devmajor devminor path\n"
23008 #: ../fish/guestfish-actions.pod:2915
23010 "This call creates a block device node called C<path> with mode C<mode> and "
23011 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
23012 "wrapper around L</mknod>."
23016 #: ../fish/guestfish-actions.pod:2921
23021 #: ../fish/guestfish-actions.pod:2923
23024 " mknod-c mode devmajor devminor path\n"
23029 #: ../fish/guestfish-actions.pod:2925
23031 "This call creates a char device node called C<path> with mode C<mode> and "
23032 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
23033 "wrapper around L</mknod>."
23037 #: ../fish/guestfish-actions.pod:2931
23042 #: ../fish/guestfish-actions.pod:2933
23050 #: ../fish/guestfish-actions.pod:2937
23055 #: ../fish/guestfish-actions.pod:2939
23058 " mkswap-L label device\n"
23063 #: ../fish/guestfish-actions.pod:2947
23068 #: ../fish/guestfish-actions.pod:2949
23071 " mkswap-U uuid device\n"
23076 #: ../fish/guestfish-actions.pod:2953
23077 msgid "mkswap-file"
23081 #: ../fish/guestfish-actions.pod:2955
23084 " mkswap-file path\n"
23089 #: ../fish/guestfish-actions.pod:2959
23091 "This command just writes a swap file signature to an existing file. To "
23092 "create the file itself, use something like L</fallocate>."
23096 #: ../fish/guestfish-actions.pod:2962
23101 #: ../fish/guestfish-actions.pod:2964
23104 " modprobe modulename\n"
23109 #: ../fish/guestfish-actions.pod:2971
23114 #: ../fish/guestfish-actions.pod:2973
23117 " mount device mountpoint\n"
23122 #: ../fish/guestfish-actions.pod:2989
23124 "B<Important note:> When you use this call, the filesystem options C<sync> "
23125 "and C<noatime> are set implicitly. This was originally done because we "
23126 "thought it would improve reliability, but it turns out that I<-o sync> has a "
23127 "very large negative performance impact and negligible effect on "
23128 "reliability. Therefore we recommend that you avoid using L</mount> in any "
23129 "code that needs performance, and instead use L</mount-options> (use an empty "
23130 "string for the first parameter if you don't want any options)."
23134 #: ../fish/guestfish-actions.pod:2999
23139 #: ../fish/guestfish-actions.pod:3001
23142 " mount-loop file mountpoint\n"
23147 #: ../fish/guestfish-actions.pod:3007
23148 msgid "mount-options"
23152 #: ../fish/guestfish-actions.pod:3009
23155 " mount-options options device mountpoint\n"
23160 #: ../fish/guestfish-actions.pod:3011
23162 "This is the same as the L</mount> command, but it allows you to set the "
23163 "mount options as for the L<mount(8)> I<-o> flag."
23167 #: ../fish/guestfish-actions.pod:3019
23172 #: ../fish/guestfish-actions.pod:3021
23175 " mount-ro device mountpoint\n"
23180 #: ../fish/guestfish-actions.pod:3023
23182 "This is the same as the L</mount> command, but it mounts the filesystem with "
23183 "the read-only (I<-o ro>) flag."
23187 #: ../fish/guestfish-actions.pod:3026
23192 #: ../fish/guestfish-actions.pod:3028
23195 " mount-vfs options vfstype device mountpoint\n"
23200 #: ../fish/guestfish-actions.pod:3030
23202 "This is the same as the L</mount> command, but it allows you to set both the "
23203 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
23207 #: ../fish/guestfish-actions.pod:3034
23208 msgid "mountpoints"
23212 #: ../fish/guestfish-actions.pod:3036
23220 #: ../fish/guestfish-actions.pod:3038
23222 "This call is similar to L</mounts>. That call returns a list of devices. "
23223 "This one returns a hash table (map) of device name to directory where the "
23224 "device is mounted."
23228 #: ../fish/guestfish-actions.pod:3042
23233 #: ../fish/guestfish-actions.pod:3044
23241 #: ../fish/guestfish-actions.pod:3051
23242 msgid "See also: L</mountpoints>"
23246 #: ../fish/guestfish-actions.pod:3053
23251 #: ../fish/guestfish-actions.pod:3055
23259 #: ../fish/guestfish-actions.pod:3060
23260 msgid "ntfs-3g-probe"
23264 #: ../fish/guestfish-actions.pod:3062
23267 " ntfs-3g-probe true|false device\n"
23272 #: ../fish/guestfish-actions.pod:3076
23277 #: ../fish/guestfish-actions.pod:3078
23280 " ntfsresize device\n"
23285 #: ../fish/guestfish-actions.pod:3084
23286 msgid "ntfsresize-size"
23290 #: ../fish/guestfish-actions.pod:3086
23293 " ntfsresize-size device size\n"
23298 #: ../fish/guestfish-actions.pod:3088
23300 "This command is the same as L</ntfsresize> except that it allows you to "
23301 "specify the new size (in bytes) explicitly."
23305 #: ../fish/guestfish-actions.pod:3091
23310 #: ../fish/guestfish-actions.pod:3093
23313 " part-add device prlogex startsect endsect\n"
23318 #: ../fish/guestfish-actions.pod:3095
23320 "This command adds a partition to C<device>. If there is no partition table "
23321 "on the device, call L</part-init> first."
23325 #: ../fish/guestfish-actions.pod:3107
23327 "Creating a partition which covers the whole disk is not so easy. Use L</"
23328 "part-disk> to do that."
23332 #: ../fish/guestfish-actions.pod:3110
23337 #: ../fish/guestfish-actions.pod:3112
23340 " part-del device partnum\n"
23345 #: ../fish/guestfish-actions.pod:3120
23350 #: ../fish/guestfish-actions.pod:3122
23353 " part-disk device parttype\n"
23358 #: ../fish/guestfish-actions.pod:3124
23360 "This command is simply a combination of L</part-init> followed by L</part-"
23361 "add> to create a single primary partition covering the whole disk."
23365 #: ../fish/guestfish-actions.pod:3128
23367 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
23368 "possible values are described in L</part-init>."
23372 #: ../fish/guestfish-actions.pod:3134
23373 msgid "part-get-bootable"
23377 #: ../fish/guestfish-actions.pod:3136
23380 " part-get-bootable device partnum\n"
23385 #: ../fish/guestfish-actions.pod:3141
23386 msgid "See also L</part-set-bootable>."
23390 #: ../fish/guestfish-actions.pod:3143
23391 msgid "part-get-mbr-id"
23395 #: ../fish/guestfish-actions.pod:3145
23398 " part-get-mbr-id device partnum\n"
23403 #: ../fish/guestfish-actions.pod:3150 ../fish/guestfish-actions.pod:3288
23405 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
23406 "undefined results for other partition table types (see L</part-get-"
23411 #: ../fish/guestfish-actions.pod:3154
23412 msgid "part-get-parttype"
23416 #: ../fish/guestfish-actions.pod:3156
23419 " part-get-parttype device\n"
23424 #: ../fish/guestfish-actions.pod:3161
23426 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
23427 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
23428 "possible, although unusual. See L</part-init> for a full list."
23432 #: ../fish/guestfish-actions.pod:3166
23437 #: ../fish/guestfish-actions.pod:3168
23440 " part-init device parttype\n"
23445 #: ../fish/guestfish-actions.pod:3174
23447 "Initially there are no partitions. Following this, you should call L</part-"
23448 "add> for each partition required."
23452 #: ../fish/guestfish-actions.pod:3237
23457 #: ../fish/guestfish-actions.pod:3239
23460 " part-list device\n"
23465 #: ../fish/guestfish-actions.pod:3254
23467 "Start of the partition I<in bytes>. To get sectors you have to divide by "
23468 "the device's sector size, see L</blockdev-getss>."
23472 #: ../fish/guestfish-actions.pod:3267
23473 msgid "part-set-bootable"
23477 #: ../fish/guestfish-actions.pod:3269
23480 " part-set-bootable device partnum true|false\n"
23485 #: ../fish/guestfish-actions.pod:3278
23486 msgid "part-set-mbr-id"
23490 #: ../fish/guestfish-actions.pod:3280
23493 " part-set-mbr-id device partnum idbyte\n"
23498 #: ../fish/guestfish-actions.pod:3292
23499 msgid "part-set-name"
23503 #: ../fish/guestfish-actions.pod:3294
23506 " part-set-name device partnum name\n"
23511 #: ../fish/guestfish-actions.pod:3302
23512 msgid "part-to-dev"
23516 #: ../fish/guestfish-actions.pod:3304
23519 " part-to-dev partition\n"
23524 #: ../fish/guestfish-actions.pod:3310
23526 "The named partition must exist, for example as a string returned from L</"
23527 "list-partitions>."
23531 #: ../fish/guestfish-actions.pod:3313
23532 msgid "ping-daemon"
23536 #: ../fish/guestfish-actions.pod:3315
23544 #: ../fish/guestfish-actions.pod:3322
23549 #: ../fish/guestfish-actions.pod:3324
23552 " pread path count offset\n"
23557 #: ../fish/guestfish-actions.pod:3332
23558 msgid "See also L</pwrite>, L</pread-device>."
23562 #: ../fish/guestfish-actions.pod:3337
23563 msgid "pread-device"
23567 #: ../fish/guestfish-actions.pod:3339
23570 " pread-device device count offset\n"
23575 #: ../fish/guestfish-actions.pod:3347
23576 msgid "See also L</pread>."
23580 #: ../fish/guestfish-actions.pod:3352
23585 #: ../fish/guestfish-actions.pod:3354
23588 " pvcreate device\n"
23593 #: ../fish/guestfish-actions.pod:3360
23598 #: ../fish/guestfish-actions.pod:3362
23601 " pvremove device\n"
23606 #: ../fish/guestfish-actions.pod:3371
23611 #: ../fish/guestfish-actions.pod:3373
23614 " pvresize device\n"
23619 #: ../fish/guestfish-actions.pod:3378
23620 msgid "pvresize-size"
23624 #: ../fish/guestfish-actions.pod:3380
23627 " pvresize-size device size\n"
23632 #: ../fish/guestfish-actions.pod:3382
23634 "This command is the same as L</pvresize> except that it allows you to "
23635 "specify the new size (in bytes) explicitly."
23639 #: ../fish/guestfish-actions.pod:3385
23644 #: ../fish/guestfish-actions.pod:3387
23652 #: ../fish/guestfish-actions.pod:3395
23653 msgid "See also L</pvs-full>."
23657 #: ../fish/guestfish-actions.pod:3397
23662 #: ../fish/guestfish-actions.pod:3399
23670 #: ../fish/guestfish-actions.pod:3404
23675 #: ../fish/guestfish-actions.pod:3406
23683 #: ../fish/guestfish-actions.pod:3410
23688 #: ../fish/guestfish-actions.pod:3412
23691 " pwrite path content offset\n"
23696 #: ../fish/guestfish-actions.pod:3423
23697 msgid "See also L</pread>, L</pwrite-device>."
23701 #: ../fish/guestfish-actions.pod:3428
23702 msgid "pwrite-device"
23706 #: ../fish/guestfish-actions.pod:3430
23709 " pwrite-device device content offset\n"
23714 #: ../fish/guestfish-actions.pod:3440
23715 msgid "See also L</pwrite>."
23719 #: ../fish/guestfish-actions.pod:3445
23724 #: ../fish/guestfish-actions.pod:3447
23727 " read-file path\n"
23732 #: ../fish/guestfish-actions.pod:3452
23734 "Unlike L</cat>, this function can correctly handle files that contain "
23735 "embedded ASCII NUL characters. However unlike L</download>, this function "
23736 "is limited in the total size of file that can be handled."
23740 #: ../fish/guestfish-actions.pod:3460
23745 #: ../fish/guestfish-actions.pod:3462
23748 " read-lines path\n"
23753 #: ../fish/guestfish-actions.pod:3469
23755 "Note that this function cannot correctly handle binary files (specifically, "
23756 "files containing C<\\0> character which is treated as end of line). For "
23757 "those you need to use the L</read-file> function which has a more complex "
23762 #: ../fish/guestfish-actions.pod:3474
23767 #: ../fish/guestfish-actions.pod:3476
23775 #: ../fish/guestfish-actions.pod:3528
23777 "This function is primarily intended for use by programs. To get a simple "
23778 "list of names, use L</ls>. To get a printable directory for human "
23779 "consumption, use L</ll>."
23783 #: ../fish/guestfish-actions.pod:3532
23788 #: ../fish/guestfish-actions.pod:3534
23796 #: ../fish/guestfish-actions.pod:3538
23797 msgid "readlinklist"
23801 #: ../fish/guestfish-actions.pod:3540
23804 " readlinklist path 'names ...'\n"
23809 #: ../fish/guestfish-actions.pod:3564
23814 #: ../fish/guestfish-actions.pod:3566
23822 #: ../fish/guestfish-actions.pod:3571
23823 msgid "removexattr"
23827 #: ../fish/guestfish-actions.pod:3573
23830 " removexattr xattr path\n"
23835 #: ../fish/guestfish-actions.pod:3578
23836 msgid "See also: L</lremovexattr>, L<attr(5)>."
23840 #: ../fish/guestfish-actions.pod:3580
23845 #: ../fish/guestfish-actions.pod:3582
23848 " resize2fs device\n"
23853 #: ../fish/guestfish-actions.pod:3587
23855 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
23856 "before calling this command. For unknown reasons C<resize2fs> sometimes "
23857 "gives an error about this and sometimes not. In any case, it is always safe "
23858 "to call L</e2fsck-f> before calling this function."
23862 #: ../fish/guestfish-actions.pod:3593
23863 msgid "resize2fs-size"
23867 #: ../fish/guestfish-actions.pod:3595
23870 " resize2fs-size device size\n"
23875 #: ../fish/guestfish-actions.pod:3597
23877 "This command is the same as L</resize2fs> except that it allows you to "
23878 "specify the new size (in bytes) explicitly."
23882 #: ../fish/guestfish-actions.pod:3600
23887 #: ../fish/guestfish-actions.pod:3602
23895 #: ../fish/guestfish-actions.pod:3606
23900 #: ../fish/guestfish-actions.pod:3608
23908 #: ../fish/guestfish-actions.pod:3614
23913 #: ../fish/guestfish-actions.pod:3616
23921 #: ../fish/guestfish-actions.pod:3620
23922 msgid "rmmountpoint"
23926 #: ../fish/guestfish-actions.pod:3622
23929 " rmmountpoint exemptpath\n"
23934 #: ../fish/guestfish-actions.pod:3624
23936 "This calls removes a mountpoint that was previously created with L</"
23937 "mkmountpoint>. See L</mkmountpoint> for full details."
23941 #: ../fish/guestfish-actions.pod:3628
23942 msgid "scrub-device"
23946 #: ../fish/guestfish-actions.pod:3630
23949 " scrub-device device\n"
23954 #: ../fish/guestfish-actions.pod:3641
23959 #: ../fish/guestfish-actions.pod:3643
23962 " scrub-file file\n"
23967 #: ../fish/guestfish-actions.pod:3653
23968 msgid "scrub-freespace"
23972 #: ../fish/guestfish-actions.pod:3655
23975 " scrub-freespace dir\n"
23980 #: ../fish/guestfish-actions.pod:3657
23982 "This command creates the directory C<dir> and then fills it with files until "
23983 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
23984 "deletes them. The intention is to scrub any free space on the partition "
23985 "containing C<dir>."
23989 #: ../fish/guestfish-actions.pod:3666
23994 #: ../fish/guestfish-actions.pod:3668
23999 #: ../fish/guestfish-actions.pod:3670
24002 " set-append append\n"
24007 #: ../fish/guestfish-actions.pod:3681
24008 msgid "set-autosync"
24012 #: ../fish/guestfish-actions.pod:3683
24017 #: ../fish/guestfish-actions.pod:3685
24020 " set-autosync true|false\n"
24025 #: ../fish/guestfish-actions.pod:3687
24027 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
24028 "effort attempt to run L</umount-all> followed by L</sync> when the handle is "
24029 "closed (also if the program exits without closing handles)."
24033 #: ../fish/guestfish-actions.pod:3695
24038 #: ../fish/guestfish-actions.pod:3697
24043 #: ../fish/guestfish-actions.pod:3699
24046 " set-direct true|false\n"
24051 #: ../fish/guestfish-actions.pod:3705
24053 "One consequence of this is that log messages aren't caught by the library "
24054 "and handled by L</set-log-message-callback>, but go straight to stdout."
24058 #: ../fish/guestfish-actions.pod:3714
24059 msgid "set-e2label"
24063 #: ../fish/guestfish-actions.pod:3716
24066 " set-e2label device label\n"
24071 #: ../fish/guestfish-actions.pod:3722
24073 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
24074 "label on a filesystem."
24078 #: ../fish/guestfish-actions.pod:3725
24083 #: ../fish/guestfish-actions.pod:3727
24086 " set-e2uuid device uuid\n"
24091 #: ../fish/guestfish-actions.pod:3734
24093 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
24094 "UUID of a filesystem."
24098 #: ../fish/guestfish-actions.pod:3737
24099 msgid "set-memsize"
24103 #: ../fish/guestfish-actions.pod:3739
24108 #: ../fish/guestfish-actions.pod:3741
24111 " set-memsize memsize\n"
24116 #: ../fish/guestfish-actions.pod:3743
24118 "This sets the memory size in megabytes allocated to the qemu subprocess. "
24119 "This only has any effect if called before L</launch>."
24123 #: ../fish/guestfish-actions.pod:3754
24124 msgid "set-network"
24128 #: ../fish/guestfish-actions.pod:3756
24133 #: ../fish/guestfish-actions.pod:3758
24136 " set-network true|false\n"
24141 #: ../fish/guestfish-actions.pod:3766
24143 "You must call this before calling L</launch>, otherwise it has no effect."
24147 #: ../fish/guestfish-actions.pod:3769
24152 #: ../fish/guestfish-actions.pod:3771
24157 #: ../fish/guestfish-actions.pod:3773
24160 " set-path searchpath\n"
24165 #: ../fish/guestfish-actions.pod:3782
24170 #: ../fish/guestfish-actions.pod:3784
24175 #: ../fish/guestfish-actions.pod:3786
24183 #: ../fish/guestfish-actions.pod:3806
24184 msgid "set-recovery-proc"
24188 #: ../fish/guestfish-actions.pod:3808
24189 msgid "recovery-proc"
24193 #: ../fish/guestfish-actions.pod:3810
24196 " set-recovery-proc true|false\n"
24201 #: ../fish/guestfish-actions.pod:3812
24203 "If this is called with the parameter C<false> then L</launch> does not "
24204 "create a recovery process. The purpose of the recovery process is to stop "
24205 "runaway qemu processes in the case where the main program aborts abruptly."
24209 #: ../fish/guestfish-actions.pod:3817
24211 "This only has any effect if called before L</launch>, and the default is "
24216 #: ../fish/guestfish-actions.pod:3826
24217 msgid "set-selinux"
24221 #: ../fish/guestfish-actions.pod:3828
24226 #: ../fish/guestfish-actions.pod:3830
24229 " set-selinux true|false\n"
24234 #: ../fish/guestfish-actions.pod:3841
24239 #: ../fish/guestfish-actions.pod:3843
24244 #: ../fish/guestfish-actions.pod:3845
24247 " set-trace true|false\n"
24252 #: ../fish/guestfish-actions.pod:3861
24253 msgid "set-verbose"
24257 #: ../fish/guestfish-actions.pod:3863
24262 #: ../fish/guestfish-actions.pod:3865
24265 " set-verbose true|false\n"
24270 #: ../fish/guestfish-actions.pod:3872
24275 #: ../fish/guestfish-actions.pod:3874
24278 " setcon context\n"
24283 #: ../fish/guestfish-actions.pod:3881
24288 #: ../fish/guestfish-actions.pod:3883
24291 " setxattr xattr val vallen path\n"
24296 #: ../fish/guestfish-actions.pod:3889
24297 msgid "See also: L</lsetxattr>, L<attr(5)>."
24301 #: ../fish/guestfish-actions.pod:3891
24306 #: ../fish/guestfish-actions.pod:3893
24309 " sfdisk device cyls heads sectors 'lines ...'\n"
24314 #: ../fish/guestfish-actions.pod:3915
24315 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
24319 #: ../fish/guestfish-actions.pod:3921
24324 #: ../fish/guestfish-actions.pod:3923
24327 " sfdiskM device 'lines ...'\n"
24332 #: ../fish/guestfish-actions.pod:3925
24334 "This is a simplified interface to the L</sfdisk> command, where partition "
24335 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
24336 "you don't need to specify the cyls, heads and sectors parameters which were "
24337 "rarely if ever used anyway."
24341 #: ../fish/guestfish-actions.pod:3931
24342 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
24346 #: ../fish/guestfish-actions.pod:3937
24351 #: ../fish/guestfish-actions.pod:3939
24354 " sfdisk-N device partnum cyls heads sectors line\n"
24359 #: ../fish/guestfish-actions.pod:3944
24361 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
24362 "cyls/heads/sectors parameters."
24366 #: ../fish/guestfish-actions.pod:3947
24367 msgid "See also: L</part-add>"
24371 #: ../fish/guestfish-actions.pod:3952
24372 msgid "sfdisk-disk-geometry"
24376 #: ../fish/guestfish-actions.pod:3954
24379 " sfdisk-disk-geometry device\n"
24384 #: ../fish/guestfish-actions.pod:3956
24386 "This displays the disk geometry of C<device> read from the partition table. "
24387 "Especially in the case where the underlying block device has been resized, "
24388 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
24389 "kernel-geometry>)."
24393 #: ../fish/guestfish-actions.pod:3964
24394 msgid "sfdisk-kernel-geometry"
24398 #: ../fish/guestfish-actions.pod:3966
24401 " sfdisk-kernel-geometry device\n"
24406 #: ../fish/guestfish-actions.pod:3973
24411 #: ../fish/guestfish-actions.pod:3975
24414 " sfdisk-l device\n"
24419 #: ../fish/guestfish-actions.pod:3981
24420 msgid "See also: L</part-list>"
24424 #: ../fish/guestfish-actions.pod:3983
24429 #: ../fish/guestfish-actions.pod:3985
24437 #: ../fish/guestfish-actions.pod:3990
24438 msgid "This is like L</command>, but passes the command to:"
24442 #: ../fish/guestfish-actions.pod:3998
24443 msgid "All the provisos about L</command> apply to this call."
24447 #: ../fish/guestfish-actions.pod:4000
24452 #: ../fish/guestfish-actions.pod:4002
24455 " sh-lines command\n"
24460 #: ../fish/guestfish-actions.pod:4004
24461 msgid "This is the same as L</sh>, but splits the result into a list of lines."
24465 #: ../fish/guestfish-actions.pod:4007
24466 msgid "See also: L</command-lines>"
24470 #: ../fish/guestfish-actions.pod:4009
24475 #: ../fish/guestfish-actions.pod:4011
24483 #: ../fish/guestfish-actions.pod:4015
24488 #: ../fish/guestfish-actions.pod:4017
24496 #: ../fish/guestfish-actions.pod:4023
24501 #: ../fish/guestfish-actions.pod:4025
24509 #: ../fish/guestfish-actions.pod:4033
24514 #: ../fish/guestfish-actions.pod:4035
24522 #: ../fish/guestfish-actions.pod:4043
24527 #: ../fish/guestfish-actions.pod:4045
24530 " strings-e encoding path\n"
24535 #: ../fish/guestfish-actions.pod:4047
24537 "This is like the L</strings> command, but allows you to specify the encoding "
24538 "of strings that are looked for in the source file C<path>."
24542 #: ../fish/guestfish-actions.pod:4057
24544 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
24545 "ISO-8859-X (this is what L</strings> uses)."
24549 #: ../fish/guestfish-actions.pod:4089
24550 msgid "swapoff-device"
24554 #: ../fish/guestfish-actions.pod:4091
24557 " swapoff-device device\n"
24562 #: ../fish/guestfish-actions.pod:4093
24564 "This command disables the libguestfs appliance swap device or partition "
24565 "named C<device>. See L</swapon-device>."
24569 #: ../fish/guestfish-actions.pod:4097
24570 msgid "swapoff-file"
24574 #: ../fish/guestfish-actions.pod:4099
24577 " swapoff-file file\n"
24582 #: ../fish/guestfish-actions.pod:4103
24583 msgid "swapoff-label"
24587 #: ../fish/guestfish-actions.pod:4105
24590 " swapoff-label label\n"
24595 #: ../fish/guestfish-actions.pod:4110
24596 msgid "swapoff-uuid"
24600 #: ../fish/guestfish-actions.pod:4112
24603 " swapoff-uuid uuid\n"
24608 #: ../fish/guestfish-actions.pod:4117
24609 msgid "swapon-device"
24613 #: ../fish/guestfish-actions.pod:4119
24616 " swapon-device device\n"
24621 #: ../fish/guestfish-actions.pod:4121
24623 "This command enables the libguestfs appliance to use the swap device or "
24624 "partition named C<device>. The increased memory is made available for all "
24625 "commands, for example those run using L</command> or L</sh>."
24629 #: ../fish/guestfish-actions.pod:4133
24630 msgid "swapon-file"
24634 #: ../fish/guestfish-actions.pod:4135
24637 " swapon-file file\n"
24642 #: ../fish/guestfish-actions.pod:4137
24644 "This command enables swap to a file. See L</swapon-device> for other notes."
24648 #: ../fish/guestfish-actions.pod:4140
24649 msgid "swapon-label"
24653 #: ../fish/guestfish-actions.pod:4142
24656 " swapon-label label\n"
24661 #: ../fish/guestfish-actions.pod:4144
24663 "This command enables swap to a labeled swap partition. See L</swapon-"
24664 "device> for other notes."
24668 #: ../fish/guestfish-actions.pod:4147
24669 msgid "swapon-uuid"
24673 #: ../fish/guestfish-actions.pod:4149
24676 " swapon-uuid uuid\n"
24681 #: ../fish/guestfish-actions.pod:4151
24683 "This command enables swap to a swap partition with the given UUID. See L</"
24684 "swapon-device> for other notes."
24688 #: ../fish/guestfish-actions.pod:4154
24693 #: ../fish/guestfish-actions.pod:4156
24701 #: ../fish/guestfish-actions.pod:4164
24706 #: ../fish/guestfish-actions.pod:4166
24714 #: ../fish/guestfish-actions.pod:4174
24719 #: ../fish/guestfish-actions.pod:4176
24722 " tail-n nrlines path\n"
24727 #: ../fish/guestfish-actions.pod:4189
24732 #: ../fish/guestfish-actions.pod:4191
24735 " tar-in (tarfile|-) directory\n"
24740 #: ../fish/guestfish-actions.pod:4196
24741 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
24745 #: ../fish/guestfish-actions.pod:4201
24750 #: ../fish/guestfish-actions.pod:4203
24753 " tar-out directory (tarfile|-)\n"
24758 #: ../fish/guestfish-actions.pod:4208
24759 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
24763 #: ../fish/guestfish-actions.pod:4213
24768 #: ../fish/guestfish-actions.pod:4215
24771 " tgz-in (tarball|-) directory\n"
24776 #: ../fish/guestfish-actions.pod:4220
24777 msgid "To upload an uncompressed tarball, use L</tar-in>."
24781 #: ../fish/guestfish-actions.pod:4224
24786 #: ../fish/guestfish-actions.pod:4226
24789 " tgz-out directory (tarball|-)\n"
24794 #: ../fish/guestfish-actions.pod:4231
24795 msgid "To download an uncompressed tarball, use L</tar-out>."
24799 #: ../fish/guestfish-actions.pod:4235
24804 #: ../fish/guestfish-actions.pod:4237
24812 #: ../fish/guestfish-actions.pod:4246
24817 #: ../fish/guestfish-actions.pod:4248
24825 #: ../fish/guestfish-actions.pod:4253
24826 msgid "truncate-size"
24830 #: ../fish/guestfish-actions.pod:4255
24833 " truncate-size path size\n"
24838 #: ../fish/guestfish-actions.pod:4260
24840 "If the current file size is less than C<size> then the file is extended to "
24841 "the required size with zero bytes. This creates a sparse file (ie. disk "
24842 "blocks are not allocated for the file until you write to it). To create a "
24843 "non-sparse file of zeroes, use L</fallocate64> instead."
24847 #: ../fish/guestfish-actions.pod:4266
24852 #: ../fish/guestfish-actions.pod:4268
24855 " tune2fs-l device\n"
24860 #: ../fish/guestfish-actions.pod:4278
24865 #: ../fish/guestfish-actions.pod:4280
24868 " txz-in (tarball|-) directory\n"
24873 #: ../fish/guestfish-actions.pod:4287
24878 #: ../fish/guestfish-actions.pod:4289
24881 " txz-out directory (tarball|-)\n"
24886 #: ../fish/guestfish-actions.pod:4296
24891 #: ../fish/guestfish-actions.pod:4298
24899 #: ../fish/guestfish-actions.pod:4312
24900 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
24904 #: ../fish/guestfish-actions.pod:4317
24909 #: ../fish/guestfish-actions.pod:4319
24914 #: ../fish/guestfish-actions.pod:4321
24917 " umount pathordevice\n"
24922 #: ../fish/guestfish-actions.pod:4327
24927 #: ../fish/guestfish-actions.pod:4329
24928 msgid "unmount-all"
24932 #: ../fish/guestfish-actions.pod:4331
24940 #: ../fish/guestfish-actions.pod:4337
24945 #: ../fish/guestfish-actions.pod:4339
24948 " upload (filename|-) remotefilename\n"
24953 #: ../fish/guestfish-actions.pod:4346
24954 msgid "See also L</download>."
24958 #: ../fish/guestfish-actions.pod:4350
24959 msgid "upload-offset"
24963 #: ../fish/guestfish-actions.pod:4352
24966 " upload-offset (filename|-) remotefilename offset\n"
24971 #: ../fish/guestfish-actions.pod:4364
24973 "Note that there is no limit on the amount of data that can be uploaded with "
24974 "this call, unlike with L</pwrite>, and this call always writes the full "
24975 "amount unless an error occurs."
24979 #: ../fish/guestfish-actions.pod:4369
24980 msgid "See also L</upload>, L</pwrite>."
24984 #: ../fish/guestfish-actions.pod:4373
24989 #: ../fish/guestfish-actions.pod:4375
24992 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
24997 #: ../fish/guestfish-actions.pod:4394
25002 #: ../fish/guestfish-actions.pod:4396
25010 #: ../fish/guestfish-actions.pod:4423
25012 "I<Note:> Don't use this call to test for availability of features. In "
25013 "enterprise distributions we backport features from later versions into "
25014 "earlier versions, making this an unreliable way to test for features. Use "
25015 "L</available> instead."
25019 #: ../fish/guestfish-actions.pod:4429
25024 #: ../fish/guestfish-actions.pod:4431
25027 " vfs-label device\n"
25032 #: ../fish/guestfish-actions.pod:4438
25033 msgid "To find a filesystem from the label, use L</findfs-label>."
25037 #: ../fish/guestfish-actions.pod:4440
25042 #: ../fish/guestfish-actions.pod:4442
25045 " vfs-type device\n"
25050 #: ../fish/guestfish-actions.pod:4452
25055 #: ../fish/guestfish-actions.pod:4454
25058 " vfs-uuid device\n"
25063 #: ../fish/guestfish-actions.pod:4461
25064 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
25068 #: ../fish/guestfish-actions.pod:4463
25069 msgid "vg-activate"
25073 #: ../fish/guestfish-actions.pod:4465
25076 " vg-activate true|false 'volgroups ...'\n"
25081 #: ../fish/guestfish-actions.pod:4478
25082 msgid "vg-activate-all"
25086 #: ../fish/guestfish-actions.pod:4480
25089 " vg-activate-all true|false\n"
25094 #: ../fish/guestfish-actions.pod:4490
25099 #: ../fish/guestfish-actions.pod:4492
25102 " vgcreate volgroup 'physvols ...'\n"
25107 #: ../fish/guestfish-actions.pod:4497
25112 #: ../fish/guestfish-actions.pod:4499
25115 " vglvuuids vgname\n"
25120 #: ../fish/guestfish-actions.pod:4504
25122 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
25123 "logical volumes and volume groups."
25127 #: ../fish/guestfish-actions.pod:4507
25128 msgid "See also L</vgpvuuids>."
25132 #: ../fish/guestfish-actions.pod:4509
25137 #: ../fish/guestfish-actions.pod:4511
25140 " vgpvuuids vgname\n"
25145 #: ../fish/guestfish-actions.pod:4516
25147 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
25148 "physical volumes and volume groups."
25152 #: ../fish/guestfish-actions.pod:4519
25153 msgid "See also L</vglvuuids>."
25157 #: ../fish/guestfish-actions.pod:4521
25162 #: ../fish/guestfish-actions.pod:4523
25165 " vgremove vgname\n"
25170 #: ../fish/guestfish-actions.pod:4530
25175 #: ../fish/guestfish-actions.pod:4532
25178 " vgrename volgroup newvolgroup\n"
25183 #: ../fish/guestfish-actions.pod:4536
25188 #: ../fish/guestfish-actions.pod:4538
25196 #: ../fish/guestfish-actions.pod:4546
25197 msgid "See also L</vgs-full>."
25201 #: ../fish/guestfish-actions.pod:4548
25206 #: ../fish/guestfish-actions.pod:4550
25214 #: ../fish/guestfish-actions.pod:4555
25219 #: ../fish/guestfish-actions.pod:4557
25227 #: ../fish/guestfish-actions.pod:4562
25232 #: ../fish/guestfish-actions.pod:4564
25240 #: ../fish/guestfish-actions.pod:4568
25245 #: ../fish/guestfish-actions.pod:4570
25253 #: ../fish/guestfish-actions.pod:4575
25258 #: ../fish/guestfish-actions.pod:4577
25266 #: ../fish/guestfish-actions.pod:4582
25271 #: ../fish/guestfish-actions.pod:4584
25279 #: ../fish/guestfish-actions.pod:4589
25284 #: ../fish/guestfish-actions.pod:4591
25287 " write path content\n"
25292 #: ../fish/guestfish-actions.pod:4599
25297 #: ../fish/guestfish-actions.pod:4601
25300 " write-file path content size\n"
25305 #: ../fish/guestfish-actions.pod:4624
25310 #: ../fish/guestfish-actions.pod:4626
25313 " zegrep regex path\n"
25318 #: ../fish/guestfish-actions.pod:4634
25323 #: ../fish/guestfish-actions.pod:4636
25326 " zegrepi regex path\n"
25331 #: ../fish/guestfish-actions.pod:4644
25336 #: ../fish/guestfish-actions.pod:4646
25344 #: ../fish/guestfish-actions.pod:4654
25345 msgid "See also: L</zero-device>, L</scrub-device>."
25349 #: ../fish/guestfish-actions.pod:4656
25350 msgid "zero-device"
25354 #: ../fish/guestfish-actions.pod:4658
25357 " zero-device device\n"
25362 #: ../fish/guestfish-actions.pod:4660
25364 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
25365 "which just zeroes the first few blocks of a device."
25369 #: ../fish/guestfish-actions.pod:4667
25374 #: ../fish/guestfish-actions.pod:4669
25377 " zerofree device\n"
25382 #: ../fish/guestfish-actions.pod:4682
25387 #: ../fish/guestfish-actions.pod:4684
25390 " zfgrep pattern path\n"
25395 #: ../fish/guestfish-actions.pod:4692
25400 #: ../fish/guestfish-actions.pod:4694
25403 " zfgrepi pattern path\n"
25408 #: ../fish/guestfish-actions.pod:4702
25413 #: ../fish/guestfish-actions.pod:4704
25416 " zfile meth path\n"
25421 #: ../fish/guestfish-actions.pod:4711
25423 "Since 1.0.63, use L</file> instead which can now process compressed files."
25427 #: ../fish/guestfish-actions.pod:4721
25432 #: ../fish/guestfish-actions.pod:4723
25435 " zgrep regex path\n"
25440 #: ../fish/guestfish-actions.pod:4731
25445 #: ../fish/guestfish-actions.pod:4733
25448 " zgrepi regex path\n"
25453 #: ../fish/guestfish-commands.pod:1
25458 #: ../fish/guestfish-commands.pod:3
25463 #: ../fish/guestfish-commands.pod:5
25466 " alloc filename size\n"
25471 #: ../fish/guestfish-commands.pod:7
25473 "This creates an empty (zeroed) file of the given size, and then adds so it "
25474 "can be further examined."
25478 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
25479 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
25483 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
25484 msgid "Size can be specified using standard suffixes, eg. C<1M>."
25488 #: ../fish/guestfish-commands.pod:14
25490 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
25491 "image, see L</PREPARED DISK IMAGES>."
25495 #: ../fish/guestfish-commands.pod:17
25500 #: ../fish/guestfish-commands.pod:19
25503 " copy-in local [local ...] /remotedir\n"
25508 #: ../fish/guestfish-commands.pod:21
25510 "C<copy-in> copies local files or directories recursively into the disk "
25511 "image, placing them in the directory called C</remotedir> (which must "
25512 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
25513 "other commands as necessary."
25517 #: ../fish/guestfish-commands.pod:26
25519 "Multiple local files and directories can be specified, but the last "
25520 "parameter must always be a remote directory. Wildcards cannot be used."
25524 #: ../fish/guestfish-commands.pod:30
25529 #: ../fish/guestfish-commands.pod:32
25532 " copy-out remote [remote ...] localdir\n"
25537 #: ../fish/guestfish-commands.pod:34
25539 "C<copy-out> copies remote files or directories recursively out of the disk "
25540 "image, placing them on the host disk in a local directory called C<localdir> "
25541 "(which must exist). This guestfish meta-command turns into a sequence of L</"
25542 "download>, L</tar-out> and other commands as necessary."
25546 #: ../fish/guestfish-commands.pod:40
25548 "Multiple remote files and directories can be specified, but the last "
25549 "parameter must always be a local directory. To download to the current "
25550 "directory, use C<.> as in:"
25554 #: ../fish/guestfish-commands.pod:44
25557 " copy-out /home .\n"
25562 #: ../fish/guestfish-commands.pod:46
25564 "Wildcards cannot be used in the ordinary command, but you can use them with "
25565 "the help of L</glob> like this:"
25569 #: ../fish/guestfish-commands.pod:49
25572 " glob copy-out /home/* .\n"
25577 #: ../fish/guestfish-commands.pod:51
25582 #: ../fish/guestfish-commands.pod:53
25585 " echo [params ...]\n"
25590 #: ../fish/guestfish-commands.pod:55
25591 msgid "This echos the parameters to the terminal."
25595 #: ../fish/guestfish-commands.pod:57
25600 #: ../fish/guestfish-commands.pod:59
25605 #: ../fish/guestfish-commands.pod:61
25610 #: ../fish/guestfish-commands.pod:63
25618 #: ../fish/guestfish-commands.pod:65
25620 "This is used to edit a file. It downloads the file, edits it locally using "
25621 "your editor, then uploads the result."
25625 #: ../fish/guestfish-commands.pod:68
25627 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
25628 "or C<emacs> you will get those corresponding editors."
25632 #: ../fish/guestfish-commands.pod:72
25637 #: ../fish/guestfish-commands.pod:74
25640 " glob command args...\n"
25645 #: ../fish/guestfish-commands.pod:76
25647 "Expand wildcards in any paths in the args list, and run C<command> "
25648 "repeatedly on each matching path."
25652 #: ../fish/guestfish-commands.pod:79
25653 msgid "See L</WILDCARDS AND GLOBBING>."
25657 #: ../fish/guestfish-commands.pod:81
25662 #: ../fish/guestfish-commands.pod:83
25665 " hexedit <filename|device>\n"
25666 " hexedit <filename|device> <max>\n"
25667 " hexedit <filename|device> <start> <max>\n"
25672 #: ../fish/guestfish-commands.pod:87
25674 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
25679 #: ../fish/guestfish-commands.pod:90
25681 "This command works by downloading potentially the whole file or device, "
25682 "editing it locally, then uploading it. If the file or device is large, you "
25683 "have to specify which part you wish to edit by using C<max> and/or C<start> "
25684 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
25685 "usual modifiers allowed such as C<1M> (1 megabyte)."
25689 #: ../fish/guestfish-commands.pod:97
25690 msgid "For example to edit the first few sectors of a disk you might do:"
25694 #: ../fish/guestfish-commands.pod:100
25697 " hexedit /dev/sda 1M\n"
25702 #: ../fish/guestfish-commands.pod:102
25704 "which would allow you to edit anywhere within the first megabyte of the disk."
25708 #: ../fish/guestfish-commands.pod:105
25709 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
25713 #: ../fish/guestfish-commands.pod:107
25716 " hexedit /dev/sda1 0x400 0x400\n"
25721 #: ../fish/guestfish-commands.pod:109
25722 msgid "(assuming the superblock is in the standard location)."
25726 #: ../fish/guestfish-commands.pod:111
25728 "This command requires the external L<hexedit(1)> program. You can specify "
25729 "another program to use by setting the C<HEXEDITOR> environment variable."
25733 #: ../fish/guestfish-commands.pod:115
25734 msgid "See also L</hexdump>."
25738 #: ../fish/guestfish-commands.pod:117
25743 #: ../fish/guestfish-commands.pod:119
25751 #: ../fish/guestfish-commands.pod:121
25753 "Change the local directory, ie. the current directory of guestfish itself."
25757 #: ../fish/guestfish-commands.pod:124
25758 msgid "Note that C<!cd> won't do what you might expect."
25762 #: ../fish/guestfish-commands.pod:126
25767 #: ../fish/guestfish-commands.pod:128
25772 #: ../fish/guestfish-commands.pod:130
25780 #: ../fish/guestfish-commands.pod:132
25781 msgid "Opens the manual page for guestfish."
25785 #: ../fish/guestfish-commands.pod:134
25790 #: ../fish/guestfish-commands.pod:136
25795 #: ../fish/guestfish-commands.pod:138
25803 #: ../fish/guestfish-commands.pod:140
25811 #: ../fish/guestfish-commands.pod:142
25812 msgid "This is used to view a file."
25816 #: ../fish/guestfish-commands.pod:144
25818 "The default viewer is C<$PAGER>. However if you use the alternate command "
25819 "C<less> you will get the C<less> command specifically."
25823 #: ../fish/guestfish-commands.pod:147
25828 #: ../fish/guestfish-commands.pod:149
25836 #: ../fish/guestfish-commands.pod:151
25838 "Close and reopen the libguestfs handle. It is not necessary to use this "
25839 "normally, because the handle is closed properly when guestfish exits. "
25840 "However this is occasionally useful for testing."
25844 #: ../fish/guestfish-commands.pod:155
25849 #: ../fish/guestfish-commands.pod:157
25852 " sparse filename size\n"
25857 #: ../fish/guestfish-commands.pod:159
25859 "This creates an empty sparse file of the given size, and then adds so it can "
25860 "be further examined."
25864 #: ../fish/guestfish-commands.pod:162
25866 "In all respects it works the same as the L</alloc> command, except that the "
25867 "image file is allocated sparsely, which means that disk blocks are not "
25868 "assigned to the file until they are needed. Sparse disk files only use "
25869 "space when written to, but they are slower and there is a danger you could "
25870 "run out of real disk space during a write operation."
25874 #: ../fish/guestfish-commands.pod:172
25879 #: ../fish/guestfish-commands.pod:174
25887 #: ../fish/guestfish-commands.pod:176
25889 "This command returns a list of the optional groups known to the daemon, and "
25890 "indicates which ones are supported by this build of the libguestfs appliance."
25894 #: ../fish/guestfish-commands.pod:180
25895 msgid "See also L<guestfs(3)/AVAILABILITY>."
25899 #: ../fish/guestfish-commands.pod:182
25904 #: ../fish/guestfish-commands.pod:184
25907 " time command args...\n"
25912 #: ../fish/guestfish-commands.pod:186
25914 "Run the command as usual, but print the elapsed time afterwards. This can "
25915 "be useful for benchmarking operations."
25919 #: ../test-tool/libguestfs-test-tool.pod:5
25920 msgid "libguestfs-test-tool - End user tests for libguestfs"
25924 #: ../test-tool/libguestfs-test-tool.pod:9
25927 " libguestfs-test-tool [--options]\n"
25932 #: ../test-tool/libguestfs-test-tool.pod:13
25934 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
25935 "and developers, to allow them to check basic libguestfs functionality is "
25936 "working. This is needed because libguestfs occasionally breaks for reasons "
25937 "beyond our control: usually because of changes in the underlying qemu or "
25938 "kernel packages, or the host environment."
25942 #: ../test-tool/libguestfs-test-tool.pod:20
25943 msgid "If you suspect a problem in libguestfs, then just run:"
25947 #: ../test-tool/libguestfs-test-tool.pod:22
25950 " libguestfs-test-tool\n"
25955 #: ../test-tool/libguestfs-test-tool.pod:24
25956 msgid "It will print lots of diagnostic messages."
25960 #: ../test-tool/libguestfs-test-tool.pod:26
25961 msgid "If it runs to completion successfully, you will see this near the end:"
25965 #: ../test-tool/libguestfs-test-tool.pod:28
25968 " ===== TEST FINISHED OK =====\n"
25973 #: ../test-tool/libguestfs-test-tool.pod:30
25974 msgid "and the test tool will exit with code 0."
25978 #: ../test-tool/libguestfs-test-tool.pod:32
25980 "If it fails (and/or exits with non-zero error code), please paste the "
25981 "B<complete, unedited> output of the test tool into a bug report. More "
25982 "information about reporting bugs can be found on the L<http://libguestfs.org/"
25987 #: ../test-tool/libguestfs-test-tool.pod:41
25992 #: ../test-tool/libguestfs-test-tool.pod:43
25993 msgid "Display short usage information and exit."
25997 #: ../test-tool/libguestfs-test-tool.pod:45
25998 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
26002 #: ../test-tool/libguestfs-test-tool.pod:47
26004 "Pass an alternate name for the helper program. libguestfs-test-tool will "
26005 "normally look in the C<$libexec> directory that was configured when the tool "
26010 #: ../test-tool/libguestfs-test-tool.pod:51
26011 msgid "I<--qemu qemu_binary>"
26015 #: ../test-tool/libguestfs-test-tool.pod:53
26017 "If you have downloaded another qemu binary, point this option at the full "
26018 "path of the binary to try it."
26022 #: ../test-tool/libguestfs-test-tool.pod:56
26023 msgid "I<--qemudir qemu_source_dir>"
26027 #: ../test-tool/libguestfs-test-tool.pod:58
26029 "If you have compiled qemu from source, point this option at the source "
26030 "directory to try it."
26034 #: ../test-tool/libguestfs-test-tool.pod:61
26035 msgid "I<--timeout N>"
26039 #: ../test-tool/libguestfs-test-tool.pod:63
26041 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
26042 "does not usually need to be adjusted unless your machine is very slow."
26046 #: ../test-tool/libguestfs-test-tool.pod:69
26047 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
26051 #: ../test-tool/libguestfs-test-tool.pod:71
26053 "If you have compiled another version of qemu from source and would like to "
26054 "try that, then you can use the I<--qemudir> option to point to the qemu "
26055 "source directory."
26059 #: ../test-tool/libguestfs-test-tool.pod:75
26061 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
26062 "option to point to the binary."
26066 #: ../test-tool/libguestfs-test-tool.pod:78
26068 "When using an alternate qemu with libguestfs, usually you would need to "
26069 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in L<guestfs(3)"
26070 ">). libguestfs-test-tool writes a temporary qemu wrapper script when you "
26071 "use either of the I<--qemudir> or I<--qemu> options."
26075 #: ../test-tool/libguestfs-test-tool.pod:85
26077 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
26078 "I<1> if there was an error."
26082 #: ../test-tool/libguestfs-test-tool.pod:92
26083 msgid "/usr/libexec/libguestfs-test-tool-helper"
26087 #: ../test-tool/libguestfs-test-tool.pod:94
26089 "This helper program is run inside the appliance and provides additional "
26094 #: ../test-tool/libguestfs-test-tool.pod:97
26095 msgid "/usr/bin/mkisofs"
26099 #: ../test-tool/libguestfs-test-tool.pod:99
26101 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
26102 "which is used as part of the tests."
26106 #: ../test-tool/libguestfs-test-tool.pod:106
26108 "For the full list of environment variables which may affect libguestfs, "
26109 "please see the L<guestfs(3)> manual page."
26113 #: ../test-tool/libguestfs-test-tool.pod:111
26114 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
26118 #: ../test-tool/libguestfs-test-tool.pod:121
26119 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
26123 #: ../fuse/guestmount.pod:5
26125 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
26129 #: ../fuse/guestmount.pod:9
26132 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
26137 #: ../fuse/guestmount.pod:11
26140 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
26145 #: ../fuse/guestmount.pod:13
26148 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
26153 #: ../fuse/guestmount.pod:17
26155 "You must I<not> use C<guestmount> in read-write mode on live virtual "
26156 "machines. If you do this, you risk disk corruption in the VM."
26160 #: ../fuse/guestmount.pod:22
26162 "The guestmount program can be used to mount virtual machine filesystems and "
26163 "other disk images on the host. It uses libguestfs for access to the guest "
26164 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
26165 "a mountable device."
26169 #: ../fuse/guestmount.pod:27
26171 "Along with other options, you have to give at least one device (I<-a> "
26172 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
26173 "option) or use the I<-i> inspection option. How this works is better "
26174 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
26179 #: ../fuse/guestmount.pod:33
26181 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
26182 "by you, and the filesystem will not be visible to any other users unless you "
26183 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
26184 "the filesystem, use the C<fusermount -u> command."
26188 #: ../fuse/guestmount.pod:41
26190 "For a typical Windows guest which has its main filesystem on the first "
26195 #: ../fuse/guestmount.pod:44
26198 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
26203 #: ../fuse/guestmount.pod:46
26205 "For a typical Linux guest which has a /boot filesystem on the first "
26206 "partition, and the root filesystem on a logical volume:"
26210 #: ../fuse/guestmount.pod:49
26213 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
26218 #: ../fuse/guestmount.pod:51
26219 msgid "To get libguestfs to detect guest mountpoints for you:"
26223 #: ../fuse/guestmount.pod:53
26226 " guestmount -a guest.img -i --ro /mnt\n"
26231 #: ../fuse/guestmount.pod:55
26232 msgid "For a libvirt guest called \"Guest\" you could do:"
26236 #: ../fuse/guestmount.pod:57
26239 " guestmount -d Guest -i --ro /mnt\n"
26244 #: ../fuse/guestmount.pod:59
26246 "If you don't know what filesystems are contained in a guest or disk image, "
26247 "use L<virt-filesystems(1)> first:"
26251 #: ../fuse/guestmount.pod:62
26254 " virt-filesystems MyGuest\n"
26259 #: ../fuse/guestmount.pod:64
26261 "If you want to trace the libguestfs calls but without excessive debugging "
26262 "information, we recommend:"
26266 #: ../fuse/guestmount.pod:67
26269 " guestmount [...] --trace /mnt\n"
26274 #: ../fuse/guestmount.pod:69
26275 msgid "If you want to debug the program, we recommend:"
26279 #: ../fuse/guestmount.pod:71
26282 " guestmount [...] --trace --verbose /mnt\n"
26287 #: ../fuse/guestmount.pod:77
26288 msgid "B<-a image> | B<--add image>"
26292 #: ../fuse/guestmount.pod:79
26293 msgid "Add a block device or virtual machine image."
26297 #: ../fuse/guestmount.pod:84
26298 msgid "B<-c URI> | B<--connect URI>"
26302 #: ../fuse/guestmount.pod:90
26303 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
26307 #: ../fuse/guestmount.pod:96
26308 msgid "B<--dir-cache-timeout N>"
26312 #: ../fuse/guestmount.pod:98
26314 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
26315 "seconds. The readdir cache [actually, there are several semi-independent "
26316 "caches] is populated after a readdir(2) call with the stat and extended "
26317 "attributes of the files in the directory, in anticipation that they will be "
26318 "requested soon after."
26322 #: ../fuse/guestmount.pod:104
26324 "There is also a different attribute cache implemented by FUSE (see the FUSE "
26325 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
26326 "requests, only cache existing ones."
26330 #: ../fuse/guestmount.pod:115
26331 msgid "B<--format=raw|qcow2|..> | B<--format>"
26335 #: ../fuse/guestmount.pod:122
26337 "If you have untrusted raw-format guest disk images, you should use this "
26338 "option to specify the disk format. This avoids a possible security problem "
26339 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
26340 "guestfs_add_drive_opts>."
26344 #: ../fuse/guestmount.pod:127
26345 msgid "B<--fuse-help>"
26349 #: ../fuse/guestmount.pod:129
26350 msgid "Display help on special FUSE options (see I<-o> below)."
26354 #: ../fuse/guestmount.pod:133
26355 msgid "Display brief help and exit."
26359 #: ../fuse/guestmount.pod:135
26360 msgid "B<-i> | B<--inspector>"
26364 #: ../fuse/guestmount.pod:146
26365 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
26369 #: ../fuse/guestmount.pod:148
26371 "Mount the named partition or logical volume on the given mountpoint B<in the "
26372 "guest> (this has nothing to do with mountpoints in the host)."
26376 #: ../fuse/guestmount.pod:151
26378 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
26379 "something on C</>."
26383 #: ../fuse/guestmount.pod:154
26384 msgid "B<-n> | B<--no-sync>"
26388 #: ../fuse/guestmount.pod:156
26390 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
26391 "unmounted. If you specify this option, then we don't attempt to sync the "
26392 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
26396 #: ../fuse/guestmount.pod:161
26397 msgid "B<-o option> | B<--option option>"
26401 #: ../fuse/guestmount.pod:163
26402 msgid "Pass extra options to FUSE."
26406 #: ../fuse/guestmount.pod:165
26408 "To get a list of all the extra options supported by FUSE, use the command "
26409 "below. Note that only the FUSE I<-o> options can be passed, and only some "
26410 "of them are a good idea."
26414 #: ../fuse/guestmount.pod:169
26417 " guestmount --fuse-help\n"
26422 #: ../fuse/guestmount.pod:171
26423 msgid "Some potentially useful FUSE options:"
26427 #: ../fuse/guestmount.pod:175
26428 msgid "B<-o allow_other>"
26432 #: ../fuse/guestmount.pod:177
26433 msgid "Allow other users to see the filesystem."
26437 #: ../fuse/guestmount.pod:179
26438 msgid "B<-o attr_timeout=N>"
26442 #: ../fuse/guestmount.pod:181
26443 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
26447 #: ../fuse/guestmount.pod:183
26448 msgid "B<-o kernel_cache>"
26452 #: ../fuse/guestmount.pod:185
26454 "Allow the kernel to cache files (reduces the number of reads that have to go "
26455 "through the L<guestfs(3)> API). This is generally a good idea if you can "
26456 "afford the extra memory usage."
26460 #: ../fuse/guestmount.pod:189
26461 msgid "B<-o uid=N> B<-o gid=N>"
26465 #: ../fuse/guestmount.pod:191
26467 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
26468 "the chosen values."
26472 #: ../fuse/guestmount.pod:196
26473 msgid "B<-r> | B<--ro>"
26477 #: ../fuse/guestmount.pod:198
26479 "Add devices and mount everything read-only. Also disallow writes and make "
26480 "the disk appear read-only to FUSE."
26484 #: ../fuse/guestmount.pod:201
26486 "This is highly recommended if you are not going to edit the guest disk. If "
26487 "the guest is running and this option is I<not> supplied, then there is a "
26488 "strong risk of disk corruption in the guest. We try to prevent this from "
26489 "happening, but it is not always possible."
26493 #: ../fuse/guestmount.pod:206
26494 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
26498 #: ../fuse/guestmount.pod:210
26499 msgid "Enable SELinux support for the guest."
26503 #: ../fuse/guestmount.pod:212
26504 msgid "B<-v> | B<--verbose>"
26508 #: ../fuse/guestmount.pod:214
26509 msgid "Enable verbose messages from underlying libguestfs."
26513 #: ../fuse/guestmount.pod:216
26514 msgid "B<-V> | B<--version>"
26518 #: ../fuse/guestmount.pod:218
26519 msgid "Display the program version and exit."
26523 #: ../fuse/guestmount.pod:220
26524 msgid "B<-w> | B<--rw>"
26528 #: ../fuse/guestmount.pod:222
26530 "This option does nothing at the moment. See L<guestfish(1)/OPENING DISKS "
26531 "FOR READ AND WRITE>."
26535 #: ../fuse/guestmount.pod:225
26536 msgid "B<-x> | B<--trace>"
26540 #: ../fuse/guestmount.pod:227
26541 msgid "Trace libguestfs calls and entry into each FUSE function."
26545 #: ../fuse/guestmount.pod:229
26546 msgid "This also stops the daemon from forking into the background."
26550 #: ../fuse/guestmount.pod:235
26552 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
26553 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."